nixpkgs/pkgs/development/tools/reno/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

85 lines
2.2 KiB
Nix
Raw Normal View History

{
lib,
fetchPypi,
git,
gnupg1,
python3Packages,
}:
2016-10-25 16:25:08 +00:00
python3Packages.buildPythonApplication rec {
pname = "reno";
version = "4.1.0";
pyproject = true;
2016-10-25 16:25:08 +00:00
# Must be built from python sdist because of versioning quirks
src = fetchPypi {
inherit pname version;
hash = "sha256-+ZLx/b0WIV7J3kevCBMdU6KDDJ54Q561Y86Nan9iU3A=";
2016-10-25 16:25:08 +00:00
};
# remove b/c doesn't list all dependencies, and requires a few packages not in nixpkgs
postPatch = ''
rm test-requirements.txt
'';
build-system = with python3Packages; [
setuptools
];
dependencies = with python3Packages; [
dulwich
pbr
pyyaml
setuptools # required for finding pkg_resources at runtime
];
2016-10-25 16:25:08 +00:00
nativeCheckInputs = with python3Packages; [
# Python packages
docutils
fixtures
sphinx
stestr
testtools
testscenarios
2016-10-25 16:25:08 +00:00
# Required programs to run all tests
git
gnupg1
];
checkPhase = ''
runHook preCheck
export HOME=$TMPDIR
stestr run -e <(echo "
# Expects to be run from a git repository
reno.tests.test_cache.TestCache.test_build_cache_db
reno.tests.test_semver.TestSemVer.test_major_post_release
reno.tests.test_semver.TestSemVer.test_major_working_and_post_release
reno.tests.test_semver.TestSemVer.test_major_working_copy
reno.tests.test_semver.TestSemVer.test_minor_post_release
reno.tests.test_semver.TestSemVer.test_minor_working_and_post_release
reno.tests.test_semver.TestSemVer.test_minor_working_copy
reno.tests.test_semver.TestSemVer.test_patch_post_release
reno.tests.test_semver.TestSemVer.test_patch_working_and_post_release
reno.tests.test_semver.TestSemVer.test_patch_working_copy
reno.tests.test_semver.TestSemVer.test_same
reno.tests.test_semver.TestSemVer.test_same_with_note
")
runHook postCheck
'';
pythonImportsCheck = [ "reno" ];
postInstallCheck = ''
$out/bin/reno -h
'';
2016-10-25 16:25:08 +00:00
meta = with lib; {
2016-10-25 16:25:08 +00:00
description = "Release Notes Manager";
mainProgram = "reno";
homepage = "https://docs.openstack.org/reno/latest";
license = licenses.asl20;
maintainers = teams.openstack.members ++ (with maintainers; [ drewrisinger guillaumekoenig ]);
2016-10-25 16:25:08 +00:00
};
}