nixpkgs/pkgs/development/python-modules/thinc/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

94 lines
1.4 KiB
Nix
Raw Normal View History

{ lib
, stdenv
, Accelerate
, blis
, buildPythonPackage
, catalogue
, confection
2021-10-05 15:04:30 +00:00
, CoreFoundation
, CoreGraphics
, CoreVideo
, cymem
, cython
, fetchPypi
, hypothesis
, mock
2017-05-15 10:08:30 +00:00
, murmurhash
, numpy
2017-05-15 10:08:30 +00:00
, plac
, preshed
2021-04-18 18:02:00 +00:00
, pydantic
, pytestCheckHook
, python
, pythonOlder
2019-05-11 13:31:08 +00:00
, srsly
, tqdm
2021-10-05 15:04:30 +00:00
, typing-extensions
2019-05-11 13:31:08 +00:00
, wasabi
2017-05-15 10:08:30 +00:00
}:
2018-03-12 22:45:13 +00:00
buildPythonPackage rec {
pname = "thinc";
version = "8.1.8";
format = "setuptools";
2021-10-05 15:04:30 +00:00
disabled = pythonOlder "3.7";
2017-05-15 10:08:30 +00:00
2018-03-12 22:45:13 +00:00
src = fetchPypi {
inherit pname version;
hash = "sha256-NcZXy+2wT8W8JHhl1mWSHOw9Ve81+/zj7hogSGtyBoM=";
2017-05-15 10:08:30 +00:00
};
buildInputs = [
cython
] ++ lib.optionals stdenv.isDarwin [
2020-12-12 10:25:57 +00:00
Accelerate
CoreFoundation
CoreGraphics
CoreVideo
2021-10-05 15:04:30 +00:00
];
2017-05-15 10:08:30 +00:00
propagatedBuildInputs = [
2020-12-12 10:25:57 +00:00
blis
catalogue
confection
2020-12-12 10:25:57 +00:00
cymem
murmurhash
numpy
plac
preshed
pydantic
2020-12-12 10:25:57 +00:00
srsly
tqdm
wasabi
] ++ lib.optionals (pythonOlder "3.8") [
typing-extensions
];
2018-03-12 22:45:13 +00:00
nativeCheckInputs = [
2018-12-15 08:28:44 +00:00
hypothesis
mock
2021-10-05 15:04:30 +00:00
pytestCheckHook
2017-05-15 10:08:30 +00:00
];
2022-02-08 02:42:20 +00:00
# Add native extensions.
preCheck = ''
export PYTHONPATH=$out/${python.sitePackages}:$PYTHONPATH
2022-02-08 02:42:20 +00:00
# avoid local paths, relative imports wont resolve correctly
mv thinc/tests tests
rm -r thinc
'';
pythonImportsCheck = [
"thinc"
];
meta = with lib; {
description = "Library for NLP machine learning";
homepage = "https://github.com/explosion/thinc";
2017-05-15 10:08:30 +00:00
license = licenses.mit;
maintainers = with maintainers; [ aborsu ];
2020-12-12 10:25:57 +00:00
};
2017-05-15 10:08:30 +00:00
}