subunit, python310Packages.subunit: 1.4.0 -> 1.4.2

This commit is contained in:
Theodore Ni 2022-11-19 04:30:16 -08:00
parent feb86eb7b8
commit 89987638fa
No known key found for this signature in database
GPG Key ID: 48B67583BDDD4474
2 changed files with 32 additions and 16 deletions

View File

@ -4,11 +4,11 @@
stdenv.mkDerivation rec {
pname = "subunit";
version = "1.4.0";
version = "1.4.2";
src = fetchurl {
url = "https://launchpad.net/subunit/trunk/${version}/+download/${pname}-${version}.tar.gz";
sha256 = "1h7i5ifcx20qkya24j11nbwa829klw7dvnlljdgivgvcx6b20y80";
hash = "sha256-hlOOv6kIC97w7ICVsuXeWrsUbVu3tCSzEVKUHXYG2dI=";
};
nativeBuildInputs = [ pkg-config ];

View File

@ -9,30 +9,46 @@
# python dependencies
, fixtures
, hypothesis
, pytest
, pytestCheckHook
, setuptools
, testscenarios
, testtools
, unittest2
}:
buildPythonPackage {
inherit (subunit) name src meta;
format = "pyproject";
disabled = pythonOlder "3.6";
postPatch = ''
substituteInPlace setup.py \
--replace "version=VERSION" 'version="${subunit.version}"'
'';
nativeBuildInputs = [
pkg-config
setuptools
];
nativeBuildInputs = [ pkg-config ];
buildInputs = [ check cppunit ];
propagatedBuildInputs = [ testtools ];
checkInputs = [ testscenarios hypothesis fixtures pytest unittest2 ];
checkInputs = [
testscenarios
hypothesis
fixtures
pytestCheckHook
];
# requires unittest2, which no longer supported in 3.10
doCheck = pythonOlder "3.10";
# 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
'';
pytestFlagsArray = [
"python/subunit"
];
postPatch = ''
sed -i 's/version=VERSION/version="${subunit.version}"/' setup.py
'';
disabledTestPaths = [
# these tests require testtools and don't work with pytest
"python/subunit/tests/test_output_filter.py"
"python/subunit/tests/test_test_protocol.py"
"python/subunit/tests/test_test_protocol2.py"
];
}