datashare-python 0.2.15__tar.gz → 0.2.20__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (27) hide show
  1. {datashare_python-0.2.15 → datashare_python-0.2.20}/PKG-INFO +2 -2
  2. {datashare_python-0.2.15 → datashare_python-0.2.20}/datashare_python/template.py +8 -5
  3. datashare_python-0.2.20/datashare_python/worker-template.tar.gz +0 -0
  4. {datashare_python-0.2.15 → datashare_python-0.2.20}/pyproject.toml +12 -5
  5. {datashare_python-0.2.15 → datashare_python-0.2.20}/.gitignore +0 -0
  6. {datashare_python-0.2.15 → datashare_python-0.2.20}/README.md +0 -0
  7. {datashare_python-0.2.15 → datashare_python-0.2.20}/datashare_python/.gitignore +0 -0
  8. {datashare_python-0.2.15 → datashare_python-0.2.20}/datashare_python/__init__.py +0 -0
  9. {datashare_python-0.2.15 → datashare_python-0.2.20}/datashare_python/__main__.py +0 -0
  10. {datashare_python-0.2.15 → datashare_python-0.2.20}/datashare_python/cli/__init__.py +0 -0
  11. {datashare_python-0.2.15 → datashare_python-0.2.20}/datashare_python/cli/local.py +0 -0
  12. {datashare_python-0.2.15 → datashare_python-0.2.20}/datashare_python/cli/project.py +0 -0
  13. {datashare_python-0.2.15 → datashare_python-0.2.20}/datashare_python/cli/task.py +0 -0
  14. {datashare_python-0.2.15 → datashare_python-0.2.20}/datashare_python/cli/utils.py +0 -0
  15. {datashare_python-0.2.15 → datashare_python-0.2.20}/datashare_python/cli/worker.py +0 -0
  16. {datashare_python-0.2.15 → datashare_python-0.2.20}/datashare_python/config.py +0 -0
  17. {datashare_python-0.2.15 → datashare_python-0.2.20}/datashare_python/conftest.py +0 -0
  18. {datashare_python-0.2.15 → datashare_python-0.2.20}/datashare_python/constants.py +0 -0
  19. {datashare_python-0.2.15 → datashare_python-0.2.20}/datashare_python/dependencies.py +0 -0
  20. {datashare_python-0.2.15 → datashare_python-0.2.20}/datashare_python/discovery.py +0 -0
  21. {datashare_python-0.2.15 → datashare_python-0.2.20}/datashare_python/exceptions.py +0 -0
  22. {datashare_python-0.2.15 → datashare_python-0.2.20}/datashare_python/local_client.py +0 -0
  23. {datashare_python-0.2.15 → datashare_python-0.2.20}/datashare_python/objects.py +0 -0
  24. {datashare_python-0.2.15 → datashare_python-0.2.20}/datashare_python/task_client.py +0 -0
  25. {datashare_python-0.2.15 → datashare_python-0.2.20}/datashare_python/types_.py +0 -0
  26. {datashare_python-0.2.15 → datashare_python-0.2.20}/datashare_python/utils.py +0 -0
  27. {datashare_python-0.2.15 → datashare_python-0.2.20}/datashare_python/worker.py +0 -0
@@ -1,7 +1,7 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: datashare-python
3
- Version: 0.2.15
4
- Summary: Manage Python tasks and local resources in Datashare
3
+ Version: 0.2.20
4
+ Summary: Manage Pythoœn tasks and local resources in Datashare
5
5
  Project-URL: Homepage, https://icij.github.io/datashare-python/
6
6
  Project-URL: Documentation, https://icij.github.io/datashare-python/
7
7
  Project-URL: Repository, https://github.com/ICIJ/datashare-python
@@ -8,9 +8,8 @@ from typing import Any
8
8
  import tomlkit
9
9
  from hatchling.builders.hooks.plugin.interface import BuildHookInterface
10
10
 
11
- import datashare_python
12
-
13
- from .constants import PACKAGE_DIR, PACKAGE_ROOT
11
+ PACKAGE_DIR = Path(__file__).parent
12
+ PACKAGE_ROOT = PACKAGE_DIR.parent
14
13
 
15
14
  ALLOWED_EXTS = {
16
15
  ".py",
@@ -23,7 +22,11 @@ ALLOWED_EXTS = {
23
22
 
24
23
  class CopyTemplateHook(BuildHookInterface):
25
24
  def initialize(self, version: str, build_data: dict[str, Any]) -> None: # noqa: ARG002
26
- 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")
27
30
 
28
31
 
29
32
  def build_template_tarball() -> None:
@@ -44,7 +47,7 @@ def build_template_tarball() -> None:
44
47
 
45
48
  def init_project(name: str, path: Path) -> None:
46
49
  destination = path / name
47
- template_tar = files(datashare_python.__name__)
50
+ template_tar = files("datashare_python")
48
51
  with (
49
52
  as_file(template_tar / "worker-template.tar.gz") as tar_path,
50
53
  tarfile.open(tar_path, mode="r:gz") as tar,
@@ -1,7 +1,7 @@
1
1
  [project]
2
2
  name = "datashare-python"
3
- version = "0.2.15"
4
- description = "Manage Python tasks and local resources in Datashare"
3
+ version = "0.2.20"
4
+ description = "Manage Pythoœn tasks and local resources in Datashare"
5
5
  authors = [
6
6
  { name = "Clément Doumouro", email = "cdoumouro@icij.org" },
7
7
  { name = "Clément Doumouro", email = "clement.doumouro@gmail.com" },
@@ -33,16 +33,23 @@ Issues = "https://github.com/ICIJ/datashare-python/issues"
33
33
  datashare-python = "datashare_python.__main__:main"
34
34
 
35
35
  [build-system]
36
- requires = ["hatchling"]
36
+ requires = [
37
+ "hatchling",
38
+ "tomlkit==0.14.0"
39
+ ]
37
40
  build-backend = "hatchling.build"
38
41
 
42
+ [tool.hatch.build.hooks.custom]
43
+ path = "datashare_python/template.py"
44
+
45
+ [tool.hatch.build.targets.sdist]
46
+ only-include = ["datashare_python"]
47
+
39
48
  [tool.hatch.build.targets.wheel]
40
49
  artifacts = [
41
50
  "datashare_python/worker-template.tar.gz"
42
51
  ]
43
52
 
44
- [tool.hatch.build.targets.sdist]
45
- only-include = ["datashare_python"]
46
53
 
47
54
  [tool.uv]
48
55
  package = true