1{
2 lib,
3 buildPythonPackage,
4 fetchPypi,
5 pythonOlder,
6 importlib-metadata,
7 importlib-resources,
8 setuptools,
9 packaging,
10 tomli,
11 pytestCheckHook,
12}:
13
14buildPythonPackage rec {
15 pname = "pkg-about";
16 version = "1.1.5";
17 format = "pyproject";
18
19 disabled = pythonOlder "3.7";
20
21 src = fetchPypi {
22 inherit pname version;
23 extension = "zip";
24 hash = "sha256-B5u+iJuqHtv4BlGhdWqYxBfS89/S01OXmLyDOQraHfo=";
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 nativeBuildInputs = [
34 packaging
35 setuptools
36 ];
37
38 propagatedBuildInputs = [
39 importlib-metadata
40 importlib-resources
41 packaging
42 setuptools
43 tomli
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 maintainers = teams.ororatech.members;
56 };
57}