1{ lib
2, buildPythonPackage
3, dunamai
4, fetchFromGitHub
5, jinja2
6, markupsafe
7, poetry-core
8, poetry
9, pytestCheckHook
10, pythonOlder
11, tomlkit
12}:
13
14buildPythonPackage rec {
15 pname = "poetry-dynamic-versioning";
16 version = "0.21.5";
17 format = "pyproject";
18
19 disabled = pythonOlder "3.7";
20
21 src = fetchFromGitHub {
22 owner = "mtkennerly";
23 repo = pname;
24 rev = "refs/tags/v${version}";
25 hash = "sha256-YFbIQLIbedErdKiPlZf0+6qtZexuJ6Q6pzhy54vSK5Y=";
26 };
27
28 nativeBuildInputs = [
29 poetry-core
30 ];
31
32 propagatedBuildInputs = [
33 dunamai
34 jinja2
35 markupsafe
36 tomlkit
37 ];
38
39 nativeCheckInputs = [
40 pytestCheckHook
41 poetry
42 ];
43
44 # virtualenv: error: argument dest: the destination . is not write-able at /
45 doCheck = false;
46
47 disabledTests = [
48 # these require .git, but leaveDotGit = true doesn't help
49 "test__get_version__defaults"
50 "test__get_version__format_jinja"
51 # these expect to be able to run the poetry cli which fails in test hook
52 "test_integration"
53 ];
54
55 pythonImportsCheck = [
56 "poetry_dynamic_versioning"
57 ];
58
59 meta = with lib; {
60 description = "Plugin for Poetry to enable dynamic versioning based on VCS tags";
61 homepage = "https://github.com/mtkennerly/poetry-dynamic-versioning";
62 changelog = "https://github.com/mtkennerly/poetry-dynamic-versioning/blob/v${version}/CHANGELOG.md";
63 license = licenses.mit;
64 maintainers = with maintainers; [ cpcloud ];
65 };
66}