Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
peterhoeg committed Sep 28, 2017
1 parent 9824ca6 commit dac35a3
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 19 deletions.
33 changes: 16 additions & 17 deletions pkgs/development/python-modules/pywbem/default.nix
@@ -1,50 +1,49 @@
{ stdenv, buildPythonPackage, fetchFromGitHub, fetchpatch, libxml2
{ stdenv, buildPythonPackage, fetchFromGitHub, fetchpatch, libxml2, which
, m2crypto, ply, pyyaml, six
, httpretty, lxml, mock, pytest, requests
, httpretty, lxml, mock, pytest, pytestcov, requests
}:

buildPythonPackage rec {
name = "pywbem-${version}";
version = "0.10.0";
version = "0.11.0";

src = fetchFromGitHub {
owner = "pywbem";
repo = "pywbem";
rev = "v${version}";
sha256 = "0jcwklip03xcni0dvsk9va8ilqz21g4fxwqd5kzvv91slaadfcym";
sha256 = "01lwgzmq04rska03qmfhmzbwx3gl1v8nsky3iwfzr3xr5zm1hvd7";
};

patches = [
# fix timezone handling so the tests pass again. Can go when 0.10.1 is released
# https://github.com/pywbem/pywbem/issues/755#issuecomment-327508681
./make_cimdatetime_timezone_aware.patch
];
buildInputs = [ libxml2 ];

nativeBuildInputs = [ which ];

propagatedBuildInputs = [ m2crypto ply pyyaml six ];

checkInputs = [ httpretty lxml mock pytest requests ];
checkInputs = [ httpretty lxml mock pytestcov pytest requests ];

# 1 test fails because it doesn't like running in our sandbox. Deleting the
# whole file is admittedly a little heavy-handed but at least the vast
# majority of tests are run.
checkPhase = ''
rm testsuite/testclient/networkerror.yaml
# rm testsuite/testclient/networkerror.yaml
substituteInPlace makefile \
--replace "PYTHONPATH=." "" \
--replace '--cov $(package_name) --cov-config coveragerc' ""
# substituteInPlace makefile \
# --replace "PYTHONPATH=." "" \
# --replace '--cov $(package_name) --cov-config coveragerc' ""
for f in testsuite/test_cim_xml.py testsuite/validate.py ; do
substituteInPlace $f --replace "'xmllint" "'${stdenv.lib.getBin libxml2}/bin/xmllint"
done
make PATH=$PATH:${stdenv.lib.getBin libxml2}/bin test
# make PATH=$PATH:${stdenv.lib.getBin libxml2}/bin test
make test
'';

meta = with stdenv.lib; {
description = "Support for the WBEM standard for systems management.";
homepage = http://pywbem.github.io/pywbem/;
license = licenses.gpl2;
homepage = http://pywbem.github.io/pywbem/;
license = licenses.gpl2;
maintainers = with maintainers; [ peterhoeg ];
};
}
4 changes: 2 additions & 2 deletions pkgs/top-level/python-packages.nix
Expand Up @@ -16891,7 +16891,7 @@ in {
};

disabled = !isPy3k;

# No tests in archive
doCheck = false;

Expand Down Expand Up @@ -26618,7 +26618,7 @@ EOF
ROPGadget = callPackage ../development/python-modules/ROPGadget { };

# We need "normal" libxml2 and not the python package by the same name.
pywbem = if !(isPy36)
pywbem = if true # !(isPy36)
then callPackage ../development/python-modules/pywbem { libxml2 = pkgs.libxml2; }
else throw "pywbem not supported for interpreter ${python.executable}";

Expand Down

0 comments on commit dac35a3

Please sign in to comment.