Merge pull request #91152 from danieldk/spacy-fixes
python3Packages.spacy: fix build
This commit is contained in:
commit
71ace42e12
@ -1,24 +0,0 @@
|
|||||||
{ stdenv
|
|
||||||
, buildPythonPackage
|
|
||||||
, fetchPypi
|
|
||||||
, importlib-metadata
|
|
||||||
}:
|
|
||||||
|
|
||||||
buildPythonPackage rec {
|
|
||||||
pname = "catalogue";
|
|
||||||
version = "1.0.0";
|
|
||||||
|
|
||||||
src = fetchPypi {
|
|
||||||
inherit pname version;
|
|
||||||
sha256 = "d74d1d856c6b36a37bf14aa6dbbc27d0582667b7ab979a6108e61a575e8723f5";
|
|
||||||
};
|
|
||||||
|
|
||||||
propagatedBuildInputs = [ importlib-metadata ];
|
|
||||||
|
|
||||||
meta = with stdenv.lib; {
|
|
||||||
description = "Tiny library for adding function or object registries";
|
|
||||||
homepage = "https://github.com/explosion/catalogue";
|
|
||||||
license = licenses.mit;
|
|
||||||
maintainers = with maintainers; [ danieldk ];
|
|
||||||
};
|
|
||||||
}
|
|
@ -1,6 +1,7 @@
|
|||||||
{ stdenv
|
{ stdenv
|
||||||
, buildPythonPackage
|
, buildPythonPackage
|
||||||
, fetchPypi
|
, fetchPypi
|
||||||
|
, pythonOlder
|
||||||
, importlib-metadata
|
, importlib-metadata
|
||||||
}:
|
}:
|
||||||
|
|
||||||
@ -8,6 +9,8 @@ buildPythonPackage rec {
|
|||||||
pname = "catalogue";
|
pname = "catalogue";
|
||||||
version = "2.0.0";
|
version = "2.0.0";
|
||||||
|
|
||||||
|
disabled = pythonOlder "3.6";
|
||||||
|
|
||||||
src = fetchPypi {
|
src = fetchPypi {
|
||||||
inherit pname version;
|
inherit pname version;
|
||||||
sha256 = "34f8416ec5e7ed08e55c10414416e67c3f4d66edf83bc67320c3290775293816";
|
sha256 = "34f8416ec5e7ed08e55c10414416e67c3f4d66edf83bc67320c3290775293816";
|
||||||
|
@ -54,9 +54,15 @@ buildPythonPackage rec {
|
|||||||
# '';
|
# '';
|
||||||
|
|
||||||
postPatch = ''
|
postPatch = ''
|
||||||
substituteInPlace setup.cfg --replace "thinc==7.4.1" "thinc>=7.4.1,<8"
|
substituteInPlace setup.cfg \
|
||||||
|
--replace "catalogue>=0.0.7,<1.1.0" "catalogue>=0.0.7,<3.0" \
|
||||||
|
--replace "plac>=0.9.6,<1.2.0" "plac>=0.9.6,<2.0" \
|
||||||
|
--replace "srsly>=1.0.2,<1.1.0" "srsly>=1.0.2,<3.0" \
|
||||||
|
--replace "thinc==7.4.1" "thinc>=7.4.1,<8"
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
pythonImportsCheck = [ "spacy" ];
|
||||||
|
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
description = "Industrial-strength Natural Language Processing (NLP) with Python and Cython";
|
description = "Industrial-strength Natural Language Processing (NLP) with Python and Cython";
|
||||||
homepage = "https://github.com/explosion/spaCy";
|
homepage = "https://github.com/explosion/spaCy";
|
||||||
|
@ -15,6 +15,8 @@ buildPythonPackage rec {
|
|||||||
pname = "srsly";
|
pname = "srsly";
|
||||||
version = "2.0.1";
|
version = "2.0.1";
|
||||||
|
|
||||||
|
disabled = pythonOlder "3.6";
|
||||||
|
|
||||||
src = fetchPypi {
|
src = fetchPypi {
|
||||||
inherit pname version;
|
inherit pname version;
|
||||||
sha256 = "fa3c7375be8fe75f23c27feafbfb5f738d55ffdbf02964c6896fb7684f519a52";
|
sha256 = "fa3c7375be8fe75f23c27feafbfb5f738d55ffdbf02964c6896fb7684f519a52";
|
||||||
@ -22,8 +24,6 @@ buildPythonPackage rec {
|
|||||||
|
|
||||||
nativeBuildInputs = [ cython ];
|
nativeBuildInputs = [ cython ];
|
||||||
|
|
||||||
propagatedBuildInputs = lib.optional (pythonOlder "3.4") pathlib;
|
|
||||||
|
|
||||||
checkInputs = [
|
checkInputs = [
|
||||||
mock
|
mock
|
||||||
numpy
|
numpy
|
||||||
@ -35,6 +35,8 @@ buildPythonPackage rec {
|
|||||||
# Possibly because of sandbox restrictions.
|
# Possibly because of sandbox restrictions.
|
||||||
doCheck = false;
|
doCheck = false;
|
||||||
|
|
||||||
|
pythonImportsCheck = [ "srsly" ];
|
||||||
|
|
||||||
meta = with stdenv.lib; {
|
meta = with stdenv.lib; {
|
||||||
description = "Modern high-performance serialization utilities for Python";
|
description = "Modern high-performance serialization utilities for Python";
|
||||||
homepage = "https://github.com/explosion/srsly";
|
homepage = "https://github.com/explosion/srsly";
|
||||||
|
@ -58,10 +58,19 @@ buildPythonPackage rec {
|
|||||||
# Cannot find cython modules.
|
# Cannot find cython modules.
|
||||||
doCheck = false;
|
doCheck = false;
|
||||||
|
|
||||||
|
postPatch = ''
|
||||||
|
substituteInPlace setup.py \
|
||||||
|
--replace "catalogue>=0.0.7,<1.1.0" "catalogue>=0.0.7,<3.0" \
|
||||||
|
--replace "plac>=0.9.6,<1.2.0" "plac>=0.9.6,<2.0" \
|
||||||
|
--replace "srsly>=0.0.6,<1.1.0" "srsly>=0.0.6,<3.0"
|
||||||
|
'';
|
||||||
|
|
||||||
checkPhase = ''
|
checkPhase = ''
|
||||||
pytest thinc/tests
|
pytest thinc/tests
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
pythonImportsCheck = [ "thinc" ];
|
||||||
|
|
||||||
meta = with stdenv.lib; {
|
meta = with stdenv.lib; {
|
||||||
description = "Practical Machine Learning for NLP in Python";
|
description = "Practical Machine Learning for NLP in Python";
|
||||||
homepage = "https://github.com/explosion/thinc";
|
homepage = "https://github.com/explosion/thinc";
|
||||||
|
@ -569,10 +569,7 @@ in {
|
|||||||
|
|
||||||
cadquery = callPackage ../development/python-modules/cadquery { };
|
cadquery = callPackage ../development/python-modules/cadquery { };
|
||||||
|
|
||||||
catalogue = if isPy3k then
|
catalogue = callPackage ../development/python-modules/catalogue { };
|
||||||
callPackage ../development/python-modules/catalogue { }
|
|
||||||
else
|
|
||||||
callPackage ../development/python-modules/catalogue/1.nix { };
|
|
||||||
|
|
||||||
cbeams = callPackage ../misc/cbeams { };
|
cbeams = callPackage ../misc/cbeams { };
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user