1{
2 lib,
3 buildPythonPackage,
4 docutils,
5 fetchPypi,
6 pythonOlder,
7 importlib-metadata,
8 importlib-resources,
9 setuptools,
10 packaging,
11 pytestCheckHook,
12}:
13
14buildPythonPackage rec {
15 pname = "pkg-about";
16 version = "2.0.1";
17 pyproject = true;
18
19 disabled = pythonOlder "3.11";
20
21 src = fetchPypi {
22 pname = "pkg_about";
23 inherit version;
24 hash = "sha256-hgQOmp+R4ZWbq8hKRUQQzMO4hl/pHAGiJK9c4lxEkaI=";
25 };
26
27 # tox is listed in build requirements but not actually used to build
28 # keeping it as a requirement breaks the build unnecessarily
29 postPatch = ''
30 sed -i "/requires/s/, 'tox>=[^']*'//" pyproject.toml
31 '';
32
33 build-system = [
34 packaging
35 setuptools
36 ];
37
38 dependencies = [
39 docutils
40 importlib-metadata
41 importlib-resources
42 packaging
43 setuptools
44 ];
45
46 nativeCheckInputs = [ pytestCheckHook ];
47
48 pythonImportsCheck = [ "pkg_about" ];
49
50 meta = with lib; {
51 description = "Python metadata sharing at runtime";
52 homepage = "https://github.com/karpierz/pkg_about/";
53 changelog = "https://github.com/karpierz/pkg_about/blob/${version}/CHANGES.rst";
54 license = licenses.zlib;
55 teams = [ teams.ororatech ];
56 };
57}