MCPcopy Index your code
hub / github.com/StackStorm/st2 / st2_runner_python_distribution

Function st2_runner_python_distribution

pants-plugins/macros.py:46–71  ·  view source on GitHub ↗

Create a python_distribution (wheel/sdist) for a StackStorm runner.

(**kwargs)

Source from the content-addressed store, hash-verified

44
45
46def st2_runner_python_distribution(**kwargs):
47 """Create a python_distribution (wheel/sdist) for a StackStorm runner."""
48 runner_name = kwargs.pop("runner_name")
49 description = kwargs.pop("description")
50
51 st2_license(dest=f"contrib/runners/{runner_name}_runner")
52
53 kwargs["provides"] = python_artifact( # noqa: F821
54 name=f"stackstorm-runner-{runner_name.replace('_', '-')}",
55 description=description,
56 version_file=f"{runner_name}_runner/__init__.py", # custom for our release plugin
57 # test_suite="tests",
58 zip_safe=kwargs.pop(
59 "zip_safe", True
60 ), # most runners are safe to run from a zipapp
61 )
62
63 dependencies = kwargs.pop("dependencies", [])
64 for dep in [f"./{runner_name}_runner", ":license"]:
65 if dep not in dependencies:
66 dependencies.append(dep)
67
68 kwargs["dependencies"] = dependencies
69 kwargs["repositories"] = st2_publish_repos()
70
71 python_distribution(**kwargs) # noqa: F821
72
73
74def st2_component_python_distribution(**kwargs):

Callers

nothing calls this directly

Calls 3

st2_licenseFunction · 0.85
st2_publish_reposFunction · 0.85
popMethod · 0.45

Tested by

no test coverage detected