diff options
author | Wael M. Nasreddine <wael.nasreddine@gmail.com> | 2019-03-21 21:01:25 -0700 |
---|---|---|
committer | Wael M. Nasreddine <wael.nasreddine@gmail.com> | 2019-03-21 21:01:25 -0700 |
commit | 5af0780492827a0c9525e255371f9e7df0f3bb1d (patch) | |
tree | 14bebf201b7402984908f1e5c889d8bedbfc0561 /pkgs/development/python-modules | |
parent | 7957a93520d458727c19532c607f6d7176f78207 (diff) | |
parent | 52dae14f0c763dd48572058f0f0906166da14c31 (diff) | |
download | nixpkgs-5af0780492827a0c9525e255371f9e7df0f3bb1d.tar nixpkgs-5af0780492827a0c9525e255371f9e7df0f3bb1d.tar.gz nixpkgs-5af0780492827a0c9525e255371f9e7df0f3bb1d.tar.bz2 nixpkgs-5af0780492827a0c9525e255371f9e7df0f3bb1d.tar.lz nixpkgs-5af0780492827a0c9525e255371f9e7df0f3bb1d.tar.xz nixpkgs-5af0780492827a0c9525e255371f9e7df0f3bb1d.tar.zst nixpkgs-5af0780492827a0c9525e255371f9e7df0f3bb1d.zip |
Merge remote-tracking branch 'origin/master' into staging
* origin/master: (693 commits) buildGoModule: use go_1_12 instead of go_1_11 (#58103) gitAndTools.lab: 0.15.2 -> 0.15.3 (#58091) signal-desktop: 1.22.0 -> 1.23.0 added missing semicolon to documentation terminus_font_ttf: 4.46.0 -> 4.47.0 buildGoModule: remove SSL env vars in favor of cacert in buildInputs (#58071) dav1d: init at 0.2.1 dropbox-cli: 2018.11.28 -> 2019.02.14 atlassian-confluence: 6.14.1 -> 6.14.2 maintainers: update email for dywedir python.pkgs.hglib: use patch to specify hg path (#57926) chkrootkit: 0.52 -> 0.53 radare2-cutter: 1.7.2 -> 1.8.0 autorandr: 1.7 -> 1.8 pythonPackages.pyhepmc: fix build llvm-polly/clang-polly: use latest llvm apulse: 0.1.11.1 -> 0.1.12, cleanup factorio: experimental 0.17.14 → 0.17.16 (#58000) sequeler: 0.6.7 -> 0.6.8 nasc: 0.5.1 -> 0.5.2 ...
Diffstat (limited to 'pkgs/development/python-modules')
133 files changed, 1455 insertions, 429 deletions
diff --git a/pkgs/development/python-modules/agate-excel/default.nix b/pkgs/development/python-modules/agate-excel/default.nix index 24287039abd..4636f51d4bd 100644 --- a/pkgs/development/python-modules/agate-excel/default.nix +++ b/pkgs/development/python-modules/agate-excel/default.nix @@ -1,21 +1,28 @@ -{ stdenv, fetchPypi, buildPythonPackage, agate, openpyxl, xlrd }: +{ lib, fetchPypi, fetchpatch, buildPythonPackage +, agate, openpyxl, xlrd, nose +}: buildPythonPackage rec { - pname = "agate-excel"; - version = "0.2.2"; + pname = "agate-excel"; + version = "0.2.3"; - src = fetchPypi { - inherit pname version; - sha256 = "8923f71ee2b5b7b21e52fb314a769b28fb902f647534f5cbbb41991d8710f4c7"; - }; + src = fetchPypi { + inherit pname version; + sha256 = "8f255ef2c87c436b7132049e1dd86c8e08bf82d8c773aea86f3069b461a17d52"; + }; - propagatedBuildInputs = [ agate openpyxl xlrd ]; + propagatedBuildInputs = [ agate openpyxl xlrd ]; - meta = with stdenv.lib; { - description = "Adds read support for excel files to agate"; - homepage = "https://github.com/wireservice/agate-excel"; - license = licenses.mit; - maintainers = with maintainers; [ vrthra ]; - }; + checkInputs = [ nose ]; + checkPhase = '' + nosetests + ''; + + meta = with lib; { + description = "Adds read support for excel files to agate"; + homepage = https://github.com/wireservice/agate-excel; + license = licenses.mit; + maintainers = with maintainers; [ vrthra ]; + }; } diff --git a/pkgs/development/python-modules/aioamqp/default.nix b/pkgs/development/python-modules/aioamqp/default.nix index d7cd453c93d..8488278c934 100644 --- a/pkgs/development/python-modules/aioamqp/default.nix +++ b/pkgs/development/python-modules/aioamqp/default.nix @@ -1,5 +1,4 @@ -{ lib, buildPythonPackage, fetchPypi, isPy33, pythonOlder, - asyncio +{ lib, buildPythonPackage, fetchPypi, pythonOlder, }: buildPythonPackage rec { @@ -17,7 +16,5 @@ buildPythonPackage rec { sha256 = "17vrl6jajr81bql7kjgq0zkxy225px97z4g9wmbhbbnvzn1p92c0"; }; - buildInputs = lib.optionals isPy33 [ asyncio ]; - disabled = pythonOlder "3.3"; } diff --git a/pkgs/development/python-modules/aiodns/default.nix b/pkgs/development/python-modules/aiodns/default.nix index f7ac236a520..a8287df10f6 100644 --- a/pkgs/development/python-modules/aiodns/default.nix +++ b/pkgs/development/python-modules/aiodns/default.nix @@ -1,16 +1,17 @@ -{ stdenv, buildPythonPackage, fetchPypi -, isPy33, isPy27, isPyPy, python, pycares, typing, asyncio, trollius }: +{ stdenv, buildPythonPackage, fetchPypi, pythonOlder +, isPy27, isPyPy, python, pycares, typing, trollius }: buildPythonPackage rec { pname = "aiodns"; - version = "1.2.0"; + version = "2.0.0"; src = fetchPypi { inherit pname version; - sha256 = "d67e14b32176bcf3ff79b5d47c466011ce4adeadfa264f7949da1377332a0449"; + sha256 = "815fdef4607474295d68da46978a54481dd1e7be153c7d60f9e72773cd38d77d"; }; - propagatedBuildInputs = with stdenv.lib; [ pycares typing ] + propagatedBuildInputs = with stdenv.lib; [ pycares ] + ++ optional (pythonOlder "3.7") typing ++ optional (isPy27 || isPyPy) trollius; checkPhase = '' diff --git a/pkgs/development/python-modules/aioeventlet/default.nix b/pkgs/development/python-modules/aioeventlet/default.nix index f137484a824..ccac3e6f077 100644 --- a/pkgs/development/python-modules/aioeventlet/default.nix +++ b/pkgs/development/python-modules/aioeventlet/default.nix @@ -3,21 +3,21 @@ , fetchPypi , eventlet , trollius -, asyncio , mock , python }: buildPythonPackage rec { pname = "aioeventlet"; - version = "0.5.1"; + # version is called 0.5.1 on PyPI, but the filename is aioeventlet-0.5.2.tar.gz + version = "0.5.2"; src = fetchPypi { inherit pname version; sha256 = "cecb51ea220209e33b53cfb95124d90e4fcbee3ff8ba8a179a57120b8624b16a"; }; - propagatedBuildInputs = [ eventlet trollius asyncio ]; + propagatedBuildInputs = [ eventlet trollius ]; buildInputs = [ mock ]; # 2 tests error out diff --git a/pkgs/development/python-modules/aiofiles/default.nix b/pkgs/development/python-modules/aiofiles/default.nix index 55d68f93f2c..4728d819f05 100644 --- a/pkgs/development/python-modules/aiofiles/default.nix +++ b/pkgs/development/python-modules/aiofiles/default.nix @@ -1,10 +1,7 @@ { lib , buildPythonPackage , fetchPypi -, isPy33 , pythonOlder -, asyncio -, singledispatch }: buildPythonPackage rec { @@ -18,8 +15,6 @@ buildPythonPackage rec { disabled = pythonOlder "3.3"; - propagatedBuildInputs = lib.optionals isPy33 [ asyncio singledispatch ]; - # No tests in archive doCheck = false; diff --git a/pkgs/development/python-modules/aiorpcx/default.nix b/pkgs/development/python-modules/aiorpcx/default.nix index 346e2f33893..fd853e631a7 100644 --- a/pkgs/development/python-modules/aiorpcx/default.nix +++ b/pkgs/development/python-modules/aiorpcx/default.nix @@ -2,12 +2,12 @@ buildPythonPackage rec { pname = "aiorpcx"; - version = "0.10.4"; + version = "0.10.5"; src = fetchPypi { inherit version; pname = "aiorpcX"; - sha256 = "15jhklvl0ncy3mb2h9zkahky9fzzr1amgjylm2k3mvlpyn2dbpz6"; + sha256 = "0c4kan020s09ap5qai7p1syxjz2wk6g9ydhxj6fc35s4103x7b91"; }; propagatedBuildInputs = [ attrs ]; diff --git a/pkgs/development/python-modules/ansible/default.nix b/pkgs/development/python-modules/ansible/default.nix index 1daff95d3a8..1ec50ef7780 100644 --- a/pkgs/development/python-modules/ansible/default.nix +++ b/pkgs/development/python-modules/ansible/default.nix @@ -47,7 +47,7 @@ buildPythonPackage rec { homepage = http://www.ansible.com; description = "Radically simple IT automation"; license = [ licenses.gpl3 ] ; - maintainers = with maintainers; [ jgeerds joamaki costrouc ]; + maintainers = with maintainers; [ joamaki costrouc ]; platforms = platforms.linux ++ platforms.darwin; }; } diff --git a/pkgs/development/python-modules/aplpy/default.nix b/pkgs/development/python-modules/aplpy/default.nix new file mode 100644 index 00000000000..a173a58032d --- /dev/null +++ b/pkgs/development/python-modules/aplpy/default.nix @@ -0,0 +1,52 @@ +{ lib +, buildPythonPackage +, fetchPypi +, numpy +, astropy +, astropy-helpers +, matplotlib +, reproject +, pyavm +, pyregion +, pillow +, scikitimage +, shapely +}: + +buildPythonPackage rec { + pname = "aplpy"; + version = "2.0.3"; + + doCheck = false; # tests require pytest-astropy + + src = fetchPypi { + pname = "APLpy"; + inherit version; + sha256 = "239f3d83635ca4251536aeb577df7c60df77fc4d658097b92094719739aec3f3"; + }; + + propagatedBuildInputs = [ + numpy + astropy + astropy-helpers + matplotlib + reproject + pyavm + pyregion + pillow + scikitimage + shapely + ]; + + # Disable automatic update of the astropy-helper module + postPatch = '' + substituteInPlace setup.cfg --replace "auto_use = True" "auto_use = False" + ''; + + meta = with lib; { + description = "The Astronomical Plotting Library in Python"; + homepage = http://aplpy.github.io; + license = licenses.mit; + maintainers = [ maintainers.smaret ]; + }; +} diff --git a/pkgs/development/python-modules/astral/default.nix b/pkgs/development/python-modules/astral/default.nix index 75f0b632e87..5338b67b50d 100644 --- a/pkgs/development/python-modules/astral/default.nix +++ b/pkgs/development/python-modules/astral/default.nix @@ -13,8 +13,6 @@ buildPythonPackage rec { checkInputs = [ pytest ]; checkPhase = '' - # https://github.com/sffjunkie/astral/pull/26 - touch src/test/.api_key py.test -m "not webtest" ''; diff --git a/pkgs/development/python-modules/astropy-healpix/default.nix b/pkgs/development/python-modules/astropy-healpix/default.nix new file mode 100644 index 00000000000..2027f694c77 --- /dev/null +++ b/pkgs/development/python-modules/astropy-healpix/default.nix @@ -0,0 +1,33 @@ +{ lib +, buildPythonPackage +, fetchPypi +, numpy +, astropy +, astropy-helpers +}: + +buildPythonPackage rec { + pname = "astropy-healpix"; + version = "0.4"; + + doCheck = false; # tests require pytest-astropy + + src = fetchPypi { + inherit pname version; + sha256 = "8c9709ac923759c92eca6d2e623e734d0f417eed40ba835b77d99dec09e51aa2"; + }; + + propagatedBuildInputs = [ numpy astropy astropy-helpers ]; + + # Disable automatic update of the astropy-helper module + postPatch = '' + substituteInPlace setup.cfg --replace "auto_use = True" "auto_use = False" + ''; + + meta = with lib; { + description = "BSD-licensed HEALPix for Astropy"; + homepage = https://github.com/astropy/astropy-healpix; + license = licenses.bsd3; + maintainers = [ maintainers.smaret ]; + }; +} diff --git a/pkgs/development/python-modules/astropy-helpers/default.nix b/pkgs/development/python-modules/astropy-helpers/default.nix new file mode 100644 index 00000000000..79d6e852c68 --- /dev/null +++ b/pkgs/development/python-modules/astropy-helpers/default.nix @@ -0,0 +1,26 @@ +{ lib +, buildPythonPackage +, fetchPypi +, isPy3k +}: + +buildPythonPackage rec { + pname = "astropy-helpers"; + version = "3.1"; + + disabled = !isPy3k; + + doCheck = false; # tests requires sphinx-astropy + + src = fetchPypi { + inherit pname version; + sha256 = "37caf1f21bfdf653f7bb9f5b070dc1bb59cd70c0e09f9c5742401f57400a6e52"; + }; + + meta = with lib; { + description = "Utilities for building and installing Astropy, Astropy affiliated packages, and their respective documentation"; + homepage = https://github.com/astropy/astropy-helpers; + license = licenses.bsd3; + maintainers = [ maintainers.smaret ]; + }; +} diff --git a/pkgs/development/python-modules/asyncio/default.nix b/pkgs/development/python-modules/asyncio/default.nix deleted file mode 100644 index 5a6dbe79814..00000000000 --- a/pkgs/development/python-modules/asyncio/default.nix +++ /dev/null @@ -1,18 +0,0 @@ -{ stdenv, buildPythonPackage, fetchPypi, isPy34 }: - -buildPythonPackage rec { - pname = "asyncio"; - version = "3.4.3"; - disabled = !isPy34; - - src = fetchPypi { - inherit pname version; - sha256 = "0hfbqwk9y0bbfgxzg93s2wyk6gcjsdxlr5jwy97hx64ppkw0ydl3"; - }; - - meta = with stdenv.lib; { - description = "Reference implementation of PEP 3156"; - homepage = http://www.python.org/dev/peps/pep-3156; - license = licenses.free; - }; -} diff --git a/pkgs/development/python-modules/audio-metadata/default.nix b/pkgs/development/python-modules/audio-metadata/default.nix index bbba8deb459..9a6952c88f0 100644 --- a/pkgs/development/python-modules/audio-metadata/default.nix +++ b/pkgs/development/python-modules/audio-metadata/default.nix @@ -15,6 +15,12 @@ buildPythonPackage rec { sha256 = "a881f0f3b82752d306ac0a7850ed0e31bad275a399f63097733b4890986084b2"; }; + postPatch = '' + substituteInPlace setup.py \ + --replace "bidict>=0.17,<0.18" "bidict" \ + --replace "more-itertools>=4.0,<5.0" "more-itertools" + ''; + propagatedBuildInputs = [ attrs bidict diff --git a/pkgs/development/python-modules/autobahn/default.nix b/pkgs/development/python-modules/autobahn/default.nix index d2d1e48b4c6..0ccf3da7bec 100644 --- a/pkgs/development/python-modules/autobahn/default.nix +++ b/pkgs/development/python-modules/autobahn/default.nix @@ -1,5 +1,5 @@ -{ lib, buildPythonPackage, fetchPypi, isPy3k, isPy33, - six, txaio, twisted, zope_interface, cffi, asyncio, trollius, futures, +{ lib, buildPythonPackage, fetchPypi, isPy3k, + six, txaio, twisted, zope_interface, cffi, trollius, futures, mock, pytest }: buildPythonPackage rec { @@ -12,7 +12,6 @@ buildPythonPackage rec { }; propagatedBuildInputs = [ six txaio twisted zope_interface cffi ] ++ - (lib.optional isPy33 asyncio) ++ (lib.optionals (!isPy3k) [ trollius futures ]); checkInputs = [ mock pytest ]; diff --git a/pkgs/development/python-modules/aws-sam-translator/default.nix b/pkgs/development/python-modules/aws-sam-translator/default.nix index 56d183988dc..c6c84882fcd 100644 --- a/pkgs/development/python-modules/aws-sam-translator/default.nix +++ b/pkgs/development/python-modules/aws-sam-translator/default.nix @@ -10,11 +10,11 @@ buildPythonPackage rec { pname = "aws-sam-translator"; - version = "1.9.1"; + version = "1.10.0"; src = fetchPypi { inherit pname version; - sha256 = "1008d149599d5d629b0c7bdfaa249d59eaab6d194faf5f0f941fa7209e68e6f2"; + sha256 = "0axr4598b1h9kyb5mv104cpn5q667s0g1wkkbqzj66vrqsaa07qf"; }; # Tests are not included in the PyPI package diff --git a/pkgs/development/python-modules/azure-mgmt-common/default.nix b/pkgs/development/python-modules/azure-mgmt-common/default.nix index 5ba49d1f3f1..c11b8707cb1 100644 --- a/pkgs/development/python-modules/azure-mgmt-common/default.nix +++ b/pkgs/development/python-modules/azure-mgmt-common/default.nix @@ -5,6 +5,7 @@ , azure-common , azure-mgmt-nspkg , requests +, msrestazure }: buildPythonPackage rec { @@ -17,7 +18,7 @@ buildPythonPackage rec { sha256 = "1rmzpz3733wv31rsnqpdy4bbafvk5dhbqx7q0xf62dlz7p0i4f66"; }; - propagatedBuildInputs = [ azure-common azure-mgmt-nspkg requests ]; + propagatedBuildInputs = [ azure-common azure-mgmt-nspkg requests msrestazure ]; postInstall = '' echo "__import__('pkg_resources').declare_namespace(__name__)" >> "$out/lib/${python.libPrefix}"/site-packages/azure/__init__.py diff --git a/pkgs/development/python-modules/azure-mgmt-compute/default.nix b/pkgs/development/python-modules/azure-mgmt-compute/default.nix index 69f4313a149..ffd2ea11d7c 100644 --- a/pkgs/development/python-modules/azure-mgmt-compute/default.nix +++ b/pkgs/development/python-modules/azure-mgmt-compute/default.nix @@ -15,12 +15,6 @@ buildPythonPackage rec { sha256 = "356219a354140ea26e6b4f4be4f855f1ffaf63af60de24cd2ca335b4ece9db00"; }; - preConfigure = '' - # Patch to make this package work on requests >= 2.11.x - # CAN BE REMOVED ON NEXT PACKAGE UPDATE - sed -i 's|len(request_content)|str(len(request_content))|' azure/mgmt/compute/computemanagement.py - ''; - postInstall = '' echo "__import__('pkg_resources').declare_namespace(__name__)" >> "$out/lib/${python.libPrefix}"/site-packages/azure/__init__.py echo "__import__('pkg_resources').declare_namespace(__name__)" >> "$out/lib/${python.libPrefix}"/site-packages/azure/mgmt/__init__.py diff --git a/pkgs/development/python-modules/azure-mgmt-resource/default.nix b/pkgs/development/python-modules/azure-mgmt-resource/default.nix index afcc58ec7e4..e5f5b38509f 100644 --- a/pkgs/development/python-modules/azure-mgmt-resource/default.nix +++ b/pkgs/development/python-modules/azure-mgmt-resource/default.nix @@ -16,12 +16,6 @@ buildPythonPackage rec { sha256 = "aef8573066026db04ed3e7c5e727904e42f6462b6421c2e8a3646e4c4f8128be"; }; - preConfigure = '' - # Patch to make this package work on requests >= 2.11.x - # CAN BE REMOVED ON NEXT PACKAGE UPDATE - sed -i 's|len(request_content)|str(len(request_content))|' azure/mgmt/resource/resourcemanagement.py - ''; - postInstall = '' echo "__import__('pkg_resources').declare_namespace(__name__)" >> "$out/lib/${python.libPrefix}"/site-packages/azure/__init__.py echo "__import__('pkg_resources').declare_namespace(__name__)" >> "$out/lib/${python.libPrefix}"/site-packages/azure/mgmt/__init__.py diff --git a/pkgs/development/python-modules/cairocffi/0_9.nix b/pkgs/development/python-modules/cairocffi/0_9.nix new file mode 100644 index 00000000000..19a469dad26 --- /dev/null +++ b/pkgs/development/python-modules/cairocffi/0_9.nix @@ -0,0 +1,26 @@ +# FIXME: make gdk_pixbuf dependency optional +{ stdenv +, buildPythonPackage +, pythonOlder +, fetchPypi +, lib +, substituteAll +, makeFontsConf +, freefont_ttf +, pytest +, pytestrunner +, glibcLocales +, cairo +, cffi +, withXcffib ? false, xcffib +, python +, glib +, gdk_pixbuf +}@args: + +import ./generic.nix ({ + version = "0.9.0"; + sha256 = "15386c3a9e08823d6826c4491eaccc7b7254b1dc587a3b9ce60c350c3f990337"; + dlopen_patch = ./dlopen-paths-0.9.patch; + inherit withXcffib; +} // args) diff --git a/pkgs/development/python-modules/cairocffi/default.nix b/pkgs/development/python-modules/cairocffi/default.nix index 80b23e43380..528c845c07e 100644 --- a/pkgs/development/python-modules/cairocffi/default.nix +++ b/pkgs/development/python-modules/cairocffi/default.nix @@ -1,60 +1,27 @@ # FIXME: make gdk_pixbuf dependency optional { stdenv , buildPythonPackage +, pythonOlder , fetchPypi , lib , substituteAll , makeFontsConf , freefont_ttf , pytest +, pytestrunner , glibcLocales , cairo , cffi , withXcffib ? false, xcffib , python , glib -, gdk_pixbuf }: +, gdk_pixbuf +}@args: -buildPythonPackage rec { - pname = "cairocffi"; +import ./generic.nix ({ version = "1.0.2"; - - src = fetchPypi { - inherit pname version; - sha256 = "01ac51ae12c4324ca5809ce270f9dd1b67f5166fe63bd3e497e9ea3ca91946ff"; - }; - - LC_ALL = "en_US.UTF-8"; - - # checkPhase require at least one 'normal' font and one 'monospace', - # otherwise glyph tests fails - FONTCONFIG_FILE = makeFontsConf { - fontDirectories = [ freefont_ttf ]; - }; - - checkInputs = [ pytest glibcLocales ]; - propagatedBuildInputs = [ cairo cffi ] ++ lib.optional withXcffib xcffib; - - checkPhase = '' - py.test $out/${python.sitePackages} - ''; - - patches = [ - # OSError: dlopen() failed to load a library: gdk_pixbuf-2.0 / gdk_pixbuf-2.0-0 - (substituteAll { - src = ./dlopen-paths.patch; - ext = stdenv.hostPlatform.extensions.sharedLibrary; - cairo = cairo.out; - glib = glib.out; - gdk_pixbuf = gdk_pixbuf.out; - }) - ./fix_test_scaled_font.patch - ]; - - meta = with lib; { - homepage = https://github.com/SimonSapin/cairocffi; - license = licenses.bsd3; - maintainers = with maintainers; []; - description = "cffi-based cairo bindings for Python"; - }; -} + sha256 = "01ac51ae12c4324ca5809ce270f9dd1b67f5166fe63bd3e497e9ea3ca91946ff"; + dlopen_patch = ./dlopen-paths.patch; + disabled = pythonOlder "3.5"; + inherit withXcffib; +} // args) diff --git a/pkgs/development/python-modules/cairocffi/dlopen-paths-0.9.patch b/pkgs/development/python-modules/cairocffi/dlopen-paths-0.9.patch new file mode 100644 index 00000000000..862f7bd4bf7 --- /dev/null +++ b/pkgs/development/python-modules/cairocffi/dlopen-paths-0.9.patch @@ -0,0 +1,47 @@ +commit 705dc9a55bd160625d9996e63fc7dc532d0ad0ab +Author: Alexander V. Nikolaev <avn@avnik.info> +Date: Sat Feb 6 08:09:06 2016 +0200 + + Patch dlopen() to allow direct paths to all required libs + + This patch is NixOS specific + +diff --git a/cairocffi/__init__.py b/cairocffi/__init__.py +index 718aa7f..1a1dcff 100644 +--- a/cairocffi/__init__.py ++++ b/cairocffi/__init__.py +@@ -27,20 +27,22 @@ VERSION = '0.7.2' + version = '1.10.0' + version_info = (1, 10, 0) + ++# Use hardcoded soname, because ctypes.util use gcc/objdump which shouldn't be required for runtime ++_LIBS = { ++ 'cairo': '@cairo@/lib/libcairo@ext@', ++ 'glib-2.0': '@glib@/lib/libglib-2.0@ext@', ++ 'gobject-2.0': '@glib@/lib/libgobject-2.0@ext@', ++ 'gdk_pixbuf-2.0': '@gdk_pixbuf@/lib/libgdk_pixbuf-2.0@ext@', ++} + +-def dlopen(ffi, *names): ++def dlopen(ffi, name, *names): + """Try various names for the same library, for different platforms.""" +- for name in names: +- for lib_name in [name, 'lib' + name]: +- try: +- path = ctypes.util.find_library(lib_name) +- if path: +- lib = ffi.dlopen(path) +- if lib: +- return lib +- except OSError: +- pass +- raise OSError("dlopen() failed to load a library: %s" % ' / '.join(names)) ++ path = _LIBS.get(name, None) ++ if path: ++ lib = ffi.dlopen(path) ++ if lib: ++ return lib ++ raise OSError("dlopen() failed to load a library: %s as %s" % (name, path)) + + + cairo = dlopen(ffi, 'cairo', 'cairo-2') diff --git a/pkgs/development/python-modules/cairocffi/dlopen-paths.patch b/pkgs/development/python-modules/cairocffi/dlopen-paths.patch index 862f7bd4bf7..d42b8bcce48 100644 --- a/pkgs/development/python-modules/cairocffi/dlopen-paths.patch +++ b/pkgs/development/python-modules/cairocffi/dlopen-paths.patch @@ -1,4 +1,4 @@ -commit 705dc9a55bd160625d9996e63fc7dc532d0ad0ab +commit 0435bc2577d4b18f54b78b2f5185abb2b2005982 Author: Alexander V. Nikolaev <avn@avnik.info> Date: Sat Feb 6 08:09:06 2016 +0200 @@ -7,12 +7,12 @@ Date: Sat Feb 6 08:09:06 2016 +0200 This patch is NixOS specific diff --git a/cairocffi/__init__.py b/cairocffi/__init__.py -index 718aa7f..1a1dcff 100644 +index 6061973..3538a58 100644 --- a/cairocffi/__init__.py +++ b/cairocffi/__init__.py -@@ -27,20 +27,22 @@ VERSION = '0.7.2' - version = '1.10.0' - version_info = (1, 10, 0) +@@ -21,19 +21,22 @@ VERSION = __version__ = (Path(__file__).parent / 'VERSION').read_text().strip() + version = '1.16.0' + version_info = (1, 16, 0) +# Use hardcoded soname, because ctypes.util use gcc/objdump which shouldn't be required for runtime +_LIBS = { @@ -26,13 +26,12 @@ index 718aa7f..1a1dcff 100644 +def dlopen(ffi, name, *names): """Try various names for the same library, for different platforms.""" - for name in names: -- for lib_name in [name, 'lib' + name]: +- for lib_name in (name, 'lib' + name): - try: - path = ctypes.util.find_library(lib_name) -- if path: -- lib = ffi.dlopen(path) -- if lib: -- return lib +- lib = ffi.dlopen(path or lib_name) +- if lib: +- return lib - except OSError: - pass - raise OSError("dlopen() failed to load a library: %s" % ' / '.join(names)) @@ -44,4 +43,4 @@ index 718aa7f..1a1dcff 100644 + raise OSError("dlopen() failed to load a library: %s as %s" % (name, path)) - cairo = dlopen(ffi, 'cairo', 'cairo-2') + cairo = dlopen(ffi, 'cairo', 'cairo-2', 'cairo-gobject-2', 'cairo.so.2') diff --git a/pkgs/development/python-modules/cairocffi/generic.nix b/pkgs/development/python-modules/cairocffi/generic.nix new file mode 100644 index 00000000000..4fa5cc466c3 --- /dev/null +++ b/pkgs/development/python-modules/cairocffi/generic.nix @@ -0,0 +1,51 @@ +{ version +, sha256 +, dlopen_patch +, disabled ? false +, ... +}@args: + +with args; + +buildPythonPackage rec { + pname = "cairocffi"; + inherit version disabled; + + src = fetchPypi { + inherit pname version sha256; + }; + + LC_ALL = "en_US.UTF-8"; + + # checkPhase require at least one 'normal' font and one 'monospace', + # otherwise glyph tests fails + FONTCONFIG_FILE = makeFontsConf { + fontDirectories = [ freefont_ttf ]; + }; + + checkInputs = [ pytest pytestrunner glibcLocales ]; + propagatedBuildInputs = [ cairo cffi ] ++ lib.optional withXcffib xcffib; + + checkPhase = '' + py.test $out/${python.sitePackages} + ''; + + patches = [ + # OSError: dlopen() failed to load a library: gdk_pixbuf-2.0 / gdk_pixbuf-2.0-0 + (substituteAll { + src = dlopen_patch; + ext = stdenv.hostPlatform.extensions.sharedLibrary; + cairo = cairo.out; + glib = glib.out; + gdk_pixbuf = gdk_pixbuf.out; + }) + ./fix_test_scaled_font.patch + ]; + + meta = with lib; { + homepage = https://github.com/SimonSapin/cairocffi; + license = licenses.bsd3; + maintainers = with maintainers; []; + description = "cffi-based cairo bindings for Python"; + }; +} diff --git a/pkgs/development/python-modules/cairosvg/default.nix b/pkgs/development/python-modules/cairosvg/default.nix index abaabb24b4d..17d442e4527 100644 --- a/pkgs/development/python-modules/cairosvg/default.nix +++ b/pkgs/development/python-modules/cairosvg/default.nix @@ -1,31 +1,21 @@ { stdenv, buildPythonPackage, fetchPypi, isPy3k, fetchpatch , cairocffi, cssselect2, defusedxml, pillow, tinycss2 -, pytestrunner, pytestcov, pytest-flake8, pytest-isort }: +, pytest, pytestrunner, pytestcov, pytest-flake8, pytest-isort }: buildPythonPackage rec { pname = "CairoSVG"; - version = "2.2.1"; + version = "2.3.0"; disabled = !isPy3k; src = fetchPypi { inherit pname version; - sha256 = "93c5b3204478c4e20c4baeb33807db5311b4420c21db2f21034a6deda998cb14"; + sha256 = "66f333ef5dc79fdfbd3bbe98adc791b1f854e0461067d202fa7b15de66d517ec"; }; - patches = [ - # Fix tests. Remove with the next release - (fetchpatch { - url = https://github.com/Kozea/CairoSVG/commit/1f403ad229f0e2782d6427a79f0fbeb6b76148b6.patch; - sha256 = "1dxpj5zh8wmx9f8pj11hrixd5jlaqq5xlcdnbl462bh29zj18l26"; - }) - ]; - - LC_ALL="en_US.UTF-8"; - propagatedBuildInputs = [ cairocffi cssselect2 defusedxml pillow tinycss2 ]; - checkInputs = [ pytestrunner pytestcov pytest-flake8 pytest-isort ]; + checkInputs = [ pytest pytestrunner pytestcov pytest-flake8 pytest-isort ]; meta = with stdenv.lib; { homepage = https://cairosvg.org; diff --git a/pkgs/development/python-modules/cbor2/default.nix b/pkgs/development/python-modules/cbor2/default.nix new file mode 100644 index 00000000000..5d044b4199c --- /dev/null +++ b/pkgs/development/python-modules/cbor2/default.nix @@ -0,0 +1,23 @@ +{ lib, buildPythonPackage, fetchPypi, pytest, pytestcov, setuptools_scm }: + +buildPythonPackage rec { + pname = "cbor2"; + version = "4.1.2"; + + src = fetchPypi { + inherit pname version; + sha256 = "1bp9l3wdj0wm15xlmlcwbgv6hc6vcfx39nssikj8fkwnd7d1bdhp"; + }; + + nativeBuildInputs = [ setuptools_scm ]; + checkInputs = [ pytest pytestcov ]; + + checkPhase = "pytest"; + + meta = with lib; { + description = "Pure Python CBOR (de)serializer with extensive tag support"; + homepage = https://github.com/agronholm/cbor2; + license = licenses.mit; + maintainers = with maintainers; [ taneb ]; + }; +} diff --git a/pkgs/development/python-modules/click-default-group/default.nix b/pkgs/development/python-modules/click-default-group/default.nix index 673a570c61f..daf522fe653 100644 --- a/pkgs/development/python-modules/click-default-group/default.nix +++ b/pkgs/development/python-modules/click-default-group/default.nix @@ -1,4 +1,4 @@ -{ lib, buildPythonPackage, fetchFromGitHub, click, pytest }: +{ lib, buildPythonPackage, fetchFromGitHub, click, pytest_3 }: buildPythonPackage rec { pname = "click-default-group"; @@ -14,7 +14,7 @@ buildPythonPackage rec { propagatedBuildInputs = [ click ]; - checkInputs = [ pytest ]; + checkInputs = [ pytest_3 ]; meta = with lib; { homepage = https://github.com/click-contrib/click-default-group; diff --git a/pkgs/development/python-modules/cssselect2/default.nix b/pkgs/development/python-modules/cssselect2/default.nix index 5fe0f792856..381c114b44e 100644 --- a/pkgs/development/python-modules/cssselect2/default.nix +++ b/pkgs/development/python-modules/cssselect2/default.nix @@ -1,4 +1,4 @@ -{ lib, buildPythonPackage, fetchPypi, tinycss2, pytestrunner, pytestcov, pytest-flake8, pytest-isort, glibcLocales }: +{ lib, buildPythonPackage, fetchPypi, tinycss2, pytest, pytestrunner, pytestcov, pytest-flake8, pytest-isort, glibcLocales }: buildPythonPackage rec { pname = "cssselect2"; @@ -11,7 +11,7 @@ buildPythonPackage rec { propagatedBuildInputs = [ tinycss2 ]; - checkInputs = [ pytestrunner pytestcov pytest-flake8 pytest-isort glibcLocales ]; + checkInputs = [ pytest pytestrunner pytestcov pytest-flake8 pytest-isort glibcLocales ]; LC_ALL = "en_US.UTF-8"; diff --git a/pkgs/development/python-modules/csvkit/default.nix b/pkgs/development/python-modules/csvkit/default.nix deleted file mode 100644 index 48f932086cc..00000000000 --- a/pkgs/development/python-modules/csvkit/default.nix +++ /dev/null @@ -1,38 +0,0 @@ -{ lib, fetchPypi, buildPythonPackage, isPy3k -, agate, agate-excel, agate-dbf, agate-sql, six -, ordereddict, simplejson -, glibcLocales, nose, mock, unittest2 -}: - -buildPythonPackage rec { - pname = "csvkit"; - version = "1.0.3"; - - src = fetchPypi { - inherit pname version; - sha256 = "a6c859c1321d4697dc41252877249091681297f093e08d9c1e1828a6d52c260c"; - }; - - propagatedBuildInputs = [ - agate agate-excel agate-dbf agate-sql six - ] ++ lib.optionals (!isPy3k) [ - ordereddict simplejson - ]; - - checkInputs = [ - glibcLocales nose - ] ++ lib.optionals (!isPy3k) [ - mock unittest2 - ]; - - checkPhase = '' - LC_ALL="en_US.UTF-8" nosetests -e test_csvsql - ''; - - meta = with lib; { - description = "A library of utilities for working with CSV, the king of tabular file formats"; - maintainers = with maintainers; [ vrthra ]; - license = with licenses; [ mit ]; - homepage = https://github.com/wireservice/csvkit; - }; -} diff --git a/pkgs/development/python-modules/discid/default.nix b/pkgs/development/python-modules/discid/default.nix index 37d5fec8591..2684d4a06a9 100644 --- a/pkgs/development/python-modules/discid/default.nix +++ b/pkgs/development/python-modules/discid/default.nix @@ -2,11 +2,11 @@ buildPythonPackage rec { pname = "discid"; - version = "1.1.1"; + version = "1.2.0"; src = fetchPypi { inherit pname version; - sha256 = "78a3bf6c8377fdbe3d85e914a209ff97aa43e35605779639847b510ced31f7b9"; + sha256 = "1fc6kvnqwaz9lrs2qgsp8wh0nabf49010r0r53wnsmpmafy315nd"; }; patchPhase = diff --git a/pkgs/development/python-modules/discordpy/default.nix b/pkgs/development/python-modules/discordpy/default.nix index e548781fde6..41188a0de6e 100644 --- a/pkgs/development/python-modules/discordpy/default.nix +++ b/pkgs/development/python-modules/discordpy/default.nix @@ -3,7 +3,6 @@ , buildPythonPackage , pythonOlder , withVoice ? true, libopus -, asyncio , aiohttp , websockets , pynacl @@ -18,7 +17,7 @@ buildPythonPackage rec { sha256 = "17fb8814100fbaf7a79468baa432184db6cef3bbea4ad194fe297c7407d50108"; }; - propagatedBuildInputs = [ asyncio aiohttp websockets pynacl ]; + propagatedBuildInputs = [ aiohttp websockets pynacl ]; patchPhase = '' substituteInPlace "requirements.txt" \ --replace "aiohttp>=1.0.0,<1.1.0" "aiohttp" diff --git a/pkgs/development/python-modules/distlib/default.nix b/pkgs/development/python-modules/distlib/default.nix new file mode 100644 index 00000000000..bdc31856f33 --- /dev/null +++ b/pkgs/development/python-modules/distlib/default.nix @@ -0,0 +1,23 @@ +{ stdenv, buildPythonPackage, fetchPypi }: + +buildPythonPackage rec { + pname = "distlib"; + version = "0.2.8"; + + src = fetchPypi { + inherit pname version; + sha256 = "068zqb3w7nyqiv2hpy0zcpz2xd6xwhq5chigqrp9h9zav7bpr5sp"; + extension = "zip"; + }; + + # Tests use pypi.org. + doCheck = false; + + meta = with stdenv.lib; { + description = "Low-level components of distutils2/packaging"; + homepage = https://distlib.readthedocs.io; + license = licenses.psfl; + maintainers = with maintainers; [ lnl7 ]; + }; +} + diff --git a/pkgs/development/python-modules/distributed/default.nix b/pkgs/development/python-modules/distributed/default.nix index 29460f14eab..cc28b6e3606 100644 --- a/pkgs/development/python-modules/distributed/default.nix +++ b/pkgs/development/python-modules/distributed/default.nix @@ -28,12 +28,12 @@ buildPythonPackage rec { pname = "distributed"; - version = "1.25.3"; + version = "1.26.0"; # get full repository need conftest.py to run tests src = fetchPypi { inherit pname version; - sha256 = "0bvjlw74n0l4rgzhm876f66f7y6j09744i5h3iwlng2jwzyw97gs"; + sha256 = "1f5hnmkj89z3lgig6wbyrvwvd4vnhkm4rf7v2ndn79mpiv1c9zxr"; }; checkInputs = [ pytest pytest-repeat pytest-faulthandler pytest-timeout mock joblib ]; diff --git a/pkgs/development/python-modules/distro/default.nix b/pkgs/development/python-modules/distro/default.nix index b13954e8263..09868b2f755 100644 --- a/pkgs/development/python-modules/distro/default.nix +++ b/pkgs/development/python-modules/distro/default.nix @@ -4,23 +4,25 @@ buildPythonPackage rec { pname = "distro"; version = "1.4.0"; + src = fetchPypi { + inherit pname version; + sha256 = "0mrg75w4ap7mdzyga75yaid9n8bgb345ih5mwjp3plj6v1jxwb9n"; + }; + + # TODO: Enable more tests on NixOS (20 out of 173 are failing, 10 due to the + # missing lsb_release binary): + patches = [ ./nixos.patch ]; + checkInputs = [ pytest pytestcov ]; checkPhase = '' py.test ''; - src = fetchPypi { - inherit pname version; - sha256 = "362dde65d846d23baee4b5c058c8586f219b5a54be1cf5fc6ff55c4578392f57"; - }; - meta = with stdenv.lib; { homepage = https://github.com/nir0s/distro; description = "Linux Distribution - a Linux OS platform information API."; license = licenses.asl20; maintainers = with maintainers; [ nand0p ]; - # Many failing tests - broken = true; }; } diff --git a/pkgs/development/python-modules/distro/nixos.patch b/pkgs/development/python-modules/distro/nixos.patch new file mode 100644 index 00000000000..21aa4827b63 --- /dev/null +++ b/pkgs/development/python-modules/distro/nixos.patch @@ -0,0 +1,31 @@ +diff --git a/tests/test_distro.py b/tests/test_distro.py +index 5521068..4e1bab8 100644 +--- a/tests/test_distro.py ++++ b/tests/test_distro.py +@@ -432,7 +432,7 @@ class TestOSRelease: + self._test_outcome(desired_outcome) + + +-@pytest.mark.skipif(not IS_LINUX, reason='Irrelevant on non-linux') ++@pytest.mark.skip(reason='lsb_release is not available and would return exit code 3') + class TestLSBRelease(DistroTestCase): + + def setup_method(self, test_method): +@@ -919,7 +919,7 @@ class TestDistroRelease: + self._test_outcome(desired_outcome, 'cloudlinux', '7', 'redhat') + + +-@pytest.mark.skipif(not IS_LINUX, reason='Irrelevant on non-linux') ++@pytest.mark.skip(reason='Unknown (TODO)') + class TestOverall(DistroTestCase): + """Test a LinuxDistribution object created with default arguments. + +@@ -1618,7 +1618,7 @@ def _bad_os_listdir(path='.'): + raise OSError() + + +-@pytest.mark.skipIf(not IS_LINUX, reason='Irrelevant on non-linx') ++@pytest.mark.skip(reason='Unknown (TODO)') + class TestOverallWithEtcNotReadable(TestOverall): + def setup_method(self, test_method): + self._old_listdir = os.listdir diff --git a/pkgs/development/python-modules/django-cors-headers/default.nix b/pkgs/development/python-modules/django-cors-headers/default.nix index 21f5b841adb..475f004342c 100644 --- a/pkgs/development/python-modules/django-cors-headers/default.nix +++ b/pkgs/development/python-modules/django-cors-headers/default.nix @@ -6,11 +6,11 @@ buildPythonPackage rec { pname = "django-cors-headers"; - version = "2.4.0"; + version = "2.5.0"; src = fetchPypi { inherit pname version; - sha256 = "1qfa9awsj3f0nwygb0vdh4ilcsfi6zinzng73cd5864x2fbyxhn4"; + sha256 = "02irmhj61mhz3kaw9md4rqpavzkcvkhfk5lhgvss39yras5sxbm8"; }; propagatedBuildInputs = [ django ]; diff --git a/pkgs/development/python-modules/django_guardian/default.nix b/pkgs/development/python-modules/django_guardian/default.nix index 5c8dab79f00..90b81c8379e 100644 --- a/pkgs/development/python-modules/django_guardian/default.nix +++ b/pkgs/development/python-modules/django_guardian/default.nix @@ -1,6 +1,6 @@ -{ stdenv, buildPythonPackage, python, fetchPypi +{ stdenv, buildPythonPackage, fetchPypi, isPy3k , django_environ, mock, django, six -, pytest, pytestrunner, pytest-django, setuptools_scm +, pytest, pytestrunner, pytest-django }: buildPythonPackage rec { pname = "django-guardian"; @@ -12,16 +12,12 @@ buildPythonPackage rec { }; checkInputs = [ pytest pytestrunner pytest-django django_environ mock ]; - buildInputs = [ setuptools_scm ]; - propagatedBuildInputs = [ django six ]; - - checkPhase = '' - ${python.interpreter} nix_run_setup test --addopts="--ignore build" - ''; + propagatedBuildInputs = [ django ]; meta = with stdenv.lib; { description = "Per object permissions for Django"; homepage = https://github.com/django-guardian/django-guardian; license = [ licenses.mit licenses.bsd2 ]; + broken = !isPy3k; # https://github.com/django-guardian/django-guardian/pull/605 }; } diff --git a/pkgs/development/python-modules/docker/default.nix b/pkgs/development/python-modules/docker/default.nix index 3bf2e62d699..71e411a24f3 100644 --- a/pkgs/development/python-modules/docker/default.nix +++ b/pkgs/development/python-modules/docker/default.nix @@ -28,7 +28,6 @@ buildPythonPackage rec { homepage = https://github.com/docker/docker-py; license = licenses.asl20; maintainers = with maintainers; [ - jgeerds ]; }; } diff --git a/pkgs/development/python-modules/dockerfile-parse/default.nix b/pkgs/development/python-modules/dockerfile-parse/default.nix new file mode 100644 index 00000000000..c8ecbceb5e8 --- /dev/null +++ b/pkgs/development/python-modules/dockerfile-parse/default.nix @@ -0,0 +1,26 @@ +{ stdenv, buildPythonPackage, fetchPypi, six, pytestcov, pytest }: + +buildPythonPackage rec { + version = "0.0.13"; + pname = "dockerfile-parse"; + + src = fetchPypi { + inherit pname version; + sha256 = "1p0x81q3m3nlj4rqal9a959xcbjhncb548wd4wr3l7dpiajqqc9c"; + }; + + postPatch = '' + echo " " > tests/requirements.txt \ + ''; + + propagatedBuildInputs = [ six ]; + + checkInputs = [ pytestcov pytest ]; + + meta = with stdenv.lib; { + description = "Python library for parsing Dockerfile files"; + homepage = https://github.com/DBuildService/dockerfile-parse; + license = licenses.bsd3; + maintainers = with maintainers; [ leenaars ]; + }; +} diff --git a/pkgs/development/python-modules/elasticsearch-curator/default.nix b/pkgs/development/python-modules/elasticsearch-curator/default.nix index 66c124d65a7..42fb8dee488 100644 --- a/pkgs/development/python-modules/elasticsearch-curator/default.nix +++ b/pkgs/development/python-modules/elasticsearch-curator/default.nix @@ -45,6 +45,13 @@ buildPythonPackage rec { funcsigs ]; + postPatch = '' + substituteInPlace setup.cfg \ + --replace 'click>=6.7,<7.0' 'click' + substituteInPlace setup.py \ + --replace 'click>=6.7,<7.0' 'click' + ''; + meta = with stdenv.lib; { homepage = https://github.com/elastic/curator; description = "Curate, or manage, your Elasticsearch indices and snapshots"; diff --git a/pkgs/development/python-modules/fastparquet/default.nix b/pkgs/development/python-modules/fastparquet/default.nix new file mode 100644 index 00000000000..a31b5670732 --- /dev/null +++ b/pkgs/development/python-modules/fastparquet/default.nix @@ -0,0 +1,39 @@ +{ lib, buildPythonPackage, isPy3k, fetchPypi, fetchpatch, numba, numpy, pandas, +pytestrunner, thrift, pytest, python-snappy, lz4 }: + +buildPythonPackage rec { + pname = "fastparquet"; + version = "0.2.1"; + + src = fetchPypi { + inherit pname version; + sha256 = "183wdmhnhnlsd7908n3d2g4qnb49fcipqfshghwpbdwdzjpa0day"; + }; + + # Fixes for recent pandas version + # See https://github.com/dask/fastparquet/pull/396 + patches = fetchpatch { + url = https://github.com/dask/fastparquet/commit/31fb3115598d1ab62a5c8bf7923a27c16f861529.patch; + sha256 = "0r1ig4rydmy4j85dgb52qbsx6knxdwn4dn9h032fg3p6xqq0zlpm"; + }; + + postPatch = '' + # FIXME: package zstandard + # removing the test dependency for now + substituteInPlace setup.py --replace "'zstandard'," "" + ''; + + nativeBuildInputs = [ pytestrunner ]; + propagatedBuildInputs = [ numba numpy pandas thrift ]; + checkInputs = [ pytest python-snappy lz4 ]; + + # test_data/ missing in PyPI tarball + doCheck = false; + + meta = with lib; { + description = "A python implementation of the parquet format"; + homepage = https://github.com/dask/fastparquet; + license = with licenses; [ asl20 ]; + maintainers = with maintainers; [ veprbl ]; + }; +} diff --git a/pkgs/development/python-modules/geopandas/default.nix b/pkgs/development/python-modules/geopandas/default.nix index 976df095261..38a3724f00a 100644 --- a/pkgs/development/python-modules/geopandas/default.nix +++ b/pkgs/development/python-modules/geopandas/default.nix @@ -4,14 +4,14 @@ buildPythonPackage rec { pname = "geopandas"; - version = "0.4.0"; + version = "0.4.1"; name = pname + "-" + version; src = fetchFromGitHub { owner = "geopandas"; repo = "geopandas"; rev = "v${version}"; - sha256 = "025zpgck5pnmidvzk0805pr345rd7k6z66qb2m34gjh1814xjkhv"; + sha256 = "02v3lszxvhpsb0qrqk0kcnf9jss9gdj8az2r97aqx7ya8cwaccxa"; }; checkInputs = [ pytest Rtree ]; diff --git a/pkgs/development/python-modules/google-api-python-client/default.nix b/pkgs/development/python-modules/google-api-python-client/default.nix index 89c7c6b8df8..291d038258f 100644 --- a/pkgs/development/python-modules/google-api-python-client/default.nix +++ b/pkgs/development/python-modules/google-api-python-client/default.nix @@ -4,7 +4,6 @@ buildPythonPackage rec { pname = "google-api-python-client"; version = "1.7.8"; - #disabled = !isPy3k; # TODO: Python 2.7 was deprecated but weboob still depends on it. src = fetchPypi { inherit pname version; diff --git a/pkgs/development/python-modules/google-auth-oauthlib/default.nix b/pkgs/development/python-modules/google-auth-oauthlib/default.nix new file mode 100644 index 00000000000..fd8eb816784 --- /dev/null +++ b/pkgs/development/python-modules/google-auth-oauthlib/default.nix @@ -0,0 +1,39 @@ +{ lib +, buildPythonPackage +, fetchPypi +, click +, mock +, pytest +, futures +, google_auth +, requests_oauthlib +}: + +buildPythonPackage rec { + pname = "google-auth-oauthlib"; + version = "0.2.0"; + + src = fetchPypi { + inherit pname version; + sha256 = "226d1d0960f86ba5d9efd426a70b291eaba96f47d071657e0254ea969025728a"; + }; + + checkInputs = [ + click mock pytest futures + ]; + + propagatedBuildInputs = [ + google_auth requests_oauthlib + ]; + + checkPhase = '' + py.test + ''; + + meta = with lib; { + description = "Google Authentication Library: oauthlib integration"; + homepage = https://github.com/GoogleCloudPlatform/google-auth-library-python-oauthlib; + license = licenses.asl20; + maintainers = with maintainers; [ terlar ]; + }; +} diff --git a/pkgs/development/python-modules/google-music-utils/default.nix b/pkgs/development/python-modules/google-music-utils/default.nix index d7fb8a91707..84f677d4d4e 100644 --- a/pkgs/development/python-modules/google-music-utils/default.nix +++ b/pkgs/development/python-modules/google-music-utils/default.nix @@ -5,14 +5,14 @@ buildPythonPackage rec { pname = "google-music-utils"; - version = "2.0.0"; + version = "2.1.0"; # Pypi tarball doesn't contain tests src = fetchFromGitHub { owner = "thebigmunch"; repo = "google-music-utils"; rev = version; - sha256 = "0i5zcr1ypnxizi41s3lrplz9m9rmb56s5iihjx61kbybxcq2b6gk"; + sha256 = "0fn4zp0gf1wx2x06dbc840qcq21j4p3ajghxp7646w2n6n9gxhh7"; }; propagatedBuildInputs = [ diff --git a/pkgs/development/python-modules/google-music/default.nix b/pkgs/development/python-modules/google-music/default.nix index b0fe0f8a254..71aa37d0086 100644 --- a/pkgs/development/python-modules/google-music/default.nix +++ b/pkgs/development/python-modules/google-music/default.nix @@ -16,6 +16,11 @@ buildPythonPackage rec { sha256 = "13i9nd62wqfg0f5r7ykr15q83397vdpw0js50fy5nbgs33sbf6b7"; }; + postPatch = '' + substituteInPlace setup.py \ + --replace "audio-metadata>=0.3,<0.4" "audio-metadata" + ''; + propagatedBuildInputs = [ appdirs audio-metadata diff --git a/pkgs/development/python-modules/hglib/default.nix b/pkgs/development/python-modules/hglib/default.nix index aa8c051aed3..eab8ffe2bfd 100644 --- a/pkgs/development/python-modules/hglib/default.nix +++ b/pkgs/development/python-modules/hglib/default.nix @@ -1,4 +1,4 @@ -{ stdenv, buildPythonPackage, fetchPypi, nose, mercurial, isPy3k }: +{ stdenv, buildPythonPackage, fetchPypi, substituteAll, python, nose, mercurial }: buildPythonPackage rec { pname = "python-hglib"; @@ -9,11 +9,18 @@ buildPythonPackage rec { sha256 = "7c1fa0cb4d332dd6ec8409b04787ceba4623e97fb378656f7cab0b996c6ca3b2"; }; + patches = [ + (substituteAll { + src = ./hgpath.patch; + hg = "${mercurial}/bin/hg"; + }) + ]; + checkInputs = [ nose ]; - buildInputs = [ mercurial ]; - checkPhase = ''python test.py''; - doCheck = if isPy3k then false else true; + checkPhase = '' + ${python.interpreter} test.py --with-hg "${mercurial}/bin/hg" + ''; meta = with stdenv.lib; { description = "Mercurial Python library"; diff --git a/pkgs/development/python-modules/hglib/hgpath.patch b/pkgs/development/python-modules/hglib/hgpath.patch new file mode 100644 index 00000000000..2141aa32a13 --- /dev/null +++ b/pkgs/development/python-modules/hglib/hgpath.patch @@ -0,0 +1,24 @@ +diff -r 2d0ec6097d78 hglib/__init__.py +--- a/hglib/__init__.py Mon Apr 30 15:43:29 2018 +0900 ++++ b/hglib/__init__.py Tue Mar 19 23:30:01 2019 +0100 +@@ -1,7 +1,7 @@ + import subprocess + from hglib import client, util, error + +-HGPATH = 'hg' ++HGPATH = '@hg@' + + def open(path=None, encoding=None, configs=None): + '''starts a cmdserver for the given path (or for a repository found +diff -r 2d0ec6097d78 tests/common.py +--- a/tests/common.py Mon Apr 30 15:43:29 2018 +0900 ++++ b/tests/common.py Tue Mar 19 23:30:01 2019 +0100 +@@ -26,7 +26,7 @@ + os.mkdir(self._testtmp) + os.chdir(self._testtmp) + # until we can run norepo commands in the cmdserver +- os.system('hg init') ++ os.system('@hg@ init') + self.client = hglib.open() + + def tearDown(self): diff --git a/pkgs/development/python-modules/hpack/default.nix b/pkgs/development/python-modules/hpack/default.nix index 7e7db13aaec..a10882417fc 100644 --- a/pkgs/development/python-modules/hpack/default.nix +++ b/pkgs/development/python-modules/hpack/default.nix @@ -1,7 +1,6 @@ { stdenv , buildPythonPackage , fetchPypi -, glibcLocales }: buildPythonPackage rec { @@ -13,10 +12,6 @@ buildPythonPackage rec { sha256 = "8eec9c1f4bfae3408a3f30500261f7e6a65912dc138526ea054f9ad98892e9d2"; }; - buildInputs = [ glibcLocales ]; - - LANG = "en_US.UTF-8"; - meta = with stdenv.lib; { description = "Pure-Python HPACK header compression"; homepage = "http://hyper.rtfd.org"; diff --git a/pkgs/development/python-modules/invoke/default.nix b/pkgs/development/python-modules/invoke/default.nix index 0438a035501..d2839d32b0a 100644 --- a/pkgs/development/python-modules/invoke/default.nix +++ b/pkgs/development/python-modules/invoke/default.nix @@ -1,4 +1,5 @@ { lib +, bash , buildPythonPackage , fetchPypi }: @@ -12,6 +13,10 @@ buildPythonPackage rec { sha256 = "1dr1a5qbb9z5hyns4zk086zm0iqbms33zv0s1296wx502y7jyjfw"; }; + patchPhase = '' + sed -e 's|/bin/bash|${bash}/bin/bash|g' -i invoke/config.py + ''; + # errors with vendored libs doCheck = false; diff --git a/pkgs/development/python-modules/ipython/5.nix b/pkgs/development/python-modules/ipython/5.nix index 58034eaacf0..3709ba40dc0 100644 --- a/pkgs/development/python-modules/ipython/5.nix +++ b/pkgs/development/python-modules/ipython/5.nix @@ -58,6 +58,6 @@ buildPythonPackage rec { description = "IPython: Productive Interactive Computing"; homepage = http://ipython.org/; license = lib.licenses.bsd3; - maintainers = with lib.maintainers; [ bjornfor jgeerds orivej lnl7 ]; + maintainers = with lib.maintainers; [ bjornfor orivej lnl7 ]; }; } diff --git a/pkgs/development/python-modules/ipython/default.nix b/pkgs/development/python-modules/ipython/default.nix index 5aa4b15f462..10bc1ecf2f8 100644 --- a/pkgs/development/python-modules/ipython/default.nix +++ b/pkgs/development/python-modules/ipython/default.nix @@ -60,6 +60,6 @@ buildPythonPackage rec { description = "IPython: Productive Interactive Computing"; homepage = http://ipython.org/; license = lib.licenses.bsd3; - maintainers = with lib.maintainers; [ bjornfor jgeerds fridh ]; + maintainers = with lib.maintainers; [ bjornfor fridh ]; }; } diff --git a/pkgs/development/python-modules/kaptan/default.nix b/pkgs/development/python-modules/kaptan/default.nix index 455f90a0164..35194294e9d 100644 --- a/pkgs/development/python-modules/kaptan/default.nix +++ b/pkgs/development/python-modules/kaptan/default.nix @@ -22,7 +22,7 @@ buildPythonPackage rec { description = "Configuration manager for python applications"; homepage = https://kaptan.readthedocs.io/; license = licenses.bsd3; - maintainers = with maintainers; [ jgeerds ]; + maintainers = with maintainers; [ ]; }; } diff --git a/pkgs/development/python-modules/keepkey/default.nix b/pkgs/development/python-modules/keepkey/default.nix index e7b78edbb3a..551614409db 100644 --- a/pkgs/development/python-modules/keepkey/default.nix +++ b/pkgs/development/python-modules/keepkey/default.nix @@ -3,13 +3,13 @@ buildPythonPackage rec { pname = "keepkey"; - version = "4.0.2"; + version = "6.0.2"; src = fetchFromGitHub { owner = "keepkey"; repo = "python-keepkey"; rev = "v${version}"; - sha256 = "0aa7j9b4f9gz198j8svxdrffwva1ai8vc55v6xbb2a3lfzmpsf9n"; + sha256 = "1778c9vabn9a7b7lbirwclswnqmzqm00slklvnhqacbbdf4rp417"; }; propagatedBuildInputs = [ protobuf hidapi trezor ]; diff --git a/pkgs/development/python-modules/libtmux/default.nix b/pkgs/development/python-modules/libtmux/default.nix index 9d30033c58d..9f120f852fc 100644 --- a/pkgs/development/python-modules/libtmux/default.nix +++ b/pkgs/development/python-modules/libtmux/default.nix @@ -21,6 +21,6 @@ buildPythonPackage rec { description = "Scripting library for tmux"; homepage = https://libtmux.readthedocs.io/; license = licenses.bsd3; - maintainers = with maintainers; [ jgeerds ]; + maintainers = with maintainers; [ ]; }; } diff --git a/pkgs/development/python-modules/libversion/default.nix b/pkgs/development/python-modules/libversion/default.nix index 82d8b8b9c5e..2da73b8437a 100644 --- a/pkgs/development/python-modules/libversion/default.nix +++ b/pkgs/development/python-modules/libversion/default.nix @@ -2,11 +2,11 @@ buildPythonPackage rec { pname = "libversion"; - version = "1.1.2"; + version = "1.1.3"; src = fetchPypi { inherit pname version; - sha256 = "040adjp5xjr4vwz3x2mspkymlcmljvqvacr88aw0jijq1h6fm59c"; + sha256 = "1ax1bq5hrbs2pq2krya83yj1s5cm33pcpwalnc15cgj73kmhb5fn"; }; nativeBuildInputs = [ pkgconfig ]; diff --git a/pkgs/development/python-modules/m2crypto/default.nix b/pkgs/development/python-modules/m2crypto/default.nix index c0e91542d38..97ee57fac0c 100644 --- a/pkgs/development/python-modules/m2crypto/default.nix +++ b/pkgs/development/python-modules/m2crypto/default.nix @@ -9,12 +9,12 @@ buildPythonPackage rec { - version = "0.30.1"; + version = "0.32.0"; pname = "M2Crypto"; src = fetchPypi { inherit pname version; - sha256 = "a1b2751cdadc6afac3df8a5799676b7b7c67a6ad144bb62d38563062e7cd3fc6"; + sha256 = "09d3zs2ivyxbi0fa42mnan0fcplc08q2qd70p1b43sxxdbxcdj99"; }; patches = [ @@ -38,7 +38,7 @@ buildPythonPackage rec { meta = with stdenv.lib; { description = "A Python crypto and SSL toolkit"; - homepage = http://chandlerproject.org/Projects/MeTooCrypto; + homepage = https://gitlab.com/m2crypto/m2crypto; license = licenses.mit; maintainers = with maintainers; [ andrew-d ]; }; diff --git a/pkgs/development/python-modules/mecab-python3/default.nix b/pkgs/development/python-modules/mecab-python3/default.nix index 1a2cce8f110..c68fb90952e 100644 --- a/pkgs/development/python-modules/mecab-python3/default.nix +++ b/pkgs/development/python-modules/mecab-python3/default.nix @@ -1,7 +1,8 @@ { lib , buildPythonPackage -, mecab , fetchPypi +, mecab +, swig }: buildPythonPackage rec { @@ -13,12 +14,17 @@ buildPythonPackage rec { sha256 = "5aca4d0d196161e41452b89921042c0e61a6b7e7e9373211c0c1c50d1809055d"; }; - propagatedBuildInputs = [ mecab ]; + nativeBuildInputs = [ + mecab # for mecab-config + swig + ]; + + buildInputs = [ mecab ]; meta = with lib; { description = "A python wrapper for mecab: Morphological Analysis engine"; - homepage = https://github.com/LuminosoInsight/wordfreq/; - license = licenses.bsd0; + homepage = https://github.com/SamuraiT/mecab-python3; + license = with licenses; [ gpl2 lgpl21 bsd3 ]; # any of the three maintainers = with maintainers; [ ixxie ]; }; } diff --git a/pkgs/development/python-modules/moretools/default.nix b/pkgs/development/python-modules/moretools/default.nix index 9cb56b1f912..bef18255804 100644 --- a/pkgs/development/python-modules/moretools/default.nix +++ b/pkgs/development/python-modules/moretools/default.nix @@ -15,8 +15,9 @@ buildPythonPackage rec { py.test test ''; - buildInputs = [ six pathpy pytest ]; - propagatedBuildInputs = [ decorator zetup ]; + nativeBuildInputs = [ zetup ]; + checkInputs = [ six pathpy pytest ]; + propagatedBuildInputs = [ decorator ]; meta = with stdenv.lib; { description = '' diff --git a/pkgs/development/python-modules/msrest/default.nix b/pkgs/development/python-modules/msrest/default.nix new file mode 100644 index 00000000000..e44d65e5cbe --- /dev/null +++ b/pkgs/development/python-modules/msrest/default.nix @@ -0,0 +1,53 @@ +{ lib +, buildPythonPackage +, fetchFromGitHub +, isPy3k +, requests +, requests_oauthlib +, isodate +, certifi +, enum34 +, typing +, aiohttp +, aiodns +, pytest +, httpretty +, mock +, futures +, trio +}: + +buildPythonPackage rec { + version = "0.6.4"; + pname = "msrest"; + + # no tests in PyPI tarball + # see https://github.com/Azure/msrest-for-python/pull/152 + src = fetchFromGitHub { + owner = "Azure"; + repo = "msrest-for-python"; + rev = "v${version}"; + sha256 = "0ilrc06qq0dw4qqzq1dq2vs6nymc39h19w52dwcyawwfalalnjzi"; + }; + + propagatedBuildInputs = [ + requests requests_oauthlib isodate certifi + ] ++ lib.optionals (!isPy3k) [ enum34 typing ] + ++ lib.optionals isPy3k [ aiohttp aiodns ]; + + checkInputs = [ pytest httpretty ] + ++ lib.optionals (!isPy3k) [ mock futures ] + ++ lib.optional isPy3k trio; + + # Deselected tests require network access + checkPhase = '' + pytest tests/ -k "not test_conf_async_trio_requests" + ''; + + meta = with lib; { + description = "The runtime library 'msrest' for AutoRest generated Python clients."; + homepage = "https://azure.microsoft.com/en-us/develop/python/"; + license = licenses.mit; + maintainers = with maintainers; [ bendlas ]; + }; +} diff --git a/pkgs/development/python-modules/msrestazure/default.nix b/pkgs/development/python-modules/msrestazure/default.nix new file mode 100644 index 00000000000..7e71f618d8a --- /dev/null +++ b/pkgs/development/python-modules/msrestazure/default.nix @@ -0,0 +1,26 @@ +{ pkgs +, buildPythonPackage +, fetchPypi +, python +, adal +, msrest +}: + +buildPythonPackage rec { + version = "0.6.0"; + pname = "msrestazure"; + + src = fetchPypi { + inherit pname version; + sha256 = "06s04f6nng4na2663kc12a3skiaqb631nscjfwpsrx4lzkf8bccr"; + }; + + propagatedBuildInputs = [ adal msrest ]; + + meta = with pkgs.lib; { + description = "The runtime library 'msrestazure' for AutoRest generated Python clients."; + homepage = "https://azure.microsoft.com/en-us/develop/python/"; + license = licenses.mit; + maintainers = with maintainers; [ bendlas ]; + }; +} diff --git a/pkgs/development/python-modules/mt-940/default.nix b/pkgs/development/python-modules/mt-940/default.nix index 2693e350112..820b4c1696b 100644 --- a/pkgs/development/python-modules/mt-940/default.nix +++ b/pkgs/development/python-modules/mt-940/default.nix @@ -3,15 +3,16 @@ }: buildPythonPackage rec { - version = "4.13.0"; + version = "4.13.2"; pname = "mt-940"; # No tests in PyPI tarball + # See https://github.com/WoLpH/mt940/pull/72 src = fetchFromGitHub { owner = "WoLpH"; repo = "mt940"; rev = "v${version}"; - sha256 = "0p6z4ipj0drph3ryn8mnb3xn0vjfv54y1c5w5i9ixrxwz48h6bga"; + sha256 = "1lvw3qyv7qhjabcvg55br8x4pnc7hv8xzzaf6wnr8cfjg0q7dzzg"; }; postPatch = '' @@ -21,9 +22,7 @@ buildPythonPackage rec { propagatedBuildInputs = lib.optional (!isPy3k) enum34; - LC_ALL="en_US.UTF-8"; - - checkInputs = [ pyyaml pytestpep8 pytest-flakes pytest glibcLocales ]; + checkInputs = [ pyyaml pytestpep8 pytest-flakes pytest ]; checkPhase = '' py.test diff --git a/pkgs/development/python-modules/mysqlclient/default.nix b/pkgs/development/python-modules/mysqlclient/default.nix index 58d545da624..c43c45df600 100644 --- a/pkgs/development/python-modules/mysqlclient/default.nix +++ b/pkgs/development/python-modules/mysqlclient/default.nix @@ -4,6 +4,10 @@ buildPythonPackage rec { pname = "mysqlclient"; version = "1.4.2.post1"; + nativeBuildInputs = [ + mysql.connector-c + ]; + buildInputs = [ mysql.connector-c ]; diff --git a/pkgs/development/python-modules/netdisco/default.nix b/pkgs/development/python-modules/netdisco/default.nix index efc14936a41..d3fac8df084 100644 --- a/pkgs/development/python-modules/netdisco/default.nix +++ b/pkgs/development/python-modules/netdisco/default.nix @@ -2,13 +2,13 @@ buildPythonPackage rec { pname = "netdisco"; - version = "2.3.0"; + version = "2.5.0"; disabled = !isPy3k; src = fetchPypi { inherit pname version; - sha256 = "2571fc094f3bf8c60be211e90474515f565f3ef1c92e857176daab8577493a3b"; + sha256 = "2ecb9830ceed5cf8f2ccc5a9bbe02ca5f6851435f5315a5402f0123311f13b37"; }; propagatedBuildInputs = [ requests zeroconf netifaces ]; diff --git a/pkgs/development/python-modules/numpy-stl/default.nix b/pkgs/development/python-modules/numpy-stl/default.nix index 0776e4fd792..804c90d7d9d 100644 --- a/pkgs/development/python-modules/numpy-stl/default.nix +++ b/pkgs/development/python-modules/numpy-stl/default.nix @@ -2,11 +2,11 @@ buildPythonPackage rec { pname = "numpy-stl"; - version = "2.9.0"; + version = "2.10.0"; src = fetchPypi { inherit pname version; - sha256 = "0mh7p19rhx800dd54ij1pgln5ny03fdyvadyhrsb380fgjby2nh3"; + sha256 = "1r864sc7anw43s8bg5yd17bxcw1a4lj5h7mz7cbwnzpb9xmqpccj"; }; checkInputs = [ pytest pytestrunner ]; diff --git a/pkgs/development/python-modules/ordered-set/default.nix b/pkgs/development/python-modules/ordered-set/default.nix index dc86068becb..d26459acf70 100644 --- a/pkgs/development/python-modules/ordered-set/default.nix +++ b/pkgs/development/python-modules/ordered-set/default.nix @@ -1,10 +1,10 @@ -{ buildPythonPackage, fetchPypi, lib, pytest, pytestrunner }: +{ buildPythonPackage, fetchPypi, lib, pytest }: buildPythonPackage rec { pname = "ordered-set"; version = "3.1"; - buildInputs = [ pytest pytestrunner ]; + checkInputs = [ pytest ]; src = fetchPypi { inherit pname version; diff --git a/pkgs/development/python-modules/paste/default.nix b/pkgs/development/python-modules/paste/default.nix index 01acbf16963..21e5a04c391 100644 --- a/pkgs/development/python-modules/paste/default.nix +++ b/pkgs/development/python-modules/paste/default.nix @@ -8,12 +8,12 @@ buildPythonPackage rec { pname = "paste"; - version = "3.0.6"; + version = "3.0.8"; src = fetchPypi { pname = "Paste"; inherit version; - sha256 = "14lbi9asn5agsdf7r97prkjpz7amgmp529lbvfhf0nv881xczah6"; + sha256 = "05w1sh6ky4d7pmdb8nv82n13w22jcn3qsagg5ih3hjmbws9kkwf4"; }; propagatedBuildInputs = [ six ]; diff --git a/pkgs/development/python-modules/pdfminer_six/default.nix b/pkgs/development/python-modules/pdfminer_six/default.nix index 71d439d4c20..4c0086869f7 100644 --- a/pkgs/development/python-modules/pdfminer_six/default.nix +++ b/pkgs/development/python-modules/pdfminer_six/default.nix @@ -1,18 +1,18 @@ -{ stdenv, buildPythonPackage, python, fetchFromGitHub, six, pycryptodome, chardet, nose, pytest }: +{ stdenv, buildPythonPackage, python, fetchFromGitHub, six, pycryptodome, chardet, nose, pytest, sortedcontainers }: buildPythonPackage rec { pname = "pdfminer_six"; - version = "20170720"; + version = "20181108"; src = fetchFromGitHub { owner = "pdfminer"; repo = "pdfminer.six"; rev = "${version}"; - sha256 = "0vax5k0a8qn8x86ybpzqydk7x3hajsk8b6xf3y610j19mgag6wvs"; + sha256 = "1v8pcx43fgidv1g54s92k85anvcss08blkhm4yi1hn1ybl0mmw6c"; }; - propagatedBuildInputs = [ six pycryptodome chardet ]; - + propagatedBuildInputs = [ six pycryptodome chardet sortedcontainers ]; + checkInputs = [ nose pytest ]; checkPhase = '' ${python.interpreter} -m pytest diff --git a/pkgs/development/python-modules/peewee/default.nix b/pkgs/development/python-modules/peewee/default.nix index 461cd480c9f..344f52d245f 100644 --- a/pkgs/development/python-modules/peewee/default.nix +++ b/pkgs/development/python-modules/peewee/default.nix @@ -10,14 +10,14 @@ buildPythonPackage rec { pname = "peewee"; - version = "3.8.2"; + version = "3.9.2"; # pypi release does not provide tests src = fetchFromGitHub { owner = "coleifer"; repo = pname; rev = version; - sha256 = "0h6wr7yq4cpnh2ypm83asvs2y54346f5j9xbg4lwb0w3rgr9zndq"; + sha256 = "0rmjr90555s1n6caqbncvilx6v30cksmcr4bjzylapsl3a5aw9aa"; }; diff --git a/pkgs/development/python-modules/pluggy/default.nix b/pkgs/development/python-modules/pluggy/default.nix index 6d7550763eb..282db0fafc1 100644 --- a/pkgs/development/python-modules/pluggy/default.nix +++ b/pkgs/development/python-modules/pluggy/default.nix @@ -26,6 +26,6 @@ buildPythonPackage rec { description = "Plugin and hook calling mechanisms for Python"; homepage = "https://pypi.python.org/pypi/pluggy"; license = lib.licenses.mit; - maintainers = with lib.maintainers; [ jgeerds ]; + maintainers = with lib.maintainers; [ ]; }; -} \ No newline at end of file +} diff --git a/pkgs/development/python-modules/poetry/default.nix b/pkgs/development/python-modules/poetry/default.nix index 7fe41d8d3f1..1b593ff0e6c 100644 --- a/pkgs/development/python-modules/poetry/default.nix +++ b/pkgs/development/python-modules/poetry/default.nix @@ -40,8 +40,9 @@ in buildPythonPackage rec { }; postPatch = '' - substituteInPlace pyproject.toml --replace "3.0a3" "3.0.0a3" - substituteInPlace setup.py --replace "3.0a3" "3.0.0a3" + substituteInPlace setup.py --replace \ + "requests-toolbelt>=0.8.0,<0.9.0" \ + "requests-toolbelt>=0.8.0,<0.10.0" ''; propagatedBuildInputs = [ diff --git a/pkgs/development/python-modules/praw/default.nix b/pkgs/development/python-modules/praw/default.nix index ede3e07390c..fc284384bcb 100644 --- a/pkgs/development/python-modules/praw/default.nix +++ b/pkgs/development/python-modules/praw/default.nix @@ -43,6 +43,6 @@ buildPythonPackage rec { homepage = http://praw.readthedocs.org/; license = licenses.gpl3; platforms = platforms.all; - maintainers = with maintainers; [ jgeerds ]; + maintainers = with maintainers; [ ]; }; } diff --git a/pkgs/development/python-modules/prawcore/default.nix b/pkgs/development/python-modules/prawcore/default.nix index f1ce7ba2a08..5734fbb3d13 100644 --- a/pkgs/development/python-modules/prawcore/default.nix +++ b/pkgs/development/python-modules/prawcore/default.nix @@ -31,6 +31,6 @@ buildPythonPackage rec { homepage = http://praw.readthedocs.org/; license = licenses.gpl3; platforms = platforms.all; - maintainers = with maintainers; [ jgeerds ]; + maintainers = with maintainers; [ ]; }; } diff --git a/pkgs/development/python-modules/priority/deadline.patch b/pkgs/development/python-modules/priority/deadline.patch new file mode 100644 index 00000000000..174dbc2b199 --- /dev/null +++ b/pkgs/development/python-modules/priority/deadline.patch @@ -0,0 +1,39 @@ +From 9d933c3c6535c1c63291e3d35f4ada9135d422df Mon Sep 17 00:00:00 2001 +From: Alyssa Ross <hi@alyssa.is> +Date: Mon, 11 Mar 2019 02:08:43 +0000 +Subject: [PATCH] Allow test_period_of_repetition to be slow + +Recent versions of hypothesis default to a 200ms timeout, which wasn't +enough for my Thinkpad X220 to run this test. I've increased the timeout +for this single test to hopefully a reasonable amount for older +hardware. + +(cherry picked from commit 752beb3a32b59f54168816da531c9d2a387f9715) +--- + test/test_priority.py | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/test/test_priority.py b/test/test_priority.py +index c98a28d..013ce30 100644 +--- a/test/test_priority.py ++++ b/test/test_priority.py +@@ -12,7 +12,7 @@ import itertools + + import pytest + +-from hypothesis import given ++from hypothesis import given, settings + from hypothesis.strategies import ( + integers, lists, tuples, sampled_from + ) +@@ -489,6 +489,7 @@ class TestPriorityTreeOutput(object): + fairness and equidistribution. + """ + @given(STREAMS_AND_WEIGHTS) ++ @settings(deadline=None) + def test_period_of_repetition(self, streams_and_weights): + """ + The period of repetition of a priority sequence is given by the sum of +-- +2.19.2 + diff --git a/pkgs/development/python-modules/priority/default.nix b/pkgs/development/python-modules/priority/default.nix index 90b58b665de..f2f7a935cc4 100644 --- a/pkgs/development/python-modules/priority/default.nix +++ b/pkgs/development/python-modules/priority/default.nix @@ -1,4 +1,4 @@ -{ lib, buildPythonPackage, fetchPypi, pytest, hypothesis }: +{ lib, buildPythonPackage, fetchPypi, fetchpatch, pytest, hypothesis }: buildPythonPackage rec { pname = "priority"; @@ -9,6 +9,11 @@ buildPythonPackage rec { sha256 = "1gpzn9k9zgks0iw5wdmad9b4dry8haiz2sbp6gycpjkzdld9dhbb"; }; + patches = [ + # https://github.com/python-hyper/priority/pull/135 + ./deadline.patch + ]; + checkInputs = [ pytest hypothesis ]; checkPhase = '' PYTHONPATH="src:$PYTHONPATH" pytest diff --git a/pkgs/development/python-modules/pyalgotrade/default.nix b/pkgs/development/python-modules/pyalgotrade/default.nix index 1d4564e9f17..7602caf24cf 100644 --- a/pkgs/development/python-modules/pyalgotrade/default.nix +++ b/pkgs/development/python-modules/pyalgotrade/default.nix @@ -1,23 +1,36 @@ { stdenv , buildPythonPackage , fetchPypi -, isPy3k +, matplotlib , numpy -, scipy +, python-dateutil , pytz +, requests +, retrying +, scipy +, six +, tornado +, tweepy +, ws4py }: buildPythonPackage rec { pname = "pyalgotrade"; version = "0.20"; - disabled = isPy3k; src = fetchPypi { - inherit pname version; + pname = "PyAlgoTrade"; + inherit version; sha256 = "7927c87af202869155280a93ff6ee934bb5b46cdb1f20b70f7407337f8541cbd"; }; - propagatedBuildInputs = [ numpy scipy pytz ]; + propagatedBuildInputs = [ + matplotlib numpy python-dateutil pytz requests + retrying scipy six tornado tweepy ws4py + ]; + + # no tests in PyPI tarball + doCheck = false; meta = with stdenv.lib; { description = "Python Algorithmic Trading"; diff --git a/pkgs/development/python-modules/pyatspi/default.nix b/pkgs/development/python-modules/pyatspi/default.nix index 0405b979c8f..853b316a929 100644 --- a/pkgs/development/python-modules/pyatspi/default.nix +++ b/pkgs/development/python-modules/pyatspi/default.nix @@ -30,7 +30,7 @@ buildPythonPackage rec { description = "Python client bindings for D-Bus AT-SPI"; homepage = https://wiki.linuxfoundation.org/accessibility/d-bus; license = licenses.gpl2; - maintainers = with maintainers; [ jgeerds jtojnar ]; + maintainers = with maintainers; [ jtojnar ]; platforms = with platforms; unix; }; } diff --git a/pkgs/development/python-modules/pyavm/default.nix b/pkgs/development/python-modules/pyavm/default.nix new file mode 100644 index 00000000000..2279f792818 --- /dev/null +++ b/pkgs/development/python-modules/pyavm/default.nix @@ -0,0 +1,37 @@ +{ lib +, buildPythonPackage +, fetchPypi +, pytest +, astropy +, astropy-helpers +, pillow +}: + +buildPythonPackage rec { + pname = "pyavm"; + version = "0.9.4"; + + src = fetchPypi { + pname = "PyAVM"; + inherit version; + sha256 = "f298b864e5bc101ecbb0e46252e95e18a180ac28ba6ec362e63c12a7e914e386"; + }; + + propagatedBuildInputs = [ astropy-helpers ]; + + checkInputs = [ pytest astropy pillow ]; + + checkPhase = "pytest"; + + # Disable automatic update of the astropy-helper module + postPatch = '' + substituteInPlace setup.cfg --replace "auto_use = True" "auto_use = False" + ''; + + meta = with lib; { + description = "Simple pure-python AVM meta-data handling"; + homepage = http://astrofrog.github.io/pyavm/; + license = licenses.mit; + maintainers = [ maintainers.smaret ]; + }; +} diff --git a/pkgs/development/python-modules/pybind11/default.nix b/pkgs/development/python-modules/pybind11/default.nix index 0bdac659406..f49c50185db 100644 --- a/pkgs/development/python-modules/pybind11/default.nix +++ b/pkgs/development/python-modules/pybind11/default.nix @@ -1,4 +1,4 @@ -{ lib, buildPythonPackage, fetchPypi }: +{ lib, buildPythonPackage, fetchPypi, fetchpatch }: buildPythonPackage rec { pname = "pybind11"; @@ -9,6 +9,13 @@ buildPythonPackage rec { sha256 = "1kz1z2cg3q901q9spkdhksmcfiskaghzmbb9ivr5mva856yvnak4"; }; + patches = [ + (fetchpatch { + url = https://github.com/pybind/pybind11/commit/44a40dd61e5178985cfb1150cf05e6bfcec73042.patch; + sha256 = "047nzyfsihswdva96hwchnp4gj2mlbiqvmkdnhxrfi9sji8x31ka"; + }) + ]; + # Current PyPi version does not include test suite doCheck = false; diff --git a/pkgs/development/python-modules/pycaption/default.nix b/pkgs/development/python-modules/pycaption/default.nix index 468011e2a80..a9864a0f095 100644 --- a/pkgs/development/python-modules/pycaption/default.nix +++ b/pkgs/development/python-modules/pycaption/default.nix @@ -17,7 +17,7 @@ buildPythonPackage rec { prePatch = '' substituteInPlace setup.py \ --replace 'beautifulsoup4>=4.2.1,<4.5.0' \ - 'beautifulsoup4>=4.2.1,<=4.6.3' + 'beautifulsoup4>=4.2.1,<5' ''; # don't require enum34 on python >= 3.4 diff --git a/pkgs/development/python-modules/pycares/default.nix b/pkgs/development/python-modules/pycares/default.nix index 341e9519d80..f68a10d6186 100644 --- a/pkgs/development/python-modules/pycares/default.nix +++ b/pkgs/development/python-modules/pycares/default.nix @@ -1,21 +1,29 @@ { stdenv , buildPythonPackage , fetchPypi -, pkgs +, python +, c-ares +, cffi }: buildPythonPackage rec { pname = "pycares"; - version = "2.4.0"; + version = "3.0.0"; src = fetchPypi { inherit pname version; - sha256 = "15pwsxsj1nr33n6x2918bfbzdnqv1qkwd2d5jgvxsm81zxnvgk0f"; + sha256 = "b253f5dcaa0ac7076b79388a3ac80dd8f3bd979108f813baade40d3a9b8bf0bd"; }; - propagatedBuildInputs = [ pkgs.c-ares ]; + buildInputs = [ c-ares ]; - # No tests included + propagatedBuildInputs = [ cffi ]; + + checkPhase = '' + ${python.interpreter} tests/tests.py + ''; + + # requires network access doCheck = false; meta = with stdenv.lib; { diff --git a/pkgs/development/python-modules/pychromecast/default.nix b/pkgs/development/python-modules/pychromecast/default.nix index 0f42af00619..1283fe9340e 100644 --- a/pkgs/development/python-modules/pychromecast/default.nix +++ b/pkgs/development/python-modules/pychromecast/default.nix @@ -2,11 +2,11 @@ buildPythonPackage rec { pname = "PyChromecast"; - version = "2.5.2"; + version = "3.0.0"; src = fetchPypi { inherit pname version; - sha256 = "7ce4eeb398a73c26bd65870739c94845da60f4527ebe2f104826ee32d70d035c"; + sha256 = "15zaka9zjyx5lb78f0qs6w8g1rgz94gjgrgxm6iwih0a2l0pv5h9"; }; disabled = !isPy3k; diff --git a/pkgs/development/python-modules/pyhepmc/default.nix b/pkgs/development/python-modules/pyhepmc/default.nix index e466f800107..acb5c964878 100644 --- a/pkgs/development/python-modules/pyhepmc/default.nix +++ b/pkgs/development/python-modules/pyhepmc/default.nix @@ -1,6 +1,7 @@ { stdenv , buildPythonPackage , fetchPypi +, fetchFromBitbucket , isPy3k , fetchurl , pkgs @@ -17,6 +18,18 @@ buildPythonPackage rec { sha256 = "1210fd7e20d4abc1d9166147a9f7645a2a58b655fe030ad54ab3ea0d0c6e0834"; }; + srcMissing = fetchFromBitbucket { + owner = "andybuckley"; + repo = "pyhepmc"; + rev = "pyhepmc-1.0.0"; + sha256 = "0vxad143pz45q94w5p0dycpk24insdsv1m5k867y56xy24bi0d4w"; + }; + + prePatch = '' + cp -r $srcMissing/hepmc . + chmod +w hepmc + ''; + patches = [ # merge PR https://bitbucket.org/andybuckley/pyhepmc/pull-requests/1/add-incoming-outgoing-generators-for/diff ./pyhepmc_export_edges.patch @@ -26,11 +39,11 @@ buildPythonPackage rec { # regenerate python wrapper preConfigure = '' - rm hepmc/hepmcwrap.py swig -c++ -I${pkgs.hepmc}/include -python hepmc/hepmcwrap.i ''; - buildInputs = [ pkgs.swig pkgs.hepmc ]; + nativeBuildInputs = [ pkgs.swig ]; + buildInputs = [ pkgs.hepmc ]; HEPMCPATH = pkgs.hepmc; diff --git a/pkgs/development/python-modules/pyhomematic/default.nix b/pkgs/development/python-modules/pyhomematic/default.nix index 5749724162e..83796da5f96 100644 --- a/pkgs/development/python-modules/pyhomematic/default.nix +++ b/pkgs/development/python-modules/pyhomematic/default.nix @@ -2,13 +2,13 @@ buildPythonPackage rec { pname = "pyhomematic"; - version = "0.1.56"; + version = "0.1.58"; disabled = !isPy3k; src = fetchPypi { inherit pname version; - sha256 = "ca9f222b99d80be4b7ef8a4427ab55368d14914a0516623e66d1da7563919169"; + sha256 = "b390400169a4d57b3ddc3bf2123d71f2c9ef9042a50906e13253aa67311f5183"; }; # PyPI tarball does not include tests/ directory diff --git a/pkgs/development/python-modules/pyicu/default.nix b/pkgs/development/python-modules/pyicu/default.nix index d0db3c6ed83..6eba02e59ce 100644 --- a/pkgs/development/python-modules/pyicu/default.nix +++ b/pkgs/development/python-modules/pyicu/default.nix @@ -4,7 +4,7 @@ , pytest , six , fetchpatch -, pkgs +, icu }: buildPythonPackage rec { @@ -23,7 +23,9 @@ buildPythonPackage rec { }) ]; - buildInputs = [ pkgs.icu pytest ]; + nativeBuildInputs = [ icu ]; # for icu-config + buildInputs = [ icu ]; + checkInputs = [ pytest ]; propagatedBuildInputs = [ six ]; meta = with stdenv.lib; { diff --git a/pkgs/development/python-modules/pylast/default.nix b/pkgs/development/python-modules/pylast/default.nix index 0510948e6ba..911275d0e5f 100644 --- a/pkgs/development/python-modules/pylast/default.nix +++ b/pkgs/development/python-modules/pylast/default.nix @@ -1,9 +1,11 @@ -{ stdenv, buildPythonPackage, fetchPypi, certifi, six }: +{ stdenv, buildPythonPackage, fetchPypi, isPy3k, certifi, six }: buildPythonPackage rec { pname = "pylast"; version = "3.0.0"; + disabled = !isPy3k; + src = fetchPypi { inherit pname version; sha256 = "24051c52011ff18bdeaee9df084ecc90da6c627da86f3cdcfec4af2928e9bc56"; diff --git a/pkgs/development/python-modules/pyopencl/default.nix b/pkgs/development/python-modules/pyopencl/default.nix index 2aaabe0760f..624dca05e1e 100644 --- a/pkgs/development/python-modules/pyopencl/default.nix +++ b/pkgs/development/python-modules/pyopencl/default.nix @@ -11,6 +11,7 @@ , six , opencl-headers , ocl-icd +, pybind11 }: buildPythonPackage rec { @@ -18,7 +19,7 @@ buildPythonPackage rec { version = "2018.2.3"; checkInputs = [ pytest ]; - buildInputs = [ opencl-headers ocl-icd ]; + buildInputs = [ opencl-headers ocl-icd pybind11 ]; propagatedBuildInputs = [ numpy cffi pytools decorator appdirs six Mako ]; @@ -32,6 +33,10 @@ buildPythonPackage rec { substituteInPlace setup.py --replace "pytest>=2" "" ''; + preBuild = '' + export HOME=$(mktemp -d) + ''; + # gcc: error: pygpu_language_opencl.cpp: No such file or directory doCheck = false; diff --git a/pkgs/development/python-modules/pyregion/default.nix b/pkgs/development/python-modules/pyregion/default.nix new file mode 100644 index 00000000000..dda3a3cd161 --- /dev/null +++ b/pkgs/development/python-modules/pyregion/default.nix @@ -0,0 +1,34 @@ +{ lib +, buildPythonPackage +, fetchPypi +, pyparsing +, numpy +, cython +, astropy +}: + +buildPythonPackage rec { + pname = "pyregion"; + version = "2.0"; + + doCheck = false; # tests require pytest-astropy + + src = fetchPypi { + inherit pname version; + sha256 = "a8ac5f764b53ec332f6bc43f6f2193ca13e8b7d5a3fb2e20ced6b2ea42a9d094"; + }; + + propagatedBuildInputs = [ + pyparsing + numpy + cython + astropy + ]; + + meta = with lib; { + description = "Python parser for ds9 region files"; + homepage = https://github.com/astropy/pyregion; + license = licenses.mit; + maintainers = [ maintainers.smaret ]; + }; +} diff --git a/pkgs/development/python-modules/pyroute2/default.nix b/pkgs/development/python-modules/pyroute2/default.nix index 9f8103b0606..194e76c4a91 100644 --- a/pkgs/development/python-modules/pyroute2/default.nix +++ b/pkgs/development/python-modules/pyroute2/default.nix @@ -2,11 +2,11 @@ buildPythonPackage rec { pname = "pyroute2"; - version = "0.5.3"; + version = "0.5.4"; src = fetchPypi { inherit pname version; - sha256 = "79f7b4286be773c46914df0201dabaf92717a9c06e341e0c420603b2dd31c6bf"; + sha256 = "0w6z4j8l9898bj214v2mh7vx2g43j1b70ijjvc7q3316fscal469"; }; # requires root priviledges diff --git a/pkgs/development/python-modules/pyrr/default.nix b/pkgs/development/python-modules/pyrr/default.nix index 9dd262e0035..10e9781b3ab 100644 --- a/pkgs/development/python-modules/pyrr/default.nix +++ b/pkgs/development/python-modules/pyrr/default.nix @@ -1,13 +1,18 @@ -{ stdenv, buildPythonPackage, fetchPypi -, setuptools, multipledispatch, numpy }: +{ stdenv +, buildPythonPackage +, fetchPypi +, setuptools +, multipledispatch +, numpy +}: buildPythonPackage rec { - version = "0.10.1"; + version = "0.10.2"; pname = "pyrr"; src = fetchPypi { inherit pname version; - sha256 = "06305b2f555f8b8091a6c29a05d5d33f131c9dd268e22d94985e43ab5df70c1d"; + sha256 = "1q9i4qa6ygr8hlpnw55s58naynxzwm0sc1m54wyy1ghbf8m8d2f0"; }; buildInputs = [ setuptools ]; @@ -17,5 +22,6 @@ buildPythonPackage rec { description = "3D mathematical functions using NumPy"; homepage = https://github.com/adamlwgriffiths/Pyrr/; license = licenses.bsd2; + maintainers = with maintainers; [ c0deaddict ]; }; } diff --git a/pkgs/development/python-modules/pysrt/default.nix b/pkgs/development/python-modules/pysrt/default.nix index 882aed18c59..514ff6eb8fe 100644 --- a/pkgs/development/python-modules/pysrt/default.nix +++ b/pkgs/development/python-modules/pysrt/default.nix @@ -1,11 +1,11 @@ { stdenv -, buildPythonApplication +, buildPythonPackage , fetchFromGitHub , chardet , nose }: -buildPythonApplication rec { +buildPythonPackage rec { pname = "pysrt"; version = "1.1.1"; @@ -16,7 +16,7 @@ buildPythonApplication rec { sha256 = "0rwjaf26885vxhxnas5d8zwasvj7x88y4y2pdivjd4vdcpqrqdjn"; }; - buildInputs = [ nose ]; + checkInputs = [ nose ]; checkPhase = '' nosetests -v ''; diff --git a/pkgs/development/python-modules/pytest-django/default.nix b/pkgs/development/python-modules/pytest-django/default.nix index ec28c8af442..4b31e655a6d 100644 --- a/pkgs/development/python-modules/pytest-django/default.nix +++ b/pkgs/development/python-modules/pytest-django/default.nix @@ -10,11 +10,11 @@ }: buildPythonPackage rec { pname = "pytest-django"; - version = "3.4.7"; + version = "3.4.8"; src = fetchPypi { inherit pname version; - sha256 = "3d489db7c9bd18d7c154347b1bdfb82cc6b1ec8539543508b199c77e5eb2caec"; + sha256 = "1vj2xfb6jl570zmmwlhvfpj7af5q554z72z51ril07gyfkkq6cjd"; }; nativeBuildInputs = [ pytest setuptools_scm ]; diff --git a/pkgs/development/python-modules/pytest-isort/default.nix b/pkgs/development/python-modules/pytest-isort/default.nix index 23cd7667992..235d6f3af24 100644 --- a/pkgs/development/python-modules/pytest-isort/default.nix +++ b/pkgs/development/python-modules/pytest-isort/default.nix @@ -1,19 +1,21 @@ -{ lib, buildPythonPackage, fetchPypi, pytestcache, pytest, isort }: +{ lib, buildPythonPackage, fetchPypi, pytest, isort }: buildPythonPackage rec { pname = "pytest-isort"; - version = "0.2.1"; + version = "0.3.1"; src = fetchPypi { inherit pname version; - sha256 = "c70d0f900f4647bb714f0843dd82d7f7b759904006de31254efdb72ce88e0c0e"; + sha256 = "4bfee60dad1870b51700d55a85f5ceda766bd9d3d2878c1bbabee80e61b1be1a"; }; - propagatedBuildInputs = [ pytestcache pytest isort ]; + propagatedBuildInputs = [ isort ]; - # no tests in PyPI tarball, no tags on GitHub - # https://github.com/moccu/pytest-isort/pull/8 - doCheck = false; + checkInputs = [ pytest ]; + + checkPhase = '' + py.test -vs --cache-clear + ''; meta = with lib; { description = "Pytest plugin to perform isort checks (import ordering)"; diff --git a/pkgs/development/python-modules/pytest-rerunfailures/default.nix b/pkgs/development/python-modules/pytest-rerunfailures/default.nix index aeea977ad33..b6aa2460b59 100644 --- a/pkgs/development/python-modules/pytest-rerunfailures/default.nix +++ b/pkgs/development/python-modules/pytest-rerunfailures/default.nix @@ -21,6 +21,6 @@ buildPythonPackage rec { description = "pytest plugin to re-run tests to eliminate flaky failures"; homepage = https://github.com/pytest-dev/pytest-rerunfailures; license = licenses.mpl20; - maintainers = with maintainers; [ jgeerds ]; + maintainers = with maintainers; [ ]; }; } diff --git a/pkgs/development/python-modules/python-engineio/default.nix b/pkgs/development/python-modules/python-engineio/default.nix index 1ea6dd89f2a..7e5be24efaa 100644 --- a/pkgs/development/python-modules/python-engineio/default.nix +++ b/pkgs/development/python-modules/python-engineio/default.nix @@ -8,18 +8,21 @@ , iana-etc , libredirect , aiohttp +, websockets +, websocket_client +, requests , tornado }: buildPythonPackage rec { pname = "python-engineio"; - version = "3.0.0"; + version = "3.4.3"; src = fetchFromGitHub { owner = "miguelgrinberg"; repo = "python-engineio"; rev = "v${version}"; - sha256 = "1v510fhn0li808ar2cmwh5nijacy5x60q9x4gm0b34j6mkmc59ph"; + sha256 = "0wk81rqigw47z087f5kc7b9iwqggypxc62q8q818qyzqwb93ysxf"; }; propagatedBuildInputs = [ @@ -30,7 +33,10 @@ buildPythonPackage rec { eventlet mock aiohttp + websockets + websocket_client tornado + requests ]; # make /etc/protocols accessible to fix socket.getprotobyname('tcp') in sandbox @@ -44,6 +50,7 @@ buildPythonPackage rec { description = "Engine.IO server"; homepage = http://github.com/miguelgrinberg/python-engineio/; license = licenses.mit; + platforms = platforms.linux; maintainers = [ maintainers.mic92 ]; }; } diff --git a/pkgs/development/python-modules/python-gitlab/default.nix b/pkgs/development/python-modules/python-gitlab/default.nix index 8c030ec8639..167da239fd1 100644 --- a/pkgs/development/python-modules/python-gitlab/default.nix +++ b/pkgs/development/python-modules/python-gitlab/default.nix @@ -2,11 +2,11 @@ buildPythonPackage rec { pname = "python-gitlab"; - version = "1.7.0"; + version = "1.8.0"; src = fetchPypi { inherit pname version; - sha256 = "17nh09c28vf2daamyq97bdzgr685lyh668haisqbbp5lkn9gh7j0"; + sha256 = "1rwkl36n1synyggg2li7r075fq5k3cmpgyazinw24bkf7z2kpc56"; }; propagatedBuildInputs = [ requests six ]; diff --git a/pkgs/development/python-modules/python-jsonrpc-server/default.nix b/pkgs/development/python-modules/python-jsonrpc-server/default.nix index 0c4d77612b0..02705492095 100644 --- a/pkgs/development/python-modules/python-jsonrpc-server/default.nix +++ b/pkgs/development/python-modules/python-jsonrpc-server/default.nix @@ -5,15 +5,19 @@ buildPythonPackage rec { pname = "python-jsonrpc-server"; - version = "0.0.2"; + version = "0.1.2"; src = fetchFromGitHub { owner = "palantir"; repo = "python-jsonrpc-server"; rev = version; - sha256 = "1xp6xipslw8d1yv05mjmhql07kz04ibci5psjrv6rapqi6jp4bgk"; + sha256 = "0k55rpywghapk5db8dgp2jj5v5654q6m571s1gcz1mpn2qxkz69l"; }; + postPatch = '' + sed -i 's/version=versioneer.get_version(),/version="${version}",/g' setup.py + ''; + checkInputs = [ pytest mock pytestcov coverage ]; diff --git a/pkgs/development/python-modules/python-language-server/default.nix b/pkgs/development/python-modules/python-language-server/default.nix index 56c00fa11a9..121a98335b6 100644 --- a/pkgs/development/python-modules/python-language-server/default.nix +++ b/pkgs/development/python-modules/python-language-server/default.nix @@ -10,6 +10,7 @@ , pycodestyle ? null , pydocstyle ? null , pyflakes ? null +, pylint ? null , rope ? null , yapf ? null }: @@ -20,13 +21,13 @@ in buildPythonPackage rec { pname = "python-language-server"; - version = "0.21.2"; + version = "0.25.0"; src = fetchFromGitHub { owner = "palantir"; repo = "python-language-server"; rev = version; - sha256 = "11fvrpv1kymj2fzh8fhys4qk1xc64j1rbdrz252awyab7b3509i7"; + sha256 = "10la48m10j4alfnpw0xw359fb833scf5kv7kjvh7djf6ij7cfsvq"; }; # The tests require all the providers, disable otherwise. @@ -49,6 +50,7 @@ buildPythonPackage rec { ++ stdenv.lib.optional (withProvider "pycodestyle") pycodestyle ++ stdenv.lib.optional (withProvider "pydocstyle") pydocstyle ++ stdenv.lib.optional (withProvider "pyflakes") pyflakes + ++ stdenv.lib.optional (withProvider "pylint") pylint ++ stdenv.lib.optional (withProvider "rope") rope ++ stdenv.lib.optional (withProvider "yapf") yapf ++ stdenv.lib.optional isPy27 configparser diff --git a/pkgs/development/python-modules/pyzmq/default.nix b/pkgs/development/python-modules/pyzmq/default.nix index 9de07d3ed08..dcab96d12a6 100644 --- a/pkgs/development/python-modules/pyzmq/default.nix +++ b/pkgs/development/python-modules/pyzmq/default.nix @@ -9,11 +9,11 @@ buildPythonPackage rec { pname = "pyzmq"; - version = "17.1.3"; + version = "18.0.1"; src = fetchPypi { inherit pname version; - sha256 = "83722236bd6ae6a07dec0cb728906785040e91826c7575709a258b4e21d0f812"; + sha256 = "0k3y6k3l9dmih3qmc4vrw26dpjggdk5c6r6806qhgjgpyq2rhccb"; }; checkInputs = [ pytest tornado ]; @@ -22,12 +22,14 @@ buildPythonPackage rec { # test_socket.py seems to be hanging # others fail + # for test_monitor: https://github.com/zeromq/pyzmq/issues/1272 checkPhase = '' py.test $out/${python.sitePackages}/zmq/ -k "not test_socket \ and not test_current \ and not test_instance \ and not test_callable_check \ and not test_on_recv_basic \ - and not test_on_recv_wake" + and not test_on_recv_wake \ + and not test_monitor" ''; } diff --git a/pkgs/development/python-modules/qasm2image/default.nix b/pkgs/development/python-modules/qasm2image/default.nix index 39c7b2055c1..8a49e8418fd 100644 --- a/pkgs/development/python-modules/qasm2image/default.nix +++ b/pkgs/development/python-modules/qasm2image/default.nix @@ -8,6 +8,7 @@ , svgwrite , colorama , python +, pythonOlder }: buildPythonPackage rec { @@ -21,6 +22,8 @@ buildPythonPackage rec { sha256 = "1bnkzv7wrdvrq71dmsqanb3v2hcsxh5zaglfcxm2d9zzpmvb4a2n"; }; + disabled = pythonOlder "3.5"; + propagatedBuildInputs = [ cairocffi cairosvg diff --git a/pkgs/development/python-modules/qdarkstyle/default.nix b/pkgs/development/python-modules/qdarkstyle/default.nix new file mode 100644 index 00000000000..99d9ba8cf8a --- /dev/null +++ b/pkgs/development/python-modules/qdarkstyle/default.nix @@ -0,0 +1,22 @@ +{ lib, fetchPypi, buildPythonPackage }: + +buildPythonPackage rec { + pname = "qdarkstyle"; + version = "2.6.5"; + + src = fetchPypi { + inherit version; + pname = "QDarkStyle"; + sha256 = "96b14cd0440a0f73db4e14c5accdaa08072625d0395ae011d444508cbd73eb9e"; + }; + + # No tests available + doCheck = false; + + meta = with lib; { + description = "A dark stylesheet for Python and Qt applications"; + homepage = https://github.com/ColinDuquesnoy/QDarkStyleSheet; + license = licenses.mit; + maintainers = with maintainers; [ nyanloutre ]; + }; +} diff --git a/pkgs/development/python-modules/qscintilla-qt5/default.nix b/pkgs/development/python-modules/qscintilla-qt5/default.nix index 788b2e9e9ae..987c1ca9049 100644 --- a/pkgs/development/python-modules/qscintilla-qt5/default.nix +++ b/pkgs/development/python-modules/qscintilla-qt5/default.nix @@ -1,19 +1,18 @@ { lib -, buildPythonPackage -, qscintillaCpp +, pythonPackages +, qscintilla , lndir -, sip -, python -, pyqt5 }: - +, qtbase +}: +with pythonPackages; buildPythonPackage rec { pname = "qscintilla"; - version = qscintillaCpp.version; - src = qscintillaCpp.src; + version = qscintilla.version; + src = qscintilla.src; format = "other"; - nativeBuildInputs = [ lndir sip ]; - buildInputs = [ qscintillaCpp ]; + nativeBuildInputs = [ lndir sip qtbase ]; + buildInputs = [ qscintilla ]; propagatedBuildInputs = [ pyqt5 ]; preConfigure = '' @@ -23,13 +22,14 @@ buildPythonPackage rec { cd Python ${python.executable} ./configure.py \ --pyqt=PyQt5 \ - --destdir=$out/lib/${python.sitePackages}/PyQt5 \ - --stubsdir=$out/lib/${python.sitePackages}/PyQt5 \ + --destdir=$out/${python.sitePackages}/PyQt5 \ + --stubsdir=$out/${python.sitePackages}/PyQt5 \ --apidir=$out/api/${python.libPrefix} \ - --qsci-incdir=${qscintillaCpp}/include \ - --qsci-libdir=${qscintillaCpp}/lib \ + --qsci-incdir=${qscintilla}/include \ + --qsci-libdir=${qscintilla}/lib \ --pyqt-sipdir=${pyqt5}/share/sip/PyQt5 \ - --qsci-sipdir=$out/share/sip/PyQt5 + --qsci-sipdir=$out/share/sip/PyQt5 \ + --sip-incdir=${sip}/include ''; meta = with lib; { diff --git a/pkgs/development/python-modules/qtawesome/default.nix b/pkgs/development/python-modules/qtawesome/default.nix index 2fe8c0a669a..7b1b8b0444c 100644 --- a/pkgs/development/python-modules/qtawesome/default.nix +++ b/pkgs/development/python-modules/qtawesome/default.nix @@ -2,11 +2,11 @@ buildPythonPackage rec { pname = "QtAwesome"; - version = "0.5.6"; + version = "0.5.7"; src = fetchPypi { inherit pname version; - sha256 = "0f6dvqmalzi4q4rrpl1xlrxanibam1nifzsgqb5z4jr4ap7kiyp3"; + sha256 = "1c70k7b91f64df0v12ykv3xqj9pzgk919k215fb3y0d64zip42ai"; }; propagatedBuildInputs = [ qtpy six ]; diff --git a/pkgs/development/python-modules/rabbitpy/default.nix b/pkgs/development/python-modules/rabbitpy/default.nix index 9e6b9dc0d67..7406faca601 100644 --- a/pkgs/development/python-modules/rabbitpy/default.nix +++ b/pkgs/development/python-modules/rabbitpy/default.nix @@ -1,6 +1,6 @@ { stdenv , buildPythonPackage -, fetchPypi +, fetchFromGitHub , mock , nose , pamqp @@ -10,13 +10,29 @@ buildPythonPackage rec { version = "1.0.0"; pname = "rabbitpy"; - src = fetchPypi { - inherit pname version; - sha256 = "54d33746d0c6a686417cd354346803945df0740b39fb92842d259387100db126"; + # No tests in the pypi tarball, so we directly fetch from git + src = fetchFromGitHub { + owner = "gmr"; + repo = pname; + rev = version; + sha256 = "0fd80zlr4p2sh77rxyyfi9l0h2zqi2csgadr0rhnpgpqsy10qck6"; }; - buildInputs = [ mock nose ]; propagatedBuildInputs = [ pamqp ]; + checkInputs = [ mock nose ]; + + checkPhase = '' + runHook preCheck + rm tests/integration_tests.py # Impure tests requiring network + nosetests tests + runHook postCheck + ''; + + postPatch = '' + # See: https://github.com/gmr/rabbitpy/issues/118 + substituteInPlace setup.py \ + --replace 'pamqp>=1.6.1,<2.0' 'pamqp' + ''; meta = with stdenv.lib; { description = "A pure python, thread-safe, minimalistic and pythonic RabbitMQ client library"; diff --git a/pkgs/development/python-modules/radio_beam/default.nix b/pkgs/development/python-modules/radio_beam/default.nix index 07a05902a36..8b2fdc90f04 100644 --- a/pkgs/development/python-modules/radio_beam/default.nix +++ b/pkgs/development/python-modules/radio_beam/default.nix @@ -5,13 +5,13 @@ buildPythonPackage rec { pname = "radio_beam"; - version = "0.2"; + version = "0.3.1"; doCheck = false; # the tests requires several pytest plugins that are not in nixpkgs src = fetchPypi { inherit pname version; - sha256 = "0gbnwnk89n8z0xwn41rc7wpr0fwrzkvxficyki3dyqbxq7y3qfrv"; + sha256 = "1wgd9dyz3pcc9ighkclb6qfyshwbg35s57lz6k62jhcxpvp8r5zb"; }; propagatedBuildInputs = [ astropy ]; diff --git a/pkgs/development/python-modules/rasterio/default.nix b/pkgs/development/python-modules/rasterio/default.nix index 9717a9cda23..6306267ba2a 100644 --- a/pkgs/development/python-modules/rasterio/default.nix +++ b/pkgs/development/python-modules/rasterio/default.nix @@ -17,7 +17,7 @@ buildPythonPackage rec { }; checkInputs = [ boto3 pytest pytestcov packaging hypothesis ]; - buildInputs = [ cython ]; + nativeBuildInputs = [ cython gdal ]; propagatedBuildInputs = [ gdal numpy attrs affine cligj click-plugins snuggs ]; meta = with lib; { diff --git a/pkgs/development/python-modules/rbtools/default.nix b/pkgs/development/python-modules/rbtools/default.nix index 3be8bb99bbe..e394b964643 100644 --- a/pkgs/development/python-modules/rbtools/default.nix +++ b/pkgs/development/python-modules/rbtools/default.nix @@ -16,10 +16,10 @@ buildPythonPackage rec { sha256 = "1ng8l8cx81cz23ls7fq9wz4ijs0zbbaqh4kj0mj6plzcqcf8na4i"; }; - buildInputs = [ nose ]; + checkInputs = [ nose ]; propagatedBuildInputs = [ six ]; - checkPhase = "nosetests"; + checkPhase = "LC_ALL=C nosetests"; meta = with stdenv.lib; { homepage = https://www.reviewboard.org/docs/rbtools/dev/; diff --git a/pkgs/development/python-modules/reproject/default.nix b/pkgs/development/python-modules/reproject/default.nix new file mode 100644 index 00000000000..f84508fe53c --- /dev/null +++ b/pkgs/development/python-modules/reproject/default.nix @@ -0,0 +1,35 @@ +{ lib +, buildPythonPackage +, fetchPypi +, numpy +, astropy +, astropy-healpix +, astropy-helpers +, scipy +}: + +buildPythonPackage rec { + pname = "reproject"; + version = "0.4"; + + doCheck = false; # tests require pytest-astropy + + src = fetchPypi { + inherit pname version; + sha256 = "dbbb18a8b211292c7ce61121b8538fc279540337be1c05cabc7570c5aca6d734"; + }; + + propagatedBuildInputs = [ numpy astropy astropy-healpix astropy-helpers scipy ]; + + # Disable automatic update of the astropy-helper module + postPatch = '' + substituteInPlace setup.cfg --replace "auto_use = True" "auto_use = False" + ''; + + meta = with lib; { + description = "Reproject astronomical images"; + homepage = https://reproject.readthedocs.io; + license = licenses.bsd3; + maintainers = [ maintainers.smaret ]; + }; +} diff --git a/pkgs/development/python-modules/requests-toolbelt/default.nix b/pkgs/development/python-modules/requests-toolbelt/default.nix index 13e017520a7..ff3a18e7e76 100644 --- a/pkgs/development/python-modules/requests-toolbelt/default.nix +++ b/pkgs/development/python-modules/requests-toolbelt/default.nix @@ -30,6 +30,6 @@ buildPythonPackage rec { description = "A toolbelt of useful classes and functions to be used with python-requests"; homepage = http://toolbelt.rtfd.org; license = lib.licenses.asl20; - maintainers = with lib.maintainers; [ matthiasbeyer jgeerds ]; + maintainers = with lib.maintainers; [ matthiasbeyer ]; }; -} \ No newline at end of file +} diff --git a/pkgs/development/python-modules/restructuredtext_lint/default.nix b/pkgs/development/python-modules/restructuredtext_lint/default.nix index 9f73ba28362..eeed4289230 100644 --- a/pkgs/development/python-modules/restructuredtext_lint/default.nix +++ b/pkgs/development/python-modules/restructuredtext_lint/default.nix @@ -1,11 +1,9 @@ { lib , buildPythonPackage , fetchPypi +, isPy37 , docutils , nose -, stdenv -, flake8 -, pyyaml , testtools }: @@ -13,16 +11,19 @@ buildPythonPackage rec { pname = "restructuredtext_lint"; version = "1.2.2"; + # https://github.com/twolfson/restructuredtext-lint/pull/47 + disabled = isPy37; + src = fetchPypi { inherit pname version; sha256 = "82880a8de8a41bfc84f533744091b1ead8e2ab9ad6c0a3f60f4750ef6c802350"; }; - checkInputs = [ nose flake8 pyyaml testtools ]; + checkInputs = [ nose testtools ]; propagatedBuildInputs = [ docutils ]; checkPhase = '' - ${stdenv.shell} test.sh + nosetests --nocapture ''; meta = { @@ -30,4 +31,4 @@ buildPythonPackage rec { homepage = https://github.com/twolfson/restructuredtext-lint; license = lib.licenses.unlicense; }; -} \ No newline at end of file +} diff --git a/pkgs/development/python-modules/robotframework-tools/default.nix b/pkgs/development/python-modules/robotframework-tools/default.nix index 98bed064b1f..be8b0b9454d 100644 --- a/pkgs/development/python-modules/robotframework-tools/default.nix +++ b/pkgs/development/python-modules/robotframework-tools/default.nix @@ -1,11 +1,12 @@ { stdenv , buildPythonPackage , fetchPypi +, isPy3k , robotframework , moretools , pathpy , six -, setuptools +, zetup }: buildPythonPackage rec { @@ -17,13 +18,14 @@ buildPythonPackage rec { sha256 = "04gkn1zpf3rsvbqdxrrjqqi8sa0md9gqwh6n5w2m03fdwjg4lc7q"; }; - propagatedBuildInputs = [ robotframework moretools pathpy six setuptools ]; + nativeBuildInputs = [ zetup ]; + + propagatedBuildInputs = [ robotframework moretools pathpy six ]; meta = with stdenv.lib; { description = "Python Tools for Robot Framework and Test Libraries"; homepage = https://bitbucket.org/userzimmermann/robotframework-tools; license = licenses.gpl3; - platforms = platforms.linux; + broken = isPy3k; # 2019-03-15, missing dependency robotframework-python3 }; - } diff --git a/pkgs/development/python-modules/rply/default.nix b/pkgs/development/python-modules/rply/default.nix index e7ce3b5b50d..a468bee275c 100644 --- a/pkgs/development/python-modules/rply/default.nix +++ b/pkgs/development/python-modules/rply/default.nix @@ -2,16 +2,16 @@ buildPythonPackage rec { pname = "rply"; - version = "0.7.6"; + version = "0.7.7"; src = fetchFromGitHub { owner = "alex"; repo = "rply"; rev = "v${version}"; - sha256 = "0a9r81kaibgr26psss02rn2nc6bf84a8q9nsywkm1xcswy8xrmcx"; + sha256 = "1qv37hn7hhxd388znri76g0zjxsbwhxhcaic94dvw9pq4l60vqp6"; }; - buildInputs = [ appdirs ]; + propagatedBuildInputs = [ appdirs ]; checkInputs = [ pytest ]; checkPhase = '' diff --git a/pkgs/development/python-modules/secretstorage/default.nix b/pkgs/development/python-modules/secretstorage/default.nix index bff45c7f2c3..e2c3e975b9a 100644 --- a/pkgs/development/python-modules/secretstorage/default.nix +++ b/pkgs/development/python-modules/secretstorage/default.nix @@ -2,14 +2,14 @@ buildPythonPackage rec { pname = "secretstorage"; - version = "3.1.0"; + version = "3.1.1"; disabled = pythonOlder "3.5"; src = fetchPypi { pname = "SecretStorage"; inherit version; - sha256 = "12vxzradibfmznssh7x2zd7qym2hl7wn34fn2yn58pnx6sykrai9"; + sha256 = "14lznnn916ddn6yrd3w2nr2zq49zc8hw53yjz1k9yhd492p9gir0"; }; propagatedBuildInputs = [ diff --git a/pkgs/development/python-modules/setuptools_scm/default.nix b/pkgs/development/python-modules/setuptools_scm/default.nix index 4a6b5ecc0cd..a222fc9e49f 100644 --- a/pkgs/development/python-modules/setuptools_scm/default.nix +++ b/pkgs/development/python-modules/setuptools_scm/default.nix @@ -18,6 +18,6 @@ buildPythonPackage rec { homepage = https://bitbucket.org/pypa/setuptools_scm/; description = "Handles managing your python package versions in scm metadata"; license = licenses.mit; - maintainers = with maintainers; [ jgeerds ]; + maintainers = with maintainers; [ ]; }; } diff --git a/pkgs/development/python-modules/shapely/library-paths.patch b/pkgs/development/python-modules/shapely/library-paths.patch index 6137e758182..f75ad7a9486 100644 --- a/pkgs/development/python-modules/shapely/library-paths.patch +++ b/pkgs/development/python-modules/shapely/library-paths.patch @@ -107,3 +107,21 @@ index 09bf1ab..837aa98 100644 def _geos_version(): +diff --git a/tests/test_dlls.py b/tests/test_dlls.py +index 35f9cc2..3dfcaac 100644 +--- a/tests/test_dlls.py ++++ b/tests/test_dlls.py +@@ -12,12 +12,7 @@ class LoadingTestCase(unittest.TestCase): + @unittest.skipIf(sys.platform == "win32", "FIXME: adapt test for win32") + def test_fallbacks(self): + load_dll('geos_c', fallbacks=[ +- os.path.join(sys.prefix, "lib", "libgeos_c.dylib"), # anaconda (Mac OS X) +- '/opt/local/lib/libgeos_c.dylib', # MacPorts +- '/usr/local/lib/libgeos_c.dylib', # homebrew (Mac OS X) +- os.path.join(sys.prefix, "lib", "libgeos_c.so"), # anaconda (Linux) +- 'libgeos_c.so.1', +- 'libgeos_c.so']) ++ '@libgeos_c@']) + + + def test_suite(): diff --git a/pkgs/development/python-modules/simpleparse/default.nix b/pkgs/development/python-modules/simpleparse/default.nix index f1d6874dfbd..339f6d1debd 100644 --- a/pkgs/development/python-modules/simpleparse/default.nix +++ b/pkgs/development/python-modules/simpleparse/default.nix @@ -11,7 +11,8 @@ buildPythonPackage rec { disabled = isPy3k || isPyPy; src = fetchPypi { - inherit pname version; + pname = "SimpleParse"; + inherit version; sha256 = "18ccdc249bb550717af796af04a7d50aef523368901f64036a48eee5daca149d"; }; diff --git a/pkgs/development/python-modules/snuggs/default.nix b/pkgs/development/python-modules/snuggs/default.nix index 3e0ffe4110d..017ea7e0d5f 100644 --- a/pkgs/development/python-modules/snuggs/default.nix +++ b/pkgs/development/python-modules/snuggs/default.nix @@ -5,14 +5,14 @@ buildPythonPackage rec { pname = "snuggs"; - version = "1.4.2"; + version = "1.4.3"; # Pypi doesn't ship the tests, so we fetch directly from GitHub src = fetchFromGitHub { owner = "mapbox"; repo = pname; rev = version; - sha256 = "1q6jqwai4qgghdjgwhyx3yz8mlrm7p1vvnwc339lfl028hrgb5kb"; + sha256 = "198nbgkhlg4ik2i1r2cp900iqlairh2hnii2y8v5wy1qk3rv0s9g"; }; propagatedBuildInputs = [ click numpy pyparsing ]; diff --git a/pkgs/development/python-modules/stevedore/default.nix b/pkgs/development/python-modules/stevedore/default.nix index 4e607799d22..e7f8be7b469 100644 --- a/pkgs/development/python-modules/stevedore/default.nix +++ b/pkgs/development/python-modules/stevedore/default.nix @@ -2,11 +2,11 @@ buildPythonPackage rec { pname = "stevedore"; - version = "1.30.0"; + version = "1.30.1"; src = fetchPypi { inherit pname version; - sha256 = "0161pwgv6514ks6lky8642phlcqks5w8j5sacdnbfgx5s6nwfaxr"; + sha256 = "1860zslirsqskc2iifljxcyly28zqgjpmkm7k3bj6zyqagzriq3v"; }; doCheck = false; diff --git a/pkgs/development/python-modules/subliminal/default.nix b/pkgs/development/python-modules/subliminal/default.nix index 0da11909de9..61d406edafc 100644 --- a/pkgs/development/python-modules/subliminal/default.nix +++ b/pkgs/development/python-modules/subliminal/default.nix @@ -1,6 +1,7 @@ -{ stdenv +{ lib , fetchPypi -, buildPythonApplication +, buildPythonPackage +, isPy3k , guessit , babelfish , enzyme @@ -16,9 +17,16 @@ , rarfile , pytz , futures +, sympy +, vcrpy +, pytest +, pytestpep8 +, pytest-flakes +, pytestcov +, pytestrunner }: -buildPythonApplication rec { +buildPythonPackage rec { pname = "subliminal"; version = "2.0.5"; @@ -27,13 +35,21 @@ buildPythonApplication rec { sha256 = "1dzv5csjcwgz69aimarx2c6606ckm2gbn4x2mzydcqnyai7sayhl"; }; - # Too many test dependencies + propagatedBuildInputs = [ + guessit babelfish enzyme beautifulsoup4 requests + click dogpile_cache stevedore chardet pysrt six + appdirs rarfile pytz + ] ++ lib.optional (!isPy3k) futures; + + checkInputs = [ + sympy vcrpy pytest pytestpep8 pytest-flakes + pytestcov pytestrunner + ]; + + # https://github.com/Diaoul/subliminal/pull/963 doCheck = false; - propagatedBuildInputs = [ guessit babelfish enzyme beautifulsoup4 requests - click dogpile_cache stevedore chardet pysrt six - appdirs rarfile pytz futures ]; - meta = with stdenv.lib; { + meta = with lib; { homepage = https://github.com/Diaoul/subliminal; description = "Python library to search and download subtitles"; license = licenses.mit; diff --git a/pkgs/development/python-modules/suds-jurko/default.nix b/pkgs/development/python-modules/suds-jurko/default.nix index 5c04c5bd5d3..5459a39fc1f 100644 --- a/pkgs/development/python-modules/suds-jurko/default.nix +++ b/pkgs/development/python-modules/suds-jurko/default.nix @@ -18,11 +18,7 @@ buildPythonPackage rec { buildInputs = [ pytest ]; - preBuild = '' - # fails - substituteInPlace tests/test_transport_http.py \ - --replace "test_sending_unicode_data" "noop" - ''; + doCheck = false; # v0.6 is broken with recent pytest 4.x meta = with stdenv.lib; { description = "Lightweight SOAP client (Jurko's fork)"; diff --git a/pkgs/development/python-modules/telethon-session-sqlalchemy/default.nix b/pkgs/development/python-modules/telethon-session-sqlalchemy/default.nix index 41e413948c2..c792136cb4f 100644 --- a/pkgs/development/python-modules/telethon-session-sqlalchemy/default.nix +++ b/pkgs/development/python-modules/telethon-session-sqlalchemy/default.nix @@ -2,13 +2,13 @@ buildPythonPackage rec { pname = "telethon-session-sqlalchemy"; - version = "0.2.9.post1"; + version = "0.2.14"; disabled = !isPy3k; src = fetchPypi { inherit pname version; - sha256 = "bbe6a8ca32dd42aa1830b91f08f0458d728dc9eedca0ca27814a34c0b566100e"; + sha256 = "94aaf98afc051b4e167783f3d972bd9b51ab736a1e45df100bf52984e53eebac"; }; propagatedBuildInputs = [ diff --git a/pkgs/development/python-modules/telethon/default.nix b/pkgs/development/python-modules/telethon/default.nix index 23a06c0cd25..09d944c8088 100644 --- a/pkgs/development/python-modules/telethon/default.nix +++ b/pkgs/development/python-modules/telethon/default.nix @@ -2,12 +2,12 @@ buildPythonPackage rec { pname = "telethon"; - version = "1.5.5"; + version = "1.6.2"; src = fetchPypi { inherit version; pname = "Telethon"; - sha256 = "1qpc4vc3lidhlp1c7521nxizjr6y5c3l9x41knqv02x8n3l9knxa"; + sha256 = "074h5gj0c330rb1nxzpqm31fp1vw7calh1cdkapbjx90j769iz18"; }; propagatedBuildInputs = [ diff --git a/pkgs/development/python-modules/thumbor/0001-Don-t-use-which-implementation-to-find-required-exec.patch b/pkgs/development/python-modules/thumbor/0001-Don-t-use-which-implementation-to-find-required-exec.patch new file mode 100644 index 00000000000..4a2d9df0618 --- /dev/null +++ b/pkgs/development/python-modules/thumbor/0001-Don-t-use-which-implementation-to-find-required-exec.patch @@ -0,0 +1,277 @@ +From bd5a5b58b438ff34d27781e28cd7fab93bfc9f3f Mon Sep 17 00:00:00 2001 +From: Maximilian Bosch <maximilian@mbosch.me> +Date: Sat, 9 Mar 2019 23:26:30 +0100 +Subject: [PATCH] Don't use `which` implementation to find required executables + +Nix specific patch. + +Rather than relying on a global state, we set an absolute store path for +all external dependencies to ensure their functionality. +--- + integration_tests/__init__.py | 4 ++-- + tests/engines/test_gif.py | 2 +- + tests/handlers/test_base_handler.py | 30 ++++++++++++++--------------- + tests/optimizers/test_gifv.py | 2 +- + tests/test_server.py | 4 ++++ + tests/test_utils.py | 3 +++ + thumbor/server.py | 7 +------ + 7 files changed, 26 insertions(+), 26 deletions(-) + +diff --git a/integration_tests/__init__.py b/integration_tests/__init__.py +index 9bdd0a3..7d9de8f 100644 +--- a/integration_tests/__init__.py ++++ b/integration_tests/__init__.py +@@ -15,7 +15,7 @@ class EngineCase(AsyncHTTPTestCase): + def get_app(self): + cfg = Config(SECURITY_KEY='ACME-SEC') + server_params = ServerParameters(None, None, None, None, None, None) +- server_params.gifsicle_path = which('gifsicle') ++ server_params.gifsicle_path = '@gifsicle@' + + cfg.DETECTORS = [ + 'thumbor.detectors.face_detector', +@@ -28,7 +28,7 @@ class EngineCase(AsyncHTTPTestCase): + cfg.FILE_LOADER_ROOT_PATH = os.path.join(os.path.dirname(__file__), 'imgs') + cfg.ENGINE = getattr(self, 'engine', None) + cfg.USE_GIFSICLE_ENGINE = True +- cfg.FFMPEG_PATH = which('ffmpeg') ++ cfg.FFMPEG_PATH = '@ffmpeg@' + cfg.ENGINE_THREADPOOL_SIZE = 10 + cfg.OPTIMIZERS = [ + 'thumbor.optimizers.gifv', +diff --git a/tests/engines/test_gif.py b/tests/engines/test_gif.py +index c0c8430..ce0cc51 100644 +--- a/tests/engines/test_gif.py ++++ b/tests/engines/test_gif.py +@@ -44,7 +44,7 @@ class GitEngineTestCase(TestCase): + def get_server(self): + server = ServerParameters(8889, 'localhost', 'thumbor.conf', None, 'info', None) + server.security_key = 'ACME-SEC' +- server.gifsicle_path = which('gifsicle') ++ server.gifsicle_path = '@gifsicle@' + return server + + def get_context(self, *args, **kwargs): +diff --git a/tests/handlers/test_base_handler.py b/tests/handlers/test_base_handler.py +index 69dc110..4493abe 100644 +--- a/tests/handlers/test_base_handler.py ++++ b/tests/handlers/test_base_handler.py +@@ -557,7 +557,7 @@ class ImageOperationsWithAutoWebPTestCase(BaseImagingTestCase): + server = ServerParameters(8889, 'localhost', 'thumbor.conf', None, 'info', None) + server.security_key = 'ACME-SEC' + ctx = Context(server, cfg, importer) +- ctx.server.gifsicle_path = which('gifsicle') ++ ctx.server.gifsicle_path = '@gifsicle@' + return ctx + + def get_as_webp(self, url): +@@ -657,7 +657,7 @@ class ImageOperationsWithAutoWebPWithResultStorageTestCase(BaseImagingTestCase): + server.security_key = 'ACME-SEC' + ctx = Context(server, cfg, importer) + ctx.request = self.get_request() +- ctx.server.gifsicle_path = which('gifsicle') ++ ctx.server.gifsicle_path = '@gifsicle@' + return ctx + + @property +@@ -783,7 +783,7 @@ class ImageOperationsWithGifVTestCase(BaseImagingTestCase): + cfg = Config(SECURITY_KEY='ACME-SEC') + cfg.LOADER = "thumbor.loaders.file_loader" + cfg.FILE_LOADER_ROOT_PATH = self.loader_path +- cfg.FFMPEG_PATH = which('ffmpeg') ++ cfg.FFMPEG_PATH = '@ffmpeg@' + cfg.OPTIMIZERS = [ + 'thumbor.optimizers.gifv', + ] +@@ -793,7 +793,7 @@ class ImageOperationsWithGifVTestCase(BaseImagingTestCase): + server = ServerParameters(8889, 'localhost', 'thumbor.conf', None, 'info', None) + server.security_key = 'ACME-SEC' + ctx = Context(server, cfg, importer) +- ctx.server.gifsicle_path = which('gifsicle') ++ ctx.server.gifsicle_path = '@gifsicle@' + return ctx + + def test_should_convert_animated_gif_to_mp4_when_filter_without_params(self): +@@ -828,7 +828,7 @@ class ImageOperationsImageCoverTestCase(BaseImagingTestCase): + server = ServerParameters(8889, 'localhost', 'thumbor.conf', None, 'info', None) + server.security_key = 'ACME-SEC' + ctx = Context(server, cfg, importer) +- ctx.server.gifsicle_path = which('gifsicle') ++ ctx.server.gifsicle_path = '@gifsicle@' + return ctx + + def test_can_get_image_cover(self): +@@ -849,7 +849,7 @@ class ImageOperationsWithResultStorageTestCase(BaseImagingTestCase): + cfg.RESULT_STORAGE_FILE_STORAGE_ROOT_PATH = self.root_path + + cfg.USE_GIFSICLE_ENGINE = True +- cfg.FFMPEG_PATH = which('ffmpeg') ++ cfg.FFMPEG_PATH = '@ffmpeg@' + cfg.AUTO_WEBP = True + cfg.OPTIMIZERS = [ + 'thumbor.optimizers.gifv', +@@ -860,7 +860,7 @@ class ImageOperationsWithResultStorageTestCase(BaseImagingTestCase): + server = ServerParameters(8889, 'localhost', 'thumbor.conf', None, 'info', None) + server.security_key = 'ACME-SEC' + ctx = Context(server, cfg, importer) +- ctx.server.gifsicle_path = which('gifsicle') ++ ctx.server.gifsicle_path = '@gifsicle@' + + return ctx + +@@ -891,7 +891,7 @@ class ImageOperationsResultStorageOnlyTestCase(BaseImagingTestCase): + cfg.RESULT_STORAGE = 'thumbor.result_storages.file_storage' + cfg.RESULT_STORAGE_EXPIRATION_SECONDS = 60 + cfg.RESULT_STORAGE_FILE_STORAGE_ROOT_PATH = self.root_path +- cfg.FFMPEG_PATH = which('ffmpeg') ++ cfg.FFMPEG_PATH = '@ffmpeg@' + + cfg.USE_GIFSICLE_ENGINE = True + cfg.AUTO_WEBP = True +@@ -904,7 +904,7 @@ class ImageOperationsResultStorageOnlyTestCase(BaseImagingTestCase): + server = ServerParameters(8889, 'localhost', 'thumbor.conf', None, 'info', None) + server.security_key = 'ACME-SEC' + ctx = Context(server, cfg, importer) +- ctx.server.gifsicle_path = which('gifsicle') ++ ctx.server.gifsicle_path = '@gifsicle@' + + return ctx + +@@ -1040,7 +1040,7 @@ class ImageOperationsWithMaxPixels(BaseImagingTestCase): + server = ServerParameters(8889, 'localhost', 'thumbor.conf', None, 'info', None) + server.security_key = 'ACME-SEC' + ctx = Context(server, cfg, importer) +- ctx.server.gifsicle_path = which('gifsicle') ++ ctx.server.gifsicle_path = '@gifsicle@' + return ctx + + def test_should_error(self): +@@ -1061,7 +1061,7 @@ class ImageOperationsWithRespectOrientation(BaseImagingTestCase): + server = ServerParameters(8889, 'localhost', 'thumbor.conf', None, 'info', None) + server.security_key = 'ACME-SEC' + self.context = Context(server, cfg, importer) +- self.context.server.gifsicle_path = which('gifsicle') ++ self.context.server.gifsicle_path = '@gifsicle@' + return self.context + + def test_should_be_ok_when_orientation_exif(self): +@@ -1153,7 +1153,7 @@ class ImageOperationsWithJpegtranTestCase(BaseImagingTestCase): + cfg = Config(SECURITY_KEY='ACME-SEC') + cfg.LOADER = "thumbor.loaders.file_loader" + cfg.FILE_LOADER_ROOT_PATH = self.loader_path +- cfg.JPEGTRAN_PATH = which('jpegtran') ++ cfg.JPEGTRAN_PATH = '@jpegtran@' + cfg.PROGRESSIVE_JPEG = True, + cfg.RESULT_STORAGE_STORES_UNSAFE = True, + cfg.OPTIMIZERS = [ +@@ -1175,9 +1175,7 @@ class ImageOperationsWithJpegtranTestCase(BaseImagingTestCase): + f.write(response.body) + f.close() + +- exiftool = which('exiftool') +- if not exiftool: +- raise AssertionError('exiftool was not found. Please install it to run thumbor\'s tests.') ++ exiftool = '@exiftool@' + + command = [ + exiftool, +@@ -1221,7 +1219,7 @@ class ImageOperationsWithoutStorage(BaseImagingTestCase): + server = ServerParameters(8889, 'localhost', 'thumbor.conf', None, 'info', None) + server.security_key = 'ACME-SEC' + ctx = Context(server, cfg, importer) +- ctx.server.gifsicle_path = which('gifsicle') ++ ctx.server.gifsicle_path = '@gifsicle@' + return ctx + + def test_meta(self): +diff --git a/tests/optimizers/test_gifv.py b/tests/optimizers/test_gifv.py +index 229e9cd..066f2d5 100644 +--- a/tests/optimizers/test_gifv.py ++++ b/tests/optimizers/test_gifv.py +@@ -31,7 +31,7 @@ class GifvOptimizerTest(TestCase): + def get_context(self): + conf = Config() + conf.STATSD_HOST = '' +- conf.FFMPEG_PATH = which('ffmpeg') ++ conf.FFMPEG_PATH = '@ffmpeg@' + ctx = Context(config=conf) + ctx.request = RequestParameters() + ctx.request.filters.append('gifv') +diff --git a/tests/test_server.py b/tests/test_server.py +index 5b31750..c2a65dc 100644 +--- a/tests/test_server.py ++++ b/tests/test_server.py +@@ -11,6 +11,8 @@ + from unittest import TestCase + import mock + ++from nose.tools import nottest ++ + from preggy import expect + + from thumbor.app import ThumborServiceApp +@@ -118,6 +120,7 @@ class ServerTestCase(TestCase): + expect(server_parameters.security_key).to_equal('something') + + @mock.patch.object(thumbor.server, 'which') ++ @nottest + def test_validate_gifsicle_path(self, which_mock): + server_parameters = mock.Mock(security_key=None) + conf = Config(SECURITY_KEY='test', USE_GIFSICLE_ENGINE=True) +@@ -128,6 +131,7 @@ class ServerTestCase(TestCase): + expect(server_parameters.gifsicle_path).to_equal('/usr/bin/gifsicle') + + @mock.patch.object(thumbor.server, 'which') ++ @nottest + def test_validate_null_gifsicle_path(self, which_mock): + server_parameters = mock.Mock(security_key=None) + conf = Config(SECURITY_KEY='test', USE_GIFSICLE_ENGINE=True) +diff --git a/tests/test_utils.py b/tests/test_utils.py +index 38cd51b..7dd0b3e 100644 +--- a/tests/test_utils.py ++++ b/tests/test_utils.py +@@ -10,6 +10,7 @@ + + from mock import Mock, patch + from unittest import TestCase ++from nose.tools import nottest + import logging + + from preggy import expect +@@ -112,6 +113,7 @@ class UtilsTestCase(TestCase): + test_func() + mock_warn.assert_called_once_with('Deprecated function test_func: func2') + ++ @nottest + def test_can_which_by_path(self): + result = which('/bin/ls') + expect(result).to_equal('/bin/ls') +@@ -119,6 +121,7 @@ class UtilsTestCase(TestCase): + result = which('/tmp') + expect(result).to_be_null() + ++ @nottest + def test_can_which_by_env(self): + result = which('ls') + expect(result).to_equal('/bin/ls') +diff --git a/thumbor/server.py b/thumbor/server.py +index c75a769..821163b 100644 +--- a/thumbor/server.py ++++ b/thumbor/server.py +@@ -89,12 +89,7 @@ def validate_config(config, server_parameters): + warnings.simplefilter('error', Image.DecompressionBombWarning) + + if config.USE_GIFSICLE_ENGINE: +- server_parameters.gifsicle_path = which('gifsicle') +- if server_parameters.gifsicle_path is None: +- raise RuntimeError( +- 'If using USE_GIFSICLE_ENGINE configuration to True, the `gifsicle` binary must be in the PATH ' +- 'and must be an executable.' +- ) ++ server_parameters.gifsicle_path = '@gifsicle@' + + + def get_context(server_parameters, config, importer): +-- +2.18.1 + diff --git a/pkgs/development/python-modules/thumbor/default.nix b/pkgs/development/python-modules/thumbor/default.nix index 0f10692685b..720391772b5 100644 --- a/pkgs/development/python-modules/thumbor/default.nix +++ b/pkgs/development/python-modules/thumbor/default.nix @@ -1,13 +1,13 @@ { buildPythonPackage, python, tornado, pycrypto, pycurl, pytz , pillow, derpconf, python_magic, libthumbor, webcolors , piexif, futures, statsd, thumborPexif, fetchFromGitHub, isPy3k, lib -, mock, raven, nose, yanc, remotecv, pyssim, cairosvg1, preggy, opencv3 -, pkgs, coreutils +, mock, raven, nose, yanc, remotecv, pyssim, cairosvg, preggy, opencv3 +, pkgs, coreutils, substituteAll }: buildPythonPackage rec { pname = "thumbor"; - version = "6.6.0"; + version = "6.7.0"; disabled = isPy3k; # see https://github.com/thumbor/thumbor/issues/1004 @@ -16,9 +16,19 @@ buildPythonPackage rec { owner = pname; repo = pname; rev = version; - sha256 = "0m4q40fcha1aydyr1khjhnb08cdfma67yxgyhsvwar5a6sl0906i"; + sha256 = "1qv02jz7ivn38dsywp7nxrlflly86x9pm2pk3yqi8m8myhc7lipg"; }; + patches = [ + (substituteAll { + src = ./0001-Don-t-use-which-implementation-to-find-required-exec.patch; + gifsicle = "${pkgs.gifsicle}/bin/gifsicle"; + exiftool = "${pkgs.exiftool}/bin/exiftool"; + jpegtran = "${pkgs.libjpeg}/bin/jpegtran"; + ffmpeg = "${pkgs.ffmpeg}/bin/ffmpeg"; + }) + ]; + postPatch = '' substituteInPlace "setup.py" \ --replace '"argparse",' "" ${lib.optionalString isPy3k ''--replace '"futures",' ""''} @@ -39,10 +49,10 @@ buildPythonPackage rec { mock yanc remotecv - cairosvg1 raven pkgs.redis pkgs.glibcLocales + pkgs.gifsicle ]; propagatedBuildInputs = [ @@ -58,10 +68,7 @@ buildPythonPackage rec { webcolors piexif statsd - pkgs.exiftool - pkgs.libjpeg - pkgs.ffmpeg - pkgs.gifsicle + cairosvg ] ++ lib.optionals (!isPy3k) [ futures thumborPexif ]; # Remove the source tree before running nosetests because otherwise nosetests @@ -71,7 +78,7 @@ buildPythonPackage rec { redis-server --port 6668 --requirepass hey_you & rm -r thumbor export LC_ALL="en_US.UTF-8" - nosetests -v --with-yanc -s tests/ + nosetests -v --with-yanc -s tests/ -e test_redeye_applied ''; meta = with lib; { diff --git a/pkgs/development/python-modules/tinycss2/default.nix b/pkgs/development/python-modules/tinycss2/default.nix index 6d0ee30bbb4..21f89e31f37 100644 --- a/pkgs/development/python-modules/tinycss2/default.nix +++ b/pkgs/development/python-modules/tinycss2/default.nix @@ -1,4 +1,4 @@ -{ lib, buildPythonPackage, fetchPypi, webencodings, pytestrunner, pytestcov, pytest-flake8, pytest-isort, glibcLocales }: +{ lib, buildPythonPackage, fetchPypi, webencodings, pytest, pytestrunner, pytestcov, pytest-flake8, pytest-isort, glibcLocales }: buildPythonPackage rec { pname = "tinycss2"; @@ -11,7 +11,7 @@ buildPythonPackage rec { propagatedBuildInputs = [ webencodings ]; - checkInputs = [ pytestrunner pytestcov pytest-flake8 pytest-isort glibcLocales ]; + checkInputs = [ pytest pytestrunner pytestcov pytest-flake8 pytest-isort glibcLocales ]; LC_ALL = "en_US.UTF-8"; diff --git a/pkgs/development/python-modules/tldextract/default.nix b/pkgs/development/python-modules/tldextract/default.nix index 4e494244d31..88b41793180 100644 --- a/pkgs/development/python-modules/tldextract/default.nix +++ b/pkgs/development/python-modules/tldextract/default.nix @@ -5,11 +5,11 @@ buildPythonPackage rec { pname = "tldextract"; - version = "2.2.0"; + version = "2.2.1"; src = fetchPypi { inherit pname version; - sha256 = "1d5s8v6kpsgazyahflhji1cfdcf89rv7l7z55v774bhzvcjp2y99"; + sha256 = "1lcywabjy7vpm6awl2cw4m6rk6h85qnbql0j33xcfryy2dhfyaxp"; }; propagatedBuildInputs = [ requests requests-file idna ]; diff --git a/pkgs/development/python-modules/virtualenv/virtualenv-change-prefix.patch b/pkgs/development/python-modules/virtualenv/virtualenv-change-prefix.patch index 934426bf6ca..4378e00bb1f 100644 --- a/pkgs/development/python-modules/virtualenv/virtualenv-change-prefix.patch +++ b/pkgs/development/python-modules/virtualenv/virtualenv-change-prefix.patch @@ -52,7 +52,7 @@ index bcf3225..3530997 100755 site_filename_dst = change_prefix(site_filename, home_dir) site_dir = os.path.dirname(site_filename_dst) writefile(site_filename_dst, SITE_PY) -+ wrapper_path = join(prefix, "lib", py_version, "site-packages") ++ wrapper_path = join(prefix, "lib", PY_VERSION, "site-packages") + writefile( + join(site_dir, 'sitecustomize.py',), + "import sys; sys.path.append('%s')" % wrapper_path diff --git a/pkgs/development/python-modules/vowpalwabbit/default.nix b/pkgs/development/python-modules/vowpalwabbit/default.nix index 9bc2bbc2704..e2e30563520 100644 --- a/pkgs/development/python-modules/vowpalwabbit/default.nix +++ b/pkgs/development/python-modules/vowpalwabbit/default.nix @@ -22,7 +22,8 @@ buildPythonPackage rec { export HOME=$PWD ''; - buildInputs = [ python.pkgs.boost zlib.dev clang ncurses pytest docutils pygments ]; + nativeBuildInputs = [ clang ]; + buildInputs = [ python.pkgs.boost zlib.dev ncurses pytest docutils pygments ]; propagatedBuildInputs = [ numpy scipy scikitlearn ]; # Python ctypes.find_library uses DYLD_LIBRARY_PATH. diff --git a/pkgs/development/python-modules/weboob/default.nix b/pkgs/development/python-modules/weboob/default.nix index 93a17ea4425..26eca0d24cc 100644 --- a/pkgs/development/python-modules/weboob/default.nix +++ b/pkgs/development/python-modules/weboob/default.nix @@ -6,18 +6,7 @@ , unidecode }: -let - # Support for Python 2.7 was dropped in 1.7.7 - google_api_python_client_python27 = google_api_python_client.overrideDerivation - (oldAttrs: rec { - pname = "google-api-python-client"; - version = "1.7.6"; - src = fetchPypi { - inherit pname version; - sha256 = "14w5sdrp0bk9n0r2lmpqmrbf2zclpfq6q7giyahnskkfzdkb165z"; - }; - }); -in buildPythonPackage rec { +buildPythonPackage rec { pname = "weboob"; version = "1.3"; disabled = ! isPy27; @@ -44,10 +33,12 @@ in buildPythonPackage rec { checkInputs = [ nose ]; + nativeBuildInputs = [ pyqt5 ]; + propagatedBuildInputs = [ pillow prettytable pyyaml dateutil gdata requests mechanize feedparser lxml gnupg pyqt5 libyaml simplejson cssselect futures pdfminer termcolor - google_api_python_client_python27 html2text unidecode ]; + google_api_python_client html2text unidecode ]; checkPhase = '' nosetests diff --git a/pkgs/development/python-modules/ws4py/default.nix b/pkgs/development/python-modules/ws4py/default.nix index 3d81fe532ab..60f0f3cc969 100644 --- a/pkgs/development/python-modules/ws4py/default.nix +++ b/pkgs/development/python-modules/ws4py/default.nix @@ -1,4 +1,4 @@ -{ stdenv, buildPythonPackage, fetchPypi, pytest, mock, git, asyncio +{ stdenv, buildPythonPackage, fetchPypi, pytest, mock, git , cherrypy, gevent, tornado }: buildPythonPackage rec { @@ -11,15 +11,16 @@ buildPythonPackage rec { }; checkInputs = [ pytest mock git ]; - propagatedBuildInputs = [ asyncio cherrypy gevent tornado ]; + propagatedBuildInputs = [ cherrypy gevent tornado ]; checkPhase = '' - pytest -k 'not test_timeout_when_no_registered_fds and not test_mainloop_can_be_stopped_when_no_websocket_were_registered' + pytest ''; meta = with stdenv.lib; { homepage = https://ws4py.readthedocs.org; description = "A WebSocket package for Python"; maintainers = with maintainers; [ rickynils ]; + license = licenses.bsd3; }; } diff --git a/pkgs/development/python-modules/xcffib/default.nix b/pkgs/development/python-modules/xcffib/default.nix index 0f4c081e626..0b4f9578b55 100644 --- a/pkgs/development/python-modules/xcffib/default.nix +++ b/pkgs/development/python-modules/xcffib/default.nix @@ -7,12 +7,12 @@ }: buildPythonPackage rec { - version = "0.6.0"; + version = "0.7.0"; pname = "xcffib"; src = fetchPypi { inherit pname version; - sha256 = "36142cb72535933e8e1ed39ff2c45559fa7038823bd6be6961ef8ee5bb0f6912"; + sha256 = "12yc2r8967hknk829q1lbsw6b9z7qa25y8dx8kz6c9qnlc215vb8"; }; patchPhase = '' diff --git a/pkgs/development/python-modules/xlib/default.nix b/pkgs/development/python-modules/xlib/default.nix index 0fe13917db4..0b0f60ea16e 100644 --- a/pkgs/development/python-modules/xlib/default.nix +++ b/pkgs/development/python-modules/xlib/default.nix @@ -3,24 +3,32 @@ , fetchFromGitHub , six , setuptools_scm -, pkgs +, xorg +, python +, mock +, nose +, utillinux }: buildPythonPackage rec { pname = "xlib"; - version = "0.17"; + version = "0.25"; src = fetchFromGitHub { owner = "python-xlib"; repo = "python-xlib"; - rev = "${version}"; - sha256 = "1iiz2nq2hq9x6laavngvfngnmxbgnwh54wdbq6ncx4va7v98liyi"; + rev = version; + sha256 = "1nncx7v9chmgh56afg6dklz3479s5zg3kq91mzh4mj512y0skyki"; }; - # Tests require `pyutil' so disable them to avoid circular references. - doCheck = false; + checkPhase = '' + ${python.interpreter} runtests.py + ''; - propagatedBuildInputs = [ six setuptools_scm pkgs.xorg.libX11 ]; + checkInputs = [ mock nose utillinux /* mcookie */ xorg.xauth xorg.xorgserver /* xvfb */ ]; + nativeBuildInputs = [ setuptools_scm ]; + buildInputs = [ xorg.libX11 ]; + propagatedBuildInputs = [ six ]; meta = with stdenv.lib; { description = "Fully functional X client library for Python programs"; diff --git a/pkgs/development/python-modules/xlsx2csv/default.nix b/pkgs/development/python-modules/xlsx2csv/default.nix index 8f57bd127fd..15be28b62fb 100644 --- a/pkgs/development/python-modules/xlsx2csv/default.nix +++ b/pkgs/development/python-modules/xlsx2csv/default.nix @@ -5,11 +5,11 @@ buildPythonPackage rec { pname = "xlsx2csv"; - version = "0.7.4"; + version = "0.7.5"; src = fetchPypi { inherit pname version; - sha256 = "6ce45a87b61af6d3c24fed4221642de9115dc9cb9ea65887b0926fd0fab0a597"; + sha256 = "1f44k1q9jhn2iwabpj663l5wmm7zh6bp5402p659pxf11m8y4c2x"; }; meta = with stdenv.lib; { diff --git a/pkgs/development/python-modules/zetup/default.nix b/pkgs/development/python-modules/zetup/default.nix index 5772308f967..abbc4a974f0 100644 --- a/pkgs/development/python-modules/zetup/default.nix +++ b/pkgs/development/python-modules/zetup/default.nix @@ -1,6 +1,6 @@ { stdenv, buildPythonPackage, fetchPypi , setuptools_scm, pathpy, nbconvert -, pytest }: +, pytest_3 }: buildPythonPackage rec { pname = "zetup"; @@ -11,11 +11,18 @@ buildPythonPackage rec { sha256 = "f1cde33d0ef3bedaf697e432201fa86da698dadd3445c0efd2a114753853c675"; }; + # Python 3.7 compatibility + # See https://github.com/zimmermanncode/zetup/pull/1 + postPatch = '' + substituteInPlace zetup/zetup_config.py \ + --replace "'3.6']" "'3.6', '3.7']" + ''; + checkPhase = '' py.test test ''; - checkInputs = [ pytest pathpy nbconvert ]; + checkInputs = [ pytest_3 pathpy nbconvert ]; propagatedBuildInputs = [ setuptools_scm ]; meta = with stdenv.lib; { |