Merge branch 'staging-next' into staging

This commit is contained in:
Jan Tojnar
2020-08-23 02:18:27 +02:00
516 changed files with 15983 additions and 9551 deletions

View File

@@ -0,0 +1,45 @@
{ buildPythonPackage
, fetchPypi
, isPy27
, aiohttp
, pytest
, pytest-aiohttp
, pygments
, lib
}:
buildPythonPackage rec {
pname = "aiojobs";
version = "0.2.2";
format = "flit";
disabled = isPy27;
src = fetchPypi {
inherit pname version;
sha256 = "01a0msjh4w58fd7jplmblh0hwgpzwjs5xkgqz3d0p5yv3cykwjwf";
};
nativeBuildInputs = [
pygments
];
propagatedBuildInputs = [
aiohttp
];
checkInputs = [
pytest
pytest-aiohttp
];
checkPhase = ''
pytest tests
'';
meta = with lib; {
homepage = "https://github.com/aio-libs/aiojobs";
description = "Jobs scheduler for managing background task (asyncio)";
license = licenses.asl20;
maintainers = with maintainers; [ cmcdragonkai ];
};
}

View File

@@ -1,20 +1,30 @@
{ stdenv, buildPythonPackage, fetchPypi, isPy3k, pycodestyle, isort }:
{ stdenv, buildPythonPackage, isPy3k, fetchPypi, pycodestyle, isort }:
buildPythonPackage rec {
pname = "avro";
version = "1.10.0";
disabled = isPy3k;
src = fetchPypi {
inherit pname version;
sha256 = "bbf9f89fd20b4cf3156f10ec9fbce83579ece3e0403546c305957f9dac0d2f03";
};
patchPhase = ''
# this test requires network access
sed -i 's/test_server_with_path/noop/' avro/test/test_ipc.py
'' + (stdenv.lib.optionalString isPy3k ''
# these files require twisted, which is not python3 compatible
rm avro/txipc.py
rm avro/test/txsample*
'');
nativeBuildInputs = [ pycodestyle ];
propagatedBuildInputs = [ isort ];
meta = with stdenv.lib; {
description = "A serialization and RPC framework";
homepage = "https://pypi.python.org/pypi/avro/";
license = licenses.asl20;
maintainers = [ maintainers.zimbatm ];
};
}

View File

@@ -2,23 +2,28 @@
, buildPythonPackage
, fetchPypi
, azure-common
, azure-core
, azure-storage-common
, msrest
, isPy3k
, futures
}:
buildPythonPackage rec {
pname = "azure-storage-blob";
version = "2.1.0";
version = "12.4.0";
src = fetchPypi {
inherit pname version;
sha256 = "b90323aad60f207f9f90a0c4cf94c10acc313c20b39403398dfba51f25f7b454";
extension = "zip";
sha256 = "1s03daq5mxh9acbv8qpa55c2wmjvdf8jq071cwv65mrly8prp84n";
};
propagatedBuildInputs = [
azure-common
azure-core
azure-storage-common
msrest
] ++ lib.optional (!isPy3k) futures;
# has no tests

View File

@@ -1,30 +1,24 @@
{ stdenv, fetchPypi, fetchpatch
, buildPythonApplication, python, pythonOlder
, mock, nose, pathpy, pyhamcrest, pytest_4
, glibcLocales, parse, parse-type, six
, traceback2
{ stdenv, fetchFromGitHub
, buildPythonApplication, python
, mock, pathpy, pyhamcrest, pytest, pytest-html
, glibcLocales
, colorama, cucumber-tag-expressions, parse, parse-type, six
}:
buildPythonApplication rec {
pname = "behave";
version = "1.2.6";
version = "1.2.7.dev1";
src = fetchPypi {
inherit pname version;
sha256 = "11hsz365qglvpp1m1w16239c3kiw15lw7adha49lqaakm8kj6rmr";
src = fetchFromGitHub {
owner = "behave";
repo = pname;
rev = "v${version}";
sha256 = "1ssgixmqlg8sxsyalr83a1970njc2wg3zl8idsmxnsljwacv7qwv";
};
patches = [
# Fix tests on Python 2.7
(fetchpatch {
url = "https://github.com/behave/behave/commit/0a9430a94881cd18437deb03d2ae23afea0f009c.patch";
sha256 = "1nrh9ii6ik6gw2kjh8a6jk4mg5yqw3jfjfllbyxardclsab62ydy";
})
];
checkInputs = [ mock nose pathpy pyhamcrest pytest_4 ];
checkInputs = [ mock pathpy pyhamcrest pytest pytest-html ];
buildInputs = [ glibcLocales ];
propagatedBuildInputs = [ parse parse-type six ] ++ stdenv.lib.optional (pythonOlder "3.0") traceback2;
propagatedBuildInputs = [ colorama cucumber-tag-expressions parse parse-type six ];
postPatch = ''
patchShebangs bin
@@ -36,7 +30,7 @@ buildPythonApplication rec {
export LANG="en_US.UTF-8"
export LC_ALL="en_US.UTF-8"
pytest test tests
pytest tests
${python.interpreter} bin/behave -f progress3 --stop --tags='~@xfail' features/
${python.interpreter} bin/behave -f progress3 --stop --tags='~@xfail' tools/test-features/
@@ -47,6 +41,6 @@ buildPythonApplication rec {
homepage = "https://github.com/behave/behave";
description = "behaviour-driven development, Python style";
license = licenses.bsd2;
maintainers = with maintainers; [ alunduil ];
maintainers = with maintainers; [ alunduil maxxk ];
};
}

View File

@@ -12,12 +12,13 @@
, cramfsprogs
, cramfsswap
, lzma
, matplotlib
, nose
, pycrypto
, pyqtgraph ? null }:
let
visualizationSupport = (pyqtgraph != null);
visualizationSupport = (pyqtgraph != null) && (matplotlib != null);
version = "2.2.0";
in
buildPythonPackage {
@@ -32,7 +33,7 @@ buildPythonPackage {
};
propagatedBuildInputs = [ zlib xz ncompress gzip bzip2 gnutar p7zip cabextract cramfsswap cramfsprogs lzma pycrypto ]
++ stdenv.lib.optional visualizationSupport pyqtgraph;
++ stdenv.lib.optionals visualizationSupport [ matplotlib pyqtgraph ];
# setup.py only installs version.py during install, not test
postPatch = ''

View File

@@ -73,6 +73,13 @@ let
# This patch disables the test that tries to read /etc/os-release which
# is not accessible in sandboxed builds.
./skip_test_linux_distro.patch
# fix compatibility with the latest SQLAlchemy
(fetchpatch {
url = "https://github.com/buildbot/buildbot/commit/96f3cd1c5f5c82b733baecb133576366ecf544fc.patch";
sha256 = "0n1jm13h08j7ksbs8ixayn3wziq5hzyp3kscz9fpgxd8gl885y5n";
stripLen = 1;
})
];
postPatch = ''

View File

@@ -1,10 +1,11 @@
{ stdenv, buildPythonPackage, fetchPypi
, frozendict, simplejson, six
, frozendict, simplejson, six, isPy27
}:
buildPythonPackage rec {
pname = "canonicaljson";
version = "1.3.0";
disabled = isPy27;
src = fetchPypi {
inherit pname version;

View File

@@ -1,4 +1,13 @@
{ lib, buildPythonPackage, fetchFromGitHub, stdenv, isPy3k, fetchpatch, humanfriendly, verboselogs, capturer, pytest, mock, utillinux }:
{ lib
, buildPythonPackage
, fetchFromGitHub
, humanfriendly
, verboselogs
, capturer
, pytest
, mock
, utillinux
}:
buildPythonPackage rec {
pname = "coloredlogs";
@@ -11,13 +20,6 @@ buildPythonPackage rec {
sha256 = "0rnmxwrim4razlv4vi3krxk5lc5ksck6h5374j8avqwplika7q2x";
};
# patch by risicle
patches = lib.optional (stdenv.isDarwin && isPy3k) (fetchpatch {
name = "darwin-py3-capture-fix.patch";
url = "https://github.com/xolox/python-coloredlogs/pull/74.patch";
sha256 = "0pk7k94iz0gdripw623vzdl4hd83vwhsfzshl8pbvh1n6swi0xx9";
});
checkPhase = ''
PATH=$PATH:$out/bin pytest . -k "not test_plain_text_output_format \
and not test_auto_install"

View File

@@ -0,0 +1,21 @@
{ lib, fetchPypi, buildPythonPackage, pytest, pytest-html }:
buildPythonPackage rec {
pname = "cucumber-tag-expressions";
version = "3.0.0";
src = fetchPypi {
inherit pname version;
sha256 = "0kb8dq458sflwl2agb2v9hp04qwygslrhdps819vq27wc44jabxw";
};
checkInputs = [ pytest pytest-html ];
checkPhase = "pytest tests/*/*.py";
meta = with lib; {
homepage = "https://github.com/cucumber/tag-expressions-python";
description = "Provides tag-expression parser for cucumber/behave";
license = licenses.mit;
maintainers = with maintainers; [ maxxk ];
};
}

View File

@@ -60,6 +60,7 @@ buildPythonPackage rec {
"test_argwhere_str"
"test_count_nonzero_str"
"rolling_methods" # floating percision error ~0.1*10^8 small
"num_workers_config" # flaky
];
meta = {

View File

@@ -0,0 +1,25 @@
{ buildPythonPackage, fetchFromGitHub, python, stdenv, django }:
buildPythonPackage rec {
pname = "django-widget-tweaks";
version = "1.4.8";
src = fetchFromGitHub { # package from Pypi missing runtests.py
owner = "jazzband";
repo = pname;
rev = version;
sha256 = "00w1ja56dc7cyw7a3mph69ax6mkch1lsh4p98ijdhzfpjdy36rbg";
};
checkPhase = "${python.interpreter} runtests.py";
propagatedBuildInputs = [ django ];
meta = with stdenv.lib; {
description = "Tweak the form field rendering in templates, not in python-level form definitions.";
homepage = "https://github.com/jazzband/django-widget-tweaks";
license = licenses.mit;
maintainers = with maintainers; [
maxxk
];
};
}

View File

@@ -17,7 +17,7 @@
buildPythonPackage {
pname = "dogtail";
version = "0.9.10";
version = "0.9.11";
# https://gitlab.com/dogtail/dogtail/issues/1
# src = fetchPypi {
@@ -26,7 +26,7 @@ buildPythonPackage {
# };
src = fetchurl {
url = "https://gitlab.com/dogtail/dogtail/raw/released/dogtail-0.9.10.tar.gz";
sha256 = "14sycidl8ahj3fwlhpwlpnyd43c302yqr7nqg2hj39pyj7kgk15b";
sha256 = "EGyxYopupfXPYtTL9mm9ujZorvh8AGaNXVKBPWsGy3c=";
};
patches = [
@@ -54,7 +54,7 @@ buildPythonPackage {
meta = {
description = "GUI test tool and automation framework that uses Accessibility technologies to communicate with desktop applications";
homepage = "https://gitlab.com/dogtail/dogtail";
license = lib.licenses.gpl2;
license = lib.licenses.gpl2Only;
maintainers = with lib.maintainers; [ jtojnar ];
};
}

View File

@@ -0,0 +1,56 @@
{ buildPythonPackage
, fetchFromGitHub
, lib
, isPy3k
, cython
, numpy
, toml
, pytest
}:
buildPythonPackage rec {
pname = "finalfusion";
version = "0.7.1";
disabled = !isPy3k;
src = fetchFromGitHub {
owner = "finalfusion";
repo = "finalfusion-python";
rev = version;
sha256 = "0pwzflamxqvpl1wcz0zbhhd6aa4xn18rmza6rggaic3ckidhyrh4";
};
nativeBuildInputs = [
cython
];
propagatedBuildInputs = [
numpy
toml
];
checkInputs = [
pytest
];
postPatch = ''
patchShebangs tests/integration
'';
checkPhase = ''
# Regular unit tests.
pytest
# Integration tests for command-line utilities.
PATH=$PATH:$out/bin tests/integration/all.sh
'';
meta = with lib; {
description = "Python module for using finalfusion, word2vec, and fastText word embeddings";
homepage = "https://github.com/finalfusion/finalfusion-python/";
maintainers = with maintainers; [ danieldk ];
platforms = platforms.all;
license = licenses.blueOak100;
};
}

View File

@@ -1,7 +1,8 @@
{ buildPythonPackage, lib, fetchPypi, isPy27
, ipaddress
, aiohttp
, maxminddb
, mock
, mocket
, requests
, requests-mock
}:
@@ -9,16 +10,20 @@
buildPythonPackage rec {
version = "4.0.2";
pname = "geoip2";
disabled = isPy27;
src = fetchPypi {
inherit pname version;
sha256 = "4afb5d899eac08444e461239c8afb165c90234adc0b5dc952792d9da74c9091b";
};
propagatedBuildInputs = [ requests maxminddb ]
++ lib.optionals isPy27 [ ipaddress ];
patchPhase = ''
substituteInPlace requirements.txt --replace "requests>=2.24.0,<3.0.0" "requests"
'';
checkInputs = [ requests-mock ];
propagatedBuildInputs = [ aiohttp requests maxminddb ];
checkInputs = [ mocket requests-mock ];
meta = with lib; {
description = "MaxMind GeoIP2 API";

View File

@@ -11,12 +11,12 @@
buildPythonPackage rec {
version = "0.35.2";
version = "0.36.0";
pname = "M2Crypto";
src = fetchPypi {
inherit pname version;
sha256 = "09yirf3w77w6f49q6nxhrjm9c3a4y9s30s1k09chqrw8zdgx8sjc";
sha256 = "1hadbdckmjzfb8qzbkafypin6sakfx35j2qx0fsivh757s7c2hhm";
};
patches = [

View File

@@ -1,4 +1,4 @@
{ stdenv, lib, buildPythonPackage, pythonAtLeast
{ stdenv, lib, buildPythonPackage, pythonOlder, pythonAtLeast
, fetchPypi
, libmaxminddb
, ipaddress
@@ -9,6 +9,7 @@
buildPythonPackage rec {
version = "2.0.2";
pname = "maxminddb";
disabled = pythonOlder "3.6";
src = fetchPypi {
inherit pname version;

View File

@@ -0,0 +1,43 @@
{ lib, buildPythonPackage, fetchPypi, pythonOlder, isPy27
, decorator
, importlib-metadata
, python
, python_magic
, six
, urllib3 }:
buildPythonPackage rec {
pname = "mocket";
version = "3.8.8";
src = fetchPypi {
inherit pname version;
sha256 = "0yqls2hqmfs6i4p2nb89j5icyrqwabalsmwfixfvbjir4fmgad2l";
};
patchPhase = ''
substituteInPlace requirements.txt \
--replace "python-magic==0.4.18" "python-magic" \
--replace "urllib3==1.25.10" "urllib3"
substituteInPlace setup.py --replace 'setup_requires=["pipenv"]' "setup_requires=[]"
'';
propagatedBuildInputs = [
decorator
python_magic
urllib3
six
] ++ lib.optionals (isPy27) [ six ];
# Pypi has no runtests.py, github has no requirements.txt. No way to test, no way to install.
doCheck = false;
pythonImportsCheck = [ "mocket" ];
meta = with lib; {
description = "A socket mock framework - for all kinds of socket animals, web-clients included";
homepage = "https://github.com/mindflayer/python-mocket";
license = licenses.bsd3;
maintainers = with maintainers; [ hexa ];
};
}

View File

@@ -1,8 +1,8 @@
{ stdenv, buildPythonPackage, fetchzip, pyopenssl, python }:
{ stdenv, buildPythonPackage, fetchzip, gobject-introspection, idna, libsoup, precis-i18n, pygobject3, pyopenssl }:
let
pname = "nbxmpp";
version = "0.6.10";
version = "1.0.2";
name = "${pname}-${version}";
in buildPythonPackage {
inherit pname version;
@@ -11,16 +11,12 @@ in buildPythonPackage {
name = "${name}.tar.bz2";
url = "https://dev.gajim.org/gajim/python-nbxmpp/repository/archive.tar.bz2?"
+ "ref=${name}";
sha256 = "1w31a747mj9rvlp3n20z0fnvyvihphkgkyr22sk2kap3migw8vai";
sha256 = "1rhzsakqrybzq5j5b9400wjd14pncph47c1ggn5a6f3di03lk4az";
};
propagatedBuildInputs = [ pyopenssl ];
checkPhase = ''
# Disable tests requiring networking
echo "" > test/unit/test_xmpp_transports_nb2.py
${python.executable} test/runtests.py
'';
buildInputs = [ precis-i18n ];
checkInputs = [ gobject-introspection libsoup pygobject3 ];
propagatedBuildInputs = [ idna pyopenssl ];
meta = with stdenv.lib; {
homepage = "https://dev.gajim.org/gajim/python-nbxmpp";

View File

@@ -1,19 +1,21 @@
{ stdenv, buildPythonPackage , fetchFromGitHub , bashInteractive , urlgrabber, m2crypto, rpm }:
{ stdenv, buildPythonPackage, fetchFromGitHub, bashInteractive, urlgrabber
, m2crypto, rpm, chardet
}:
buildPythonPackage rec {
pname = "osc";
version = "0.167.1";
version = "0.170.0";
src = fetchFromGitHub {
owner = "openSUSE";
repo = "osc";
rev = version;
sha256 = "0f3c6mzvk9yjicwfdh47j4s2l1wrfgpa6lmqdchasdqfsacps4r6";
sha256 = "10dj9kscz59qm8rw5084gf0m8ail2rl7r8rg66ij92x88wvi9mbz";
};
buildInputs = [ bashInteractive ]; # needed for bash-completion helper
checkInputs = [ rpm ];
propagatedBuildInputs = [ urlgrabber m2crypto ];
propagatedBuildInputs = [ urlgrabber m2crypto chardet ];
postInstall = ''
ln -s $out/bin/osc-wrapper.py $out/bin/osc

View File

@@ -1,6 +1,6 @@
{ lib, buildPythonPackage, fetchPypi
, requests, cryptography, pybrowserid, hawkauthlib, six
, grequests, mock, responses, pytest }:
, grequests, mock, responses, pytest, pyjwt }:
buildPythonPackage rec {
pname = "PyFxA";
@@ -17,15 +17,16 @@ buildPythonPackage rec {
'';
propagatedBuildInputs = [
requests cryptography pybrowserid hawkauthlib six
pyjwt requests cryptography pybrowserid hawkauthlib six
];
checkInputs = [
grequests mock responses pytest
];
# test_oath is mostly network calls
checkPhase = ''
pytest
pytest --ignore=fxa/tests/test_oauth.py
'';
meta = with lib; {

View File

@@ -6,18 +6,23 @@
# pythonPackages
, django
, pylint-plugin-utils
# pythonPackages for checkInputs
, coverage
, factory_boy
, pytest
}:
buildPythonPackage rec {
pname = "pylint-django";
version = "2.1.0";
version = "2.3.0";
disabled = !isPy3k;
src = fetchFromGitHub {
owner = "PyCQA";
repo = pname;
rev = "v${version}";
sha256 = "1gvbh2a480x3ddrq6xzray7kdsz8nb8n16xm2lf03w2nqnsdbkwy";
sha256 = "1088waraiigi2bnlighn7bvnvqmpx5fbw70c8jd8sh25mj38wgly";
};
propagatedBuildInputs = [
@@ -25,8 +30,14 @@ buildPythonPackage rec {
pylint-plugin-utils
];
# Testing requires checkout from other repositories
doCheck = false;
checkInputs = [ coverage factory_boy pytest ];
# Check command taken from scripts/test.sh
# Skip test external_django_tables2_noerror_meta_class:
# requires an unpackaged django_tables2
checkPhase = ''
python pylint_django/tests/test_func.py -v -k "not tables2"
'';
meta = with lib; {
description = "A Pylint plugin to analyze Django applications";

View File

@@ -0,0 +1,46 @@
{ lib
, buildPythonPackage
, fetchFromGitHub
, isPy27
, future
, pytestCheckHook
, pytorch
, pyyaml
, tensorflow-tensorboard
, tqdm }:
buildPythonPackage rec {
pname = "pytorch-lightning";
version = "0.8.5";
disabled = isPy27;
src = fetchFromGitHub {
owner = "PyTorchLightning";
repo = pname;
rev = version;
sha256 = "12zhq4pnfcwbgcx7cs99c751gp3w0ysaf5ykv2lv8f4i360w3r5a";
};
propagatedBuildInputs = [
future
pytorch
pyyaml
tensorflow-tensorboard
tqdm
];
checkInputs = [ pytestCheckHook ];
# Some packages are not in NixPkgs; other tests try to build distributed
# models, which doesn't work in the sandbox.
doCheck = false;
pythonImportsCheck = [ "pytorch_lightning" ];
meta = with lib; {
description = "Lightweight PyTorch wrapper for machine learning researchers";
homepage = "https://pytorch-lightning.readthedocs.io";
license = licenses.asl20;
maintainers = with maintainers; [ tbenst ];
};
}

View File

@@ -0,0 +1,21 @@
{ buildPythonPackage, fetchPypi, lib, rdflib, nose }:
buildPythonPackage rec {
pname = "rdflib-jsonld";
version = "0.5.0";
src = fetchPypi {
inherit pname version;
sha256 = "4f7d55326405071c7bce9acf5484643bcb984eadb84a6503053367da207105ed";
};
nativeBuildInputs = [ nose ];
propagatedBuildInputs = [ rdflib ];
meta = with lib; {
homepage = "https://github.com/RDFLib/rdflib-jsonld";
license = licenses.bsdOriginal;
description = "rdflib extension adding JSON-LD parser and serializer";
maintainers = [ maintainers.koslambrou ];
};
}

View File

@@ -2,6 +2,7 @@
, buildPythonPackage
, fetchPypi
, six
, setuptools
}:
buildPythonPackage rec {
@@ -13,7 +14,7 @@ buildPythonPackage rec {
sha256 = "945b5efdc10f468fc056bd53a4e4224ec4c2fe1a7e83ae47443bbb6e7c7a1f7d";
};
propagatedBuildInputs = [ six ];
propagatedBuildInputs = [ six setuptools ];
doCheck = false;
pythonImportsCheck = [ "rethinkdb" ];
@@ -21,7 +22,7 @@ buildPythonPackage rec {
meta = with stdenv.lib; {
description = "Python driver library for the RethinkDB database server";
homepage = "https://pypi.python.org/pypi/rethinkdb";
license = licenses.agpl3;
license = licenses.asl20;
};
}

View File

@@ -17,6 +17,6 @@ buildPythonPackage rec {
description = "Reference implementation of SLIP-0039";
homepage = "https://github.com/trezor/python-shamir-mnemonic";
license = licenses.mit;
maintainers = with maintainers; [ maintainers."1000101" ];
maintainers = with maintainers; [ _1000101 ];
};
}

View File

@@ -5,9 +5,10 @@
, praw
, pyenchant
, pygeoip
, pytest
, pytestCheckHook
, python
, pytz
, sqlalchemy
, xmltodict
}:
@@ -29,20 +30,26 @@ buildPythonPackage rec {
pyenchant
pygeoip
pytz
sqlalchemy
xmltodict
];
# remove once https://github.com/sopel-irc/sopel/pull/1653 lands
postPatch = ''
substituteInPlace requirements.txt \
--replace "praw<6.0.0" "praw<7.0.0"
--replace "praw>=4.0.0,<6.0.0" "praw"
'';
checkInputs = [ pytest ];
checkInputs = [ pytestCheckHook ];
checkPhase = ''
HOME=$PWD # otherwise tries to create tmpdirs at root
pytest .
preCheck = ''
export TESTDIR=$(mktemp -d)
cp -R ./test $TESTDIR
pushd $TESTDIR
'';
postCheck = ''
popd
'';
meta = with stdenv.lib; {

View File

@@ -0,0 +1,69 @@
import pytest
import spacy
en_text = (
"When Sebastian Thrun started working on self-driving cars at "
"Google in 2007, few people outside of the company took him "
"seriously. “I can tell you very senior CEOs of major American "
"car companies would shake my hand and turn away because I wasnt "
"worth talking to,” said Thrun, in an interview with Recode earlier "
"this week.")
@pytest.fixture
def en_core_web_sm():
return spacy.load("en_core_web_sm")
@pytest.fixture
def doc_en_core_web_sm(en_core_web_sm):
return en_core_web_sm(en_text)
def test_entities(doc_en_core_web_sm):
entities = list(map(lambda e: (e.text, e.label_),
doc_en_core_web_sm.ents))
assert entities == [
('Sebastian Thrun', 'PERSON'),
('Google', 'ORG'), ('2007', 'DATE'),
('American', 'NORP'),
('Thrun', 'ORG'),
('earlier this week', 'DATE')
]
def test_nouns(doc_en_core_web_sm):
assert [
chunk.text for chunk in doc_en_core_web_sm.noun_chunks] == [
'Sebastian Thrun',
'self-driving cars',
'Google',
'few people',
'the company',
'him',
'I',
'you',
'very senior CEOs',
'major American car companies',
'my hand',
'I',
'Thrun',
'an interview',
'Recode']
def test_verbs(doc_en_core_web_sm):
assert [
token.lemma_ for token in doc_en_core_web_sm if token.pos_ == "VERB"] == [
'start',
'work',
'drive',
'take',
'can',
'tell',
'would',
'shake',
'turn',
'talk',
'say']

View File

@@ -0,0 +1,23 @@
{ stdenv, pytest, spacy_models }:
stdenv.mkDerivation {
name = "spacy-annotation-test";
src = ./.;
dontConfigure = true;
dontBuild = true;
doCheck = true;
checkInputs = [ pytest spacy_models.en_core_web_sm ];
checkPhase = ''
pytest annotate.py
'';
installPhase = ''
touch $out
'';
meta.timeout = 60;
}

View File

@@ -1,5 +1,6 @@
{ lib
, buildPythonPackage
, callPackage
, fetchPypi
, pythonOlder
, pytest
@@ -55,6 +56,7 @@ buildPythonPackage rec {
postPatch = ''
substituteInPlace setup.cfg \
--replace "blis>=0.4.0,<0.5.0" "blis>=0.4.0,<1.0" \
--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" \
@@ -63,6 +65,8 @@ buildPythonPackage rec {
pythonImportsCheck = [ "spacy" ];
passthru.tests = callPackage ./annotation-test {};
meta = with lib; {
description = "Industrial-strength Natural Language Processing (NLP) with Python and Cython";
homepage = "https://github.com/explosion/spaCy";

View File

@@ -14,6 +14,8 @@ let
propagatedBuildInputs = [ spacy ]
++ lib.optionals (lang == "zh") [ jieba pkuseg ];
pythonImportsCheck = [ pname ];
meta = with stdenv.lib; {
description = "Models for the spaCy NLP library";
homepage = "https://github.com/explosion/spacy-models";

View File

@@ -60,6 +60,7 @@ buildPythonPackage rec {
postPatch = ''
substituteInPlace setup.py \
--replace "blis>=0.4.0,<0.5.0" "blis>=0.4.0,<1.0" \
--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"

View File

@@ -55,6 +55,6 @@ buildPythonPackage rec {
description = "Python library for communicating with TREZOR Bitcoin Hardware Wallet";
homepage = "https://github.com/trezor/trezor-firmware/tree/master/python";
license = licenses.gpl3;
maintainers = with maintainers; [ np prusnak mmahut maintainers."1000101" ];
maintainers = with maintainers; [ np prusnak mmahut _1000101 ];
};
}

View File

@@ -8,11 +8,11 @@
buildPythonPackage rec {
pname = "wtf-peewee";
version = "3.0.1";
version = "3.0.2";
src = fetchPypi {
inherit pname version;
sha256 = "4ac1b457f3255ee2d72915267884a16e5fb502e1e7bb793f2f1301c926e3599a";
sha256 = "03qs6np5s9r0nmsryfzll29ajcqk27b18kcbgd9plf80ys3nb6kd";
};
propagatedBuildInputs = [

View File

@@ -0,0 +1,24 @@
{ lib, buildPythonPackage, fetchFromGitHub, xcffib, pillow }:
buildPythonPackage rec {
pname = "xpybutil";
version = "0.0.6";
# Pypi only offers a wheel
src = fetchFromGitHub {
owner = "BurntSushi";
repo = pname;
rev = version;
sha256 = "17gbqq955fcl29aayn8l0x14azc60cxgkvdxblz9q8x3l50w0xpg";
};
# pillow is a dependency in image.py which is not listed in setup.py
propagatedBuildInputs = [ xcffib pillow ];
meta = with lib; {
homepage = "https://github.com/BurntSushi/xpybutil";
description = "An incomplete xcb-util port plus some extras";
license = licenses.wtfpl;
maintainers = with maintainers; [ artturin ];
};
}

View File

@@ -1,8 +1,8 @@
{ stdenv
, fetchPypi
, fetchpatch
, buildPythonPackage
, python
, pythonAtLeast
, zope_testrunner
, transaction
, six
@@ -17,26 +17,21 @@
buildPythonPackage rec {
pname = "ZODB";
version = "5.5.1";
version = "5.6.0";
src = fetchPypi {
inherit pname version;
sha256 = "20155942fa326e89ad8544225bafd74237af332ce9d7c7105a22318fe8269666";
sha256 = "1zh7rd182l15swkbkm3ib0wgyn16xasdz2mzry8k4lwk6dagnm26";
};
patches = [
# Compatibility with transaction v3.0
(fetchpatch {
url = "https://github.com/zopefoundation/ZODB/commit/0adcc6877f690186c97cc5da7e13788946d5e0df.patch";
sha256 = "1zmbgm7r36nj5w7icpinp61fm81svh2wk213pzr3l0jxzr9i5qi4";
})
];
# remove broken test
postPatch = ''
rm -vf src/ZODB/tests/testdocumentation.py
'';
# ZConfig 3.5.0 is not compatible with Python 3.8
disabled = pythonAtLeast "3.8";
propagatedBuildInputs = [
transaction
six