Ned Deily <n...@python.org> added the comment:

Now that Apple, as of 10.14, has removed the option to install system header 
files into their traditional locations (like /usr/include), thus making every 
build a build from an SDK, this problem is now more noticeable.  At least, I 
finally noticed it while fixing the more general problems that setup.py had on 
all branches (see Issue36231).  This issue is in addition and is specific to 
2.7.  As can be seen in Ronald's patch, which I didn't find until after I had 
written my own, the problem is that, in 2.7's setup.py, add_dir_to_list() does 
not take the SDK manipulation into account and, in particular, skips adding 
/usr/include because that directory doen't exist in the root filesystem 
anymore.  On my systems, besides zlib, the dbm and nis modules were also being 
skipped. Curiously, some other extension modules with system library 
dependencies do get built properly, like _sqlite3, because their build step in 
setup.py explicitly added /usr/include to the SDK search paths.

Anyway, the PR I produced is somewhat more complicated that Ronald's original 
patch.  It's more careful about what paths it checks for and it also stores the 
directory name, if found, without the prepended SDK path.  That may be 
important in other steps in setup.py where it is doing path comparisons.  The 
SDK will eventually get added again, either explicitly or implicitly by the 
compiler tool chain.

----------
priority: normal -> high
title: MacOSX: Building 2.7 without the xcode command line  tools installed -> 
zlib skipped when building 2.7 on macOS without /usr/include installed

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

Reply via email to