Merge pull request #91152 from danieldk/spacy-fixes

python3Packages.spacy: fix build
This commit is contained in:
Frederik Rietdijk 2020-06-21 09:34:10 +02:00 committed by GitHub
commit 71ace42e12
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 24 additions and 31 deletions

View file

@ -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 ];
};
}

View file

@ -1,6 +1,7 @@
{ stdenv
, buildPythonPackage
, fetchPypi
, pythonOlder
, importlib-metadata
}:
@ -8,6 +9,8 @@ buildPythonPackage rec {
pname = "catalogue";
version = "2.0.0";
disabled = pythonOlder "3.6";
src = fetchPypi {
inherit pname version;
sha256 = "34f8416ec5e7ed08e55c10414416e67c3f4d66edf83bc67320c3290775293816";

View file

@ -54,9 +54,15 @@ buildPythonPackage rec {
# '';
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; {
description = "Industrial-strength Natural Language Processing (NLP) with Python and Cython";
homepage = "https://github.com/explosion/spaCy";

View file

@ -15,6 +15,8 @@ buildPythonPackage rec {
pname = "srsly";
version = "2.0.1";
disabled = pythonOlder "3.6";
src = fetchPypi {
inherit pname version;
sha256 = "fa3c7375be8fe75f23c27feafbfb5f738d55ffdbf02964c6896fb7684f519a52";
@ -22,8 +24,6 @@ buildPythonPackage rec {
nativeBuildInputs = [ cython ];
propagatedBuildInputs = lib.optional (pythonOlder "3.4") pathlib;
checkInputs = [
mock
numpy
@ -35,6 +35,8 @@ buildPythonPackage rec {
# Possibly because of sandbox restrictions.
doCheck = false;
pythonImportsCheck = [ "srsly" ];
meta = with stdenv.lib; {
description = "Modern high-performance serialization utilities for Python";
homepage = "https://github.com/explosion/srsly";

View file

@ -58,10 +58,19 @@ buildPythonPackage rec {
# Cannot find cython modules.
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 = ''
pytest thinc/tests
'';
pythonImportsCheck = [ "thinc" ];
meta = with stdenv.lib; {
description = "Practical Machine Learning for NLP in Python";
homepage = "https://github.com/explosion/thinc";

View file

@ -569,10 +569,7 @@ in {
cadquery = callPackage ../development/python-modules/cadquery { };
catalogue = if isPy3k then
callPackage ../development/python-modules/catalogue { }
else
callPackage ../development/python-modules/catalogue/1.nix { };
catalogue = callPackage ../development/python-modules/catalogue { };
cbeams = callPackage ../misc/cbeams { };