From 6f9de4509c159c1e3c517e0d6a4ab8ac59a4909a Mon Sep 17 00:00:00 2001 From: Eliot Quon Date: Tue, 14 Nov 2023 13:49:48 -0700 Subject: [PATCH] Update setup (#235) * Update compiler flag for mac Tested with macosx-11.0-arm64-3.11 * smt package not found in conda-forge; moved to pip mamba 1.5.1 conda 23.7.4 --- environment.yml | 2 +- setup.py | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/environment.yml b/environment.yml index c617eab96..f14dcac70 100644 --- a/environment.yml +++ b/environment.yml @@ -48,7 +48,6 @@ dependencies: - setuptools - simpy - slycot - - smt - sortedcontainers - sphinx - sphinxcontrib-applehelp @@ -66,6 +65,7 @@ dependencies: - dearpygui - marmot-agents - osqp + - smt # Needs to be done outside of environment file: # - m2w64-toolchain # [win] # - libpython # [win] diff --git a/setup.py b/setup.py index ee5a50e54..14c973e76 100644 --- a/setup.py +++ b/setup.py @@ -75,6 +75,10 @@ def build_extension(self, ext): elif (mycompiler.find('ifort') >= 0 or mycompiler.find('icc') >= 0 or mycompiler.find('icpc') >= 0): tune = '-xHost' + + elif platform.system() == 'Darwin': + # clang doesn't support -march=native + tune = '-mtune=native' else: tune = '-march=native -mtune=native'