From 0513a0054dc5e0953cc5123ef1ac11707b059aaf Mon Sep 17 00:00:00 2001 From: Chris Ostrouchov Date: Fri, 10 Aug 2018 16:40:45 -0400 Subject: [PATCH] pythonPackages.pathlib: init at 1.0.1 - python 2.7, 3+ - all tests pass - package is depricated but is required by a package --- .../python-modules/pathlib/default.nix | 28 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 23 ++------------- 2 files changed, 30 insertions(+), 21 deletions(-) create mode 100644 pkgs/development/python-modules/pathlib/default.nix diff --git a/pkgs/development/python-modules/pathlib/default.nix b/pkgs/development/python-modules/pathlib/default.nix new file mode 100644 index 000000000000..d70178dac857 --- /dev/null +++ b/pkgs/development/python-modules/pathlib/default.nix @@ -0,0 +1,28 @@ +{ lib +, buildPythonPackage +, fetchPypi +, python +, pythonAtLeast +}: + +buildPythonPackage rec { + pname = "pathlib"; + version = "1.0.1"; + disabled = pythonAtLeast "3.4"; # Was added to std library in Python 3.4 + + src = fetchPypi { + inherit pname version; + sha256 = "17zajiw4mjbkkv6ahp3xf025qglkj0805m9s41c45zryzj6p2h39"; + }; + + checkPhase = '' + ${python.interpreter} -m unittest discover + ''; + + meta = { + description = "Object-oriented filesystem paths"; + homepage = https://pathlib.readthedocs.org/; + license = lib.licenses.mit; + maintainers = with lib.maintainers; [ costrouc ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 8e9ff72c752d..c8b4a8ace418 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -344,6 +344,8 @@ in { palettable = callPackage ../development/python-modules/palettable { }; + pathlib = callPackage ../development/python-modules/pathlib { }; + pdf2image = callPackage ../development/python-modules/pdf2image { }; pdfminer = callPackage ../development/python-modules/pdfminer_six { }; @@ -9458,27 +9460,6 @@ in { patator = callPackage ../development/python-modules/patator { }; - pathlib = buildPythonPackage rec { - name = "pathlib-${version}"; - version = "1.0.1"; - disabled = pythonAtLeast "3.4"; # Was added to std library in Python 3.4 - - src = pkgs.fetchurl { - url = "mirror://pypi/p/pathlib/${name}.tar.gz"; - sha256 = "17zajiw4mjbkkv6ahp3xf025qglkj0805m9s41c45zryzj6p2h39"; - }; - - checkPhase = '' - ${python.interpreter} -m unittest discover - ''; - - meta = { - description = "Object-oriented filesystem paths"; - homepage = "https://pathlib.readthedocs.org/"; - license = licenses.mit; - }; - }; - pathlib2 = callPackage ../development/python-modules/pathlib2 { }; pathpy = callPackage ../development/python-modules/path.py { };