Skip to content
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

fix install for mac osx > 10.9, based on pandas fix for the same #584

Merged
merged 4 commits into from
May 1, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
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
1 change: 1 addition & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,7 @@ jobs:
pip install git+https://github.com/HERA-Team/linsolve.git
pip install git+https://github.com/HERA-Team/hera_qm.git
pip install git+https://github.com/HERA-Team/uvtools.git
pip install git+https://github.com/HERA-Team/hera_sim.git
- run:
name: run hera_cal tests
command: |
Expand Down
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ All notable changes to this project will be documented in this file.

### Fixed
- Possible bug where `check_variables` dictionary can change size during `read_miriad` call
- Building pyuvdata on macOS now targets minimum macOS 10.9 if run on macOS 10.9 or above


## [1.3.7] - 2019-04-02

Expand Down
1 change: 1 addition & 0 deletions ci/hera_cal.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ channels:
dependencies:
- aipy
- astropy
- cached-property
- h5py
- healpy
- matplotlib
Expand Down
21 changes: 21 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@
import glob
import os
import io
import sys
import platform
from distutils.sysconfig import get_config_var
from distutils.version import LooseVersion
import numpy as np
import json

Expand All @@ -24,6 +28,23 @@
readme = readme_file.read()


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


# 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
# implementation based on pandas, see https://github.com/pandas-dev/pandas/issues/23424
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'))
if python_target < '10.9' and current_system >= '10.9':
os.environ['MACOSX_DEPLOYMENT_TARGET'] = '10.9'

global_c_macros = [
('NPY_NO_DEPRECATED_API', 'NPY_1_7_API_VERSION'),
]
Expand Down