Skip to content

Commit 1c36c97

Browse files
authored
Merge pull request #5928: Pants: add dependencies to the st2* python_distributions (except st2common/st2tests)
2 parents 1a0d028 + 2678cba commit 1c36c97

9 files changed

Lines changed: 75 additions & 7 deletions

File tree

CHANGELOG.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ Added
1616
to pants' use of PEX lockfiles. This is not a user-facing addition.
1717
#5778 #5789 #5817 #5795 #5830 #5833 #5834 #5841 #5840 #5838 #5842 #5837 #5849 #5850
1818
#5846 #5853 #5848 #5847 #5858 #5857 #5860 #5868 #5871 #5864 #5874 #5884 #5893 #5891
19-
#5890 #5898 #5901 #5906 #5899 #5907 #5909 #5922 #5926 #5927 #5925
19+
#5890 #5898 #5901 #5906 #5899 #5907 #5909 #5922 #5926 #5927 #5925 #5928
2020
Contributed by @cognifloyd
2121

2222
* Added a joint index to solve the problem of slow mongo queries for scheduled executions. #5805

pants.toml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,11 @@ st2 = "lockfiles/st2-constraints.txt"
136136
# Revisit this in pants 2.16 to see if it is feasible to use the default "warning".
137137
unowned_dependency_behavior = "ignore"
138138

139+
[setup-py-generation]
140+
# when building the package (with ./pants package ::), pants will,
141+
# by default, generate a setup.py file for use with setuptools.
142+
generate_setup_default = true # true by default
143+
139144
[bandit]
140145
lockfile = "lockfiles/bandit.lock"
141146
version = "bandit==1.7.0"

st2actions/BUILD

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,11 @@ st2_component_python_distribution(
77
"bin/st2scheduler",
88
"bin/runners.sh:shell", # used by service files installed by st2-packaging
99
],
10+
dependencies=[
11+
# policies get wired up by metadata in st2common/st2common/policies/meta/*.yaml
12+
"st2actions/policies",
13+
# backwards compat API:
14+
# st2actions.runners.pythonrunner.Action moved to st2common.runners.base_action.Action
15+
"st2actions/runners/pythonrunner.py",
16+
],
1017
)

st2api/st2api/BUILD

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,12 @@
1-
python_sources()
1+
python_sources(
2+
overrides={
3+
"app.py": dict(
4+
dependencies=[
5+
# controller routes are wired up via st2common/st2common/openapi.yaml
6+
"./controllers",
7+
"./controllers/v1",
8+
# "./controllers/exp",
9+
],
10+
),
11+
},
12+
)

st2api/st2api/controllers/BUILD

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,10 @@
1-
python_sources()
1+
python_sources(
2+
overrides={
3+
"root.py": dict(
4+
dependencies=[
5+
"st2api/st2api/public", # cfg.static_root (has logo images)
6+
"st2api/st2api/templates", # cfg.template_path
7+
],
8+
),
9+
},
10+
)

st2auth/st2auth/BUILD

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,10 @@
1-
python_sources()
1+
python_sources(
2+
overrides={
3+
"app.py": dict(
4+
dependencies=[
5+
# controller routes are wired up via st2common/st2common/openapi.yaml
6+
"./controllers/v1",
7+
],
8+
),
9+
},
10+
)

st2auth/st2auth/backends/BUILD

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,10 @@
1-
python_sources()
1+
python_sources(
2+
overrides={
3+
"__init__.py": dict(
4+
dependencies=[
5+
# Public API classes that cannot be inferred
6+
"./base.py",
7+
],
8+
),
9+
},
10+
)
Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,10 @@
1-
python_sources()
1+
python_sources(
2+
overrides={
3+
"process_container.py": dict(
4+
dependencies=[
5+
# This is called in a subprocess using filesystem path
6+
"./sensor_wrapper.py",
7+
],
8+
),
9+
},
10+
)

st2stream/st2stream/BUILD

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,10 @@
1-
python_sources()
1+
python_sources(
2+
overrides={
3+
"app.py": dict(
4+
dependencies=[
5+
# controller routes are wired up via st2common/st2common/openapi.yaml
6+
"./controllers/v1",
7+
],
8+
),
9+
},
10+
)

0 commit comments

Comments
 (0)