Merge master into staging-next

This commit is contained in:
Frederik Rietdijk
2020-06-22 08:46:16 +02:00
119 changed files with 2699 additions and 654 deletions
@@ -27,10 +27,13 @@ buildPythonPackage rec {
async-timeout
];
doCheck = false; # requires siosocks, not packaged yet
checkPhase = ''
pytest
'';
pythonImportsCheck = [ "aioftp" ];
meta = with lib; {
description = "Ftp client/server for asyncio";
homepage = "https://github.com/aio-libs/aioftp";
@@ -62,6 +62,7 @@ buildPythonPackage rec {
"test_read_incomplete_chunk"
"test_request_tracing_exception"
] ++ lib.optionals stdenv.isDarwin [
"test_addresses" # https://github.com/aio-libs/aiohttp/issues/3572
"test_close"
];
@@ -35,7 +35,7 @@ buildPythonPackage rec {
# Skip a test which makes requests to httpbin.org
checkPhase = ''
pytest -k "not test_address_as_instance_of_url_combined_with_pass_through"
pytest -k "not (test_address_as_instance_of_url_combined_with_pass_through or test_pass_through_with_origin_params)"
'';
meta = {
@@ -18,13 +18,13 @@
buildPythonPackage rec {
pname = "ansible";
version = "2.9.9";
version = "2.9.10";
src = fetchFromGitHub {
owner = "ansible";
repo = "ansible";
rev = "v${version}";
sha256 = "06a9iq7w2cm0hsxaw5irsja8w44gffiw09ly27jxklpa8gv57rml";
sha256 = "1979522k57gafvq9vx3lbc3zah7jq3kiy98ji9x5bmxyddmgr9ch";
};
prePatch = ''
@@ -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
, 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";
@@ -1,18 +1,18 @@
{ lib, buildPythonPackage, fetchPypi
, isPy27
, pylev, pastel, typing, enum34 }:
, pylev, pastel, typing, enum34, crashtest }:
buildPythonPackage rec {
pname = "clikit";
version = "0.6.1";
version = "0.6.2";
src = fetchPypi {
inherit pname version;
sha256 = "0603e3c19fa106f5df5f224826c92e57221f48ec969e42744173e0458d359354";
sha256 = "0ngdkmb73gkp5y00q7r9k1cdlfn0wyzws2wrqlshc4hlkbdyabj4";
};
propagatedBuildInputs = [
pylev pastel
crashtest pylev pastel
] ++ lib.optionals isPy27 [ typing enum34 ];
# The Pypi tarball doesn't include tests, and the GitHub source isn't
@@ -0,0 +1,25 @@
{ lib, buildPythonPackage, fetchFromGitHub, fetchPypi, isPy27, pytest }:
buildPythonPackage rec {
pname = "crashtest";
version = "0.3.0";
disabled = isPy27;
src = fetchPypi {
inherit pname version;
sha256 = "056zzbznl3xfnbblfci8lvcam3h7k7va68vi6asrm4q0ck4nrh79";
};
# has tests, but only on GitHub, however the pyproject build fails for me
pythonImportsCheck = [
"crashtest.frame"
"crashtest.inspector"
];
meta = with lib; {
homepage = "https://github.com/sdispater/crashtest";
description = "Manage Python errors with ease";
license = licenses.mit;
maintainers = with maintainers; [ ];
};
}
@@ -18,11 +18,11 @@ in
buildPythonPackage rec {
pname = "entrance";
version = "1.1.12";
version = "1.1.13";
src = fetchPypi {
inherit pname version;
sha256 = "ef7cdf76226344f7cb92c8f81b6c03bbe944a095434f86275f178809c84108ca";
sha256 = "1vmyfhlpcz9fip89z7bl9va3bybz4p3clifn6x3329v1ms9bm1gc";
};
# The versions of `sanic` and `websockets` in nixpkgs only support 3.6 or later
@@ -0,0 +1,41 @@
{ lib
, buildPythonPackage
, fetchPypi
, isPy27
, pytestCheckHook
, setuptools_scm
}:
buildPythonPackage rec {
pname = "extension-helpers";
version = "0.1";
disabled = isPy27;
src = fetchPypi {
inherit pname version;
sha256 = "10iqjzmya2h4sk765dlm1pbqypwlqyh8rw59a5m9i63d3klnz2mc";
};
nativeBuildInputs = [
setuptools_scm
];
propagatedBuildInputs = [
pytestCheckHook
];
# avoid importing local module
preCheck = ''
cd extension_helpers
'';
# assumes setup.py is in pwd
disabledTests = [ "compiler_module" ];
meta = with lib; {
description = "Helpers to assist with building packages with compiled C/Cython extensions";
homepage = "https://github.com/astropy/extension-helpers";
license = licenses.bsd3;
maintainers = [ ];
};
}
@@ -1,8 +1,9 @@
{ lib, buildPythonPackage, fetchPypi, flask, pytest, pytestcov, pytest-xprocess, pytestcache }:
{ lib, buildPythonPackage, fetchPypi, isPy27, flask, pytest, pytestcov, pytest-xprocess, pytestcache }:
buildPythonPackage rec {
pname = "Flask-Caching";
version = "1.9.0";
disabled = isPy27; # invalid python2 syntax
src = fetchPypi {
inherit pname version;
@@ -5,6 +5,8 @@
, dateutil
, pytz
, six
, msgpack
, fetchpatch
}:
buildPythonPackage rec {
@@ -16,9 +18,16 @@ buildPythonPackage rec {
sha256 = "9bcaafd57ac152b9824ab12ed19f204206ef5df8af68404770554c5b55b475f6";
};
patches = [
(fetchpatch {
url = "https://github.com/influxdata/influxdb-python/commit/cc41e290f690c4eb67f75c98fa9f027bdb6eb16b.patch";
sha256 = "1fb9qrq1kp24pixjwvzhdy67z3h0wnj92aj0jw0a25fd0rdxdvg4";
})
];
# ImportError: No module named tests
doCheck = false;
propagatedBuildInputs = [ requests dateutil pytz six ];
propagatedBuildInputs = [ requests dateutil pytz six msgpack ];
meta = with stdenv.lib; {
description = "Python client for InfluxDB";
@@ -1,9 +1,9 @@
{ lib, buildPythonPackage, fetchFromGitHub, xdg_utils
, requests, filetype, pyparsing, configparser, arxiv2bib
, pyyaml, chardet, beautifulsoup4, colorama, bibtexparser
, pylibgen, click, python-slugify, habanero, isbnlib
, click, python-slugify, habanero, isbnlib, typing-extensions
, prompt_toolkit, pygments, stevedore, tqdm, lxml
, python-doi, isPy3k, pythonOlder
, python-doi, isPy3k, pythonOlder, pytestcov
#, optional, dependencies
, whoosh, pytest
, stdenv
@@ -11,7 +11,7 @@
buildPythonPackage rec {
pname = "papis";
version = "0.9";
version = "0.10";
disabled = !isPy3k;
# Missing tests on Pypi
@@ -19,14 +19,14 @@ buildPythonPackage rec {
owner = "papis";
repo = pname;
rev = "v${version}";
sha256 = "15i79q6nr7gcpcafdz5797axmp6r3081sys07k1k2vi5b2g3qc4k";
sha256 = "0fmrvxs6ixfwjlp96b69db7fpvyqfy2n3c23kdz8yr0vhnp82l93";
};
propagatedBuildInputs = [
requests filetype pyparsing configparser arxiv2bib
pyyaml chardet beautifulsoup4 colorama bibtexparser
pylibgen click python-slugify habanero isbnlib
prompt_toolkit pygments
click python-slugify habanero isbnlib
prompt_toolkit pygments typing-extensions
stevedore tqdm lxml
python-doi
# optional dependencies
@@ -36,6 +36,7 @@ buildPythonPackage rec {
postPatch = ''
substituteInPlace setup.py \
--replace "lxml<=4.3.5" "lxml~=4.3" \
--replace "isbnlib>=3.9.1,<3.10" "isbnlib~=3.9" \
--replace "python-slugify>=1.2.6,<4" "python-slugify"
'';
@@ -43,7 +44,7 @@ buildPythonPackage rec {
doCheck = !stdenv.isDarwin && pythonOlder "3.8";
checkInputs = ([
pytest
pytest pytestcov
]) ++ [
xdg_utils
];
@@ -54,7 +55,7 @@ buildPythonPackage rec {
checkPhase = ''
HOME=$(mktemp -d) pytest papis tests --ignore tests/downloaders \
-k "not test_get_data and not test_doi_to_data and not test_general and not get_document_url \
and not test_validate_arxivid and not test_downloader_getter"
and not test_validate_arxivid and not test_downloader_getter and not match"
'';
meta = {
@@ -10,14 +10,14 @@
buildPythonPackage rec {
pname = "peewee";
version = "3.11.2";
version = "3.13.3";
# pypi release does not provide tests
src = fetchFromGitHub {
owner = "coleifer";
repo = pname;
rev = version;
sha256 = "097cafqgk46bf0innwm7xnmsfs6z37hv3alyvrfz6d0iy4scshm5";
sha256 = "1r67hxb9m6v0xbnbqfnsw6dahmdr94pf81b4x51jfw6x9sa4izi4";
};
@@ -38,6 +38,8 @@ buildPythonPackage rec {
] ++ (lib.optional withPostgres psycopg2)
++ (lib.optional withMysql mysql-connector);
doCheck = withPostgres;
meta = with stdenv.lib;{
description = "a small, expressive orm";
homepage = "http://peewee-orm.com";
@@ -1,74 +1,74 @@
{ lib, buildPythonPackage, fetchPypi, callPackage
, isPy27
, pythonOlder
, cleo
, requests
, cachy
, requests-toolbelt
, pyrsistent
, pyparsing
{ lib, buildPythonPackage, fetchFromGitHub, isPy27, pythonOlder
, cachecontrol
, pkginfo
, html5lib
, shellingham
, subprocess32
, tomlkit
, typing
, pathlib2
, virtualenv
, functools32
, cachy
, cleo
, clikit
, keyring
, pexpect
, html5lib
, httpretty
, importlib-metadata
, pytest
, jsonschema
, intreehooks
, jsonschema
, keyring
, lockfile
, pexpect
, pkginfo
, pygments
, pyparsing
, pyrsistent
, pytestCheckHook
, pytestcov
, pytest-mock
, requests
, requests-toolbelt
, shellingham
, tomlkit
}:
let
glob2 = callPackage ./glob2.nix { };
in buildPythonPackage rec {
buildPythonPackage rec {
pname = "poetry";
version = "1.0.5";
version = "1.0.9";
format = "pyproject";
disabled = isPy27;
src = fetchPypi {
inherit pname version;
sha256 = "02h387k0xssvv78yy82pcpknpq4w5ym2in1zl8cg9r5wljl5w6cf";
src = fetchFromGitHub {
owner = "python-poetry";
repo = pname;
rev = version;
sha256 = "0gi1li55rim60hf1gdpgpx84zlkaj0wv12wbv7dib9malhfj3pnz";
};
postPatch = ''
substituteInPlace pyproject.toml \
--replace "pyrsistent = \"^0.14.2\"" "pyrsistent = \"^0.15.0\"" \
--replace "requests-toolbelt = \"^0.8.0\"" "requests-toolbelt = \"^0.9.0\"" \
--replace "pyrsistent = \"^0.14.2\"" "pyrsistent = \"^0.16.0\"" \
--replace "requests-toolbelt = \"^0.8.0\"" "requests-toolbelt = \"^0.9.1\"" \
--replace 'importlib-metadata = {version = "~1.1.3", python = "<3.8"}' \
'importlib-metadata = {version = ">=1.3,<2", python = "<3.8"}'
'importlib-metadata = {version = ">=1.3,<2", python = "<3.8"}' \
--replace "tomlkit = \"^0.5.11\"" "tomlkit = \"^0.6.0\"" \
--replace "cleo = \"^0.7.6\"" "cleo = \"^0.8.0\"" \
--replace "version = \"^20.0.1\", python = \"^3.5\"" "version = \"^21.0.0\", python = \"^3.5\"" \
--replace "clikit = \"^0.4.2\"" "clikit = \"^0.6.2\""
'';
nativeBuildInputs = [ intreehooks ];
propagatedBuildInputs = [
cachecontrol
cachy
cleo
clikit
requests
cachy
requests-toolbelt
jsonschema
pyrsistent
pyparsing
cachecontrol
pkginfo
html5lib
shellingham
tomlkit
pexpect
jsonschema
keyring
lockfile
] ++ lib.optionals isPy27 [ typing pathlib2 glob2 virtualenv functools32 subprocess32 ]
++ lib.optionals (pythonOlder "3.8") [ importlib-metadata ];
pexpect
pkginfo
pyparsing
pyrsistent
requests
requests-toolbelt
shellingham
tomlkit
] ++ lib.optionals (pythonOlder "3.8") [ importlib-metadata ];
postInstall = ''
mkdir -p "$out/share/bash-completion/completions"
@@ -79,12 +79,18 @@ in buildPythonPackage rec {
"$out/bin/poetry" completions fish > "$out/share/fish/vendor_completions.d/poetry.fish"
'';
# No tests in Pypi tarball
doCheck = false;
checkInputs = [ pytest ];
checkPhase = ''
pytest tests
'';
checkInputs = [ pytestCheckHook httpretty pytest-mock pygments pytestcov ];
preCheck = "export HOME=$TMPDIR";
disabledTests = [
# touches network
"git"
"solver"
"load"
"vcs"
"prereleases_if_they_are_compatible"
# requires git history to work correctly
"default_with_excluded_data"
];
meta = with lib; {
homepage = "https://python-poetry.org/";
@@ -1,11 +0,0 @@
{ buildPythonPackage, fetchPypi }:
buildPythonPackage rec {
pname = "glob2";
version = "0.6";
src = fetchPypi {
inherit pname version;
sha256 = "1miyz0pjyji4gqrzl04xsxcylk3h2v9fvi7hsg221y11zy3adc7m";
};
}
@@ -16,7 +16,7 @@ buildPythonPackage rec {
# arch doesn't report frequency is the same way
# tests segfaults on darwin https://github.com/giampaolo/psutil/issues/1715
doCheck = stdenv.isDarwin || stdenv.isx86_64;
doCheck = !stdenv.isDarwin && stdenv.isx86_64;
checkInputs = [ pytest ]
++ lib.optionals isPy27 [ mock ipaddress ];
# out must be referenced as test import paths are relative
@@ -1,7 +1,9 @@
{ lib
, buildPythonPackage
, fetchPypi
, oauthlib
, requests
, requests_oauthlib
}:
buildPythonPackage rec {
@@ -13,7 +15,7 @@ buildPythonPackage rec {
sha256 = "9949338833a27b6c3251b52bf70b73aa99c43c56153541338cb63001afafdd1e";
};
propagatedBuildInputs = [ requests ];
propagatedBuildInputs = [ oauthlib requests requests_oauthlib ];
# Upstream provides no unit tests.
doCheck = false;
@@ -38,9 +38,10 @@ buildPythonPackage rec {
postPatch = ''
sed -i \
-e 's!click>=6.0,<7.0!click!' \
-e 's!keyring>=8.0,<9.0!keyring!' \
-e 's!keyrings.alt>=1.0,<2.0!keyrings.alt!' \
-e 's!click>=.*!click!' \
-e 's!keyring>=.*!keyring!' \
-e 's!keyrings.alt>=.*!keyrings.alt!' \
-e 's!tzlocal==.*!tzlocal!' \
requirements.txt
'';
@@ -1,33 +0,0 @@
{ lib, buildPythonPackage, fetchFromGitHub
, pythonOlder
, requests
, pytest
, pre-commit
}:
buildPythonPackage rec {
pname = "pylibgen";
version = "2.0.2";
disabled = pythonOlder "3.6";
src = fetchFromGitHub {
owner = "joshuarli";
repo = pname;
rev = "v${version}";
sha256 = "1a9vhkgnkiwkicr2s287254mrkpnw9jq5r63q820dp3h74ba4kl1";
};
propagatedBuildInputs = [ requests ];
checkInputs = [ pytest pre-commit ];
# literally every tests does a network call
doCheck = false;
meta = with lib; {
description = "Python interface to Library Genesis";
homepage = "https://pypi.org/project/pylibgen/";
license = licenses.mit;
maintainers = [ maintainers.nico202 ];
};
}
@@ -9,13 +9,13 @@
buildPythonPackage rec {
pname = "PyMetno";
version = "0.5.0";
version = "0.5.1";
src = fetchFromGitHub {
repo = pname;
owner = "Danielhiversen";
rev = version;
sha256 = "00v2r3nn48svni9rbmbf0a4ylgfcf93gk2wg7qnm1fv1qrkgscvg";
sha256 = "1ihq1lzgzcxbg916izakx9jp0kp1vdrcdwcwwwsws838wc08ax6m";
};
propagatedBuildInputs = [ aiohttp async-timeout pytz xmltodict ];
@@ -0,0 +1,37 @@
{ lib
, buildPythonPackage
, fetchPypi
, pytest
, pytestcov
, pytestCheckHook
, numpy
, astropy
}:
buildPythonPackage rec {
pname = "pytest-astropy-header";
version = "0.1.2";
src = fetchPypi {
inherit pname version;
sha256 = "1y87agr324p6x5gvhziymxjlw54pyn4gqnd49papbl941djpkp5g";
};
propagatedBuildInputs = [
pytest
];
checkInputs = [
pytestCheckHook
pytestcov
numpy
astropy
];
meta = with lib; {
description = "Plugin to add diagnostic information to the header of the test output";
homepage = "https://astropy.org";
license = licenses.bsd3;
maintainers = [ maintainers.costrouc ];
};
}
@@ -1,11 +1,15 @@
{ lib
, buildPythonPackage
, fetchPypi
, hypothesis
, pytest
, pytest-astropy-header
, pytest-doctestplus
, pytest-filter-subpackage
, pytest-remotedata
, pytest-openfiles
, pytest-arraydiff
, setuptools_scm
}:
buildPythonPackage rec {
@@ -17,16 +21,23 @@ buildPythonPackage rec {
sha256 = "619800eb2cbf64548fbea25268efe7c6f6ae206cb4825f34abd36f27bcf946a2";
};
nativeBuildInputs = [
setuptools_scm
];
propagatedBuildInputs = [
hypothesis
pytest
pytest-astropy-header
pytest-doctestplus
pytest-filter-subpackage
pytest-remotedata
pytest-openfiles
pytest-arraydiff
];
# pytest-astropy is a meta package and has no tests
doCheck = false;
checkPhase = ":";
meta = with lib; {
description = "Meta-package containing dependencies for testing";
@@ -1,6 +1,7 @@
{ lib
, buildPythonPackage
, fetchPypi
, isPy27
, six
, pytest
, numpy
@@ -9,6 +10,7 @@
buildPythonPackage rec {
pname = "pytest-doctestplus";
version = "0.7.0";
disabled = isPy27; # abandoned upstream
src = fetchPypi {
inherit pname version;
@@ -0,0 +1,39 @@
{ lib
, buildPythonPackage
, fetchPypi
, pytest
, pytestcov
, pytest-doctestplus
, pytestCheckHook
, setuptools_scm
}:
buildPythonPackage rec {
pname = "pytest-filter-subpackage";
version = "0.1.1";
src = fetchPypi {
inherit pname version;
sha256 = "1s4s2kd31yc65rfvl4xhy8xx806xhy59kc7668h6b6wq88xgrn5p";
};
nativeBuildInputs = [
setuptools_scm
];
propagatedBuildInputs = [
pytest
pytest-doctestplus
pytestcov
pytestCheckHook
];
# missing some files
disabledTests = [ "with_rst" ];
meta = with lib; {
description = "Meta-package containing dependencies for testing";
homepage = "https://astropy.org";
license = licenses.bsd3;
};
}
@@ -6,30 +6,26 @@
, astropy
, astropy-healpix
, astropy-helpers
, extension-helpers
, scipy
, pytest
, pytest-astropy
, setuptools_scm
, cython
}:
buildPythonPackage rec {
pname = "reproject";
version = "0.6";
version = "0.7.1";
src = fetchPypi {
inherit pname version;
sha256 = "484fde86d70d972d703038f138d7c2966ddf51171a6e79bd84e82ea270e27af3";
sha256 = "1jsc3ad518vyys5987fr1achq8qvnz8rm80zp5an9qxlwr4zmh4m";
};
propagatedBuildInputs = [ numpy astropy astropy-healpix astropy-helpers scipy ];
nativeBuildInputs = [ astropy-helpers cython ];
# Fix tests
patches = [ (fetchpatch {
url = "https://github.com/astropy/reproject/pull/218/commits/4661e075137424813ed77f1ebcbc251fee1b8467.patch";
sha256 = "13g3h824pqn2lgypzg1b87vkd44y7m302lhw3kh4rfww1dkzhm9v";
}) ];
nativeBuildInputs = [ astropy-helpers cython extension-helpers setuptools_scm ];
# Disable automatic update of the astropy-helper module
postPatch = ''
@@ -1,4 +1,4 @@
{ lib, fetchPypi, buildPythonPackage, requests, six }:
{ lib, fetchPypi, buildPythonPackage, pytestCheckHook, requests, six }:
buildPythonPackage rec {
pname = "requests-file";
@@ -11,6 +11,8 @@ buildPythonPackage rec {
propagatedBuildInputs = [ requests six ];
checkInputs = [ pytestCheckHook ];
meta = {
homepage = "https://github.com/dashea/requests-file";
description = "Transport adapter for fetching file:// URLs with the requests python library";
@@ -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";
@@ -1,6 +1,7 @@
{ lib
, fetchFromGitHub
, buildPythonPackage
, aplpy
, astropy
, radio_beam
, pytest
@@ -24,7 +25,7 @@ buildPythonPackage rec {
nativeBuildInputs = [ astropy-helpers ];
checkInputs = [ pytest pytest-astropy ];
checkInputs = [ aplpy pytest pytest-astropy ];
# Disable automatic update of the astropy-helper module
postPatch = ''
@@ -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";
@@ -2,6 +2,7 @@
, buildPythonPackage
, fetchPypi
, pytest
, pytest-asyncio
, python-rapidjson
, pretend
, freezegun
@@ -20,7 +21,7 @@ buildPythonPackage rec {
sha256 = "7a48375db6274ed1d0ae6123c486472aa1d0890b08d314d2b016f3aa7f35990b";
};
checkInputs = [ pytest pretend freezegun simplejson twisted ]
checkInputs = [ pytest pytest-asyncio pretend freezegun simplejson twisted ]
++ lib.optionals (pythonAtLeast "3.6") [ python-rapidjson ];
propagatedBuildInputs = [ six ];
@@ -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";
@@ -55,6 +55,9 @@ buildPythonPackage rec {
export TEST_DIR=$(mktemp -d)
cp -r tests $TEST_DIR
pushd $TEST_DIR
'' + lib.optionalString stdenv.isDarwin ''
# Some tests fail on Darwin
rm tests/test_[stu]*.py
'';
postCheck = ''
popd
@@ -5,6 +5,7 @@
, flake8-import-order
, pyflakes
, mock
, setuptools
}:
buildPythonPackage rec {
@@ -23,12 +24,19 @@ buildPythonPackage rec {
propagatedBuildInputs = [
pyflakes
flake8-import-order
setuptools
];
checkInputs = [
mock
];
checkPhase = ''
runHook preInstallCheck
PYTHONPATH= $out/bin/zimports --help >/dev/null
runHook postInstallCheck
'';
meta = with lib; {
description = "Python import rewriter";
homepage = "https://github.com/sqlalchemyorg/zimports";