1{ lib
2, buildPythonPackage
3, fetchPypi
4, python
5, isPy3k
6, pythonOlder
7}:
8
9buildPythonPackage rec {
10 pname = "zipfile36";
11 version = "0.1.3";
12 name = "${pname}-${version}";
13
14 src = fetchPypi {
15 inherit pname version;
16 sha256 = "a78a8dddf4fa114f7fe73df76ffcce7538e23433b7a6a96c1c904023f122aead";
17 };
18
19 checkPhase = ''
20 ${python.interpreter} -m unittest test_zipfile.py
21 '';
22
23 # Only works with Python 3.x.
24 # Not supposed to be used with 3.6 and up.
25 disabled = !(isPy3k && (pythonOlder "3.6"));
26
27 meta = {
28 description = "Read and write ZIP files - backport of the zipfile module from Python 3.6";
29 homepage = https://gitlab.com/takluyver/zipfile36;
30 license = lib.licenses.psfl;
31 maintainer = lib.maintainers.fridh;
32 };
33}