mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-02-24 13:05:08 +00:00
pip-tools: fix build (#184326)
This commit is contained in:
parent
dda7a78c73
commit
fa886e4416
@ -1,6 +1,7 @@
|
|||||||
{ lib
|
{ lib
|
||||||
, stdenv
|
, stdenv
|
||||||
, buildPythonPackage
|
, buildPythonPackage
|
||||||
|
, build
|
||||||
, click
|
, click
|
||||||
, fetchPypi
|
, fetchPypi
|
||||||
, pep517
|
, pep517
|
||||||
@ -25,11 +26,14 @@ buildPythonPackage rec {
|
|||||||
hash = "sha256-Oeiu5GVEbgInjYDb69QyXR3YYzJI9DITxzol9Y59ilU=";
|
hash = "sha256-Oeiu5GVEbgInjYDb69QyXR3YYzJI9DITxzol9Y59ilU=";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
patches = [ ./fix-setup-py-bad-syntax-detection.patch ];
|
||||||
|
|
||||||
nativeBuildInputs = [
|
nativeBuildInputs = [
|
||||||
setuptools-scm
|
setuptools-scm
|
||||||
];
|
];
|
||||||
|
|
||||||
propagatedBuildInputs = [
|
propagatedBuildInputs = [
|
||||||
|
build
|
||||||
click
|
click
|
||||||
pep517
|
pep517
|
||||||
pip
|
pip
|
||||||
@ -51,6 +55,7 @@ buildPythonPackage rec {
|
|||||||
# Tests require network access
|
# Tests require network access
|
||||||
"network"
|
"network"
|
||||||
"test_direct_reference_with_extras"
|
"test_direct_reference_with_extras"
|
||||||
|
"test_local_duplicate_subdependency_combined"
|
||||||
];
|
];
|
||||||
|
|
||||||
pythonImportsCheck = [
|
pythonImportsCheck = [
|
||||||
|
@ -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)
|
Loading…
Reference in New Issue
Block a user