-
-
Notifications
You must be signed in to change notification settings - Fork 105
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
Support abi3 packages with a python version independent site-packages directory #669
base: main
Are you sure you want to change the base?
Conversation
Hi! This is the friendly automated conda-forge-linting service. I just wanted to let you know that I linted all conda-recipes in your PR ( |
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 like the idea!
@@ -0,0 +1,2 @@ | |||
import site, sys, os | |||
site.addsitedir(os.path.join(sys.prefix, 'lib', 'python', 'site-packages')) |
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.
One advantage of $PREFIX/lib/site-packages
is that it matches windows layout.
I'm +1 on using This touches on the larger installation scheme/directory layout and Conda-( |
It just occurred to me that there is one issue with this and that is the Noarch packages compile the There are two reasons for pre-compilation:
Do we have a plan for that? |
Yes, that's one of the details I was going to address if we had more time. If Now, I'm not suggesting we do this via post-link scripts (many pitfalls: shell compat, registering of This would be something we would have to figure out and carefully implement (via helper package(s) or some plugin nowadays, if really needed). Well, and then there is the mbargull-does-not-approve-but-working solution: ([EDIT]: There are, of course, other more intrusive or elaborate ways than the two given above to go about this, e.g., hack on |
Hello from Anaconda, it was called out today that it would be desirable to also build abi3 packages (when possible) on defaults. I like the idea since it would allow us to avoid compiling uslessly for all python versions supported. But I'm wondering how it will all work in the conda ecosystem. How will conda know that it can or can't install an abi3 package? If abi4 becomes a thing, how will conda know what to install or not to install? |
@mbargull in pixi / rattler we actually do not do the precompilation (yet) but we are starting to remove empty directories that only contain a |
Happy to see the Anacondian packager in the loop here! :)
On conda-forge we have these
We can do similar things for |
It makes sense to have such functionality for missing path metadata. (IDK how it's implemented, but if you do this "remove empty directories that only contain a |
In my testing, the |
Hi! This is the friendly automated conda-forge-linting service. I just wanted to let you know that I linted all conda-recipes in your PR ( I do have some suggestions for making it better though... For recipe:
This was used for disabling testing for cross-compiling.
|
@mbargull, would it be okay to merge here as we figure out pyc compilation? It'll be easier for me to play with it. |
Ping on this |
Sorry, missed this previously. If you want to test it out for some niche packages or builds you'd not put on I haven't worked out a concept for this yet, but I could imagine us having a
Do we have tracking issue for this yet? I'd copy the above into that then. My suggestion for now would be to put |
Thanks @isuruf for pointing out this PR to me. Reading between the lines I notice there seems to be a general consensus in here that it would be good to remove specialized behavior from installers (noarch: python in this case). Although I generally agree with this I just want to point out that it can also offers some benefits to have these specializations because it allows the installer to optimize better for these special cases. Pyc compilation especially is an interesting optimization. Rattler does parallel installation of packages which means it can already start pyc compilation of files even when certain packages are still being downloaded (as long as the interpreter package and its dependencies are installed first). Since compilation can be slow this can make a big impact on the total installation time. Not directly related to this PR (I completely support this change) but perhaps something to keep in mind. |
I opened a CEP at conda/ceps#86 |
Exciting! :) |
This is super exciting! Does python_abi need an update to enable this as well? I'm not sure how a package can properly depend on |
cc @conda-forge/core
When building abi3 packages, we just need to do
export PIP_TARGET=$PREFIX/lib/site-packages
when building downstreams and then everything else should work properly. (We also have to fix the metadata inmeta.yaml
in downstream recipes.