1{ lib
2, stdenv
3, buildPythonPackage
4, build
5, click
6, fetchPypi
7, pep517
8, pip
9, pytest-xdist
10, pytestCheckHook
11, pythonOlder
12, setuptools
13, setuptools-scm
14, tomli
15, tomli-w
16, wheel
17}:
18
19buildPythonPackage rec {
20 pname = "pip-tools";
21 version = "7.3.0";
22 format = "pyproject";
23
24 disabled = pythonOlder "3.8";
25
26 src = fetchPypi {
27 inherit pname version;
28 hash = "sha256-jpyZEn/gJMAltGoLLRXHvUfxjzMibPczDTVJNmP8HR0=";
29 };
30
31 patches = [ ./fix-setup-py-bad-syntax-detection.patch ];
32
33 nativeBuildInputs = [
34 setuptools-scm
35 ];
36
37 propagatedBuildInputs = [
38 build
39 click
40 pep517
41 pip
42 setuptools
43 wheel
44 ] ++ lib.optionals (pythonOlder "3.11") [
45 tomli
46 ];
47
48 __darwinAllowLocalNetworking = true;
49
50 nativeCheckInputs = [
51 pytest-xdist
52 pytestCheckHook
53 tomli-w
54 ];
55
56 preCheck = lib.optionalString (stdenv.isDarwin && stdenv.isAarch64) ''
57 # https://github.com/python/cpython/issues/74570#issuecomment-1093748531
58 export no_proxy='*';
59 '';
60
61 disabledTests = [
62 # Tests require network access
63 "network"
64 "test_direct_reference_with_extras"
65 "test_local_duplicate_subdependency_combined"
66 "test_bad_setup_file"
67 # Assertion error
68 "test_compile_recursive_extras"
69 ];
70
71 pythonImportsCheck = [
72 "piptools"
73 ];
74
75 meta = with lib; {
76 description = "Keeps your pinned dependencies fresh";
77 homepage = "https://github.com/jazzband/pip-tools/";
78 changelog = "https://github.com/jazzband/pip-tools/releases/tag/${version}";
79 license = licenses.bsd3;
80 maintainers = with maintainers; [ zimbatm ];
81 };
82}