-
-
Notifications
You must be signed in to change notification settings - Fork 31.5k
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
Define SOABI, LIBRARY, LDLIBRARY and LIBPL on Windows #88402
Comments
Python on Windows currently has no values in sysconfig to locate the lib files for building. Though these are very predictable (for now), it would be nice to have them in the same place as for other platforms. I propose defining the following config vars in sysconfig: LIBRARY=Path(_winapi.GetModuleFileName(sys.dllhandle)).stem
LDLIBRARY=Path(_winapi.GetModuleFileName(sys.dllhandle)).name
LIBPL=Path(sys.prefix) / "libs"
SOABI=<SO but without '.' and '.pyd'> Are there better shared names for these? Or others that should be added? |
Should actually be: LIBPL=Path(sysconfig.get_config_var("installed_base")) / "libs" |
Tools/freeze.py may not work on Windows because of this. cpython/Tools/freeze/freeze.py Line 239 in 04cc427
|
Well, we know it currently works well enough to pass tests, so there must be some other way that it handles that variable not currently existing. It's possible though that providing that value would cause it to start failing. And now I've been reminded of this issue, ping @FFY00 |
I think it's a good idea, we could definitely use this downstream until we have a better place to expose this information. Adding this should be fairly easy, the new variables just need to be added to Line 540 in 84181c1
I'd also probably add a test to make sure they match with the values in
Yes, it should be derived from |
I can put up a PR for this. I think having |
@colesbury, yeah please do! I'd be happy to review it. |
This adds `LIBRARY`, `LDLIBRARY`, `LIBPL`, `SOABI`, and `Py_NOGIL` variables to sysconfig on Windows. Note that `Py_NOGIL` is only defined in `--disable-gil` builds.
Co-authored-by: Filipe Laíns <filipe.lains@gmail.com>
GH-110049 landed thanks to @colesbury, which implemented this, but with the following differences from the original proposal:
|
Co-authored-by: Filipe Laíns <filipe.lains@gmail.com>
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
Linked PRs
The text was updated successfully, but these errors were encountered: