Create a python_distribution (wheel/sdist) for a StackStorm runner.
(**kwargs)
| 44 | |
| 45 | |
| 46 | def 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 | |
| 74 | def st2_component_python_distribution(**kwargs): |
nothing calls this directly
no test coverage detected