diff options
author | Alyssa Ross <hi@alyssa.is> | 2021-09-13 11:53:06 +0000 |
---|---|---|
committer | Alyssa Ross <hi@alyssa.is> | 2021-09-13 17:18:49 +0000 |
commit | c3e005913d59b8ad64004e60888a71816688af1f (patch) | |
tree | f65b32f0d16acaa40f2ee82ac736d150de4b6cf5 /nixpkgs/pkgs/development/python-modules/os-service-types | |
parent | 1c8034da05499ca3d999f57ba1f6b235e7711ee1 (diff) | |
parent | db88608d8c811a93b74c99cfa1224952afc78200 (diff) | |
download | nixlib-c3e005913d59b8ad64004e60888a71816688af1f.tar nixlib-c3e005913d59b8ad64004e60888a71816688af1f.tar.gz nixlib-c3e005913d59b8ad64004e60888a71816688af1f.tar.bz2 nixlib-c3e005913d59b8ad64004e60888a71816688af1f.tar.lz nixlib-c3e005913d59b8ad64004e60888a71816688af1f.tar.xz nixlib-c3e005913d59b8ad64004e60888a71816688af1f.tar.zst nixlib-c3e005913d59b8ad64004e60888a71816688af1f.zip |
Merge commit 'db88608d8c811a93b74c99cfa1224952afc78200'
Conflicts: nixpkgs/nixos/modules/config/update-users-groups.pl
Diffstat (limited to 'nixpkgs/pkgs/development/python-modules/os-service-types')
-rw-r--r-- | nixpkgs/pkgs/development/python-modules/os-service-types/default.nix | 41 | ||||
-rw-r--r-- | nixpkgs/pkgs/development/python-modules/os-service-types/tests.nix | 38 |
2 files changed, 79 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/development/python-modules/os-service-types/default.nix b/nixpkgs/pkgs/development/python-modules/os-service-types/default.nix new file mode 100644 index 000000000000..990af2ce6b9d --- /dev/null +++ b/nixpkgs/pkgs/development/python-modules/os-service-types/default.nix @@ -0,0 +1,41 @@ +{ lib +, buildPythonPackage +, fetchPypi +, pbr +, six +, callPackage +}: + +buildPythonPackage rec { + pname = "os-service-types"; + version = "1.7.0"; + + src = fetchPypi { + inherit pname version; + sha256 = "31800299a82239363995b91f1ebf9106ac7758542a1e4ef6dc737a5932878c6c"; + }; + + 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 + ''; + + propagatedBuildInputs = [ pbr six ]; + + # check in passthru.tests.pytest to escape infinite recursion with other oslo components + doCheck = false; + + passthru.tests = { + pytest = callPackage ./tests.nix { }; + }; + + pythonImportsCheck = [ "os_service_types" ]; + + meta = with lib; { + description = "Python library for consuming OpenStack sevice-types-authority data"; + homepage = "https://github.com/openstack/os-service-types"; + license = licenses.asl20; + maintainers = teams.openstack.members; + }; +} diff --git a/nixpkgs/pkgs/development/python-modules/os-service-types/tests.nix b/nixpkgs/pkgs/development/python-modules/os-service-types/tests.nix new file mode 100644 index 000000000000..33f641d14c58 --- /dev/null +++ b/nixpkgs/pkgs/development/python-modules/os-service-types/tests.nix @@ -0,0 +1,38 @@ +{ stdenv +, buildPythonPackage +, keystoneauth1 +, os-service-types +, oslotest +, requests-mock +, stestr +, testscenarios +}: + +buildPythonPackage rec { + pname = "os-service-types-tests"; + inherit (os-service-types) version; + + src = os-service-types.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 = [ + os-service-types + keystoneauth1 + oslotest + requests-mock + stestr + testscenarios + ]; + + checkPhase = '' + stestr run + ''; +} |