uv/crates/gourgeist
Zanie Blue ea4ab29bad
Prefer target Python version over current version for builds (#1040)
Extends #1029 
Closes https://github.com/astral-sh/puffin/issues/1038

Instead of always using the current Python version for builds when a
target version is provided, we will do our best to use a compatible
Python version for builds.

Removes behavior where Python versions without patch versions were
always assumed to be the latest known patch version (previously
discussed in https://github.com/astral-sh/puffin/pull/534). While this
was convenient for resolutions which include packages which require
minimum patch versions e.g. `requires-python=">=3.7.4"`, it conflicts
with the idea that the target Python version you provide is the
_minimum_ compatible version. Additionally, it complicates interpreter
lookup as we cannot tell if the user has asked for that specific patch
version or not.
2024-01-24 11:12:02 -06:00
..
src Prefer target Python version over current version for builds (#1040) 2024-01-24 11:12:02 -06:00
static Copy over `gourgeist` crate (#61) 2023-10-08 14:37:09 -04:00
Cargo.toml Cleanup deps and docs (#882) 2024-01-11 10:43:40 +00:00
README.md Enable release builds via `cargo-dist` (#79) 2023-10-09 20:48:55 +00:00
benchmark.sh Gourgeist updates (#862) 2024-01-09 23:04:15 +00:00
compare_in_git.sh Copy over `gourgeist` crate (#61) 2023-10-08 14:37:09 -04:00
imasnake.py Copy over `gourgeist` crate (#61) 2023-10-08 14:37:09 -04:00
oranda.json Copy over `gourgeist` crate (#61) 2023-10-08 14:37:09 -04:00
venv_checker.py Unify python interpreter abstractions (#178) 2023-10-25 20:11:36 +00:00

README.md

Gourgeist

Gourgeist is a rust library to create python virtual environments. It also has a CLI.

It currently supports only unix (linux/mac), windows support is missing.

Rust

use camino::Utf8PathBuf;
use gourgeist::{create_venv, get_interpreter_info, parse_python_cli};

let location = cli.path.unwrap_or(Utf8PathBuf::from(".venv"));
let python = parse_python_cli(cli.python)?;
let data = get_interpreter_info(&python)?;
create_venv(&location, &python, &data, cli.bare)?;

CLI

Use python as base for a virtualenv .venv:

gourgeist

Or use custom defaults:

gourgeist -p 3.11 my_env

Jessie's gourgeist

Jessie's gourgeist, a pokemon with a jack o'lantern as body