diff --git a/pkgs/development/python-modules/localstack-ext/default.nix b/pkgs/development/python-modules/localstack-ext/default.nix index 5f1174763f1a..35dcd72230f2 100644 --- a/pkgs/development/python-modules/localstack-ext/default.nix +++ b/pkgs/development/python-modules/localstack-ext/default.nix @@ -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 = [ ]; }; } diff --git a/pkgs/development/python-modules/localstack/default.nix b/pkgs/development/python-modules/localstack/default.nix index a48d8abefa86..08f03e1856f8 100644 --- a/pkgs/development/python-modules/localstack/default.nix +++ b/pkgs/development/python-modules/localstack/default.nix @@ -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