From a95243647b3a42455605376722f1f742ec707a8a Mon Sep 17 00:00:00 2001 From: Chris Ostrouchov Date: Sun, 28 Oct 2018 12:41:46 -0400 Subject: [PATCH] pythonPackages.traceback2: refactor move to python-modules --- .../python-modules/traceback2/default.nix | 28 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 19 +------------ 2 files changed, 29 insertions(+), 18 deletions(-) create mode 100644 pkgs/development/python-modules/traceback2/default.nix diff --git a/pkgs/development/python-modules/traceback2/default.nix b/pkgs/development/python-modules/traceback2/default.nix new file mode 100644 index 000000000000..fe15285f0653 --- /dev/null +++ b/pkgs/development/python-modules/traceback2/default.nix @@ -0,0 +1,28 @@ +{ stdenv +, buildPythonPackage +, fetchPypi +, pbr +, linecache2 +}: + +buildPythonPackage rec { + version = "1.4.0"; + pname = "traceback2"; + + src = fetchPypi { + inherit pname version; + sha256 = "0c1h3jas1jp1fdbn9z2mrgn3jj0hw1x3yhnkxp7jw34q15xcdb05"; + }; + + propagatedBuildInputs = [ pbr linecache2 ]; + + # circular dependencies for tests + doCheck = false; + + meta = with stdenv.lib; { + description = "A backport of traceback to older supported Pythons"; + homepage = https://pypi.python.org/pypi/traceback2/; + license = licenses.psfl; + }; + +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 5b4a41c059ea..5cafa6ed0c09 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -4053,24 +4053,7 @@ in { uritools = callPackage ../development/python-modules/uritools { }; - traceback2 = buildPythonPackage rec { - version = "1.4.0"; - name = "traceback2-${version}"; - - src = pkgs.fetchurl { - url = "mirror://pypi/t/traceback2/traceback2-${version}.tar.gz"; - sha256 = "0c1h3jas1jp1fdbn9z2mrgn3jj0hw1x3yhnkxp7jw34q15xcdb05"; - }; - - propagatedBuildInputs = with self; [ pbr linecache2 ]; - # circular dependencies for tests - doCheck = false; - - meta = { - description = "A backport of traceback to older supported Pythons"; - homepage = https://pypi.python.org/pypi/traceback2/; - }; - }; + traceback2 = callPackage ../development/python-modules/traceback2 { }; linecache2 = buildPythonPackage rec { name = "linecache2-${version}";