python312Packages.testresources: fix build
- Convert to PEP517 build - Convert to unittestCheckHook - Replace removed aliases in unittest module
This commit is contained in:
parent
631df95dd5
commit
3638ba2105
@ -1,24 +1,42 @@
|
|||||||
{ lib, buildPythonPackage, fetchPypi, python
|
{ lib
|
||||||
, pbr, fixtures, testtools }:
|
, buildPythonPackage
|
||||||
|
, fetchPypi
|
||||||
|
, setuptools
|
||||||
|
, pbr
|
||||||
|
, fixtures
|
||||||
|
, testtools
|
||||||
|
, unittestCheckHook
|
||||||
|
}:
|
||||||
|
|
||||||
buildPythonPackage rec {
|
buildPythonPackage rec {
|
||||||
pname = "testresources";
|
pname = "testresources";
|
||||||
version = "2.0.1";
|
version = "2.0.1";
|
||||||
format = "setuptools";
|
pyproject = true;
|
||||||
|
|
||||||
src = fetchPypi {
|
src = fetchPypi {
|
||||||
inherit pname version;
|
inherit pname version;
|
||||||
sha256 = "ee9d1982154a1e212d4e4bac6b610800bfb558e4fb853572a827bc14a96e4417";
|
sha256 = "ee9d1982154a1e212d4e4bac6b610800bfb558e4fb853572a827bc14a96e4417";
|
||||||
};
|
};
|
||||||
|
|
||||||
propagatedBuildInputs = [ pbr ];
|
postPatch = ''
|
||||||
|
substituteInPlace testresources/tests/test_resourced_test_case.py \
|
||||||
nativeCheckInputs = [ fixtures testtools ];
|
--replace "failIf" "assertFalse"
|
||||||
|
|
||||||
checkPhase = ''
|
|
||||||
${python.interpreter} -m testtools.run discover
|
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
nativeBuildInputs = [
|
||||||
|
setuptools
|
||||||
|
];
|
||||||
|
|
||||||
|
propagatedBuildInputs = [
|
||||||
|
pbr
|
||||||
|
];
|
||||||
|
|
||||||
|
nativeCheckInputs = [
|
||||||
|
fixtures
|
||||||
|
testtools
|
||||||
|
unittestCheckHook
|
||||||
|
];
|
||||||
|
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
description = "Pyunit extension for managing expensive test resources";
|
description = "Pyunit extension for managing expensive test resources";
|
||||||
homepage = "https://launchpad.net/testresources";
|
homepage = "https://launchpad.net/testresources";
|
||||||
|
Loading…
Reference in New Issue
Block a user