mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-25 16:33:15 +00:00
[Backport release-24.11] python312Packages.py3langid: pyproject, relax numpy (#356956)
This commit is contained in:
commit
c5c8488cc5
@ -3,6 +3,7 @@
|
|||||||
buildPythonPackage,
|
buildPythonPackage,
|
||||||
fetchPypi,
|
fetchPypi,
|
||||||
pythonOlder,
|
pythonOlder,
|
||||||
|
setuptools,
|
||||||
numpy,
|
numpy,
|
||||||
pytestCheckHook,
|
pytestCheckHook,
|
||||||
}:
|
}:
|
||||||
@ -10,7 +11,7 @@
|
|||||||
buildPythonPackage rec {
|
buildPythonPackage rec {
|
||||||
pname = "py3langid";
|
pname = "py3langid";
|
||||||
version = "0.3.0";
|
version = "0.3.0";
|
||||||
format = "setuptools";
|
pyproject = true;
|
||||||
|
|
||||||
disabled = pythonOlder "3.6";
|
disabled = pythonOlder "3.6";
|
||||||
|
|
||||||
@ -19,6 +20,8 @@ buildPythonPackage rec {
|
|||||||
hash = "sha256-CodaAxpYqvnb2nu4KF/XXoAae9J2IW/6vgN5AdS0Sew=";
|
hash = "sha256-CodaAxpYqvnb2nu4KF/XXoAae9J2IW/6vgN5AdS0Sew=";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
nativeBuildInputs = [ setuptools ];
|
||||||
|
|
||||||
propagatedBuildInputs = [ numpy ];
|
propagatedBuildInputs = [ numpy ];
|
||||||
|
|
||||||
nativeCheckInputs = [ pytestCheckHook ];
|
nativeCheckInputs = [ pytestCheckHook ];
|
||||||
@ -26,6 +29,8 @@ buildPythonPackage rec {
|
|||||||
# nixify path to the courlan binary in the test suite
|
# nixify path to the courlan binary in the test suite
|
||||||
postPatch = ''
|
postPatch = ''
|
||||||
substituteInPlace tests/test_langid.py --replace "'langid'" "'$out/bin/langid'"
|
substituteInPlace tests/test_langid.py --replace "'langid'" "'$out/bin/langid'"
|
||||||
|
substituteInPlace pyproject.toml --replace-fail \
|
||||||
|
'numpy >= 2.0.0' numpy
|
||||||
'';
|
'';
|
||||||
|
|
||||||
pythonImportsCheck = [ "py3langid" ];
|
pythonImportsCheck = [ "py3langid" ];
|
||||||
|
Loading…
Reference in New Issue
Block a user