Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
When building 2.7 on macOS without system header files installed in
``/usr/include``, a few extension modules dependent on system-supplied
third-party libraries were not being built, most notably zlib.

11 changes: 9 additions & 2 deletions 11 setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,15 @@ def add_dir_to_list(dirlist, dir):
"""Add the directory 'dir' to the list 'dirlist' (at the front) if
1) 'dir' is not already in 'dirlist'
2) 'dir' actually exists, and is a directory."""
if dir is not None and os.path.isdir(dir) and dir not in dirlist:
dirlist.insert(0, dir)
if dir is not None and dir not in dirlist:
if host_platform == 'darwin' and is_macosx_sdk_path(dir):
# If in a macOS SDK path, check relative to the SDK root
dir_exists = os.path.isdir(
os.path.join(macosx_sdk_root(), dir[1:]))
else:
dir_exists = os.path.isdir(dir)
if dir_exists:
dirlist.insert(0, dir)

MACOS_SDK_ROOT = None

Expand Down
Morty Proxy This is a proxified and sanitized view of the page, visit original site.