mirror of https://github.com/kivy/kivy.git
OSX: Use platform.machine() for osx version detection (#7341)
* try to directly use platform.machine() for osx version detection * Update setup.py Co-authored-by: matham <moiein2000@gmail.com> Co-authored-by: matham <moiein2000@gmail.com>
This commit is contained in:
parent
41ddf31690
commit
72f2144882
11
setup.py
11
setup.py
|
@ -103,12 +103,9 @@ build_examples = build_examples or \
|
|||
|
||||
platform = sys.platform
|
||||
|
||||
# Detect 32/64bit for OSX (http://stackoverflow.com/a/1405971/798575)
|
||||
if sys.platform == 'darwin':
|
||||
if sys.maxsize > 2 ** 32:
|
||||
osx_arch = 'x86_64'
|
||||
else:
|
||||
osx_arch = 'i386'
|
||||
from platform import machine
|
||||
osx_arch = machine()
|
||||
|
||||
|
||||
# Detect Python for android project (http://github.com/kivy/python-for-android)
|
||||
|
@ -427,8 +424,8 @@ elif platform == 'darwin':
|
|||
if osx_arch == "i386":
|
||||
print("Warning: building with frameworks fail on i386")
|
||||
else:
|
||||
print("OSX framework used, force to x86_64 only")
|
||||
environ["ARCHFLAGS"] = environ.get("ARCHFLAGS", "-arch x86_64")
|
||||
print(f"OSX framework used, force to {osx_arch} only")
|
||||
environ["ARCHFLAGS"] = environ.get("ARCHFLAGS", f"-arch {osx_arch}")
|
||||
print("OSX ARCHFLAGS are: {}".format(environ["ARCHFLAGS"]))
|
||||
|
||||
# detect gstreamer, only on desktop
|
||||
|
|
Loading…
Reference in New Issue