summaryrefslogtreecommitdiff
path: root/pkgs/development/python-modules/versioneer/default.nix
blob: a138a9a929067ff007b46f0777ca1f8984512436 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
{
  lib,
  buildPythonPackage,
  fetchFromGitHub,
  pythonOlder,
  setuptools,
  tomli,
}:

buildPythonPackage rec {
  pname = "versioneer";
  version = "0.29";
  pyproject = true;

  src = fetchFromGitHub {
    owner = "python-versioneer";
    repo = "python-versioneer";
    tag = 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 = {
    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 = lib.licenses.publicDomain;
    maintainers = with lib.maintainers; [ jluttine ];
  };
}