diff options
author | Sandro Jäckel <sandro.jaeckel@gmail.com> | 2021-09-11 12:11:10 +0200 |
---|---|---|
committer | Sandro Jäckel <sandro.jaeckel@gmail.com> | 2021-09-11 19:02:28 +0200 |
commit | 13bf19d49b40dd76793475b80853c65c0f8f0d84 (patch) | |
tree | 6d2dc9ef44b7b02ec1a0479244d5f02c83ae1e16 /pkgs/development/python-modules/oslo-concurrency | |
parent | 98a7fd7d452521f33a1c3ac48ab4c5b03c5d63cc (diff) |
python39Packages.oslo-concurrency: init at 4.4.1
Diffstat (limited to 'pkgs/development/python-modules/oslo-concurrency')
-rw-r--r-- | pkgs/development/python-modules/oslo-concurrency/default.nix | 70 |
1 files changed, 70 insertions, 0 deletions
diff --git a/pkgs/development/python-modules/oslo-concurrency/default.nix b/pkgs/development/python-modules/oslo-concurrency/default.nix new file mode 100644 index 0000000000000..d3d90bfb22353 --- /dev/null +++ b/pkgs/development/python-modules/oslo-concurrency/default.nix @@ -0,0 +1,70 @@ +{ lib +, buildPythonPackage +, fetchPypi +, bash +, coreutils +, eventlet +, fasteners +, fixtures +, iana-etc +, libredirect +, oslo-config +, oslo-utils +, oslotest +, pbr +, stestr +}: + +buildPythonPackage rec { + pname = "oslo-concurrency"; + version = "4.4.1"; + + src = fetchPypi { + pname = "oslo.concurrency"; + inherit version; + sha256 = "6449cfbd15dbab20cf9907bbb2f057e0e5267f97161223d2b516cc8226b17ec3"; + }; + + 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 + + substituteInPlace oslo_concurrency/tests/unit/test_processutils.py \ + --replace "/bin/bash" "${bash}/bin/bash" \ + --replace "/bin/true" "${coreutils}/bin/true" \ + --replace "/usr/bin/env" "${coreutils}/bin/env" \ + --replace "/usr/bin/true" "${coreutils}/bin/true" + ''; + + propagatedBuildInputs = [ + fasteners + oslo-config + oslo-utils + pbr + ]; + + checkInputs = [ + eventlet + fixtures + oslotest + stestr + ]; + + checkPhase = '' + echo "nameserver 127.0.0.1" > resolv.conf + export NIX_REDIRECTS=/etc/protocols=${iana-etc}/etc/protocols:/etc/resolv.conf=$(realpath resolv.conf) + export LD_PRELOAD=${libredirect}/lib/libredirect.so + + stestr run + ''; + + pythonImportsCheck = [ "oslo_concurrency" ]; + + meta = with lib; { + description = "Oslo Concurrency library"; + homepage = "https://github.com/openstack/oslo.concurrency"; + license = licenses.asl20; + maintainers = teams.openstack.members; + }; +} |