Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mamba and Micromamba do not seem to respect the "Direct URL Origin" standard #3758

Open
fabcor-maxiv opened this issue Jan 17, 2025 · 0 comments

Comments

@fabcor-maxiv
Copy link

fabcor-maxiv commented Jan 17, 2025

As far as I understand, it seems to me like Mamba and Micromamba are not respecting the "Direct URL Origin" standard.

For example:

$ micromamba create -p /tmp/six six==1.17.0
# ...
$ cat /tmp/six/lib/python3.13/site-packages/six-1.17.0.dist-info/direct_url.json 
{"dir_info": {}, "url": "file:///home/conda/feedstock_root/build_artifacts/six_1733380938961/work"}

From my reading of the specification, this file should not exist.

Here is an excerpt of the specification:

The direct_url.json file MUST be created in the *.dist-info directory by installers when installing a distribution from a requirement specifying a direct URL reference (including a VCS URL).

This file MUST NOT be created when installing a distribution from an other type of requirement (i.e. name plus version specifier).

The way I understand the specification, this is the second clause that should apply in the example I presented above, and there should not be any direct-url.json in the .dist-info directory.

I assume that this file is created by a pip install step of the Conda recipe. This file is then added (blindly) to the .conda package. And finally this file is copied (incorrectly) by Micromamba to the install location with the rest of the content of the .conda package.

I know that the PyPA specifications might not be necessarily in scope for the Conda ecosystem. Anyway here is a case where this causes real incompatibility issues: python-poetry/poetry#6408 (comment).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant