From 3c457e59f31776e3c3a773dcb0478c59d1d1167a Mon Sep 17 00:00:00 2001 From: LorenzzoQM Date: Thu, 18 Jan 2024 00:16:58 +0100 Subject: [PATCH] Issue #51: Add --no-deps for chebpy in Mac ARM --- src/bsk_rl/finish_install.py | 31 ++++++++++++++++++++++--------- 1 file changed, 22 insertions(+), 9 deletions(-) diff --git a/src/bsk_rl/finish_install.py b/src/bsk_rl/finish_install.py index be45eaec..f0bd9b32 100644 --- a/src/bsk_rl/finish_install.py +++ b/src/bsk_rl/finish_install.py @@ -1,4 +1,5 @@ import io +import os import subprocess import sys import zipfile @@ -10,15 +11,27 @@ def pck_install(): - subprocess.check_call( - [ - sys.executable, - "-m", - "pip", - "install", - "git+https://github.com/chebpy/chebpy.git", - ] - ) + if os.uname().sysname == "Darwin" and os.uname().machine == "arm64": + subprocess.check_call( + [ + sys.executable, + "-m", + "pip", + "install", + "--no-deps", + "git+https://github.com/chebpy/chebpy.git", + ] + ) + else: + subprocess.check_call( + [ + sys.executable, + "-m", + "pip", + "install", + "git+https://github.com/chebpy/chebpy.git", + ] + ) r = requests.get( "https://simplemaps.com/static/data/world-cities/basic/simplemaps_worldcities_basicv1.76.zip"