10000 BUG: NumPy pixi-packages does not satisfy dependency of pypi packages · Issue #30561 · numpy/numpy · GitHub
[go: up one dir, main page]

Skip to content

BUG: NumPy pixi-packages does not satisfy dependency of pypi packages #30561

@crusaderky

Description

@crusaderky

Describe the issue:

Compiling numpy from sources thanks to pixi-packages/default/pixi.toml works well for third party conda packages that depend on numpy, but not for pypi ones:

[dependencies]
numpy.git = "https://github.com/numpy/numpy"
numpy.subdirectory = "pixi-packages/default"

[pypi-dependencies]
h5py = "*"  # Arbitrary pypi package depending on numpy at runtime

The above installs both the rattler-build version and the pypi wheel of numpy:

      - conda: git+https://github.com/numpy/numpy?subdirectory=pixi-packages%2Fdefault#bc68b5afee9f460065f72be9723406f654219950
      - pypi: https://files.pythonhosted.org/packages/03/75/d4c43b61de473912496317a854dac54f1efec3eeb158438da6884b70bb90/numpy-2.4.0-cp314-cp314-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl

Reproduce the code example:

[workspace]
channels = ["https://prefix.dev/conda-forge"]
platforms = ["linux-64"]
preview = ["pixi-build"]

[dependencies]
python = "*"
hdf5 = "*"

[feature.np-stable.dependencies]
numpy = "*"

[feature.np-dev.dependencies]
numpy.git = "https://github.com/numpy/numpy"
numpy.subdirectory = "pixi-packages/default"

[feature.conda-dependent.dependencies]
h5py = "*"

[feature.pypi-dependent.pypi-dependencies]
h5py = "*"

[environments]
np-stable-conda-dependent = ["np-stable", "conda-dependent"]
np-dev-conda-dependent = ["np-dev", "conda-dependent"]
np-stable-pypi-dependent = ["np-stable", "pypi-dependent"]
np-dev-pypi-dependent = ["np-dev", "pypi-dependent"]

Output pixi.lock:

  np-stable-conda-dependent:  # OK
    packages:
      linux-64:
      - conda: https://prefix.dev/conda-forge/linux-64/numpy-2.4.0-py314hd4f4903_0.conda
      [...]
  np-stable-pypi-dependent:  # OK
    packages:
      linux-64:
      - conda: https://prefix.dev/conda-forge/linux-64/numpy-2.4.
6685
0-py314hd4f4903_0.conda
      [...]
np-dev-conda-dependent:  # OK
    packages:
      linux-64:
      - conda: git+https://github.com/numpy/numpy?subdirectory=pixi-packages%2Fdefault#bc68b5afee9f460065f72be9723406f654219950
      [...]
  np-dev-pypi-dependent:  # broken; duplicated numpy
    packages:
      linux-64:
      - conda: git+https://github.com/numpy/numpy?subdirectory=pixi-packages%2Fdefault#bc68b5afee9f460065f72be9723406f654219950
      - pypi: https://files.pythonhosted.org/packages/03/75/d4c43b61de473912496317a854dac54f1efec3eeb158438da6884b70bb90/numpy-2.4.0-cp314-cp314-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
      [...]

Versions:

pixi 0.62.2

Expected behaviour:

the pixi recipe for numpy can be used as a drop-in replacement for numpy = "*" when there are conda packages depending on it as well as when there are pypi ones.

FYI @lucascolley

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0