gh-99942: python.pc on android/cygwin should link to libpython per configure.ac by eli-schwartz · Pull Request #100356 · python/cpython (original) (raw)
In commit 254b309 a previous change to avoid linking to libpython was partially reverted for Android (and later Cygwin as well), to add back the link flags. This was applied to distutils and to python-config.sh, but not to python.pc.
Add it back to python.pc as well.
Automerge-Triggered-By: GH:gpshead
…roid/cygwin
In commit 254b309 a previous change to avoid linking to libpython was partially reverted for Android (and later Cygwin as well), to add back the link flags. This was applied to distutils and to python-config.sh, but not to python.pc.
Add it back to python.pc as well.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks correct to me, but I'd like someone else to also have a look if possible,
@gpshead My immediate impression is that it makes sense; however, @mhsmith maintains the Chaquopy backend that BeeWare uses; he'll have a more authoritative opinion.
🤖 New build scheduled with the buildbot fleet by @gpshead for commit 57e63ca 🤖
The command will test the builders whose names match following regular expression: Installed
The builders matched are:
🤖 New build scheduled with the buildbot fleet by @gpshead for commit 57e63ca 🤖
The command will test the builders whose names match following regular expression: .*Installed
The builders matched are:
s390x Fedora Clang Installed PR
aarch64 Fedora Stable Clang Installed PR
x86 Gentoo Installed with X PR
PPC64LE Fedora Stable Clang Installed PR
AMD64 Fedora Stable Clang Installed PR
Chaquopy doesn't currently use this .pc file, but this looks fine to me.
The buildbot fails seem unrelated, I triggered a rebuild.
I don't see how this patch can cause the asyncio tests to fail or a stack overflow. @FFY00 can you restart the failed CI jobs? Should the PR be rebased to include some fixes landed in main in the meantime?
Status check is done, and it's a success ✅.
Thanks. Can this be backported to maintenance branches as well?
carljm added a commit to carljm/cpython that referenced this pull request
dnicolodi pushed a commit to dnicolodi/meson that referenced this pull request
dnicolodi pushed a commit to dnicolodi/meson that referenced this pull request
dnicolodi pushed a commit to dnicolodi/meson that referenced this pull request
dnicolodi pushed a commit to dnicolodi/meson that referenced this pull request
eli-schwartz added a commit to eli-schwartz/meson that referenced this pull request
…nt python
On python >=3.8, this information is expected to be encoded in the sysconfig vars.
In distutils, it is always necessary to link to libpython on Windows; for posix platforms, it depends on the value of LIBPYTHON (which is the library to link to, possibly the empty string) as generated by configure.ac and embedded into python.pc and python-config.sh, and then coded a second time in the distutils python sources.
There are a couple of caveats which have ramifications for Cygwin and Android:
python.pc and python-config.sh disagree with distutils when python is not built shared. In that case, the former act the same as a shared build, while the latter never links to libpython
python.pc disagrees with python-config.sh and distutils when python is built shared. The former never links to libpython, while the latter do
The disagreement is resolved in favor of distutils' behavior in all cases, and python.pc is correct for our purposes on python 3.12; see: python/cpython#100356 python/cpython#100967
Although it was not backported to older releases, Cygwin at least has always patched in a fix for python.pc, which behavior is now declared canonical. We can reliably assume it is always correct.
This is the other half of the fix for mesonbuild#7702
eli-schwartz added a commit to eli-schwartz/meson that referenced this pull request
…nt python
On python >=3.8, this information is expected to be encoded in the sysconfig vars.
In distutils, it is always necessary to link to libpython on Windows; for posix platforms, it depends on the value of LIBPYTHON (which is the library to link to, possibly the empty string) as generated by configure.ac and embedded into python.pc and python-config.sh, and then coded a second time in the distutils python sources.
There are a couple of caveats which have ramifications for Cygwin and Android:
python.pc and python-config.sh disagree with distutils when python is not built shared. In that case, the former act the same as a shared build, while the latter never links to libpython
python.pc disagrees with python-config.sh and distutils when python is built shared. The former never links to libpython, while the latter do
The disagreement is resolved in favor of distutils' behavior in all cases, and python.pc is correct for our purposes on python 3.12; see: python/cpython#100356 python/cpython#100967
Although it was not backported to older releases, Cygwin at least has always patched in a fix for python.pc, which behavior is now declared canonical. We can reliably assume it is always correct.
This is the other half of the fix for mesonbuild#7702
eli-schwartz added a commit to eli-schwartz/meson that referenced this pull request
…nt python
On python >=3.8, this information is expected to be encoded in the sysconfig vars.
In distutils, it is always necessary to link to libpython on Windows; for posix platforms, it depends on the value of LIBPYTHON (which is the library to link to, possibly the empty string) as generated by configure.ac and embedded into python.pc and python-config.sh, and then coded a second time in the distutils python sources.
There are a couple of caveats which have ramifications for Cygwin and Android:
python.pc and python-config.sh disagree with distutils when python is not built shared. In that case, the former act the same as a shared build, while the latter never links to libpython
python.pc disagrees with python-config.sh and distutils when python is built shared. The former never links to libpython, while the latter do
The disagreement is resolved in favor of distutils' behavior in all cases, and python.pc is correct for our purposes on python 3.12; see: python/cpython#100356 python/cpython#100967
Although it was not backported to older releases, Cygwin at least has always patched in a fix for python.pc, which behavior is now declared canonical. We can reliably assume it is always correct.
This is the other half of the fix for mesonbuild#7702
(cherry picked from commit 2d6c109)
robtaylor pushed a commit to robtaylor/meson that referenced this pull request
…nt python
On python >=3.8, this information is expected to be encoded in the sysconfig vars.
In distutils, it is always necessary to link to libpython on Windows; for posix platforms, it depends on the value of LIBPYTHON (which is the library to link to, possibly the empty string) as generated by configure.ac and embedded into python.pc and python-config.sh, and then coded a second time in the distutils python sources.
There are a couple of caveats which have ramifications for Cygwin and Android:
python.pc and python-config.sh disagree with distutils when python is not built shared. In that case, the former act the same as a shared build, while the latter never links to libpython
python.pc disagrees with python-config.sh and distutils when python is built shared. The former never links to libpython, while the latter do
The disagreement is resolved in favor of distutils' behavior in all cases, and python.pc is correct for our purposes on python 3.12; see: python/cpython#100356 python/cpython#100967
Although it was not backported to older releases, Cygwin at least has always patched in a fix for python.pc, which behavior is now declared canonical. We can reliably assume it is always correct.
This is the other half of the fix for mesonbuild#7702
nirbheek pushed a commit to mesonbuild/meson that referenced this pull request
…nt python
On python >=3.8, this information is expected to be encoded in the sysconfig vars.
In distutils, it is always necessary to link to libpython on Windows; for posix platforms, it depends on the value of LIBPYTHON (which is the library to link to, possibly the empty string) as generated by configure.ac and embedded into python.pc and python-config.sh, and then coded a second time in the distutils python sources.
There are a couple of caveats which have ramifications for Cygwin and Android:
python.pc and python-config.sh disagree with distutils when python is not built shared. In that case, the former act the same as a shared build, while the latter never links to libpython
python.pc disagrees with python-config.sh and distutils when python is built shared. The former never links to libpython, while the latter do
The disagreement is resolved in favor of distutils' behavior in all cases, and python.pc is correct for our purposes on python 3.12; see: python/cpython#100356 python/cpython#100967
Although it was not backported to older releases, Cygwin at least has always patched in a fix for python.pc, which behavior is now declared canonical. We can reliably assume it is always correct.
This is the other half of the fix for #7702
python-sidebar pushed a commit to python-sidebar/Python-Documentation-Fork-With-TOC that referenced this pull request
…per configure.ac (pythonGH-100356)
In commit 254b309 a previous change to avoid linking to libpython was partially reverted for Android (and later Cygwin as well), to add back the link flags. This was applied to distutils and to python-config.sh, but not to python.pc.
Add it back to python.pc as well.
Automerge-Triggered-By: GH:gpshead
python-sidebar pushed a commit to python-sidebar/Python-Documentation-Fork-With-TOC that referenced this pull request
…per configure.ac (pythonGH-100356)
In commit 254b309 a previous change to avoid linking to libpython was partially reverted for Android (and later Cygwin as well), to add back the link flags. This was applied to distutils and to python-config.sh, but not to python.pc.
Add it back to python.pc as well.
Automerge-Triggered-By: GH:gpshead
JelleZijlstra pushed a commit to JelleZijlstra/cpython that referenced this pull request
…per configure.ac (pythonGH-100356)
In commit 254b309 a previous change to avoid linking to libpython was partially reverted for Android (and later Cygwin as well), to add back the link flags. This was applied to distutils and to python-config.sh, but not to python.pc.
Add it back to python.pc as well.
Automerge-Triggered-By: GH:gpshead
Volker-Weissmann pushed a commit to Volker-Weissmann/meson that referenced this pull request
…nt python
On python >=3.8, this information is expected to be encoded in the sysconfig vars.
In distutils, it is always necessary to link to libpython on Windows; for posix platforms, it depends on the value of LIBPYTHON (which is the library to link to, possibly the empty string) as generated by configure.ac and embedded into python.pc and python-config.sh, and then coded a second time in the distutils python sources.
There are a couple of caveats which have ramifications for Cygwin and Android:
python.pc and python-config.sh disagree with distutils when python is not built shared. In that case, the former act the same as a shared build, while the latter never links to libpython
python.pc disagrees with python-config.sh and distutils when python is built shared. The former never links to libpython, while the latter do
The disagreement is resolved in favor of distutils' behavior in all cases, and python.pc is correct for our purposes on python 3.12; see: python/cpython#100356 python/cpython#100967
Although it was not backported to older releases, Cygwin at least has always patched in a fix for python.pc, which behavior is now declared canonical. We can reliably assume it is always correct.
This is the other half of the fix for mesonbuild#7702