[pixi publish][pixi-build-python] cross-plattform build generates host_env path with excessive use of placeholders resulting in a too long path on windows
Checks
I have checked that this issue has not already been reported.
I have confirmed this bug exists on the latest version of pixi, using
pixi --version.
Reproducible example
Commands I ran and their output:
PS C:\Users\chess\Informatik\MREs\cross_plattform_build> pixi publish --target-platform linux-64 --clean --build-dir C:\temp\bld_pkg --target-dir C:\temp\pkg_out
Building 1 package(s):
- mre v0.1.0 [hb0f4dca_0] (linux-64)
Error: × failed to install the host environment
├─▶ failed to write python_abi-3.14-9_cp314.json
╰─▶ Failed to persist file C:
\Users\chess\Informatik\MREs\cross_plattform_build\.pixi\bld\mre\78vv9gL61EE\host_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehol
d_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_p\conda-meta\python_abi-3.14-9_cp314.json: failed to persist
temporary file: Das System kann den angegebenen Pfad nicht finden. (os error 3)pixi.toml/pyproject.toml file that reproduces my issue:
# pixi.toml
[workspace]
channels = ["https://prefix.dev/conda-forge"]
platforms = ["win-64", "linux-64"]
preview = ["pixi-build"]
[dependencies]
mre = { path = "." }
[tasks]
[package]
name = "mre"
version = "0.1.0"
[package.build]
backend = { name = "pixi-build-python", version = "*" }
[package.build.config]
ignore-pypi-mapping = true
ignore-pyproject-manifest = true
noarch = true
[package.host-dependencies]
hatchling = "*"
[package.run-dependencies]
rich = "*"# pyproject.toml
[project]
dependencies = ["rich"]
name = "mre"
requires-python = ">= 3.11"
scripts = { app-debug = "mre:main" }
gui-scripts = { app = "mre:main"}
version = "0.1.0"
[build-system]
build-backend = "hatchling.build"
requires = ["hatchling"]
pixi info output:
System
------------
Pixi version: 0.79.0
TLS backend: rustls
Platform: win-64
Virtual packages: __win=10.0.26200=0
: __cuda=13.4=0
: __cuda_arch=8.6=0
: __archspec=1=skylake
Cache dir: C:\Users\chess\AppData\Local\rattler\cache
Auth storage: C:\Users\chess\.rattler\credentials.json
Config locations: No config files found
Global
------------
Bin dir: C:\Users\chess\.pixi\bin
Environment dir: C:\Users\chess\.pixi\envs
Manifest dir: C:\Users\chess\.pixi\manifests\pixi-global.toml
Workspace
------------
Name: mre
Manifest file: C:\Users\chess\Informatik\MREs\cross_plattform_build\pixi.toml
Last updated: 03-09-2026 21:25:10
Environments
------------
Environment: default
Features: default
Channels: https://prefix.dev/conda-forge
Dependency count: 1
Dependencies: mre
Target platforms: win-64, linux-64
Minimum platform: available after `pixi install`
Prefix location: C:\Users\chess\Informatik\MREs\cross_plattform_build\.pixi\envs\default
Other files (e.g. script files, source files, etc.):
Issue description
The pixi publish command fails with an os error 3 while creating the conda-meta folder in the build directory when a cross platform build on win-64 for linux-64 is performed. I would attribute it to the excessively long path shown in the output. The error seems to be very similiar to the issue https://github.com/prefix-dev/rattler-build/issues/2045. However, I also tried adding * to .condapackageignore, as described in the issue, which didn't help.
Expected behavior
I expected to be able to build the package cross-platform or get a meaningful error message.
Source: prefix-dev/pixi