diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 3e5777133d..151a9fcbcf 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -16,7 +16,7 @@ Added to pants' use of PEX lockfiles. This is not a user-facing addition. #5778 #5789 #5817 #5795 #5830 #5833 #5834 #5841 #5840 #5838 #5842 #5837 #5849 #5850 #5846 #5853 #5848 #5847 #5858 #5857 #5860 #5868 #5871 #5864 #5874 #5884 #5893 #5891 - #5890 #5898 #5901 #5906 #5899 #5907 #5909 #5922 #5926 #5927 #5925 + #5890 #5898 #5901 #5906 #5899 #5907 #5909 #5922 #5926 #5927 #5925 #5928 Contributed by @cognifloyd * Added a joint index to solve the problem of slow mongo queries for scheduled executions. #5805 diff --git a/pants.toml b/pants.toml index 99ebdae93a..b8dc5656a7 100644 --- a/pants.toml +++ b/pants.toml @@ -136,6 +136,11 @@ st2 = "lockfiles/st2-constraints.txt" # Revisit this in pants 2.16 to see if it is feasible to use the default "warning". unowned_dependency_behavior = "ignore" +[setup-py-generation] +# when building the package (with ./pants package ::), pants will, +# by default, generate a setup.py file for use with setuptools. +generate_setup_default = true # true by default + [bandit] lockfile = "lockfiles/bandit.lock" version = "bandit==1.7.0" diff --git a/st2actions/BUILD b/st2actions/BUILD index 676079ffb0..aa69d5d336 100644 --- a/st2actions/BUILD +++ b/st2actions/BUILD @@ -7,4 +7,11 @@ st2_component_python_distribution( "bin/st2scheduler", "bin/runners.sh:shell", # used by service files installed by st2-packaging ], + dependencies=[ + # policies get wired up by metadata in st2common/st2common/policies/meta/*.yaml + "st2actions/policies", + # backwards compat API: + # st2actions.runners.pythonrunner.Action moved to st2common.runners.base_action.Action + "st2actions/runners/pythonrunner.py", + ], ) diff --git a/st2api/st2api/BUILD b/st2api/st2api/BUILD index db46e8d6c9..8486ed9b78 100644 --- a/st2api/st2api/BUILD +++ b/st2api/st2api/BUILD @@ -1 +1,12 @@ -python_sources() +python_sources( + overrides={ + "app.py": dict( + dependencies=[ + # controller routes are wired up via st2common/st2common/openapi.yaml + "./controllers", + "./controllers/v1", + # "./controllers/exp", + ], + ), + }, +) diff --git a/st2api/st2api/controllers/BUILD b/st2api/st2api/controllers/BUILD index db46e8d6c9..8118c9e64e 100644 --- a/st2api/st2api/controllers/BUILD +++ b/st2api/st2api/controllers/BUILD @@ -1 +1,10 @@ -python_sources() +python_sources( + overrides={ + "root.py": dict( + dependencies=[ + "st2api/st2api/public", # cfg.static_root (has logo images) + "st2api/st2api/templates", # cfg.template_path + ], + ), + }, +) diff --git a/st2auth/st2auth/BUILD b/st2auth/st2auth/BUILD index db46e8d6c9..e46a5cc524 100644 --- a/st2auth/st2auth/BUILD +++ b/st2auth/st2auth/BUILD @@ -1 +1,10 @@ -python_sources() +python_sources( + overrides={ + "app.py": dict( + dependencies=[ + # controller routes are wired up via st2common/st2common/openapi.yaml + "./controllers/v1", + ], + ), + }, +) diff --git a/st2auth/st2auth/backends/BUILD b/st2auth/st2auth/backends/BUILD index db46e8d6c9..2a29327564 100644 --- a/st2auth/st2auth/backends/BUILD +++ b/st2auth/st2auth/backends/BUILD @@ -1 +1,10 @@ -python_sources() +python_sources( + overrides={ + "__init__.py": dict( + dependencies=[ + # Public API classes that cannot be inferred + "./base.py", + ], + ), + }, +) diff --git a/st2reactor/st2reactor/container/BUILD b/st2reactor/st2reactor/container/BUILD index db46e8d6c9..fb50ef582c 100644 --- a/st2reactor/st2reactor/container/BUILD +++ b/st2reactor/st2reactor/container/BUILD @@ -1 +1,10 @@ -python_sources() +python_sources( + overrides={ + "process_container.py": dict( + dependencies=[ + # This is called in a subprocess using filesystem path + "./sensor_wrapper.py", + ], + ), + }, +) diff --git a/st2stream/st2stream/BUILD b/st2stream/st2stream/BUILD index db46e8d6c9..e46a5cc524 100644 --- a/st2stream/st2stream/BUILD +++ b/st2stream/st2stream/BUILD @@ -1 +1,10 @@ -python_sources() +python_sources( + overrides={ + "app.py": dict( + dependencies=[ + # controller routes are wired up via st2common/st2common/openapi.yaml + "./controllers/v1", + ], + ), + }, +)