1{
2 lib,
3 buildPythonPackage,
4 fetchPypi,
5 pytestCheckHook,
6 pythonOlder,
7 hatchling,
8 sybil,
9 typing-extensions,
10}:
11
12buildPythonPackage rec {
13 pname = "atpublic";
14 version = "4.1.0";
15 format = "pyproject";
16
17 disabled = pythonOlder "3.6";
18
19 src = fetchPypi {
20 inherit pname version;
21 hash = "sha256-0cjNkxr3Rh9tGLxgYzg+hlTZ6e8Z1Y7m3AHoUVu/Vd8=";
22 };
23
24 nativeBuildInputs = [ hatchling ];
25
26 propagatedBuildInputs = lib.optionals (pythonOlder "3.8") [ typing-extensions ];
27
28 nativeCheckInputs = [
29 pytestCheckHook
30 sybil
31 ];
32
33 pytestFlagsArray = [
34 # TypeError: FixtureManager.getfixtureclosure() missing 1 required positional argument: 'ignore_args'
35 "--ignore=docs/using.rst"
36 ];
37
38 postPatch = ''
39 sed -i '/cov=public/d' pyproject.toml
40 '';
41
42 pythonImportsCheck = [ "public" ];
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}