Skip to content

Commit 6e773e6

Browse files
authored
Pants: Add pack_metadata targets to BUILD files (#5871)
* pants: add pack_metadata targets * add packs_metadata and related targets * Add pack_metadata dependencies * Add pack_metadata for more fixtures * Allow pants to detect packs fixture usage * Cleanup fixtures BUILD files Several fixtures have been adjusted so pants can infer them. So, I dropped the hard-coded dep in the BUILD files. * add BUILD metadata for st2tests/testpacks * depend on pack_metadata in st2tests.fixtures.packs.core.fixture * Add pack_metadata targets in st2reactor pack fixtures * Enable pants-plugins/pack_metadata This reverts commit 4a1b241. * update changelog entry * disable spurious pack_metadata target where there is no metadata * add pack_metadata to contrib/debug with `./pants tailor ::`
1 parent 33a5039 commit 6e773e6

File tree

68 files changed

+389
-45
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

68 files changed

+389
-45
lines changed

CHANGELOG.rst

Lines changed: 1 addition & 1 deletion

contrib/chatops/BUILD

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
pack_metadata(
2+
name="metadata",
3+
)

contrib/core/BUILD

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
python_sources()
1+
pack_metadata(
2+
name="metadata",
3+
)
24

35
python_requirements(
46
name="reqs",
@@ -7,3 +9,7 @@ python_requirements(
79
# https://github.com/pantsbuild/pants/pull/17390
810
module_mapping={"mail-parser": ["mailparser"]},
911
)
12+
13+
python_sources(
14+
dependencies=[":metadata"],
15+
)

contrib/debug/BUILD

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
pack_metadata(
2+
name="metadata",
3+
)

contrib/default/BUILD

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
pack_metadata(
2+
name="metadata",
3+
)

contrib/examples/BUILD

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
pack_metadata(
2+
name="metadata",
3+
)
4+
15
# Using `python_requirements()` here results in:
26
# ">1 target exports this module, so it is ambiguous which to use"
37
# This error refers to the "requests" module.

contrib/hello_st2/BUILD

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
pack_metadata(
2+
name="metadata",
3+
)

contrib/linux/BUILD

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
pack_metadata(
2+
name="metadata",
3+
)
4+
15
python_requirements(
26
name="reqs",
37
)

contrib/packs/BUILD

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
pack_metadata(
2+
name="metadata",
3+
)

contrib/packs/tests/fixtures/BUILD

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,8 @@
1-
python_sources()
1+
python_sources(
2+
dependencies=[
3+
"./stackstorm-test:metadata",
4+
"./stackstorm-test2:metadata",
5+
"./stackstorm-test3:metadata",
6+
"./stackstorm-test4:metadata",
7+
],
8+
)

0 commit comments

Comments
 (0)