diff options
-rw-r--r-- | pkgs/development/python-modules/path.py/2.nix | 42 | ||||
-rw-r--r-- | pkgs/development/python-modules/path.py/default.nix | 13 | ||||
-rw-r--r-- | pkgs/top-level/python-packages.nix | 5 |
3 files changed, 57 insertions, 3 deletions
diff --git a/pkgs/development/python-modules/path.py/2.nix b/pkgs/development/python-modules/path.py/2.nix new file mode 100644 index 0000000000000..318642a393a3f --- /dev/null +++ b/pkgs/development/python-modules/path.py/2.nix @@ -0,0 +1,42 @@ +{ lib +, buildPythonPackage +, fetchPypi +, setuptools_scm +, pytest +, pytest-flake8 +, glibcLocales +, packaging +, isPy27 +, backports_os +, importlib-metadata +}: + +buildPythonPackage rec { + pname = "path.py"; + version = "11.5.2"; + + src = fetchPypi { + inherit pname version; + sha256 = "de7cd643affbc23e56533a6e8d551ecdee4983501a08c24e4e71565202d8cdaa"; + }; + + checkInputs = [ pytest pytest-flake8 glibcLocales packaging ]; + buildInputs = [ setuptools_scm ]; + propagatedBuildInputs = [ + importlib-metadata + ] ++ lib.optional isPy27 backports_os + ; + + LC_ALL = "en_US.UTF-8"; + + meta = { + description = "A module wrapper for os.path"; + homepage = https://github.com/jaraco/path.py; + license = lib.licenses.mit; + }; + + checkPhase = '' + # ignore performance test which may fail when the system is under load + py.test -v -k 'not TestPerformance' + ''; +} diff --git a/pkgs/development/python-modules/path.py/default.nix b/pkgs/development/python-modules/path.py/default.nix index 318642a393a3f..d3c3206fabafd 100644 --- a/pkgs/development/python-modules/path.py/default.nix +++ b/pkgs/development/python-modules/path.py/default.nix @@ -9,15 +9,16 @@ , isPy27 , backports_os , importlib-metadata +, fetchpatch }: buildPythonPackage rec { pname = "path.py"; - version = "11.5.2"; + version = "12.0.1"; src = fetchPypi { inherit pname version; - sha256 = "de7cd643affbc23e56533a6e8d551ecdee4983501a08c24e4e71565202d8cdaa"; + sha256 = "9f2169633403aa0423f6ec000e8701dd1819526c62465f5043952f92527fea0f"; }; checkInputs = [ pytest pytest-flake8 glibcLocales packaging ]; @@ -39,4 +40,12 @@ buildPythonPackage rec { # ignore performance test which may fail when the system is under load py.test -v -k 'not TestPerformance' ''; + + patches = [ + (fetchpatch { + url = https://github.com/jaraco/path.py/commit/02eb16f0eb2cdc0015972ce963357aaa1cd0b84b.patch; + sha256 = "0bqa8vjwil7jn35a6984adcm24pvv3pjkhszv10qv6yr442d1mk9"; + }) + ]; + } diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 1ea3d6adfb2ec..2853583e3b25b 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -4086,7 +4086,10 @@ in { pathlib2 = callPackage ../development/python-modules/pathlib2 { }; - pathpy = callPackage ../development/python-modules/path.py { }; + pathpy = if isPy3k then + callPackage ../development/python-modules/path.py { } + else + callPackage ../development/python-modules/path.py/2.nix { }; paypalrestsdk = callPackage ../development/python-modules/paypalrestsdk { }; |