mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-25 00:12:56 +00:00
python312Packages.{localstack-ext,localstack}: fix build and refactor (#354962)
This commit is contained in:
commit
76e387b030
@ -2,13 +2,17 @@
|
||||
lib,
|
||||
buildPythonPackage,
|
||||
fetchPypi,
|
||||
setuptools,
|
||||
setuptools-scm,
|
||||
dill,
|
||||
dnslib,
|
||||
dnspython,
|
||||
plux,
|
||||
pyaes,
|
||||
pyotp,
|
||||
python-jose,
|
||||
requests,
|
||||
python-dateutil,
|
||||
tabulate,
|
||||
|
||||
# Sensitive downstream dependencies
|
||||
@ -18,7 +22,7 @@
|
||||
buildPythonPackage rec {
|
||||
pname = "localstack-ext";
|
||||
version = "3.7.2";
|
||||
format = "setuptools";
|
||||
pyproject = true;
|
||||
|
||||
src = fetchPypi {
|
||||
pname = "localstack_ext";
|
||||
@ -26,32 +30,31 @@ buildPythonPackage rec {
|
||||
hash = "sha256-gd+HyZnezgtKrSKJOYtxUZHTPMrrpKWQHGvaIs9FyVs=";
|
||||
};
|
||||
|
||||
postPatch = ''
|
||||
build-system = [
|
||||
setuptools
|
||||
setuptools-scm
|
||||
];
|
||||
|
||||
pythonRemoveDeps = [
|
||||
# Avoid circular dependency
|
||||
sed -i '/localstack>=/d' setup.cfg
|
||||
"localstack"
|
||||
"build"
|
||||
];
|
||||
|
||||
# Pip is unable to resolve attr logic, so it will emit version as 0.0.0
|
||||
substituteInPlace setup.cfg \
|
||||
--replace "version = attr: localstack_ext.__version__" "version = ${version}"
|
||||
cat setup.cfg
|
||||
|
||||
substituteInPlace setup.cfg \
|
||||
--replace "dill==0.3.2" "dill~=0.3.0" \
|
||||
--replace "requests>=2.20.0,<2.26" "requests~=2.20"
|
||||
'';
|
||||
|
||||
propagatedBuildInputs = [
|
||||
dependencies = [
|
||||
dill
|
||||
dnslib
|
||||
dnspython
|
||||
plux
|
||||
pyaes
|
||||
pyotp
|
||||
python-jose
|
||||
requests
|
||||
tabulate
|
||||
];
|
||||
python-dateutil
|
||||
] ++ python-jose.optional-dependencies.cryptography;
|
||||
|
||||
pythonImportsCheck = [ "localstack_ext" ];
|
||||
pythonImportsCheck = [ "localstack" ];
|
||||
|
||||
# No tests in repo
|
||||
doCheck = false;
|
||||
@ -60,10 +63,10 @@ buildPythonPackage rec {
|
||||
inherit localstack;
|
||||
};
|
||||
|
||||
meta = with lib; {
|
||||
meta = {
|
||||
description = "Extensions for LocalStack";
|
||||
homepage = "https://github.com/localstack/localstack";
|
||||
license = licenses.asl20;
|
||||
license = lib.licenses.asl20;
|
||||
maintainers = [ ];
|
||||
};
|
||||
}
|
||||
|
@ -19,6 +19,7 @@
|
||||
rich,
|
||||
semver,
|
||||
setuptools,
|
||||
setuptools-scm,
|
||||
tailer,
|
||||
}:
|
||||
|
||||
@ -34,7 +35,10 @@ buildPythonPackage rec {
|
||||
hash = "sha256-8xdP/qpmfqmXDt1gNhzkAGlBR6dJYznKr9+/Un6N7mA=";
|
||||
};
|
||||
|
||||
build-system = [ setuptools ];
|
||||
build-system = [
|
||||
setuptools
|
||||
setuptools-scm
|
||||
];
|
||||
|
||||
dependencies = [
|
||||
apispec
|
||||
|
Loading…
Reference in New Issue
Block a user