Repository navigation
Closed
Labels
bugSomething isn't working
Description
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:
pixi build
...
│ │ ├─ site-packages/stypy-2.5.3.dev12+ga9e9d6664.d20260507.dist-info/INSTALLER (6 B)
│ │ ├─ site-packages/stypy-2.5.3.dev12+ga9e9d6664.d20260507.dist-info/METADATA (249 B)
│ │ ├─ site-packages/stypy-2.5.3.dev12+ga9e9d6664.d20260507.dist-info/RECORD (3.68 KiB)
│ │ ├─ site-packages/stypy-2.5.3.dev12+ga9e9d6664.d20260507.dist-info/REQUESTED (0 B)
│ │ ├─ site-packages/stypy-2.5.3.dev12+ga9e9d6664.d20260507.dist-info/WHEEL (87 B)
│ │ ├─ site-packages/stypy-2.5.3.dev12+ga9e9d6664.d20260507.dist-info/direct_url.json (69 B)
│ │ ├─ site-packages/stypy-2.5.3.dev12+ga9e9d6664.dist-info/INSTALLER (6 B)
│ │ ├─ site-packages/stypy-2.5.3.dev12+ga9e9d6664.dist-info/METADATA (239 B)
│ │ ├─ site-packages/stypy-2.5.3.dev12+ga9e9d6664.dist-info/RECORD (3.62 KiB)
│ │ ├─ site-packages/stypy-2.5.3.dev12+ga9e9d6664.dist-info/REQUESTED (0 B)
│ │ ├─ site-packages/stypy-2.5.3.dev12+ga9e9d6664.dist-info/WHEEL (87 B)
│ │ ├─ site-packages/stypy-2.5.3.dev12+ga9e9d6664.dist-info/direct_url.json (69 B)pixi.toml file that reproduces my issue:
[workspace]
name = "myprojectname"
platforms = ["win-64"]
preview = ["pixi-build"]
channels = [
"https://repo.anaconda.com/pkgs/main",
"https://repo.anaconda.com/pkgs/r",
"https://repo.anaconda.com/pkgs/free",
]
version = "2.5.3.dev12+ga9e9d6664.d20260507"
[package]
name = { workspace = true }
version = { workspace = true }
[package.build]
backend = { name = "pixi-build-python", version = "*", channels = ["conda-forge"] }
[package.build.config]
ignore-pyproject-manifest = true
[package.host-dependencies]
hatchling = ">=1.18"
hatch-vcs = ">=0.4"
editables = ">=0.5"
[package.run-dependencies]
python = ">=3.10"
...pyproject.toml
[project]
name = "stypy"
dynamic = ["version"]
requires-python = ">=3.9"
description = "stypy"
dependencies = []
[build-system]
requires = ["hatchling", "hatch-vcs"]
build-backend = "hatchling.build"
[tool.hatch.version]
source = "vcs"
[tool.hatch.build.hooks.vcs]
version-file = "src/stypy/_version.py"
[tool.hatch.build.targets.wheel]
packages = ["src/stypy"]
[tool.hatch.build.targets.sdist]
include = ["src/stypy"]
pixi info output:
System
------------
Pixi version: 0.67.2
TLS backend: rustls
Platform: win-64
Virtual packages: __win=10.0.17763=0
: __archspec=1=x86_64_v3
Cache dir: C:\Users\...\AppData\Local\rattler\cache
Auth storage: C:\Users\...\.rattler\credentials.json
Config locations: C:\Users\...\.pixi\config.toml
Global
------------
Bin dir: C:\Users\...\.pixi\bin
Environment dir: C:\Users\...\.pixi\envs
Manifest dir: C:\Users\...\.pixi\manifests\pixi-global.toml
Workspace
------------
Name: stypy
Version: 2.5.3.dev12+ga9e9d6664.d20260507
Manifest file: ...\pixi.toml
Last updated: 07-05-2026 10:12:09
Other files (e.g. script files, source files, etc.):
Issue description
Running the pixi build command twice in a row with modified version numers, leads to a package with multiple, conflicting dist-info folders.
Expected behavior
Runnign the pixi build commands, leads to a package with the dist-info corresponding to the current version.
Fix
The problem can be fixed by deleting the .pixi/build folder.
Metadata
Metadata
Assignees
Labels
bugSomething isn't working
Activity
baszalmstra commentedon May 7, 2026
Thanks for reporting this, this is indeed a bug we should fix. For the time being, I suggest you run
pixi build --clean, which should also avoid this problem.baszalmstra commentedon May 8, 2026
The problem is that rattler-build is unaware of which files should go into the package. It currently just scrapes all files in the host prefix (where the package files are installed) and grabs all of the files that were not added there by other packages. Because we do incremental builds, files from older builds can still be in that folder, which is causing this issue.
One simple fix is just to delete the build folder, so we start with a fresh directory. But that limits incremental compilation, so it's not ideal.
The fix I opted to persue is to allow the build backends themselves to indicate to rattler-build which files should be packaged. This is both faster because we no longer have to look up all files in the prefix, and it gives more control to the backends.
I first had to implement this in rattler-build which I did here:
Once that is merged, we still have to make sure the individual backends use this feature.
kaiserls commentedon May 13, 2026
Thank you for the quick response! I tried the different
pixi clean cachevariants, but they didn't achieve the desired outcome of avoiding duplicate dist infos.pixi build --cleanworks.fix(pixi-build-python): reinstall to avoid duplicate dist-info
fix(pixi-build-python): reinstall cleanly to avoid duplicate dist-info
kaiserls commentedon Jun 15, 2026
@baszalmstra @Hofer-Julian Could we reopen this issue? I just ran into this issue again with

pixi 0.70.2andpixi-build-python>=0.5.2Or do I have to open this issue in the hatch(ling).build backend repository?
baszalmstra commentedon Jun 15, 2026
I think we just still have to release the build backends, the fix was in there. WDYT @Hofer-Julian ?
kaiserls commentedon Jun 15, 2026
Furthermore I discovered a different (non?)-issue:

When compiling the package twice in a row and only changing the version number in the pixi.toml, without edits to the source code, the package is not published using the correct version number, but the old version number is used / the publishing is skipped because it already exists.
I am not sure if the fix for the original issue will also solve this "follow-up issue".
pixi build --cleanavoids the "follow-up issue" also.Hofer-Julian commentedon Jun 15, 2026
Let me publish the backends right away. It will only solve this issue when we then also publish another Pixi release