1{
2 lib,
3 buildPythonPackage,
4 pythonOlder,
5 fetchPypi,
6 setuptools-scm,
7 pyelftools,
8 packaging,
9 pretend,
10 pytestCheckHook,
11 # non-python dependencies
12 bzip2,
13 gnutar,
14 patchelf,
15 unzip,
16}:
17
18buildPythonPackage rec {
19 pname = "auditwheel";
20 version = "6.4.2";
21 pyproject = true;
22
23 disabled = pythonOlder "3.9";
24
25 src = fetchPypi {
26 inherit pname version;
27 hash = "sha256-t6Ya/JGDtrXGYd5ZylhvnHIARFpAnFjN8gSdb3FjbVE=";
28 };
29
30 build-system = [ setuptools-scm ];
31
32 dependencies = [
33 packaging
34 pyelftools
35 ];
36
37 nativeCheckInputs = [
38 pretend
39 pytestCheckHook
40 ];
41
42 # Integration tests require docker and networking
43 disabledTestPaths = [ "tests/integration" ];
44
45 # Ensure that there are no undeclared deps
46 postCheck = ''
47 PATH= PYTHONPATH= $out/bin/auditwheel --version > /dev/null
48 '';
49
50 makeWrapperArgs = [
51 "--prefix"
52 "PATH"
53 ":"
54 (lib.makeBinPath [
55 bzip2
56 gnutar
57 patchelf
58 unzip
59 ])
60 ];
61
62 meta = with lib; {
63 changelog = "https://github.com/pypa/auditwheel/blob/${version}/CHANGELOG.md";
64 description = "Auditing and relabeling cross-distribution Linux wheels";
65 homepage = "https://github.com/pypa/auditwheel";
66 license = with licenses; [
67 mit # auditwheel and nibabel
68 bsd2 # from https://github.com/matthew-brett/delocate
69 bsd3 # from https://sources.gentoo.org/cgi-bin/viewvc.cgi/gentoo-projects/pax-utils/lddtree.py
70 ];
71 mainProgram = "auditwheel";
72 maintainers = with maintainers; [ davhau ];
73 platforms = platforms.linux;
74 };
75}