python3Packages.subunit: fix build and add tests
This commit is contained in:
parent
fc451835f6
commit
915d58ba7c
@ -1,22 +1,33 @@
|
||||
{ buildPythonPackage
|
||||
, pkgs
|
||||
, testtools
|
||||
# pkgs dependencies
|
||||
, check
|
||||
, cppunit
|
||||
, pkg-config
|
||||
, subunit
|
||||
|
||||
# python dependencies
|
||||
, fixtures
|
||||
, hypothesis
|
||||
, pytest
|
||||
, testscenarios
|
||||
, testtools
|
||||
}:
|
||||
|
||||
buildPythonPackage {
|
||||
name = pkgs.subunit.name;
|
||||
src = pkgs.subunit.src;
|
||||
inherit (subunit) name src meta;
|
||||
|
||||
nativeBuildInputs = [ pkg-config ];
|
||||
buildInputs = [ check cppunit ];
|
||||
propagatedBuildInputs = [ testtools ];
|
||||
checkInputs = [ testscenarios ];
|
||||
nativeBuildInputs = [ pkgs.pkgconfig ];
|
||||
buildInputs = [ pkgs.check pkgs.cppunit ];
|
||||
|
||||
patchPhase = ''
|
||||
sed -i 's/version=VERSION/version="${pkgs.subunit.version}"/' setup.py
|
||||
checkInputs = [ testscenarios hypothesis fixtures pytest ];
|
||||
# ignore tests which call shell code, or call methods which haven't been implemented
|
||||
checkPhase = ''
|
||||
pytest python/subunit \
|
||||
--ignore=python/subunit/tests/test_{output_filter,test_protocol{,2}}.py
|
||||
'';
|
||||
|
||||
meta = pkgs.subunit.meta;
|
||||
|
||||
patchPhase = ''
|
||||
sed -i 's/version=VERSION/version="${subunit.version}"/' setup.py
|
||||
'';
|
||||
}
|
||||
|
@ -6158,7 +6158,9 @@ in {
|
||||
|
||||
subdownloader = callPackage ../development/python-modules/subdownloader { };
|
||||
|
||||
subunit = callPackage ../development/python-modules/subunit { };
|
||||
subunit = callPackage ../development/python-modules/subunit {
|
||||
inherit (pkgs) subunit pkg-config cppunit check;
|
||||
};
|
||||
|
||||
sure = callPackage ../development/python-modules/sure { };
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user