Puccinialin is a Python library designed to install Rust (cargo and rustc) into a temporary, cache-aware directory. This helps Python projects with Rust-based build backends bootstrap their Rust dependencies without modifying the host's environment. The current version is 0.1.9, and its release cadence appears irregular, with updates driven by need rather than a fixed schedule.
pip install puccinialinVerified import paths — ran on the pinned version, not inferred.
This quickstart demonstrates how to use `setup_rust` to install Rust and obtain the necessary environment variables. These variables can then be used to execute Rust commands, such as `cargo build`, within a Python script.
Ensure your Python environment is 3.9 or higher. Upgrade Python or activate a compatible virtual environment before installing puccinialin.
When calling subprocess commands involving Rust, always merge the `extra_env` dictionary returned by `setup_rust` with the current environment: `env={**os.environ, **extra_env}`.Ensure `puccinialin` is installed in the active environment by running `pip install puccinialin`. If it's a build dependency for another package, ensure your Python environment is correctly set up for build isolation or that `puccinialin` is listed as a `build-system` requirement in the `pyproject.toml` of the dependent project.
Upgrade your Python interpreter to version 3.9 or newer (e.g., Python 3.9, 3.10, 3.11, or 3.12). You can check compatible versions on the `puccinialin` PyPI page.
Create a new Conda environment with a compatible Python version (3.9 or higher) using `conda create -n myenv python=3.9` (or `3.10`, `3.11`, `3.12`), activate it (`conda activate myenv`), and then try installing the problematic package that depends on `puccinialin`.
Ensure you are running on a platform supported by Rustup (e.g., x86_64, aarch64 architectures on common operating systems like Windows, Linux, macOS). If running on a less common or older platform, manual Rust installation or cross-compilation might be necessary outside of `puccinialin`'s scope.