1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5 func-timeout,
6 jaraco-itertools,
7 setuptools,
8 setuptools-scm,
9}:
10
11let
12 zipp = buildPythonPackage rec {
13 pname = "zipp";
14 version = "3.23.0";
15 pyproject = true;
16
17 src = fetchFromGitHub {
18 owner = "jaraco";
19 repo = "zipp";
20 tag = "v${version}";
21 hash = "sha256-iao7Aco1Ktvyt1uQCD/le4tAdyVpxfKPi3TRT12YHuU=";
22 };
23
24 postPatch = ''
25 # Downloads license text at build time
26 sed -i "/coherent\.licensed/d" pyproject.toml
27 '';
28
29 build-system = [
30 setuptools
31 setuptools-scm
32 ];
33
34 # Prevent infinite recursion with pytest
35 doCheck = false;
36
37 nativeCheckInputs = [
38 func-timeout
39 jaraco-itertools
40 ];
41
42 pythonImportsCheck = [ "zipp" ];
43
44 passthru.tests = {
45 check = zipp.overridePythonAttrs (_: {
46 doCheck = true;
47 });
48 };
49
50 meta = with lib; {
51 description = "Pathlib-compatible object wrapper for zip files";
52 homepage = "https://github.com/jaraco/zipp";
53 license = licenses.mit;
54 maintainers = [ ];
55 };
56 };
57in
58zipp