Skip to content
This repository was archived by the owner on Feb 2, 2024. It is now read-only.
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
2 changes: 1 addition & 1 deletion buildscripts/build.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,6 @@ def build(sdc_utils):
sdc_env_packages += ['conda-verify', 'vc', 'vs2015_runtime', 'vs2015_win-64', 'pywin32=223']
# Install conda-build and other packages from anaconda channel due to issue with wheel
# output build if use intel channels first
sdc_utils.create_environment(sdc_env_packages + ['-c', 'anaconda'])
sdc_utils.create_environment(sdc_env_packages)

build(sdc_utils)
2 changes: 1 addition & 1 deletion buildscripts/utilities.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ def __init__(self, python, channels=None, sdc_channel=None):
self.line_single = '-'*80

# Set channels
build_channels = ['-c', 'defaults', '-c', 'conda-forge']
build_channels = ['-c', 'main', '-c', 'conda-forge', '-c', 'defaults']
self.channel_list = build_channels if channels is None else channels.split()
if sdc_channel:
self.sdc_channel = Path(sdc_channel).resolve().as_uri()
Expand Down
2 changes: 1 addition & 1 deletion conda-recipe/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ requirements:
build:
- {{ compiler('c') }} # [not osx]
- {{ compiler('cxx') }} # [not osx]
- numba {{ NUMBA_VERSION }}
- sysroot_linux-64 >=2.17 # [linux]

host:
- python
Expand Down
19 changes: 15 additions & 4 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@
np_compile_args = np_misc.get_info('npymath')

is_win = platform.system() == 'Windows'
is_osx = platform.system() == 'Darwin'


def readme():
Expand Down Expand Up @@ -108,11 +109,21 @@ def check_file_at_path(path2file):
tbb_root = os.getenv('TBBROOT')
if not tbb_root:
tbb_root = check_file_at_path(['include', 'tbb', 'tbb.h'])
assert tbb_root, "TBB headers required to build SDC not found"

ind = [PREFIX_DIR + '/include', ]
lid = [PREFIX_DIR + '/lib', ]
eca = ['-std=c++11', "-O3", "-DTBB_PREVIEW_WAITING_FOR_WORKERS=1"] # '-g', '-O0']
ela = ['-std=c++11', ]

if is_win:
eca = ['/std:c++17', "/Ox", "/DTBB_PREVIEW_WAITING_FOR_WORKERS=1", ] # "/Zi", "/Od", "/DEBUG:FULL"]
ela = [] # '/DEBUG:FULL', ]
else:
eca = ['-std=c++17', "-O3", "-DTBB_PREVIEW_WAITING_FOR_WORKERS=1", ] # '-g', '-O0']
ela = []

# On macOS, c++17 flag is ignored unless this flag is also passed to distutils
if is_osx:
eca += ["-fno-aligned-allocation"]

io_libs = []

Expand Down Expand Up @@ -202,8 +213,8 @@ def check_file_at_path(path2file):
sources=["sdc/_datetime_ext.cpp"],
libraries=np_compile_args['libraries'],
define_macros=np_compile_args['define_macros'],
extra_compile_args=['-std=c++11'],
extra_link_args=['-std=c++11'],
extra_compile_args=eca,
extra_link_args=ela,
include_dirs=np_compile_args['include_dirs'],
library_dirs=np_compile_args['library_dirs'],
language="c++"
Expand Down