-
Notifications
You must be signed in to change notification settings - Fork 760
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support uv build --wheel
from source distributions
#6898
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
charliermarsh
added
enhancement
New feature or improvement to existing functionality
cli
Related to the command line interface
labels
Aug 31, 2024
charliermarsh
force-pushed
the
charlie/sdist-from-wheel
branch
2 times, most recently
from
August 31, 2024 18:37
80f99be
to
5873c77
Compare
charliermarsh
force-pushed
the
charlie/build
branch
from
August 31, 2024 18:39
6933f30
to
e05c723
Compare
charliermarsh
force-pushed
the
charlie/sdist-from-wheel
branch
3 times, most recently
from
August 31, 2024 23:02
5ad53ad
to
c398ea4
Compare
konstin
approved these changes
Sep 2, 2024
charliermarsh
force-pushed
the
charlie/build
branch
2 times, most recently
from
September 2, 2024 18:30
6096edd
to
76ad85a
Compare
charliermarsh
force-pushed
the
charlie/sdist-from-wheel
branch
from
September 2, 2024 18:30
c398ea4
to
4a6a11b
Compare
charliermarsh
force-pushed
the
charlie/build
branch
from
September 2, 2024 19:48
76ad85a
to
34fea79
Compare
charliermarsh
force-pushed
the
charlie/sdist-from-wheel
branch
2 times, most recently
from
September 2, 2024 19:52
f8f38c6
to
47e92e6
Compare
zanieb
approved these changes
Sep 3, 2024
charliermarsh
force-pushed
the
charlie/build
branch
from
September 3, 2024 23:41
34fea79
to
8605599
Compare
charliermarsh
force-pushed
the
charlie/sdist-from-wheel
branch
from
September 3, 2024 23:57
47e92e6
to
6ca14bc
Compare
charliermarsh
force-pushed
the
charlie/build
branch
2 times, most recently
from
September 4, 2024 00:27
da3a201
to
c2536ad
Compare
charliermarsh
force-pushed
the
charlie/sdist-from-wheel
branch
2 times, most recently
from
September 4, 2024 00:42
0dc20bc
to
99745b0
Compare
charliermarsh
force-pushed
the
charlie/build
branch
from
September 4, 2024 13:39
c2536ad
to
97bb372
Compare
charliermarsh
force-pushed
the
charlie/sdist-from-wheel
branch
from
September 4, 2024 13:39
99745b0
to
adf0638
Compare
charliermarsh
force-pushed
the
charlie/build
branch
from
September 4, 2024 15:13
97bb372
to
b4702d1
Compare
charliermarsh
added a commit
that referenced
this pull request
Sep 4, 2024
## Summary This PR exposes uv's PEP 517 implementation via a `uv build` frontend, such that you can use `uv build` to build source and binary distributions (i.e., wheels and sdists) from a given directory. There are some TODOs that I'll tackle in separate PRs: - [x] Support building a wheel from a source distribution (rather than from source) (#6898) - [x] Stream the build output (#6912) Closes #1510 Closes #1663.
charliermarsh
force-pushed
the
charlie/sdist-from-wheel
branch
from
September 4, 2024 15:24
adf0638
to
c819ea7
Compare
Open
1 task
tmeijn
pushed a commit
to tmeijn/dotfiles
that referenced
this pull request
Sep 11, 2024
This MR contains the following updates: | Package | Update | Change | |---|---|---| | [astral-sh/uv](https://github.com/astral-sh/uv) | patch | `0.4.4` -> `0.4.9` | MR created with the help of [el-capitano/tools/renovate-bot](https://gitlab.com/el-capitano/tools/renovate-bot). **Proposed changes to behavior should be submitted there as MRs.** --- ### Release Notes <details> <summary>astral-sh/uv (astral-sh/uv)</summary> ### [`v0.4.9`](https://github.com/astral-sh/uv/blob/HEAD/CHANGELOG.md#049) [Compare Source](astral-sh/uv@0.4.8...0.4.9) ##### Enhancements - Add support for managed Python 3.13 ([#​7263](astral-sh/uv#7263)) - Upgrade managed CPython versions to latest patch releases ([#​7263](astral-sh/uv#7263)) - Allow setting a target version for `uv self update` ([#​7252](astral-sh/uv#7252)) - Create `py.typed` files during `uv init --lib` ([#​7232](astral-sh/uv#7232)) - Add a dedicated error for packages that fail due to `distutils` deprecation ([#​7239](astral-sh/uv#7239)) - Improve error message when requested Python version is unsupported ([#​7269](astral-sh/uv#7269)) - Add `uv run --no-sync` ([#​7192](\(https://github.com/astral-sh/uv/pull/7192\)) ##### Bug fixes - Avoid updating `pyproject.toml` offsets on non-add edits ([#​7262](astral-sh/uv#7262)) - Invalidate cache when `--config-settings` change ([#​7139](astral-sh/uv#7139)) - Remove workspace root for single-member workspace with `uv export` ([#​7254](astral-sh/uv#7254)) ### [`v0.4.8`](https://github.com/astral-sh/uv/blob/HEAD/CHANGELOG.md#048) [Compare Source](astral-sh/uv@0.4.7...0.4.8) ##### Enhancements - Add support for dynamic cache keys ([#​7136](astral-sh/uv#7136)) - Allow `.dist-info` names with dashes for post releases ([#​7208](astral-sh/uv#7208)) - Use type hints in code from `uv init` ([#​7225](astral-sh/uv#7225)) - Treat `.tgz` the same as `.tar.gz` ([#​7201](astral-sh/uv#7201)) - Direct users towards `uv venv` to create a virtual environment ([#​7188](astral-sh/uv#7188)) - Improve error message for uv init already init-ed ([#​7198](astral-sh/uv#7198)) ##### Performance - Avoid batch prefetching for un-optimized registries ([#​7226](astral-sh/uv#7226)) - Avoid iteration for singleton selections ([#​7195](astral-sh/uv#7195)) ##### Bug fixes - Avoid extra newlines in debug logging for source builds ([#​7174](astral-sh/uv#7174)) - Prune unreachable packages from `--universal` output ([#​7209](astral-sh/uv#7209)) - Respect exclusion when collecting workspace members ([#​7175](astral-sh/uv#7175)) - Use path file instead of `sitecustomize.py` ([#​7161](astral-sh/uv#7161)) - Replace incorrect `--source` and `--binary` flags with correct `--sdist` and `--wheel` flags in `uv build` ([#​7156](astral-sh/uv#7156)) ##### Documentation - Document support for `UV_INSTALL_DIR` ([#​7107](astral-sh/uv#7107)) - List all supported sdist formats ([#​7168](astral-sh/uv#7168)) ### [`v0.4.7`](https://github.com/astral-sh/uv/blob/HEAD/CHANGELOG.md#047) [Compare Source](astral-sh/uv@0.4.6...0.4.7) ##### Enhancements - Add `--no-emit-project` and friends to `uv export` ([#​7110](astral-sh/uv#7110)) - Add `--output-file` to `uv export` ([#​7109](astral-sh/uv#7109)) - Prune unused source distributions from the cache in `uv cache prune` ([#​7112](astral-sh/uv#7112)) - Take intersection of constraint and requirements hashes ([#​7108](astral-sh/uv#7108)) ##### Performance - Skip metadata fetch for `--no-deps` and `pip sync` ([#​7127](astral-sh/uv#7127)) ##### Bug fixes - Avoid panicking when encountering an invalid Python version during `uv python list` ([#​7131](astral-sh/uv#7131)) - Write trailing newline to `.python-version` files ([#​7140](astral-sh/uv#7140)) ### [`v0.4.6`](https://github.com/astral-sh/uv/blob/HEAD/CHANGELOG.md#046) [Compare Source](astral-sh/uv@0.4.5...0.4.6) ##### Enhancements - Accept `--build-constraints` in `uv build` ([#​7085](astral-sh/uv#7085)) - Add `--require-hashes` and `--verify-hashes` to `uv build` ([#​7094](astral-sh/uv#7094)) - Add `--show-version-specifiers` to `uv tool list` ([#​7050](astral-sh/uv#7050)) - Respect hashes in constraints files ([#​7093](astral-sh/uv#7093)) - Upgrade installer scripts ([#​7092](astral-sh/uv#7092)) - Allow specifying multiple packages in `uv tool upgrade` and `uninstall` ([#​7037](astral-sh/uv#7037)) - Sort by implementation in `uv python list` ([#​6918](astral-sh/uv#6918)) ##### Bug fixes - Invalidate lockfile when member versions change ([#​7102](astral-sh/uv#7102)) - Strip fragments from direct source URLs in lockfile ([#​7061](astral-sh/uv#7061)) - Support `--no-build` and `--no-binary` in `uv sync` et al ([#​7100](astral-sh/uv#7100)) - Use distribution hash over registry hash ([#​7060](astral-sh/uv#7060)) - Fix inverted log message ([#​7063](astral-sh/uv#7063)) - Adjust Docker `ENTRYPOINT` and `CMD` for inherited images ([#​7054](astral-sh/uv#7054)) ##### Documentation - Add winget to installers ([#​7088](astral-sh/uv#7088)) - Document how to disable path modifications during install ([#​7090](astral-sh/uv#7090)) - Document how to manually update locked package version ([#​7083](astral-sh/uv#7083)) - Document official `setup-uv` action ([#​7056](astral-sh/uv#7056)) - Update docs on `.python-version` file ([#​7051](astral-sh/uv#7051)) ### [`v0.4.5`](https://github.com/astral-sh/uv/blob/HEAD/CHANGELOG.md#045) [Compare Source](astral-sh/uv@0.4.4...0.4.5) ##### Enhancements - Implement `uv build` ([#​6895](astral-sh/uv#6895)) - Add `--package` support to `uv build` ([#​6990](astral-sh/uv#6990)) - Prune unreachable packages from lockfile ([#​6959](astral-sh/uv#6959)) - Prune unreachable wheels from lockfile ([#​6961](astral-sh/uv#6961)) - Show build output by default in `uv build` ([#​6912](astral-sh/uv#6912)) - Support `uv build --wheel` from source distributions ([#​6898](astral-sh/uv#6898)) - Use the root project name for the project virtual environment prompt ([#​7021](astral-sh/uv#7021)) ##### Bug fixes - Fix handling of inline optional dependencies in `uv add` ([#​7023](astral-sh/uv#7023)) - Reflect exit code in `uv tool run` and `uv run` ([#​6994](astral-sh/uv#6994)) - Revert `pyproject.toml` modifications on Ctrl-C ([#​7024](astral-sh/uv#7024)) - Rollback `pyproject.toml` changes on all errors ([#​7022](astral-sh/uv#7022)) - Use correct ordering semantics for narrowing upper-bounded Python requirements ([#​7031](astral-sh/uv#7031)) - Fix segfault in Windows trampolines ([#​6955](astral-sh/uv#6955)) - Remove unused `__future__.annotations` import in `_virtualenv.py` ([#​6996](astral-sh/uv#6996)) ##### Documentation - Add documentation for `uv build` ([#​6991](astral-sh/uv#6991)) - Add note to `extra` and `all-extras` in `uv sync` help ([#​7013](astral-sh/uv#7013)) - Add project docs for `project.scripts` ([#​7010](astral-sh/uv#7010)) - Fix available Docker image tag rendering and shorten list ([#​7017](astral-sh/uv#7017)) - Touchup to the project environment config section ([#​7038](astral-sh/uv#7038)) - Clarify precedence of `uv.toml` ([#​6986](astral-sh/uv#6986)) - Fix available Docker tags for `-slim` variants ([#​7041](astral-sh/uv#7041)) </details> --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever MR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this MR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this MR, check this box --- This MR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy40NDAuNyIsInVwZGF0ZWRJblZlciI6IjM3LjQ0MC43IiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6WyJSZW5vdmF0ZSBCb3QiXX0=-->
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
cli
Related to the command line interface
enhancement
New feature or improvement to existing functionality
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
This PR allows users to run
uv build --wheel ./path/to/source.tar.gz
to build a wheel from a source distribution. This is also the default behavior if you runuv build ./path/to/source.tar.gz
. If you pass--sdist
, we error.