Skip to content

Duplicate dist-info #6036

Closed
Closed

Description

@kaiserls

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.

Activity

  1. added
    bug
    on May 7, 2026
  2. baszalmstra commented on May 7, 2026

    @baszalmstra
    Contributor

    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.

  3. baszalmstra commented on May 8, 2026

    @baszalmstra
    Contributor

    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.

  4. kaiserls commented on May 13, 2026

    @kaiserls
    Author

    Thank you for the quick response! I tried the different pixi clean cache variants, but they didn't achieve the desired outcome of avoiding duplicate dist infos. pixi build --clean works.

  5. self-assigned this
    on May 22, 2026
  6. added 2 commits that reference this issue on May 29, 2026
    5578687
    ad083d0
  7. kaiserls commented on Jun 15, 2026

    @kaiserls
    Author

    @baszalmstra @Hofer-Julian Could we reopen this issue? I just ran into this issue again with pixi 0.70.2 and pixi-build-python>=0.5.2
    Image
    Or do I have to open this issue in the hatch(ling).build backend repository?

  8. baszalmstra commented on Jun 15, 2026

    @baszalmstra
    Contributor

    I think we just still have to release the build backends, the fix was in there. WDYT @Hofer-Julian ?

  9. kaiserls commented on Jun 15, 2026

    @kaiserls
    Author

    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.
    Image

    I am not sure if the fix for the original issue will also solve this "follow-up issue". pixi build --clean avoids the "follow-up issue" also.

  10. Hofer-Julian commented on Jun 15, 2026

    @Hofer-Julian
    Member

    Let me publish the backends right away. It will only solve this issue when we then also publish another Pixi release

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bug

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions