Skip to content

Commit

Permalink
BLD: fix error when config variable MACOSX_DEPLOYMENT_TARGET is not s…
Browse files Browse the repository at this point in the history
…et, such as with PyPy (pandas-dev#26536)
  • Loading branch information
robbuckley committed Jun 14, 2019
1 parent 430f0fd commit 7c78b26
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -442,19 +442,18 @@ def run(self):
if debugging_symbols_requested:
extra_compile_args.append('-g')

# For mac, ensure extensions are built for macos 10.9 when compiling on a
# 10.9 system or above, overriding distuitls behaviour which is to target
# For mac, ensure extensions are built for at least macOS 10.9 when compiling on a
# 10.9 system or above, overriding CPython distuitls behaviour which is to target
# the version that python was built for. This may be overridden by setting
# MACOSX_DEPLOYMENT_TARGET before calling setup.py
if is_platform_mac():
if 'MACOSX_DEPLOYMENT_TARGET' not in os.environ:
current_system = LooseVersion(platform.mac_ver()[0])
python_target = LooseVersion(
get_config_var('MACOSX_DEPLOYMENT_TARGET'))
get_config_vars().get('MACOSX_DEPLOYMENT_TARGET', current_system))
if python_target < '10.9' and current_system >= '10.9':
os.environ['MACOSX_DEPLOYMENT_TARGET'] = '10.9'


# enable coverage by building cython files by setting the environment variable
# "PANDAS_CYTHON_COVERAGE" (with a Truthy value) or by running build_ext
# with `--with-cython-coverage`enabled
Expand Down

0 comments on commit 7c78b26

Please sign in to comment.