Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 28 additions & 0 deletions .github/workflows/zarr-http-server-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,34 @@ jobs:
uv run --with "${wheel}" --python 3.12 --no-project \
python -c "import zarr_http_server; print('zarr_http_server', zarr_http_server.__version__)"

# The sdist has to stand alone, and `hatch build` above builds the wheel
# from the source tree, not from the sdist. So build a wheel from the
# sdist with pip, which unpacks it under the sdist format's rules (no
# links out of the archive), then run the package's own tests and strict
# docs build from the unpacked sdist. This job has no checkout, so
# nothing comes from the repository; zarr, where a package uses it,
# resolves from PyPI.
- name: Build a wheel from the sdist with pip
run: |
sdist=$(ls dist/*.tar.gz)
uvx --python 3.12 pip@26.2.1 wheel --no-deps --wheel-dir sdist-wheel "${sdist}"

- name: Install just
uses: extractions/setup-crate@7577c1bdf2d95e6d65d532788f35ed79d4b1dda2 # v2.0.1
with:
repo: casey/just
version: 1.58.0

- name: Test and build docs from the unpacked sdist
env:
UV_PYTHON: '3.12'
run: |
mkdir sdist
tar -xzf dist/*.tar.gz -C sdist
cd sdist/*/
just test
just docs-check

upload_pypi:
name: Upload to PyPI
needs: [build, test_artifacts]
Expand Down
28 changes: 28 additions & 0 deletions .github/workflows/zarr-indexing-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,34 @@ jobs:
uv run --with "${wheel}" --python 3.12 --no-project \
python -c "import zarr_indexing; print('zarr_indexing', zarr_indexing.__version__)"

# The sdist has to stand alone, and `hatch build` above builds the wheel
# from the source tree, not from the sdist. So build a wheel from the
# sdist with pip, which unpacks it under the sdist format's rules (no
# links out of the archive), then run the package's own tests and strict
# docs build from the unpacked sdist. This job has no checkout, so
# nothing comes from the repository; zarr, where a package uses it,
# resolves from PyPI.
- name: Build a wheel from the sdist with pip
run: |
sdist=$(ls dist/*.tar.gz)
uvx --python 3.12 pip@26.2.1 wheel --no-deps --wheel-dir sdist-wheel "${sdist}"

- name: Install just
uses: extractions/setup-crate@7577c1bdf2d95e6d65d532788f35ed79d4b1dda2 # v2.0.1
with:
repo: casey/just
version: 1.58.0

- name: Test and build docs from the unpacked sdist
env:
UV_PYTHON: '3.12'
run: |
mkdir sdist
tar -xzf dist/*.tar.gz -C sdist
cd sdist/*/
just test
just docs-check

upload_pypi:
name: Upload to PyPI
needs: [build, test_artifacts]
Expand Down
28 changes: 28 additions & 0 deletions .github/workflows/zarr-metadata-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,34 @@ jobs:
uv run --with "${wheel}" --python 3.12 --no-project \
python -c "import zarr_metadata; print('zarr_metadata', zarr_metadata.__version__)"

# The sdist has to stand alone, and `hatch build` above builds the wheel
# from the source tree, not from the sdist. So build a wheel from the
# sdist with pip, which unpacks it under the sdist format's rules (no
# links out of the archive), then run the package's own tests and strict
# docs build from the unpacked sdist. This job has no checkout, so
# nothing comes from the repository; zarr, where a package uses it,
# resolves from PyPI.
- name: Build a wheel from the sdist with pip
run: |
sdist=$(ls dist/*.tar.gz)
uvx --python 3.12 pip@26.2.1 wheel --no-deps --wheel-dir sdist-wheel "${sdist}"

- name: Install just
uses: extractions/setup-crate@7577c1bdf2d95e6d65d532788f35ed79d4b1dda2 # v2.0.1
with:
repo: casey/just
version: 1.58.0

- name: Test and build docs from the unpacked sdist
env:
UV_PYTHON: '3.12'
run: |
mkdir sdist
tar -xzf dist/*.tar.gz -C sdist
cd sdist/*/
just test
just docs-check

upload_pypi:
name: Upload to PyPI
needs: [build, test_artifacts]
Expand Down
2 changes: 0 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -96,5 +96,3 @@ zarr.egg-info/
.claude/
CLAUDE.md
docs/superpowers/
# zarr-metadata package lockfile (a library, not an app)
packages/zarr-metadata/uv.lock
1 change: 1 addition & 0 deletions changes/4407.misc.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Building `zarr` from source now requires `setuptools-scm>=9`, which replaces the deprecated `git_describe_command` version option with `scm.git.describe_command`.
4 changes: 2 additions & 2 deletions packages/zarr-http-server/pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[build-system]
requires = ["hatchling>=1.29.0", "hatch-vcs"]
requires = ["hatchling>=1.29.0", "hatch-vcs", "setuptools-scm>=9"]
build-backend = "hatchling.build"

[project]
Expand Down Expand Up @@ -82,7 +82,7 @@ tag-pattern = '^zarr_http_server-v(?P<version>.+)$'
# `git_describe_command` ensures we get the zarr_http_server tags instead of latest.
# `local_scheme` strips the git commit info so the appending info is just a counter from latest tag.
# test-pypi doesn't accept git commit info in tags, and the count should be enough to distinguish unique runs.
raw-options = { root = "../..", git_describe_command = "git describe --dirty --tags --long --match zarr_http_server-v*", local_scheme = "no-local-version" }
raw-options = { root = "../..", scm = { git = { describe_command = "git describe --dirty --tags --long --match zarr_http_server-v*" } }, local_scheme = "no-local-version" }

[tool.hatch.build.targets.wheel]
packages = ["src/zarr_http_server"]
Expand Down
4 changes: 2 additions & 2 deletions packages/zarr-indexing/pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[build-system]
requires = ["hatchling>=1.29.0", "hatch-vcs"]
requires = ["hatchling>=1.29.0", "hatch-vcs", "setuptools-scm>=9"]
build-backend = "hatchling.build"

[project]
Expand Down Expand Up @@ -73,7 +73,7 @@ tag-pattern = '^zarr_indexing-v(?P<version>.+)$'
# `git_describe_command` ensures we get the zarr_indexing tags instead of latest.
# `local_scheme` strips the git commit info so the appending info is just a counter from latest tag.
# test-pypi doesn't accept git commit info in tags, and the count should be enough to distinguish unique runs.
raw-options = { root = "../..", git_describe_command = "git describe --dirty --tags --long --match zarr_indexing-v*", local_scheme = "no-local-version" }
raw-options = { root = "../..", scm = { git = { describe_command = "git describe --dirty --tags --long --match zarr_indexing-v*" } }, local_scheme = "no-local-version" }

[tool.hatch.build.targets.wheel]
packages = ["src/zarr_indexing"]
Expand Down
4 changes: 2 additions & 2 deletions packages/zarr-metadata/pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[build-system]
requires = ["hatchling>=1.29.0", "hatch-vcs"]
requires = ["hatchling>=1.29.0", "hatch-vcs", "setuptools-scm>=9"]
build-backend = "hatchling.build"

[project]
Expand Down Expand Up @@ -68,7 +68,7 @@ tag-pattern = '^zarr_metadata-v(?P<version>.+)$'
# `git_describe_command` ensures we get the zarr_metadata tags instead of latest.
# `local_scheme` strips the git commit info so the appending info is just a counter from latest tag.
# test-pypi doesn't accept git commit info in tags, and the count should be enough to distinguish unique runs.
raw-options = { root = "../..", git_describe_command = "git describe --dirty --tags --long --match zarr_metadata-v*", local_scheme = "no-local-version" }
raw-options = { root = "../..", scm = { git = { describe_command = "git describe --dirty --tags --long --match zarr_metadata-v*" } }, local_scheme = "no-local-version" }

[tool.hatch.build.targets.wheel]
packages = ["src/zarr_metadata"]
Expand Down
Loading
Loading