Skip to content

Commit

Permalink
Update references to python-build-standalone to reflect the transfe…
Browse files Browse the repository at this point in the history
…rred project (#9977)
  • Loading branch information
zanieb authored Dec 17, 2024
1 parent e730ef1 commit d70160a
Show file tree
Hide file tree
Showing 16 changed files with 2,679 additions and 2,679 deletions.
4 changes: 2 additions & 2 deletions crates/uv-cli/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4183,7 +4183,7 @@ pub enum PythonCommand {
///
/// Multiple Python versions may be requested.
///
/// Supports CPython and PyPy. CPython distributions are downloaded from the
/// Supports CPython and PyPy. CPython distributions are downloaded from the Astral
/// `python-build-standalone` project. PyPy distributions are downloaded from `python.org`.
///
/// Python versions are installed into the uv Python directory, which can be retrieved with `uv
Expand Down Expand Up @@ -4315,7 +4315,7 @@ pub struct PythonInstallArgs {

/// Set the URL to use as the source for downloading Python installations.
///
/// The provided URL will replace `https://github.com/indygreg/python-build-standalone/releases/download` in, e.g., `https://github.com/indygreg/python-build-standalone/releases/download/20240713/cpython-3.12.4%2B20240713-aarch64-apple-darwin-install_only.tar.gz`.
/// The provided URL will replace `https://github.com/astral-sh/python-build-standalone/releases/download` in, e.g., `https://github.com/astral-sh/python-build-standalone/releases/download/20240713/cpython-3.12.4%2B20240713-aarch64-apple-darwin-install_only.tar.gz`.
///
/// Distributions can be read from a local directory by using the `file://` URL scheme.
#[arg(long, env = EnvVars::UV_PYTHON_INSTALL_MIRROR)]
Expand Down
3,330 changes: 1,665 additions & 1,665 deletions crates/uv-python/download-metadata.json

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions crates/uv-python/fetch-download-metadata.py
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ class CPythonFinder(Finder):
implementation = ImplementationName.CPYTHON

RELEASE_URL = (
"https://api.github.com/repos/indygreg/python-build-standalone/releases"
"https://api.github.com/repos/astral-sh/python-build-standalone/releases"
)

FLAVOR_PREFERENCES = [
Expand Down Expand Up @@ -333,7 +333,7 @@ async def fetch_checksums(url: str) -> httpx.Response | None:
def _parse_download_url(self, url: str) -> PythonDownload | None:
"""Parse an indygreg download URL into a PythonDownload object."""
# Ex)
# https://github.com/indygreg/python-build-standalone/releases/download/20240107/cpython-3.12.1%2B20240107-aarch64-unknown-linux-gnu-lto-full.tar.zst
# https://github.com/astral-sh/python-build-standalone/releases/download/20240107/cpython-3.12.1%2B20240107-aarch64-unknown-linux-gnu-lto-full.tar.zst
if url.endswith(".sha256"):
return None
filename = unquote(url.rsplit("/", maxsplit=1)[-1])
Expand Down
1,960 changes: 980 additions & 980 deletions crates/uv-python/src/downloads.inc

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion crates/uv-python/src/downloads.rs
Original file line number Diff line number Diff line change
Expand Up @@ -657,7 +657,7 @@ impl ManagedPythonDownload {
LenientImplementationName::Known(ImplementationName::CPython) => {
if let Some(mirror) = python_install_mirror {
let Some(suffix) = self.url.strip_prefix(
"https://github.com/indygreg/python-build-standalone/releases/download/",
"https://github.com/astral-sh/python-build-standalone/releases/download/",
) else {
return Err(Error::Mirror(EnvVars::UV_PYTHON_INSTALL_MIRROR, self.url));
};
Expand Down
2 changes: 1 addition & 1 deletion crates/uv-python/src/interpreter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -434,7 +434,7 @@ impl Interpreter {
/// `python-build-standalone`; if it returns `false`, the interpreter is definitely _not_ from
/// `python-build-standalone`.
///
/// See: <https://github.com/indygreg/python-build-standalone/issues/382>
/// See: <https://github.com/astral-sh/python-build-standalone/issues/382>
pub fn is_standalone(&self) -> bool {
self.standalone
}
Expand Down
6 changes: 3 additions & 3 deletions crates/uv-settings/src/settings.rs
Original file line number Diff line number Diff line change
Expand Up @@ -709,16 +709,16 @@ pub struct ResolverInstallerOptions {
pub struct PythonInstallMirrors {
/// Mirror URL for downloading managed Python installations.
///
/// By default, managed Python installations are downloaded from [`python-build-standalone`](https://github.com/indygreg/python-build-standalone).
/// By default, managed Python installations are downloaded from [`python-build-standalone`](https://github.com/astral-sh/python-build-standalone).
/// This variable can be set to a mirror URL to use a different source for Python installations.
/// The provided URL will replace `https://github.com/indygreg/python-build-standalone/releases/download` in, e.g., `https://github.com/indygreg/python-build-standalone/releases/download/20240713/cpython-3.12.4%2B20240713-aarch64-apple-darwin-install_only.tar.gz`.
/// The provided URL will replace `https://github.com/astral-sh/python-build-standalone/releases/download` in, e.g., `https://github.com/astral-sh/python-build-standalone/releases/download/20240713/cpython-3.12.4%2B20240713-aarch64-apple-darwin-install_only.tar.gz`.
///
/// Distributions can be read from a local directory by using the `file://` URL scheme.
#[option(
default = "None",
value_type = "str",
example = r#"
python-install-mirror = "https://github.com/indygreg/python-build-standalone/releases/download"
python-install-mirror = "https://github.com/astral-sh/python-build-standalone/releases/download"
"#
)]
pub python_install_mirror: Option<String>,
Expand Down
8 changes: 4 additions & 4 deletions crates/uv-static/src/env_vars.rs
Original file line number Diff line number Diff line change
Expand Up @@ -218,11 +218,11 @@ impl EnvVars {
/// Specifies the directory for storing managed Python installations.
pub const UV_PYTHON_INSTALL_DIR: &'static str = "UV_PYTHON_INSTALL_DIR";

/// Managed Python installations are downloaded from
/// [`python-build-standalone`](https://github.com/indygreg/python-build-standalone).
/// Managed Python installations are downloaded from the Astral
/// [`python-build-standalone`](https://github.com/astral-sh/python-build-standalone) project.
/// This variable can be set to a mirror URL to use a different source for Python installations.
/// The provided URL will replace `https://github.com/indygreg/python-build-standalone/releases/download` in, e.g.,
/// `https://github.com/indygreg/python-build-standalone/releases/download/20240713/cpython-3.12.4%2B20240713-aarch64-apple-darwin-install_only.tar.gz`.
/// The provided URL will replace `https://github.com/astral-sh/python-build-standalone/releases/download` in, e.g.,
/// `https://github.com/astral-sh/python-build-standalone/releases/download/20240713/cpython-3.12.4%2B20240713-aarch64-apple-darwin-install_only.tar.gz`.
/// Distributions can be read from a local directory by using the `file://` URL scheme.
pub const UV_PYTHON_INSTALL_MIRROR: &'static str = "UV_PYTHON_INSTALL_MIRROR";

Expand Down
8 changes: 4 additions & 4 deletions crates/uv/tests/it/help.rs
Original file line number Diff line number Diff line change
Expand Up @@ -460,8 +460,8 @@ fn help_subsubcommand() {
Multiple Python versions may be requested.
Supports CPython and PyPy. CPython distributions are downloaded from the `python-build-standalone`
project. PyPy distributions are downloaded from `python.org`.
Supports CPython and PyPy. CPython distributions are downloaded from the Astral
`python-build-standalone` project. PyPy distributions are downloaded from `python.org`.
Python versions are installed into the uv Python directory, which can be retrieved with `uv python
dir`.
Expand Down Expand Up @@ -500,8 +500,8 @@ fn help_subsubcommand() {
Set the URL to use as the source for downloading Python installations.
The provided URL will replace
`https://github.com/indygreg/python-build-standalone/releases/download` in, e.g.,
`https://github.com/indygreg/python-build-standalone/releases/download/20240713/cpython-3.12.4%2B20240713-aarch64-apple-darwin-install_only.tar.gz`.
`https://github.com/astral-sh/python-build-standalone/releases/download` in, e.g.,
`https://github.com/astral-sh/python-build-standalone/releases/download/20240713/cpython-3.12.4%2B20240713-aarch64-apple-darwin-install_only.tar.gz`.
Distributions can be read from a local directory by using the `file://` URL scheme.
Expand Down
8 changes: 4 additions & 4 deletions docs/concepts/python-versions.md
Original file line number Diff line number Diff line change
Expand Up @@ -272,10 +272,10 @@ uv supports downloading and installing CPython and PyPy distributions.
### CPython distributions

As Python does not publish official distributable CPython binaries, uv instead uses pre-built
third-party distributions from the
[`python-build-standalone`](https://github.com/indygreg/python-build-standalone) project.
`python-build-standalone` is partially maintained by the uv maintainers and is used in many other
Python projects, like [Rye](https://github.com/astral-sh/rye) and
distributions from the Astral
[`python-build-standalone`](https://github.com/astral-sh/python-build-standalone) project.
`python-build-standalone` is also is used in many other Python projects, like
[Rye](https://github.com/astral-sh/rye), [Mise](https://mise.jdx.dev/lang/python.html), and
[bazelbuild/rules_python](https://github.com/bazelbuild/rules_python).

The uv Python distributions are self-contained, highly-portable, and performant. While Python can be
Expand Down
8 changes: 4 additions & 4 deletions docs/configuration/environment.md
Original file line number Diff line number Diff line change
Expand Up @@ -290,11 +290,11 @@ Specifies the directory for storing managed Python installations.

### `UV_PYTHON_INSTALL_MIRROR`

Managed Python installations are downloaded from
[`python-build-standalone`](https://github.com/indygreg/python-build-standalone).
Managed Python installations are downloaded from the Astral
[`python-build-standalone`](https://github.com/astral-sh/python-build-standalone) project.
This variable can be set to a mirror URL to use a different source for Python installations.
The provided URL will replace `https://github.com/indygreg/python-build-standalone/releases/download` in, e.g.,
`https://github.com/indygreg/python-build-standalone/releases/download/20240713/cpython-3.12.4%2B20240713-aarch64-apple-darwin-install_only.tar.gz`.
The provided URL will replace `https://github.com/astral-sh/python-build-standalone/releases/download` in, e.g.,
`https://github.com/astral-sh/python-build-standalone/releases/download/20240713/cpython-3.12.4%2B20240713-aarch64-apple-darwin-install_only.tar.gz`.
Distributions can be read from a local directory by using the `file://` URL scheme.

### `UV_PYTHON_PREFERENCE`
Expand Down
2 changes: 1 addition & 1 deletion docs/guides/install-python.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ system. If you've previously installed Python with uv, a new version will not be

!!! note

Python does not publish official distributable binaries. As such, uv uses third-party distributions from the [`python-build-standalone`](https://github.com/indygreg/python-build-standalone) project. The project is partially maintained by the uv maintainers and is used by other prominent Python projects (e.g., [Rye](https://github.com/astral-sh/rye), [Bazel](https://github.com/bazelbuild/rules_python)). See the [Python distributions](../concepts/python-versions.md#managed-python-distributions) documentation for more details.
Python does not publish official distributable binaries. As such, uv uses distributions from Astral [`python-build-standalone`](https://github.com/astral-sh/python-build-standalone) project. See the [Python distributions](../concepts/python-versions.md#managed-python-distributions) documentation for more details.

<!-- TODO(zanieb): Restore when Python shim management is added
Note that when an automatic Python installation occurs, the `python` command will not be added to the shell. Use `uv python install-shim` to ensure the `python` shim is installed.
Expand Down
4 changes: 2 additions & 2 deletions docs/reference/cli.md
Original file line number Diff line number Diff line change
Expand Up @@ -4644,7 +4644,7 @@ Download and install Python versions.

Multiple Python versions may be requested.

Supports CPython and PyPy. CPython distributions are downloaded from the `python-build-standalone` project. PyPy distributions are downloaded from `python.org`.
Supports CPython and PyPy. CPython distributions are downloaded from the Astral `python-build-standalone` project. PyPy distributions are downloaded from `python.org`.

Python versions are installed into the uv Python directory, which can be retrieved with `uv python dir`.

Expand Down Expand Up @@ -4734,7 +4734,7 @@ uv python install [OPTIONS] [TARGETS]...
<p>May also be set with the <code>UV_PYTHON_INSTALL_DIR</code> environment variable.</p>
</dd><dt><code>--mirror</code> <i>mirror</i></dt><dd><p>Set the URL to use as the source for downloading Python installations.</p>

<p>The provided URL will replace <code>https://github.com/indygreg/python-build-standalone/releases/download</code> in, e.g., <code>https://github.com/indygreg/python-build-standalone/releases/download/20240713/cpython-3.12.4%2B20240713-aarch64-apple-darwin-install_only.tar.gz</code>.</p>
<p>The provided URL will replace <code>https://github.com/astral-sh/python-build-standalone/releases/download</code> in, e.g., <code>https://github.com/astral-sh/python-build-standalone/releases/download/20240713/cpython-3.12.4%2B20240713-aarch64-apple-darwin-install_only.tar.gz</code>.</p>

<p>Distributions can be read from a local directory by using the <code>file://</code> URL scheme.</p>

Expand Down
8 changes: 4 additions & 4 deletions docs/reference/settings.md
Original file line number Diff line number Diff line change
Expand Up @@ -1412,9 +1412,9 @@ Whether to allow Python downloads.

Mirror URL for downloading managed Python installations.

By default, managed Python installations are downloaded from [`python-build-standalone`](https://github.com/indygreg/python-build-standalone).
By default, managed Python installations are downloaded from [`python-build-standalone`](https://github.com/astral-sh/python-build-standalone).
This variable can be set to a mirror URL to use a different source for Python installations.
The provided URL will replace `https://github.com/indygreg/python-build-standalone/releases/download` in, e.g., `https://github.com/indygreg/python-build-standalone/releases/download/20240713/cpython-3.12.4%2B20240713-aarch64-apple-darwin-install_only.tar.gz`.
The provided URL will replace `https://github.com/astral-sh/python-build-standalone/releases/download` in, e.g., `https://github.com/astral-sh/python-build-standalone/releases/download/20240713/cpython-3.12.4%2B20240713-aarch64-apple-darwin-install_only.tar.gz`.

Distributions can be read from a local directory by using the `file://` URL scheme.

Expand All @@ -1428,12 +1428,12 @@ Distributions can be read from a local directory by using the `file://` URL sche

```toml
[tool.uv]
python-install-mirror = "https://github.com/indygreg/python-build-standalone/releases/download"
python-install-mirror = "https://github.com/astral-sh/python-build-standalone/releases/download"
```
=== "uv.toml"

```toml
python-install-mirror = "https://github.com/indygreg/python-build-standalone/releases/download"
python-install-mirror = "https://github.com/astral-sh/python-build-standalone/releases/download"
```

---
Expand Down
2 changes: 1 addition & 1 deletion scripts/create-python-mirror.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
REPO_ROOT = SELF_DIR.parent
VERSIONS_FILE = REPO_ROOT / "crates" / "uv-python" / "download-metadata.json"
PREFIXES = [
"https://github.com/indygreg/python-build-standalone/releases/download/",
"https://github.com/astral-sh/python-build-standalone/releases/download/",
"https://downloads.python.org/pypy/",
]

Expand Down
2 changes: 1 addition & 1 deletion uv.schema.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit d70160a

Please sign in to comment.