at 18.03-beta 1.6 kB view raw
1{ stdenv, buildPythonPackage, fetchFromGitHub, fetchpatch, libxml2 2, m2crypto, ply, pyyaml, six 3, httpretty, lxml, mock, pytest, requests 4}: 5 6buildPythonPackage rec { 7 pname = "pywbem"; 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 patches = [ 18 # fix timezone handling so the tests pass again. Can go when 0.10.1 is released 19 # https://github.com/pywbem/pywbem/issues/755#issuecomment-327508681 20 ./make_cimdatetime_timezone_aware.patch 21 ]; 22 23 propagatedBuildInputs = [ m2crypto ply pyyaml six ]; 24 25 checkInputs = [ httpretty lxml mock pytest requests ]; 26 27 # 1 test fails because it doesn't like running in our sandbox. Deleting the 28 # whole file is admittedly a little heavy-handed but at least the vast 29 # majority of tests are run. 30 checkPhase = '' 31 rm testsuite/testclient/networkerror.yaml 32 33 substituteInPlace makefile \ 34 --replace "PYTHONPATH=." "" \ 35 --replace '--cov $(package_name) --cov-config coveragerc' "" 36 37 for f in testsuite/test_cim_xml.py testsuite/validate.py ; do 38 substituteInPlace $f --replace "'xmllint" "'${stdenv.lib.getBin libxml2}/bin/xmllint" 39 done 40 41 make PATH=$PATH:${stdenv.lib.getBin libxml2}/bin test 42 ''; 43 44 meta = with stdenv.lib; { 45 description = "Support for the WBEM standard for systems management."; 46 homepage = http://pywbem.github.io/pywbem/; 47 license = licenses.gpl2; 48 maintainers = with maintainers; [ peterhoeg ]; 49 }; 50}