diff options
author | Matthew Bauer <mjbauer95@gmail.com> | 2019-01-27 00:01:13 -0500 |
---|---|---|
committer | Matthew Bauer <mjbauer95@gmail.com> | 2019-01-27 00:01:13 -0500 |
commit | 92f0f8dd68e9456c1dff0f6ffa864ebd0ca87293 (patch) | |
tree | db4ea2d4f6d993a44cfd2b6ec57e354f403216cb /pkgs/development/python-modules | |
parent | 319ebef3a361a914fc2e3b90bc9ff66ed8d2e107 (diff) | |
parent | 4866cbe3418a56e46e0378db50ce764a35679faa (diff) | |
download | nixlib-92f0f8dd68e9456c1dff0f6ffa864ebd0ca87293.tar nixlib-92f0f8dd68e9456c1dff0f6ffa864ebd0ca87293.tar.gz nixlib-92f0f8dd68e9456c1dff0f6ffa864ebd0ca87293.tar.bz2 nixlib-92f0f8dd68e9456c1dff0f6ffa864ebd0ca87293.tar.lz nixlib-92f0f8dd68e9456c1dff0f6ffa864ebd0ca87293.tar.xz nixlib-92f0f8dd68e9456c1dff0f6ffa864ebd0ca87293.tar.zst nixlib-92f0f8dd68e9456c1dff0f6ffa864ebd0ca87293.zip |
Merge remote-tracking branch 'NixOS/master' into staging
Diffstat (limited to 'pkgs/development/python-modules')
34 files changed, 282 insertions, 162 deletions
diff --git a/pkgs/development/python-modules/GitPython/default.nix b/pkgs/development/python-modules/GitPython/default.nix index aef59ba2ab91..24fe4a2458d6 100644 --- a/pkgs/development/python-modules/GitPython/default.nix +++ b/pkgs/development/python-modules/GitPython/default.nix @@ -1,4 +1,4 @@ -{ lib, buildPythonPackage, fetchPypi, git, gitdb2, mock, nose, ddt }: +{ lib, buildPythonPackage, fetchPypi, isPy27, substituteAll, git, gitdb2, mock, nose, ddt }: buildPythonPackage rec { version = "2.1.11"; @@ -9,12 +9,15 @@ buildPythonPackage rec { sha256 = "8237dc5bfd6f1366abeee5624111b9d6879393d84745a507de0fda86043b65a8"; }; - checkInputs = [ mock nose ddt ]; - propagatedBuildInputs = [ gitdb2 ]; + patches = [ + (substituteAll { + src = ./hardcode-git-path.patch; + inherit git; + }) + ]; - postPatch = '' - sed -i "s|^refresh()$|refresh(path='${git}/bin/git')|" git/__init__.py - ''; + checkInputs = [ nose ] ++ lib.optional isPy27 mock; + propagatedBuildInputs = [ gitdb2 ddt ]; # Tests require a git repo doCheck = false; diff --git a/pkgs/development/python-modules/GitPython/hardcode-git-path.patch b/pkgs/development/python-modules/GitPython/hardcode-git-path.patch new file mode 100644 index 000000000000..937479959926 --- /dev/null +++ b/pkgs/development/python-modules/GitPython/hardcode-git-path.patch @@ -0,0 +1,13 @@ +diff --git a/git/cmd.py b/git/cmd.py +index a4faefe..51ad442 100644 +--- a/git/cmd.py ++++ b/git/cmd.py +@@ -175,7 +175,7 @@ class Git(LazyMixin): + + # CONFIGURATION + +- git_exec_name = "git" # default that should work on linux and windows ++ git_exec_name = "@git@/bin/git" + + # Enables debugging of GitPython's git commands + GIT_PYTHON_TRACE = os.environ.get("GIT_PYTHON_TRACE", False) diff --git a/pkgs/development/python-modules/aiohttp-socks/default.nix b/pkgs/development/python-modules/aiohttp-socks/default.nix new file mode 100644 index 000000000000..f898c9313e1f --- /dev/null +++ b/pkgs/development/python-modules/aiohttp-socks/default.nix @@ -0,0 +1,25 @@ +{ lib, fetchPypi, buildPythonPackage, pythonOlder, aiohttp }: + +buildPythonPackage rec { + pname = "aiohttp-socks"; + version = "0.2.2"; + + src = fetchPypi { + inherit version; + pname = "aiohttp_socks"; + sha256 = "0473702jk66xrgpm28wbdgpnak4v0dh2qmdjw7ky7hf3lwwqkggf"; + }; + + propagatedBuildInputs = [ aiohttp ]; + + # Checks needs internet access + doCheck = false; + + disabled = pythonOlder "3.5.3"; + + meta = { + description = "SOCKS proxy connector for aiohttp"; + license = lib.licenses.asl20; + homepage = https://github.com/romis2012/aiohttp-socks; + }; +} diff --git a/pkgs/development/python-modules/aiorpcx/default.nix b/pkgs/development/python-modules/aiorpcx/default.nix new file mode 100644 index 000000000000..1c5d651264e0 --- /dev/null +++ b/pkgs/development/python-modules/aiorpcx/default.nix @@ -0,0 +1,25 @@ +{ lib, fetchPypi, buildPythonPackage, pythonOlder, attrs }: + +buildPythonPackage rec { + pname = "aiorpcx"; + version = "0.10.2"; + + src = fetchPypi { + inherit version; + pname = "aiorpcX"; + sha256 = "1p88k15jh0d2a18pnnbfcamsqi2bxvmmhpizmdlxfdxf8vy5ggyj"; + }; + + propagatedBuildInputs = [ attrs ]; + + disabled = pythonOlder "3.6"; + + # Checks needs internet access + doCheck = false; + + meta = { + description = "Transport, protocol and framing-independent async RPC client and server implementation"; + license = lib.licenses.mit; + homepage = https://github.com/kyuupichan/aiorpcX; + }; +} diff --git a/pkgs/development/python-modules/asciimatics/default.nix b/pkgs/development/python-modules/asciimatics/default.nix new file mode 100644 index 000000000000..d83e2fdbf443 --- /dev/null +++ b/pkgs/development/python-modules/asciimatics/default.nix @@ -0,0 +1,48 @@ +{ lib +, buildPythonPackage +, fetchPypi +, setuptools_scm +, pyfiglet +, pillow +, wcwidth +, future +, mock +, nose +}: + +buildPythonPackage rec { + pname = "asciimatics"; + version = "1.10.0"; + + src = fetchPypi { + inherit pname version; + sha256 = "9101b0b6885542f324980bbe13a772475cd6a12678f601228eaaea412db919ab"; + }; + + nativeBuildInputs = [ + setuptools_scm + ]; + + propagatedBuildInputs = [ + pyfiglet + pillow + wcwidth + future + ]; + + checkInputs = [ + mock + nose + ]; + + # tests require a pty emulator + # which is too complicated to setup here + doCheck = false; + + meta = with lib; { + description = "Helps to create full-screen text UIs (from interactive forms to ASCII animations) on any platform"; + homepage = https://github.com/peterbrittain/asciimatics; + license = licenses.asl20; + maintainers = with maintainers; [ cmcdragonkai ]; + }; +} diff --git a/pkgs/development/python-modules/cryptography/default.nix b/pkgs/development/python-modules/cryptography/default.nix index 8cfc14a2beef..a58591f4b05f 100644 --- a/pkgs/development/python-modules/cryptography/default.nix +++ b/pkgs/development/python-modules/cryptography/default.nix @@ -66,4 +66,18 @@ buildPythonPackage rec { # IOKit's dependencies are inconsistent between OSX versions, so this is the best we # can do until nix 1.11's release __impureHostDeps = [ "/usr/lib" ]; + + meta = with stdenv.lib; { + description = "A package which provides cryptographic recipes and primitives"; + longDescription = '' + Cryptography includes both high level recipes and low level interfaces to + common cryptographic algorithms such as symmetric ciphers, message + digests, and key derivation functions. + Our goal is for it to be your "cryptographic standard library". It + supports Python 2.7, Python 3.4+, and PyPy 5.3+. + ''; + homepage = https://github.com/pyca/cryptography; + license = with licenses; [ asl20 bsd3 psfl ]; + maintainers = with maintainers; [ primeos ]; + }; } diff --git a/pkgs/development/python-modules/cryptography_vectors/default.nix b/pkgs/development/python-modules/cryptography_vectors/default.nix index d979f03c54df..00c726cee899 100644 --- a/pkgs/development/python-modules/cryptography_vectors/default.nix +++ b/pkgs/development/python-modules/cryptography_vectors/default.nix @@ -1,6 +1,4 @@ -{ buildPythonPackage -, fetchPypi -}: +{ buildPythonPackage, fetchPypi, lib }: buildPythonPackage rec { # also bump cryptography @@ -14,4 +12,12 @@ buildPythonPackage rec { # No tests included doCheck = false; + + meta = with lib; { + description = "Test vectors for the cryptography package"; + homepage = https://cryptography.io/en/latest/development/test-vectors/; + # Source: https://github.com/pyca/cryptography/tree/master/vectors; + license = with licenses; [ asl20 bsd3 ]; + maintainers = with maintainers; [ primeos ]; + }; } diff --git a/pkgs/development/python-modules/csvkit/default.nix b/pkgs/development/python-modules/csvkit/default.nix index 7fbdaa8909d6..48f932086cc6 100644 --- a/pkgs/development/python-modules/csvkit/default.nix +++ b/pkgs/development/python-modules/csvkit/default.nix @@ -1,6 +1,6 @@ { lib, fetchPypi, buildPythonPackage, isPy3k , agate, agate-excel, agate-dbf, agate-sql, six -, argparse, ordereddict, simplejson +, ordereddict, simplejson , glibcLocales, nose, mock, unittest2 }: @@ -16,7 +16,7 @@ buildPythonPackage rec { propagatedBuildInputs = [ agate agate-excel agate-dbf agate-sql six ] ++ lib.optionals (!isPy3k) [ - argparse ordereddict simplejson + ordereddict simplejson ]; checkInputs = [ diff --git a/pkgs/development/python-modules/elasticsearch-dsl/default.nix b/pkgs/development/python-modules/elasticsearch-dsl/default.nix index 94d47073764e..805bacbd716a 100644 --- a/pkgs/development/python-modules/elasticsearch-dsl/default.nix +++ b/pkgs/development/python-modules/elasticsearch-dsl/default.nix @@ -11,11 +11,11 @@ buildPythonPackage rec { pname = "elasticsearch-dsl"; - version = "6.2.1"; + version = "6.3.1"; src = fetchPypi { inherit pname version; - sha256 = "0f0w23kzyym0fkzisdkcl4xpnm8fsi97v1kskyvfrhj3mxy179fh"; + sha256 = "1gh8a0shqi105k325hgwb9avrpdjh0mc6mxwfg9ba7g6lssb702z"; }; propagatedBuildInputs = [ elasticsearch python-dateutil six ] diff --git a/pkgs/development/python-modules/faker/default.nix b/pkgs/development/python-modules/faker/default.nix index 9a46d9611e08..548c7a59bc6f 100644 --- a/pkgs/development/python-modules/faker/default.nix +++ b/pkgs/development/python-modules/faker/default.nix @@ -8,11 +8,11 @@ assert pythonOlder "3.3" -> ipaddress != null; buildPythonPackage rec { pname = "Faker"; - version = "1.0.1"; + version = "1.0.2"; src = fetchPypi { inherit pname version; - sha256 = "067mdy9p1vbkypr3vazmrb0sga6maqbk542hr7hmzcb5lp3dr8sj"; + sha256 = "0v1pjzn9z20ckgv3kji7c8nwcsm7670z4i43ic9skjrdbcqylwfq"; }; buildInputs = [ pytestrunner ]; @@ -30,6 +30,7 @@ buildPythonPackage rec { ] ++ lib.optional (pythonOlder "3.3") ipaddress; postPatch = '' + find tests -type d -name "__pycache__" | xargs rm -r substituteInPlace setup.py --replace "pytest>=3.8.0,<3.9" "pytest" ''; diff --git a/pkgs/development/python-modules/fuzzywuzzy/default.nix b/pkgs/development/python-modules/fuzzywuzzy/default.nix new file mode 100644 index 000000000000..7091799decab --- /dev/null +++ b/pkgs/development/python-modules/fuzzywuzzy/default.nix @@ -0,0 +1,21 @@ +{ stdenv, buildPythonPackage, fetchPypi, python-Levenshtein, pycodestyle, hypothesis, pytest }: + +buildPythonPackage rec { + pname = "fuzzywuzzy"; + version = "0.17.0"; + + src = fetchPypi { + inherit pname version; + sha256 = "6f49de47db00e1c71d40ad16da42284ac357936fa9b66bea1df63fed07122d62"; + }; + + propagatedBuildInputs = [ python-Levenshtein ]; + checkInputs = [ pycodestyle hypothesis pytest ]; + + meta = with stdenv.lib; { + description = "Fuzzy string matching for Python"; + homepage = https://github.com/seatgeek/fuzzywuzzy; + license = licenses.gpl2; + maintainers = with maintainers; [ earvstedt ]; + }; +} diff --git a/pkgs/development/python-modules/jellyfish/default.nix b/pkgs/development/python-modules/jellyfish/default.nix index c18b6c5cac47..5daa3c214964 100644 --- a/pkgs/development/python-modules/jellyfish/default.nix +++ b/pkgs/development/python-modules/jellyfish/default.nix @@ -1,17 +1,20 @@ { lib , buildPythonPackage , fetchPypi +, isPy3k , pytest , unicodecsv }: buildPythonPackage rec { pname = "jellyfish"; - version = "0.6.1"; + version = "0.7.1"; + + disabled = !isPy3k; src = fetchPypi { inherit pname version; - sha256 = "5104e45a2b804b48a46a92a5e6d6e86830fe60ae83b1da32c867402c8f4c2094"; + sha256 = "1hd1xzw22g1cp2dpf5bbpg8a7iac2v9hw0xrj5n5j83inh5n99br"; }; checkInputs = [ pytest unicodecsv ]; diff --git a/pkgs/development/python-modules/kaptan/default.nix b/pkgs/development/python-modules/kaptan/default.nix index 89f2c1ecacaf..455f90a01644 100644 --- a/pkgs/development/python-modules/kaptan/default.nix +++ b/pkgs/development/python-modules/kaptan/default.nix @@ -15,11 +15,13 @@ buildPythonPackage rec { propagatedBuildInputs = [ pyyaml ]; + # No tests in archive + doCheck = false; + meta = with stdenv.lib; { description = "Configuration manager for python applications"; - homepage = https://emre.github.io/kaptan/; + homepage = https://kaptan.readthedocs.io/; license = licenses.bsd3; - platforms = platforms.linux; maintainers = with maintainers; [ jgeerds ]; }; diff --git a/pkgs/development/python-modules/libtmux/default.nix b/pkgs/development/python-modules/libtmux/default.nix index 417baed95603..43b75b30f5a4 100644 --- a/pkgs/development/python-modules/libtmux/default.nix +++ b/pkgs/development/python-modules/libtmux/default.nix @@ -21,8 +21,6 @@ buildPythonPackage rec { description = "Scripting library for tmux"; homepage = https://libtmux.readthedocs.io/; license = licenses.bsd3; - platforms = platforms.linux; maintainers = with maintainers; [ jgeerds ]; }; } - diff --git a/pkgs/development/python-modules/limitlessled/default.nix b/pkgs/development/python-modules/limitlessled/default.nix new file mode 100644 index 000000000000..c2029aa6d6bd --- /dev/null +++ b/pkgs/development/python-modules/limitlessled/default.nix @@ -0,0 +1,18 @@ +{ lib, buildPythonPackage, fetchPypi }: + +buildPythonPackage rec { + pname = "limitlessled"; + version = "1.1.3"; + + src = fetchPypi { + inherit pname version; + sha256 = "0pd71wxqjvznx10brsj1sgy3420bz7awbzk9jlj422rrdxql754j"; + }; + + meta = with lib; { + description = "Control LimitlessLED products"; + homepage = https://github.com/happyleavesaoc/python-limitlessled/; + license = licenses.mit; + maintainers = with maintainers; [ sephalon ]; + }; +} diff --git a/pkgs/development/python-modules/mrbob/default.nix b/pkgs/development/python-modules/mrbob/default.nix index 6dbfa1fae603..388e0148d0a0 100644 --- a/pkgs/development/python-modules/mrbob/default.nix +++ b/pkgs/development/python-modules/mrbob/default.nix @@ -1,4 +1,4 @@ -{ buildPythonPackage, stdenv, glibcLocales, mock, nose, isPy3k, argparse, jinja2, six +{ buildPythonPackage, stdenv, glibcLocales, mock, nose, isPy3k, jinja2, six , fetchPypi }: @@ -18,7 +18,7 @@ buildPythonPackage rec { LC_ALL="en_US.UTF-8" nosetests ''; - propagatedBuildInputs = [ argparse jinja2 six ]; + propagatedBuildInputs = [ jinja2 six ]; meta = with stdenv.lib; { homepage = https://github.com/domenkozar/mr.bob; diff --git a/pkgs/development/python-modules/numba/default.nix b/pkgs/development/python-modules/numba/default.nix index c183442e0e9e..41aa7f7a0c8a 100644 --- a/pkgs/development/python-modules/numba/default.nix +++ b/pkgs/development/python-modules/numba/default.nix @@ -7,7 +7,6 @@ , isPy3k , numpy , llvmlite -, argparse , funcsigs , singledispatch , libcxx @@ -24,7 +23,7 @@ buildPythonPackage rec { NIX_CFLAGS_COMPILE = stdenv.lib.optionalString stdenv.isDarwin "-I${libcxx}/include/c++/v1"; - propagatedBuildInputs = [numpy llvmlite argparse] ++ stdenv.lib.optional (!isPy3k) funcsigs ++ stdenv.lib.optional (isPy27 || isPy33) singledispatch; + propagatedBuildInputs = [numpy llvmlite] ++ stdenv.lib.optional (!isPy3k) funcsigs ++ stdenv.lib.optional (isPy27 || isPy33) singledispatch; # Copy test script into $out and run the test suite. checkPhase = '' diff --git a/pkgs/development/python-modules/obfsproxy/default.nix b/pkgs/development/python-modules/obfsproxy/default.nix index 2f435201d21d..8abd3f22ea3d 100644 --- a/pkgs/development/python-modules/obfsproxy/default.nix +++ b/pkgs/development/python-modules/obfsproxy/default.nix @@ -2,7 +2,6 @@ , buildPythonPackage , fetchgit , pyptlib -, argparse , twisted , pycrypto , pyyaml @@ -23,7 +22,7 @@ buildPythonPackage rec { substituteInPlace setup.py --replace "argparse" "" ''; - propagatedBuildInputs = [ pyptlib argparse twisted pycrypto pyyaml ]; + propagatedBuildInputs = [ pyptlib twisted pycrypto pyyaml ]; # No tests in archive doCheck = false; diff --git a/pkgs/development/python-modules/owslib/default.nix b/pkgs/development/python-modules/owslib/default.nix index 024c3b4c8ee7..22b9360a56a0 100644 --- a/pkgs/development/python-modules/owslib/default.nix +++ b/pkgs/development/python-modules/owslib/default.nix @@ -5,7 +5,7 @@ buildPythonPackage rec { src = fetchPypi { inherit pname version; - sha256 = "b2e7fd694d3cffcee79317bad492d60c0aa887aea6916517c051c3247b33b5a5"; + sha256 = "19dm6dxj9hsiq0bnb4d6ms3sh2hcss9d9fhpjgkwxzrw9mlzvrxj"; }; buildInputs = [ pytest ]; diff --git a/pkgs/development/python-modules/pastescript/default.nix b/pkgs/development/python-modules/pastescript/default.nix index 3507729ee94e..ac85b4be1200 100644 --- a/pkgs/development/python-modules/pastescript/default.nix +++ b/pkgs/development/python-modules/pastescript/default.nix @@ -6,7 +6,6 @@ , paste , PasteDeploy , cheetah -, argparse }: buildPythonPackage rec { @@ -19,7 +18,7 @@ buildPythonPackage rec { }; buildInputs = [ nose ]; - propagatedBuildInputs = [ six paste PasteDeploy cheetah argparse ]; + propagatedBuildInputs = [ six paste PasteDeploy cheetah ]; doCheck = false; diff --git a/pkgs/development/python-modules/progressbar2/default.nix b/pkgs/development/python-modules/progressbar2/default.nix index 18fb14c3aa9a..362e73c0d71e 100644 --- a/pkgs/development/python-modules/progressbar2/default.nix +++ b/pkgs/development/python-modules/progressbar2/default.nix @@ -1,39 +1,38 @@ { stdenv , python , buildPythonPackage -, fetchFromGitHub +, fetchPypi , pytest , python-utils , sphinx -, coverage -, execnet , flake8 , pytestpep8 , pytestflakes , pytestcov , pytestcache -, pep8 , pytestrunner +, freezegun }: buildPythonPackage rec { pname = "progressbar2"; - version = "3.12.0"; + version = "3.39.2"; - # Use source from GitHub, PyPI is missing tests - # https://github.com/WoLpH/python-progressbar/issues/151 - src = fetchFromGitHub { - owner = "WoLpH"; - repo = "python-progressbar"; - rev = "v${version}"; - sha256 = "1gk45sh8cd0kkyvzcvx95z6nlblmyx0x189mjfv3vfa43cr1mb0f"; + src = fetchPypi { + inherit pname version; + sha256 = "6eb5135b987caca4212d2c7abc2923d4ad5ba18bb34ccbe7044b3628f52efc2c"; }; + postPatch = '' + rm -r tests/__pycache__ + rm tests/*.pyc + ''; + propagatedBuildInputs = [ python-utils ]; nativeBuildInputs = [ pytestrunner ]; checkInputs = [ - pytest sphinx coverage execnet flake8 pytestpep8 pytestflakes pytestcov - pytestcache pep8 + pytest sphinx flake8 pytestpep8 pytestflakes pytestcov + pytestcache freezegun ]; # ignore tests on the nix wrapped setup.py and don't flake .eggs directory checkPhase = '' diff --git a/pkgs/development/python-modules/pyarrow/default.nix b/pkgs/development/python-modules/pyarrow/default.nix index d588ebb12e47..a66d8f7a0250 100644 --- a/pkgs/development/python-modules/pyarrow/default.nix +++ b/pkgs/development/python-modules/pyarrow/default.nix @@ -1,4 +1,4 @@ -{ lib, buildPythonPackage, python, isPy3k, fetchurl, arrow-cpp, cmake, cython, futures, numpy, pandas, pytest, pkgconfig, setuptools_scm, six }: +{ lib, buildPythonPackage, python, isPy3k, fetchurl, arrow-cpp, cmake, cython, futures, hypothesis, numpy, pandas, pytest, pkgconfig, setuptools_scm, six }: let _arrow-cpp = arrow-cpp.override { inherit python; }; @@ -13,10 +13,15 @@ buildPythonPackage rec { nativeBuildInputs = [ cmake cython pkgconfig setuptools_scm ]; propagatedBuildInputs = [ numpy six ] ++ lib.optionals (!isPy3k) [ futures ]; - checkInputs = [ pandas pytest ]; + checkInputs = [ hypothesis pandas pytest ]; PYARROW_BUILD_TYPE = "release"; - PYARROW_CMAKE_OPTIONS = "-DCMAKE_INSTALL_RPATH=${ARROW_HOME}/lib"; + PYARROW_CMAKE_OPTIONS = [ + "-DCMAKE_INSTALL_RPATH=${ARROW_HOME}/lib" + + # for some reason cmake won't set -std=c++11 for clang + "-DPYARROW_CXXFLAGS=-std=c++11" + ]; preCheck = '' rm pyarrow/tests/test_jvm.py diff --git a/pkgs/development/python-modules/pygame/git.nix b/pkgs/development/python-modules/pygame/git.nix deleted file mode 100644 index 1d8ba697f38b..000000000000 --- a/pkgs/development/python-modules/pygame/git.nix +++ /dev/null @@ -1,47 +0,0 @@ -{ stdenv, lib, fetchFromBitbucket, buildPythonPackage, python, smpeg, libX11 -, SDL, SDL_image, SDL_mixer, SDL_ttf, libpng, libjpeg, portmidi -}: - -buildPythonPackage rec { - pname = "pygame"; - version = "2016-05-17"; - name = pname + "-" + version; - - src = fetchFromBitbucket { - owner = "pygame"; - repo = "pygame"; - rev = "575c7a74d85a37db7c645421c02cf0b6b78a889f"; - sha256 = "1i5xqmw93kfidcji2wacgkm5y4mcnbksy8iimih0729k19rbhznc"; - }; - - buildInputs = [ - SDL SDL_image SDL_mixer SDL_ttf libpng libjpeg - smpeg portmidi libX11 - ]; - - # Tests fail because of no audio device and display. - doCheck = false; - - preConfigure = '' - sed \ - -e "s/^origincdirs = .*/origincdirs = []/" \ - -e "s/^origlibdirs = .*/origlibdirs = []/" \ - -i config_unix.py - ${lib.concatMapStrings (dep: '' - sed \ - -e "/^origincdirs =/aorigincdirs += ['${lib.getDev dep}/include']" \ - -e "/^origlibdirs =/aoriglibdirs += ['${lib.getLib dep}/lib']" \ - -i config_unix.py - '') buildInputs - } - LOCALBASE=/ ${python.interpreter} config.py - ''; - - meta = with stdenv.lib; { - description = "Python library for games"; - homepage = http://www.pygame.org/; - license = licenses.lgpl21Plus; - platforms = platforms.linux; - broken = true; - }; -} diff --git a/pkgs/development/python-modules/pymongo/2_9_1.nix b/pkgs/development/python-modules/pymongo/2_9_1.nix deleted file mode 100644 index 8e0b0858754d..000000000000 --- a/pkgs/development/python-modules/pymongo/2_9_1.nix +++ /dev/null @@ -1,24 +0,0 @@ -{ stdenv -, buildPythonPackage -, fetchPypi -}: - -buildPythonPackage rec { - pname = "pymongo"; - version = "2.9.5"; - - src = fetchPypi { - inherit pname version; - sha256 = "912516ac6a355d7624374a38337b8587afe3eb535c0a5456b3bd12df637a6e70"; - }; - - # Tests call a running mongodb instance - doCheck = false; - - meta = with stdenv.lib; { - homepage = https://github.com/mongodb/mongo-python-driver; - license = licenses.asl20; - description = "Python driver for MongoDB "; - }; - -} diff --git a/pkgs/development/python-modules/pymongo/default.nix b/pkgs/development/python-modules/pymongo/default.nix index 392a0ec580fe..792b8b1bd5b4 100644 --- a/pkgs/development/python-modules/pymongo/default.nix +++ b/pkgs/development/python-modules/pymongo/default.nix @@ -1,20 +1,20 @@ -{ stdenv, buildPythonPackage, fetchPypi }: +{ lib, buildPythonPackage, fetchPypi }: buildPythonPackage rec { pname = "pymongo"; version = "3.7.2"; - name = "${pname}-${version}"; src = fetchPypi { inherit pname version; sha256 = "8c74e2a9b594f7962c62cef7680a4cb92a96b4e6e3c2f970790da67cc0213a7e"; }; + # Tests call a running mongodb instance doCheck = false; - meta = with stdenv.lib; { + meta = with lib; { homepage = https://github.com/mongodb/mongo-python-driver; license = licenses.asl20; - description = "Python driver for MongoDB "; + description = "Python driver for MongoDB"; }; } diff --git a/pkgs/development/python-modules/python-gnupg/default.nix b/pkgs/development/python-modules/python-gnupg/default.nix index 86e58d489a61..1ecf5fe10618 100644 --- a/pkgs/development/python-modules/python-gnupg/default.nix +++ b/pkgs/development/python-modules/python-gnupg/default.nix @@ -1,17 +1,14 @@ { stdenv, buildPythonPackage, fetchPypi, gnupg1 }: buildPythonPackage rec { - name = "${pname}-${version}"; pname = "python-gnupg"; - version = "0.4.3"; + version = "0.4.4"; src = fetchPypi { inherit pname version; - sha256 = "2d158dfc6b54927752b945ebe57e6a0c45da27747fa3b9ae66eccc0d2147ac0d"; + sha256 = "45daf020b370bda13a1429c859fcdff0b766c0576844211446f9266cae97fb0e"; }; - propagatedBuildInputs = [ gnupg1 ]; - # Let's make the library default to our gpg binary patchPhase = '' substituteInPlace gnupg.py \ diff --git a/pkgs/development/python-modules/python-utils/default.nix b/pkgs/development/python-modules/python-utils/default.nix index b7744ce79c3b..7aa776540061 100644 --- a/pkgs/development/python-modules/python-utils/default.nix +++ b/pkgs/development/python-modules/python-utils/default.nix @@ -1,29 +1,23 @@ -{ lib, buildPythonPackage, fetchFromGitHub, pytest, pytestrunner, pytestcov, pytestflakes, pytestpep8, sphinx, six }: +{ lib, buildPythonPackage, fetchPypi, pytest, pytestrunner, pytestcov, pytestflakes, pytestpep8, sphinx, six }: buildPythonPackage rec { pname = "python-utils"; version = "2.3.0"; - name = pname + "-" + version; - src = fetchFromGitHub { - owner = "WoLpH"; - repo = "python-utils"; - rev = "v${version}"; - sha256 = "14gyphcqwa77wfbnrzj363v3fdkxy08378lgd7l3jqnpvr8pfp5c"; + src = fetchPypi { + inherit pname version; + sha256 = "34aaf26b39b0b86628008f2ae0ac001b30e7986a8d303b61e1357dfcdad4f6d3"; }; - checkInputs = [ pytest pytestrunner pytestcov pytestflakes pytestpep8 sphinx ]; - postPatch = '' - # pytest-runner is only actually required in checkPhase - substituteInPlace setup.py --replace "setup_requires=['pytest-runner']," "" + rm -r tests/__pycache__ + rm tests/*.pyc ''; - # Tests failing - doCheck = false; + checkInputs = [ pytest pytestrunner pytestcov pytestflakes pytestpep8 sphinx ]; checkPhase = '' - py.test + py.test tests ''; propagatedBuildInputs = [ six ]; diff --git a/pkgs/development/python-modules/pyutil/default.nix b/pkgs/development/python-modules/pyutil/default.nix index 13ea7b75ae3f..b7c38c512652 100644 --- a/pkgs/development/python-modules/pyutil/default.nix +++ b/pkgs/development/python-modules/pyutil/default.nix @@ -5,7 +5,6 @@ , setuptoolsTrial , simplejson , zbase32 -, argparse , twisted , isPyPy }: @@ -20,7 +19,7 @@ buildPythonPackage rec { }; buildInputs = [ setuptoolsDarcs setuptoolsTrial ] ++ (if doCheck then [ simplejson ] else []); - propagatedBuildInputs = [ argparse twisted ]; + propagatedBuildInputs = [ twisted ]; # Tests fail because they try to write new code into the twisted # package, apparently some kind of plugin. diff --git a/pkgs/development/python-modules/pywal/default.nix b/pkgs/development/python-modules/pywal/default.nix index 00691e65225c..7f908c943aef 100644 --- a/pkgs/development/python-modules/pywal/default.nix +++ b/pkgs/development/python-modules/pywal/default.nix @@ -1,10 +1,10 @@ -{ lib, python3Packages, imagemagick, feh }: +{ lib, buildPythonPackage, fetchPypi, imagemagick, feh, isPy3k }: -python3Packages.buildPythonApplication rec { +buildPythonPackage rec { pname = "pywal"; version = "3.2.1"; - src = python3Packages.fetchPypi { + src = fetchPypi { inherit pname version; sha256 = "1pj30h19ijwhmbm941yzbkgr19q06dhp9492h9nrqw1wfjfdbdic"; }; @@ -19,6 +19,9 @@ python3Packages.buildPythonApplication rec { ./feh.patch ]; + # Invalid syntax + disabled = !isPy3k; + postPatch = '' substituteInPlace pywal/backends/wal.py --subst-var-by convert "${imagemagick}/bin/convert" substituteInPlace pywal/wallpaper.py --subst-var-by feh "${feh}/bin/feh" diff --git a/pkgs/development/python-modules/remotecv/default.nix b/pkgs/development/python-modules/remotecv/default.nix index 2102cf064250..a4d1dcc485ec 100644 --- a/pkgs/development/python-modules/remotecv/default.nix +++ b/pkgs/development/python-modules/remotecv/default.nix @@ -1,11 +1,11 @@ -{ stdenv, buildPythonPackage, fetchFromGitHub, pillow, argparse, pyres, nose +{ stdenv, buildPythonPackage, fetchFromGitHub, pillow, pyres, nose , preggy, numpy, yanc, nose-focus, mock, opencv }: buildPythonPackage rec { pname = "remotecv"; version = "2.2.2"; - propagatedBuildInputs = [ pillow argparse pyres ]; + propagatedBuildInputs = [ pillow pyres ]; checkInputs = [ nose preggy numpy yanc nose-focus mock opencv ]; diff --git a/pkgs/development/python-modules/robomachine/default.nix b/pkgs/development/python-modules/robomachine/default.nix index f29cafb7aeed..58a767432a22 100644 --- a/pkgs/development/python-modules/robomachine/default.nix +++ b/pkgs/development/python-modules/robomachine/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchPypi, buildPythonPackage, pyparsing, argparse, robotframework, allpairspy }: +{ stdenv, fetchPypi, buildPythonPackage, pyparsing, robotframework, allpairspy }: buildPythonPackage rec { pname = "RoboMachine"; @@ -9,7 +9,7 @@ buildPythonPackage rec { sha256 = "242cfd9be0f7591138eaeba03c9c190f894ce045e1767ab7b90eca330259fc45"; }; - propagatedBuildInputs = [ pyparsing argparse robotframework allpairspy ]; + propagatedBuildInputs = [ pyparsing robotframework allpairspy ]; # Remove Windows .bat files postInstall = '' diff --git a/pkgs/development/python-modules/stevedore/default.nix b/pkgs/development/python-modules/stevedore/default.nix index 8027688c9ea5..4e607799d229 100644 --- a/pkgs/development/python-modules/stevedore/default.nix +++ b/pkgs/development/python-modules/stevedore/default.nix @@ -1,4 +1,4 @@ -{ stdenv, buildPythonPackage, fetchPypi, pbr, six, argparse }: +{ stdenv, buildPythonPackage, fetchPypi, pbr, six }: buildPythonPackage rec { pname = "stevedore"; @@ -11,7 +11,7 @@ buildPythonPackage rec { doCheck = false; - propagatedBuildInputs = [ pbr six argparse ]; + propagatedBuildInputs = [ pbr six ]; meta = with stdenv.lib; { description = "Manage dynamic plugins for Python applications"; diff --git a/pkgs/development/python-modules/trezor/default.nix b/pkgs/development/python-modules/trezor/default.nix index 878de1875190..7808eb359326 100644 --- a/pkgs/development/python-modules/trezor/default.nix +++ b/pkgs/development/python-modules/trezor/default.nix @@ -1,27 +1,48 @@ -{ lib, fetchPypi, buildPythonPackage, - protobuf, hidapi, ecdsa, mnemonic, requests, pyblake2, click, libusb1, rlp, isPy3k +{ lib, fetchPypi, buildPythonPackage, isPy3k, python, pytest +, typing-extensions +, protobuf +, hidapi +, ecdsa +, mnemonic +, requests +, pyblake2 +, click +, construct +, libusb1 +, rlp }: buildPythonPackage rec { pname = "trezor"; - version = "0.10.2"; + version = "0.11.1"; disabled = !isPy3k; src = fetchPypi { inherit pname version; - sha256 = "4dba4d5c53d3ca22884d79fb4aa68905fb8353a5da5f96c734645d8cf537138d"; + sha256 = "6043f321d856e1b45b9df0c37810264f08d065bb56cd999f61a05fe2906e9e18"; }; - propagatedBuildInputs = [ protobuf hidapi ecdsa mnemonic requests pyblake2 click libusb1 rlp ]; + propagatedBuildInputs = [ typing-extensions protobuf hidapi ecdsa mnemonic requests pyblake2 click construct libusb1 rlp ]; - # There are no actual tests: "ImportError: No module named tests" - doCheck = false; + # build requires UTF-8 locale + LANG = "en_US.UTF-8"; + + checkInputs = [ + pytest + ]; + + # disable test_tx_api.py as it requires being online + checkPhase = '' + runHook preCheck + ${python.interpreter} -m pytest --pyarg trezorlib.tests.unit_tests --ignore trezorlib/tests/unit_tests/test_tx_api.py + runHook postCheck + ''; meta = { description = "Python library for communicating with TREZOR Bitcoin Hardware Wallet"; homepage = https://github.com/trezor/python-trezor; license = lib.licenses.gpl3; - maintainers = with lib.maintainers; [ np ]; + maintainers = with lib.maintainers; [ np prusnak ]; }; } diff --git a/pkgs/development/python-modules/worldengine/default.nix b/pkgs/development/python-modules/worldengine/default.nix index 0a49c2566409..cdb60946079d 100644 --- a/pkgs/development/python-modules/worldengine/default.nix +++ b/pkgs/development/python-modules/worldengine/default.nix @@ -7,7 +7,6 @@ , pyplatec , protobuf , purepng -, argparse , h5py , gdal }: @@ -35,7 +34,7 @@ buildPythonPackage rec { ''; buildInputs = [ nose ]; - propagatedBuildInputs = [ noise numpy pyplatec protobuf purepng argparse h5py gdal ]; + propagatedBuildInputs = [ noise numpy pyplatec protobuf purepng h5py gdal ]; prePatch = '' substituteInPlace setup.py \ |