summaryrefslogtreecommitdiff
path: root/setup.py
diff options
context:
space:
mode:
authorGraham Dumpleton <Graham.Dumpleton@gmail.com>2018-01-18 15:33:35 +0800
committerGraham Dumpleton <Graham.Dumpleton@gmail.com>2018-01-18 15:33:35 +0800
commitc427019e2c708ecf3def9e5dcd581d84a161bb6b (patch)
tree1ba4c1f5391e73b753ac14a1741a542ada8bd18c /setup.py
parent6c8d06092f619fb67cebb707e205b5f7d3db106a (diff)
downloadmod_wsgi-c427019e2c708ecf3def9e5dcd581d84a161bb6b.tar.gz
Raise exception when can't find Xcode on MacOS and doing pip or setup.py install.
Diffstat (limited to 'setup.py')
-rw-r--r--setup.py14
1 files changed, 14 insertions, 0 deletions
diff --git a/setup.py b/setup.py
index 07cdb7a..9604b28 100644
--- a/setup.py
+++ b/setup.py
@@ -330,6 +330,20 @@ else:
APR_INCLUDES = get_apr_includes().split()
APU_INCLUDES = get_apu_includes().split()
+if not os.path.exists(APR_CONFIG) and not INCLUDEDIR:
+ if sys.platform == 'darwin':
+ # Likely no Xcode application installed or location of SDK in
+ # Xcode has changed with a new release of Xcode application.
+
+ raise RuntimeError('No Apache installation can be found, do you '
+ 'have the full Apple Xcode installed. It is not enough to '
+ 'have just the xcode command line tools installed.')
+ else:
+ # Set INCLUDEDIR just to avoid having an empty path. Probably
+ # should raise an exception here.
+
+ INCLUDEDIR = '/usr/include'
+
# Write out apxs_config.py which caches various configuration related to
# Apache. For the case of using our own Apache build, this needs to
# calculate values dynamically based on where binaries were installed.