diff options
author | Sandro Jäckel <sandro.jaeckel@gmail.com> | 2021-09-11 12:08:00 +0200 |
---|---|---|
committer | Sandro Jäckel <sandro.jaeckel@gmail.com> | 2021-09-11 19:02:26 +0200 |
commit | bb915c3840b0042c86cbcd0a5d02fb72a19882e5 (patch) | |
tree | 1639302cd02a30b74562d7acc158c397e1d68a5c /pkgs/development/python-modules/debtcollector | |
parent | 7bee25daa244e1ddb9c1918f6afe7f2536bb5b0e (diff) |
python39Packages.debtcollector: init at 2.3.0
Diffstat (limited to 'pkgs/development/python-modules/debtcollector')
-rw-r--r-- | pkgs/development/python-modules/debtcollector/default.nix | 31 | ||||
-rw-r--r-- | pkgs/development/python-modules/debtcollector/tests.nix | 30 |
2 files changed, 61 insertions, 0 deletions
diff --git a/pkgs/development/python-modules/debtcollector/default.nix b/pkgs/development/python-modules/debtcollector/default.nix new file mode 100644 index 0000000000000..75555569e235b --- /dev/null +++ b/pkgs/development/python-modules/debtcollector/default.nix @@ -0,0 +1,31 @@ +{ lib, buildPythonPackage, fetchPypi, pbr, six, wrapt, callPackage }: + +buildPythonPackage rec { + pname = "debtcollector"; + version = "2.3.0"; + + src = fetchPypi { + inherit pname version; + sha256 = "c7a9fac814ab5904e23905516b18356cc907e7d27c05da58d37103f001967846"; + }; + + nativeBuildInputs = [ pbr ]; + + propagatedBuildInputs = [ six wrapt ]; + + # check in passthru.tests.pytest to escape infinite recursion with other oslo components + doCheck = false; + + passthru.tests = { + pytest = callPackage ./tests.nix { }; + }; + + pythonImportsCheck = [ "debtcollector" ]; + + meta = with lib; { + description = "A collection of Python deprecation patterns and strategies that help you collect your technical debt in a non-destructive manner"; + homepage = "https://github.com/openstack/debtcollector"; + license = licenses.asl20; + maintainers = teams.openstack.members; + }; +} diff --git a/pkgs/development/python-modules/debtcollector/tests.nix b/pkgs/development/python-modules/debtcollector/tests.nix new file mode 100644 index 0000000000000..cc3171da6d6ed --- /dev/null +++ b/pkgs/development/python-modules/debtcollector/tests.nix @@ -0,0 +1,30 @@ +{ stdenv +, buildPythonPackage +, debtcollector +, stestr +}: + +buildPythonPackage rec { + pname = "debtcollector-tests"; + inherit (debtcollector) version; + + src = debtcollector.src; + + postPatch = '' + # only a small portion of the listed packages are actually needed for running the tests + # so instead of removing them one by one remove everything + rm test-requirements.txt + ''; + + dontBuild = true; + dontInstall = true; + + checkInputs = [ + debtcollector + stestr + ]; + + checkPhase = '' + stestr run + ''; +} |