pixi icon indicating copy to clipboard operation
pixi copied to clipboard

Pixi build error when specifying `license-files` in `pyproject.toml`

Open munechika-koyo opened this issue 10 months ago • 7 comments

Checks

  • [x] I have checked that this issue has not already been reported.

  • [x] I have confirmed this bug exists on the latest version of pixi, using pixi --version.

Reproducible example

Commands I ran and their output:

$ pixi run start
✨ Pixi task (start): testpy-main

 ╭─ Running build for recipe: testpy-0.1.0-pyh4616a5c_0
 │
 │ ╭─ Fetching source code
 │ │ No sources to fetch
 │ │
 │ ╰─────────────────── (took 0 seconds)
 │
 │ ╭─ Externally resolved dependencies recipe: testpy-0.1.0-pyh4616a5c_0
 │ │ 
 │ │ Resolved build dependencies(testpy-0.1.0-pyh4616a5c_0):
 │ │ ╭─────────┬──────┬─────────┬───────┬─────────┬──────╮
 │ │ │ Package ┆ Spec ┆ Version ┆ Build ┆ Channel ┆ Size │
 │ │ ╞═════════╪══════╪═════════╪═══════╪═════════╪══════╡
 │ │ ╰─────────┴──────┴─────────┴───────┴─────────┴──────╯
 │ │ Resolved host dependencies(testpy-0.1.0-pyh4616a5c_0):
 │ │ ╭───────────────────┬───────────┬──────────────┬────────────────────┬─────────────┬────────────╮
 │ │ │ Package           ┆ Spec      ┆ Version      ┆ Build              ┆ Channel     ┆       Size │
 │ │ ╞═══════════════════╪═══════════╪══════════════╪════════════════════╪═════════════╪════════════╡
 │ │ │ hatchling         ┆ hatchling ┆ 1.28.0       ┆ pyhcf101f3_1       ┆ conda-forge ┆  59.46 KiB │
 │ │ │ python            ┆ python    ┆ 3.14.2       ┆ h40d2674_101_cp314 ┆ conda-forge ┆  11.99 MiB │
 │ │ │ uv                ┆ uv        ┆ 0.9.27       ┆ h9b11cc2_0         ┆ conda-forge ┆  14.98 MiB │
 │ │ │ bzip2             ┆           ┆ 1.0.8        ┆ hd037594_8         ┆ conda-forge ┆ 122.13 KiB │
 │ │ │ ca-certificates   ┆           ┆ 2026.1.4     ┆ hbd8a1cb_0         ┆ conda-forge ┆ 143.08 KiB │
 │ │ │ editables         ┆           ┆ 0.5          ┆ pyhd8ed1ab_1       ┆ conda-forge ┆  10.57 KiB │
 │ │ │ icu               ┆           ┆ 78.2         ┆ h38cb7af_0         ┆ conda-forge ┆  11.79 MiB │
 │ │ │ libcxx            ┆           ┆ 21.1.8       ┆ hf598326_0         ┆ conda-forge ┆ 555.78 KiB │
 │ │ │ libexpat          ┆           ┆ 2.7.3        ┆ haf25636_0         ┆ conda-forge ┆  66.21 KiB │
 │ │ │ libffi            ┆           ┆ 3.5.2        ┆ hcf2aa1b_0         ┆ conda-forge ┆  40.02 KiB │
 │ │ │ liblzma           ┆           ┆ 5.8.2        ┆ h8088a28_0         ┆ conda-forge ┆  90.08 KiB │
 │ │ │ libmpdec          ┆           ┆ 4.0.0        ┆ h84a0fba_1         ┆ conda-forge ┆  71.96 KiB │
 │ │ │ libsqlite         ┆           ┆ 3.51.2       ┆ h1ae2325_0         ┆ conda-forge ┆ 888.45 KiB │
 │ │ │ libzlib           ┆           ┆ 1.3.1        ┆ h8359307_2         ┆ conda-forge ┆  45.35 KiB │
 │ │ │ ncurses           ┆           ┆ 6.5          ┆ h5e97a16_3         ┆ conda-forge ┆ 778.35 KiB │
 │ │ │ openssl           ┆           ┆ 3.6.1        ┆ hd24854e_1         ┆ conda-forge ┆   2.96 MiB │
 │ │ │ packaging         ┆           ┆ 26.0         ┆ pyhcf101f3_0       ┆ conda-forge ┆  70.32 KiB │
 │ │ │ pathspec          ┆           ┆ 1.0.4        ┆ pyhd8ed1ab_0       ┆ conda-forge ┆  52.48 KiB │
 │ │ │ pluggy            ┆           ┆ 1.6.0        ┆ pyhf9edf01_1       ┆ conda-forge ┆  25.27 KiB │
 │ │ │ python_abi        ┆           ┆ 3.14         ┆ 8_cp314            ┆ conda-forge ┆   6.83 KiB │
 │ │ │ readline          ┆           ┆ 8.3          ┆ h46df422_0         ┆ conda-forge ┆ 306.57 KiB │
 │ │ │ tk                ┆           ┆ 8.6.13       ┆ h010d191_3         ┆ conda-forge ┆   2.98 MiB │
 │ │ │ tomli             ┆           ┆ 2.4.0        ┆ pyhcf101f3_0       ┆ conda-forge ┆  20.95 KiB │
 │ │ │ trove-classifiers ┆           ┆ 2026.1.14.14 ┆ pyhd8ed1ab_0       ┆ conda-forge ┆  19.25 KiB │
 │ │ │ tzdata            ┆           ┆ 2025c        ┆ hc9c84f9_1         ┆ conda-forge ┆ 116.34 KiB │
 │ │ │ zstd              ┆           ┆ 1.5.7        ┆ hbf9d68e_6         ┆ conda-forge ┆ 423.25 KiB │
 │ │ ╰───────────────────┴───────────┴──────────────┴────────────────────┴─────────────┴────────────╯
 │ │ Resolved run dependencies(testpy-0.1.0-pyh4616a5c_0):
 │ │ ╭──────────────────┬──────────────────────────╮
 │ │ │ Name             ┆ Spec                     │
 │ │ ╞══════════════════╪══════════════════════════╡
 │ │ │ Run dependencies ┆                          │
 │ │ │ python           ┆ >=3.11                   │
 │ │ │                  ┆ * (RE of [host: python]) │
 │ │ ╰──────────────────┴──────────────────────────╯
 │ │
 │ ╰─────────────────── (took 0 seconds)
 │
 │ ╭─ Running build script
 │ │ DEBUG uv 0.9.27
 │ │ DEBUG Marking explicit source tree for reinstall: `/Users/koyo/test`
 │ │ TRACE Checking lock for `/Users/koyo/.cache/uv` at `/Users/koyo/.cache/uv/.lock`
 │ │ DEBUG Acquired shared lock for `/Users/koyo/.cache/uv`
 │ │ DEBUG Checking for Python interpreter at path `$PREFIX/bin/python`
 │ │ TRACE Querying interpreter executable at $PREFIX/bin/python
 │ │ Using Python 3.14.2 environment at: $PREFIX
 │ │ TRACE Checking lock for `$PREFIX` at `/var/folders/2g/fll_q1p93gs0zrg0v2v02pr80000gn/T/uv-34fa169cb1371b90.lock`
 │ │ DEBUG Acquired exclusive lock for `$PREFIX`
 │ │ DEBUG Using request timeout of 30s
 │ │ DEBUG Found PEP 621 metadata for /Users/koyo/test in `pyproject.toml` (testpy)
 │ │ DEBUG Solving with installed Python version: 3.14.2
 │ │ DEBUG Solving with target Python version: >=3.14.2
 │ │ TRACE Assigned packages: 
 │ │ TRACE Chose package for decision: root. remaining choices: 
 │ │ DEBUG Adding direct dependency: testpy*
 │ │ TRACE Assigned packages: root==0a0.dev0
 │ │ TRACE Chose package for decision: testpy. remaining choices: 
 │ │ DEBUG Searching for a compatible version of testpy @ file:///Users/koyo/test (*)
 │ │ DEBUG Found static `pyproject.toml` for: testpy @ file:///Users/koyo/test
 │ │ DEBUG No workspace root found, using project root
 │ │ TRACE Received source distribution metadata for: testpy @ file:///Users/koyo/test
 │ │ TRACE Assigned packages: root==0a0.dev0, testpy==0.1.0
 │ │ DEBUG Tried 1 versions: testpy 1
 │ │ DEBUG marker environment resolution took 0.002s
 │ │ TRACE Resolution: ResolverEnvironment { kind: Specific { marker_env: ResolverMarkerEnvironment(MarkerEnvironment { inner: MarkerEnvironmentInner { implemen
 │ │ tation_name: "cpython", implementation_version: StringVersion { string: "3.14.2", version: "3.14.2" }, os_name: "posix", platform_machine: "arm64", platfor
 │ │ m_python_implementation: "CPython", platform_release: "25.2.0", platform_system: "Darwin", platform_version: "Darwin Kernel Version 25.2.0: Tue Nov 18 21:0
 │ │ 9:45 PST 2025; root:xnu-12377.61.12~1/RELEASE_ARM64_T6030", python_full_version: StringVersion { string: "3.14.2", version: "3.14.2" }, python_version: Str
 │ │ ingVersion { string: "3.14", version: "3.14" }, sys_platform: "darwin" } }) } }
 │ │ TRACE Resolution edge: ROOT -> testpy
 │ │ TRACE Resolution edge:     0a0.dev0 -> 0.1.0
 │ │ Resolved 1 package in 4ms
 │ │ DEBUG Must revalidate requirement: testpy
 │ │ DEBUG Unnecessary package: editables==0.5 (from file:///home/conda/feedstock_root/build_artifacts/editables_1733208130372/work)
 │ │ DEBUG Unnecessary package: hatchling==1.28.0 (from file:///home/conda/feedstock_root/build_artifacts/bld/rattler-build_hatchling_1767609134/work)
 │ │ DEBUG Unnecessary package: packaging==26.0 (from file:///home/conda/feedstock_root/build_artifacts/bld/rattler-build_packaging_1769093650/work)
 │ │ DEBUG Unnecessary package: pathspec==1.0.4 (from file:///home/conda/feedstock_root/build_artifacts/pathspec_1769677630637/work)
 │ │ DEBUG Unnecessary package: pluggy==1.6.0 (from file:///home/conda/feedstock_root/build_artifacts/bld/rattler-build_pluggy_1764896838/work)
 │ │ DEBUG Unnecessary package: tomli==2.4.0 (from file:///home/conda/feedstock_root/build_artifacts/bld/rattler-build_tomli_1768146676/work)
 │ │ DEBUG Unnecessary package: trove-classifiers==2026.1.14.14 (from file:///home/conda/feedstock_root/build_artifacts/trove-classifiers_1768550114862/work)
 │ │ TRACE Checking lock for `/Users/koyo/.cache/uv/sdists-v9/editable/a2c98df4b7e15b23` at `/Users/koyo/.cache/uv/sdists-v9/editable/a2c98df4b7e15b23/.lock`
 │ │ DEBUG Acquired exclusive lock for `/Users/koyo/.cache/uv/sdists-v9/editable/a2c98df4b7e15b23`
 │ │ DEBUG Computed cache info: Timestamp(SystemTime { tv_sec: 1769702467, tv_nsec: 182715079 }), None, None, {}, {"src": Some(Timestamp(Timestamp(SystemTime { 
 │ │ tv_sec: 1769701198, tv_nsec: 442096533 })))}. Most recently modified: /Users/koyo/test/pyproject.toml
 │ │    Building testpy @ file:///Users/koyo/test
 │ │ DEBUG Building: testpy @ file:///Users/koyo/test
 │ │ DEBUG Not using uv build backend direct build of `testpy @ file:///Users/koyo/test`, pyproject.toml does not match: The value for `build_system.build-backe
 │ │ nd` should be `"uv_build"`, not `"hatchling.build"`
 │ │ TRACE Further uv build backend direct build of `testpy @ file:///Users/koyo/test` mismatch: Expected a single uv requirement in `build-system.requires`, fo
 │ │ und ``
 │ │ TRACE Requirements for direct build not matched: testpy @ file:///Users/koyo/test
 │ │ DEBUG Assessing Python executable as base candidate: $PREFIX/bin/python
 │ │ DEBUG Reusing existing build environment for: testpy @ file:///Users/koyo/test
 │ │ DEBUG No workspace root found, using project root
 │ │ DEBUG Proceeding without build isolation
 │ │ DEBUG Calling `hatchling.build.build_editable("/Users/koyo/.cache/uv/builds-v0/.tmpgtt7V7", {}, None)`
 │ │ DEBUG Built `testpy @ file:///Users/koyo/test` into `testpy-0.1.0-py3-none-any.whl`
 │ │       Built testpy @ file:///Users/koyo/test
 │ │ DEBUG Released lock at `/Users/koyo/.cache/uv/sdists-v9/editable/a2c98df4b7e15b23/.lock`
 │ │ Prepared 1 package in 2.74s
 │ │ TRACE Extracting file name=PackageName("testpy")
 │ │ TRACE Cloning /Users/koyo/.cache/uv/archive-v0/CI4-UHWT2fh_3HGzfY5YK/testpy-0.1.0.dist-info to $PREFIX/lib/python3.14/site-packages/testpy-0.1.0.dist-info
 │ │ TRACE Cloning /Users/koyo/.cache/uv/archive-v0/CI4-UHWT2fh_3HGzfY5YK/_testpy.pth to $PREFIX/lib/python3.14/site-packages/_testpy.pth
 │ │ TRACE Extracted 2 files name=PackageName("testpy")
 │ │ TRACE Writing entrypoints name=PackageName("testpy")
 │ │ TRACE No data name=PackageName("testpy")
 │ │ TRACE Writing installer metadata name=PackageName("testpy")
 │ │ TRACE Writing record name=PackageName("testpy")
 │ │ Installed 1 package in 2ms
 │ │  + testpy==0.1.0 (from file:///Users/koyo/test)
 │ │ DEBUG Released lock at `/var/folders/2g/fll_q1p93gs0zrg0v2v02pr80000gn/T/uv-34fa169cb1371b90.lock`
 │ │ DEBUG Released lock at `/Users/koyo/.cache/uv/.lock`
 │ │
 │ ╰─────────────────── (took 5 seconds)
 │
 │ ╭─ Packaging new files
 │ │ Copying done!
 │ │ Post-processing done!
 │ │ Writing test files
 │ │ Writing metadata for package
 │ │ Copying license files
 │ │
 │ ╰─────────────────── (took 0 seconds)
 │
 ╰─────────────────── (took 5 seconds)
Error:   × failed to build 'testpy' from '.'
  ╰─▶   × No license files were copied

pixi.toml file that reproduces my issue:

[workspace]
channels = ["conda-forge"]
platforms = ["osx-arm64"]
preview = ["pixi-build"]

[package]
version = "0.1.0"

[package.build]
backend = { name = "pixi-build-python", version = "*" }

[package.build.config]
noarch = true

[package.host-dependencies]
uv = "*"
python = "*"
hatchling = "*"

[dependencies]
testpy = { path = "." }

[tasks]
start = "testpy-main"

pyproject.toml file that reproduces my issue:

[project]
name = "testpy"
requires-python = ">= 3.11"
scripts = { testpy-main = "testpy:main" }
version = "0.1.0"
license = "MIT"
license-files = ["LICEN[CS]E.*"]

[build-system]
build-backend = "hatchling.build"
requires = ["hatchling"]

pixi info output:

System
------------
       Pixi version: 0.63.2
        TLS backend: rustls
           Platform: osx-arm64
   Virtual packages: __unix=0=0
                   : __osx=26.2=0
                   : __archspec=1=m1
          Cache dir: /Users/koyo/Library/Caches/rattler/cache
       Auth storage: /Users/koyo/rattler-auth.json
   Config locations: /Users/koyo/Library/Application Support/pixi/config.toml

Global
------------
            Bin dir: /Users/koyo/.pixi/bin
    Environment dir: /Users/koyo/.pixi/envs
       Manifest dir: /Users/koyo/.pixi/manifests/pixi-global.toml

Workspace
------------
               Name: test
      Manifest file: /Users/koyo/test/pixi.toml
       Last updated: 29-01-2026 17:00:36

Environments
------------
        Environment: default
           Features: default
           Channels: conda-forge
   Dependency count: 1
       Dependencies: testpy
   Target platforms: osx-arm64
    Prefix location: /Users/koyo/test/.pixi/envs/default
              Tasks: start

Project structure is:

├── /src
│   └── /testpy
│       └── __init__.py
├── LICENSE
├── pixi.lock
├── pixi.toml
└── pyproject.toml 

__init__.py file is:

def main():
    print("Hello, World!")

Issue description

This error seems to occur when specifying license-files = ["LICEN[CS]E.*"] in the pyproject.toml. If I opted out of the license-files setting, no error was thrown.

This issue might be similar to #5304.

Expected behavior

The results, excluding license-files, are shown below:

✨ Pixi task (start): testpy-main

 ╭─ Running build for recipe: testpy-0.1.0-pyh4616a5c_0
 │
 │ ╭─ Fetching source code
 │ │ No sources to fetch
 │ │
 │ ╰─────────────────── (took 0 seconds)
 │
 │ ╭─ Externally resolved dependencies recipe: testpy-0.1.0-pyh4616a5c_0
 │ │ 
 │ │ Resolved build dependencies(testpy-0.1.0-pyh4616a5c_0):
 │ │ ╭─────────┬──────┬─────────┬───────┬─────────┬──────╮
 │ │ │ Package ┆ Spec ┆ Version ┆ Build ┆ Channel ┆ Size │
 │ │ ╞═════════╪══════╪═════════╪═══════╪═════════╪══════╡
 │ │ ╰─────────┴──────┴─────────┴───────┴─────────┴──────╯
 │ │ Resolved host dependencies(testpy-0.1.0-pyh4616a5c_0):
 │ │ ╭───────────────────┬───────────┬──────────────┬────────────────────┬─────────────┬────────────╮
 │ │ │ Package           ┆ Spec      ┆ Version      ┆ Build              ┆ Channel     ┆       Size │
 │ │ ╞═══════════════════╪═══════════╪══════════════╪════════════════════╪═════════════╪════════════╡
 │ │ │ hatchling         ┆ hatchling ┆ 1.28.0       ┆ pyhcf101f3_1       ┆ conda-forge ┆  59.46 KiB │
 │ │ │ python            ┆ python    ┆ 3.14.2       ┆ h40d2674_101_cp314 ┆ conda-forge ┆  11.99 MiB │
 │ │ │ uv                ┆ uv        ┆ 0.9.27       ┆ h9b11cc2_0         ┆ conda-forge ┆  14.98 MiB │
 │ │ │ bzip2             ┆           ┆ 1.0.8        ┆ hd037594_8         ┆ conda-forge ┆ 122.13 KiB │
 │ │ │ ca-certificates   ┆           ┆ 2026.1.4     ┆ hbd8a1cb_0         ┆ conda-forge ┆ 143.08 KiB │
 │ │ │ editables         ┆           ┆ 0.5          ┆ pyhd8ed1ab_1       ┆ conda-forge ┆  10.57 KiB │
 │ │ │ icu               ┆           ┆ 78.2         ┆ h38cb7af_0         ┆ conda-forge ┆  11.79 MiB │
 │ │ │ libcxx            ┆           ┆ 21.1.8       ┆ hf598326_0         ┆ conda-forge ┆ 555.78 KiB │
 │ │ │ libexpat          ┆           ┆ 2.7.3        ┆ haf25636_0         ┆ conda-forge ┆  66.21 KiB │
 │ │ │ libffi            ┆           ┆ 3.5.2        ┆ hcf2aa1b_0         ┆ conda-forge ┆  40.02 KiB │
 │ │ │ liblzma           ┆           ┆ 5.8.2        ┆ h8088a28_0         ┆ conda-forge ┆  90.08 KiB │
 │ │ │ libmpdec          ┆           ┆ 4.0.0        ┆ h84a0fba_1         ┆ conda-forge ┆  71.96 KiB │
 │ │ │ libsqlite         ┆           ┆ 3.51.2       ┆ h1ae2325_0         ┆ conda-forge ┆ 888.45 KiB │
 │ │ │ libzlib           ┆           ┆ 1.3.1        ┆ h8359307_2         ┆ conda-forge ┆  45.35 KiB │
 │ │ │ ncurses           ┆           ┆ 6.5          ┆ h5e97a16_3         ┆ conda-forge ┆ 778.35 KiB │
 │ │ │ openssl           ┆           ┆ 3.6.1        ┆ hd24854e_1         ┆ conda-forge ┆   2.96 MiB │
 │ │ │ packaging         ┆           ┆ 26.0         ┆ pyhcf101f3_0       ┆ conda-forge ┆  70.32 KiB │
 │ │ │ pathspec          ┆           ┆ 1.0.4        ┆ pyhd8ed1ab_0       ┆ conda-forge ┆  52.48 KiB │
 │ │ │ pluggy            ┆           ┆ 1.6.0        ┆ pyhf9edf01_1       ┆ conda-forge ┆  25.27 KiB │
 │ │ │ python_abi        ┆           ┆ 3.14         ┆ 8_cp314            ┆ conda-forge ┆   6.83 KiB │
 │ │ │ readline          ┆           ┆ 8.3          ┆ h46df422_0         ┆ conda-forge ┆ 306.57 KiB │
 │ │ │ tk                ┆           ┆ 8.6.13       ┆ h010d191_3         ┆ conda-forge ┆   2.98 MiB │
 │ │ │ tomli             ┆           ┆ 2.4.0        ┆ pyhcf101f3_0       ┆ conda-forge ┆  20.95 KiB │
 │ │ │ trove-classifiers ┆           ┆ 2026.1.14.14 ┆ pyhd8ed1ab_0       ┆ conda-forge ┆  19.25 KiB │
 │ │ │ tzdata            ┆           ┆ 2025c        ┆ hc9c84f9_1         ┆ conda-forge ┆ 116.34 KiB │
 │ │ │ zstd              ┆           ┆ 1.5.7        ┆ hbf9d68e_6         ┆ conda-forge ┆ 423.25 KiB │
 │ │ ╰───────────────────┴───────────┴──────────────┴────────────────────┴─────────────┴────────────╯
 │ │ Resolved run dependencies(testpy-0.1.0-pyh4616a5c_0):
 │ │ ╭──────────────────┬──────────────────────────╮
 │ │ │ Name             ┆ Spec                     │
 │ │ ╞══════════════════╪══════════════════════════╡
 │ │ │ Run dependencies ┆                          │
 │ │ │ python           ┆ >=3.11                   │
 │ │ │                  ┆ * (RE of [host: python]) │
 │ │ ╰──────────────────┴──────────────────────────╯
 │ │
 │ ╰─────────────────── (took 0 seconds)
 │
 │ ╭─ Running build script
 │ │ DEBUG uv 0.9.27
 │ │ DEBUG Marking explicit source tree for reinstall: `/Users/koyo/test`
 │ │ TRACE Checking lock for `/Users/koyo/.cache/uv` at `/Users/koyo/.cache/uv/.lock`
 │ │ DEBUG Acquired shared lock for `/Users/koyo/.cache/uv`
 │ │ DEBUG Checking for Python interpreter at path `$PREFIX/bin/python`
 │ │ TRACE Querying interpreter executable at $PREFIX/bin/python
 │ │ Using Python 3.14.2 environment at: $PREFIX
 │ │ TRACE Checking lock for `$PREFIX` at `/var/folders/2g/fll_q1p93gs0zrg0v2v02pr80000gn/T/uv-34fa169cb1371b90.lock`
 │ │ DEBUG Acquired exclusive lock for `$PREFIX`
 │ │ DEBUG Using request timeout of 30s
 │ │ DEBUG Found PEP 621 metadata for /Users/koyo/test in `pyproject.toml` (testpy)
 │ │ DEBUG Solving with installed Python version: 3.14.2
 │ │ DEBUG Solving with target Python version: >=3.14.2
 │ │ TRACE Assigned packages: 
 │ │ TRACE Chose package for decision: root. remaining choices: 
 │ │ DEBUG Adding direct dependency: testpy*
 │ │ TRACE Assigned packages: root==0a0.dev0
 │ │ TRACE Chose package for decision: testpy. remaining choices: 
 │ │ DEBUG Searching for a compatible version of testpy @ file:///Users/koyo/test (*)
 │ │ DEBUG Found static `pyproject.toml` for: testpy @ file:///Users/koyo/test
 │ │ DEBUG No workspace root found, using project root
 │ │ TRACE Received source distribution metadata for: testpy @ file:///Users/koyo/test
 │ │ TRACE Assigned packages: root==0a0.dev0, testpy==0.1.0
 │ │ DEBUG Tried 1 versions: testpy 1
 │ │ DEBUG marker environment resolution took 0.005s
 │ │ TRACE Resolution: ResolverEnvironment { kind: Specific { marker_env: ResolverMarkerEnvironment(MarkerEnvironment { inner: MarkerEnvironmentInner { implemen
 │ │ tation_name: "cpython", implementation_version: StringVersion { string: "3.14.2", version: "3.14.2" }, os_name: "posix", platform_machine: "arm64", platfor
 │ │ m_python_implementation: "CPython", platform_release: "25.2.0", platform_system: "Darwin", platform_version: "Darwin Kernel Version 25.2.0: Tue Nov 18 21:0
 │ │ 9:45 PST 2025; root:xnu-12377.61.12~1/RELEASE_ARM64_T6030", python_full_version: StringVersion { string: "3.14.2", version: "3.14.2" }, python_version: Str
 │ │ ingVersion { string: "3.14", version: "3.14" }, sys_platform: "darwin" } }) } }
 │ │ TRACE Resolution edge: ROOT -> testpy
 │ │ TRACE Resolution edge:     0a0.dev0 -> 0.1.0
 │ │ Resolved 1 package in 11ms
 │ │ DEBUG Must revalidate requirement: testpy
 │ │ DEBUG Unnecessary package: editables==0.5 (from file:///home/conda/feedstock_root/build_artifacts/editables_1733208130372/work)
 │ │ DEBUG Unnecessary package: hatchling==1.28.0 (from file:///home/conda/feedstock_root/build_artifacts/bld/rattler-build_hatchling_1767609134/work)
 │ │ DEBUG Unnecessary package: packaging==26.0 (from file:///home/conda/feedstock_root/build_artifacts/bld/rattler-build_packaging_1769093650/work)
 │ │ DEBUG Unnecessary package: pathspec==1.0.4 (from file:///home/conda/feedstock_root/build_artifacts/pathspec_1769677630637/work)
 │ │ DEBUG Unnecessary package: pluggy==1.6.0 (from file:///home/conda/feedstock_root/build_artifacts/bld/rattler-build_pluggy_1764896838/work)
 │ │ DEBUG Unnecessary package: tomli==2.4.0 (from file:///home/conda/feedstock_root/build_artifacts/bld/rattler-build_tomli_1768146676/work)
 │ │ DEBUG Unnecessary package: trove-classifiers==2026.1.14.14 (from file:///home/conda/feedstock_root/build_artifacts/trove-classifiers_1768550114862/work)
 │ │ TRACE Checking lock for `/Users/koyo/.cache/uv/sdists-v9/editable/a2c98df4b7e15b23` at `/Users/koyo/.cache/uv/sdists-v9/editable/a2c98df4b7e15b23/.lock`
 │ │ DEBUG Acquired exclusive lock for `/Users/koyo/.cache/uv/sdists-v9/editable/a2c98df4b7e15b23`
 │ │ DEBUG Computed cache info: Timestamp(SystemTime { tv_sec: 1769703300, tv_nsec: 842855561 }), None, None, {}, {"src": Some(Timestamp(Timestamp(SystemTime { 
 │ │ tv_sec: 1769701198, tv_nsec: 442096533 })))}. Most recently modified: /Users/koyo/test/pyproject.toml
 │ │    Building testpy @ file:///Users/koyo/test
 │ │ DEBUG Building: testpy @ file:///Users/koyo/test
 │ │ DEBUG Not using uv build backend direct build of `testpy @ file:///Users/koyo/test`, pyproject.toml does not match: The value for `build_system.build-backe
 │ │ nd` should be `"uv_build"`, not `"hatchling.build"`
 │ │ TRACE Further uv build backend direct build of `testpy @ file:///Users/koyo/test` mismatch: Expected a single uv requirement in `build-system.requires`, fo
 │ │ und ``
 │ │ TRACE Requirements for direct build not matched: testpy @ file:///Users/koyo/test
 │ │ DEBUG Assessing Python executable as base candidate: $PREFIX/bin/python
 │ │ DEBUG Reusing existing build environment for: testpy @ file:///Users/koyo/test
 │ │ DEBUG No workspace root found, using project root
 │ │ DEBUG Proceeding without build isolation
 │ │ DEBUG Calling `hatchling.build.build_editable("/Users/koyo/.cache/uv/builds-v0/.tmpkctxsy", {}, None)`
 │ │ DEBUG Built `testpy @ file:///Users/koyo/test` into `testpy-0.1.0-py3-none-any.whl`
 │ │       Built testpy @ file:///Users/koyo/test
 │ │ DEBUG Released lock at `/Users/koyo/.cache/uv/sdists-v9/editable/a2c98df4b7e15b23/.lock`
 │ │ Prepared 1 package in 275ms
 │ │ TRACE Removed file: $PREFIX/lib/python3.14/site-packages/../../../bin/testpy-main
 │ │ TRACE Removed file: $PREFIX/lib/python3.14/site-packages/_testpy.pth
 │ │ TRACE Removed file: $PREFIX/lib/python3.14/site-packages/testpy-0.1.0.dist-info/INSTALLER
 │ │ TRACE Removed file: $PREFIX/lib/python3.14/site-packages/testpy-0.1.0.dist-info/METADATA
 │ │ TRACE Removed file: $PREFIX/lib/python3.14/site-packages/testpy-0.1.0.dist-info/RECORD
 │ │ TRACE Removed file: $PREFIX/lib/python3.14/site-packages/testpy-0.1.0.dist-info/REQUESTED
 │ │ TRACE Removed file: $PREFIX/lib/python3.14/site-packages/testpy-0.1.0.dist-info/WHEEL
 │ │ TRACE Removed file: $PREFIX/lib/python3.14/site-packages/testpy-0.1.0.dist-info/direct_url.json
 │ │ TRACE Removed file: $PREFIX/lib/python3.14/site-packages/testpy-0.1.0.dist-info/entry_points.txt
 │ │ TRACE Removed file: $PREFIX/lib/python3.14/site-packages/testpy-0.1.0.dist-info/uv_build.json
 │ │ TRACE Removed file: $PREFIX/lib/python3.14/site-packages/testpy-0.1.0.dist-info/uv_cache.json
 │ │ TRACE Removed directory: $PREFIX/lib/python3.14/site-packages/testpy-0.1.0.dist-info
 │ │ DEBUG Uninstalled testpy (11 files, 1 directory)
 │ │ Uninstalled 1 package in 1ms
 │ │ TRACE Extracting file name=PackageName("testpy")
 │ │ TRACE Cloning /Users/koyo/.cache/uv/archive-v0/zKyLsEQZ6goD6q2Mhrs-Q/testpy-0.1.0.dist-info to $PREFIX/lib/python3.14/site-packages/testpy-0.1.0.dist-info
 │ │ TRACE Cloning /Users/koyo/.cache/uv/archive-v0/zKyLsEQZ6goD6q2Mhrs-Q/_testpy.pth to $PREFIX/lib/python3.14/site-packages/_testpy.pth
 │ │ TRACE Extracted 2 files name=PackageName("testpy")
 │ │ TRACE Writing entrypoints name=PackageName("testpy")
 │ │ TRACE No data name=PackageName("testpy")
 │ │ TRACE Writing installer metadata name=PackageName("testpy")
 │ │ TRACE Writing record name=PackageName("testpy")
 │ │ Installed 1 package in 3ms
 │ │  ~ testpy==0.1.0 (from file:///Users/koyo/test)
 │ │ DEBUG Released lock at `/var/folders/2g/fll_q1p93gs0zrg0v2v02pr80000gn/T/uv-34fa169cb1371b90.lock`
 │ │ DEBUG Released lock at `/Users/koyo/.cache/uv/.lock`
 │ │
 │ ╰─────────────────── (took 0 seconds)
 │
 │ ╭─ Packaging new files
 │ │ Copying done!
 │ │ Post-processing done!
 │ │ Writing test files
 │ │ Writing metadata for package
 │ │ Copying license files
 │ │ Copying recipe files
 │ │ Creating entry points
 │ │ 
 │ │ Files in package:
 │ │   ├─ site-packages/_testpy.pth (20 B)
 │ │   ├─ site-packages/testpy-0.1.0.dist-info/INSTALLER (6 B)
 │ │   ├─ site-packages/testpy-0.1.0.dist-info/METADATA (120 B)
 │ │   ├─ site-packages/testpy-0.1.0.dist-info/RECORD (985 B)
 │ │   ├─ site-packages/testpy-0.1.0.dist-info/REQUESTED (0 B)
 │ │   ├─ site-packages/testpy-0.1.0.dist-info/WHEEL (87 B)
 │ │   ├─ site-packages/testpy-0.1.0.dist-info/direct_url.json (62 B)
 │ │   ├─ site-packages/testpy-0.1.0.dist-info/entry_points.txt (44 B)
 │ │   ├─ site-packages/testpy-0.1.0.dist-info/licenses/LICENSE (1.04 KiB)
 │ │   ├─ site-packages/testpy-0.1.0.dist-info/uv_build.json (2 B)
 │ │   ├─ site-packages/testpy-0.1.0.dist-info/uv_cache.json (194 B)
 │ │   ├─ info/about.json (22 B)
 │ │   ├─ info/hash_input.json (29 B)
 │ │   ├─ info/index.json (242 B)
 │ │   ├─ info/link.json (138 B)
 │ │   ├─ info/paths.json (2.39 KiB)
 │ │   └─ info/tests/tests.yaml (3 B)
 │ │ 
 │ │ Package statistics: 17 files (11 content, 6 metadata), total size: 5.34 KiB
 │ │ Largest files:
 │ │   1.04 KiB - site-packages/testpy-0.1.0.dist-info/licenses/LICENSE
 │ │   985 B - site-packages/testpy-0.1.0.dist-info/RECORD
 │ │   194 B - site-packages/testpy-0.1.0.dist-info/uv_cache.json
 │ │   120 B - site-packages/testpy-0.1.0.dist-info/METADATA
 │ │   87 B - site-packages/testpy-0.1.0.dist-info/WHEEL
 │ │ Creating target folder '/Users/koyo/test/.pixi/build/work/testpy-QZRx5ZYrqz8-TwLmj22Yeao/output/noarch'
 │ │ Creating empty build folder "/Users/koyo/test/.pixi/build/work/testpy-QZRx5ZYrqz8-TwLmj22Yeao/output/osx-arm64"
 │ │ Compressing archive...
 │ │ Archive written to '/Users/koyo/test/.pixi/build/work/testpy-QZRx5ZYrqz8-TwLmj22Yeao/output/noarch/testpy-0.1.0-pyh4616a5c_0.conda'
 │ │
 │ ╰─────────────────── (took 0 seconds)
 │ Checking for symlinks ...
 │
 ╰─────────────────── (took 0 seconds)
Hello, World!

munechika-koyo avatar Jan 29 '26 16:01 munechika-koyo

I found that parsing a glob pattern for a license file name doesn't work. That is, license-files = ["LICENSE"] worked well.

munechika-koyo avatar Jan 29 '26 23:01 munechika-koyo

@munechika-koyo the glob has a .* at the end, but your filename is just LICENSE

That sounds like the source of the problem?

wolfv avatar Jan 30 '26 14:01 wolfv

Even though I modified the glob to "LICEN[CS]E*" or LICEN[CS]E, nothing has changed. It seems that only the same string can be passed.

munechika-koyo avatar Jan 30 '26 15:01 munechika-koyo

Even though I modified the glob to "LICEN[CS]E*" or LICEN[CS]E, nothing has changed. It seems that only the same string can be passed.

I do think that LICENSE should work as a glob pattern in rattler-build. I will check it

nichtmacho avatar Feb 02 '26 08:02 nichtmacho

I think I'm observing this for NumPy https://github.com/numpy/numpy/pull/30510

crusaderky avatar Feb 13 '26 16:02 crusaderky

NumPy doesn't use special glob syntax:

license-files = [
    'LICENSE.txt',                                       # BSD-3-Clause
    'numpy/_core/include/numpy/libdivide/LICENSE.txt',   # Zlib
    'numpy/_core/src/common/pythoncapi-compat/COPYING',  # 0BSD
    'numpy/_core/src/highway/LICENSE',                   # Dual-licensed: Apache 2.0 or BSD 3-Clause
    'numpy/_core/src/multiarray/dragon4_LICENSE.txt',    # MIT
    'numpy/_core/src/npysort/x86-simd-sort/LICENSE.md',  # BSD-3-Clause
    'numpy/_core/src/umath/svml/LICENSE',                # BSD-3-Clause
    'numpy/fft/pocketfft/LICENSE.md',                    # BSD-3-Clause
    'numpy/ma/LICENSE',                                  # BSD-3-Clause
    'numpy/linalg/lapack_lite/LICENSE.txt',              # BSD-3-Clause
    'numpy/random/LICENSE.md',                           # BSD-3-Clause
    'numpy/random/src/distributions/LICENSE.md',         # BSD-3-Clause AND MIT
    'numpy/random/src/mt19937/LICENSE.md',               # BSD-3-Clause AND MIT
    'numpy/random/src/pcg64/LICENSE.md',                 # MIT
    'numpy/random/src/philox/LICENSE.md',                # BSD-3-Clause
    'numpy/random/src/sfc64/LICENSE.md',                 # MIT
    'numpy/random/src/splitmix64/LICENSE.md',            # CC0-1.0
]

perhaps it is a relative path problem due to the pixi.toml being in a subdirectory of the package.build.source.path?

lucascolley avatar Feb 13 '26 16:02 lucascolley

perhaps it is a relative path problem due to the pixi.toml being in a subdirectory of the package.build.source.path?

Opened https://github.com/prefix-dev/pixi/issues/5557

crusaderky avatar Feb 25 '26 07:02 crusaderky