From 490df6756228390846dbed82b359f50fba88149b Mon Sep 17 00:00:00 2001 From: adisbladis Date: Wed, 9 Aug 2017 12:33:54 +0800 Subject: [PATCH] pythonPackages.pecan: 1.0.3 -> 1.2.1 --- .../python-modules/pecan/default.nix | 40 +++++++++++++++++++ .../pecan/python36_test_fix.patch | 13 ++++++ pkgs/top-level/python-packages.nix | 22 +--------- 3 files changed, 54 insertions(+), 21 deletions(-) create mode 100644 pkgs/development/python-modules/pecan/default.nix create mode 100644 pkgs/development/python-modules/pecan/python36_test_fix.patch diff --git a/pkgs/development/python-modules/pecan/default.nix b/pkgs/development/python-modules/pecan/default.nix new file mode 100644 index 000000000000..b6e022640cbd --- /dev/null +++ b/pkgs/development/python-modules/pecan/default.nix @@ -0,0 +1,40 @@ +{ stdenv +, fetchPypi +, buildPythonPackage +# Python deps +, singledispatch +, logutils +, webtest +, Mako +, genshi +, Kajiki +, sqlalchemy +, gunicorn +, jinja2 +, virtualenv +}: + +buildPythonPackage rec { + name = "${pname}-${version}"; + pname = "pecan"; + version = "1.2.1"; + + patches = [ + ./python36_test_fix.patch + ]; + + src = fetchPypi { + inherit pname version; + sha256 = "0ikc32rd2hr8j2jxc0mllvdjvxydx3fwfp3z8sdxmkzdkixlb5cd"; + }; + + propagatedBuildInputs = [ singledispatch logutils ]; + buildInputs = [ + webtest Mako genshi Kajiki sqlalchemy gunicorn jinja2 virtualenv + ]; + + meta = with stdenv.lib; { + description = "Pecan"; + homepage = "http://github.com/pecan/pecan"; + }; +} diff --git a/pkgs/development/python-modules/pecan/python36_test_fix.patch b/pkgs/development/python-modules/pecan/python36_test_fix.patch new file mode 100644 index 000000000000..65e0733ab06e --- /dev/null +++ b/pkgs/development/python-modules/pecan/python36_test_fix.patch @@ -0,0 +1,13 @@ +diff --git a/pecan/tests/test_conf.py b/pecan/tests/test_conf.py +index 0573d84..7c98e16 100644 +--- a/pecan/tests/test_conf.py ++++ b/pecan/tests/test_conf.py +@@ -157,7 +157,7 @@ class TestConf(PecanTestCase): + + try: + configuration.conf_from_file(f.name) +- except (ValueError, SystemError) as e: ++ except (ValueError, SystemError, ImportError) as e: + assert 'relative import' in str(e) + else: + raise AssertionError( diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 05125aa778ae..4f933b4364d2 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -15332,27 +15332,7 @@ in { ''; }; - pecan = buildPythonPackage rec { - name = "pecan-${version}"; - version = "1.0.3"; - - src = pkgs.fetchurl { - url = "mirror://pypi/p/pecan/${name}.tar.gz"; - sha256 = "04abmybab8jzbwgmrr0fcpcfhcvvkdsv9q135dss02wyk9q9jv4d"; - }; - - propagatedBuildInputs = with self; [ - singledispatch logutils - ]; - buildInputs = with self; [ - webtest Mako genshi Kajiki sqlalchemy gunicorn jinja2 virtualenv - ]; - - meta = with stdenv.lib; { - description = "Pecan"; - homepage = "http://github.com/pecan/pecan"; - }; - }; + pecan = callPackage ../development/python-modules/pecan { }; kaitaistruct = buildPythonPackage rec { name = "kaitaistruct-${version}";