Merge pull request #28884 from FRidh/python-fixes

Python: several fixes
nixos-19.03
Frederik Rietdijk 5 years ago committed by Frederik Rietdijk
parent 036bafe0b9
commit 67651d80bc
  1. 44
      pkgs/applications/networking/flexget/default.nix
  2. 4
      pkgs/development/python-modules/Cython/default.nix
  3. 30
      pkgs/development/python-modules/GeoIP/default.nix
  4. 4
      pkgs/development/python-modules/adal/default.nix
  5. 36
      pkgs/development/python-modules/aiohttp/default.nix
  6. 28
      pkgs/development/python-modules/attrs/default.nix
  7. 22
      pkgs/development/python-modules/backports_unittest-mock/default.nix
  8. 24
      pkgs/development/python-modules/beautifulsoup4/default.nix
  9. 29
      pkgs/development/python-modules/bkcharts/default.nix
  10. 82
      pkgs/development/python-modules/bokeh/default.nix
  11. 22
      pkgs/development/python-modules/chardet/default.nix
  12. 28
      pkgs/development/python-modules/cheroot/default.nix
  13. 25
      pkgs/development/python-modules/cherrypy/default.nix
  14. 21
      pkgs/development/python-modules/contextlib2/default.nix
  15. 27
      pkgs/development/python-modules/coverage/default.nix
  16. 4
      pkgs/development/python-modules/dask/default.nix
  17. 12
      pkgs/development/python-modules/dateutil/default.nix
  18. 32
      pkgs/development/python-modules/dill/default.nix
  19. 7
      pkgs/development/python-modules/discordpy/default.nix
  20. 32
      pkgs/development/python-modules/doc8/default.nix
  21. 31
      pkgs/development/python-modules/entrypoints/default.nix
  22. 20
      pkgs/development/python-modules/flask-compress/default.nix
  23. 22
      pkgs/development/python-modules/flask-cors/default.nix
  24. 4
      pkgs/development/python-modules/flask-migrate/default.nix
  25. 29
      pkgs/development/python-modules/flask-restful/default.nix
  26. 42
      pkgs/development/python-modules/flask-restplus/0.8.nix
  27. 21
      pkgs/development/python-modules/flask/default.nix
  28. 50
      pkgs/development/python-modules/flit/default.nix
  29. 32
      pkgs/development/python-modules/guessit/2.0.nix
  30. 4
      pkgs/development/python-modules/h5py/default.nix
  31. 31
      pkgs/development/python-modules/jinja2/default.nix
  32. 30
      pkgs/development/python-modules/jsonschema/default.nix
  33. 4
      pkgs/development/python-modules/keras/default.nix
  34. 4
      pkgs/development/python-modules/m2r/default.nix
  35. 8
      pkgs/development/python-modules/magic-wormhole/default.nix
  36. 3
      pkgs/development/python-modules/multidict/default.nix
  37. 33
      pkgs/development/python-modules/openpyxl/default.nix
  38. 3
      pkgs/development/python-modules/oslo-config/default.nix
  39. 7
      pkgs/development/python-modules/pandas/default.nix
  40. 23
      pkgs/development/python-modules/portend/default.nix
  41. 40
      pkgs/development/python-modules/prompt_toolkit/default.nix
  42. 4
      pkgs/development/python-modules/pycryptodome/default.nix
  43. 4
      pkgs/development/python-modules/pyroute2/default.nix
  44. 4
      pkgs/development/python-modules/pyshp/default.nix
  45. 12
      pkgs/development/python-modules/pytest-flake8/default.nix
  46. 20
      pkgs/development/python-modules/pytest-sugar/default.nix
  47. 20
      pkgs/development/python-modules/pytest-warnings/default.nix
  48. 4
      pkgs/development/python-modules/pytimeparse/default.nix
  49. 25
      pkgs/development/python-modules/requests/default.nix
  50. 34
      pkgs/development/python-modules/restructuredtext_lint/default.nix
  51. 4
      pkgs/development/python-modules/semver/default.nix
  52. 38
      pkgs/development/python-modules/service_identity/default.nix
  53. 35
      pkgs/development/python-modules/sphinx-testing/default.nix
  54. 5
      pkgs/development/python-modules/sqlalchemy-migrate/default.nix
  55. 4
      pkgs/development/python-modules/sqlmap/default.nix
  56. 11
      pkgs/development/python-modules/tempora/default.nix
  57. 38
      pkgs/development/python-modules/testtools/default.nix
  58. 0
      pkgs/development/python-modules/testtools/testtools_support_unittest2.patch
  59. 4
      pkgs/development/python-modules/tornado/default.nix
  60. 17
      pkgs/development/python-modules/treq/default.nix
  61. 16
      pkgs/development/python-modules/twisted/default.nix
  62. 39
      pkgs/development/python-modules/txtorcon/default.nix
  63. 24
      pkgs/development/python-modules/tzlocal/default.nix
  64. 32
      pkgs/development/python-modules/urllib3/default.nix
  65. 18
      pkgs/development/python-modules/vcversioner/default.nix
  66. 25
      pkgs/development/python-modules/werkzeug/default.nix
  67. 4
      pkgs/development/python-modules/zetup/default.nix
  68. 4
      pkgs/development/python-modules/zxcvbn-python/default.nix
  69. 12
      pkgs/tools/admin/ansible/2.1.nix
  70. 9
      pkgs/tools/admin/ansible/2.2.nix
  71. 706
      pkgs/top-level/python-packages.nix

@ -9,14 +9,14 @@
with python.pkgs;
buildPythonApplication rec {
version = "2.10.40";
version = "2.10.82";
name = "FlexGet-${version}";
src = fetchFromGitHub {
owner = "Flexget";
repo = "Flexget";
rev = version;
sha256 = "0hh21yv1lvdfi198snwjabfsdh04fnpjszpgg28wvg5pd1qq8lqv";
sha256 = "15508ihswfjbkzhf1f0qhn2ar1aiibz2ggp5d6r33icy8xwhpv09";
};
doCheck = true;
@ -27,30 +27,44 @@ buildPythonApplication rec {
sed -i '/def test_non_ascii/i\ import pytest\
@pytest.mark.skip' flexget/tests/test_filesystem.py
substituteInPlace requirements.txt --replace "guessit<=2.0.4" "guessit"
substituteInPlace requirements.txt \
--replace "chardet==3.0.3" "chardet" \
--replace "rebulk==0.8.2" "rebulk" \
--replace "cherrypy==10.2.2" "cherrypy" \
--replace "portend==1.8" "portend" \
--replace "sqlalchemy==1.1.10" "sqlalchemy" \
--replace "zxcvbn-python==4.4.15" "zxcvbn-python" \
--replace "flask-cors==3.0.2" "flask-cors" \
--replace "certifi==2017.4.17" "certifi"
'';
# Disable 3 failing tests caused by guessit upgrade
# https://github.com/Flexget/Flexget/issues/1804
checkPhase = ''
export HOME=.
py.test --disable-pytest-warnings -k "not test_date_options and not test_ep_as_quality and not testFromGroup"
py.test --disable-pytest-warnings -k "not test_quality_failures \
and not test_group_quality \
and not crash_report \
and not test_multi_episode \
and not test_double_episodes \
and not test_inject_force \
and not test_double_prefered \
and not test_double"
'';
buildInputs = [ pytest mock vcrpy pytest-catchlog boto3 ];
propagatedBuildInputs = [
feedparser sqlalchemy pyyaml
feedparser sqlalchemy pyyaml chardet
beautifulsoup4 html5lib PyRSS2Gen pynzb
rpyc jinja2 requests dateutil jsonschema
pathpy guessit APScheduler
rpyc jinja2 jsonschema requests dateutil jsonschema
pathpy guessit_2_0 APScheduler
terminaltables colorclass
cherrypy flask flask-restful flask-restplus_0_8
cherrypy flask flask-restful flask-restplus
flask-compress flask_login flask-cors
pyparsing safe future zxcvbn-python ]
++ lib.optional (pythonOlder "3.4") pathlib
# enable deluge and transmission plugin support, if they're installed
++ lib.optional (config.deluge or false) deluge
++ lib.optional (transmission != null) transmissionrpc;
pyparsing safe future zxcvbn-python
werkzeug tempora cheroot rebulk portend
] ++ lib.optional (pythonOlder "3.4") pathlib
# enable deluge and transmission plugin support, if they're installed
++ lib.optional (config.deluge or false) deluge
++ lib.optional (transmission != null) transmissionrpc;
meta = {
homepage = https://flexget.com/;

@ -14,11 +14,11 @@
buildPythonPackage rec {
pname = "Cython";
name = "${pname}-${version}";
version = "0.26";
version = "0.26.1";
src = fetchPypi {
inherit pname version;
sha256 = "4c24e2c22ddaed624d35229dc5db25049e9e225c6f64f3364326836cad8f2c66";
sha256 = "c2e63c4794161135adafa8aa4a855d6068073f421c83ffacc39369497a189dd5";
};
# With Python 2.x on i686-linux or 32-bit ARM this test fails because the

@ -0,0 +1,30 @@
{lib, buildPythonPackage, fetchPypi, isPy3k, incremental, ipaddress, twisted
, automat, zope_interface, idna, pyopenssl, service-identity, pytest, mock, lsof
, geoip, nose}:
buildPythonPackage rec {
name = "${pname}-${version}";
pname = "GeoIP";
version = "1.3.2";
checkInputs = [ nose ];
propagatedBuildInputs = [
geoip
];
src = fetchPypi {
inherit pname version;
sha256 = "1rphxf3vrn8wywjgr397f49s0s22m83lpwcq45lm0h2p45mdm458";
};
# Tests cannot be run because they require data that isn't included in the
# release tarball.
checkPhase = "true";
meta = {
description = "MaxMind GeoIP Legacy Database - Python API";
homepage = http://www.maxmind.com/;
maintainers = with lib.maintainers; [ jluttine ];
license = lib.licenses.lgpl21Plus;
};
}

@ -3,12 +3,12 @@
buildPythonPackage rec {
pname = "adal";
version = "0.4.6";
version = "0.4.7";
name = "${pname}-${version}";
src = fetchPypi {
inherit pname version;
sha256 = "7c5bbf4d8a17d535e6e857b28a41cedddc2767fc57424c15d484fa779bb97325";
sha256 = "114046ac85d0054791c21b00922f26286822bc6f2ba3716db42e7e57f762ef20";
};
propagatedBuildInputs = [ requests pyjwt dateutil ];

@ -0,0 +1,36 @@
{ lib
, buildPythonPackage
, fetchPypi
, pythonOlder
, chardet
, multidict
, async-timeout
, yarl
, pytest
, gunicorn
, pytest-raisesregexp
}:
buildPythonPackage rec {
pname = "aiohttp";
version = "2.2.5";
name = "${pname}-${version}";
src = fetchPypi {
inherit pname version;
sha256 = "af5bfdd164256118a0a306b3f7046e63207d1f8cba73a67dcc0bd858dcfcd3bc";
};
disabled = pythonOlder "3.4";
doCheck = false; # Too many tests fail.
checkInputs = [ pytest gunicorn pytest-raisesregexp ];
propagatedBuildInputs = [ async-timeout chardet multidict yarl ];
meta = {
description = "Http client/server for asyncio";
license = with lib.licenses; [ asl20 ];
homepage = https://github.com/KeepSafe/aiohttp/;
};
}

@ -0,0 +1,28 @@
{ lib, stdenv, buildPythonPackage, fetchPypi, pytest, hypothesis, zope_interface
, pympler, coverage, six, clang }:
buildPythonPackage rec {
name = "${pname}-${version}";
pname = "attrs";
version = "17.2.0";
src = fetchPypi {
inherit pname version;
sha256 = "04gx08ikpk26wnq22f7l42gapcvk8iz1512r927k6sadz6cinkax";
};
# macOS needs clang for testing
buildInputs = [
pytest hypothesis zope_interface pympler coverage six
] ++ lib.optionals (stdenv.isDarwin) [ clang ];
checkPhase = ''
py.test
'';
meta = with lib; {
description = "Python attributes without boilerplate";
homepage = https://github.com/hynek/attrs;
license = licenses.mit;
};
}

@ -0,0 +1,22 @@
{ stdenv, buildPythonPackage, fetchPypi, setuptools_scm, mock }:
buildPythonPackage rec {
name = "${pname}-${version}";
pname = "backports.unittest_mock";
version = "1.3";
src = fetchPypi {
inherit pname version;
sha256 = "0xdkx5wf5a2w2zd2pshk7z2cvbv6db64c1x6v9v1a18ja7bn9nf6";
};
propagatedBuildInputs = [ mock ];
buildInputs = [ setuptools_scm ];
meta = with stdenv.lib; {
description = "Provides a function install() which makes the mock module";
homepage = https://github.com/jaraco/backports.unittest_mock;
license = licenses.mit;
};
}

@ -0,0 +1,24 @@
{ stdenv, buildPythonPackage, fetchPypi, nose }:
buildPythonPackage rec {
name = "${pname}-${version}";
pname = "beautifulsoup4";
version = "4.6.0";
src = fetchPypi {
inherit pname version;
sha256 = "12cf0ygpz9srpfh9gx2f9ba0swa1rzypv3sm4r0hmjyw6b4nm2w0";
};
buildInputs = [ nose ];
checkPhase = ''
nosetests build
'';
meta = with stdenv.lib; {
homepage = http://crummy.com/software/BeautifulSoup/bs4/;
description = "HTML and XML parser";
license = licenses.mit;
maintainers = with maintainers; [ domenkozar ];
};
}

@ -0,0 +1,29 @@
{ lib
, buildPythonPackage
, fetchPypi
, numpy
, pandas
}:
buildPythonPackage rec {
pname = "bkcharts";
version = "0.2";
name = "${pname}-${version}";
src = fetchPypi {
inherit version pname;
sha256 = "a5eaa8e78853dcecaa46345812e4fabe9cd3b96330ebf0809f640a4a0556d72e";
};
propagatedBuildInputs = [ numpy pandas ];
# Circular test dependency on bokeh
doCheck = false;
meta = {
description = "High level chart types built on top of Bokeh";
homepage = http://github.com/bokeh/bkcharts;
license = lib.licenses.bsd3;
};
}

@ -0,0 +1,82 @@
{ lib
, buildPythonPackage
, fetchPypi
, isPyPy
, mock
, pytest
, flask
, jinja2
, markupsafe
, werkzeug
, itsdangerous
, dateutil
, requests
, six
, pygments
, pystache
, markdown
, pyyaml
, pyzmq
, tornado
, colorama
, isPy3k
, futures
, websocket_client
, numpy
, pandas
, greenlet
, python
, bkcharts
, pillow
, selenium
}:
buildPythonPackage rec {
pname = "bokeh";
name = "${pname}${version}";
version = "0.12.7";
src = fetchPypi {
inherit pname version;
sha256 = "2c42c95bf1a418c758dbff8446b4f5e5fc72ac10ea5da4e6b5010067396d0880";
};
disabled = isPyPy;
# Some test that uses tornado fails
# doCheck = false;
checkInputs = [ mock pytest pillow selenium ];
propagatedBuildInputs = [
flask
jinja2
markupsafe
werkzeug
itsdangerous
dateutil
requests
six
pygments
pystache
markdown
pyyaml
pyzmq
tornado
colorama
bkcharts
]
++ lib.optionals ( !isPy3k ) [ futures ]
++ lib.optionals ( !isPy3k && !isPyPy ) [ websocket_client ]
++ lib.optionals ( !isPyPy ) [ numpy pandas greenlet ];
checkPhase = ''
${python.interpreter} -m unittest discover -s bokeh/tests
'';
meta = {
description = "Statistical and novel interactive HTML plots for Python";
homepage = "http://github.com/bokeh/bokeh";
license = lib.licenses.bsd3;
};
}

@ -0,0 +1,22 @@
{ stdenv, buildPythonPackage, fetchPypi
, pytest, pytestrunner, hypothesis }:
buildPythonPackage rec {
name = "${pname}-${version}";
pname = "chardet";
version = "3.0.4";
src = fetchPypi {
inherit pname version;
sha256 = "1bpalpia6r5x1kknbk11p1fzph56fmmnp405ds8icksd3knr5aw4";
};
buildInputs = [ pytest pytestrunner hypothesis ];
meta = with stdenv.lib; {
homepage = https://github.com/chardet/chardet;
description = "Universal encoding detector";
license = licenses.lgpl2;
maintainers = with maintainers; [ domenkozar ];
};
}

@ -0,0 +1,28 @@
{ stdenv, fetchPypi, buildPythonPackage
, six
, coverage, codecov, pytest, pytestcov, pytest-sugar, portend
, backports_unittest-mock, setuptools_scm }:
buildPythonPackage rec {
name = "${pname}-${version}";
pname = "cheroot";
version = "5.5.0";
src = fetchPypi {
inherit pname version;
sha256 = "1fhyk8lgs2blfx4zjvwsy6f0ynrs5fwnnr3qf07r6c4j3gwlkqsr";
};
propagatedBuildInputs = [ six ];
buildInputs = [ coverage codecov pytest pytestcov pytest-sugar portend backports_unittest-mock setuptools_scm ];
checkPhase = ''
py.test cheroot
'';
meta = with stdenv.lib; {
description = "High-performance, pure-Python HTTP";
homepage = https://github.com/cherrypy/cheroot;
license = licenses.mit;
};
}

@ -0,0 +1,25 @@
{ stdenv, buildPythonPackage, fetchPypi, isPy3k
, pytest, setuptools_scm, pytestrunner
, six, cheroot, portend }:
buildPythonPackage rec {
name = "${pname}-${version}";
pname = "CherryPy";
version = "11.0.0";
src = fetchPypi {
inherit pname version;
sha256 = "1037pvhab4my791vfzikm649ny52fj7x2q87cnncmbnqin6ghwan";
};
# wsgiserver.ssl_pyopenssl is broken on py3k.
doCheck = !isPy3k;
buildInputs = [ pytest setuptools_scm pytestrunner ];
propagatedBuildInputs = [ six cheroot portend ];
meta = with stdenv.lib; {
homepage = "http://www.cherrypy.org";
description = "A pythonic, object-oriented HTTP framework";
license = licenses.bsd3;
};
}

@ -0,0 +1,21 @@
{ lib
, buildPythonPackage
, fetchPypi
}:
buildPythonPackage rec {
pname = "contextlib2";
version = "0.5.5";
name = "${pname}-${version}";
src = fetchPypi rec {
inherit pname version;
sha256 = "509f9419ee91cdd00ba34443217d5ca51f5a364a404e1dce9e8979cea969ca48";
};
meta = {
description = "Backports and enhancements for the contextlib module";
homepage = http://contextlib2.readthedocs.org/;
license = lib.licenses.psfl;
};
}

@ -0,0 +1,27 @@
{ lib
, buildPythonPackage
, fetchPypi
, isPy3k
, mock
}:
buildPythonPackage rec {
pname = "coverage";
version = "4.4.1";
name = "${pname}-${version}";
src = fetchPypi {
inherit pname version;
sha256 = "7a9c44400ee0f3b4546066e0710e1250fd75831adc02ab99dda176ad8726f424";
};
# No tests in archive
doCheck = false;
checkInputs = [ mock ];
meta = {
description = "Code coverage measurement for python";
homepage = http://nedbatchelder.com/code/coverage/;
license = lib.licenses.bsd3;
};
}

@ -12,12 +12,12 @@
buildPythonPackage rec {
pname = "dask";
version = "0.15.1";
version = "0.15.2";
name = "${pname}-${version}";
src = fetchPypi {
inherit pname version;
sha256 = "f62f19ab5958b13d0ee733db18218c28a9d452a3554446a3dfb5ac3d4a5f7e34";
sha256 = "abe6758540fdbc260f14ee71cebc3ab88682e24ff147afa89375b7006f57d3ed";
};
checkInputs = [ pytest ];

@ -1,12 +1,12 @@
{ stdenv, buildPythonPackage, fetchurl, six }:
{ stdenv, buildPythonPackage, fetchPypi, six }:
buildPythonPackage rec {
pname = "dateutil";
name = "${pname}-${version}";
version = "2.6.0";
pname = "python-dateutil";
version = "2.6.1";
src = fetchurl {
url = "mirror://pypi/p/python-dateutil/python-${name}.tar.gz";
sha256 = "1lhq0hxjc3cfha101q02ld5ijlpfyjn2w1yh7wvpiy367pgzi8k2";
src = fetchPypi {
inherit pname version;
sha256 = "1jkahssf0ir5ssxc3ydbp8cpv77limn8d4s77szb2nrgl2r3h749";
};
propagatedBuildInputs = [ six ];

@ -0,0 +1,32 @@
{ lib
, buildPythonPackage
, fetchPypi
, python
}:
buildPythonPackage rec {
pname = "dill";
version = "0.2.7.1";
name = "${pname}-${version}";
src = fetchPypi {
inherit pname version;
sha256 = "97fd758f5fe742d42b11ec8318ecfcff8776bccacbfcec05dfd6276f5d450f73";
};
# Messy test suite. Even when running the tests like tox does, it fails
doCheck = false;
checkPhase = ''
for test in tests/*.py; do
${python.interpreter} $test
done
'';
# Following error without setting checkPhase
# TypeError: don't know how to make test from: {'byref': False, 'recurse': False, 'protocol': 3, 'fmode': 0}
meta = {
description = "Serialize all of python (almost)";
homepage = http://www.cacr.caltech.edu/~mmckerns/dill.htm;
license = lib.licenses.bsd3;
};
}

@ -11,13 +11,13 @@
let
pname = "discord.py";
version = "0.16.10";
version = "0.16.11";
in buildPythonPackage rec {
name = "${pname}-${version}";
src = fetchurl {
url = "mirror://pypi/${builtins.substring 0 1 pname}/${pname}/${name}.tar.gz";
sha256 = "cb0b9ad5f5edf2d5afd5f5ce07381a0a089eb036004938126a5582fc8fa0cc88";
sha256 = "eb3c6faa7d4570cce05533d0742bbcb768629e2b3ba9e1cc79c05833db91ac4d";
};
propagatedBuildInputs = [ asyncio aiohttp websockets pynacl ];
@ -31,6 +31,9 @@ in buildPythonPackage rec {
disabled = pythonOlder "3.5";
# No tests in archive
doCheck = false;
meta = {
description = "A python wrapper for the Discord API";
homepage = "https://discordpy.rtfd.org/";

@ -0,0 +1,32 @@
{ lib
, buildPythonPackage
, fetchPypi
, pbr
, docutils
, six
, chardet
, stevedore
, restructuredtext_lint
}:
buildPythonPackage rec {
pname = "doc8";
version = "0.8.0";
name = "${pname}-${version}";
src = fetchPypi {
inherit pname version;
sha256 = "2df89f9c1a5abfb98ab55d0175fed633cae0cf45025b8b1e0ee5ea772be28543";
};
buildInputs = [ pbr ];
propagatedBuildInputs = [ docutils six chardet stevedore restructuredtext_lint ];
doCheck = false;
meta = {
description = "Style checker for Sphinx (or other) RST documentation";
homepage = "https://launchpad.net/doc8";
license = lib.licenses.asl20;
};
}

@ -0,0 +1,31 @@
{ lib
, buildPythonPackage
, fetchPypi
, configparser
, pytest
}:
buildPythonPackage rec {
pname = "entrypoints";
version = "0.2.3";
name = "${pname}-${version}";
src = fetchPypi {
inherit pname version;
sha256 = "d2d587dde06f99545fb13a383d2cd336a8ff1f359c5839ce3a64c917d10c029f";
};
checkInputs = [ pytest];
propagatedBuildInputs = [ configparser ];
checkPhase = ''
py.test tests
'';
meta = {
description = "Discover and load entry points from installed packages";
homepage = https://github.com/takluyver/entrypoints;
license = lib.licenses.mit;
};
}

@ -0,0 +1,20 @@
{ stdenv, fetchPypi, buildPythonPackage, flask }:
buildPythonPackage rec {
name = "${pname}-${version}";
version = "1.4.0";
pname = "Flask-Compress";
src = fetchPypi {
inherit pname version;
sha256 = "1cxdbdiyxkspg7vkchfmaqr7c6q79gwvakna3fjcc6nivps971j6";
};
propagatedBuildInputs = [ flask ];
meta = with stdenv.lib; {
description = "Compress responses in your Flask app with gzip";
homepage = "https://libwilliam.github.io/flask-compress/";
license = licenses.mit;
};
}

@ -0,0 +1,22 @@
{ stdenv, fetchPypi, buildPythonPackage
, nose, flask, six }:
buildPythonPackage rec {
name = "${pname}-${version}";
pname = "Flask-Cors";
version = "3.0.3";
src = fetchPypi {
inherit pname version;
sha256 = "62ebc5ad80dc21ca0ea9f57466c2c74e24a62274af890b391790c260eb7b754b";
};
buildInputs = [ nose ];
propagatedBuildInputs = [ flask six ];
meta = with stdenv.lib; {
description = "A Flask extension adding a decorator for CORS support";
homepage = https://github.com/corydolphin/flask-cors;
license = with licenses; [ mit ];
};
}

@ -5,12 +5,12 @@ with stdenv.lib;
buildPythonPackage rec {
pname = "Flask-Migrate";
version = "2.1.0";
version = "2.1.1";
name = "${pname}-${version}";
src = fetchPypi {
inherit pname version;
sha256 = "716d5b68eec53821f80b3fbcb0fd60baed0cb0e320abb30289e83217668cef7f";
sha256 = "b709ca8642559c3c5a81a33ab10839fa052177accd5ba821047a99db635255ed";
};
checkInputs = optional isPy3k glibcLocales;

@ -0,0 +1,29 @@
{ stdenv, buildPythonPackage, fetchPypi, isPy3k
, nose, mock, blinker
, flask, six, pytz, aniso8601, pycrypto
}:
buildPythonPackage rec {
name = "${pname}-${version}";
pname = "Flask-RESTful";
version = "0.3.6";
src = fetchPypi {
inherit pname version;
sha256 = "01rlvl2iq074ciyn4schmjip7cyplkwkysbb8f610zil06am35ap";
};
# TypeError: Only byte strings can be passed to C code
patchPhase = if isPy3k then ''
rm tests/test_crypto.py tests/test_paging.py
'' else null;
buildInputs = [ nose mock blinker ];
propagatedBuildInputs = [ flask six pytz aniso8601 pycrypto ];
PYTHON_EGG_CACHE = "`pwd`/.egg-cache";
meta = with stdenv.lib; {
homepage = "http://flask-restful.readthedocs.io/";
description = "REST API building blocks for Flask";
license = licenses.bsd3;
};
}

@ -1,42 +0,0 @@
{ lib
, buildPythonPackage
, fetchPypi
, nose
, blinker
, tzlocal
, mock
, rednose
, flask
, six
, jsonschema
, pytz
, aniso8601
, flask-restful
}:
buildPythonPackage rec {
pname = "flask-restplus";
version = "0.8.6";
name = "${pname}-${version}";
src = fetchPypi {
inherit pname version;
sha256 = "3bb76cc156b9a09da62396d82b29fa31e4f27cccf79528538fe7155cf2785593";
};
checkInputs = [ nose blinker tzlocal mock rednose ];
propagatedBuildInputs = [ flask six jsonschema pytz aniso8601 flask-restful ];
# RuntimeError: Working outside of application context.
doCheck = false;
checkPhase = ''
nosetests
'';
meta = {
homepage = https://github.com/noirbizarre/flask-restplus;
description = "Fast, easy and documented API development with Flask";
license = lib.licenses.mit;
};
}

@ -0,0 +1,21 @@
{ stdenv, buildPythonPackage, fetchPypi
, itsdangerous, click, werkzeug, jinja2 }:
buildPythonPackage rec {
name = "${pname}-${version}";
version = "0.12.2";
pname = "Flask";
src = fetchPypi {
inherit pname version;
sha256 = "1hfs2jr2m5lr51xd4gblb28rncd0xrpycz6c07cyqsbv4dhl9x29";
};
propagatedBuildInputs = [ itsdangerous click werkzeug jinja2 ];
meta = with stdenv.lib; {
homepage = http://flask.pocoo.org/;
description = "A microframework based on Werkzeug, Jinja 2, and good intentions";
license = licenses.bsd3;
};
}

@ -0,0 +1,50 @@
{ lib
, buildPythonPackage
, fetchPypi
, fetchurl
, isPy3k
, docutils
, requests
, requests_download
, zipfile36
, pythonOlder
, pytest
, testpath
, responses
}:
# Flit is actually an application to build universal wheels.
# It requires Python 3 and should eventually be moved outside of
# python-packages.nix. When it will be used to build wheels,
# care should be taken that there is no mingling of PYTHONPATH.
buildPythonPackage rec {
pname = "flit";
version = "0.11.4";
name = "${pname}-${version}";
# format = "wheel";
src = fetchPypi {
inherit pname version;
# url = https://files.pythonhosted.org/packages/24/98/50a090112a04d9e29155c31a222637668b0a4dd778fefcd3132adc50e877/flit-0.10-py3-none-any.whl;
sha256 = "8ba7603cc3bf4149d81811d40fe331abc45ff37a207c63f5f712a0fdb69297bb";
};
disabled = !isPy3k;
propagatedBuildInputs = [ docutils requests requests_download ] ++ lib.optional (pythonOlder "3.6") zipfile36;
checkInputs = [ pytest testpath responses ];
# Disable test that needs some ini file.
checkPhase = ''
py.test -k "not test_invalid_classifier"
'';
meta = {
description = "A simple packaging tool for simple packages";
homepage = https://github.com/takluyver/flit;
license = lib.licenses.bsd3;
maintainer = lib.maintainers.fridh;
};
}

@ -0,0 +1,32 @@
{ lib
, buildPythonPackage
, fetchPypi
, pytestrunner
, dateutil
, babelfish
, rebulk
}:
buildPythonPackage rec {
pname = "guessit";
version = "2.0.4";
name = "${pname}-${version}";
src = fetchPypi {
inherit pname version;
sha256 = "1cfcgb0px6i9jl8nwkx8j06j4y6p5975a9pfmd8lcacwr8gy4wjg";
};
# Tests require more packages.
doCheck = false;
buildInputs = [ pytestrunner ];
propagatedBuildInputs = [
dateutil babelfish rebulk
];
meta = {
homepage = http://pypi.python.org/pypi/guessit;
license = lib.licenses.lgpl3;
description = "A library for guessing information from video files";
};
}

@ -11,13 +11,13 @@ let
mpiSupport = hdf5.mpiSupport;
in buildPythonPackage rec {
version = "2.7.0";
version = "2.7.1";
pname = "h5py";
name = "${pname}-${version}";
src = fetchurl {
url = "mirror://pypi/h/h5py/${name}.tar.gz";
sha256 = "79254312df2e6154c4928f5e3b22f7a2847b6e5ffb05ddc33e37b16e76d36310";
sha256 = "180a688311e826ff6ae6d3bda9b5c292b90b28787525ddfcb10a29d5ddcae2cc";
};
configure_flags = "--hdf5=${hdf5}" + optionalString mpiSupport " --mpi";

@ -0,0 +1,31 @@
{ stdenv, buildPythonPackage, fetchPypi
, markupsafe }:
buildPythonPackage rec {
pname = "Jinja2";
version = "2.9.6";
name = "${pname}-${version}";
src = fetchPypi {
inherit pname version;
sha256 = "1zzrkywhziqffrzks14kzixz7nd4yh2vc0fb04a68vfd2ai03anx";
};
propagatedBuildInputs = [ markupsafe ];
# No tests included
doCheck = false;
meta = with stdenv.lib; {
homepage = http://jinja.pocoo.org/;
description = "Stand-alone template engine";
license = licenses.bsd3;
longDescription = ''
Jinja2 is a template engine written in pure Python. It provides a
Django inspired non-XML syntax but supports inline expressions and
an optional sandboxed environment.
'';
platforms = platforms.all;
maintainers = with maintainers; [ pierron garbas sjourdois ];
};
}

@ -0,0 +1,30 @@
{ stdenv, buildPythonPackage, fetchPypi, python
, nose, mock, vcversioner, functools32 }:
buildPythonPackage rec {
name = "${pname}-${version}";
pname = "jsonschema";
version = "2.6.0";
src = fetchPypi {
inherit pname version;
sha256 = "00kf3zmpp9ya4sydffpifn0j0mzm342a2vzh82p6r0vh10cg7xbg";
};
buildInputs = [ nose mock vcversioner ];
propagatedBuildInputs = [ functools32 ];
patchPhase = ''
substituteInPlace jsonschema/tests/test_jsonschema_test_suite.py \
--replace "python" "${python}/bin/${python.executable}"
'';
checkPhase = "nosetests";
meta = with stdenv.lib; {
homepage = https://github.com/Julian/jsonschema;
description = "An implementation of JSON Schema validation for Python";
license = licenses.mit;
maintainers = with maintainers; [ domenkozar ];
};
}

@ -12,12 +12,12 @@
buildPythonPackage rec {
pname = "Keras";
version = "2.0.7";
version = "2.0.8";
name = "${pname}-${version}";
src = fetchPypi {
inherit pname version;
sha256 = "a6c72ee2b94be1ffefe7e77b69582b9827211f0c356b2189459711844d3634c0";
sha256 = "899dc6aaed366f20100b9f80cf1093ea5b43eecc74afd1dc63a4e48dfa776ab9";
};
checkInputs = [

@ -3,11 +3,11 @@
buildPythonPackage rec {
pname = "m2r";
name = "${pname}-${version}";
version = "0.1.10";
version = "0.1.11";
src = fetchPypi {
inherit pname version;
sha256 = "cfb5b8a37defdd594eb46a794b87d9b4ca1902b0e8e309c9f2623f7275c261d6";
sha256 = "7e69fe9b2752926c33399709e354da3bcca60043c7bf5e727b7126ec3a5db7db";
};
propagatedBuildInputs = [ mistune docutils ];

@ -17,6 +17,7 @@
, humanize
, pyopenssl
, service-identity
, txtorcon
}:
buildPythonPackage rec {
@ -31,14 +32,11 @@ buildPythonPackage rec {
checkInputs = [ mock ];
buildInputs = [ nettools glibcLocales ];
propagatedBuildInputs = [ autobahn cffi click hkdf pynacl spake2 tqdm ipaddress humanize pyopenssl service-identity ];
propagatedBuildInputs = [ autobahn cffi click hkdf pynacl spake2 tqdm ipaddress humanize pyopenssl service-identity txtorcon ];
postPatch = ''
sed -i -e "s|'ifconfig'|'${nettools}/bin/ifconfig'|" src/wormhole/ipaddrs.py
sed -i -e "s|if (os.path.dirname(os.path.abspath(wormhole))|if not os.path.abspath(wormhole).startswith('/nix/store') and (os.path.dirname(os.path.abspath(wormhole))|" src/wormhole/test/test_scripts.py
# XXX: disable one test due to warning:
# setlocale: LC_ALL: cannot change locale (en_US.UTF-8)
sed -i -e "s|def test_text_subprocess|def skip_test_text_subprocess|" src/wormhole/test/test_scripts.py
sed -i -e "s|if (os.path.dirname(os.path.abspath(wormhole))|if not os.path.abspath(wormhole).startswith('/nix/store') and (os.path.dirname(os.path.abspath(wormhole))|" src/wormhole/test/test_cli.py
'' + lib.optionalString (pythonAtLeast "3.3") ''
sed -i -e 's|"ipaddress",||' setup.py
'';

@ -3,6 +3,7 @@
, buildPythonPackage
, pytest
, isPy3k
, psutil
}:
let
@ -16,7 +17,7 @@ in buildPythonPackage rec {
sha256 = "875f80a046e7799b40df4b015b8fc5dae91697936872a8d7362c909a02ec6d12";
};
buildInputs = [ pytest ];
checkInputs = [ pytest psutil ];
checkPhase = ''
py.test

@ -0,0 +1,33 @@
{ lib
, buildPythonPackage
, fetchPypi
, pytest
, jdcal
, et_xmlfile
, lxml
}:
buildPythonPackage rec {
pname = "openpyxl";
version = "2.4.8";
name = "${pname}-${version}";
src = fetchPypi {
inherit pname version;
sha256 = "ee7551efb70648fa8ee569c2b6a6dbbeff390cc94b321da5d508a573b90a4f17";
};
checkInputs = [ pytest ];
propagatedBuildInputs = [ jdcal et_xmlfile lxml ];
# Tests are not included in archive.
# https://bitbucket.org/openpyxl/openpyxl/issues/610
doCheck = false;
meta = {
description = "A Python library to read/write Excel 2007 xlsx/xlsm files";
homepage = https://openpyxl.readthedocs.org;
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ lihop sjourdois ];
};
}

@ -19,4 +19,7 @@ buildPythonPackage rec {
postPatch = ''
substituteInPlace requirements.txt --replace "argparse" ""
'';
# Requires a bunch of new packages
meta.broken = true;
}

@ -76,8 +76,13 @@ in buildPythonPackage rec {
chmod a+x pbcopy pbpaste
export PATH=$(pwd):$PATH
'' + ''
# since dateutil 0.6.0 the following fails: test_fallback_plural, test_ambiguous_flags, test_ambiguous_compat
# was supposed to be solved by https://github.com/dateutil/dateutil/issues/321, but is not the case
py.test $out/${python.sitePackages}/pandas --skip-slow --skip-network \
${if isDarwin then "-k 'not test_locale and not test_clipboard'" else ""}
-k "not test_fallback_plural and \
not test_ambiguous_flags and \
not test_ambiguous_compat \
${optionalString isDarwin "and not test_locale and not test_clipboar