From ba74cf4d5ceb3aa516af2a10d2ee86b79ff75ac1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Sch=C3=BCtz?= Date: Tue, 20 Mar 2018 09:58:15 +0100 Subject: [PATCH 01/15] pythonPackages.django_pipeline: move expression --- .../django-pipeline/default.nix | 20 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 18 +---------------- 2 files changed, 21 insertions(+), 17 deletions(-) create mode 100644 pkgs/development/python-modules/django-pipeline/default.nix diff --git a/pkgs/development/python-modules/django-pipeline/default.nix b/pkgs/development/python-modules/django-pipeline/default.nix new file mode 100644 index 000000000000..f29ae3658775 --- /dev/null +++ b/pkgs/development/python-modules/django-pipeline/default.nix @@ -0,0 +1,20 @@ +{ lib, buildPythonPackage, fetchPypi +, django, futures }: + +buildPythonPackage rec { + pname = "django-pipeline"; + version = "1.5.1"; + + src = fetchPypi { + inherit pname version; + sha256 = "1y49fa8jj7x9qjj5wzhns3zxwj0s73sggvkrv660cqw5qb7d8hha"; + }; + + propagatedBuildInputs = [ django futures ]; + + meta = with lib; { + description = "Pipeline is an asset packaging library for Django"; + homepage = https://github.com/cyberdelia/django-pipeline; + license = licenses.mit; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 8acec15fd71e..b5e3f96d8494 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -6883,23 +6883,7 @@ in { }; }; - django_pipeline = buildPythonPackage rec { - name = "django-pipeline-${version}"; - version = "1.5.1"; - - src = pkgs.fetchurl { - url = "mirror://pypi/d/django-pipeline/${name}.tar.gz"; - sha256 = "1y49fa8jj7x9qjj5wzhns3zxwj0s73sggvkrv660cqw5qb7d8hha"; - }; - - propagatedBuildInputs = with self; [ django futures ]; - - meta = with stdenv.lib; { - description = "Pipeline is an asset packaging library for Django"; - homepage = https://github.com/cyberdelia/django-pipeline; - license = stdenv.lib.licenses.mit; - }; - }; + django_pipeline = callPackage ../development/python-modules/django-pipeline { }; django_pipeline_1_3 = self.django_pipeline.overrideDerivation (super: rec { name = "django-pipeline-1.3.27"; From 127045d8e0a9481084649567c1520468582e3f33 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Sch=C3=BCtz?= Date: Tue, 20 Mar 2018 10:31:35 +0100 Subject: [PATCH 02/15] pythonPackages.slimit: init at 0.8.1 --- .../python-modules/slimit/default.nix | 36 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 ++ 2 files changed, 38 insertions(+) create mode 100644 pkgs/development/python-modules/slimit/default.nix diff --git a/pkgs/development/python-modules/slimit/default.nix b/pkgs/development/python-modules/slimit/default.nix new file mode 100644 index 000000000000..ff4c63891e55 --- /dev/null +++ b/pkgs/development/python-modules/slimit/default.nix @@ -0,0 +1,36 @@ +{ lib, buildPythonPackage, fetchPypi, isPy3k, fetchpatch, python, ply }: + +buildPythonPackage rec { + pname = "slimit"; + version = "0.8.1"; + + src = fetchPypi { + inherit pname version; + extension = "zip"; + sha256 = "f433dcef899f166b207b67d91d3f7344659cb33b8259818f084167244e17720b"; + }; + + # Some patches from https://github.com/rspivak/slimit/pull/65 + patches = lib.optionals isPy3k [ + (fetchpatch { + url = https://github.com/lelit/slimit/commit/a61e12d88cc123c4b7af2abef21d06fd182e561a.patch; + sha256 = "0lbhvkgn4l8g9fwvb81rfwjx7hsaq2pid8a5gczdk1ba65wfvdq5"; + }) + (fetchpatch { + url = https://github.com/lelit/slimit/commit/e8331659fb89e8a4613c5e4e338c877fead9c551.patch; + sha256 = "1hv4ysn09c9bfd5bxhhrp51hsi81hdidmx0y7zcrjjiich9ayrni"; + }) + ]; + + propagatedBuildInputs = [ ply ]; + + checkPhase = '' + ${python.interpreter} -m unittest discover -s src/slimit + ''; + + meta = with lib; { + description = "JavaScript minifier"; + homepage = http://slimit.readthedocs.org/; + license = licenses.mit; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index b5e3f96d8494..96d3cd2f75ef 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -15021,6 +15021,8 @@ in { }; }; + slimit = callPackage ../development/python-modules/slimit { }; + slob = buildPythonPackage rec { name = "slob-unstable-2016-11-03"; From 6e78005ef1de6dca89abc6df4877722cc3ed841a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Sch=C3=BCtz?= Date: Tue, 20 Mar 2018 11:04:43 +0100 Subject: [PATCH 03/15] pythonPackages.django_pipeline: 1.5.1 -> 1.6.14 --- .../django-pipeline/default.nix | 30 ++++++++++++++----- 1 file changed, 23 insertions(+), 7 deletions(-) diff --git a/pkgs/development/python-modules/django-pipeline/default.nix b/pkgs/development/python-modules/django-pipeline/default.nix index f29ae3658775..58e9d746b97f 100644 --- a/pkgs/development/python-modules/django-pipeline/default.nix +++ b/pkgs/development/python-modules/django-pipeline/default.nix @@ -1,16 +1,32 @@ -{ lib, buildPythonPackage, fetchPypi -, django, futures }: +{ lib, buildPythonPackage, fetchFromGitHub, isPy3k +, django, futures, mock, jinja2, jsmin, slimit }: buildPythonPackage rec { pname = "django-pipeline"; - version = "1.5.1"; + version = "1.6.14"; - src = fetchPypi { - inherit pname version; - sha256 = "1y49fa8jj7x9qjj5wzhns3zxwj0s73sggvkrv660cqw5qb7d8hha"; + # no tests on PyPI + src = fetchFromGitHub { + owner = "jazzband"; + repo = pname; + rev = version; + sha256 = "1xf732bd17mgha75jfhlnms46ib2pffhpfa0ca7bmng9jhbvsl9j"; }; - propagatedBuildInputs = [ django futures ]; + postPatch = '' + substituteInPlace tests/tests/test_compiler.py \ + --replace "/usr/bin/env" "" + ''; + + propagatedBuildInputs = [ django ] ++ lib.optional (!isPy3k) futures; + + checkInputs = [ jinja2 jsmin slimit ] ++ lib.optional (!isPy3k) mock; + + checkPhase = '' + export PYTHONPATH=.:$PYTHONPATH + export DJANGO_SETTINGS_MODULE=tests.settings + ${django}/bin/django-admin.py test tests + ''; meta = with lib; { description = "Pipeline is an asset packaging library for Django"; From fbff08f2f213c8cb09f845f8c4d8bfd40eff2699 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Sch=C3=BCtz?= Date: Tue, 20 Mar 2018 11:20:13 +0100 Subject: [PATCH 04/15] pythonPackages.{reviewboard,djblets}: uninit Djblets is unmaintained: has not been updated since 2015, but had many releases. Dependency django_pipeline_1_3 is broken and should anyway be removed from pythonPackages because we want to have a consistent package set. Because the reviewboard package also hasn't been updated since 2015 and depends on djblets, it is removed as well. --- pkgs/top-level/python-packages.nix | 50 ------------------------------ 1 file changed, 50 deletions(-) diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 96d3cd2f75ef..5a5012f10d11 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -6885,35 +6885,6 @@ in { django_pipeline = callPackage ../development/python-modules/django-pipeline { }; - django_pipeline_1_3 = self.django_pipeline.overrideDerivation (super: rec { - name = "django-pipeline-1.3.27"; - src = pkgs.fetchurl { - url = "mirror://pypi/d/django-pipeline/${name}.tar.gz"; - sha256 = "0iva3cmnh5jw54c7w83nx9nqv523hjvkbjchzd2pb6vzilxf557k"; - }; - }); - - - djblets = if (versionOlder self.django.version "1.6.11") || - (versionAtLeast self.django.version "1.9") - then throw "djblets only suported for Django<1.8.999,>=1.6.11" - else buildPythonPackage rec { - name = "Djblets-0.9"; - - src = pkgs.fetchurl { - url = "http://downloads.reviewboard.org/releases/Djblets/0.9/${name}.tar.gz"; - sha256 = "1rr5vjwiiw3kih4k9nawislf701l838dbk5xgizadvwp6lpbpdpl"; - }; - - propagatedBuildInputs = with self; [ - django feedparser django_pipeline_1_3 pillowfight pytz ]; - - meta = { - description = "A collection of useful extensions for Django"; - homepage = https://github.com/djblets/djblets; - }; - }; - dj-database-url = callPackage ../development/python-modules/dj-database-url { }; djmail = callPackage ../development/python-modules/djmail { }; @@ -14404,27 +14375,6 @@ in { django-multiselectfield = callPackage ../development/python-modules/django-multiselectfield { }; - reviewboard = buildPythonPackage rec { - name = "ReviewBoard-2.5.1.1"; - - src = pkgs.fetchurl { - url = "http://downloads.reviewboard.org/releases/ReviewBoard/2.5/${name}.tar.gz"; - sha256 = "14m8yy2aqxnnzi822b797wc9nmkfkp2fqmq24asdnm66bxhyzjwn"; - }; - - patchPhase = '' - sed -i 's/mimeparse/python-mimeparse/' setup.py - sed -i 's/markdown>=2.4.0,<2.4.999/markdown/' setup.py - ''; - - propagatedBuildInputs = with self; - [ django recaptcha_client pytz memcached dateutil_1_5 paramiko flup - pygments djblets django_evolution pycrypto pysvn pillow - psycopg2 django-haystack python_mimeparse markdown django-multiselectfield - ]; - }; - - rdflib = callPackage ../development/python-modules/rdflib { }; isodate = buildPythonPackage rec { From 061e79806e35b6477d67a9c9ba6b3ed997b4572b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Sch=C3=BCtz?= Date: Tue, 20 Mar 2018 11:38:02 +0100 Subject: [PATCH 05/15] pythonPackages.stem: move expression --- .../python-modules/stem/default.nix | 18 ++++++++++++++++++ pkgs/top-level/python-packages.nix | 18 +----------------- 2 files changed, 19 insertions(+), 17 deletions(-) create mode 100644 pkgs/development/python-modules/stem/default.nix diff --git a/pkgs/development/python-modules/stem/default.nix b/pkgs/development/python-modules/stem/default.nix new file mode 100644 index 000000000000..68ad178bd4b0 --- /dev/null +++ b/pkgs/development/python-modules/stem/default.nix @@ -0,0 +1,18 @@ +{ lib, buildPythonPackage, fetchPypi }: + +buildPythonPackage rec { + pname = "stem"; + version = "1.6.0"; + + src = fetchPypi { + inherit pname version; + sha256 = "1va9p3ij7lxg6ixfsvaql06dn11l3fgpxmss1dhlvafm7sqizznp"; + }; + + meta = with lib; { + description = "Controller library that allows applications to interact with Tor"; + homepage = https://stem.torproject.org/; + license = licenses.gpl3; + maintainers = with maintainers; [ phreedom ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 5a5012f10d11..431ae02c9fdf 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -6324,23 +6324,7 @@ in { schema = callPackage ../development/python-modules/schema {}; - stem = buildPythonPackage rec { - name = "stem-${version}"; - version = "1.6.0"; - - src = pkgs.fetchurl { - url = "mirror://pypi/s/stem/${name}.tar.gz"; - sha256 = "1va9p3ij7lxg6ixfsvaql06dn11l3fgpxmss1dhlvafm7sqizznp"; - }; - - meta = { - description = "Controller library that allows applications to interact with Tor (https://www.torproject.org/"; - homepage = https://stem.torproject.org/; - license = licenses.gpl3; - maintainers = with maintainers; [ phreedom ]; - }; - - }; + stem = callPackage ../development/python-modules/stem { }; svg-path = buildPythonPackage rec { name = "svg.path-${version}"; From 685dd8d21db16ffb3d8888f4f9cd5e6d5dd3c6c6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Sch=C3=BCtz?= Date: Tue, 20 Mar 2018 12:06:31 +0100 Subject: [PATCH 06/15] pythonPackages.stem: run unit tests --- pkgs/development/python-modules/stem/default.nix | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/pkgs/development/python-modules/stem/default.nix b/pkgs/development/python-modules/stem/default.nix index 68ad178bd4b0..1df139ab29ce 100644 --- a/pkgs/development/python-modules/stem/default.nix +++ b/pkgs/development/python-modules/stem/default.nix @@ -1,4 +1,4 @@ -{ lib, buildPythonPackage, fetchPypi }: +{ lib, buildPythonPackage, fetchPypi, python, mock }: buildPythonPackage rec { pname = "stem"; @@ -9,6 +9,18 @@ buildPythonPackage rec { sha256 = "1va9p3ij7lxg6ixfsvaql06dn11l3fgpxmss1dhlvafm7sqizznp"; }; + postPatch = '' + rm test/unit/installation.py + sed -i "/test.unit.installation/d" test/settings.cfg + ''; + + checkInputs = [ mock ]; + + checkPhase = '' + touch .gitignore + ${python.interpreter} run_tests.py -u + ''; + meta = with lib; { description = "Controller library that allows applications to interact with Tor"; homepage = https://stem.torproject.org/; From 12695be641abb28ba4abb42b331431b143938a9f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Sch=C3=BCtz?= Date: Tue, 20 Mar 2018 12:22:32 +0100 Subject: [PATCH 07/15] pythonPackages.zope_copy: 4.0.2 -> 4.1.0 --- .../python-modules/zope_copy/default.nix | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/pkgs/development/python-modules/zope_copy/default.nix b/pkgs/development/python-modules/zope_copy/default.nix index 305928c1846d..6bd7ae33fb9b 100644 --- a/pkgs/development/python-modules/zope_copy/default.nix +++ b/pkgs/development/python-modules/zope_copy/default.nix @@ -8,20 +8,23 @@ buildPythonPackage rec { - pname = "zope_copy"; - version = "4.0.2"; + pname = "zope.copy"; + version = "4.1.0"; src = fetchPypi { inherit pname version; - extension = "zip"; - sha256 = "eb2a95866df1377741876a3ee62d8600e80089e6246e1a235e86791b29534457"; + sha256 = "702dbb52e2427a1cc2e2b4b3f5a40c64dcbf9ebed85888ae8fa67172263a6994"; }; propagatedBuildInputs = [ zope_interface ]; checkInputs = [ zope_location zope_schema ]; + checkPhase = '' + python -m unittest discover -s src/zope/copy + ''; + meta = { maintainers = with lib.maintainers; [ domenkozar ]; }; -} \ No newline at end of file +} From a1b9cc79386a0c41789e4bbb6af8ee9ac1472bd4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Sch=C3=BCtz?= Date: Tue, 20 Mar 2018 12:38:29 +0100 Subject: [PATCH 08/15] pythonPackages.deform: move expression --- .../python-modules/deform/default.nix | 31 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 27 +--------------- 2 files changed, 32 insertions(+), 26 deletions(-) create mode 100644 pkgs/development/python-modules/deform/default.nix diff --git a/pkgs/development/python-modules/deform/default.nix b/pkgs/development/python-modules/deform/default.nix new file mode 100644 index 000000000000..60b8c0814c85 --- /dev/null +++ b/pkgs/development/python-modules/deform/default.nix @@ -0,0 +1,31 @@ +{ lib, buildPythonPackage, fetchPypi +, beautifulsoup4, peppercorn, colander, translationstring +, chameleon, zope_deprecation, coverage, nose }: + +buildPythonPackage rec { + pname = "deform"; + version = "2.0a2"; + + src = fetchPypi { + inherit pname version; + sha256 = "3fa4d287c8da77a83556e4a5686de006ddd69da359272120b915dc8f5a70cabd"; + }; + + propagatedBuildInputs = [ + beautifulsoup4 + peppercorn + colander + translationstring + chameleon + zope_deprecation + coverage + nose + ]; + + meta = with lib; { + description = "Form library with advanced features like nested forms"; + homepage = https://docs.pylonsproject.org/projects/deform/en/latest/; + license = licenses.free; # http://www.repoze.org/LICENSE.txt + maintainers = with maintainers; [ garbas domenkozar ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 431ae02c9fdf..81740f34e521 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -3651,32 +3651,7 @@ in { decorator = callPackage ../development/python-modules/decorator { }; - deform = buildPythonPackage rec { - name = "deform-2.0a2"; - - src = pkgs.fetchurl { - url = "mirror://pypi/d/deform/${name}.tar.gz"; - sha256 = "3fa4d287c8da77a83556e4a5686de006ddd69da359272120b915dc8f5a70cabd"; - }; - - buildInputs = with self; [] ++ optional isPy26 unittest2; - - propagatedBuildInputs = - [ self.beautifulsoup4 - self.peppercorn - self.colander - self.translationstring - self.chameleon - self.zope_deprecation - self.coverage - self.nose - ]; - - meta = { - maintainers = with maintainers; [ garbas domenkozar ]; - platforms = platforms.all; - }; - }; + deform = callPackage ../development/python-modules/deform { }; demjson = callPackage ../development/python-modules/demjson { }; From 86f21360acb0319509536164046da918d0002dff Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Sch=C3=BCtz?= Date: Tue, 20 Mar 2018 12:44:08 +0100 Subject: [PATCH 09/15] pythonPackages.deform: 2.0.a2 -> 2.0.5 --- .../python-modules/deform/default.nix | 28 +++++++++++++------ 1 file changed, 19 insertions(+), 9 deletions(-) diff --git a/pkgs/development/python-modules/deform/default.nix b/pkgs/development/python-modules/deform/default.nix index 60b8c0814c85..53286b38722b 100644 --- a/pkgs/development/python-modules/deform/default.nix +++ b/pkgs/development/python-modules/deform/default.nix @@ -1,25 +1,35 @@ { lib, buildPythonPackage, fetchPypi -, beautifulsoup4, peppercorn, colander, translationstring -, chameleon, zope_deprecation, coverage, nose }: +, chameleon, colander, iso8601, peppercorn, translationstring, zope_deprecation +, nose, coverage, beautifulsoup4, flaky }: buildPythonPackage rec { pname = "deform"; - version = "2.0a2"; + version = "2.0.5"; src = fetchPypi { inherit pname version; - sha256 = "3fa4d287c8da77a83556e4a5686de006ddd69da359272120b915dc8f5a70cabd"; + sha256 = "874d3346a02c500432efdcc73b1a7174aa0ea69cd52a99bb9a812967f54f6f79"; }; + postPatch = '' + substituteInPlace setup.py \ + --replace "iso8601<=0.1.11" iso8601 + ''; + propagatedBuildInputs = [ - beautifulsoup4 - peppercorn - colander - translationstring chameleon + colander + iso8601 + peppercorn + translationstring zope_deprecation - coverage + ]; + + checkInputs = [ nose + coverage + beautifulsoup4 + flaky ]; meta = with lib; { From 86e007bd31391c4bddf6c1610aa3fb2538896861 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Sch=C3=BCtz?= Date: Tue, 20 Mar 2018 12:55:22 +0100 Subject: [PATCH 10/15] pythonPackages.klein: move expression --- .../python-modules/klein/default.nix | 21 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 20 ++---------------- 2 files changed, 23 insertions(+), 18 deletions(-) create mode 100644 pkgs/development/python-modules/klein/default.nix diff --git a/pkgs/development/python-modules/klein/default.nix b/pkgs/development/python-modules/klein/default.nix new file mode 100644 index 000000000000..f4748a93277b --- /dev/null +++ b/pkgs/development/python-modules/klein/default.nix @@ -0,0 +1,21 @@ +{ lib, buildPythonPackage, fetchPypi, isPy3k, werkzeug, twisted }: + +buildPythonPackage rec { + pname = "klein"; + version = "15.3.1"; + + src = fetchPypi { + inherit pname version; + sha256 = "1hl2psnn1chm698rimyn9dgcpl1mxgc8dj11b3ipp8z37yfjs3z9"; + }; + + disabled = isPy3k; + + propagatedBuildInputs = [ werkzeug twisted ]; + + meta = with lib; { + description = "Klein Web Micro-Framework"; + homepage = "https://github.com/twisted/klein"; + license = licenses.mit; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 81740f34e521..246f92e8e73f 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -8835,24 +8835,8 @@ in { keyutils = callPackage ../development/python-modules/keyutils { }; - klein = buildPythonPackage rec { - name = "klein-15.3.1"; - src = pkgs.fetchurl { - url = "mirror://pypi/k/klein/${name}.tar.gz"; - sha256 = "1hl2psnn1chm698rimyn9dgcpl1mxgc8dj11b3ipp8z37yfjs3z9"; - }; - - disabled = isPy3k; - - propagatedBuildInputs = with self; [ werkzeug twisted ]; - - meta = { - description = "Klein Web Micro-Framework"; - homepage = "https://github.com/twisted/klein"; - license = licenses.mit; - }; - }; - + klein = callPackage ../development/python-modules/klein { }; + koji = callPackage ../development/python-modules/koji { }; kombu = buildPythonPackage rec { From b34af91889356f815156adf9dd13263ded5ab773 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Sch=C3=BCtz?= Date: Tue, 20 Mar 2018 13:04:04 +0100 Subject: [PATCH 11/15] pythonPackages.klein: 15.3.1 -> 17.10.0 --- .../development/python-modules/klein/default.nix | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/pkgs/development/python-modules/klein/default.nix b/pkgs/development/python-modules/klein/default.nix index f4748a93277b..3dfbb4e17db2 100644 --- a/pkgs/development/python-modules/klein/default.nix +++ b/pkgs/development/python-modules/klein/default.nix @@ -1,17 +1,23 @@ -{ lib, buildPythonPackage, fetchPypi, isPy3k, werkzeug, twisted }: +{ lib, buildPythonPackage, fetchPypi +, six, twisted, werkzeug, incremental +, mock }: buildPythonPackage rec { pname = "klein"; - version = "15.3.1"; + version = "17.10.0"; src = fetchPypi { inherit pname version; - sha256 = "1hl2psnn1chm698rimyn9dgcpl1mxgc8dj11b3ipp8z37yfjs3z9"; + sha256 = "30aaf0d78a987d5dbfe0968a07367ad0c73e02823cc8eef4c54f80ab848370d0"; }; - disabled = isPy3k; + propagatedBuildInputs = [ six twisted werkzeug incremental ]; - propagatedBuildInputs = [ werkzeug twisted ]; + checkInputs = [ mock ]; + + checkPhase = '' + trial klein + ''; meta = with lib; { description = "Klein Web Micro-Framework"; From 3d989e3d7a27c0c01f97ee5817f5dd1223f13f93 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Sch=C3=BCtz?= Date: Tue, 20 Mar 2018 14:30:01 +0100 Subject: [PATCH 12/15] pythonPackages.astropy: disable for python 2 --- pkgs/development/python-modules/astropy/default.nix | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/pkgs/development/python-modules/astropy/default.nix b/pkgs/development/python-modules/astropy/default.nix index ccf988fc56db..4ff4841cf5f9 100644 --- a/pkgs/development/python-modules/astropy/default.nix +++ b/pkgs/development/python-modules/astropy/default.nix @@ -1,16 +1,18 @@ { lib , fetchPypi , buildPythonPackage +, isPy3k , numpy , pytest }: buildPythonPackage rec { - pname = "astropy"; version = "3.0"; - name = "${pname}-${version}"; + disabled = !isPy3k; # according to setup.py + doCheck = false; #Some tests are failing. More importantly setup.py hangs on completion. Needs fixing with a proper shellhook. + src = fetchPypi { inherit pname version; sha256 = "9e0ad19b9d6d227bdf0932bbe64a8c5dd4a47d4ec078586cf24bf9f0c61d9ecf"; @@ -18,7 +20,6 @@ buildPythonPackage rec { propagatedBuildInputs = [ pytest numpy ]; # yes it really has pytest in install_requires - meta = { description = "Astronomy/Astrophysics library for Python"; homepage = http://www.astropy.org; From 9f54b031fdbda6ebf71fb92222537786039abc75 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Sch=C3=BCtz?= Date: Tue, 20 Mar 2018 15:40:43 +0100 Subject: [PATCH 13/15] pythonPackages.WSME: move expression --- .../python-modules/WSME/default.nix | 40 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 29 +------------- 2 files changed, 41 insertions(+), 28 deletions(-) create mode 100644 pkgs/development/python-modules/WSME/default.nix diff --git a/pkgs/development/python-modules/WSME/default.nix b/pkgs/development/python-modules/WSME/default.nix new file mode 100644 index 000000000000..fc2b066ce1e9 --- /dev/null +++ b/pkgs/development/python-modules/WSME/default.nix @@ -0,0 +1,40 @@ +{ lib, buildPythonPackage, fetchPypi, isPy3k +, pbr, six, simplegeneric, netaddr, pytz, webob +, cornice, nose, webtest, pecan, transaction, cherrypy, sphinx }: + +buildPythonPackage rec { + pname = "WSME"; + version = "0.8.0"; + + src = fetchPypi { + inherit pname version; + sha256 = "1nw827iz5g9jlfnfbdi8kva565v0kdjzba2lccziimj09r71w900"; + }; + + checkPhase = '' + # remove turbogears tests as we don't have it packaged + rm tests/test_tg* + # remove flask since we don't have flask-restful + rm tests/test_flask* + # https://bugs.launchpad.net/wsme/+bug/1510823 + ${if isPy3k then "rm tests/test_cornice.py" else ""} + + nosetests tests/ + ''; + + nativeBuildInputs = [ pbr ]; + + propagatedBuildInputs = [ + six simplegeneric netaddr pytz webob + ]; + + checkInputs = [ + cornice nose webtest pecan transaction cherrypy sphinx + ]; + + meta = with lib; { + description = "Simplify the writing of REST APIs, and extend them with additional protocols"; + homepage = http://git.openstack.org/cgit/openstack/wsme; + license = licenses.mit; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 246f92e8e73f..54ec6192016a 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -11165,34 +11165,7 @@ in { }; }; - WSME = buildPythonPackage rec { - name = "WSME-${version}"; - version = "0.8.0"; - - src = pkgs.fetchurl { - url = "mirror://pypi/W/WSME/${name}.tar.gz"; - sha256 = "1nw827iz5g9jlfnfbdi8kva565v0kdjzba2lccziimj09r71w900"; - }; - - checkPhase = '' - # remove turbogears tests as we don't have it packaged - rm tests/test_tg* - # remove flask since we don't have flask-restful - rm tests/test_flask* - # https://bugs.launchpad.net/wsme/+bug/1510823 - ${if isPy3k then "rm tests/test_cornice.py" else ""} - - nosetests tests/ - ''; - - propagatedBuildInputs = with self; [ - pbr six simplegeneric netaddr pytz webob - ]; - buildInputs = with self; [ - cornice nose webtest pecan transaction cherrypy sphinx - ]; - }; - + WSME = callPackage ../development/python-modules/WSME { }; zake = buildPythonPackage rec { name = "zake-${version}"; From 2773b76f33549f68ca53e4d9f0457314ce87f9e3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Sch=C3=BCtz?= Date: Tue, 20 Mar 2018 16:13:38 +0100 Subject: [PATCH 14/15] pythonPackages.WSME: 0.8.0 -> 0.9.2 --- .../python-modules/WSME/default.nix | 25 +++++++++++++------ 1 file changed, 17 insertions(+), 8 deletions(-) diff --git a/pkgs/development/python-modules/WSME/default.nix b/pkgs/development/python-modules/WSME/default.nix index fc2b066ce1e9..8cbbd2c767fb 100644 --- a/pkgs/development/python-modules/WSME/default.nix +++ b/pkgs/development/python-modules/WSME/default.nix @@ -1,27 +1,35 @@ { lib, buildPythonPackage, fetchPypi, isPy3k , pbr, six, simplegeneric, netaddr, pytz, webob -, cornice, nose, webtest, pecan, transaction, cherrypy, sphinx }: +, cornice, nose, webtest, pecan, transaction, cherrypy, sphinx +, flask, flask-restful, suds-jurko, glibcLocales }: buildPythonPackage rec { pname = "WSME"; - version = "0.8.0"; + version = "0.9.2"; src = fetchPypi { inherit pname version; - sha256 = "1nw827iz5g9jlfnfbdi8kva565v0kdjzba2lccziimj09r71w900"; + sha256 = "e790ac755a7e36eaa796d3966d3878677896dbc7d1c2685cb85c06b744c21976"; }; - checkPhase = '' + postPatch = '' # remove turbogears tests as we don't have it packaged rm tests/test_tg* - # remove flask since we don't have flask-restful - rm tests/test_flask* + # WSME seems incompatible with recent SQLAlchemy version + rm wsmeext/tests/test_sqlalchemy* # https://bugs.launchpad.net/wsme/+bug/1510823 ${if isPy3k then "rm tests/test_cornice.py" else ""} - - nosetests tests/ ''; + checkPhae = '' + nosetests --exclude test_buildhtml \ + --exlcude test_custom_clientside_error \ + --exclude test_custom_non_http_clientside_error + ''; + + # UnicodeEncodeError, ImportError, ... + doCheck = !isPy3k; + nativeBuildInputs = [ pbr ]; propagatedBuildInputs = [ @@ -30,6 +38,7 @@ buildPythonPackage rec { checkInputs = [ cornice nose webtest pecan transaction cherrypy sphinx + flask flask-restful suds-jurko glibcLocales ]; meta = with lib; { From 43d822178bc933bc5dce38d4ff71b50dab081758 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Sch=C3=BCtz?= Date: Tue, 20 Mar 2018 16:33:08 +0100 Subject: [PATCH 15/15] pythonPackages.altair: fix build --- pkgs/development/python-modules/altair/default.nix | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/pkgs/development/python-modules/altair/default.nix b/pkgs/development/python-modules/altair/default.nix index d3cdc0f43f23..d98eba693d23 100644 --- a/pkgs/development/python-modules/altair/default.nix +++ b/pkgs/development/python-modules/altair/default.nix @@ -1,17 +1,20 @@ { stdenv, buildPythonPackage, fetchPypi -, pytest, vega, pandas, ipython, traitlets }: +, pytest, glibcLocales, vega, pandas, ipython, traitlets }: buildPythonPackage rec { pname = "altair"; version = "1.2.1"; - name = "${pname}-${version}"; src = fetchPypi { inherit pname version; sha256 = "c1303f77f1ba4d632f2958c83c0f457b2b969860b1ac9adfb872aefa1780baa7"; }; - buildInputs = [ pytest ]; + postPatch = '' + sed -i "s/vega==/vega>=/g" setup.py + ''; + + checkInputs = [ pytest glibcLocales ]; checkPhase = '' export LANG=en_US.UTF-8 @@ -19,8 +22,6 @@ buildPythonPackage rec { ''; propagatedBuildInputs = [ vega pandas ipython traitlets ]; - # Disabling checks, MockRequest object has no method send() - doCheck = false; meta = with stdenv.lib; { description = "A declarative statistical visualization library for Python.";