1{ lib, buildPythonPackage, fetchPypi, debtcollector, oslotest, stestr, pbr }: 2 3buildPythonPackage rec { 4 pname = "oslo.context"; 5 version = "5.1.1"; 6 7 src = fetchPypi { 8 inherit pname version; 9 hash = "sha256-Ly55FxBE79GAfFVxPtLH9AaLGNc9AngZFlxIGbKHz68="; 10 }; 11 12 postPatch = '' 13 # only a small portion of the listed packages are actually needed for running the tests 14 # so instead of removing them one by one remove everything 15 rm test-requirements.txt 16 ''; 17 18 propagatedBuildInputs = [ 19 debtcollector 20 pbr 21 ]; 22 23 nativeCheckInputs = [ 24 oslotest 25 stestr 26 ]; 27 28 checkPhase = '' 29 stestr run 30 ''; 31 32 pythonImportsCheck = [ "oslo_context" ]; 33 34 meta = with lib; { 35 description = "Oslo Context library"; 36 homepage = "https://github.com/openstack/oslo.context"; 37 license = licenses.asl20; 38 maintainers = teams.openstack.members; 39 }; 40}