diff options
Diffstat (limited to 'pkgs/development/python-modules')
42 files changed, 367 insertions, 85 deletions
diff --git a/pkgs/development/python-modules/GeoIP/default.nix b/pkgs/development/python-modules/GeoIP/default.nix index 6c4453774ced..0bacd8edb312 100644 --- a/pkgs/development/python-modules/GeoIP/default.nix +++ b/pkgs/development/python-modules/GeoIP/default.nix @@ -23,7 +23,7 @@ buildPythonPackage rec { meta = { description = "MaxMind GeoIP Legacy Database - Python API"; - homepage = http://www.maxmind.com/; + homepage = https://www.maxmind.com/; maintainers = with lib.maintainers; [ jluttine ]; license = lib.licenses.lgpl21Plus; }; diff --git a/pkgs/development/python-modules/alot/default.nix b/pkgs/development/python-modules/alot/default.nix index 67cd7eafd129..7abc56c47839 100644 --- a/pkgs/development/python-modules/alot/default.nix +++ b/pkgs/development/python-modules/alot/default.nix @@ -1,17 +1,22 @@ -{ stdenv, buildPythonPackage, fetchFromGitHub, isPy3k -, notmuch, urwid, urwidtrees, twisted, python_magic, configobj, pygpgme, mock, file, gpgme}: +{ stdenv, lib, buildPythonPackage, fetchFromGitHub, isPy3k +, notmuch, urwid, urwidtrees, twisted, python_magic, configobj, mock, file, gpgme +, service-identity +, gnupg ? null, sphinx, awk ? null, procps ? null, future ? null +, withManpage ? false }: + buildPythonPackage rec { - version = "0.5.1"; pname = "alot"; + version = "0.7"; + outputs = [ "out" ] ++ lib.optional withManpage "man"; disabled = isPy3k; src = fetchFromGitHub { owner = "pazz"; - repo = pname; - rev = "version"; - sha256 = "0ipkhc5wllfq78lg47aiq4qih0yjq8ad9xkrbgc88xk8pk9166i8"; + repo = "alot"; + rev = "${version}"; + sha256 = "1y932smng7qx7ybmqw4qh75b0lv9imfs5ak9fd0qhysij8kpmdhi"; }; postPatch = '' @@ -20,6 +25,8 @@ buildPythonPackage rec { "themes_dir = string(default='$out/share/themes')" ''; + nativeBuildInputs = lib.optional withManpage sphinx; + propagatedBuildInputs = [ notmuch urwid @@ -27,21 +34,32 @@ buildPythonPackage rec { twisted python_magic configobj - pygpgme - mock + service-identity file + gpgme ]; - postInstall = '' - mkdir -p $out/share + # some twisted tests need the network (test_env_set... ) + doCheck = false; + postBuild = lib.optionalString withManpage "make -C docs man"; + + checkInputs = [ awk future mock gnupg procps ]; + + postInstall = lib.optionalString withManpage '' + mkdir -p $out/man + cp -r docs/build/man $out/man + '' + + '' + mkdir -p $out/share/applications cp -r extra/themes $out/share - wrapProgram $out/bin/alot \ - --prefix LD_LIBRARY_PATH : '${stdenv.lib.makeLibraryPath [ notmuch file gpgme ]}' + + sed "s,/usr/bin,$out/bin,g" extra/alot.desktop > $out/share/applications/alot.desktop ''; meta = with stdenv.lib; { homepage = https://github.com/pazz/alot; description = "Terminal MUA using notmuch mail"; + license = licenses.gpl3; platforms = platforms.linux; maintainers = with maintainers; [ garbas ]; }; diff --git a/pkgs/development/python-modules/autobahn/default.nix b/pkgs/development/python-modules/autobahn/default.nix index 5a6121aaf7f4..69ee2b1b15f6 100644 --- a/pkgs/development/python-modules/autobahn/default.nix +++ b/pkgs/development/python-modules/autobahn/default.nix @@ -27,7 +27,7 @@ buildPythonPackage rec { meta = with stdenv.lib; { description = "WebSocket and WAMP in Python for Twisted and asyncio."; - homepage = "http://crossbar.io/autobahn"; + homepage = "https://crossbar.io/autobahn"; license = licenses.mit; maintainers = with maintainers; [ nand0p ]; platforms = platforms.all; diff --git a/pkgs/development/python-modules/autopep8/default.nix b/pkgs/development/python-modules/autopep8/default.nix index 6e58e3485ab2..90d57b6c89d7 100644 --- a/pkgs/development/python-modules/autopep8/default.nix +++ b/pkgs/development/python-modules/autopep8/default.nix @@ -2,12 +2,12 @@ buildPythonPackage rec { pname = "autopep8"; - version = "1.3.4"; + version = "1.3.5"; name = "${pname}-${version}"; src = fetchPypi { inherit pname version; - sha256 = "c7be71ab0cb2f50c9c22c82f0c9acaafc6f57492c3fbfee9790c415005c2b9a5"; + sha256 = "192bvhzi4d0claqxgzymvv7k3qnj627742bc8sgxpzjj42pd9112"; }; propagatedBuildInputs = [ pycodestyle ]; diff --git a/pkgs/development/python-modules/celery/default.nix b/pkgs/development/python-modules/celery/default.nix index 44613dd4e5bc..7f3fb46d1e10 100644 --- a/pkgs/development/python-modules/celery/default.nix +++ b/pkgs/development/python-modules/celery/default.nix @@ -1,6 +1,7 @@ { stdenv, buildPythonPackage, fetchPypi, iana-etc, libredirect, pytest, case, kombu, billiard, pytz, anyjson, amqp, eventlet -}: +}: + buildPythonPackage rec { pname = "celery"; version = "4.1.0"; @@ -11,11 +12,11 @@ buildPythonPackage rec { }; # make /etc/protocols accessible to fix socket.getprotobyname('tcp') in sandbox - preCheck = '' + preCheck = stdenv.lib.optionalString stdenv.isLinux '' export NIX_REDIRECTS=/etc/protocols=${iana-etc}/etc/protocols \ LD_PRELOAD=${libredirect}/lib/libredirect.so ''; - postCheck = '' + postCheck = stdenv.lib.optionalString stdenv.isLinux '' unset NIX_REDIRECTS LD_PRELOAD ''; diff --git a/pkgs/development/python-modules/cytoolz/default.nix b/pkgs/development/python-modules/cytoolz/default.nix index 9c5a2b2110ce..f7022d91626a 100644 --- a/pkgs/development/python-modules/cytoolz/default.nix +++ b/pkgs/development/python-modules/cytoolz/default.nix @@ -35,7 +35,7 @@ buildPythonPackage rec { ''; meta = { - homepage = "http://github.com/pytoolz/cytoolz/"; + homepage = "https://github.com/pytoolz/cytoolz/"; description = "Cython implementation of Toolz: High performance functional utilities"; license = "licenses.bsd3"; maintainers = with lib.maintainers; [ fridh ]; diff --git a/pkgs/development/python-modules/flask-assets/default.nix b/pkgs/development/python-modules/flask-assets/default.nix index 53307333048e..27d8f9c40c65 100644 --- a/pkgs/development/python-modules/flask-assets/default.nix +++ b/pkgs/development/python-modules/flask-assets/default.nix @@ -12,7 +12,7 @@ buildPythonPackage rec { propagatedBuildInputs = [ flask webassets flask_script nose ]; meta = with lib; { - homepage = http://github.com/miracle2k/flask-assets; + homepage = https://github.com/miracle2k/flask-assets; description = "Asset management for Flask, to compress and merge CSS and Javascript files"; license = licenses.bsd2; maintainers = with maintainers; [ abbradar ]; diff --git a/pkgs/development/python-modules/flask-script/default.nix b/pkgs/development/python-modules/flask-script/default.nix index 33b44080343f..72a3fb0c6f85 100644 --- a/pkgs/development/python-modules/flask-script/default.nix +++ b/pkgs/development/python-modules/flask-script/default.nix @@ -16,7 +16,7 @@ buildPythonPackage rec { doCheck = false; meta = with lib; { - homepage = http://github.com/smurfix/flask-script; + homepage = https://github.com/smurfix/flask-script; description = "Scripting support for Flask"; license = licenses.bsd3; maintainers = with maintainers; [ abbradar ]; diff --git a/pkgs/development/python-modules/fonttools/default.nix b/pkgs/development/python-modules/fonttools/default.nix index d7e789b02fa3..fdfa4e530cf9 100644 --- a/pkgs/development/python-modules/fonttools/default.nix +++ b/pkgs/development/python-modules/fonttools/default.nix @@ -8,11 +8,11 @@ buildPythonPackage rec { pname = "fonttools"; - version = "3.24.0"; + version = "3.24.1"; src = fetchPypi { inherit pname version; - sha256 = "d09126f443bc8797d1b7e76274e65f4c169c04722745953ecf536451b1d9a15f"; + sha256 = "d13e98c9f3b635a5334dab69eb471d7286928ac82db7ca57b5bf4cdf3824789a"; extension = "zip"; }; diff --git a/pkgs/development/python-modules/google_api_core/default.nix b/pkgs/development/python-modules/google_api_core/default.nix index 2899eeb4a8af..df148b1ede34 100644 --- a/pkgs/development/python-modules/google_api_core/default.nix +++ b/pkgs/development/python-modules/google_api_core/default.nix @@ -1,5 +1,5 @@ { stdenv, buildPythonPackage, fetchPypi -, google_auth, protobuf, googleapis_common_protos, requests, grpcio, setuptools, mock, pytest }: +, google_auth, protobuf3_5, googleapis_common_protos, requests, grpcio, setuptools, mock, pytest }: buildPythonPackage rec { pname = "google-api-core"; @@ -10,7 +10,7 @@ buildPythonPackage rec { sha256 = "0144d467083ed54d2e8ccb4212d42c3724fe0b844b7d3a0ff85aea54b7ae8347"; }; - propagatedBuildInputs = [ google_auth protobuf googleapis_common_protos requests grpcio ]; + propagatedBuildInputs = [ google_auth protobuf3_5 googleapis_common_protos requests grpcio ]; checkInputs = [ setuptools mock pytest ]; checkPhase = '' diff --git a/pkgs/development/python-modules/google_cloud_speech/default.nix b/pkgs/development/python-modules/google_cloud_speech/default.nix index 9912316941f9..75c14ff62ebc 100644 --- a/pkgs/development/python-modules/google_cloud_speech/default.nix +++ b/pkgs/development/python-modules/google_cloud_speech/default.nix @@ -13,9 +13,8 @@ buildPythonPackage rec { propagatedBuildInputs = [ setuptools google_api_core google_gax google_cloud_core ]; checkInputs = [ pytest mock ]; - checkPhase = '' - py.test - ''; + # needs credentials + doCheck = false; meta = with stdenv.lib; { description = "Cloud Speech API enables integration of Google speech recognition into applications."; diff --git a/pkgs/development/python-modules/google_gax/default.nix b/pkgs/development/python-modules/google_gax/default.nix index 24000161338c..a8ac37e7e8cd 100644 --- a/pkgs/development/python-modules/google_gax/default.nix +++ b/pkgs/development/python-modules/google_gax/default.nix @@ -1,5 +1,6 @@ { stdenv, buildPythonPackage, fetchPypi -, google_auth, ply, protobuf, grpcio, requests, googleapis_common_protos, dill, future, pytest, mock, unittest2 }: +, google_auth, ply, protobuf3_5, grpcio, requests +, googleapis_common_protos, dill, future, pytest, mock, unittest2 }: buildPythonPackage rec { pname = "google-gax"; @@ -10,7 +11,7 @@ buildPythonPackage rec { sha256 = "0p1ribd2xy7a04wnjv12agkcdi6f9cpj838884hayx07p5g8v3ji"; }; - propagatedBuildInputs = [ google_auth ply protobuf grpcio requests googleapis_common_protos dill future ]; + propagatedBuildInputs = [ google_auth ply protobuf3_5 grpcio requests googleapis_common_protos dill future ]; checkInputs = [ pytest mock unittest2 ]; # Importing test__grpc_google_auth fails with "ModuleNotFoundError: No module named 'google_auth_httplib2'", where diff --git a/pkgs/development/python-modules/googleapis_common_protos/default.nix b/pkgs/development/python-modules/googleapis_common_protos/default.nix index 28e84f4846e7..7427e590c0ca 100644 --- a/pkgs/development/python-modules/googleapis_common_protos/default.nix +++ b/pkgs/development/python-modules/googleapis_common_protos/default.nix @@ -1,5 +1,5 @@ { stdenv, buildPythonPackage, fetchPypi -, protobuf, pytest }: +, protobuf3_5, pytest }: buildPythonPackage rec { pname = "googleapis-common-protos"; @@ -10,7 +10,7 @@ buildPythonPackage rec { sha256 = "1whfjl44gy15ha6palpwa2m0xi36dsvpaz8vw0cvb2k2lbdfsxf0"; }; - propagatedBuildInputs = [ protobuf ]; + propagatedBuildInputs = [ protobuf3_5 ]; checkInputs = [ pytest ]; doCheck = false; # there are no tests diff --git a/pkgs/development/python-modules/graph-tool/2.x.x.nix b/pkgs/development/python-modules/graph-tool/2.x.x.nix index 99fe4b73cb98..8c61a6b278ae 100644 --- a/pkgs/development/python-modules/graph-tool/2.x.x.nix +++ b/pkgs/development/python-modules/graph-tool/2.x.x.nix @@ -8,7 +8,7 @@ stdenv.mkDerivation rec { meta = with stdenv.lib; { description = "Python module for manipulation and statistical analysis of graphs"; - homepage = http://graph-tool.skewed.de/; + homepage = https://graph-tool.skewed.de/; license = licenses.gpl3; platforms = platforms.all; maintainers = [ stdenv.lib.maintainers.joelmo ]; diff --git a/pkgs/development/python-modules/grpcio/default.nix b/pkgs/development/python-modules/grpcio/default.nix index d1f0903238c7..47e9d179eea7 100644 --- a/pkgs/development/python-modules/grpcio/default.nix +++ b/pkgs/development/python-modules/grpcio/default.nix @@ -1,5 +1,5 @@ { stdenv, buildPythonPackage, fetchPypi, lib -, six, protobuf, enum34, futures, isPy26, isPy27, isPy34 }: +, six, protobuf3_5, enum34, futures, isPy26, isPy27, isPy34 }: buildPythonPackage rec { pname = "grpcio"; @@ -10,7 +10,7 @@ buildPythonPackage rec { sha256 = "e7c43b5619deff48cc177c1b0618c4beeb2797f910f160e3c2035d5baf790a5d"; }; - propagatedBuildInputs = [ six protobuf ] + propagatedBuildInputs = [ six protobuf3_5 ] ++ lib.optionals (isPy26 || isPy27 || isPy34) [ enum34 ] ++ lib.optionals (isPy26 || isPy27) [ futures ]; diff --git a/pkgs/development/python-modules/idna/default.nix b/pkgs/development/python-modules/idna/default.nix index 635f8b33d3c6..e66700d87ee0 100644 --- a/pkgs/development/python-modules/idna/default.nix +++ b/pkgs/development/python-modules/idna/default.nix @@ -13,7 +13,7 @@ buildPythonPackage rec { }; meta = { - homepage = "http://github.com/kjd/idna/"; + homepage = "https://github.com/kjd/idna/"; description = "Internationalized Domain Names in Applications (IDNA)"; license = lib.licenses.bsd3; }; diff --git a/pkgs/development/python-modules/imbalanced-learn/default.nix b/pkgs/development/python-modules/imbalanced-learn/default.nix new file mode 100644 index 000000000000..65afe116510c --- /dev/null +++ b/pkgs/development/python-modules/imbalanced-learn/default.nix @@ -0,0 +1,26 @@ +{ stdenv, buildPythonPackage, fetchPypi, scikitlearn, pandas, nose, pytest }: + +buildPythonPackage rec { + pname = "imbalanced-learn"; + version = "0.3.3"; + + src = fetchPypi { + inherit pname version; + sha256 = "1r5js9kw6rvmfvxxkfjlcxv5xn5h19qvg7d41byilxwq9kd515g4"; + }; + + propagatedBuildInputs = [ scikitlearn ]; + checkInputs = [ nose pytest pandas ]; + checkPhase = '' + export HOME=$PWD + # skip some tests that fail because of minimal rounding errors + py.test imblearn --ignore=imblearn/metrics/classification.py + py.test doc/*.rst + ''; + + meta = with stdenv.lib; { + description = "Library offering a number of re-sampling techniques commonly used in datasets showing strong between-class imbalance"; + homepage = https://github.com/scikit-learn-contrib/imbalanced-learn; + license = licenses.mit; + }; +} diff --git a/pkgs/development/python-modules/jsonref/default.nix b/pkgs/development/python-modules/jsonref/default.nix index ca9549b677bb..6209c2593a7a 100644 --- a/pkgs/development/python-modules/jsonref/default.nix +++ b/pkgs/development/python-modules/jsonref/default.nix @@ -19,7 +19,7 @@ buildPythonPackage rec { meta = with stdenv.lib; { description = "An implementation of JSON Reference for Python"; - homepage = "http://github.com/gazpachoking/jsonref"; + homepage = "https://github.com/gazpachoking/jsonref"; license = licenses.mit; maintainers = with maintainers; [ nand0p ]; platforms = platforms.all; diff --git a/pkgs/development/python-modules/jsonrpc-async/default.nix b/pkgs/development/python-modules/jsonrpc-async/default.nix index 1018c536ff7d..2bdb93dfdf2d 100644 --- a/pkgs/development/python-modules/jsonrpc-async/default.nix +++ b/pkgs/development/python-modules/jsonrpc-async/default.nix @@ -14,7 +14,7 @@ buildPythonPackage rec { meta = with stdenv.lib; { description = "A JSON-RPC client library for asyncio"; - homepage = http://github.com/armills/jsonrpc-async; + homepage = https://github.com/armills/jsonrpc-async; license = licenses.bsd3; maintainers = with maintainers; [ peterhoeg ]; }; diff --git a/pkgs/development/python-modules/linode-api/default.nix b/pkgs/development/python-modules/linode-api/default.nix index 45c33f94b28a..ad6b938c9888 100644 --- a/pkgs/development/python-modules/linode-api/default.nix +++ b/pkgs/development/python-modules/linode-api/default.nix @@ -1,17 +1,17 @@ { stdenv, buildPythonPackage, - fetchPypi, + fetchFromGitHub, isPy3k, pythonOlder, lib, requests, future, - enum34 }: + enum34, + mock }: buildPythonPackage rec { pname = "linode-api"; - version = "4.1.2b0"; # NOTE: this is a beta, and the API may change in future versions. - name = "${pname}-${version}"; + version = "4.1.8b1"; # NOTE: this is a beta, and the API may change in future versions. disabled = (pythonOlder "2.7"); @@ -22,11 +22,15 @@ buildPythonPackage rec { sed -i -e '/"enum34",/d' setup.py ''); - doCheck = false; # This library does not have any tests at this point. + doCheck = true; + checkInputs = [ mock ]; - src = fetchPypi { - inherit pname version; - sha256 = "19yzyb4sbxib8yxmrqm6d8i0fm8cims56q7kiq2ana26nbcm0gr4"; + # Sources from Pypi exclude test fixtures + src = fetchFromGitHub { + rev = "v${version}"; + owner = "linode"; + repo = "python-linode-api"; + sha256 = "0qfqn92fr876dncwbkf2vhm90hnf7lwpg80hzwyzyzwz1hcngvjg"; }; meta = { diff --git a/pkgs/development/python-modules/locustio/default.nix b/pkgs/development/python-modules/locustio/default.nix index 4bc48810e71d..c3e27c8b36a0 100644 --- a/pkgs/development/python-modules/locustio/default.nix +++ b/pkgs/development/python-modules/locustio/default.nix @@ -26,7 +26,7 @@ buildPythonPackage rec { buildInputs = [ mock unittest2 ]; meta = { - homepage = http://locust.io/; + homepage = https://locust.io/; description = "A load testing tool"; }; } diff --git a/pkgs/development/python-modules/logilab/constraint.nix b/pkgs/development/python-modules/logilab/constraint.nix index 952cc03e454e..8f7229a4c0f0 100644 --- a/pkgs/development/python-modules/logilab/constraint.nix +++ b/pkgs/development/python-modules/logilab/constraint.nix @@ -17,7 +17,7 @@ buildPythonPackage rec { meta = with stdenv.lib; { description = "logilab-database provides some classes to make unified access to different"; - homepage = "http://www.logilab.org/project/logilab-database"; + homepage = "https://www.logilab.org/project/logilab-database"; }; } diff --git a/pkgs/development/python-modules/meliae/default.nix b/pkgs/development/python-modules/meliae/default.nix index ec6c15b25012..5a348e5288c4 100644 --- a/pkgs/development/python-modules/meliae/default.nix +++ b/pkgs/development/python-modules/meliae/default.nix @@ -35,7 +35,7 @@ buildPythonPackage rec { meta = with stdenv.lib; { description = "Python Memory Usage Analyzer"; - homepage = http://launchpad.net/meliae; + homepage = https://launchpad.net/meliae; license = licenses.gpl3; maintainers = with maintainers; [ xvapx ]; }; diff --git a/pkgs/development/python-modules/mock-open/default.nix b/pkgs/development/python-modules/mock-open/default.nix new file mode 100644 index 000000000000..edb3407270f2 --- /dev/null +++ b/pkgs/development/python-modules/mock-open/default.nix @@ -0,0 +1,22 @@ +{ lib, buildPythonPackage, fetchFromGitHub, pythonOlder, mock }: + +buildPythonPackage rec { + pname = "mock-open"; + version = "1.3.1"; + + # no tests in PyPI tarball + src = fetchFromGitHub { + owner = "nivbend"; + repo = pname; + rev = "v${version}"; + sha256 = "0ikhrhlkl5c7qbigpsv44jw89ws1z7j06gzyg5dh1ki533ifbjm2"; + }; + + propagatedBuildInputs = lib.optional (pythonOlder "3.3") mock; + + meta = with lib; { + homepage = https://github.com/nivbend/mock-open; + description = "A better mock for file I/O"; + license = licenses.mit; + }; +} diff --git a/pkgs/development/python-modules/moinmoin/default.nix b/pkgs/development/python-modules/moinmoin/default.nix index 6891dd2b6272..2097470d4e47 100644 --- a/pkgs/development/python-modules/moinmoin/default.nix +++ b/pkgs/development/python-modules/moinmoin/default.nix @@ -28,7 +28,7 @@ buildPythonPackage rec { meta = with lib; { description = "Advanced, easy to use and extensible WikiEngine"; - homepage = "http://moinmo.in/"; + homepage = "https://moinmo.in/"; license = licenses.gpl2Plus; }; diff --git a/pkgs/development/python-modules/mrbob/default.nix b/pkgs/development/python-modules/mrbob/default.nix new file mode 100644 index 000000000000..3f974872b959 --- /dev/null +++ b/pkgs/development/python-modules/mrbob/default.nix @@ -0,0 +1,28 @@ +{ buildPythonPackage, stdenv, glibcLocales, mock, nose, isPy3k, argparse, jinja2, six +, fetchPypi, lib +}: + +buildPythonPackage rec { + pname = "mrbob"; + version = "0.1.2"; + + src = fetchPypi { + inherit pname version; + sha256 = "6737eaf98aaeae85e07ebef844ee5156df2f06a8b28d7c3dcb056f811c588121"; + }; + + disabled = isPy3k; + + checkInputs = [ nose glibcLocales mock ]; + checkPhase = '' + LC_ALL="en_US.UTF-8" nosetests + ''; + + propagatedBuildInputs = [ argparse jinja2 six ]; + + meta = with stdenv.lib; { + homepage = https://github.com/domenkozar/mr.bob; + description = "A tool to generate code skeletons from templates"; + license = licenses.bsd3; + }; +} diff --git a/pkgs/development/python-modules/nipype/default.nix b/pkgs/development/python-modules/nipype/default.nix index 30ee2b28561a..668e34a22476 100644 --- a/pkgs/development/python-modules/nipype/default.nix +++ b/pkgs/development/python-modules/nipype/default.nix @@ -21,8 +21,12 @@ , simplejson , traits , xvfbwrapper +, pytestcov +, codecov # other dependencies , which +, bash +, glibcLocales }: assert !isPy3k -> configparser != null; @@ -36,9 +40,14 @@ buildPythonPackage rec { sha256 = "47f62fda3d6b9a37aa407a6b78c80e91240aa71e61191ed00da68b02839fe258"; }; - doCheck = false; # fails with TypeError: None is not callable - checkInputs = [ which ]; - buildInputs = [ pytest mock ]; # required in installPhase + # see https://github.com/nipy/nipype/issues/2240 + patches = [ ./prov-version.patch ]; + + postPatch = '' + substituteInPlace nipype/interfaces/base/tests/test_core.py \ + --replace "/usr/bin/env bash" "${bash}/bin/bash" + ''; + propagatedBuildInputs = [ click dateutil @@ -59,6 +68,12 @@ buildPythonPackage rec { configparser ]; + checkInputs = [ pytest mock pytestcov codecov which glibcLocales ]; + + checkPhase = '' + LC_ALL="en_US.UTF-8" py.test -v --doctest-modules nipype + ''; + meta = with stdenv.lib; { homepage = http://nipy.org/nipype/; description = "Neuroimaging in Python: Pipelines and Interfaces"; diff --git a/pkgs/development/python-modules/nipype/prov-version.patch b/pkgs/development/python-modules/nipype/prov-version.patch new file mode 100644 index 000000000000..133295d0560b --- /dev/null +++ b/pkgs/development/python-modules/nipype/prov-version.patch @@ -0,0 +1,21 @@ +diff --git a/nipype/info.py b/nipype/info.py +index 1daa382e2..da338d0ea 100644 +--- a/nipype/info.py ++++ b/nipype/info.py +@@ -108,7 +108,6 @@ DATEUTIL_MIN_VERSION = '2.2' + PYTEST_MIN_VERSION = '3.0' + FUTURE_MIN_VERSION = '0.16.0' + SIMPLEJSON_MIN_VERSION = '3.8.0' +-PROV_VERSION = '1.5.0' + CLICK_MIN_VERSION = '6.6.0' + PYDOT_MIN_VERSION = '1.2.3' + +@@ -140,7 +139,7 @@ REQUIRES = [ + 'traits>=%s' % TRAITS_MIN_VERSION, + 'future>=%s' % FUTURE_MIN_VERSION, + 'simplejson>=%s' % SIMPLEJSON_MIN_VERSION, +- 'prov==%s' % PROV_VERSION, ++ 'prov<2', + 'click>=%s' % CLICK_MIN_VERSION, + 'funcsigs', + 'pytest>=%s' % PYTEST_MIN_VERSION, diff --git a/pkgs/development/python-modules/pecan/default.nix b/pkgs/development/python-modules/pecan/default.nix index 3a49a32a8a0e..c6c5b99d9806 100644 --- a/pkgs/development/python-modules/pecan/default.nix +++ b/pkgs/development/python-modules/pecan/default.nix @@ -30,6 +30,6 @@ buildPythonPackage rec { meta = with stdenv.lib; { description = "Pecan"; - homepage = "http://github.com/pecan/pecan"; + homepage = "https://github.com/pecan/pecan"; }; } diff --git a/pkgs/development/python-modules/poppler-qt5/default.nix b/pkgs/development/python-modules/poppler-qt5/default.nix new file mode 100644 index 000000000000..0ae689034a3a --- /dev/null +++ b/pkgs/development/python-modules/poppler-qt5/default.nix @@ -0,0 +1,42 @@ +{ buildPythonPackage, fetchPypi, stdenv, sip, qtbase, pyqt5, poppler, pkgconfig, fetchpatch +, python, substituteAll +}: + +buildPythonPackage rec { + pname = "python-poppler-qt5"; + version = "0.24.2"; + + src = fetchPypi { + inherit pname version; + sha256 = "0l69llw1fzwz8y90q0qp9q5pifbrqjjbwii7di54dwghw5fc6w1r"; + }; + + patches = [ + (substituteAll { + src = ./poppler-include-dir.patch; + poppler_include_dir = "${poppler.dev}/include/poppler"; + }) + (fetchpatch { + url = "https://github.com/wbsoft/python-poppler-qt5/commit/faf4d1308f89560b0d849671226e3080dfc72e79.patch"; + sha256 = "18krhh6wzsnpxzlzv02nginb1vralla8ai24zqk10nc4mj6fkj86"; + }) + ]; + + setupPyBuildFlags = [ + "--pyqt-sip-dir ${pyqt5}/share/sip/PyQt5" + "--qt-include-dir ${qtbase.dev}/include" + ]; + + buildInputs = [ qtbase.dev poppler ]; + nativeBuildInputs = [ pkgconfig ]; + propagatedBuildInputs = [ sip pyqt5.dev ]; + + # no tests, just bindings for `poppler_qt5` + doCheck = false; + + meta = with stdenv.lib; { + homepage = https://github.com/wbsoft/python-poppler-qt5; + license = licenses.gpl2; + maintainers = with maintainers; [ ma27 ]; + }; +} diff --git a/pkgs/development/python-modules/poppler-qt5/poppler-include-dir.patch b/pkgs/development/python-modules/poppler-qt5/poppler-include-dir.patch new file mode 100644 index 000000000000..7106c1d6352c --- /dev/null +++ b/pkgs/development/python-modules/poppler-qt5/poppler-include-dir.patch @@ -0,0 +1,12 @@ +diff --git a/setup.py b/setup.py +index 59a75b0..0a73268 100644 +--- a/setup.py ++++ b/setup.py +@@ -169,6 +169,7 @@ class build_ext(build_ext_base): + 'Please specify via --pyqt-sip-flags=') + + self.include_dirs += (self.qt_include_dir, ++ '@poppler_include_dir@', + os.path.join(self.qt_include_dir, 'QtCore'), + os.path.join(self.qt_include_dir, 'QtGui'), + os.path.join(self.qt_include_dir, 'QtXml')) diff --git a/pkgs/development/python-modules/pytest-flake8/default.nix b/pkgs/development/python-modules/pytest-flake8/default.nix index d79f32a67662..b170f480e96e 100644 --- a/pkgs/development/python-modules/pytest-flake8/default.nix +++ b/pkgs/development/python-modules/pytest-flake8/default.nix @@ -1,9 +1,8 @@ {lib, buildPythonPackage, fetchPypi, fetchpatch, pytest, flake8}: buildPythonPackage rec { - name = "${pname}-${version}"; pname = "pytest-flake8"; - version = "0.9.1"; + version = "1.0.0"; # although pytest is a runtime dependency, do not add it as # propagatedBuildInputs in order to allow packages depend on another version @@ -13,7 +12,7 @@ buildPythonPackage rec { src = fetchPypi { inherit pname version; - sha256 = "0032l4x2i5qn7ikaaw0kjs9f4ccpas21j564spyxwmx50wnhf5p7"; + sha256 = "01driw4sc6nfi3m3ii7d074pxi3h1h4mbiyad9crg5i1l5jxx5ir"; }; checkPhase = '' diff --git a/pkgs/development/python-modules/python-gnupg/default.nix b/pkgs/development/python-modules/python-gnupg/default.nix index 9d29e109db49..12b6bf929187 100644 --- a/pkgs/development/python-modules/python-gnupg/default.nix +++ b/pkgs/development/python-modules/python-gnupg/default.nix @@ -3,11 +3,11 @@ buildPythonPackage rec { name = "${pname}-${version}"; pname = "python-gnupg"; - version = "0.4.1"; + version = "0.4.2"; src = fetchPypi { inherit pname version; - sha256 = "06hfw9cmiw5306fyisp3kzg1hww260qzip829g7y7pj1mwpb0izg"; + sha256 = "0wzvx8y4ii1y1vch28a0m6f2y4px9r7qd8fpimsx6y5z4pfscm2s"; }; propagatedBuildInputs = [ gnupg1 ]; diff --git a/pkgs/development/python-modules/python-ly/default.nix b/pkgs/development/python-modules/python-ly/default.nix new file mode 100644 index 000000000000..4c1bd05f4a0f --- /dev/null +++ b/pkgs/development/python-modules/python-ly/default.nix @@ -0,0 +1,21 @@ +{ buildPythonPackage, fetchPypi, stdenv }: + +buildPythonPackage rec { + pname = "python-ly"; + version = "0.9.5"; + + src = fetchPypi { + inherit pname version; + sha256 = "0x98dv7p8mg26p4816yy8hz4f34zf6hpnnfmr56msgh9jnsm2qfl"; + }; + + # tests not shipped on `pypi` and + # seem to be broken ATM: https://github.com/wbsoft/python-ly/issues/70 + doCheck = false; + + meta = with stdenv.lib; { + description = "Tool and library for manipulating LilyPond files"; + license = licenses.gpl2; + maintainers = with maintainers; [ ma27 ]; + }; +} diff --git a/pkgs/development/python-modules/root_numpy/default.nix b/pkgs/development/python-modules/root_numpy/default.nix index 008bafae9d75..105119522287 100644 --- a/pkgs/development/python-modules/root_numpy/default.nix +++ b/pkgs/development/python-modules/root_numpy/default.nix @@ -1,4 +1,4 @@ -{ lib, fetchPypi, isPy3k, buildPythonPackage, numpy, root }: +{ lib, fetchPypi, isPy3k, buildPythonPackage, numpy, root, nose }: buildPythonPackage rec { pname = "root_numpy"; @@ -11,6 +11,11 @@ buildPythonPackage rec { }; disabled = isPy3k; # blocked by #27649 + checkInputs = [ nose ]; + checkPhase = '' + python setup.py install_lib -d . + nosetests -s -v root_numpy + ''; propagatedBuildInputs = [ numpy root ]; diff --git a/pkgs/development/python-modules/scapy/default.nix b/pkgs/development/python-modules/scapy/default.nix index 1f4a34d18a38..d7b2a827f7d1 100644 --- a/pkgs/development/python-modules/scapy/default.nix +++ b/pkgs/development/python-modules/scapy/default.nix @@ -1,30 +1,36 @@ -{ stdenv, buildPythonPackage, fetchFromGitHub, isPy3k, isPyPy +{ stdenv, lib, buildPythonPackage, fetchFromGitHub, isPyPy, isPy3k, pythonOlder , matplotlib, pycrypto, ecdsa -# Python3: pyx +, enum34, mock }: buildPythonPackage rec { pname = "scapy"; - version = "2.3.3"; + version = "2.4.0"; name = pname + "-" + version; - disabled = isPy3k || isPyPy; + disabled = isPyPy; src = fetchFromGitHub { owner = "secdev"; repo = "scapy"; rev = "v${version}"; - sha256 = "1c22407vhksnhc0rwrslnp9zy05qmk2zmdm2imm3iw7g6kx7gak1"; + sha256 = "0dw6kl1qi9bf3rbm79gb1h40ms8y0b5dbmpip841p2905d5r2isj"; }; - # Temporary workaround, only needed for 2.3.3 + # TODO: Temporary workaround patches = [ ./fix-version-1.patch ./fix-version-2.patch ]; - propagatedBuildInputs = [ matplotlib pycrypto ecdsa ]; + propagatedBuildInputs = + [ matplotlib pycrypto ecdsa ] + ++ lib.optional (isPy3k && pythonOlder "3.4") [ enum34 ] + ++ lib.optional doCheck [ mock ]; + + # Tests fail with Python 3.6 (seems to be an upstream bug, I'll investigate) + doCheck = if isPy3k then false else true; meta = with stdenv.lib; { description = "Powerful interactive network packet manipulation program"; - homepage = http://www.secdev.org/projects/scapy/; + homepage = https://scapy.net/; license = licenses.gpl2; platforms = platforms.linux; maintainers = with maintainers; [ primeos bjornfor ]; diff --git a/pkgs/development/python-modules/scapy/fix-version-1.patch b/pkgs/development/python-modules/scapy/fix-version-1.patch index 3864a41964e2..33d099e7a648 100644 --- a/pkgs/development/python-modules/scapy/fix-version-1.patch +++ b/pkgs/development/python-modules/scapy/fix-version-1.patch @@ -1,11 +1,11 @@ --- a/setup.py 2018-02-15 22:14:08.531591678 +0100 -+++ b/setup.py 2018-02-15 22:14:57.947703737 +0100 ++++ b/setup.py 2018-03-27 17:15:38.617315539 +0200 @@ -47,7 +47,7 @@ setup( name='scapy', - version=__import__('scapy').VERSION, -+ version='2.3.3', ++ version='2.4.0', packages=[ 'scapy', 'scapy/arch', diff --git a/pkgs/development/python-modules/scapy/fix-version-2.patch b/pkgs/development/python-modules/scapy/fix-version-2.patch index 62d43b51fbb9..41a195fb722f 100644 --- a/pkgs/development/python-modules/scapy/fix-version-2.patch +++ b/pkgs/development/python-modules/scapy/fix-version-2.patch @@ -1,11 +1,15 @@ ---- a/scapy/__init__.py 2017-12-29 18:57:35.315472160 +0100 -+++ b/scapy/__init__.py 2018-02-15 22:36:43.102132489 +0100 -@@ -73,7 +73,7 @@ - tag = f.read() - return tag - except: -- return 'unknown.version' -+ return '2.3.3' +--- a/scapy/__init__.py 2018-03-27 17:38:52.706481269 +0200 ++++ b/scapy/__init__.py 2018-03-27 17:39:56.576688890 +0200 +@@ -82,9 +82,10 @@ + if match: + return "git-archive.dev" + match.group(1) + elif sha1: +- return "git-archive.dev" + sha1 ++ return '2.4.0' + else: +- return 'unknown.version' ++ return '2.4.0' ++ VERSION = _version() diff --git a/pkgs/development/python-modules/service_identity/default.nix b/pkgs/development/python-modules/service_identity/default.nix index 779e974f15e3..93e172a4f606 100644 --- a/pkgs/development/python-modules/service_identity/default.nix +++ b/pkgs/development/python-modules/service_identity/default.nix @@ -13,8 +13,6 @@ buildPythonPackage rec { pname = "service_identity"; version = "17.0.0"; - name = "${pname}-${version}"; - src = fetchFromGitHub { owner = "pyca"; @@ -33,6 +31,6 @@ buildPythonPackage rec { meta = with lib; { description = "Service identity verification for pyOpenSSL"; license = licenses.mit; - homepage = "https://service-identity.readthedocs.io"; + homepage = https://service-identity.readthedocs.io; }; } diff --git a/pkgs/development/python-modules/smart_open/default.nix b/pkgs/development/python-modules/smart_open/default.nix index 2e2020f61f09..c4992eb9d9bb 100644 --- a/pkgs/development/python-modules/smart_open/default.nix +++ b/pkgs/development/python-modules/smart_open/default.nix @@ -3,7 +3,9 @@ , isPy3k , fetchPypi , boto +, boto3 , bz2file +, mock , moto , requests , responses @@ -12,14 +14,26 @@ buildPythonPackage rec { pname = "smart_open"; name = "${pname}-${version}"; - version = "1.5.6"; + version = "1.5.7"; src = fetchPypi { inherit pname version; - sha256 = "8fd2de1c359bd0074bd6d334a5b9820ae1c5b6ba563970b95052bace4b71baeb"; + sha256 = "0y1c29pdxxgxkymr7g2n59siqqaq351zbx9vz8433dxvzy4qgd7p"; }; - propagatedBuildInputs = [ boto bz2file requests responses moto ]; + # nixpkgs version of moto is >=1.2.0, remove version pin to fix build + postPatch = '' + substituteInPlace ./setup.py --replace "moto==0.4.31" "moto" + ''; + + # moto>=1.0.0 is backwards-incompatible and some tests fail with it, + # so disable tests for now + doCheck = false; + + checkInputs = [ mock moto responses ]; + + # upstream code requires both boto and boto3 + propagatedBuildInputs = [ boto boto3 bz2file requests ]; meta = { license = lib.licenses.mit; description = "smart_open is a Python 2 & Python 3 library for efficient streaming of very large file"; diff --git a/pkgs/development/python-modules/toml/default.nix b/pkgs/development/python-modules/toml/default.nix new file mode 100644 index 000000000000..a80657dc4b45 --- /dev/null +++ b/pkgs/development/python-modules/toml/default.nix @@ -0,0 +1,23 @@ +{ stdenv, buildPythonPackage, fetchPypi }: + +buildPythonPackage rec { + pname = "toml"; + version = "0.9.4"; + + src = fetchPypi { + inherit pname version; + sha256 = "0bdbpbip67wdm6c7xwc6mmbmskyradj4cdxn1iibj4fcx1nbv1lf"; + }; + + # This package has a test script (built for Travis) that involves a) + # looking in the home directory for a binary test runner and b) using + # git to download a test suite. + doCheck = false; + + meta = with stdenv.lib; { + description = "a Python library for parsing and creating TOML"; + homepage = "https://github.com/uiri/toml"; + license = licenses.mit; + maintainers = with maintainers; [ twey ]; + }; +} diff --git a/pkgs/development/python-modules/vxi11/default.nix b/pkgs/development/python-modules/vxi11/default.nix new file mode 100644 index 000000000000..86b05b32540a --- /dev/null +++ b/pkgs/development/python-modules/vxi11/default.nix @@ -0,0 +1,23 @@ +{ stdenv, buildPythonPackage, fetchPypi, nose }: + +buildPythonPackage rec { + pname = "python-vxi11"; + version = "0.9"; + + src = fetchPypi { + inherit pname version; + sha256 = "1zvd0wxp6mccaxy9fzlzk3i4pr2ggnj79r3awimjqd89pvaxiyq1"; + }; + + checkInputs = [ nose ]; + checkPhase = '' + nosetests + ''; + + meta = with stdenv.lib; { + description = "VXI-11 driver for controlling instruments over Ethernet"; + homepage = https://github.com/python-ivi/python-vxi11; + license = licenses.mit; + maintainers = with maintainers; [ bgamari ]; + }; +} |