-
-
Notifications
You must be signed in to change notification settings - Fork 105
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix site-packages for freethreading and abi3
- Loading branch information
Showing
2 changed files
with
34 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
import site, sys, os | ||
|
||
dirs_to_add = [] | ||
# Workaround for https://github.com/conda/conda/issues/14053 | ||
if sys.abiflags != '': | ||
dirs_to_add.append(os.path.join(sys.prefix, 'lib', f'python3.{sys.version_info[1]}', 'site-packages')) | ||
# Workaround for https://github.com/conda/conda/issues/10969 | ||
dirs_to_add.append(os.path.join(sys.prefix, 'lib', f'python3.1', 'site-packages')) | ||
# A python version independent directory that ABI3 and noarch packages can use. | ||
# This is unused at the moment, but keeping it here for experimentation. | ||
dirs_to_add.append(os.path.join(sys.prefix, 'lib', f'python', 'site-packages')) | ||
|
||
for d in dirs_to_add: | ||
if os.path.exists(d): | ||
site.addsitedir(d) |