Fix tarball arch name

This commit is contained in:
Kovid Goyal 2024-08-16 09:30:26 +05:30
parent f1f57e179a
commit 954316b543
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -20,9 +20,6 @@ from bypy.utils import create_job, get_dll_path, mkdtemp, parallel_build, py_com
j = os.path.join j = os.path.join
self_dir = os.path.dirname(os.path.abspath(__file__)) self_dir = os.path.dirname(os.path.abspath(__file__))
machine = (os.uname()[4] or '').lower() machine = (os.uname()[4] or '').lower()
arch = 'x86_64'
if machine.startswith('arm') or machine.startswith('aarch64'):
arch = 'arm64'
py_ver = '.'.join(map(str, python_major_minor_version())) py_ver = '.'.join(map(str, python_major_minor_version()))
QT_PREFIX = os.path.join(PREFIX, 'qt') QT_PREFIX = os.path.join(PREFIX, 'qt')
iv = globals()['init_env'] iv = globals()['init_env']
@ -273,6 +270,7 @@ def strip_binaries(env):
def create_tarfile(env, compression_level='9'): def create_tarfile(env, compression_level='9'):
print('Creating archive...') print('Creating archive...')
base = OUTPUT_DIR base = OUTPUT_DIR
arch = 'arm64' if 'arm64' in os.environ['BYPY_ARCH'] else ('i686' if 'i386' in os.environ['BYPY_ARCH'] else 'x86_64')
try: try:
shutil.rmtree(base) shutil.rmtree(base)
except EnvironmentError as err: except EnvironmentError as err: