|
1 | 1 | [GLOBAL]
|
2 | 2 | pants_version = "2.13.0rc2"
|
| 3 | +backend_packages = [ |
| 4 | + # python |
| 5 | + "pants.backend.python", |
| 6 | + "pants.backend.experimental.python", # activates twine `publish` support |
| 7 | + "pants.backend.python.mixed_interpreter_constraints", |
| 8 | + |
| 9 | + # shell |
| 10 | + "pants.backend.shell", |
| 11 | +] |
| 12 | + |
| 13 | +[source] |
| 14 | +# recording each pack individually under root patterns is not great, but resolves these issues: |
| 15 | +# - Using a /contrib/* or other glob in root_patterns is dodgy as runners & schemas are in the same dir. |
| 16 | +# In particular, with /contrib/* in root_patterns, *_runner imports become ambiguous |
| 17 | +# (eg `import noop_runner` should use runners/noop_runner/noop_runner not runners/noop_runner). |
| 18 | +# - Using pack.yaml in marker_filenames prevents pants from inferring which fixture packs are |
| 19 | +# used by which tests. We import a PACK_NAME and PACK_PATH from fixture.py in each of these |
| 20 | +# fixture packs to enable this dependency inferrence. Having fine grained inferrence in-turn |
| 21 | +# reduces the number of tests that need to be re-run when we change a fixture. |
| 22 | +# - Using another marker_file, like PACK_ROOT, is also problematic because of the core pack. |
| 23 | +# /contrib/core is symlinked to /st2tests/st2tests/fixtures/packs/core for use as a fixture. |
| 24 | +# It is used in quite a few tests, so it needs to continue living in both places. |
| 25 | +# But, overlapping source roots (for st2tests and the pack) make importing from the fixture |
| 26 | +# as we do with the other fixtures impossible. |
| 27 | +# Thus, we really do need to register each pack in contrib (but never under st2tests) separately. |
| 28 | +# We might also need to register packs in st2tests/testpacks. |
| 29 | +root_patterns = [ |
| 30 | + # root conftest.py |
| 31 | + "/", |
| 32 | + # core libs |
| 33 | + "/st2*", |
| 34 | + # runners |
| 35 | + "/contrib/runners/*_runner", |
| 36 | + # packs (list /contrib/* packs individually; see note above) |
| 37 | + "/contrib/chatops", |
| 38 | + "/contrib/core", # WARNING: also symlinked to st2tests/st2tests/fixtures/packs/core |
| 39 | + "/contrib/default", |
| 40 | + "/contrib/examples", |
| 41 | + "/contrib/hello_st2", |
| 42 | + "/contrib/linux", |
| 43 | + "/contrib/packs", |
| 44 | + "/st2tests/testpacks/checks", |
| 45 | + "/st2tests/testpacks/errorcheck", |
| 46 | + # odd import in examples.isprime |
| 47 | + "/contrib/examples/lib", |
| 48 | + # lint plugins |
| 49 | + "/pylint_plugins", |
| 50 | + # misc |
| 51 | + "/scripts", |
| 52 | + "/tools", |
| 53 | + # benchmarks |
| 54 | + "/st2common/benchmarks/micro", |
| 55 | +] |
0 commit comments