Solution to issue cannot be found in the documentation.
[X] I checked the documentation.
Issue
As far as I can tell the distributions contain a direct_url.json file (/lib/python3.9/site-packages/python_ldap-3.4.3.dist-info/direct_url.json), although direct_url.json should not be in the distributions. When the distribution gets installed this file gets installed as well and its presence causes confusion for other installers (at least for Poetry).
A bit more details about our concrete case. We use conda and Poetry in combination. We first create a conda environment in which we install python-ldap pinned to version 3.4.3. Then inside the conda environment we run poetry install for a project where python-ldap is also pinned to 3.4.3. Seeing the obviously faulty content of the direct_url.json file, Poetry legitimately considers that poetry-ldap does not fulfill the requirements and must be reinstalled, which fails.
In our case Poetry can not install python-ldap itself, because on PyPI it is only distributed as sdist (no wheel), which needs to be built, which requires a compilation step, which requires a compiler and header files, and we do not have those. That is why we install python-ldap with conda in the first place.
Removing the direct_url.json file before running poetry install fixes the issue.
As far as I can tell, the presence of the unwanted direct_url.json file is not an issue specific to this feedstock, it is a common issue in a lot of other conda packages.
If I understood correctly, this happens because the build process includes a pip install step for a local source tree which leads pip to legitimately create this direct_url.json file. But since the installation is meant to be repackaged in conda distributions for later installation, the feedstock should not place direct_url.json in the distributions.
Solution to issue cannot be found in the documentation.
Issue
As far as I can tell the distributions contain a
direct_url.json
file (/lib/python3.9/site-packages/python_ldap-3.4.3.dist-info/direct_url.json
), althoughdirect_url.json
should not be in the distributions. When the distribution gets installed this file gets installed as well and its presence causes confusion for other installers (at least for Poetry).A bit more details about our concrete case. We use conda and Poetry in combination. We first create a conda environment in which we install
python-ldap
pinned to version3.4.3
. Then inside the conda environment we runpoetry install
for a project wherepython-ldap
is also pinned to3.4.3
. Seeing the obviously faulty content of thedirect_url.json
file, Poetry legitimately considers thatpoetry-ldap
does not fulfill the requirements and must be reinstalled, which fails.In our case Poetry can not install
python-ldap
itself, because on PyPI it is only distributed as sdist (no wheel), which needs to be built, which requires a compilation step, which requires a compiler and header files, and we do not have those. That is why we installpython-ldap
with conda in the first place.Removing the
direct_url.json
file before runningpoetry install
fixes the issue.As far as I can tell, the presence of the unwanted
direct_url.json
file is not an issue specific to this feedstock, it is a common issue in a lot of other conda packages.If I understood correctly, this happens because the build process includes a
pip install
step for a local source tree which leads pip to legitimately create thisdirect_url.json
file. But since the installation is meant to be repackaged in conda distributions for later installation, the feedstock should not placedirect_url.json
in the distributions.Related:
Installed packages
Environment info