You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Closes#2553
# Rationale for this change
During the release process cleanup, I also had prototyped a migration
from Poetry to UV. I used the
https://github.com/mkniewallner/migrate-to-uv package to migrate to UV
and ran a release workflow and some others like doc serve for
validation.
This PR also migrates the Makefile to use UV. I'll still need to upgrade
the docs to reflect the UV contribution workflow. I think it would be a
good start to push up as a prototype, and have others checkout and give
it a try.
## Build System Changes
### Build Backend
UV doesn't have a Poetry-equivalent build backend with build hooks, so
I've switched to __setuptools__ with native Cython support for the avro
changes.
```
[build-system]
requires = ["setuptools>=80", "wheel", "Cython>=3.0.0"]
build-backend = "setuptools.build_meta"
```
### Packaging for release
__PEP 639 License Compliance__
By going to the test above the license is now properly included in the
release metadata
```toml
[project]
license = "Apache-2.0" # SPDX identifier
license-files = ["LICEN[CS]E*", "NOTICE*"] # Automatic inclusion
```
### Build Verification
__Release builds verified:__
```bash
uv build --sdist # Source distribution with correct metadata
uv build --wheel # Wheel with compiled Cython extensions
check-wheel-contents dist/ # Quality checks pass
```
__Wheel vs Poetry:__
The migration addresses a packaging issue where Poetry was building
non-standard "fat" wheels. Binary comparison using diff revealed
significant differences in wheel structure between Poetry and UV builds.
```
diff -rq uv-wheel poetry-wheel
Only in poetry-wheel/pyiceberg/avro: decoder_basic.c <-- built into .so so not needed :)
Only in poetry-wheel/pyiceberg/avro: decoder_fast.cpython-310-darwin.so
Only in poetry-wheel/pyiceberg/avro: decoder_fast.cpython-311-darwin.so
Only in poetry-wheel: NOTICE
Files uv-wheel/pyiceberg/avro/decoder_fast.cpython-312-darwin.so and poetry-wheel/pyiceberg/avro/decoder_fast.cpython-312-darwin.so differ
```
Poetry's wheels tagged for a specific Python version (e.g.,
`cp312-cp312`) contained compiled extensions for multiple Python
versions simultaneously. The comparison shows that a Python 3.12 wheel
included `decoder_fast.cpython-310-darwin.so` and
`decoder_fast.cpython-311-darwin.so` alongside the correct binary. These
wheels also included source files and placed NOTICE at the wheel root
instead of `dist-info/licenses/`.
The new build process with `cibuildwheel` creates standard
PyPI-compliant wheels where each wheel contains only its corresponding
Python version's binary. This reduces wheel size while ensuring proper
PEP 639 license file placement in `dist-info/licenses/`.
Test builds are deployed also can be checked against the repo above.
## Are these changes tested?
Yes
- [x] `make install` Environment setup and dependency installation
- [x] `make test` - Unit tests
- [x] `make test-integration` - Integration tests with all extras
- [x] `make lint` - Linting and code quality checks
- [x] `make doc-install && make doc-serve` - Documentation
## Are there any user-facing changes?
No user facing changes. Contributors will need to use UV instead of
Poetry for development, but all make targets remain the same. So not
really?
---------
Co-authored-by: Kevin Liu <kevinjqliu@users.noreply.github.com>
0 commit comments