gcovr: 8.3 -> 8.4, build from source, enable tests; yaxmldiff: init at 0.2.0 (#451042)
This commit is contained in:
@@ -1,27 +1,36 @@
|
||||
{
|
||||
stdenv,
|
||||
lib,
|
||||
python3Packages,
|
||||
fetchPypi,
|
||||
fetchFromGitHub,
|
||||
writableTmpDirAsHomeHook,
|
||||
gitMinimal,
|
||||
}:
|
||||
|
||||
python3Packages.buildPythonPackage rec {
|
||||
pname = "gcovr";
|
||||
version = "8.3";
|
||||
version = "8.4";
|
||||
pyproject = true;
|
||||
|
||||
disabled = python3Packages.pythonOlder "3.9";
|
||||
|
||||
src = fetchPypi {
|
||||
inherit pname version;
|
||||
hash = "sha256-+qNx+cSn94yYANplUQfU+Z8EtxjRwNn0jK/cvvAEkHk=";
|
||||
src = fetchFromGitHub {
|
||||
owner = "gcovr";
|
||||
repo = "gcovr";
|
||||
tag = version;
|
||||
hash = "sha256-v3jNODYD9qa3mwttfuldhhIHrfR5LcsZ+WNWiOWb35E=";
|
||||
};
|
||||
|
||||
build-system = [ python3Packages.hatchling ];
|
||||
build-system = with python3Packages; [
|
||||
hatchling
|
||||
hatch-fancy-pypi-readme
|
||||
hatch-vcs
|
||||
];
|
||||
|
||||
# pythonRelaxDeps do not work on pyproject.toml
|
||||
preBuild = ''
|
||||
substituteInPlace pyproject.toml \
|
||||
--replace-fail "hatchling==1.26.1" "hatchling"
|
||||
--replace-fail "hatchling==1.26.3" "hatchling"
|
||||
substituteInPlace pyproject.toml \
|
||||
--replace-fail "hatch-fancy-pypi-readme==24.1.0" "hatch-fancy-pypi-readme>=24.1.0"
|
||||
substituteInPlace pyproject.toml \
|
||||
@@ -36,23 +45,40 @@ python3Packages.buildPythonPackage rec {
|
||||
jinja2
|
||||
lxml
|
||||
pygments
|
||||
hatch-fancy-pypi-readme
|
||||
hatch-vcs
|
||||
]
|
||||
++ lib.optionals (pythonOlder "3.11") [ tomli ]
|
||||
);
|
||||
|
||||
# There are no unit tests in the pypi tarball. Most of the unit tests on the
|
||||
# github repository currently only work with gcc5, so we just disable them.
|
||||
# See also: https://github.com/gcovr/gcovr/issues/206
|
||||
# Despite the CI passing many GCC version, ~300 tests are failing on nixos
|
||||
doCheck = false;
|
||||
|
||||
pythonImportsCheck = [
|
||||
"gcovr"
|
||||
"gcovr.configuration"
|
||||
];
|
||||
|
||||
preCheck = ''
|
||||
rm -rf src # this causes some pycache issues
|
||||
rm -rf admin/bump_version.py
|
||||
export CC_REFERENCE="gcc-${lib.versions.major stdenv.cc.version}"
|
||||
'';
|
||||
|
||||
nativeCheckInputs = with python3Packages; [
|
||||
writableTmpDirAsHomeHook
|
||||
pytestCheckHook
|
||||
pytest-timeout
|
||||
yaxmldiff
|
||||
nox
|
||||
requests
|
||||
gitMinimal
|
||||
];
|
||||
|
||||
disabledTests = [
|
||||
# too fragile
|
||||
"test_build"
|
||||
"test_example"
|
||||
# assert 40 == 30 on log levels
|
||||
"test_multiple_output_formats_to_stdout"
|
||||
"test_multiple_output_formats_to_stdout_1"
|
||||
];
|
||||
|
||||
meta = {
|
||||
description = "Python script for summarizing gcov data";
|
||||
homepage = "https://www.gcovr.com/";
|
||||
|
||||
@@ -0,0 +1,41 @@
|
||||
{
|
||||
lib,
|
||||
buildPythonPackage,
|
||||
fetchFromGitHub,
|
||||
# build-system
|
||||
hatchling,
|
||||
hatch-fancy-pypi-readme,
|
||||
# dependencies
|
||||
lxml,
|
||||
pytestCheckHook,
|
||||
}:
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "yaxmldiff";
|
||||
version = "0.2.0";
|
||||
pyproject = true;
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "latk";
|
||||
repo = "yaxmldiff.py";
|
||||
tag = "v${version}";
|
||||
hash = "sha256-AOXnK1d+b/ae50ofBfgxiDS6Dj6TIeHMrE9ME95Yj1Q=";
|
||||
};
|
||||
|
||||
build-system = [
|
||||
hatchling
|
||||
hatch-fancy-pypi-readme
|
||||
];
|
||||
|
||||
dependencies = [ lxml ];
|
||||
|
||||
nativeCheckInputs = [ pytestCheckHook ];
|
||||
|
||||
meta = {
|
||||
description = "Yet Another XML Differ";
|
||||
homepage = "https://github.com/latk/yaxmldiff.py";
|
||||
changelog = "https://https://github.com/latk/yaxmldiff.py/blob/v${src.tag}/CHANGELOG.md";
|
||||
license = lib.licenses.asl20;
|
||||
maintainers = with lib.maintainers; [ sigmanificient ];
|
||||
};
|
||||
}
|
||||
@@ -20456,6 +20456,8 @@ self: super: with self; {
|
||||
|
||||
yattag = callPackage ../development/python-modules/yattag { };
|
||||
|
||||
yaxmldiff = callPackage ../development/python-modules/yaxmldiff { };
|
||||
|
||||
ydata-profiling = callPackage ../development/python-modules/ydata-profiling { };
|
||||
|
||||
ydiff = callPackage ../development/python-modules/ydiff { };
|
||||
|
||||
Reference in New Issue
Block a user