Skip to content

Commit

Permalink
Merge pull request #34 from sot/fix-build-on-catalina
Browse files Browse the repository at this point in the history
Add compile arg for building on MacOS Catalina / Xcode 11.2
  • Loading branch information
jeanconn authored Jan 9, 2020
2 parents e6da290 + d237dd2 commit 8e8d8fc
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 6 deletions.
1 change: 1 addition & 0 deletions .git_archival.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ref-names: $Format:%D$
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
.git_archival.txt export-subst
4 changes: 3 additions & 1 deletion Chandra/Time/__init__.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
# Licensed under a 3-clause BSD style license - see LICENSE.rst
import ska_helpers

from .Time import *

__version__ = '3.20.3'
__version__ = ska_helpers.get_version(__package__)


def test(*args, **kwargs):
Expand Down
12 changes: 7 additions & 5 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,16 +1,17 @@
# Licensed under a 3-clause BSD style license - see LICENSE.rst
from setuptools import setup, Extension

import os
import platform
from Cython.Build import cythonize

from Chandra.Time import __version__

if (os.name == "nt"):
os_name = platform.system()
if (os_name == "Windows"):
compile_args = ['/EHs', '/D_CRT_SECURE_NO_DEPRECATE']
else:
compile_args = ['-Wno-switch-enum', '-Wno-switch', '-Wno-switch-default',
'-Wno-deprecated', '-Wno-parentheses']
if os_name == 'Darwin':
compile_args += ['-stdlib=libc++']

extensions = [Extension("*", ["Chandra/Time/_axTime3.pyx"],
extra_compile_args=compile_args)]
Expand All @@ -24,7 +25,8 @@
author='Tom Aldcroft',
description='Convert between various time formats relevant to Chandra',
author_email='taldcroft@cfa.harvard.edu',
version=__version__,
use_scm_version=True,
setup_requires=['setuptools_scm', 'setuptools_scm_git_archive'],
zip_safe=False,
packages=['Chandra', 'Chandra.Time', 'Chandra.Time.tests'],
ext_modules=cythonize(extensions),
Expand Down

0 comments on commit 8e8d8fc

Please sign in to comment.