@@ -25,12 +25,12 @@ def st2_publish_repos():
2525 Credentials for pypi should be in ~/.pypirc or in TWINE_* env vars.
2626 """
2727 # TODO: switch from hard-coded to env() once we upgrade to pants 2.16
28- # return [env("ST2_PUBLISH_REPO", "@pypi")]
28+ # return [env("ST2_PUBLISH_REPO", "@pypi")] # noqa: F821
2929 return ["@pypi" ]
3030
3131
3232def st2_license (** kwargs ):
33- """copy the LICENSE file into each wheel.
33+ """Copy the LICENSE file into each wheel.
3434
3535 As long as the file is in the src root when building the sdist/wheel,
3636 setuptools automatically includes the LICENSE file in the dist-info.
@@ -46,6 +46,7 @@ def st2_license(**kwargs):
4646
4747
4848def st2_runner_python_distribution (** kwargs ):
49+ """Create a python_distribution (wheel/sdist) for a StackStorm runner."""
4950 runner_name = kwargs .pop ("runner_name" )
5051 description = kwargs .pop ("description" )
5152
@@ -73,16 +74,15 @@ def st2_runner_python_distribution(**kwargs):
7374
7475
7576def st2_component_python_distribution (** kwargs ):
77+ """Create a python_distribution (wheel/sdist) for a core StackStorm component."""
7678 st2_component = kwargs .pop ("component_name" )
77-
78- st2_license (dest = st2_component )
79-
8079 description = (
8180 f"{ st2_component } StackStorm event-driven automation platform component"
8281 )
83-
8482 scripts = kwargs .pop ("scripts" , [])
8583
84+ st2_license (dest = st2_component )
85+
8686 kwargs ["provides" ] = python_artifact ( # noqa: F821
8787 name = st2_component ,
8888 description = description ,
@@ -95,7 +95,6 @@ def st2_component_python_distribution(**kwargs):
9595 )
9696
9797 dependencies = kwargs .pop ("dependencies" , [])
98-
9998 for dep in [st2_component , ":license" ] + scripts :
10099 dep = f"./{ dep } " if dep [0 ] != ":" else dep
101100 if dep not in dependencies :
0 commit comments