depot/third_party/nixpkgs/pkgs/development/python-modules/versioneer/default.nix
Default email 472aeafc57 Project import generated by Copybara.
GitOrigin-RevId: c31898adf5a8ed202ce5bea9f347b1c6871f32d1
2024-10-04 18:56:33 +02:00

43 lines
1.1 KiB
Nix

{
lib,
buildPythonPackage,
fetchFromGitHub,
pythonOlder,
setuptools,
tomli,
}:
buildPythonPackage rec {
pname = "versioneer";
version = "0.29";
format = "pyproject";
disabled = pythonOlder "3.7";
src = fetchFromGitHub {
owner = "python-versioneer";
repo = "python-versioneer";
rev = "refs/tags/${version}";
hash = "sha256-3b7Wfhd24Vym5XCeN/M1832Q1VzvlWi3quTRaZrID2s=";
};
nativeBuildInputs = [ setuptools ] ++ lib.optionals (pythonOlder "3.11") [ tomli ];
optional-dependencies = {
toml = lib.optionals (pythonOlder "3.11") [ tomli ];
};
# Couldn't get tests to work because, for instance, they used virtualenv and pip
doCheck = false;
pythonImportsCheck = [ "versioneer" ];
meta = with lib; {
description = "Version-string management for VCS-controlled trees";
mainProgram = "versioneer";
homepage = "https://github.com/python-versioneer/python-versioneer";
changelog = "https://github.com/python-versioneer/python-versioneer/blob/${version}/NEWS.md";
license = licenses.publicDomain;
maintainers = with maintainers; [ jluttine ];
};
}