This treewide change targets Python packages that specifies pytest flags with pytestFlagsArray, and whose flags cannot be consructed by other pytestCheckHook-honoured arguments. Use the __structuredAttrs-agnostic argument pytestFlags instead of the deprecated pytestFlagsArray. For flags with option arguments, join each flag and their option argument into a single command-line argument following POSIX Utility Argument Syntax[1] for easier overriding (remove/replace). Examples: * [ "-W" "ignore:message:WarningClass" ] -> [ "-Wignore:message:WarningClass" ] * [ "--reruns" "3" ] -> [ "--reruns=3" ] [1]: https://pubs.opengroup.org/onlinepubs/009695399/basedefs/xbd_chap12.html
56 lines
1.0 KiB
Nix
56 lines
1.0 KiB
Nix
{
|
|
lib,
|
|
stdenv,
|
|
buildPythonPackage,
|
|
docutils,
|
|
fetchPypi,
|
|
manuel,
|
|
pygments,
|
|
pytestCheckHook,
|
|
setuptools,
|
|
zope-testrunner,
|
|
}:
|
|
|
|
buildPythonPackage rec {
|
|
pname = "zconfig";
|
|
version = "4.2";
|
|
pyproject = true;
|
|
|
|
src = fetchPypi {
|
|
inherit pname version;
|
|
hash = "sha256-oOS1J3xM7oBgzjNaV4rEWPgsJArpaxZlkgDbxNmL/M4=";
|
|
};
|
|
|
|
patches = lib.optional stdenv.hostPlatform.isMusl ./remove-setlocale-test.patch;
|
|
|
|
postPatch = ''
|
|
substituteInPlace pyproject.toml --replace-fail 'setuptools <= 75.6.0' 'setuptools'
|
|
'';
|
|
|
|
build-system = [ setuptools ];
|
|
|
|
buildInputs = [
|
|
docutils
|
|
manuel
|
|
];
|
|
|
|
dependencies = [ zope-testrunner ];
|
|
|
|
nativeCheckInputs = [
|
|
pygments
|
|
pytestCheckHook
|
|
];
|
|
|
|
pythonImportsCheck = [ "ZConfig" ];
|
|
|
|
pytestFlags = [ "-s" ];
|
|
|
|
meta = {
|
|
description = "Structured Configuration Library";
|
|
homepage = "https://github.com/zopefoundation/ZConfig";
|
|
changelog = "https://github.com/zopefoundation/ZConfig/blob/${version}/CHANGES.rst";
|
|
license = lib.licenses.zpl21;
|
|
maintainers = [ ];
|
|
};
|
|
}
|