Merge pull request #268619 from tweag/lib-descriptions
[NixPkgs.git] / pkgs / development / python-modules / single-source / default.nix
blob3bf2ff810d5073c41fce4f0af56315167717b1da
1 { lib
2 , buildPythonPackage
3 , fetchFromGitHub
4 , importlib-metadata
5 , poetry-core
6 , pytest-mock
7 , pytestCheckHook
8 , pythonOlder
9 }:
11 buildPythonPackage rec {
12   pname = "single-source";
13   version = "0.3.0";
14   format = "pyproject";
16   disabled = pythonOlder "3.7";
18   src = fetchFromGitHub {
19     owner = "rabbit72";
20     repo = "single-source";
21     rev = "refs/tags/v${version}";
22     hash = "sha256-bhfMRIeJUd5JhN2tPww7fdbmHQ7ypcsZrYSa55v0+W8=";
23   };
25   nativeBuildInputs = [
26     poetry-core
27   ];
29   propagatedBuildInputs = [
30     importlib-metadata
31   ];
33   nativeCheckInputs = [
34     pytest-mock
35     pytestCheckHook
36   ];
38   pythonImportsCheck = [
39     "single_source"
40   ];
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   };