Uh oh!
There was an error while loading. Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork 34k
gh-121103: Put free-threaded libraries in lib/python3.14t#121293
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
Uh oh!
There was an error while loading. Please reload this page.
Conversation
colesbury commented Jul 2, 2024 • edited by bedevere-app bot
Loading Uh oh!
There was an error while loading. Please reload this page.
edited by bedevere-app bot
Uh oh!
There was an error while loading. Please reload this page.
On POSIX systems, excluding macOS framework installs, the lib directory for the free-threaded build now includes a "t" suffix to avoid conflicts with a co-located default build installation.
colesbury commented Jul 2, 2024
|
This also fixes the test_sysconfig failure on Windows.
hroncok commented Jul 3, 2024 • edited
Loading Uh oh!
There was an error while loading. Please reload this page.
edited
Uh oh!
There was an error while loading. Please reload this page.
Does this mean that all of the pure Python standard library files would need to be installed in lib/python3.14t |
encukou commented Jul 3, 2024
erlend-aasland commented Jul 3, 2024
As far as I can tell, from a quick look at this PR: yes. |
hroncok commented Jul 3, 2024 • edited
Loading Uh oh!
There was an error while loading. Please reload this page.
edited
Uh oh!
There was an error while loading. Please reload this page.
I thought so. The real question is: Is this the outcome we anticipated? If not, I suggest keeping the stdlib and platstdlib values intact. |
colesbury commented Jul 3, 2024
Yes, that was the intention. The goal is to separate the installation. We run into a lot of potential problems if we have partially overlapping stdlib files. |
erlend-aasland commented Jul 3, 2024
FTR, I totally agree with this. |
colesbury commented Jul 3, 2024
To expand on my previous comment: if we have kept a common stdlib and platstdlib, the Python files would be shared, but the |
colesbury commented Jul 10, 2024
I plan to merge this tomorrow if there are no objections |
ned-deily left a comment
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.
Other than the nit comment, +1. This looks like it does what it promises. We still have a bit more to do before a free-threaded build can be installed to the same prefix as a non-free-threaded build without conflicts, primarily due to duplicate symlinked names in the bin and lib/pkgconfig directories. But this isn't really a new problem as there are similar conflicts when sharing with a debug build prior to this PR. I'd say let's merge this PR now and we can follow up in another PR for which I want to do some more investigation.
Uh oh!
There was an error while loading. Please reload this page.
Thanks @colesbury for the PR 🌮🎉.. I'm working now to backport this PR to: 3.13. |
…thonGH-121293) On POSIX systems, excluding macOS framework installs, the lib directory for the free-threaded build now includes a "t" suffix to avoid conflicts with a co-located default build installation. (cherry picked from commit e8c91d9) Co-authored-by: Sam Gross <[email protected]>
GH-121631 is a backport of this pull request to the 3.13 branch. |
…H-121293) (#121631) On POSIX systems, excluding macOS framework installs, the lib directory for the free-threaded build now includes a "t" suffix to avoid conflicts with a co-located default build installation. (cherry picked from commit e8c91d9) Co-authored-by: Sam Gross <[email protected]>
…thon#121293) On POSIX systems, excluding macOS framework installs, the lib directory for the free-threaded build now includes a "t" suffix to avoid conflicts with a co-located default build installation.
| if hasattr(sys, 'abiflags') and 't' in sys.abiflags: | ||
| abi_thread = 't' | ||
| else: | ||
| abi_thread = '' | ||
| if os.sep == '/': | ||
| libdirs = [sys.platlibdir] | ||
| if sys.platlibdir != "lib": | ||
| libdirs.append("lib") | ||
| for libdir in libdirs: | ||
| path = os.path.join(prefix, libdir, | ||
| f"{implementation}{ver[0]}.{ver[1]}", | ||
| f"{implementation}{ver[0]}.{ver[1]}{abi_thread}", |
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.
@colesbury -- would you be able to update the docs for the site module to reflect these changes to how Python finds the site-packages directory?
(The context is I'm currently working on reimplementing Python's logic here for Astral's work-in-progress type checker. I was reading through the site.py source code, and it surprised me to find logic here that wasn't documented!)
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.
Thanks for the pointer. I put up a PR to update the docs: #122737
On POSIX systems, excluding macOS framework installs, the lib directory for the free-threaded build now includes a "t" suffix to avoid conflicts with a co-located default build installation.
lib/python3.14t(configure) #121103