-
Notifications
You must be signed in to change notification settings - Fork 1.9k
virtual glibc package #9358
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
virtual glibc package #9358
Conversation
Co-Authored-By: Isuru Fernando <isuruf@gmail.com>
Co-Authored-By: Isuru Fernando <isuruf@gmail.com>
@@ -54,6 +54,16 @@ def test_supplement_index_with_system(): | |||
assert cuda_pkg.package_type == PackageType.VIRTUAL_SYSTEM | |||
|
|||
|
|||
def test_supplement_index_with_system_glibc(): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This test will fail on non-glibc systems
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@scopatz, the tests fail because context.libc_family_version
is not overriden by the env variable CONDA_OVERRIDE_GLIBC
@@ -157,6 +158,11 @@ def _supplement_index_with_system(index): | |||
rec = _make_virtual_package('__cuda', cuda_version) | |||
index[rec] = rec | |||
|
|||
libc_family, libc_version = context.libc_family_version |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm wondering a bit on how this will behave on systems where we have musl + glibc-wrapper, e.g. the miniconda3:4.7.10-alpine
docker image.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking at https://github.com/conda/conda/blob/4.7.12/conda/common/_os/linux.py#L20-L48 , I would assume it gets the glibc
configuration (under the premise that you run the Anaconda or conda-forge conda
and python
packages -- if you would dare to pip install
conda
into musl
-built CPython installation things might turn out differently ;D).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, that image gives you glibc, 2.28
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you point me to where the tests actually fail? All of the Circle tests I saw seem to fail long before this
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Co-Authored-By: Uwe L. Korn <xhochy@users.noreply.github.com>
* ``CONDA_OVERRIDE_CUDA`` - CUDA version number or set to ``""`` for no CUDA | ||
detected. | ||
* ``CONDA_OVERRIDE_GLIBC`` - CUDA version number or set to ``""`` for no GLIBC. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wasn't aware of #8267 -- IMO we shouldn't have that CONDA_OVERRIDE_CUDA
environment variable handling, but we should use conda
's builtin configuration capabilities that allow overriding config parameters via environment variables.
Meaning, I would propose a virtual_packages
(/system_packages
/virtual_system_packages
/virtual_package_overrides
/something) configuration option akin to pinned_packages
/disabled_packages
.
(Not saying @scopatz has to implement that in this PR, but it would be very advantageous to have a more general solution in place, rather than introducing separate env vars for every "virtual package".)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, my goal here is to do the minimum possible for this capability. I just need bluetooth capability, and am already pretty deep in the weeds here 😉
@@ -157,6 +158,11 @@ def _supplement_index_with_system(index): | |||
rec = _make_virtual_package('__cuda', cuda_version) | |||
index[rec] = rec | |||
|
|||
libc_family, libc_version = context.libc_family_version |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking at https://github.com/conda/conda/blob/4.7.12/conda/common/_os/linux.py#L20-L48 , I would assume it gets the glibc
configuration (under the premise that you run the Anaconda or conda-forge conda
and python
packages -- if you would dare to pip install
conda
into musl
-built CPython installation things might turn out differently ;D).
Co-Authored-By: jakirkham <jakirkham@gmail.com>
OK I think that this is ready for review again. Also note that CI is still broken in ways unrelated to this PR |
Co-Authored-By: Isuru Fernando <isuruf@gmail.com>
Also, everyone, please feel free to push to this branch directly. |
Co-Authored-By: Isuru Fernando <isuruf@gmail.com>
Ok I have the tests running now and the added test passes. CI failures are unrelated. |
LGTM, thanks for the addition @scopatz |
FYI, a conda 4.8.0 release is planned for later this week / earlier next week. This will make a nice addition. |
Excellent thanks! glad I could get this in under the wire 😉 |
Thanks for taking point on this @scopatz. We have needed this for a while. It will dramatically improve compatibility messaging on Linux. Thanks for the thorough review, @xhochy @isuruf @mbargull @jakirkham. |
Hi there, thank you for your contribution to Conda! This pull request has been automatically locked since it has not had recent activity after it was closed. Please open a new issue or pull request if needed. |
Similar to #9349, implements #9348, and addresses some of the issues in conda-forge/staged-recipes#9902.
CC @mingwandroid @jakirkham @msarahan @jjhelmus @isuruf