-
Notifications
You must be signed in to change notification settings - Fork 732
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
Run uv build
builds in the source distribution bucket
#8220
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
When building a source distribution to a wheels, we perform the build inside a temporary directory inside the output directory. By default, the output directory is `dist/` in the repository root. This temp dir placement allows us to move the final wheel to the output directory instead of copying it (a temp dir might be on another device, which means we need to copy instead of moving). Some build backends such as hatchling traverse upwards from the current directory (the source dist build location) looking for gitignore files to consider. By adding a gitignore in `dist/` with `*`, we caused hatchling to ignore all files in our temporary build directory below it, causing empty wheels. To prevent this, we add a `.git` file as a phony git root. We are already using this trick successfully in the cache. Hatchling sees this `.git` file, considers it a boundary and does not traverse up to `dist/.gitignore`. I'd appreciate an eye on potential side effects of adding a `.git` here that I've missed. Fixes #8200
charliermarsh
approved these changes
Oct 15, 2024
Could we instead perform the builds in |
charliermarsh
changed the title
Add a fake git root for
Run Oct 15, 2024
dist
uv build
builds in the source distribution bucket
zanieb
approved these changes
Oct 15, 2024
tmeijn
pushed a commit
to tmeijn/dotfiles
that referenced
this pull request
Oct 16, 2024
This MR contains the following updates: | Package | Update | Change | |---|---|---| | [astral-sh/uv](https://github.com/astral-sh/uv) | patch | `0.4.21` -> `0.4.22` | 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.22`](https://github.com/astral-sh/uv/blob/HEAD/CHANGELOG.md#0422) [Compare Source](astral-sh/uv@0.4.21...0.4.22) ##### Enhancements - Respect `[tool.uv.sources]` in build requirements ([#​7172](astral-sh/uv#7172)) ##### Preview features - Add a dedicated `uv publish` error message for missing usernames ([#​8045](astral-sh/uv#8045)) - Support interactive input in `uv publish` ([#​8158](astral-sh/uv#8158)) - Use raw filenames in `uv publish` ([#​8204](astral-sh/uv#8204)) ##### Performance - Reuse the result of `which git` ([#​8224](astral-sh/uv#8224)) ##### Bug fixes - Avoid environment check optimization for `uv pip install --exact` ([#​8219](astral-sh/uv#8219)) - Do not use free-threaded interpreters without a free-threaded request ([#​8191](astral-sh/uv#8191)) - Don't recommend `--prerelease=allow` during build requirement resolution errors ([#​8192](astral-sh/uv#8192)) - Prefer optimized builds for free-threaded Python downloads ([#​8196](astral-sh/uv#8196)) - Retain old `python-build-standalone` releases ([#​8216](astral-sh/uv#8216)) - Run `uv build` builds in the source distribution bucket ([#​8220](astral-sh/uv#8220)) </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
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.
When building a source distribution to a wheels, we perform the build inside a temporary directory inside the output directory. By default, the output directory is
dist/
in the repository root. This temp dir placement allows us to move the final wheel to the output directory instead of copying it (a temp dir might be on another device, which means we need to copy instead of moving).Some build backends such as hatchling traverse upwards from the current directory (the source dist build location) looking for gitignore files to consider. By adding a gitignore in
dist/
with*
, we caused hatchling to ignore all files in our temporary build directory below it, causing empty wheels. To prevent this, we add a.git
file as a phony git root. We are already using this trick successfully in the cache. Hatchling sees this.git
file, considers it a boundary and does not traverse up todist/.gitignore
.Fixes #8200