Merge branch 'master' of https://github.com/pandas-dev/pandas into le… · pandas-dev/pandas@207ffb9 (original) (raw)

3 files changed

lines changed

Original file line number Diff line number Diff line change
@@ -45,7 +45,6 @@ if [ "$DOC" ]; then
45 45 git add --all .
46 46 git commit -m "Version" --allow-empty
47 47
48 - git remote remove origin
49 48 git remote add origin "https://${PANDAS_GH_TOKEN}@github.com/pandas-dev/pandas-docs-travis.git"
50 49 git fetch origin
51 50 git remote -v
Original file line number Diff line number Diff line change
@@ -1630,6 +1630,7 @@ Build Changes
1630 1630
1631 1631 - Building pandas for development now requires ``cython >= 0.28.2`` (:issue:`21688`)
1632 1632 - Testing pandas now requires ``hypothesis>=3.58``. You can find `the Hypothesis docs here https://hypothesis.readthedocs.io/en/latest/index.html\`_, and a pandas-specific introduction :ref:`in the contributing guide <using-hypothesis>`. (:issue:`22280`)
1633 +- Building pandas on macOS now targets minimum macOS 10.9 if run on macOS 10.9 or above (:issue:`23424`)
1633 1634
1634 1635 Other
1635 1636 ^^^^^
Original file line number Diff line number Diff line change
@@ -10,6 +10,8 @@
10 10 from os.path import join as pjoin
11 11
12 12 import pkg_resources
13 +import platform
14 +from distutils.sysconfig import get_config_var
13 15 import sys
14 16 import shutil
15 17 from distutils.version import LooseVersion
@@ -24,6 +26,10 @@ def is_platform_windows():
24 26 return sys.platform == 'win32' or sys.platform == 'cygwin'
25 27
26 28
29 +def is_platform_mac():
30 +return sys.platform == 'darwin'
31 +
32 +
27 33 min_numpy_ver = '1.12.0'
28 34 setuptools_kwargs = {
29 35 'install_requires': [
@@ -434,6 +440,19 @@ def get_tag(self):
434 440 extra_compile_args = ['-Wno-unused-function']
435 441
436 442
443 +# For mac, ensure extensions are built for macos 10.9 when compiling on a
444 +# 10.9 system or above, overriding distuitls behaviour which is to target
445 +# the version that python was built for. This may be overridden by setting
446 +# MACOSX_DEPLOYMENT_TARGET before calling setup.py
447 +if is_platform_mac():
448 +if 'MACOSX_DEPLOYMENT_TARGET' not in os.environ:
449 +current_system = LooseVersion(platform.mac_ver()[0])
450 +python_target = LooseVersion(
451 +get_config_var('MACOSX_DEPLOYMENT_TARGET'))
452 +if python_target < '10.9' and current_system >= '10.9':
453 +os.environ['MACOSX_DEPLOYMENT_TARGET'] = '10.9'
454 +
455 +
437 456 # enable coverage by building cython files by setting the environment variable
438 457 # "PANDAS_CYTHON_COVERAGE" (with a Truthy value) or by running build_ext
439 458 # with `--with-cython-coverage`enabled