Skip to content

Commit

Permalink
Merge pull request #44004 from Mic92/python37-fixes
Browse files Browse the repository at this point in the history
python37.pkgs.{pycodestyle,pyflakes,flake8,pystemmer}
  • Loading branch information
Mic92 committed Jul 23, 2018
2 parents 483fc6f + 2d1950a commit cb37c93
Show file tree
Hide file tree
Showing 3 changed files with 53 additions and 39 deletions.
28 changes: 28 additions & 0 deletions pkgs/development/python-modules/pystemmer/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
{ stdenv, python, fetchPypi, buildPythonPackage, cython }:

buildPythonPackage rec {
pname = "PyStemmer";
version = "1.3.0";

src = fetchPypi {
inherit pname version;
sha256 = "d1ac14eb64978c1697fcfba76e3ac7ebe24357c9428e775390f634648947cb91";
};

nativeBuildInputs = [ cython ];

preBuild = ''
cython src/Stemmer.pyx
'';

checkPhase = ''
${python.interpreter} runtests.py
'';

meta = with stdenv.lib; {
description = "Snowball stemming algorithms, for information retrieval";
homepage = http://snowball.tartarus.org/;
license = licenses.mit;
platforms = platforms.unix;
};
}
23 changes: 23 additions & 0 deletions pkgs/development/python-modules/snowballstemmer/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{ stdenv, buildPythonPackage, PyStemmer, fetchPypi }:

buildPythonPackage rec {
pname = "snowballstemmer";
version = "1.2.1";

src = fetchPypi {
inherit pname version;
sha256 = "919f26a68b2c17a7634da993d91339e288964f93c274f1343e3bbbe2096e1128";
};

# No tests included
doCheck = false;

propagatedBuildInputs = [ PyStemmer ];

meta = with stdenv.lib; {
description = "16 stemmer algorithms (15 + Poerter English stemmer) generated from Snowball algorithms";
homepage = http://sigal.saimon.org/en/latest/index.html;
license = licenses.bsd3;
platforms = platforms.unix;
};
}
41 changes: 2 additions & 39 deletions pkgs/top-level/python-packages.nix
Original file line number Diff line number Diff line change
Expand Up @@ -10966,25 +10966,7 @@ in {
};
};

PyStemmer = buildPythonPackage (rec {
name = "PyStemmer-1.3.0";

src = pkgs.fetchurl {
url = "mirror://pypi/P/PyStemmer/${name}.tar.gz";
sha256 = "d1ac14eb64978c1697fcfba76e3ac7ebe24357c9428e775390f634648947cb91";
};

checkPhase = ''
${python.interpreter} runtests.py
'';

meta = {
description = "Snowball stemming algorithms, for information retrieval";
homepage = http://snowball.tartarus.org/;
license = licenses.mit;
platforms = platforms.unix;
};
});
PyStemmer = callPackage ../development/python-modules/pystemmer {};

Pyro = callPackage ../development/python-modules/pyro { };

Expand Down Expand Up @@ -12591,26 +12573,7 @@ in {
};
};

snowballstemmer = buildPythonPackage rec {
name = "snowballstemmer-1.2.1";

src = pkgs.fetchurl {
url = "mirror://pypi/s/snowballstemmer/${name}.tar.gz";
sha256 = "919f26a68b2c17a7634da993d91339e288964f93c274f1343e3bbbe2096e1128";
};

# No tests included
doCheck = false;

propagatedBuildInputs = with self; [ PyStemmer ];

meta = {
description = "16 stemmer algorithms (15 + Poerter English stemmer) generated from Snowball algorithms";
homepage = http://sigal.saimon.org/en/latest/index.html;
license = licenses.bsd3;
platforms = platforms.unix;
};
};
snowballstemmer = callPackage ../development/python-modules/snowballstemmer { };

spake2 = callPackage ../development/python-modules/spake2 { };

Expand Down

0 comments on commit cb37c93

Please sign in to comment.