diff --git a/pkgs/development/python-modules/textacy/default.nix b/pkgs/development/python-modules/textacy/default.nix index 086218b84396..454cff5e4a87 100644 --- a/pkgs/development/python-modules/textacy/default.nix +++ b/pkgs/development/python-modules/textacy/default.nix @@ -1,69 +1,59 @@ -{ stdenv -, buildPythonPackage -, isPy27 -, fetchPypi +{ lib, buildPythonPackage, fetchPypi, isPy27 , cachetools -, cld2-cffi , cytoolz -, ftfy -, ijson +, jellyfish , matplotlib , networkx , numpy , pyemd , pyphen -, python-Levenshtein +, pytest , requests , scikitlearn , scipy , spacy -, tqdm -, unidecode +, srsly }: buildPythonPackage rec { pname = "textacy"; - version = "0.6.3"; + version = "0.9.1"; + disabled = isPy27; src = fetchPypi { inherit pname version; - sha256 = "50402545ac92b1a931c2365e341cb35c4ebe5575525f1dcc5265901ff3895a5f"; + sha256 = "1jhj02g6kh5vc0z4az7n547siav3gj5571bqpzdryskj6bsma2z1"; }; propagatedBuildInputs = [ cachetools - cld2-cffi cytoolz - ftfy - ijson + jellyfish matplotlib networkx numpy pyemd pyphen - python-Levenshtein requests scikitlearn scipy spacy - tqdm - unidecode + srsly ]; - postPatch = '' - substituteInPlace setup.py \ - --replace "'ftfy>=4.2.0,<5.0.0'," "'ftfy>=5.0.0'," + checkInputs = [ pytest ]; + # almost all tests have to deal with downloading a dataset, only test pure tests + checkPhase = '' + pytest tests/test_text_utils.py \ + tests/test_utils.py \ + tests/preprocessing \ + tests/datasets/test_base_dataset.py ''; - doCheck = false; # tests want to download data files - - meta = with stdenv.lib; { + meta = with lib; { description = "Higher-level text processing, built on spaCy"; homepage = "http://textacy.readthedocs.io/"; license = licenses.asl20; maintainers = with maintainers; [ rvl ]; - # ftfy and jellyfish no longer support python2 - # latest scikitlearn not supported for this: https://github.com/chartbeat-labs/textacy/issues/260 - broken = true; }; }