at 17.09-beta 1.4 kB view raw
1{ stdenv, buildPythonPackage, fetchFromGitHub, libxml2 2, m2crypto, ply, pyyaml, six 3, httpretty, lxml, mock, pytest, requests 4}: 5 6buildPythonPackage rec { 7 name = "pywbem-${version}"; 8 version = "0.10.0"; 9 10 src = fetchFromGitHub { 11 owner = "pywbem"; 12 repo = "pywbem"; 13 rev = "v${version}"; 14 sha256 = "0jcwklip03xcni0dvsk9va8ilqz21g4fxwqd5kzvv91slaadfcym"; 15 }; 16 17 propagatedBuildInputs = [ m2crypto ply pyyaml six ]; 18 19 checkInputs = [ httpretty lxml mock pytest requests ]; 20 21 # 1 test fails because it doesn't like running in our sandbox. Deleting the 22 # whole file is admittedly a little heavy-handed but at least the vast 23 # majority of tests are run. 24 checkPhase = '' 25 rm testsuite/testclient/networkerror.yaml 26 27 substituteInPlace makefile \ 28 --replace "PYTHONPATH=." "" \ 29 --replace '--cov $(package_name) --cov-config coveragerc' "" 30 31 for f in testsuite/test_cim_xml.py testsuite/validate.py ; do 32 substituteInPlace $f --replace "'xmllint" "'${stdenv.lib.getBin libxml2}/bin/xmllint" 33 done 34 35 make PATH=$PATH:${stdenv.lib.getBin libxml2}/bin test 36 ''; 37 38 meta = with stdenv.lib; { 39 description = "Support for the WBEM standard for systems management."; 40 homepage = http://pywbem.github.io/pywbem/; 41 license = licenses.gpl2; 42 maintainers = with maintainers; [ peterhoeg ]; 43 }; 44}