1{ lib
2, buildPythonPackage
3, fetchPypi
4, pytestCheckHook
5, pythonOlder
6, pdm-backend
7, sybil
8, typing-extensions
9}:
10
11buildPythonPackage rec {
12 pname = "atpublic";
13 version = "4.0";
14 format = "pyproject";
15
16 disabled = pythonOlder "3.6";
17
18 src = fetchPypi {
19 inherit pname version;
20 hash = "sha256-D0BDMhnhJO3xFcbDY4CMpvDhz6fRYNhrL7lHkwhtEpQ=";
21 };
22
23 nativeBuildInputs = [
24 pdm-backend
25 ];
26
27 propagatedBuildInputs = lib.optionals (pythonOlder "3.8") [
28 typing-extensions
29 ];
30
31 nativeCheckInputs = [
32 pytestCheckHook
33 sybil
34 ];
35
36 postPatch = ''
37 sed -i '/cov=public/d' pyproject.toml
38 '';
39
40 pythonImportsCheck = [
41 "public"
42 ];
43
44 meta = with lib; {
45 description = "Python decorator and function which populates a module's __all__ and globals";
46 homepage = "https://public.readthedocs.io/";
47 longDescription = ''
48 This is a very simple decorator and function which populates a module's
49 __all__ and optionally the module globals.
50 '';
51 license = licenses.asl20;
52 maintainers = with maintainers; [ eadwu ];
53 };
54}