nixpkgs/pkgs/development/python-modules/reqif/default.nix
Fabian Affolter 7bb810431b
python310Packages.reqif: add changelog to meta
- disable on unsupported Python releases
2023-06-04 11:12:41 +02:00

60 lines
1.2 KiB
Nix

{ lib
, buildPythonPackage
, python
, fetchFromGitHub
, hatchling
, beautifulsoup4
, lxml
, jinja2
, pytestCheckHook
, pythonOlder
}:
buildPythonPackage rec {
pname = "reqif";
version = "0.0.35";
format = "pyproject";
disabled = pythonOlder "3.7";
src = fetchFromGitHub {
owner = "strictdoc-project";
repo = pname;
rev = "refs/tags/${version}";
hash = "sha256-3yOLOflPqzJRv3qCQXFK3rIFftBq8FkYy7XhOfWH82Y=";
};
postPatch = ''
substituteInPlace ./tests/unit/conftest.py --replace \
"os.path.abspath(os.path.join(__file__, \"../../../../reqif\"))" \
"\"${placeholder "out"}/${python.sitePackages}/reqif\""
substituteInPlace requirements.txt --replace "==" ">="
'';
nativeBuildInputs = [
hatchling
];
propagatedBuildInputs = [
beautifulsoup4
lxml
jinja2
];
pythonImportsCheck = [
"reqif"
];
nativeCheckInputs = [
pytestCheckHook
];
meta = with lib; {
description = "Python library for ReqIF format";
homepage = "https://github.com/strictdoc-project/reqif";
changelog = "https://github.com/strictdoc-project/reqif/releases/tag/${version}";
license = licenses.asl20;
maintainers = with maintainers; [ yuu ];
};
}