Merge pull request #268619 from tweag/lib-descriptions
[NixPkgs.git] / pkgs / development / python-modules / versioneer / default.nix
blobbbd43887025cc9389e4771993bf7ef99d9e6615e
1 { lib
2 , buildPythonPackage
3 , fetchFromGitHub
4 , pythonOlder
5 , setuptools
6 , tomli
7 }:
9 buildPythonPackage rec {
10   pname = "versioneer";
11   version = "0.29";
12   format = "pyproject";
14   disabled = pythonOlder "3.7";
16   src = fetchFromGitHub {
17     owner = "python-versioneer";
18     repo = "python-versioneer";
19     rev = "refs/tags/${version}";
20     hash = "sha256-3b7Wfhd24Vym5XCeN/M1832Q1VzvlWi3quTRaZrID2s=";
21   };
23   nativeBuildInputs = [
24     setuptools
25   ] ++ lib.optionals (pythonOlder "3.11") [
26     tomli
27   ];
29   passthru.optional-dependencies = {
30     toml = lib.optionals (pythonOlder "3.11") [
31       tomli
32     ];
33   };
35   # Couldn't get tests to work because, for instance, they used virtualenv and pip
36   doCheck = false;
38   pythonImportsCheck = [
39     "versioneer"
40   ];
42   meta = with lib; {
43     description = "Version-string management for VCS-controlled trees";
44     homepage = "https://github.com/python-versioneer/python-versioneer";
45     changelog = "https://github.com/python-versioneer/python-versioneer/blob/${version}/NEWS.md";
46     license = licenses.publicDomain;
47     maintainers = with maintainers; [ jluttine ];
48   };