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