8000 BLD: for C extension builds on mac, target macOS 10.9 where possible by robbuckley · Pull Request #24274 · pandas-dev/pandas · GitHub
[go: up one dir, main page]

Skip to content

BLD: for C extension builds on mac, target macOS 10.9 where possible #24274

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 6 commits into from
Dec 28, 2018
Merged
Changes from 1 commit
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
Next Next commit
BLD: mac builds target 10.9 on newer systems GH23424
  • Loading branch information
robbuckley committed Dec 11, 2018
commit 256faf2011a12424e684a42c147e1ba7ac32c6fb
18 changes: 18 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,10 @@ def is_platform_windows():
return sys.platform == 'win32' or sys.platform == 'cygwin'


def is_platform_mac():
return sys.platform == 'darwin'


min_numpy_ver = '1.12.0'
setuptools_kwargs = {
'install_requires': [
Expand Down Expand Up @@ -434,6 +438,20 @@ def get_tag(self):
extra_compile_args = ['-Wno-unused-function']


# 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 the version that python was built for.
# This may be overridden by setting MACOSX_DEPLOYMENT_TARGET before calling setup.py
if is_platform_mac():
import _osx_support
import distutils.sysconfig
if not 'MACOSX_DEPLOYMENT_TARGET' in os.environ:
current_system = list(map(int, _osx_support._get_system_version().split('.')))
python_osx_target_str = distutils.sysconfig.get_config_var('MACOSX_DEPLOYMENT_TARGET')
python_osx_target = list(map(int, python_osx_target_str.split('.')))
if python_osx_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