generated from pantsbuild/example-python
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpants.toml
76 lines (60 loc) · 2.63 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
# Copyright 2020 Pants project contributors.
# Licensed under the Apache License, Version 2.0 (see LICENSE).
[GLOBAL]
pants_version = "2.12.0"
backend_packages.add = [
"pants.backend.python",
"pants.backend.python.lint.docformatter",
"pants.backend.python.lint.black",
"pants.backend.python.lint.flake8",
"pants.backend.python.lint.isort",
"pants.backend.python.typecheck.mypy",
]
# Pants' sponsor, Toolchain, offers remote caching, which can improve your CI performance
# with minimal configuration. For more details, visit https://toolchain.com
plugins.add = [
"toolchain.pants.plugin==0.20.0",
]
remote_cache_read = false
remote_cache_write = false
remote_store_address = "grpcs://cache.toolchain.com:443"
remote_auth_plugin = "toolchain.pants.auth.plugin:toolchain_auth_plugin"
# End Toolchain-specific configuration
[anonymous-telemetry]
enabled = true
repo_id = "3B1D361B-E9F1-49A8-B761-03DCC41FD58E"
[source]
# The Python source root is the repo root. See https://www.pantsbuild.org/docs/source-roots.
root_patterns = ["/"]
[python]
# The default interpreter constraints for code in this repo. Individual targets can override
# this with the `interpreter_constraints` field. See
# https://www.pantsbuild.org/docs/python-interpreter-compatibility.
#
# It's usually a good idea to pin this to a particular version, e.g. `==3.9.*`. We only use a range
# so that this example works on many different machines.
#
# If you use Apple Silicon, set to a value like `>=3.9`.
interpreter_constraints = [">=3.7"]
# Enable the "resolves" mechanism, which turns on lockfiles for user code. See
# https://www.pantsbuild.org/docs/python-third-party-dependencies. This also adds the
# `generate-lockfiles` goal for Pants to generate the lockfile for you, although in some
# situations you may need to manually generate it, as explained in the docs.
enable_resolves = true
resolves = { python-default = "lockfile.txt"}
# Enable using the PEX lockfile format, which provides support for custom indexes, and
# improves performance for large repositories.
lockfile_generator = "pex"
[python-bootstrap]
# We search for interpreters both on the $PATH and in the `$(pyenv root)/versions` folder.
# If you're using macOS, you may want to leave off the <PATH> entry to avoid using the
# problematic system Pythons. See
# https://www.pantsbuild.org/docs/python-interpreter-compatibility#changing-the-interpreter-search-path.
search_path = ["<PATH>", "<PYENV>"]
# Configuration for Toolchain instrumentation and remote caching
# Visit https://toolchain.com to enable and try it on your repository
[toolchain-setup]
repo = "pants"
org = "example-python"
[buildsense]
enable = false