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
79 lines
1.5 KiB
Nix
79 lines
1.5 KiB
Nix
{
|
|
lib,
|
|
buildPythonPackage,
|
|
fetchFromGitHub,
|
|
docopt,
|
|
pytz,
|
|
requests,
|
|
setuptools,
|
|
vincenty,
|
|
xmltodict,
|
|
pytestCheckHook,
|
|
requests-mock,
|
|
syrupy,
|
|
}:
|
|
|
|
buildPythonPackage rec {
|
|
pname = "buienradar";
|
|
version = "1.0.9";
|
|
pyproject = true;
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "mjj4791";
|
|
repo = "python-buienradar";
|
|
tag = version;
|
|
hash = "sha256-DTdxzBe9fBOH5fHME++oq62xMtBKnjY7BCevwjl8VZ8=";
|
|
};
|
|
|
|
build-system = [ setuptools ];
|
|
|
|
dependencies = [
|
|
docopt
|
|
pytz
|
|
requests
|
|
setuptools
|
|
vincenty
|
|
xmltodict
|
|
];
|
|
|
|
nativeCheckInputs = [
|
|
pytestCheckHook
|
|
requests-mock
|
|
syrupy
|
|
];
|
|
|
|
disabledTests = [
|
|
# require network connection
|
|
"test_rain_data"
|
|
"test_json_data"
|
|
"test_xml_data"
|
|
# tests fail if run on a different day
|
|
"test_id_upper1"
|
|
"test_invalid_data"
|
|
"test_missing_data"
|
|
"test_readdata1_30"
|
|
"test_readdata1_60"
|
|
"test_readdata2_30"
|
|
"test_readdata2_60"
|
|
"test_readdata3"
|
|
];
|
|
|
|
pytestFlags = [
|
|
"--snapshot-warn-unused"
|
|
];
|
|
|
|
pythonImportsCheck = [
|
|
"buienradar.buienradar"
|
|
"buienradar.constants"
|
|
];
|
|
|
|
meta = with lib; {
|
|
changelog = "https://github.com/mjj4791/python-buienradar/blob/${src.tag}/CHANGLOG.rst";
|
|
description = "Library and CLI tools for interacting with buienradar";
|
|
mainProgram = "buienradar";
|
|
homepage = "https://github.com/mjj4791/python-buienradar";
|
|
license = licenses.mit;
|
|
maintainers = with maintainers; [ dotlambda ];
|
|
};
|
|
}
|