git.iko.soy/typeable/nixpkgs
on master help sign in
Merge pull request #37439 from dotlambda/python-fixes

Python fixes, cc #36453

commitdceb9ee3939c1ad3639d99b31fcd7fb9dd4b214d authorRobert Schütz <rschuetz17@gmail.com> dateTue 20 Mar 2018, 18:10 (9 years ago) parent0c52fe943d8221
10 files changed+245−169
pkgs/development/python-modules/WSME/default.nix+49 pkgs/development/python-modules/altair/default.nix+6−5 pkgs/development/python-modules/astropy/default.nix+4−3 pkgs/development/python-modules/deform/default.nix+41 pkgs/development/python-modules/django-pipeline/default.nix+36 pkgs/development/python-modules/klein/default.nix+27 pkgs/development/python-modules/slimit/default.nix+36 pkgs/development/python-modules/stem/default.nix+30 pkgs/development/python-modules/zope_copy/default.nix+8−5 pkgs/top-level/python-packages.nix+8−156
pkgs/development/python-modules/WSME/default.nixnew file+49
@@ -0,0 +1,49 @@
1+{ lib, buildPythonPackage, fetchPypi, isPy3k
2+, pbr, six, simplegeneric, netaddr, pytz, webob
3+, cornice, nose, webtest, pecan, transaction, cherrypy, sphinx
4+, flask, flask-restful, suds-jurko, glibcLocales }:
5+
6+buildPythonPackage rec {
7+ pname = "WSME";
8+ version = "0.9.2";
9+
10+ src = fetchPypi {
11+ inherit pname version;
12+ sha256 = "e790ac755a7e36eaa796d3966d3878677896dbc7d1c2685cb85c06b744c21976";
13+ };
14+
15+ postPatch = ''
16+ # remove turbogears tests as we don't have it packaged
17+ rm tests/test_tg*
18+ # WSME seems incompatible with recent SQLAlchemy version
19+ rm wsmeext/tests/test_sqlalchemy*
20+ # https://bugs.launchpad.net/wsme/+bug/1510823
21+ ${if isPy3k then "rm tests/test_cornice.py" else ""}
22+ '';
23+
24+ checkPhae = ''
25+ nosetests --exclude test_buildhtml \
26+ --exlcude test_custom_clientside_error \
27+ --exclude test_custom_non_http_clientside_error
28+ '';
29+
30+ # UnicodeEncodeError, ImportError, ...
31+ doCheck = !isPy3k;
32+
33+ nativeBuildInputs = [ pbr ];
34+
35+ propagatedBuildInputs = [
36+ six simplegeneric netaddr pytz webob
37+ ];
38+
39+ checkInputs = [
40+ cornice nose webtest pecan transaction cherrypy sphinx
41+ flask flask-restful suds-jurko glibcLocales
42+ ];
43+
44+ meta = with lib; {
45+ description = "Simplify the writing of REST APIs, and extend them with additional protocols";
46+ homepage = http://git.openstack.org/cgit/openstack/wsme;
47+ license = licenses.mit;
48+ };
49+}
pkgs/development/python-modules/altair/default.nix+6−5
@@ -1,17 +1,20 @@
11{ stdenv, buildPythonPackage, fetchPypi
2−, pytest, vega, pandas, ipython, traitlets }:
2+, pytest, glibcLocales, vega, pandas, ipython, traitlets }:
33
44buildPythonPackage rec {
55 pname = "altair";
66 version = "1.2.1";
7− name = "${pname}-${version}";
87
98 src = fetchPypi {
109 inherit pname version;
1110 sha256 = "c1303f77f1ba4d632f2958c83c0f457b2b969860b1ac9adfb872aefa1780baa7";
1211 };
1312
14− buildInputs = [ pytest ];
13+ postPatch = ''
14+ sed -i "s/vega==/vega>=/g" setup.py
15+ '';
16+
17+ checkInputs = [ pytest glibcLocales ];
1518
1619 checkPhase = ''
1720 export LANG=en_US.UTF-8
@@ -19,8 +22,6 @@ buildPythonPackage rec {
1922 '';
2023
2124 propagatedBuildInputs = [ vega pandas ipython traitlets ];
22− # Disabling checks, MockRequest object has no method send()
23− doCheck = false;
2425
2526 meta = with stdenv.lib; {
2627 description = "A declarative statistical visualization library for Python.";
pkgs/development/python-modules/astropy/default.nix+4−3
@@ -1,16 +1,18 @@
11{ lib
22, fetchPypi
33, buildPythonPackage
4+, isPy3k
45, numpy
56, pytest }:
67
78buildPythonPackage rec {
8−
99 pname = "astropy";
1010 version = "3.0";
1111
12− name = "${pname}-${version}";
12+ disabled = !isPy3k; # according to setup.py
13+
1314 doCheck = false; #Some tests are failing. More importantly setup.py hangs on completion. Needs fixing with a proper shellhook.
15+
1416 src = fetchPypi {
1517 inherit pname version;
1618 sha256 = "9e0ad19b9d6d227bdf0932bbe64a8c5dd4a47d4ec078586cf24bf9f0c61d9ecf";
@@ -18,7 +20,6 @@ buildPythonPackage rec {
1820
1921 propagatedBuildInputs = [ pytest numpy ]; # yes it really has pytest in install_requires
2022
21−
2223 meta = {
2324 description = "Astronomy/Astrophysics library for Python";
2425 homepage = http://www.astropy.org;
pkgs/development/python-modules/deform/default.nixnew file+41
@@ -0,0 +1,41 @@
1+{ lib, buildPythonPackage, fetchPypi
2+, chameleon, colander, iso8601, peppercorn, translationstring, zope_deprecation
3+, nose, coverage, beautifulsoup4, flaky }:
4+
5+buildPythonPackage rec {
6+ pname = "deform";
7+ version = "2.0.5";
8+
9+ src = fetchPypi {
10+ inherit pname version;
11+ sha256 = "874d3346a02c500432efdcc73b1a7174aa0ea69cd52a99bb9a812967f54f6f79";
12+ };
13+
14+ postPatch = ''
15+ substituteInPlace setup.py \
16+ --replace "iso8601<=0.1.11" iso8601
17+ '';
18+
19+ propagatedBuildInputs = [
20+ chameleon
21+ colander
22+ iso8601
23+ peppercorn
24+ translationstring
25+ zope_deprecation
26+ ];
27+
28+ checkInputs = [
29+ nose
30+ coverage
31+ beautifulsoup4
32+ flaky
33+ ];
34+
35+ meta = with lib; {
36+ description = "Form library with advanced features like nested forms";
37+ homepage = https://docs.pylonsproject.org/projects/deform/en/latest/;
38+ license = licenses.free; # http://www.repoze.org/LICENSE.txt
39+ maintainers = with maintainers; [ garbas domenkozar ];
40+ };
41+}
pkgs/development/python-modules/django-pipeline/default.nixnew file+36
@@ -0,0 +1,36 @@
1+{ lib, buildPythonPackage, fetchFromGitHub, isPy3k
2+, django, futures, mock, jinja2, jsmin, slimit }:
3+
4+buildPythonPackage rec {
5+ pname = "django-pipeline";
6+ version = "1.6.14";
7+
8+ # no tests on PyPI
9+ src = fetchFromGitHub {
10+ owner = "jazzband";
11+ repo = pname;
12+ rev = version;
13+ sha256 = "1xf732bd17mgha75jfhlnms46ib2pffhpfa0ca7bmng9jhbvsl9j";
14+ };
15+
16+ postPatch = ''
17+ substituteInPlace tests/tests/test_compiler.py \
18+ --replace "/usr/bin/env" ""
19+ '';
20+
21+ propagatedBuildInputs = [ django ] ++ lib.optional (!isPy3k) futures;
22+
23+ checkInputs = [ jinja2 jsmin slimit ] ++ lib.optional (!isPy3k) mock;
24+
25+ checkPhase = ''
26+ export PYTHONPATH=.:$PYTHONPATH
27+ export DJANGO_SETTINGS_MODULE=tests.settings
28+ ${django}/bin/django-admin.py test tests
29+ '';
30+
31+ meta = with lib; {
32+ description = "Pipeline is an asset packaging library for Django";
33+ homepage = https://github.com/cyberdelia/django-pipeline;
34+ license = licenses.mit;
35+ };
36+}
pkgs/development/python-modules/klein/default.nixnew file+27
@@ -0,0 +1,27 @@
1+{ lib, buildPythonPackage, fetchPypi
2+, six, twisted, werkzeug, incremental
3+, mock }:
4+
5+buildPythonPackage rec {
6+ pname = "klein";
7+ version = "17.10.0";
8+
9+ src = fetchPypi {
10+ inherit pname version;
11+ sha256 = "30aaf0d78a987d5dbfe0968a07367ad0c73e02823cc8eef4c54f80ab848370d0";
12+ };
13+
14+ propagatedBuildInputs = [ six twisted werkzeug incremental ];
15+
16+ checkInputs = [ mock ];
17+
18+ checkPhase = ''
19+ trial klein
20+ '';
21+
22+ meta = with lib; {
23+ description = "Klein Web Micro-Framework";
24+ homepage = "https://github.com/twisted/klein";
25+ license = licenses.mit;
26+ };
27+}
pkgs/development/python-modules/slimit/default.nixnew file+36
@@ -0,0 +1,36 @@
1+{ lib, buildPythonPackage, fetchPypi, isPy3k, fetchpatch, python, ply }:
2+
3+buildPythonPackage rec {
4+ pname = "slimit";
5+ version = "0.8.1";
6+
7+ src = fetchPypi {
8+ inherit pname version;
9+ extension = "zip";
10+ sha256 = "f433dcef899f166b207b67d91d3f7344659cb33b8259818f084167244e17720b";
11+ };
12+
13+ # Some patches from https://github.com/rspivak/slimit/pull/65
14+ patches = lib.optionals isPy3k [
15+ (fetchpatch {
16+ url = https://github.com/lelit/slimit/commit/a61e12d88cc123c4b7af2abef21d06fd182e561a.patch;
17+ sha256 = "0lbhvkgn4l8g9fwvb81rfwjx7hsaq2pid8a5gczdk1ba65wfvdq5";
18+ })
19+ (fetchpatch {
20+ url = https://github.com/lelit/slimit/commit/e8331659fb89e8a4613c5e4e338c877fead9c551.patch;
21+ sha256 = "1hv4ysn09c9bfd5bxhhrp51hsi81hdidmx0y7zcrjjiich9ayrni";
22+ })
23+ ];
24+
25+ propagatedBuildInputs = [ ply ];
26+
27+ checkPhase = ''
28+ ${python.interpreter} -m unittest discover -s src/slimit
29+ '';
30+
31+ meta = with lib; {
32+ description = "JavaScript minifier";
33+ homepage = http://slimit.readthedocs.org/;
34+ license = licenses.mit;
35+ };
36+}
pkgs/development/python-modules/stem/default.nixnew file+30
@@ -0,0 +1,30 @@
1+{ lib, buildPythonPackage, fetchPypi, python, mock }:
2+
3+buildPythonPackage rec {
4+ pname = "stem";
5+ version = "1.6.0";
6+
7+ src = fetchPypi {
8+ inherit pname version;
9+ sha256 = "1va9p3ij7lxg6ixfsvaql06dn11l3fgpxmss1dhlvafm7sqizznp";
10+ };
11+
12+ postPatch = ''
13+ rm test/unit/installation.py
14+ sed -i "/test.unit.installation/d" test/settings.cfg
15+ '';
16+
17+ checkInputs = [ mock ];
18+
19+ checkPhase = ''
20+ touch .gitignore
21+ ${python.interpreter} run_tests.py -u
22+ '';
23+
24+ meta = with lib; {
25+ description = "Controller library that allows applications to interact with Tor";
26+ homepage = https://stem.torproject.org/;
27+ license = licenses.gpl3;
28+ maintainers = with maintainers; [ phreedom ];
29+ };
30+}
pkgs/development/python-modules/zope_copy/default.nix+8−5
@@ -8,20 +8,23 @@
88
99
1010buildPythonPackage rec {
11− pname = "zope_copy";
12− version = "4.0.2";
11+ pname = "zope.copy";
12+ version = "4.1.0";
1313
1414 src = fetchPypi {
1515 inherit pname version;
16− extension = "zip";
17− sha256 = "eb2a95866df1377741876a3ee62d8600e80089e6246e1a235e86791b29534457";
16+ sha256 = "702dbb52e2427a1cc2e2b4b3f5a40c64dcbf9ebed85888ae8fa67172263a6994";
1817 };
1918
2019 propagatedBuildInputs = [ zope_interface ];
2120
2221 checkInputs = [ zope_location zope_schema ];
2322
23+ checkPhase = ''
24+ python -m unittest discover -s src/zope/copy
25+ '';
26+
2427 meta = {
2528 maintainers = with lib.maintainers; [ domenkozar ];
2629 };
27−}
30+}
pkgs/top-level/python-packages.nix+8−156
@@ -3657,32 +3657,7 @@ in {
36573657
36583658 decorator = callPackage ../development/python-modules/decorator { };
36593659
3660− deform = buildPythonPackage rec {
3661− name = "deform-2.0a2";
3662−
3663− src = pkgs.fetchurl {
3664− url = "mirror://pypi/d/deform/${name}.tar.gz";
3665− sha256 = "3fa4d287c8da77a83556e4a5686de006ddd69da359272120b915dc8f5a70cabd";
3666− };
3667−
3668− buildInputs = with self; [] ++ optional isPy26 unittest2;
3669−
3670− propagatedBuildInputs =
3671− [ self.beautifulsoup4
3672− self.peppercorn
3673− self.colander
3674− self.translationstring
3675− self.chameleon
3676− self.zope_deprecation
3677− self.coverage
3678− self.nose
3679− ];
3680−
3681− meta = {
3682− maintainers = with maintainers; [ garbas domenkozar ];
3683− platforms = platforms.all;
3684− };
3685− };
3660+ deform = callPackage ../development/python-modules/deform { };
36863661
36873662 demjson = callPackage ../development/python-modules/demjson { };
36883663
@@ -6330,23 +6305,7 @@ in {
63306305
63316306 schema = callPackage ../development/python-modules/schema {};
63326307
6333− stem = buildPythonPackage rec {
6334− name = "stem-${version}";
6335− version = "1.6.0";
6336−
6337− src = pkgs.fetchurl {
6338− url = "mirror://pypi/s/stem/${name}.tar.gz";
6339− sha256 = "1va9p3ij7lxg6ixfsvaql06dn11l3fgpxmss1dhlvafm7sqizznp";
6340− };
6341−
6342− meta = {
6343− description = "Controller library that allows applications to interact with Tor (https://www.torproject.org/";
6344− homepage = https://stem.torproject.org/;
6345− license = licenses.gpl3;
6346− maintainers = with maintainers; [ phreedom ];
6347− };
6348−
6349− };
6308+ stem = callPackage ../development/python-modules/stem { };
63506309
63516310 svg-path = callPackage ../development/python-modules/svg-path { };
63526311
@@ -6874,52 +6833,7 @@ in {
68746833 };
68756834 };
68766835
6877− django_pipeline = buildPythonPackage rec {
6878− name = "django-pipeline-${version}";
6879− version = "1.5.1";
6880−
6881− src = pkgs.fetchurl {
6882− url = "mirror://pypi/d/django-pipeline/${name}.tar.gz";
6883− sha256 = "1y49fa8jj7x9qjj5wzhns3zxwj0s73sggvkrv660cqw5qb7d8hha";
6884− };
6885−
6886− propagatedBuildInputs = with self; [ django futures ];
6887−
6888− meta = with stdenv.lib; {
6889− description = "Pipeline is an asset packaging library for Django";
6890− homepage = https://github.com/cyberdelia/django-pipeline;
6891− license = stdenv.lib.licenses.mit;
6892− };
6893− };
6894−
6895− django_pipeline_1_3 = self.django_pipeline.overrideDerivation (super: rec {
6896− name = "django-pipeline-1.3.27";
6897− src = pkgs.fetchurl {
6898− url = "mirror://pypi/d/django-pipeline/${name}.tar.gz";
6899− sha256 = "0iva3cmnh5jw54c7w83nx9nqv523hjvkbjchzd2pb6vzilxf557k";
6900− };
6901− });
6902−
6903−
6904− djblets = if (versionOlder self.django.version "1.6.11") ||
6905− (versionAtLeast self.django.version "1.9")
6906− then throw "djblets only suported for Django<1.8.999,>=1.6.11"
6907− else buildPythonPackage rec {
6908− name = "Djblets-0.9";
6909−
6910− src = pkgs.fetchurl {
6911− url = "http://downloads.reviewboard.org/releases/Djblets/0.9/${name}.tar.gz";
6912− sha256 = "1rr5vjwiiw3kih4k9nawislf701l838dbk5xgizadvwp6lpbpdpl";
6913− };
6914−
6915− propagatedBuildInputs = with self; [
6916− django feedparser django_pipeline_1_3 pillowfight pytz ];
6917−
6918− meta = {
6919− description = "A collection of useful extensions for Django";
6920− homepage = https://github.com/djblets/djblets;
6921− };
6922− };
6836+ django_pipeline = callPackage ../development/python-modules/django-pipeline { };
69236837
69246838 dj-database-url = callPackage ../development/python-modules/dj-database-url { };
69256839
@@ -8895,24 +8809,8 @@ in {
88958809
88968810 keyutils = callPackage ../development/python-modules/keyutils { };
88978811
8898− klein = buildPythonPackage rec {
8899− name = "klein-15.3.1";
8900− src = pkgs.fetchurl {
8901− url = "mirror://pypi/k/klein/${name}.tar.gz";
8902− sha256 = "1hl2psnn1chm698rimyn9dgcpl1mxgc8dj11b3ipp8z37yfjs3z9";
8903− };
8904−
8905− disabled = isPy3k;
8906−
8907− propagatedBuildInputs = with self; [ werkzeug twisted ];
8908−
8909− meta = {
8910− description = "Klein Web Micro-Framework";
8911− homepage = "https://github.com/twisted/klein";
8912− license = licenses.mit;
8913− };
8914− };
8915−
8812+ klein = callPackage ../development/python-modules/klein { };
8813+
89168814 koji = callPackage ../development/python-modules/koji { };
89178815
89188816 kombu = buildPythonPackage rec {
@@ -11245,34 +11143,7 @@ in {
1124511143 };
1124611144 };
1124711145
11248− WSME = buildPythonPackage rec {
11249− name = "WSME-${version}";
11250− version = "0.8.0";
11251−
11252− src = pkgs.fetchurl {
11253− url = "mirror://pypi/W/WSME/${name}.tar.gz";
11254− sha256 = "1nw827iz5g9jlfnfbdi8kva565v0kdjzba2lccziimj09r71w900";
11255− };
11256−
11257− checkPhase = ''
11258− # remove turbogears tests as we don't have it packaged
11259− rm tests/test_tg*
11260− # remove flask since we don't have flask-restful
11261− rm tests/test_flask*
11262− # https://bugs.launchpad.net/wsme/+bug/1510823
11263− ${if isPy3k then "rm tests/test_cornice.py" else ""}
11264−
11265− nosetests tests/
11266− '';
11267−
11268− propagatedBuildInputs = with self; [
11269− pbr six simplegeneric netaddr pytz webob
11270− ];
11271− buildInputs = with self; [
11272− cornice nose webtest pecan transaction cherrypy sphinx
11273− ];
11274− };
11275−
11146+ WSME = callPackage ../development/python-modules/WSME { };
1127611147
1127711148 zake = buildPythonPackage rec {
1127811149 name = "zake-${version}";
@@ -14402,27 +14273,6 @@ in {
1440214273
1440314274 django-multiselectfield = callPackage ../development/python-modules/django-multiselectfield { };
1440414275
14405− reviewboard = buildPythonPackage rec {
14406− name = "ReviewBoard-2.5.1.1";
14407−
14408− src = pkgs.fetchurl {
14409− url = "http://downloads.reviewboard.org/releases/ReviewBoard/2.5/${name}.tar.gz";
14410− sha256 = "14m8yy2aqxnnzi822b797wc9nmkfkp2fqmq24asdnm66bxhyzjwn";
14411− };
14412−
14413− patchPhase = ''
14414− sed -i 's/mimeparse/python-mimeparse/' setup.py
14415− sed -i 's/markdown>=2.4.0,<2.4.999/markdown/' setup.py
14416− '';
14417−
14418− propagatedBuildInputs = with self;
14419− [ django recaptcha_client pytz memcached dateutil_1_5 paramiko flup
14420− pygments djblets django_evolution pycrypto pysvn pillow
14421− psycopg2 django-haystack python_mimeparse markdown django-multiselectfield
14422− ];
14423− };
14424−
14425−
1442614276 rdflib = callPackage ../development/python-modules/rdflib { };
1442714277
1442814278 isodate = buildPythonPackage rec {
@@ -15019,6 +14869,8 @@ in {
1501914869 };
1502014870 };
1502114871
14872+ slimit = callPackage ../development/python-modules/slimit { };
14873+
1502214874 slob = buildPythonPackage rec {
1502314875 name = "slob-unstable-2016-11-03";
1502414876