diff options
Diffstat (limited to 'pkgs/development/python-modules')
-rw-r--r-- | pkgs/development/python-modules/GitPython/default.nix | 24 | ||||
-rw-r--r-- | pkgs/development/python-modules/Theano/default.nix | 9 | ||||
-rw-r--r-- | pkgs/development/python-modules/gitdb/default.nix | 23 | ||||
-rw-r--r-- | pkgs/development/python-modules/gitdb2/default.nix | 23 | ||||
-rw-r--r-- | pkgs/development/python-modules/ipython/5.nix | 4 | ||||
-rw-r--r-- | pkgs/development/python-modules/isort/default.nix | 28 | ||||
-rw-r--r-- | pkgs/development/python-modules/libgpuarray/default.nix | 7 | ||||
-rw-r--r-- | pkgs/development/python-modules/podcats/default.nix | 28 | ||||
-rw-r--r-- | pkgs/development/python-modules/pytorch/default.nix | 35 | ||||
-rw-r--r-- | pkgs/development/python-modules/smmap/default.nix | 19 | ||||
-rw-r--r-- | pkgs/development/python-modules/smmap2/default.nix | 20 | ||||
-rw-r--r-- | pkgs/development/python-modules/uproot/default.nix | 22 |
12 files changed, 210 insertions, 32 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/Theano/default.nix b/pkgs/development/python-modules/Theano/default.nix index 03dc825218e2..9eb04782d6f8 100644 --- a/pkgs/development/python-modules/Theano/default.nix +++ b/pkgs/development/python-modules/Theano/default.nix @@ -15,17 +15,24 @@ , libgpuarray , cudaSupport ? false, cudatoolkit , cudnnSupport ? false, cudnn +, nvidia_x11 }: assert cudnnSupport -> cudaSupport; +assert cudaSupport -> nvidia_x11 != null + && cudatoolkit != null + && cudnn != null; + let extraFlags = lib.optionals cudaSupport [ "-I ${cudatoolkit}/include" "-L ${cudatoolkit}/lib" ] - ++ lib.optionals cudnnSupport [ "-I ${cudnn}/include" "-L ${cudnn}/lib" ]; + ++ lib.optionals cudnnSupport [ "-I ${cudnn}/include" "-L ${cudnn}/lib" ] + ++ lib.optionals cudaSupport [ "-I ${libgpuarray}/include" "-L ${libgpuarray}/lib" ]; gcc_ = writeScriptBin "g++" '' #!${stdenv.shell} + export NIX_CC_WRAPPER_${stdenv.cc.infixSalt}_TARGET_HOST=1 export NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE ${toString extraFlags}" exec ${gcc}/bin/g++ "$@" ''; 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/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/libgpuarray/default.nix b/pkgs/development/python-modules/libgpuarray/default.nix index 26fe33995ed8..14e83584678c 100644 --- a/pkgs/development/python-modules/libgpuarray/default.nix +++ b/pkgs/development/python-modules/libgpuarray/default.nix @@ -9,10 +9,13 @@ , nose , Mako , python -, cudaSupport ? false, cudatoolkit +, cudaSupport ? false, cudatoolkit , nvidia_x11 , openclSupport ? true, ocl-icd, clblas }: +assert cudaSupport -> nvidia_x11 != null + && cudatoolkit != null; + buildPythonPackage rec { pname = "libgpuarray"; version = "0.7.5"; @@ -32,7 +35,7 @@ buildPythonPackage rec { libraryPath = lib.makeLibraryPath ( [] - ++ lib.optionals cudaSupport [ cudatoolkit.lib cudatoolkit.out ] + ++ lib.optionals cudaSupport [ cudatoolkit.lib cudatoolkit.out nvidia_x11 ] ++ lib.optionals openclSupport ([ clblas ] ++ lib.optional (!stdenv.isDarwin) ocl-icd) ); 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 ]; + }; +} |