python3Packages.zipfile2: init at 0.0.12
This commit is contained in:
parent
a83a3597cd
commit
82a7b2717f
27
pkgs/development/python-modules/zipfile2/default.nix
Normal file
27
pkgs/development/python-modules/zipfile2/default.nix
Normal file
|
@ -0,0 +1,27 @@
|
||||||
|
{ buildPythonPackage
|
||||||
|
, fetchFromGitHub
|
||||||
|
, lib
|
||||||
|
}:
|
||||||
|
|
||||||
|
buildPythonPackage rec {
|
||||||
|
pname = "zipfile2";
|
||||||
|
version = "0.0.12";
|
||||||
|
|
||||||
|
src = fetchFromGitHub {
|
||||||
|
owner = "cournape";
|
||||||
|
repo = pname;
|
||||||
|
rev = "v${version}";
|
||||||
|
hash = "sha256-BwcEgW4XrQqz0Jmtbyxf8q0mWTJXv2dL3Tk7N/IYuMI=";
|
||||||
|
};
|
||||||
|
|
||||||
|
patches = [ ./no-setuid.patch ];
|
||||||
|
|
||||||
|
pythonImportsCheck = [ "zipfile2" ];
|
||||||
|
|
||||||
|
meta = with lib; {
|
||||||
|
homepage = "https://github.com/cournape/zipfile2";
|
||||||
|
description = "A backwards-compatible improved zipfile class";
|
||||||
|
maintainers = with maintainers; [ genericnerdyusername ];
|
||||||
|
license = licenses.psfl;
|
||||||
|
};
|
||||||
|
}
|
15
pkgs/development/python-modules/zipfile2/no-setuid.patch
Normal file
15
pkgs/development/python-modules/zipfile2/no-setuid.patch
Normal file
|
@ -0,0 +1,15 @@
|
||||||
|
diff --git a/zipfile2/tests/test__zipfile.py b/zipfile2/tests/test__zipfile.py
|
||||||
|
index 60f2ed2..db6e5bc 100644
|
||||||
|
--- a/zipfile2/tests/test__zipfile.py
|
||||||
|
+++ b/zipfile2/tests/test__zipfile.py
|
||||||
|
@@ -585,8 +585,8 @@ class TestsPermissionExtraction(unittest.TestCase):
|
||||||
|
if index & 1 << order:
|
||||||
|
mode |= permissions[permgroup][order]
|
||||||
|
for order in range(3):
|
||||||
|
- if specialindex & 1 << order:
|
||||||
|
- mode |= permissions['special'][order]
|
||||||
|
+ if specialindex & 1 << order and order == 0:
|
||||||
|
+ raise unittest.SkipTest("The nix build process doesn't allow you to use the setuid bit")
|
||||||
|
os.chmod(path, mode)
|
||||||
|
real_permission = os.stat(path).st_mode & 0xFFF
|
||||||
|
self.files.append((path, real_permission))
|
|
@ -13244,6 +13244,8 @@ self: super: with self; {
|
||||||
|
|
||||||
zimports = callPackage ../development/python-modules/zimports { };
|
zimports = callPackage ../development/python-modules/zimports { };
|
||||||
|
|
||||||
|
zipfile2 = callPackage ../development/python-modules/zipfile2 { };
|
||||||
|
|
||||||
zipp = callPackage ../development/python-modules/zipp { };
|
zipp = callPackage ../development/python-modules/zipp { };
|
||||||
|
|
||||||
zipstream = callPackage ../development/python-modules/zipstream { };
|
zipstream = callPackage ../development/python-modules/zipstream { };
|
||||||
|
|
Loading…
Reference in a new issue