forked from pantsbuild/pants
-
Notifications
You must be signed in to change notification settings - Fork 1
/
pants.toml
164 lines (146 loc) · 5 KB
/
pants.toml
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
[GLOBAL]
print_stacktrace = true
# Enable our custom loose-source plugins.
pythonpath = ["%(buildroot)s/pants-plugins"]
backend_packages.add = [
"pants.backend.awslambda.python",
"pants.backend.python",
"pants.backend.codegen.protobuf.python",
"pants.backend.python.lint.black",
"pants.backend.python.lint.docformatter",
"pants.backend.python.lint.flake8",
"pants.backend.python.lint.isort",
"pants.backend.python.typecheck.mypy",
"pants.backend.python.mixed_interpreter_constraints",
"internal_plugins.releases",
"toolchain.pants.auth",
"toolchain.pants.buildsense",
"toolchain.pants.common",
]
plugins = [
"hdrhistogram", # For use with `--stats-log`.
# TODO: Remove the relevant `ignore_pants_warning` entry when this is bumped.
"toolchain.pants.plugin==0.7.0",
]
ignore_pants_warnings = [
# TODO: Remove when `toolchain.pants.plugin` is bumped past `0.7.0`.
"DeprecationWarning: DEPRECATED: pants.core.util_rules.pants_environment",
]
build_file_prelude_globs = ["pants-plugins/python_integration_tests_macro.py"]
# The invalidation globs cover the PYTHONPATH by default, but we exclude some files that are on the
# path but not consumed by python, and additionally add the rust code.
pantsd_invalidation_globs.add = [
"!*_test.py",
"!BUILD",
# NB: The `target` directory is ignored via `pants_ignore` below.
"src/rust/engine/**/*.rs",
"src/rust/engine/**/*.toml",
]
# Path patterns to ignore for filesystem operations on top of the builtin patterns.
pants_ignore.add = [
# venv directories under build-support.
"/build-support/*.venv/",
# We shouldn't walk or watch the rust compiler artifacts because it is slow.
"/src/rust/engine/target",
# We want to .gitignore Java .class files, but pants should pay attention to them.
"!*.class",
# We also want to override the .gitignore'd pants.pex file
"!/pants.pex",
]
[source]
root_patterns = [
"src/*",
"test/*",
"tests/*",
"3rdparty/*",
"/build-support/bin",
"/build-support/migration-support",
"/pants-plugins",
]
[python-setup]
requirement_constraints = "3rdparty/python/constraints.txt"
resolve_all_constraints = "nondeployables"
interpreter_constraints = [">=3.7,<3.9"]
[black]
config = "pyproject.toml"
[docformatter]
args = ["--wrap-summaries=100", "--wrap-descriptions=100"]
[flake8]
config = "build-support/flake8/.flake8"
extra_requirements.add = [
"flake8-pantsbuild>=2.0,<3",
"flake8-2020>=1.6.0,<1.7.0"
]
[isort]
version = "isort[pyproject,colors]>=5.5.1,<5.6"
config = ["pyproject.toml"]
[mypy]
config = "build-support/mypy/mypy.ini"
source_plugins = ["pants-plugins/mypy_plugins"]
[pants-releases]
release_notes = """
{
'master': 'src/python/pants/notes/master.rst',
'1.0.x': 'src/python/pants/notes/1.0.x.rst',
'1.1.x': 'src/python/pants/notes/1.1.x.rst',
'1.2.x': 'src/python/pants/notes/1.2.x.rst',
'1.3.x': 'src/python/pants/notes/1.3.x.rst',
'1.4.x': 'src/python/pants/notes/1.4.x.rst',
'1.5.x': 'src/python/pants/notes/1.5.x.rst',
'1.6.x': 'src/python/pants/notes/1.6.x.rst',
'1.7.x': 'src/python/pants/notes/1.7.x.rst',
'1.8.x': 'src/python/pants/notes/1.8.x.rst',
'1.9.x': 'src/python/pants/notes/1.9.x.rst',
'1.10.x': 'src/python/pants/notes/1.10.x.rst',
'1.11.x': 'src/python/pants/notes/1.11.x.rst',
'1.12.x': 'src/python/pants/notes/1.12.x.rst',
'1.13.x': 'src/python/pants/notes/1.13.x.rst',
'1.14.x': 'src/python/pants/notes/1.14.x.rst',
'1.15.x': 'src/python/pants/notes/1.15.x.rst',
'1.16.x': 'src/python/pants/notes/1.16.x.rst',
'1.17.x': 'src/python/pants/notes/1.17.x.rst',
'1.18.x': 'src/python/pants/notes/1.18.x.rst',
'1.19.x': 'src/python/pants/notes/1.19.x.rst',
'1.20.x': 'src/python/pants/notes/1.20.x.rst',
'1.21.x': 'src/python/pants/notes/1.21.x.rst',
'1.22.x': 'src/python/pants/notes/1.22.x.rst',
'1.23.x': 'src/python/pants/notes/1.23.x.rst',
'1.24.x': 'src/python/pants/notes/1.24.x.rst',
'1.25.x': 'src/python/pants/notes/1.25.x.rst',
'1.26.x': 'src/python/pants/notes/1.26.x.rst',
'1.27.x': 'src/python/pants/notes/1.27.x.rst',
'1.28.x': 'src/python/pants/notes/1.28.x.rst',
'1.29.x': 'src/python/pants/notes/1.29.x.rst',
'1.30.x': 'src/python/pants/notes/1.30.x.rst',
'2.0.x': 'src/python/pants/notes/2.0.x.rst',
'2.1.x': 'src/python/pants/notes/2.1.x.rst',
'2.2.x': 'src/python/pants/notes/2.2.x.md',
'2.3.x': 'src/python/pants/notes/2.3.x.md',
'2.4.x': 'src/python/pants/notes/2.4.x.md',
}
"""
[pytest]
args = ["--no-header"]
pytest_plugins.add = [
"ipdb",
"pytest-icdiff",
"pygments",
]
timeout_default = 60
[test]
extra_env_vars = [
# TODO: These are exposed to tests in order to allow for python interpreter discovery when
# Pants-tests-Pants: in particular, the [python-setup] subsystem consumes them.
# see https://github.com/pantsbuild/pants/issues/11638
"PYENV_ROOT",
"HOME",
"PATH",
# We'd always like complete backtraces in tests.
"RUST_BACKTRACE=1",
]
[coverage-py]
interpreter_constraints = [">=3.7,<3.9"]
[sourcefile-validation]
config = "@build-support/regexes/config.yaml"
[toolchain-setup]
repo = "pants"