You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As you can see, setuptools pass /LIBPATH:.local/lib (that's come from library-dirs of the ext-modules directive). But linker doesn't recognize it, perhaps because it doesn't follows Windows path convention with \ separators. (But note that compiler works with added include-dirs.)
abravalheri
changed the title
[BUG] linker flags don't passed correctly from ext-modules directive (on Windows)
[FR] linker flags don't passed correctly from ext-modules directive (on Windows)
Jan 8, 2025
Thanks @skirpichev, as far as I understand the reason why the problem does not occur when using setup.py is because setup.py is programmatically choosing the right path separator depending on the OS. But if you use static strings in setup.py I believe that you are going to observe the same problem (so in this sense, the behaviour is backwards compatible).
So I am reclassifying this issue as a feature request to implement some sort of dynamic processing of paths.
abravalheri
changed the title
[FR] linker flags don't passed correctly from ext-modules directive (on Windows)
[FR] pyproject.toml needs pre-processing of paths on windows as linker flags don't passed correctly from ext-modules directive (on Windows)
Jan 8, 2025
abravalheri
changed the title
[FR] pyproject.toml needs pre-processing of paths on windows as linker flags don't passed correctly from ext-modules directive (on Windows)
[FR] On Windows pyproject.toml needs pre-processing of paths as linker flags from ext-modules directive aren't handled correctly by linker
Jan 8, 2025
setup.py is programmatically choosing the right path separator depending on the OS
Exactly.
if you use static strings in setup.py I believe that you are going to observe the same problem
Well, docs says about include_dirs: "list of directories to search for C/C++ header files (in Unix form for portability)". So, I suspect this should work in a string form too.
setuptools version
75.6.0
Python version
3.13
OS
Window$
Additional environment information
No response
Description
I tried to switch my project to use new ext-modules directive, but without success:
diofant/python-gmp#124
It seems that linker flags passed incorrectly. Here is a fragment from build log:
As you can see, setuptools pass
/LIBPATH:.local/lib
(that's come fromlibrary-dirs
of the ext-modules directive). But linker doesn't recognize it, perhaps because it doesn't follows Windows path convention with\
separators. (But note that compiler works with addedinclude-dirs
.)Expected behavior
Successful build:)
How to Reproduce
I did a draft pr to show problem in CI:
diofant/python-gmp#124
Output
Sorry, I can't reproduce that locally.
The text was updated successfully, but these errors were encountered: