summaryrefslogtreecommitdiff
path: root/pyproject.toml
blob: 8d68131c952f1fd9450bc071f4c95dee532ca3b8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
[tool.isort]
force_single_line = true  # one import per line
lines_after_imports = 2  # blank spaces after import section

[tool.coverage.report]
omit = [
    "psutil/_compat.py",
    "psutil/tests/*",
    "setup.py",
]
exclude_lines = [
    "enum.IntEnum",
    "except ImportError:",
    "globals().update",
    "if __name__ == .__main__.:",
    "if _WINDOWS:",
    "if BSD",
    "if enum is None:",
    "if enum is not None:",
    "if FREEBSD",
    "if has_enums:",
    "if LINUX",
    "if LITTLE_ENDIAN:",
    "if MACOS",
    "if NETBSD",
    "if OPENBSD",
    "if ppid_map is None:",
    "if PY3:",
    "if SUNOS",
    "if sys.platform.startswith",
    "if WINDOWS",
    "import enum",
    "pragma: no cover",
    "raise NotImplementedError",
]

[tool.pylint.messages_control]
# Important ones:
# undefined-all-variable, invalid-envvar-default, reimported, raising-format-tuple, simplifiable-if-expression, useless-object-inheritance
disable = [
    "broad-except",  # except Exception:
    "consider-using-dict-comprehension",
    "consider-using-f-string",
    "consider-using-set-comprehension",
    "consider-using-with",
    "disallowed-name",
    "fixme",
    "global-statement",
    "import-error",
    "import-outside-toplevel",
    "inconsistent-return-statements",
    "invalid-name",
    "missing-class-docstring",
    "missing-function-docstring",
    "no-else-raise",
    "no-else-return",
    "protected-access",
    "raise-missing-from",
    "redefined-builtin",
    "super-with-arguments",
    "too-few-public-methods",
    "too-many-arguments",
    "too-many-branches",
    "too-many-instance-attributes",
    "too-many-lines",
    "too-many-locals",
    "too-many-public-methods",
    "too-many-return-statements",
    "too-many-statements",
    "ungrouped-imports",
    "unspecified-encoding",
    "wrong-import-position",
]

[build-system]
requires = ["setuptools>=43", "wheel"]
build-backend = "setuptools.build_meta"

[tool.cibuildwheel]
skip = ["pp*", "*-musllinux*"]
test-extras = "test"
test-command = [
    "env PYTHONWARNINGS=always PYTHONUNBUFFERED=1 PSUTIL_DEBUG=1 PSUTIL_SCRIPTS_DIR={project}/scripts python {project}/psutil/tests/runner.py",
    "env PYTHONWARNINGS=always PYTHONUNBUFFERED=1 PSUTIL_DEBUG=1 PSUTIL_SCRIPTS_DIR={project}/scripts python {project}/psutil/tests/test_memleaks.py"
]

[tool.cibuildwheel.macos]
archs = ["x86_64", "arm64"]