diff options
Diffstat (limited to 'pkgs/development/python-modules')
16 files changed, 320 insertions, 34 deletions
diff --git a/pkgs/development/python-modules/GitPython/default.nix b/pkgs/development/python-modules/GitPython/default.nix new file mode 100644 index 000000000000..c2f3706923a3 --- /dev/null +++ b/pkgs/development/python-modules/GitPython/default.nix @@ -0,0 +1,24 @@ +{ lib, buildPythonPackage, fetchPypi, gitdb2, mock, nose, ddt }: + +buildPythonPackage rec { + version = "2.1.9"; + pname = "GitPython"; + + src = fetchPypi { + inherit pname version; + sha256 = "0a9in1jfv9ssxhckl6sasw45bhm762y2r5ikgb2pk2g8yqdc6z64"; + }; + + checkInputs = [ mock nose ddt ]; + propagatedBuildInputs = [ gitdb2 ]; + + # Tests require a git repo + doCheck = false; + + meta = { + description = "Python Git Library"; + maintainers = [ ]; + homepage = https://github.com/gitpython-developers/GitPython; + license = lib.licenses.bsd3; + }; +} diff --git a/pkgs/development/python-modules/cx_oracle/0001-odpi-src-dpiOci.c-nixify-libclntsh.so-dlopen.patch b/pkgs/development/python-modules/cx_oracle/0001-odpi-src-dpiOci.c-nixify-libclntsh.so-dlopen.patch new file mode 100644 index 000000000000..a2de7b248531 --- /dev/null +++ b/pkgs/development/python-modules/cx_oracle/0001-odpi-src-dpiOci.c-nixify-libclntsh.so-dlopen.patch @@ -0,0 +1,27 @@ +From 355b9d812efdfbd041e14b365258b69c81689981 Mon Sep 17 00:00:00 2001 +From: Florian Klink <flokli@flokli.de> +Date: Thu, 17 May 2018 18:37:40 +0200 +Subject: [PATCH] odpi/src/dpiOci.c: nixify libclntsh.so dlopen + +--- + odpi/src/dpiOci.c | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/odpi/src/dpiOci.c b/odpi/src/dpiOci.c +index 76b9867..22c2987 100644 +--- a/odpi/src/dpiOci.c ++++ b/odpi/src/dpiOci.c +@@ -1575,6 +1575,10 @@ static int dpiOci__loadLib(dpiError *error) + } + } + } ++ if(!dpiOciLibHandle) { ++ dpiOciLibHandle = dlopen("@libclntsh@", RTLD_LAZY); ++ } ++ + #endif + + if (!dpiOciLibHandle) { +-- +2.16.3 + diff --git a/pkgs/development/python-modules/cx_oracle/default.nix b/pkgs/development/python-modules/cx_oracle/default.nix index f2e10caad726..717faf1128f0 100644 --- a/pkgs/development/python-modules/cx_oracle/default.nix +++ b/pkgs/development/python-modules/cx_oracle/default.nix @@ -2,7 +2,7 @@ buildPythonPackage rec { pname = "cx_Oracle"; - version = "6.2.1"; + version = "6.3.1"; buildInputs = [ oracle-instantclient @@ -10,10 +10,16 @@ buildPythonPackage rec { src = fetchPypi { inherit pname version; - sha256 = "01970bc843b3c699a7fd98af19e0401fe69abfbd2acdf464e0bf2ae06ea372b9"; + sha256 = "0200j6jh80rpgzxmvgcxmkshaj4zadq32g2i97nlwiq3f7q374l7"; }; - # Check need an Oracle database to run + patches = [ ./0001-odpi-src-dpiOci.c-nixify-libclntsh.so-dlopen.patch ]; + + postPatch = '' + substituteInPlace odpi/src/dpiOci.c --replace @libclntsh@ "${oracle-instantclient}/lib/libclntsh.so"; + ''; + + # Check need an Oracle database to run doCheck = false; meta = with stdenv.lib; { diff --git a/pkgs/development/python-modules/gitdb/default.nix b/pkgs/development/python-modules/gitdb/default.nix new file mode 100644 index 000000000000..ceca6e3719b4 --- /dev/null +++ b/pkgs/development/python-modules/gitdb/default.nix @@ -0,0 +1,23 @@ +{ lib, buildPythonPackage, fetchPypi, smmap }: + +buildPythonPackage rec { + pname = "gitdb"; + version = "0.6.4"; + + src = fetchPypi { + inherit pname version; + sha256 = "0n4n2c7rxph9vs2l6xlafyda5x1mdr8xy16r9s3jwnh3pqkvrsx3"; + }; + + propagatedBuildInputs = [ smmap ]; + + # Bunch of tests fail because they need an actual git repo + doCheck = false; + + meta = { + description = "Git Object Database"; + maintainers = [ ]; + homepage = https://github.com/gitpython-developers/gitdb; + license = lib.licenses.bsd3; + }; +} diff --git a/pkgs/development/python-modules/gitdb2/default.nix b/pkgs/development/python-modules/gitdb2/default.nix new file mode 100644 index 000000000000..1ebbd3de7850 --- /dev/null +++ b/pkgs/development/python-modules/gitdb2/default.nix @@ -0,0 +1,23 @@ +{ lib, buildPythonPackage, fetchPypi, smmap2 }: + +buildPythonPackage rec { + pname = "gitdb2"; + version = "2.0.3"; + + src = fetchPypi { + inherit pname version; + sha256 = "02azg62mr99b7cllyjrly77np3vw32y8nrxpa2xjapiyaga2j3mn"; + }; + + propagatedBuildInputs = [ smmap2 ]; + + # Bunch of tests fail because they need an actual git repo + doCheck = false; + + meta = { + description = "Git Object Database"; + maintainers = [ ]; + homepage = https://github.com/gitpython-developers/gitdb; + license = lib.licenses.bsd3; + }; +} diff --git a/pkgs/development/python-modules/hiro/default.nix b/pkgs/development/python-modules/hiro/default.nix new file mode 100644 index 000000000000..0289c008e7e8 --- /dev/null +++ b/pkgs/development/python-modules/hiro/default.nix @@ -0,0 +1,19 @@ +{ stdenv, buildPythonPackage, fetchPypi, six, mock }: +buildPythonPackage rec { + pname = "hiro"; + version = "0.1.4"; + src = fetchPypi { + inherit pname version; + + sha256 = "1340lhg7k522bqpz5iakl51qb47mjw804mfwwzm77i7qcm5cwiz8"; + }; + + propagatedBuildInputs = [ six mock ]; + + meta = with stdenv.lib; { + description = "Time manipulation utilities for Python"; + homepage = http://hiro.readthedocs.io/en/latest/; + license = licenses.mit; + maintainers = with maintainers; [ nyarly ]; + }; +} diff --git a/pkgs/development/python-modules/ipython/5.nix b/pkgs/development/python-modules/ipython/5.nix index 083c1f3b08dd..a91988bd97d0 100644 --- a/pkgs/development/python-modules/ipython/5.nix +++ b/pkgs/development/python-modules/ipython/5.nix @@ -27,11 +27,11 @@ buildPythonPackage rec { pname = "ipython"; - version = "5.6.0"; + version = "5.7.0"; src = fetchPypi { inherit pname version; - sha256 = "00g696r9rk1c4p3sycnv7by55cp9mm7r6zkkdqbiw9l0mk8k58wb"; + sha256 = "0g1jm06qriq48m58311cs7askp83ipq3yq96hv4kg431nxzkmd4d"; }; prePatch = stdenv.lib.optionalString stdenv.isDarwin '' diff --git a/pkgs/development/python-modules/isort/default.nix b/pkgs/development/python-modules/isort/default.nix new file mode 100644 index 000000000000..5a7e50d43322 --- /dev/null +++ b/pkgs/development/python-modules/isort/default.nix @@ -0,0 +1,28 @@ +{ lib, buildPythonPackage, fetchPypi, isPy27, futures, mock, pytest }: + +buildPythonPackage rec { + pname = "isort"; + version = "4.3.4"; + + src = fetchPypi { + inherit pname version; + sha256 = "1y0yfv56cqyh9wyg7kxxv9y5wmfgcq18n7a49mp7xmzka2bhxi5r"; + }; + + propagatedBuildInputs = lib.optional isPy27 futures; + + checkInputs = [ mock pytest ]; + + checkPhase = '' + py.test test_isort.py -k "not test_long_line_comments \ + and not test_import_case_produces_inconsistent_results_issue_472 \ + and not test_no_extra_lines_issue_557" + ''; + + meta = with lib; { + description = "A Python utility / library to sort Python imports"; + homepage = https://github.com/timothycrosley/isort; + license = licenses.mit; + maintainers = with maintainers; [ couchemar nand0p ]; + }; +} diff --git a/pkgs/development/python-modules/keyrings-alt/default.nix b/pkgs/development/python-modules/keyrings-alt/default.nix new file mode 100644 index 000000000000..140d4297cda5 --- /dev/null +++ b/pkgs/development/python-modules/keyrings-alt/default.nix @@ -0,0 +1,25 @@ +{ stdenv, buildPythonPackage, fetchPypi, six +, pytest, unittest2, mock, keyring +}: + +buildPythonPackage rec { + pname = "keyrings.alt"; + version = "2.3"; + + src = fetchPypi { + inherit pname version; + sha256 = "5cb9b6cdb5ce5e8216533e342d3e1b418ddd210466834061966d7dc1a4736f2d"; + }; + propagatedBuildInputs = [ six ]; + + # Fails with "ImportError: cannot import name mock" + doCheck = false; + checkInputs = [ pytest unittest2 mock keyring ]; + + meta = with stdenv.lib; { + license = licenses.mit; + description = "Alternate keyring implementations"; + homepage = https://github.com/jaraco/keyrings.alt; + maintainers = with maintainers; [ nyarly ]; + }; +} diff --git a/pkgs/development/python-modules/mail-parser/default.nix b/pkgs/development/python-modules/mail-parser/default.nix new file mode 100644 index 000000000000..e05dc3f2861f --- /dev/null +++ b/pkgs/development/python-modules/mail-parser/default.nix @@ -0,0 +1,41 @@ +{ lib, buildPythonPackage, python, pythonOlder, glibcLocales, fetchFromGitHub, ipaddress, six, simplejson }: + +buildPythonPackage rec { + pname = "mail-parser"; + version = "3.3.1"; + + # no tests in PyPI tarball + src = fetchFromGitHub { + owner = "SpamScope"; + repo = pname; + rev = "v${version}"; + sha256 = "1b1v61zwgdx2xjzds3hp6bv53yq424hhlrhf445n4faj1l0c4lkg"; + }; + + LC_ALL = "en_US.utf-8"; + + # ipaddress is part of the standard library of Python 3.3+ + prePatch = lib.optionalString (!pythonOlder "3.3") '' + substituteInPlace requirements.txt \ + --replace "ipaddress" "" + ''; + + nativeBuildInputs = [ glibcLocales ]; + propagatedBuildInputs = [ simplejson six ] ++ lib.optional (pythonOlder "3.3") ipaddress; + + # Taken from .travis.yml + checkPhase = '' + ${python.interpreter} tests/test_main.py + ${python.interpreter} -m mailparser -v + ${python.interpreter} -m mailparser -h + ${python.interpreter} -m mailparser -f tests/mails/mail_malformed_3 -j + cat tests/mails/mail_malformed_3 | ${python.interpreter} -m mailparser -k -j + ''; + + meta = with lib; { + description = "A mail parser for python 2 and 3"; + homepage = https://github.com/SpamScope/mail-parser; + license = licenses.asl20; + maintainers = with maintainers; [ psyanticy ]; + }; +} diff --git a/pkgs/development/python-modules/podcats/default.nix b/pkgs/development/python-modules/podcats/default.nix new file mode 100644 index 000000000000..a1b8312b134f --- /dev/null +++ b/pkgs/development/python-modules/podcats/default.nix @@ -0,0 +1,28 @@ +{ lib, buildPythonPackage, fetchFromGitHub, flask, mutagen }: + +buildPythonPackage rec { + pname = "podcats"; + version = "v0.5.0"; + name = "${pname}-${version}"; + + src = fetchFromGitHub { + owner = "jakubroztocil"; + repo = "podcats"; + rev = version; + sha256 = "0zjdgry5n209rv19kj9yaxy7c7zq5gxr488izrgs4sc75vdzz8xc"; + }; + + patchPhase = '' + substituteInPlace podcats.py \ + --replace 'debug=True' 'debug=True, use_reloader=False' + ''; + + propagatedBuildInputs = [ flask mutagen ]; + + meta = { + description = "Application that generates RSS feeds for podcast episodes from local audio files"; + homepage = https://github.com/jakubroztocil/podcats; + license = lib.licenses.bsd2; + maintainers = with lib.maintainers; [ the-kenny ]; + }; +} diff --git a/pkgs/development/python-modules/pytorch/default.nix b/pkgs/development/python-modules/pytorch/default.nix index c8376196d3ac..b0ac4e070935 100644 --- a/pkgs/development/python-modules/pytorch/default.nix +++ b/pkgs/development/python-modules/pytorch/default.nix @@ -1,7 +1,7 @@ -{ buildPythonPackage, +{ buildPythonPackage, pythonOlder, cudaSupport ? false, cudatoolkit ? null, cudnn ? null, - fetchFromGitHub, fetchpatch, lib, numpy, pyyaml, cffi, cmake, - git, stdenv, linkFarm, symlinkJoin, + fetchFromGitHub, fetchpatch, lib, numpy, pyyaml, cffi, typing, cmake, + stdenv, linkFarm, symlinkJoin, utillinux, which }: assert cudnn == null || cudatoolkit != null; @@ -25,7 +25,7 @@ let "LD_LIBRARY_PATH=${cudaStub}\${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH} "; in buildPythonPackage rec { - version = "0.3.1"; + version = "0.4.0"; pname = "pytorch"; name = "${pname}-${version}"; @@ -34,36 +34,17 @@ in buildPythonPackage rec { repo = "pytorch"; rev = "v${version}"; fetchSubmodules = true; - sha256 = "1k8fr97v5pf7rni5cr2pi21ixc3pdj3h3lkz28njbjbgkndh7mr3"; + sha256 = "12d5vqqaprk0igmih7fwa65ldmaawgijxl58h6dnw660wysc132j"; }; - patches = [ - (fetchpatch { - # make sure stdatomic.h is included when checking for ATOMIC_INT_LOCK_FREE - # Fixes this test failure: - # RuntimeError: refcounted file mapping not supported on your system at /tmp/nix-build-python3.6-pytorch-0.3.0.drv-0/source/torch/lib/TH/THAllocator.c:525 - url = "https://github.com/pytorch/pytorch/commit/502aaf39cf4a878f9e4f849e5f409573aa598aa9.patch"; - stripLen = 3; - extraPrefix = "torch/lib/"; - sha256 = "1miz4lhy3razjwcmhxqa4xmlcmhm65lqyin1czqczj8g16d3f62f"; - }) - ]; - - postPatch = '' - substituteInPlace test/run_test.sh --replace \ - "INIT_METHOD='file://'\$TEMP_DIR'/shared_init_file' \$PYCMD ./test_distributed.py" \ - "echo Skipped for Nix package" - ''; - preConfigure = lib.optionalString cudaSupport '' - export CC=${cudatoolkit.cc}/bin/gcc + export CC=${cudatoolkit.cc}/bin/gcc CXX=${cudatoolkit.cc}/bin/g++ '' + lib.optionalString (cudaSupport && cudnn != null) '' export CUDNN_INCLUDE_DIR=${cudnn}/include ''; buildInputs = [ cmake - git numpy.blas utillinux which @@ -73,10 +54,10 @@ in buildPythonPackage rec { cffi numpy pyyaml - ]; + ] ++ lib.optional (pythonOlder "3.5") typing; checkPhase = '' - ${cudaStubEnv}${stdenv.shell} test/run_test.sh + ${cudaStubEnv}python test/run_test.py --exclude distributed ''; meta = { diff --git a/pkgs/development/python-modules/smmap/default.nix b/pkgs/development/python-modules/smmap/default.nix new file mode 100644 index 000000000000..366897d3e198 --- /dev/null +++ b/pkgs/development/python-modules/smmap/default.nix @@ -0,0 +1,19 @@ +{ lib, fetchPypi, buildPythonPackage, nosexcover }: + +buildPythonPackage rec { + pname = "smmap"; + version = "0.9.0"; + src = fetchPypi { + inherit pname version; + sha256 = "0qlx25f6n2n9ff37w9gg62f217fzj16xlbh0pkz0lpxxjys64aqf"; + }; + + checkInputs = [ nosexcover ]; + + meta = { + description = "A pure python implementation of a sliding window memory map manager"; + homepage = https://github.com/gitpython-developers/smmap; + maintainers = [ ]; + license = lib.licenses.bsd3; + }; +} diff --git a/pkgs/development/python-modules/smmap2/default.nix b/pkgs/development/python-modules/smmap2/default.nix new file mode 100644 index 000000000000..ea0f0859bbd2 --- /dev/null +++ b/pkgs/development/python-modules/smmap2/default.nix @@ -0,0 +1,20 @@ +{ lib, fetchPypi, buildPythonPackage, nosexcover }: + +buildPythonPackage rec { + pname = "smmap2"; + version = "2.0.3"; + + src = fetchPypi { + inherit pname version; + sha256 = "1hvn28p3zvxa98sbi9lrqvv2ps4q284j4jq9a619zw0m7yv0sly7"; + }; + + checkInputs = [ nosexcover ]; + + meta = { + description = "A pure python implementation of a sliding window memory map manager"; + homepage = https://pypi.org/project/smmap2; + maintainers = [ ]; + license = lib.licenses.bsd3; + }; +} diff --git a/pkgs/development/python-modules/uproot/default.nix b/pkgs/development/python-modules/uproot/default.nix new file mode 100644 index 000000000000..e58bbde1353f --- /dev/null +++ b/pkgs/development/python-modules/uproot/default.nix @@ -0,0 +1,22 @@ +{lib, fetchPypi, buildPythonPackage, numpy}: + +buildPythonPackage rec { + pname = "uproot"; + version = "2.8.23"; + + src = fetchPypi { + inherit pname version; + sha256 = "121ggyl5s0q66yrbdfznvzrc793zq1w2xnr3baadlzfvqdlkhgj7"; + }; + + propagatedBuildInputs = [ + numpy + ]; + + meta = with lib; { + homepage = https://github.com/scikit-hep/uproot; + description = "ROOT I/O in pure Python and Numpy"; + license = licenses.bsd3; + maintainers = with maintainers; [ ktf ]; + }; +} diff --git a/pkgs/development/python-modules/uranium/default.nix b/pkgs/development/python-modules/uranium/default.nix index 774799f3b4d8..0917c5ab6eef 100644 --- a/pkgs/development/python-modules/uranium/default.nix +++ b/pkgs/development/python-modules/uranium/default.nix @@ -5,7 +5,7 @@ then throw "Uranium not supported for interpreter ${python.executable}" else stdenv.mkDerivation rec { - version = "3.2.1"; + version = "3.3.0"; pname = "uranium"; name = "${pname}-${version}"; @@ -13,7 +13,7 @@ stdenv.mkDerivation rec { owner = "Ultimaker"; repo = "Uranium"; rev = version; - sha256 = "1p05iw1x3rvb51p6hj57yq6nsjawjba3pyyr4jx924iq96vcc3fz"; + sha256 = "1rg0l2blndnbdfcgkjc2r29cnjdm009rz8lnc225ilh9d7w1srbb"; }; buildInputs = [ python gettext ]; |