New submission from Joshua Root <josh+pyt...@root.id.au>:

The `-undefined dynamic_lookup` option can only be used in LDSHARED on Mac OS X 
10.3 and later. There is a fallback to explicitly linking with the framework 
for 10.2 and earlier. I'm pretty sure that currently supported Python versions 
don't build on 10.2 or older for several other reasons (I happen to know that 
even building on 10.5 requires a little patching.) So it's probably reasonable 
to just drop this code path.

There is a closely related check in distutils, though you would only know it's 
related if you looked through the history as I did. It errors out if you try to 
build a module for an older MACOSX_DEPLOYMENT_TARGET than Python was configured 
with. The purpose of that is to prevent using the wrong LDSHARED flags for the 
target platform. If 10.2 support is dropped, that check can be removed entirely.

I am aware that distutils is deprecated, going away, etc., and I am submitting 
a PR to setuptools as well. But setuptools does not yet override the stdlib 
distutils with its own by default, so bugs in the stdlib copy are still 
relevant.

If it's decided to keep 10.2 support, the check in distutils should still be 
relaxed to error only if the current MDT is < 10.3 and the configured MDT is >= 
10.3. I can easily put together a PR for that if needed.

Either way, the approach taken in setuptools will depend on how LDSHARED is 
handled here.

----------
components: Build, Distutils, macOS
messages: 389157
nosy: dstufft, eric.araujo, jmr, ned.deily, ronaldoussoren
priority: normal
severity: normal
status: open
title: Drop support for Mac OS X < 10.3 module linking
type: enhancement
versions: Python 3.10, Python 3.6, Python 3.7, Python 3.8, Python 3.9

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue43568>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to