1{ lib
2, buildPythonPackage
3, fetchFromGitHub
4, importlib-metadata
5, poetry-core
6, pytest-mock
7, pytestCheckHook
8, pythonOlder
9}:
10
11buildPythonPackage rec {
12 pname = "single-source";
13 version = "0.3.0";
14 format = "pyproject";
15
16 disabled = pythonOlder "3.7";
17
18 src = fetchFromGitHub {
19 owner = "rabbit72";
20 repo = "single-source";
21 rev = "refs/tags/v${version}";
22 hash = "sha256-bhfMRIeJUd5JhN2tPww7fdbmHQ7ypcsZrYSa55v0+W8=";
23 };
24
25 nativeBuildInputs = [
26 poetry-core
27 ];
28
29 propagatedBuildInputs = [
30 importlib-metadata
31 ];
32
33 nativeCheckInputs = [
34 pytest-mock
35 pytestCheckHook
36 ];
37
38 pythonImportsCheck = [
39 "single_source"
40 ];
41
42 meta = with lib; {
43 description = "Access to the project version in Python code for PEP 621-style projects";
44 homepage = "https://github.com/rabbit72/single-source";
45 changelog = "https://github.com/rabbit72/single-source/releases/tag/v${version}";
46 license = licenses.mit;
47 maintainers = with maintainers; [ ];
48 };
49}