Merge pull request #307098 from r-ryantm/auto-update/cilium-cli
[NixPkgs.git] / pkgs / development / python-modules / gto / default.nix
blob79347e1ce3d80252474542178394fcb1f92e7f86
1 { lib
2 , buildPythonPackage
3 , entrypoints
4 , fastentrypoints
5 , fetchFromGitHub
6 , freezegun
7 , funcy
8 , git
9 , pydantic
10 , pytest-mock
11 , pytest-test-utils
12 , pytestCheckHook
13 , pythonOlder
14 , rich
15 , ruamel-yaml
16 , scmrepo
17 , semver
18 , setuptools
19 , setuptools-scm
20 , tabulate
21 , typer
24 buildPythonPackage rec {
25   pname = "gto";
26   version = "1.7.1";
27   pyproject = true;
29   disabled = pythonOlder "3.8";
31   src = fetchFromGitHub {
32     owner = "iterative";
33     repo = "gto";
34     rev = "refs/tags/${version}";
35     hash = "sha256-fUi+/PW05EvgTnoEv1Im1BjZ07VzpZhyW0EjhLUqJGI=";
36   };
38   postPatch = ''
39     substituteInPlace pyproject.toml \
40       --replace-fail ', "setuptools_scm_git_archive==1.4.1"' ""
41     substituteInPlace setup.cfg \
42       --replace-fail " --cov=gto --cov-report=term-missing --cov-report=xml" ""
43   '';
45   nativeBuildInputs = [
46     fastentrypoints
47     setuptools
48     setuptools-scm
49   ];
51   propagatedBuildInputs = [
52     entrypoints
53     funcy
54     pydantic
55     rich
56     ruamel-yaml
57     scmrepo
58     semver
59     tabulate
60     typer
61   ];
63   nativeCheckInputs = [
64     freezegun
65     git
66     pytest-mock
67     pytest-test-utils
68     pytestCheckHook
69   ];
71   preCheck = ''
72     export HOME=$(mktemp -d)
74     git config --global user.email "nobody@example.com"
75     git config --global user.name "Nobody"
76   '';
78   disabledTests = [
79     # Tests want to with a remote repo
80     "remote_repo"
81     "remote_git_repo"
82     "test_action_doesnt_push_even_if_repo_has_remotes_set"
83   ];
85   pythonImportsCheck = [
86     "gto"
87   ];
89   meta = with lib; {
90     description = "Module for Git Tag Operations";
91     homepage = "https://github.com/iterative/gto";
92     changelog = "https://github.com/iterative/gto/releases/tag/${version}";
93     license = licenses.asl20;
94     maintainers = with maintainers; [ fab ];
95     mainProgram = "gto";
96   };