-
-
Notifications
You must be signed in to change notification settings - Fork 12k
Open
Labels
Description
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 runtimeThe 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.whlReproduce 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
lucascolley