diff options
-rw-r--r-- | docs/release-notes/version-4.4.14.rst | 5 | ||||
-rw-r--r-- | setup.py | 36 |
2 files changed, 40 insertions, 1 deletions
diff --git a/docs/release-notes/version-4.4.14.rst b/docs/release-notes/version-4.4.14.rst index 3c78b34..9b51eed 100644 --- a/docs/release-notes/version-4.4.14.rst +++ b/docs/release-notes/version-4.4.14.rst @@ -27,6 +27,11 @@ Previously, an attempt to use ``fileno()`` on ``sys.stdout`` and ``sys.stderr`` would raise an ``AttributeError`` instead due to there being no ``fileno()`` method. +3. Use compiler include flags from running of ``apr-config`` and +``apu-config`` when doing ``pip`` install of ``mod_wsgi-express``. This is +necessary as on MacOS X 10.11 El Capitan the include flags for APR returned +by ``apxs`` refer to the wrong location causing installation to fail. + New Features ------------ @@ -187,6 +187,12 @@ if WITH_TARBALL_PACKAGE: sub_value = expand_vars(value) return sub_value.replace('/mod_wsgi-packages/', SCRIPT_DIR+'/') + def get_apr_includes(query): + return '' + + def get_apu_includes(query): + return '' + CONFIG['PREFIX'] = get_apxs_config('prefix') CONFIG['TARGET'] = get_apxs_config('target') CONFIG['SYSCONFDIR'] = get_apxs_config('sysconfdir') @@ -205,6 +211,28 @@ else: out = out.decode('UTF-8') return out.strip() + def get_apr_includes(): + if not APR_CONFIG: + return '' + + p = subprocess.Popen([APR_CONFIG, '--includes'], + stdout=subprocess.PIPE, stderr=subprocess.PIPE) + out, err = p.communicate() + if isinstance(out, bytes): + out = out.decode('UTF-8') + return out.strip() + + def get_apu_includes(): + if not APU_CONFIG: + return '' + + p = subprocess.Popen([APU_CONFIG, '--includes'], + stdout=subprocess.PIPE, stderr=subprocess.PIPE) + out, err = p.communicate() + if isinstance(out, bytes): + out = out.decode('UTF-8') + return out.strip() + INCLUDEDIR = get_apxs_config('INCLUDEDIR') CPPFLAGS = get_apxs_config('CPPFLAGS').split() CFLAGS = get_apxs_config('CFLAGS').split() @@ -213,6 +241,12 @@ EXTRA_INCLUDES = get_apxs_config('EXTRA_INCLUDES').split() EXTRA_CPPFLAGS = get_apxs_config('EXTRA_CPPFLAGS').split() EXTRA_CFLAGS = get_apxs_config('EXTRA_CFLAGS').split() +APR_CONFIG = get_apxs_config('APR_CONFIG') +APU_CONFIG = get_apxs_config('APU_CONFIG') + +APR_INCLUDES = get_apr_includes().split() +APU_INCLUDES = get_apu_includes().split() + # 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. @@ -312,7 +346,7 @@ if os.path.exists(os.path.join(PYTHON_CFGDIR, INCLUDE_DIRS = [INCLUDEDIR] EXTRA_COMPILE_FLAGS = (EXTRA_INCLUDES + CPPFLAGS + EXTRA_CPPFLAGS + - CFLAGS + EXTRA_CFLAGS) + CFLAGS + EXTRA_CFLAGS + APR_INCLUDES + APU_INCLUDES) EXTRA_LINK_ARGS = PYTHON_LDFLAGS + PYTHON_LDLIBS # Force adding of LD_RUN_PATH for platforms that may need it. |