diff options
author | SCOTT-HAMILTON <sgn.hamilton+github@protonmail.com> | 2022-08-01 16:42:16 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-08-01 16:42:16 +0200 |
commit | fa886e44164b02576ba5f69bd734402a0a8a6e9a (patch) | |
tree | 8a33079ddd05f3a25fe438c140a6c8d9d1a39982 | |
parent | dda7a78c7348e3e7d4a601c275372eb718352577 (diff) | |
download | nixpkgs-fa886e44164b02576ba5f69bd734402a0a8a6e9a.tar nixpkgs-fa886e44164b02576ba5f69bd734402a0a8a6e9a.tar.gz nixpkgs-fa886e44164b02576ba5f69bd734402a0a8a6e9a.tar.bz2 nixpkgs-fa886e44164b02576ba5f69bd734402a0a8a6e9a.tar.lz nixpkgs-fa886e44164b02576ba5f69bd734402a0a8a6e9a.tar.xz nixpkgs-fa886e44164b02576ba5f69bd734402a0a8a6e9a.tar.zst nixpkgs-fa886e44164b02576ba5f69bd734402a0a8a6e9a.zip |
pip-tools: fix build (#184326)
-rw-r--r-- | pkgs/development/python-modules/pip-tools/default.nix | 5 | ||||
-rw-r--r-- | pkgs/development/python-modules/pip-tools/fix-setup-py-bad-syntax-detection.patch | 21 |
2 files changed, 26 insertions, 0 deletions
diff --git a/pkgs/development/python-modules/pip-tools/default.nix b/pkgs/development/python-modules/pip-tools/default.nix index 93eb848a645..84521397a70 100644 --- a/pkgs/development/python-modules/pip-tools/default.nix +++ b/pkgs/development/python-modules/pip-tools/default.nix @@ -1,6 +1,7 @@ { lib , stdenv , buildPythonPackage +, build , click , fetchPypi , pep517 @@ -25,11 +26,14 @@ buildPythonPackage rec { hash = "sha256-Oeiu5GVEbgInjYDb69QyXR3YYzJI9DITxzol9Y59ilU="; }; + patches = [ ./fix-setup-py-bad-syntax-detection.patch ]; + nativeBuildInputs = [ setuptools-scm ]; propagatedBuildInputs = [ + build click pep517 pip @@ -51,6 +55,7 @@ buildPythonPackage rec { # Tests require network access "network" "test_direct_reference_with_extras" + "test_local_duplicate_subdependency_combined" ]; pythonImportsCheck = [ diff --git a/pkgs/development/python-modules/pip-tools/fix-setup-py-bad-syntax-detection.patch b/pkgs/development/python-modules/pip-tools/fix-setup-py-bad-syntax-detection.patch new file mode 100644 index 00000000000..6a88222139e --- /dev/null +++ b/pkgs/development/python-modules/pip-tools/fix-setup-py-bad-syntax-detection.patch @@ -0,0 +1,21 @@ +diff --color -ru a/piptools/scripts/compile.py b/piptools/scripts/compile.py +--- a/piptools/scripts/compile.py 2022-06-30 11:24:26.000000000 +0200 ++++ b/piptools/scripts/compile.py 2022-08-01 13:40:58.392515765 +0200 +@@ -6,7 +6,7 @@ + from typing import IO, Any, BinaryIO, List, Optional, Tuple, Union, cast + + import click +-from build import BuildBackendException ++from build import BuildException + from build.util import project_wheel_metadata + from click.utils import LazyFile, safecall + from pip._internal.commands import create_command +@@ -421,7 +421,7 @@ + metadata = project_wheel_metadata( + os.path.dirname(os.path.abspath(src_file)) + ) +- except BuildBackendException as e: ++ except (BuildException,StopIteration) as e: + log.error(str(e)) + log.error(f"Failed to parse {os.path.abspath(src_file)}") + sys.exit(2) |