Skip to content

Commit 4087208

Browse files
committed
fix(datashare-python): fix wheel distribution missing with an empty template
1 parent 9bc946c commit 4087208

2 files changed

Lines changed: 7 additions & 3 deletions

File tree

datashare-python/datashare_python/template.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,11 @@
2222

2323
class CopyTemplateHook(BuildHookInterface):
2424
def initialize(self, version: str, build_data: dict[str, Any]) -> None: # noqa: ARG002
25-
build_template_tarball()
25+
# Only generate the worker template when building the sources,
26+
# the wheel is then generated from this first build
27+
if self.target_name == "sdist":
28+
build_template_tarball()
29+
build_data["artifacts"].append("datashare_python/worker-template.tar.gz")
2630

2731

2832
def build_template_tarball() -> None:

datashare-python/pyproject.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[project]
22
name = "datashare-python"
3-
version = "0.2.19"
3+
version = "0.2.20"
44
description = "Manage Pythoœn tasks and local resources in Datashare"
55
authors = [
66
{ name = "Clément Doumouro", email = "cdoumouro@icij.org" },
@@ -47,7 +47,7 @@ only-include = ["datashare_python"]
4747

4848
[tool.hatch.build.targets.wheel]
4949
artifacts = [
50-
"worker-template.tar.gz"
50+
"datashare_python/worker-template.tar.gz"
5151
]
5252

5353

0 commit comments

Comments
 (0)