Merge remote-tracking branch 'upstream/master' into staging

This commit is contained in:
John Ericson
2018-09-18 16:55:42 -04:00
850 changed files with 49899 additions and 16989 deletions

View File

@@ -2,6 +2,7 @@
, fetchPypi
, flask
, pymongo
, vcversioner
, lib
, pytest
}:
@@ -18,17 +19,17 @@ buildPythonPackage rec {
checkInputs = [ pytest ];
checkPhase = ''
py.test tests
py.test
'';
# Tests seem to hang
doCheck = false;
propagatedBuildInputs = [ flask pymongo ];
propagatedBuildInputs = [ flask pymongo vcversioner ];
meta = {
homepage = "http://flask-pymongo.readthedocs.org/";
description = "PyMongo support for Flask applications";
license = lib.licenses.bsd2;
};
}
}

View File

@@ -1,18 +1,19 @@
{ stdenv, buildPythonPackage, fetchPypi, pythonOlder
, cryptography
, bcrypt, gssapi, libnacl, libsodium, nettle, pyopenssl }:
, bcrypt, gssapi, libnacl, libsodium, nettle, pyopenssl
, openssl }:
buildPythonPackage rec {
pname = "asyncssh";
version = "1.13.3";
version = "1.14.0";
disabled = pythonOlder "3.4";
src = fetchPypi {
inherit pname version;
sha256 = "eb5b190badc5cd2a506a1b6ced3e92f948166974eef7d1abab61acc67aa379e6";
sha256 = "0f1i5a760a3jylkj00bxkshnylzyhyqz50v8mb8s9ygllpzja058";
};
propagatedBuildInputs = [
propagatedBuildInputs = [
bcrypt
cryptography
gssapi
@@ -22,6 +23,8 @@ buildPythonPackage rec {
pyopenssl
];
checkInputs = [ openssl ];
# Disables windows specific test (specifically the GSSAPI wrapper for Windows)
postPatch = ''
rm ./tests/sspi_stub.py
@@ -29,8 +32,8 @@ buildPythonPackage rec {
meta = with stdenv.lib; {
description = "Provides an asynchronous client and server implementation of the SSHv2 protocol on top of the Python asyncio framework";
homepage = https://pypi.python.org/pypi/asyncssh;
license = licenses.epl10;
homepage = https://pypi.python.org/pypi/asyncssh;
license = licenses.epl20;
maintainers = with maintainers; [ worldofpeace ];
};
}

View File

@@ -0,0 +1,24 @@
{ stdenv, fetchPypi, fetchFromGitHub, buildPythonPackage, pytest }:
buildPythonPackage rec {
pname = "backports.shutil_which";
version = "3.5.1";
src = fetchPypi {
inherit pname version;
sha256 = "16sa3adkf71862cb9pk747pw80a2f1v5m915ijb4fgj309xrlhyx";
};
checkInputs = [ pytest ];
checkPhase = ''
py.test test
'';
meta = with stdenv.lib; {
description = "Backport of shutil.which from Python 3.3";
homepage = https://github.com/minrk/backports.shutil_which;
license = licenses.psfl;
maintainers = with maintainers; [ jluttine ];
};
}

View File

@@ -0,0 +1,25 @@
{ stdenv, buildPythonPackage, fetchPypi, libev, python }:
buildPythonPackage rec {
pname = "bjoern";
version = "2.2.2";
src = fetchPypi {
inherit pname version;
sha256 = "1w5z9agacci4shmkg9gh46ifj2a724rrgbykdv14830f7jq3dcmi";
};
buildInputs = [ libev ];
checkPhase = ''
${python.interpreter} tests/keep-alive-behaviour.py 2>/dev/null
${python.interpreter} tests/test_wsgi_compliance.py
'';
meta = with stdenv.lib; {
homepage = https://github.com/jonashaag/bjoern;
description = "A screamingly fast Python 2/3 WSGI server written in C";
license = licenses.bsd2;
maintainers = with maintainers; [ cmcdragonkai ];
};
}

View File

@@ -15,6 +15,12 @@ buildPythonPackage rec {
propagatedBuildInputs = [ persistent zope_interface ];
checkInputs = [ zope_testrunner ];
# disable a failing test that looks broken
postPatch = ''
substituteInPlace BTrees/tests/common.py \
--replace "testShortRepr" "no_testShortRepr"
'';
src = fetchPypi {
inherit pname version;
sha256 = "dcc096c3cf92efd6b9365951f89118fd30bc209c9af83bf050a28151a9992786";

View File

@@ -1,23 +1,26 @@
{ stdenv, buildPythonPackage, fetchFromGitHub, six, pytest }:
{ stdenv, buildPythonPackage, fetchFromGitHub
, six, pytest, arrow
}:
buildPythonPackage rec {
pname = "construct";
version = "2.8.16";
name = pname + "-" + version;
pname = "construct";
version = "2.9.45";
src = fetchFromGitHub {
owner = "construct";
repo = "construct";
rev = "v${version}";
sha256 = "0lzz1dy419n254qccch7yx4nkpwd0fsyjhnsnaf6ysgwzqxxv63j";
owner = pname;
repo = pname;
rev = "v${version}";
sha256 = "0ig66xrzswpkhhmw123p2nvr15a9lxz54a1fmycfdh09327c1d3y";
};
propagatedBuildInputs = [ six ];
checkInputs = [ pytest ];
checkInputs = [ pytest arrow ];
# TODO: figure out missing dependencies
doCheck = false;
checkPhase = ''
py.test -k 'not test_numpy' tests
py.test -k 'not test_numpy and not test_gallery' tests
'';
meta = with stdenv.lib; {

View File

@@ -1,4 +1,4 @@
{ buildPythonPackage, fetchFromGitHub, lib,
{ buildPythonPackage, isPy3k, fetchFromGitHub, lib,
z3, ply, python-igraph, oset, ordered-set, dictionaries }:
buildPythonPackage {
@@ -29,6 +29,8 @@ buildPythonPackage {
$out/bin/cozy --help
'';
disabled = !isPy3k;
meta = {
description = "The collection synthesizer";
homepage = https://cozy.uwplse.org/;

View File

@@ -4,7 +4,7 @@
}:
buildPythonPackage rec {
pname = "daphne";
version = "2.1.0";
version = "2.2.2";
disabled = !isPy3k;
@@ -12,7 +12,7 @@ buildPythonPackage rec {
owner = "django";
repo = pname;
rev = version;
sha256 = "1lbpn0l796ar77amqy8dap30zxmsn6as8y2lbmp4lk8m9awscwi8";
sha256 = "1pr3b7zxjp2jx31lpiy1hfyprpmyiv2kd18n8x6kh6gd5nr0dgp8";
};
nativeBuildInputs = [ pytestrunner ];
@@ -21,9 +21,10 @@ buildPythonPackage rec {
checkInputs = [ hypothesis pytest pytest-asyncio ];
doCheck = !stdenv.isDarwin; # most tests fail on darwin
checkPhase = ''
# Other tests fail, seems to be due to filesystem access
py.test -k "test_cli or test_utils"
py.test
'';
meta = with stdenv.lib; {

View File

@@ -0,0 +1,35 @@
{ stdenv
, buildPythonPackage
, fetchPypi
, cloudpickle
, dask
, numpy, toolz # dask[array]
, multipledispatch
, scipy
, scikitlearn
, pytest
}:
buildPythonPackage rec {
version = "0.1.0";
pname = "dask-glm";
src = fetchPypi {
inherit pname version;
sha256 = "5a38d17538558fe6a3457cd67eed0a90a5dff51a9eaebb496efb68fc432ed89a";
};
checkInputs = [ pytest ];
propagatedBuildInputs = [ cloudpickle dask numpy toolz multipledispatch scipy scikitlearn ];
checkPhase = ''
py.test dask_glm
'';
meta = with stdenv.lib; {
homepage = http://github.com/dask/dask-glm/;
description = "Generalized Linear Models with Dask";
license = licenses.bsd3;
maintainers = [ maintainers.costrouc ];
};
}

View File

@@ -0,0 +1,30 @@
{ stdenv
, buildPythonPackage
, fetchPypi
, dask
, numpy, toolz # dask[array]
, scipy
, pims
, pytest
, scikitimage
}:
buildPythonPackage rec {
version = "0.1.1";
pname = "dask-image";
src = fetchPypi {
inherit pname version;
sha256 = "e6294ac577a8fc0abec2b97a2c42d404f599feac61d6899bdf1bf2b7cfb0e015";
};
checkInputs = [ pytest scikitimage ];
propagatedBuildInputs = [ dask numpy toolz scipy pims ];
meta = with stdenv.lib; {
homepage = https://github.com/dask/dask-image;
description = "Distributed image processing";
license = licenses.bsdOriginal;
maintainers = [ maintainers.costrouc ];
};
}

View File

@@ -0,0 +1,33 @@
{ stdenv
, buildPythonPackage
, fetchPypi
, dask
, distributed
, docrep
, pytest
}:
buildPythonPackage rec {
version = "0.4.0";
pname = "dask-jobqueue";
src = fetchPypi {
inherit pname version;
sha256 = "c73dae82b2a1d2a9f4ef17778f0de7a9237671a7fd3374aadd9d2bc07e92e848";
};
checkInputs = [ pytest ];
propagatedBuildInputs = [ dask distributed docrep ];
# do not run entire tests suite (requires slurm, sge, etc.)
checkPhase = ''
py.test dask_jobqueue/tests/test_jobqueue_core.py
'';
meta = with stdenv.lib; {
homepage = https://github.com/dask/dask-jobqueue;
description = "Deploy Dask on job schedulers like PBS, SLURM, and SGE";
license = licenses.bsd3;
maintainers = [ maintainers.costrouc ];
};
}

View File

@@ -0,0 +1,43 @@
{ stdenv
, buildPythonPackage
, fetchPypi
, dask
, numpy, toolz # dask[array]
, numba
, pandas
, scikitlearn
, scipy
, dask-glm
, six
, multipledispatch
, packaging
, pytest
, xgboost
, tensorflow
, joblib
, distributed
}:
buildPythonPackage rec {
version = "0.10.0";
pname = "dask-ml";
src = fetchPypi {
inherit pname version;
sha256 = "4b6ca548c7282c1b6983e696e4bdfa0a2d7b51b168928b9322ea7a4b9a9f20f9";
};
checkInputs = [ pytest xgboost tensorflow joblib distributed ];
propagatedBuildInputs = [ dask numpy toolz numba pandas scikitlearn scipy dask-glm six multipledispatch packaging ];
# dask-ml has some heavy test requirements
# and requires some very new packages
doCheck = false;
meta = with stdenv.lib; {
homepage = https://github.com/dask/dask-ml;
description = "Scalable Machine Learn with Dask";
license = licenses.bsd3;
maintainers = [ maintainers.costrouc ];
};
}

View File

@@ -0,0 +1,36 @@
{ stdenv
, buildPythonPackage
, fetchPypi
, xgboost
, dask
, distributed
, pytest
, scikitlearn
, scipy
}:
buildPythonPackage rec {
version = "0.1.5";
pname = "dask-xgboost";
src = fetchPypi {
inherit pname version;
sha256 = "1860d06965fe68def1c83b9195130a92050fd4bc28bf2be689898a3a74ee1316";
};
checkInputs = [ pytest scikitlearn ];
propagatedBuildInputs = [ xgboost dask distributed ];
checkPhase = ''
py.test dask_xgboost/tests/test_core.py
'';
doCheck = false;
meta = with stdenv.lib; {
homepage = https://github.com/dask/dask-xgboost;
description = "Interactions between Dask and XGBoost";
license = licenses.bsd3;
maintainers = [ maintainers.costrouc ];
};
}

View File

@@ -1,29 +1,33 @@
{ lib
, pkgs
, buildPythonPackage
, fetchPypi
, fetchFromGitHub
, pytest
}:
buildPythonPackage rec {
pname = "DendroPy";
version = "4.4.0";
src = fetchPypi {
inherit pname version;
sha256 = "f0a0e2ce78b3ed213d6c1791332d57778b7f63d602430c1548a5d822acf2799c";
# tests are incorrectly packaged in pypi version
src = fetchFromGitHub {
owner = "jeetsukumaran";
repo = pname;
rev = "v${version}";
sha256 = "097hfyv2kaf4x92i4rjx0paw2cncxap48qivv8zxng4z7nhid0x9";
};
prePatch = ''
# Test removed/disabled and reported upstream: https://github.com/jeetsukumaran/DendroPy/issues/74
rm -f dendropy/test/test_dataio_nexml_reader_tree_list.py
'';
preCheck = ''
# Needed for unicode python tests
export LC_ALL="en_US.UTF-8"
cd tests # to find the 'support' module
'';
checkInputs = [ pkgs.glibcLocales ];
checkInputs = [ pytest pkgs.glibcLocales ];
checkPhase = ''
pytest -k 'not test_dataio_nexml_reader_tree_list and not test_pscores_with'
'';
meta = {
homepage = http://dendropy.org/;

View File

@@ -0,0 +1,60 @@
{ lib
, buildPythonPackage
, fetchPypi
, pytest
, pytest-repeat
, pytest-faulthandler
, pytest-timeout
, mock
, joblib
, click
, cloudpickle
, dask
, msgpack
, psutil
, six
, sortedcontainers
, tblib
, toolz
, tornado
, zict
, pyyaml
, pythonOlder
, futures
, singledispatch
}:
buildPythonPackage rec {
pname = "distributed";
version = "1.23.1";
# get full repository need conftest.py to run tests
src = fetchPypi {
inherit pname version;
sha256 = "9d4693442efe40e05e4304fe6d8174989c6eb4bad1afe70480c98263ef8e1cdb";
};
checkInputs = [ pytest pytest-repeat pytest-faulthandler pytest-timeout mock joblib ];
propagatedBuildInputs = [
click cloudpickle dask msgpack psutil six
sortedcontainers tblib toolz tornado zict pyyaml
] ++ lib.optional (pythonOlder "3.2") [ futures ]
++ lib.optional (pythonOlder "3.4") [ singledispatch ];
# tests take about 10-15 minutes
# ignore 5 cli tests out of 1000 total tests that fail due to subprocesses
# these tests are not critical to the library (only the cli)
checkPhase = ''
py.test distributed -m "not avoid-travis" -r s --timeout-method=thread --timeout=0 --durations=20 --ignore="distributed/cli/tests"
'';
# when tested random tests would fail and not repeatably
doCheck = false;
meta = {
description = "Distributed computation in Python.";
homepage = http://distributed.readthedocs.io/en/latest/;
license = lib.licenses.bsd3;
maintainers = with lib.maintainers; [ teh costrouc ];
};
}

View File

@@ -1,11 +1,13 @@
{ stdenv, buildPythonPackage, fetchPypi,
{ stdenv, buildPythonPackage, fetchPypi, isPy3k,
numpy, django_colorful, pillow, psycopg2,
pyparsing, django, celery
pyparsing, django_2_1, celery, boto3
}:
buildPythonPackage rec {
version = "0.6";
pname = "django-raster";
disabled = !isPy3k;
src = fetchPypi {
inherit pname version;
sha256 = "9a0f8e71ebeeeb5380c6ca68e027e9de335f43bc15e89dd22e7a470c4eb7aeb8";
@@ -15,7 +17,7 @@ buildPythonPackage rec {
doCheck = false;
propagatedBuildInputs = [ numpy django_colorful pillow psycopg2
pyparsing django celery ];
pyparsing django_2_1 celery boto3 ];
meta = with stdenv.lib; {
description = "Basic raster data integration for Django";

View File

@@ -0,0 +1,45 @@
{ lib, fetchPypi, buildPythonPackage, pythonOlder, pytest, pysha3, pycrypto,
pycryptodome }:
buildPythonPackage rec {
pname = "eth-hash";
version = "0.2.0";
src = fetchPypi {
inherit pname version;
sha256 = "0xpiz0wrxxj11ki9yapvsibl25qnki90bl3d39nqascg14nw17a9";
};
checkInputs = [ pytest ];
propagatedBuildInputs = [ pysha3 pycrypto pycryptodome ];
# setuptools-markdown uses pypandoc which is broken at the moment
preConfigure = ''
substituteInPlace setup.py --replace \'setuptools-markdown\' ""
'';
# Run tests separately because we don't want to run tests on tests/backends/
# but only on its selected subdirectories. Also, the directories under
# tests/backends/ must be run separately because they have identically named
# test files so pytest would raise errors because of that.
#
# Also, tests in tests/core/test_import.py are broken so just ignore them:
# https://github.com/ethereum/eth-hash/issues/25
# There is a pull request to fix the tests:
# https://github.com/ethereum/eth-hash/pull/26
checkPhase = ''
pytest tests/backends/pycryptodome/
pytest tests/backends/pysha3/
# pytest tests/core/
'';
disabled = pythonOlder "3.5";
meta = {
description = "The Ethereum hashing function keccak256";
homepage = https://github.com/ethereum/eth-hash;
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ jluttine ];
};
}

View File

@@ -0,0 +1,35 @@
{ lib, fetchFromGitHub, buildPythonPackage, pythonOlder, pytest }:
buildPythonPackage rec {
pname = "eth-typing";
version = "1.3.0";
# Tests are missing from the PyPI source tarball so let's use GitHub
# https://github.com/ethereum/eth-typing/issues/8
src = fetchFromGitHub {
owner = "ethereum";
repo = pname;
rev = "v${version}";
sha256 = "0703z7vlsfa3dvgcq22f9rzmj0svyp2a8wc7h73d0aac28ydhpv9";
};
# setuptools-markdown uses pypandoc which is broken at the moment
preConfigure = ''
substituteInPlace setup.py --replace \'setuptools-markdown\' ""
'';
disabled = pythonOlder "3.5";
checkInputs = [ pytest ];
checkPhase = ''
pytest .
'';
meta = {
description = "Common type annotations for Ethereum Python packages";
homepage = https://github.com/ethereum/eth-typing;
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ jluttine ];
};
}

View File

@@ -0,0 +1,35 @@
{ lib, fetchFromGitHub, buildPythonPackage, pytest, eth-hash, eth-typing,
cytoolz, hypothesis }:
buildPythonPackage rec {
pname = "eth-utils";
version = "1.2.1";
# Tests are missing from the PyPI source tarball so let's use GitHub
# https://github.com/ethereum/eth-utils/issues/130
src = fetchFromGitHub {
owner = "ethereum";
repo = pname;
rev = "v${version}";
sha256 = "0g8f5vdjh7qd8kgsqqd9qkm6m79rx3w9yp0rf9vpdsv3xfzrkh1w";
};
checkInputs = [ pytest hypothesis ];
propagatedBuildInputs = [ eth-hash eth-typing cytoolz ];
# setuptools-markdown uses pypandoc which is broken at the moment
preConfigure = ''
substituteInPlace setup.py --replace \'setuptools-markdown\' ""
'';
checkPhase = ''
pytest .
'';
meta = {
description = "Common utility functions for codebases which interact with ethereum";
homepage = https://github.com/ethereum/eth-utils;
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ jluttine ];
};
}

View File

@@ -1,5 +1,5 @@
{ stdenv, buildPythonPackage, fetchPypi, flask, jinja2, itsdangerous, events
, markupsafe, pymongo, flask-pymongo, werkzeug, simplejson, cerberus }:
{ stdenv, buildPythonPackage, fetchPypi, flask, events
, pymongo, simplejson, cerberus }:
buildPythonPackage rec {
pname = "Eve";
@@ -13,14 +13,9 @@ buildPythonPackage rec {
propagatedBuildInputs = [
cerberus
events
flask-pymongo
flask
itsdangerous
jinja2
markupsafe
pymongo
simplejson
werkzeug
];
# tests call a running mongodb instance

View File

@@ -12,6 +12,8 @@ buildPythonPackage rec {
sha256 = "a156129f0904cb7eb24aa0745b6075da54f2c31db168ed3bcac8a4bd716d77b2";
};
CXXFLAGS = stdenv.lib.optionalString stdenv.cc.isClang "-std=c++11";
buildInputs = [
gdal
];

View File

@@ -1,16 +1,27 @@
{ stdenv, buildPythonPackage, fetchPypi
{ stdenv, buildPythonPackage, isPy3k, fetchFromGitHub, fetchpatch
, flask, flask_wtf, flask_testing, ldap
, mock, nose }:
buildPythonPackage rec {
pname = "flask-ldap-login";
version = "0.3.0";
version = "0.3.4";
disabled = isPy3k;
src = fetchPypi {
inherit pname version;
sha256 = "085rik7q8xrp5g95346p6jcp9m2yr8kamwb2kbiw4q0b0fpnnlgq";
src = fetchFromGitHub {
owner = "ContinuumIO";
repo = "flask-ldap-login";
rev = version;
sha256 = "1l6zahqhwn5g9fmhlvjv80288b5h2fk5mssp7amdkw5ysk570wzp";
};
patches = [
# Fix flask_wtf>=0.9.0 incompatibility. See https://github.com/ContinuumIO/flask-ldap-login/issues/41
(fetchpatch {
url = https://github.com/ContinuumIO/flask-ldap-login/commit/ed08c03c818dc63b97b01e2e7c56862eaa6daa43.patch;
sha256 = "19pkhbldk8jq6m10kdylvjf1c8m84fvvj04v5qda4cjyks15aq48";
})
];
checkInputs = [ nose mock flask_testing ];
propagatedBuildInputs = [ flask flask_wtf ldap ];

View File

@@ -0,0 +1,25 @@
{ stdenv, buildPythonPackage, fetchPypi, pkgconfig, fuse }:
buildPythonPackage rec {
pname = "fuse-python";
version = "0.3.1";
src = fetchPypi {
inherit pname version;
sha256 = "0p1f01gah1y8skirrwsbxapz3g6drqihnkjh27b45ifg43h45g7x";
};
buildInputs = [ fuse ];
nativeBuildInputs = [ pkgconfig ];
# no tests in the Pypi archive
doCheck = false;
meta = with stdenv.lib; {
description = "Python bindings for FUSE";
homepage = https://github.com/libfuse/python-fuse;
license = licenses.lgpl21;
maintainers = with maintainers; [ psyanticy ];
};
}

View File

@@ -19,6 +19,6 @@ buildPythonPackage {
meta = {
description = "GMP or MPIR interface to Python 2.4+ and 3.x";
homepage = http://code.google.com/p/gmpy/;
homepage = https://github.com/aleaxit/gmpy/;
};
}

View File

@@ -19,7 +19,7 @@ buildPythonPackage {
meta = with stdenv.lib; {
description = "GMP/MPIR, MPFR, and MPC interface to Python 2.6+ and 3.x";
homepage = http://code.google.com/p/gmpy/;
homepage = https://github.com/aleaxit/gmpy/;
license = licenses.gpl3Plus;
};
}

View File

@@ -1,29 +1,36 @@
{ lib
, buildPythonPackage
, fetchPypi
, fetchFromGitHub
, sphinx
, numpydoc
, pytest
, python-lz4
}:
buildPythonPackage rec {
pname = "joblib";
version = "0.12.3";
src = fetchPypi {
inherit pname version;
sha256 = "333b9bf16ff015d6b56bf80b9831afdd243443cb84c7ff7b6e342f117e354c42";
version = "0.12.4";
# get full repository inorder to run tests
src = fetchFromGitHub {
owner = "joblib";
repo = pname;
rev = version;
sha256 = "06zszgp7wpa4jr554wkk6kkigp4k9n5ad5h08i6w9qih963rlimb";
};
checkInputs = [ sphinx numpydoc pytest ];
propagatedBuildInputs = [ python-lz4 ];
checkPhase = ''
py.test -k 'not test_disk_used and not test_nested_parallel_warnings' joblib/test
py.test joblib
'';
meta = {
description = "Lightweight pipelining: using Python functions as pipeline jobs";
homepage = https://pythonhosted.org/joblib/;
license = lib.licenses.bsd3;
maintainers = with lib.maintainers; [ costrouc ];
};
}

View File

@@ -1,5 +1,5 @@
{ stdenv, fetchPypi, buildPythonPackage, hidapi
, pycrypto, pillow, protobuf, future, ecpy
, pycrypto, pillow, protobuf, future, ecpy, python-u2flib-host, pycryptodomex
}:
buildPythonPackage rec {
@@ -11,7 +11,12 @@ buildPythonPackage rec {
sha256 = "3969b3c375c0f3fb60ff1645621ebf2f39fb697a53851620705f27ed7b283097";
};
buildInputs = [ hidapi pycrypto pillow protobuf future ecpy ];
propagatedBuildInputs = [
hidapi pycrypto pillow protobuf future ecpy python-u2flib-host pycryptodomex
];
# No tests
doCheck = false;
meta = with stdenv.lib; {
description = "Python library to communicate with Ledger Blue/Nano S";

View File

@@ -1,6 +1,6 @@
{ stdenv, fetchPypi, buildPythonPackage, ed25519, ecdsa
, semver, keepkey, trezor, mnemonic, ledgerblue, unidecode, mock, pytest
}:
{ stdenv, fetchPypi, buildPythonPackage, ed25519, ecdsa , semver, mnemonic,
unidecode, mock, pytest , backports-shutil-which, ConfigArgParse,
pythondaemon, pymsgbox }:
buildPythonPackage rec {
pname = "libagent";
@@ -11,12 +11,8 @@ buildPythonPackage rec {
sha256 = "55af1ad2a6c95aef1fc5588c2002c9e54edbb14e248776b64d00628235ceda3e";
};
buildInputs = [
ed25519 ecdsa semver keepkey
trezor mnemonic ledgerblue
];
propagatedBuildInputs = [ unidecode ];
propagatedBuildInputs = [ unidecode backports-shutil-which ConfigArgParse
pythondaemon pymsgbox ecdsa ed25519 mnemonic semver ];
checkInputs = [ mock pytest ];

View File

@@ -14,8 +14,9 @@ buildPythonPackage rec {
buildInputs = [ pytest ];
propagatedBuildInputs = [ libsodium ];
postPatch = ''
substituteInPlace "./libnacl/__init__.py" --replace "ctypes.cdll.LoadLibrary('libsodium.so')" "ctypes.cdll.LoadLibrary('${libsodium}/lib/libsodium.so')"
postPatch =
let soext = stdenv.hostPlatform.extensions.sharedLibrary; in ''
substituteInPlace "./libnacl/__init__.py" --replace "ctypes.cdll.LoadLibrary('libsodium${soext}')" "ctypes.cdll.LoadLibrary('${libsodium}/lib/libsodium${soext}')"
'';
checkPhase = ''
@@ -27,6 +28,6 @@ buildPythonPackage rec {
description = "Python bindings for libsodium based on ctypes";
homepage = https://pypi.python.org/pypi/libnacl;
license = licenses.asl20;
platforms = platforms.linux;
platforms = platforms.unix;
};
}

View File

@@ -1,4 +1,4 @@
{ stdenv, lib, buildPythonPackage, fetchPypi, python, libusb1 }:
{ stdenv, lib, buildPythonPackage, fetchPypi, python, libusb1, pytest }:
buildPythonPackage rec {
pname = "libusb1";
@@ -9,7 +9,7 @@ buildPythonPackage rec {
sha256 = "a49917a2262cf7134396f6720c8be011f14aabfc5cdc53f880cc672c0f39d271";
};
postPatch = lib.optionalString stdenv.isLinux ''
postPatch = ''
substituteInPlace usb1/libusb1.py --replace \
"ctypes.util.find_library(base_name)" \
"'${libusb1}/lib/libusb-1.0${stdenv.hostPlatform.extensions.sharedLibrary}'"
@@ -17,8 +17,12 @@ buildPythonPackage rec {
buildInputs = [ libusb1 ];
checkInputs = [ pytest ];
checkPhase = ''
${python.interpreter} -m usb1.testUSB1
# USBPollerThread is unreliable. Let's not test it.
# See: https://github.com/vpelletier/python-libusb1/issues/16
py.test -k 'not testUSBPollerThreadExit' usb1/testUSB1.py
'';
meta = with stdenv.lib; {

View File

@@ -0,0 +1,33 @@
{ buildPythonPackage, fetchFromGitHub, nose, pillow, scipy, numpy, imread, stdenv }:
buildPythonPackage rec {
pname = "mahotas";
version = "1.4.2";
src = fetchFromGitHub {
owner = "luispedro";
repo = "mahotas";
rev = "v${version}";
sha256 = "1d2hciag5sxw00qj7qz7lbna477ifzmpgl0cv3xqzjkhkn5m4d7r";
};
# remove this as soon as https://github.com/luispedro/mahotas/issues/97 is fixed
patches = [ ./disable-impure-tests.patch ];
propagatedBuildInputs = [ numpy imread pillow scipy ];
checkInputs = [ nose ];
checkPhase= ''
python setup.py test
'';
disabled = stdenv.isi686; # Failing tests
meta = with stdenv.lib; {
description = "Computer vision package based on numpy";
homepage = http://mahotas.readthedocs.io/;
maintainers = with maintainers; [ luispedro ];
license = licenses.mit;
platforms = platforms.linux;
};
}

View File

@@ -0,0 +1,76 @@
diff --git a/mahotas/tests/test_colors.py b/mahotas/tests/test_colors.py
index 8a8183b..0d34c9f 100644
--- a/mahotas/tests/test_colors.py
+++ b/mahotas/tests/test_colors.py
@@ -2,7 +2,9 @@ import mahotas
import numpy as np
from mahotas.tests.utils import luispedro_jpg
from mahotas.colors import rgb2xyz, rgb2lab, xyz2rgb, rgb2grey, rgb2sepia
+from nose.tools import nottest
+@nottest
def test_colors():
f = luispedro_jpg()
lab = rgb2lab(f)
diff --git a/mahotas/tests/test_features_shape.py b/mahotas/tests/test_features_shape.py
index 462f467..2381793 100644
--- a/mahotas/tests/test_features_shape.py
+++ b/mahotas/tests/test_features_shape.py
@@ -2,6 +2,7 @@ import mahotas.features.shape
import numpy as np
import mahotas as mh
from mahotas.features.shape import roundness, eccentricity
+from nose.tools import nottest
def test_eccentricity():
D = mh.disk(32, 2)
@@ -29,6 +30,7 @@ def test_zeros():
I[8:4:12] = 1
assert eccentricity(I) == 0
+@nottest
def test_ellipse_axes():
Y,X = np.mgrid[:1024,:1024]
Y = Y/1024.
diff --git a/mahotas/tests/test_moments.py b/mahotas/tests/test_moments.py
index 686c7c3..ba3487b 100644
--- a/mahotas/tests/test_moments.py
+++ b/mahotas/tests/test_moments.py
@@ -1,6 +1,7 @@
import numpy as np
import mahotas as mh
from mahotas.features.moments import moments
+from nose.tools import nottest
def _slow(A, p0, p1, cm):
c0,c1 = cm
@@ -28,7 +29,7 @@ def test_against_slow():
yield perform, 1, 2, (0, 0), A
yield perform, 1, 0, (0, 0), A
-
+@nottest
def test_normalize():
A,B = np.meshgrid(np.arange(128),np.arange(128))
for p0,p1 in [(1,1), (1,2), (2,1), (2,2)]:
diff --git a/mahotas/tests/test_texture.py b/mahotas/tests/test_texture.py
index 7e101ba..af1305d 100644
--- a/mahotas/tests/test_texture.py
+++ b/mahotas/tests/test_texture.py
@@ -2,7 +2,7 @@ import numpy as np
from mahotas.features import texture
import mahotas as mh
import mahotas.features._texture
-from nose.tools import raises
+from nose.tools import raises, nottest
def test__cooccurence():
cooccurence = mahotas.features._texture.cooccurence
@@ -149,6 +149,7 @@ def test_float_haralick():
A[2,2]=12
texture.haralick(A)
+@nottest
def test_haralick3d():
np.random.seed(22)
img = mahotas.stretch(255*np.random.rand(20,20,4))

View File

@@ -1,20 +1,21 @@
{ stdenv, fetchPypi, buildPythonPackage, lxml, typed-ast, psutil, isPy3k }:
{ stdenv, fetchPypi, buildPythonPackage, lxml, typed-ast, psutil, isPy3k
,mypy_extensions }:
buildPythonPackage rec {
pname = "mypy";
version = "0.620";
version = "0.630";
# Tests not included in pip package.
doCheck = false;
src = fetchPypi {
inherit pname version;
sha256 = "c770605a579fdd4a014e9f0a34b6c7a36ce69b08100ff728e96e27445cef3b3c";
sha256 = "1p8rnap4ngczfm2q4035mcmn5nsprbljnhksx2jxzxrb9immh137";
};
disabled = !isPy3k;
propagatedBuildInputs = [ lxml typed-ast psutil ];
propagatedBuildInputs = [ lxml typed-ast psutil mypy_extensions ];
meta = with stdenv.lib; {
description = "Optional static typing for Python";

View File

@@ -0,0 +1,23 @@
{ stdenv, fetchPypi, buildPythonPackage, typing, isPy3k }:
buildPythonPackage rec {
pname = "mypy_extensions";
version = "0.4.1";
# Tests not included in pip package.
doCheck = false;
src = fetchPypi {
inherit pname version;
sha256 = "04h8brrbbx151dfa2cvvlnxgmb5wa00mhd2z7nd20s8kyibfkq1p";
};
propagatedBuildInputs = [ typing ];
meta = with stdenv.lib; {
description = "Experimental type system extensions for programs checked with the mypy typechecker";
homepage = "http://www.mypy-lang.org";
license = licenses.mit;
maintainers = with maintainers; [ martingms lnl7 ];
};
}

View File

@@ -11,9 +11,13 @@ buildPythonPackage rec {
sha256 = "5049363eb6da2e7c35589477dfc79bf69929ca66de2d7ed2e9dc07acf78636f4";
};
checkPhase = "nosetests --exclude with_expand_user nilearn/tests";
# disable some failing tests
checkPhase = ''
nosetests nilearn/tests \
-e test_cache_mixin_with_expand_user -e test_clean_confounds -e test_detrend
'';
buildInputs = [ nose ];
checkInputs = [ nose ];
propagatedBuildInputs = [
matplotlib

View File

@@ -0,0 +1,25 @@
{ stdenv, buildPythonPackage, fetchPypi, pytest, psycopg2, click, sqlparse }:
buildPythonPackage rec {
pname = "pgspecial";
version = "1.11.2";
src = fetchPypi {
inherit pname version;
sha256 = "1yq3cmpdcvwsz3nifc0db125433vxbgbpmbhxfj46b9s5k81xs30";
};
buildInputs = [ pytest psycopg2 ];
propagatedBuildInputs = [ click sqlparse ];
checkPhase = ''
find tests -name \*.pyc -delete
py.test tests
'';
meta = with stdenv.lib; {
description = "Meta-commands handler for Postgres Database";
homepage = https://pypi.python.org/pypi/pgspecial;
license = licenses.bsd3;
};
}

View File

@@ -0,0 +1,34 @@
{ stdenv
, buildPythonPackage
, fetchPypi
, slicerator
, scikitimage
, six
, numpy
, tifffile
, pytest
, nose
}:
buildPythonPackage rec {
version = "0.4.1";
pname = "PIMS";
src = fetchPypi {
inherit pname version;
sha256 = "6a53a155e900b44e71127a1e1fccbfbaed7eec3c2b52497c40c23a05f334c9dd";
};
checkInputs = [ nose ];
propagatedBuildInputs = [ slicerator six numpy tifffile scikitimage ];
# not everything packaged with pypi release
doCheck = false;
meta = with stdenv.lib; {
homepage = https://github.com/soft-matter/pims;
description = "Python Image Sequence: Load video and sequential images in many formats with a simple, consistent interface";
license = licenses.bsdOriginal;
maintainers = [ maintainers.costrouc ];
};
}

View File

@@ -0,0 +1,23 @@
{ stdenv, lib, buildPythonPackage, isPyPy, fetchPypi, postgresql, openssl }:
buildPythonPackage rec {
pname = "psycopg2";
version = "2.7.5";
disabled = isPyPy;
src = fetchPypi {
inherit pname version;
sha256 = "17klx964gw8z0znl0raz3by8vdc7cq5gxj4pdcrfcina84nrdkzc";
};
buildInputs = lib.optional stdenv.isDarwin openssl;
propagatedBuildInputs = [ postgresql ];
doCheck = false;
meta = with lib; {
description = "PostgreSQL database adapter for the Python programming language";
license = with licenses; [ gpl2 zpl20 ];
};
}

View File

@@ -1,19 +1,29 @@
{ stdenv, buildPythonPackage, fetchPypi, scipy, ffmpeg-full }:
{ stdenv, buildPythonPackage, fetchFromGitHub, scipy, ffmpeg-full }:
buildPythonPackage rec {
pname = "pydub";
version = "0.22.1";
src = fetchPypi {
inherit pname version;
sha256 = "20beff39e9959a3b2cb4392802aecb9b2417837fff635d2b00b5ef5f5326d313";
# pypi version doesn't include required data files for tests
src = fetchFromGitHub {
owner = "jiaaro";
repo = pname;
rev = "v${version}";
sha256 = "0xqyvzgdfy01p98wnvsrf6iwdfq91ad377r6j12r8svm13ygx5bv";
};
patches = [
./pyaudioop-python3.patch
];
# disable a test that fails on aarch64 due to rounding errors
postPatch = stdenv.lib.optionalString stdenv.isAarch64 ''
substituteInPlace test/test.py \
--replace "test_overlay_with_gain_change" "notest_overlay_with_gain_change"
'';
checkInputs = [ scipy ffmpeg-full ];
checkPhase = ''
python test/test.py
'';
meta = with stdenv.lib; {
description = "Manipulate audio with a simple and easy high level interface.";
homepage = "http://pydub.com/";

View File

@@ -1,46 +0,0 @@
diff --git i/pydub/pyaudioop.py w/pydub/pyaudioop.py
index 8f8f017..aa6bb8c 100644
--- i/pydub/pyaudioop.py
+++ w/pydub/pyaudioop.py
@@ -1,4 +1,4 @@
-import __builtin__
+import builtins
import math
import struct
from fractions import gcd
@@ -79,7 +79,7 @@ def _get_minval(size, signed=True):
def _get_clipfn(size, signed=True):
maxval = _get_maxval(size, signed)
minval = _get_minval(size, signed)
- return lambda val: __builtin__.max(min(val, maxval), minval)
+ return lambda val: builtins.max(min(val, maxval), minval)
def _overflow(val, size, signed=True):
@@ -109,7 +109,7 @@ def max(cp, size):
if len(cp) == 0:
return 0
- return __builtin__.max(abs(sample) for sample in _get_samples(cp, size))
+ return builtins.max(abs(sample) for sample in _get_samples(cp, size))
def minmax(cp, size):
@@ -117,8 +117,8 @@ def minmax(cp, size):
max_sample, min_sample = 0, 0
for sample in _get_samples(cp, size):
- max_sample = __builtin__.max(sample, max_sample)
- min_sample = __builtin__.min(sample, min_sample)
+ max_sample = builtins.max(sample, max_sample)
+ min_sample = builtins.min(sample, min_sample)
return min_sample, max_sample
@@ -542,4 +542,4 @@ def lin2adpcm(cp, size, state):
def adpcm2lin(cp, size, state):
- raise NotImplementedError()
\ No newline at end of file
+ raise NotImplementedError()

View File

@@ -1,7 +1,7 @@
{ stdenv, buildPythonPackage, fetchFromGitHub, python, pytest, glibcLocales }:
buildPythonPackage rec {
version = "3.4.1";
version = "3.4.3";
pname = "pyfakefs";
# no tests in PyPI tarball
@@ -10,22 +10,30 @@ buildPythonPackage rec {
owner = "jmcgeheeiv";
repo = pname;
rev = "v${version}";
sha256 = "0i8kq7sl8bczr927hllgfhsmirjqjh89c9184kcqmprc13ac4kxy";
sha256 = "0rhbkcb5h2x8kmyxivr5jr1db2xvmpjdbsfjxl142qhfb29hr2hp";
};
postPatch = ''
# test doesn't work in sandbox
substituteInPlace tests/fake_filesystem_test.py \
substituteInPlace pyfakefs/tests/fake_filesystem_test.py \
--replace "test_expand_root" "notest_expand_root"
substituteInPlace tests/fake_os_test.py \
--replace "test_append_mode" "notest_append_mode"
'';
substituteInPlace pyfakefs/tests/fake_os_test.py \
--replace "test_path_links_not_resolved" "notest_path_links_not_resolved" \
--replace "test_append_mode_tell_linux_windows" "notest_append_mode_tell_linux_windows"
substituteInPlace pyfakefs/tests/fake_filesystem_unittest_test.py \
--replace "test_copy_real_file" "notest_copy_real_file"
'' + (stdenv.lib.optionalString stdenv.isDarwin ''
# this test fails on darwin due to case-insensitive file system
substituteInPlace pyfakefs/tests/fake_os_test.py \
--replace "test_rename_dir_to_existing_dir" "notest_rename_dir_to_existing_dir"
'');
checkInputs = [ pytest glibcLocales ];
checkPhase = ''
LC_ALL=en_US.UTF-8 ${python.interpreter} -m tests.all_tests
py.test tests/pytest_plugin_test.py
export LC_ALL=en_US.UTF-8
${python.interpreter} -m pyfakefs.tests.all_tests
${python.interpreter} -m pytest pyfakefs/tests/pytest_plugin_test.py
'';
meta = with stdenv.lib; {

View File

@@ -0,0 +1,26 @@
{ lib, fetchPypi, buildPythonPackage
, lxml, pycryptodome, construct
, argon2_cffi, dateutil, enum34
}:
buildPythonPackage rec {
pname = "pykeepass";
version = "3.0.2";
src = fetchPypi {
inherit pname version;
sha256 = "1kfnh42nimsbdpwpny2c9df82b2n4fb5fagh54ck06f3x483vd90";
};
propagatedBuildInputs = [
lxml pycryptodome construct
argon2_cffi dateutil enum34
];
meta = {
homepage = https://github.com/pschmitt/pykeepass;
description = "Python library to interact with keepass databases (supports KDBX3 and KDBX4)";
license = lib.licenses.gpl3;
};
}

View File

@@ -0,0 +1,24 @@
{ stdenv, fetchPypi, buildPythonPackage, tkinter }:
buildPythonPackage rec {
pname = "PyMsgBox";
version = "1.0.6";
src = fetchPypi {
inherit pname version;
sha256 = "0kmd00w7p6maiyqpqqb2j8m6v2gh9c0h5i198pa02bc1c1m1321q";
extension = "zip";
};
propagatedBuildInputs = [ tkinter ];
# Finding tests fails
doCheck = false;
meta = with stdenv.lib; {
description = "A simple, cross-platform, pure Python module for JavaScript-like message boxes";
homepage = https://github.com/asweigart/PyMsgBox;
license = licenses.bsd3;
maintainers = with maintainers; [ jluttine ];
};
}

View File

@@ -1,4 +1,4 @@
{ stdenv, buildPythonPackage, fetchPypi, isPyPy, libiodbc }:
{ stdenv, buildPythonPackage, fetchPypi, isPyPy, unixODBC }:
buildPythonPackage rec {
pname = "pyodbc";
@@ -10,7 +10,9 @@ buildPythonPackage rec {
sha256 = "4326abb737dec36156998d52324921673d30f575e1e0998f0c5edd7de20e61d4";
};
buildInputs = [ libiodbc ];
buildInputs = [ unixODBC ];
doCheck = false; # tests require a database server
meta = with stdenv.lib; {
description = "Python ODBC module to connect to almost any database";

View File

@@ -1,4 +1,4 @@
{ lib, buildPythonPackage, fetchPypi, requests }:
{ lib, buildPythonPackage, fetchPypi, requests, geojson }:
buildPythonPackage rec {
pname = "pyowm";
@@ -9,11 +9,13 @@ buildPythonPackage rec {
sha256 = "ed175873823a2fedb48e453505c974ca39f3f75006ef1af54fdbcf72e6796849";
};
propagatedBuildInputs = [ requests ];
propagatedBuildInputs = [ requests geojson ];
# This may actually break the package.
postPatch = ''
substituteInPlace setup.py --replace "requests>=2.18.2,<2.19" "requests"
substituteInPlace setup.py \
--replace "requests>=2.18.2,<2.19" "requests" \
--replace "geojson>=2.3.0,<2.4" "geojson<2.5,>=2.3.0"
'';
# No tests in archive

View File

@@ -0,0 +1,26 @@
{ lib, fetchPypi, buildPythonPackage
, requests, chardet, cssselect, lxml
, pytest
}:
buildPythonPackage rec {
pname = "PyReadability";
version = "0.4.0";
src = fetchPypi {
inherit pname version;
sha256 = "1k6fq416pdmjcdqh6gdxl0y0k8kj1zlpzwp5574xsvsha18p2zpn";
};
propagatedBuildInputs = [ requests chardet cssselect lxml ];
# ModuleNotFoundError: No module named 'tests'
doCheck = false;
meta = {
homepage = https://github.com/hyperlinkapp/python-readability;
description = "fast python port of arc90's readability tool, updated to match latest readability.js!";
license = lib.licenses.asl20;
};
}

View File

@@ -2,13 +2,13 @@
buildPythonPackage rec {
pname = "pyslurm";
version = "20180811";
version = "20180908";
src = fetchFromGitHub {
repo = "pyslurm";
owner = "PySlurm";
rev = "2d4f0553de971309b7e465d4d64528b8a5fafb05";
sha256 = "1cy57gyvvmzx0c8fx4h6p8dgan0ay6pdivdf24k1xiancjnw20xr";
rev = "50dc113e99d82e70e84fc2e812333733708be4ed";
sha256 = "1j2i4rvhmk2ihhcvsjdlqlxqb5a05jg8k9bqkv3zrvdj71yn4z9k";
};
buildInputs = [ cython slurm ];

View File

@@ -0,0 +1,34 @@
{ lib
, buildPythonPackage
, fetchPypi
, setuptools_scm
, pytest
, pytest-mock
, pythonOlder
, faulthandler
}:
buildPythonPackage rec {
pname = "pytest-faulthandler";
version = "1.5.0";
src = fetchPypi {
inherit pname version;
sha256 = "bf8634c3fd6309ef786ec03b913a5366163fdb094ebcfdebc35626400d790e0d";
};
buildInputs = [ setuptools_scm pytest ];
checkInputs = [ pytest-mock ];
propagatedBuildInputs = lib.optional (pythonOlder "3.0") faulthandler;
checkPhase = ''
py.test
'';
meta = {
description = "Py.test plugin that activates the fault handler module for tests";
homepage = https://github.com/pytest-dev/pytest-faulthandler;
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ costrouc ];
};
}

View File

@@ -1,5 +1,5 @@
{ stdenv, buildPythonPackage, fetchPypi
, pytestpep8, pytest, pyflakes, pytestcache }:
, pytestpep8, pytest, pyflakes }:
buildPythonPackage rec {
pname = "pytest-flakes";
@@ -11,10 +11,11 @@ buildPythonPackage rec {
};
buildInputs = [ pytestpep8 pytest ];
propagatedBuildInputs = [ pyflakes pytestcache ];
propagatedBuildInputs = [ pyflakes ];
# disable one test case that looks broken
checkPhase = ''
py.test test_flakes.py
py.test test_flakes.py -k 'not test_syntax_error'
'';
meta = with stdenv.lib; {

View File

@@ -0,0 +1,29 @@
{ lib
, buildPythonPackage
, fetchPypi
, setuptools_scm
, pytest
}:
buildPythonPackage rec {
pname = "pytest-repeat";
version = "0.6.0";
src = fetchPypi {
inherit pname version;
sha256 = "84aba2fcca5dc2f32ae626a01708f469f17b3384ec3d1f507698077f274909d6";
};
buildInputs = [ setuptools_scm pytest ];
checkPhase = ''
py.test
'';
meta = {
description = "Pytest plugin for repeating tests";
homepage = https://github.com/pytest-dev/pytest-repeat;
maintainers = with lib.maintainers; [ costrouc ];
license = lib.licenses.mpl20;
};
}

View File

@@ -9,10 +9,13 @@ buildPythonPackage rec {
sha256 = "be6bf93ed618c8899aeb6721c24f8009c769879a3b4931e05650f3c173ec17c5";
};
checkInputs = [ pytest mock ];
checkInputs = [ mock ];
propagatedBuildInputs = [ pytest ];
# disable tests that fail with pytest 3.7.4
checkPhase = ''
py.test
py.test test_pytest_rerunfailures.py -k 'not test_reruns_with_delay'
'';
meta = with stdenv.lib; {

View File

@@ -1,5 +1,6 @@
{ buildPythonPackage
, fetchPypi
, fetchpatch
, lib
, pexpect
, pytest
@@ -13,7 +14,7 @@ buildPythonPackage rec {
inherit pname version;
sha256 = "1117fc0536e1638862917efbdc0895e6b62fa61e6cf4f39bb655686af7af9627";
};
buildInputs = [ pytest ];
checkInputs = [ pytest pexpect ];
checkPhase = ''pytest -ra'';
@@ -21,6 +22,6 @@ buildPythonPackage rec {
description = "py.test plugin to abort hanging tests";
homepage = https://bitbucket.org/pytest-dev/pytest-timeout/;
license = licenses.mit;
maintainers = with maintainers; [ makefu ];
maintainers = with maintainers; [ makefu costrouc ];
};
}

View File

@@ -1,27 +0,0 @@
{ lib
, pkgconfig
, fetchurl
, fuse
, buildPythonPackage
, isPy3k
}:
buildPythonPackage rec {
pname = "fuse";
version = "0.2.1";
disabled = isPy3k;
src = fetchurl {
url = "mirror://sourceforge/fuse/fuse-python-${version}.tar.gz";
sha256 = "06rmp1ap6flh64m81j0n3a357ij2vj9zwcvvw0p31y6hz1id9shi";
};
nativeBuildInputs = [ pkgconfig ];
buildInputs = [ fuse ];
meta = {
description = "Python bindings for FUSE";
license = lib.licenses.lgpl21;
};
}

View File

@@ -0,0 +1,34 @@
{ stdenv, buildPythonPackage, fetchFromGitHub, pythonOlder
, pytest, mock, pytestcov, coverage
, future, futures
}:
buildPythonPackage rec {
pname = "python-jsonrpc-server";
version = "0.0.1";
src = fetchFromGitHub {
owner = "palantir";
repo = "python-jsonrpc-server";
rev = version;
sha256 = "0p5dj1hxx3yz8vjk59dcp3h6ci1hrjkbzf9lr3vviy0xw327409k";
};
checkInputs = [
pytest mock pytestcov coverage
];
checkPhase = ''
pytest
'';
propagatedBuildInputs = [ future ]
++ stdenv.lib.optional (pythonOlder "3.2") futures;
meta = with stdenv.lib; {
homepage = https://github.com/palantir/python-jsonrpc-server;
description = "A Python 2 and 3 asynchronous JSON RPC server";
license = licenses.mit;
maintainers = [ maintainers.mic92 ];
};
}

View File

@@ -1,5 +1,5 @@
{ stdenv, buildPythonPackage, fetchFromGitHub, pythonOlder, isPy27
, configparser, futures, future, jedi, pluggy
, configparser, futures, future, jedi, pluggy, python-jsonrpc-server
, pytest, mock, pytestcov, coverage
, # Allow building a limited set of providers, e.g. ["pycodestyle"].
providers ? ["*"]
@@ -20,13 +20,13 @@ in
buildPythonPackage rec {
pname = "python-language-server";
version = "0.19.0";
version = "0.21.2";
src = fetchFromGitHub {
owner = "palantir";
repo = "python-language-server";
rev = version;
sha256 = "0glnhnjmsnnh1vs73n9dglknfkhcgp03nkjbpz0phh1jlqrkrwm6";
sha256 = "11fvrpv1kymj2fzh8fhys4qk1xc64j1rbdrz252awyab7b3509i7";
};
# The tests require all the providers, disable otherwise.
@@ -43,7 +43,7 @@ buildPythonPackage rec {
HOME=$TEMPDIR pytest
'';
propagatedBuildInputs = [ jedi pluggy future ]
propagatedBuildInputs = [ jedi pluggy future python-jsonrpc-server ]
++ stdenv.lib.optional (withProvider "autopep8") autopep8
++ stdenv.lib.optional (withProvider "mccabe") mccabe
++ stdenv.lib.optional (withProvider "pycodestyle") pycodestyle

View File

@@ -0,0 +1,40 @@
{ lib
, buildPythonPackage
, fetchFromGitHub
, pytestrunner
, pytest
, psutil
, setuptools_scm
, pkgconfig
, isPy3k
, future
}:
buildPythonPackage rec {
pname = "python-lz4";
version = "2.1.0";
# get full repository inorder to run tests
src = fetchFromGitHub {
owner = pname;
repo = pname;
rev = "v${version}";
sha256 = "1vjfplj37jcw1mf8l810dv76dx0raia3ylgyfy7sfsb3g17brjq6";
};
buildInputs = [ setuptools_scm pkgconfig pytestrunner ];
checkInputs = [ pytest psutil ];
propagatedBuildInputs = lib.optionals (!isPy3k) [ future ];
# give a hint to setuptools_scm on package version
preBuild = ''
export SETUPTOOLS_SCM_PRETEND_VERSION="v${version}"
'';
meta = {
description = "LZ4 Bindings for Python";
homepage = https://github.com/python-lz4/python-lz4;
license = lib.licenses.bsd0;
maintainers = with lib.maintainers; [ costrouc ];
};
}

View File

@@ -0,0 +1,23 @@
{ stdenv, fetchPypi, buildPythonPackage, requests, hidapi }:
buildPythonPackage rec {
pname = "python-u2flib-host";
version = "3.0.3";
src = fetchPypi {
inherit pname version;
sha256 = "02pwafd5kyjpc310ys0pgnd0adff1laz18naxxwsfrllqafqnrxb";
};
propagatedBuildInputs = [ requests hidapi ];
# Tests fail: "ValueError: underlying buffer has been detached"
doCheck = false;
meta = with stdenv.lib; {
description = "Python based U2F host library";
homepage = https://github.com/Yubico/python-u2flib-host;
license = licenses.bsd2;
maintainers = with maintainers; [ jluttine ];
};
}

View File

@@ -27,7 +27,8 @@ buildPythonPackage rec {
];
checkPhase = ''
py.test
# disable one failing test case
py.test -k "not test_invalid_link"
'';
meta = {

View File

@@ -0,0 +1,20 @@
{ lib, fetchPypi, buildPythonPackage, requests, six }:
buildPythonPackage rec {
pname = "requests-file";
version = "1.4.3";
src = fetchPypi {
inherit pname version;
sha256 = "1yp2jaxg3v86pia0q512dg3hz6s9y5vzdivsgrba1kds05ial14g";
};
propagatedBuildInputs = [ requests six ];
meta = {
homepage = https://github.com/dashea/requests-file;
description = "Transport adapter for fetching file:// URLs with the requests python library";
license = lib.licenses.asl20;
};
}

View File

@@ -1,6 +1,7 @@
{ lib
, buildPythonPackage
, fetchPypi
, fetchpatch
, docutils
, readme_renderer
, pygments
@@ -19,6 +20,15 @@ buildPythonPackage rec {
propagatedBuildInputs = [ docutils readme_renderer pygments ];
checkInputs = [ mock ];
patches = [
# fix tests after readme_renderer update
# TODO remove on next update
(fetchpatch {
url = "https://github.com/mgedmin/restview/commit/541743ded13ae55dea4c437046984a5f13d06e8b.patch";
sha256 = "031b1dlqx346bz7afpc011lslnq771lnxb6iy1l2285pph534bci";
})
];
postPatch = ''
# dict order breaking tests
sed -i 's@<a href="http://www.example.com" rel="nofollow">@...@' src/restview/tests.py

View File

@@ -1,4 +1,4 @@
{ lib, fetchPypi, buildPythonPackage, pytest }:
{ lib, fetchPypi, buildPythonPackage, pytest, hypothesis, eth-utils }:
buildPythonPackage rec {
pname = "rlp";
@@ -9,8 +9,18 @@ buildPythonPackage rec {
sha256 = "040fb5172fa23d27953a886c40cac989fc031d0629db934b5a9edcd2fb28df1e";
};
checkInputs = [ pytest ];
propagatedBuildInputs = [ ];
checkInputs = [ pytest hypothesis ];
propagatedBuildInputs = [ eth-utils ];
# setuptools-markdown uses pypandoc which is broken at the moment
preConfigure = ''
substituteInPlace setup.py --replace \'setuptools-markdown\' ""
substituteInPlace setup.py --replace "long_description_markdown_filename='README.md'," ""
'';
checkPhase = ''
pytest .
'';
meta = {
description = "A package for encoding and decoding data in and from Recursive Length Prefix notation";

View File

@@ -0,0 +1,32 @@
{ stdenv
, buildPythonPackage
, fetchPypi
, python
, six
}:
buildPythonPackage rec {
version = "0.9.8";
pname = "slicerator";
src = fetchPypi {
inherit pname version;
sha256 = "b91dd76a415fd8872185cbd6fbf1922fe174359053d4694983fc719e4a0f5667";
};
propagatedBuildInputs = [ six ];
checkPhase = ''
${python.interpreter} run_tests.py
'';
# run_tests.py not packaged with pypi release
doCheck = false;
meta = with stdenv.lib; {
homepage = http://github.com/soft-matter/slicerator;
description = "A lazy-loading, fancy-sliceable iterable";
license = licenses.bsdOriginal;
maintainers = [ maintainers.costrouc ];
};
}

View File

@@ -1,5 +1,5 @@
{ lib, stdenv, fetchPypi, buildPythonPackage, isPy27, pythonOlder
, numpy, nose, enum34, futures }:
, numpy, nose, enum34, futures, pathlib }:
buildPythonPackage rec {
pname = "tifffile";
@@ -16,7 +16,7 @@ buildPythonPackage rec {
'';
propagatedBuildInputs = [ numpy ]
++ lib.optional isPy27 futures
++ lib.optional isPy27 [ futures pathlib ]
++ lib.optional (pythonOlder "3.0") enum34;
meta = with stdenv.lib; {

View File

@@ -0,0 +1,24 @@
{ lib, fetchPypi, buildPythonPackage
, requests, requests-file, idna, pytest
, responses
}:
buildPythonPackage rec {
pname = "tldextract";
version = "2.2.0";
src = fetchPypi {
inherit pname version;
sha256 = "1d5s8v6kpsgazyahflhji1cfdcf89rv7l7z55v774bhzvcjp2y99";
};
propagatedBuildInputs = [ requests requests-file idna ];
checkInputs = [ pytest responses ];
meta = {
homepage = https://github.com/john-kurkowski/tldextract;
description = "Accurately separate the TLD from the registered domain and subdomains of a URL, using the Public Suffix List.";
license = lib.licenses.bsd3;
};
}

View File

@@ -8,12 +8,25 @@
, singledispatch
, pythonOlder
, futures
, version ? "5.1"
}:
let
versionMap = {
"4.5.3" = {
sha256 = "02jzd23l4r6fswmwxaica9ldlyc2p6q8dk6dyff7j58fmdzf853d";
};
"5.1" = {
sha256 = "4f66a2172cb947387193ca4c2c3e19131f1c70fa8be470ddbbd9317fd0801582";
};
};
in
with versionMap.${version};
buildPythonPackage rec {
pname = "tornado";
version = "5.1";
inherit version;
propagatedBuildInputs = [ backports_abc certifi singledispatch ]
++ lib.optional (pythonOlder "3.5") backports_ssl_match_hostname
@@ -26,8 +39,7 @@ buildPythonPackage rec {
'';
src = fetchPypi {
inherit pname version;
sha256 = "4f66a2172cb947387193ca4c2c3e19131f1c70fa8be470ddbbd9317fd0801582";
inherit pname sha256 version;
};
meta = {

View File

@@ -15,7 +15,7 @@ buildPythonPackage rec {
propagatedBuildInputs = [ pycurl ];
meta = with stdenv.lib; {
homepage = "urlgrabber.baseurl.org";
homepage = http://urlgrabber.baseurl.org;
license = licenses.lgpl2Plus;
description = "Python module for downloading files";
maintainers = with maintainers; [ qknight ];

View File

@@ -15,6 +15,13 @@ buildPythonPackage rec {
sha256 = "1niglalkp7pinibzbxjdz9mxx9qmwkrh8884dag3kr72cfkrpp09";
};
# Upstream requires jellyfish==0.5.6 but we have 0.6.1
postPatch = ''
substituteInPlace setup.py --replace "jellyfish==" "jellyfish>="
'';
doCheck = false; # pypi version doesn't include tests
meta = {
description = "A package for easily working with US and state metadata";
longDescription = ''

View File

@@ -6,27 +6,28 @@
, msgpack
, mecab-python3
, jieba
, nose
, pytest
, pythonOlder
, fetchFromGitHub
}:
buildPythonPackage rec {
pname = "wordfreq";
version = "2.0";
version = "2.2.0";
src = fetchFromGitHub {
owner = "LuminosoInsight";
repo = "wordfreq";
rev = "e3a1b470d9f8e0d82e9f179ffc41abba434b823b";
sha256 = "1wjkhhj7nxfnrghwvmvwc672s30lp4b7yr98gxdxgqcq6wdshxwv";
# upstream don't tag by version
rev = "bc12599010c8181a725ec97d0b3990758a48da36";
sha256 = "195794vkzq5wsq3mg1dgfhlnz2f7vi1xajlifq6wkg4lzwyq262m";
};
checkInputs = [ nose ];
checkInputs = [ pytest ];
checkPhase = ''
# These languages require additional dictionaries
nosetests -e test_japanese -e test_korean -e test_languages
pytest tests -k 'not test_japanese and not test_korean and not test_languages and not test_french_and_related'
'';
propagatedBuildInputs = [ regex langcodes ftfy msgpack mecab-python3 jieba ];

View File

@@ -4,7 +4,6 @@
, zope_testrunner
, transaction
, six
, wheel
, zope_interface
, zodbpickle
, zconfig
@@ -24,15 +23,16 @@ buildPythonPackage rec {
};
patches = [
./ZODB-5.3.0-fix-tests.patch
./ZODB-5.3.0-fix-tests.patch # still needeed with 5.4.0
# Upstream patch to fix tests with persistent 4.4,
# cannot fetchpatch because only one hunk of the upstream commit applies.
# TODO remove on next release
./fix-tests-with-persistent-4.4.patch
];
propagatedBuildInputs = [
manuel
transaction
zope_testrunner
six
wheel
zope_interface
zodbpickle
zconfig
@@ -41,6 +41,11 @@ buildPythonPackage rec {
BTrees
];
checkInputs = [
manuel
zope_testrunner
];
meta = with stdenv.lib; {
description = "Zope Object Database: object database and persistence";
homepage = https://pypi.python.org/pypi/ZODB;

View File

@@ -0,0 +1,26 @@
From 2d0ae7199501795617a82a32bafe19b4b5ae89c3 Mon Sep 17 00:00:00 2001
From: Jason Madden <jamadden@gmail.com>
Date: Wed, 22 Aug 2018 10:43:19 -0500
Subject: [PATCH] Fix tests with, and depend on, persistent 4.4.
Fixes #213.
---
src/ZODB/tests/util.py | 5 +++++
3 files changed, 9 insertions(+), 3 deletions(-)
diff --git a/src/ZODB/tests/util.py b/src/ZODB/tests/util.py
index 4ffde92c1..e9bf547fa 100644
--- a/src/ZODB/tests/util.py
+++ b/src/ZODB/tests/util.py
@@ -37,6 +37,11 @@
r"\1"),
(re.compile('b(".*?")'),
r"\1"),
+ # Persistent 4.4 changes the repr of persistent subclasses,
+ # and it is slightly different with the C extension and
+ # pure-Python module
+ (re.compile('ZODB.tests.testcrossdatabasereferences.'),
+ ''),
# Python 3 adds module name to exceptions.
(re.compile("ZODB.interfaces.BlobError"),
r"BlobError"),