mirror of
https://github.com/NixOS/nixpkgs.git
synced 2026-07-21 08:01:31 +00:00
python3Packages.httpsig: Fix build with setuptools 82 (#540800)
This commit is contained in:
@@ -20,6 +20,11 @@ buildPythonPackage rec {
|
||||
hash = "sha256-cdbVAkYSnE98/sIPXlfjUdK4SS1jHMKqlnkUrPkfbOY=";
|
||||
};
|
||||
|
||||
patches = [
|
||||
# pkg_resources is gone in setuptools 82
|
||||
./no-pkg-resources.patch
|
||||
];
|
||||
|
||||
build-system = [
|
||||
setuptools
|
||||
setuptools-scm
|
||||
@@ -29,7 +34,6 @@ buildPythonPackage rec {
|
||||
pycryptodome
|
||||
requests
|
||||
six
|
||||
setuptools
|
||||
];
|
||||
|
||||
nativeCheckInputs = [ pytestCheckHook ];
|
||||
|
||||
@@ -0,0 +1,17 @@
|
||||
--- a/httpsig/__init__.py
|
||||
+++ b/httpsig/__init__.py
|
||||
@@ -1,11 +1,11 @@
|
||||
-from pkg_resources import get_distribution, DistributionNotFound
|
||||
+from importlib.metadata import PackageNotFoundError, version
|
||||
|
||||
from .sign import Signer, HeaderSigner
|
||||
from .verify import Verifier, HeaderVerifier
|
||||
|
||||
try:
|
||||
- __version__ = get_distribution(__name__).version
|
||||
-except DistributionNotFound:
|
||||
+ __version__ = version(__name__)
|
||||
+except PackageNotFoundError:
|
||||
# package is not installed
|
||||
pass
|
||||
|
||||
Reference in New Issue
Block a user