From 28d12893d384deceb17b4b041b7c7068fa6a1c00 Mon Sep 17 00:00:00 2001 From: Isuru Fernando Date: Tue, 4 Aug 2020 14:29:50 -0500 Subject: [PATCH] Add Apple silicon support --- conda_build/cli/main_convert.py | 3 ++- conda_build/convert.py | 3 ++- conda_build/meta | 0 conda_build/metadata.py | 2 +- conda_build/utils.py | 1 + 5 files changed, 6 insertions(+), 3 deletions(-) create mode 100644 conda_build/meta diff --git a/conda_build/cli/main_convert.py b/conda_build/cli/main_convert.py index 1b093da5b4..cce60d791f 100644 --- a/conda_build/cli/main_convert.py +++ b/conda_build/cli/main_convert.py @@ -60,7 +60,8 @@ def parse_args(args): '-p', "--platform", dest='platforms', action="append", - choices=['osx-64', 'linux-32', 'linux-64', 'linux-ppc64', 'linux-ppc64le', + choices=['osx-64', 'osx-arm64', + 'linux-32', 'linux-64', 'linux-ppc64', 'linux-ppc64le', 'linux-s390x', 'linux-armv6l', 'linux-armv7l', 'linux-aarch64', 'win-32', 'win-64', 'all'], help="Platform to convert the packages to.", diff --git a/conda_build/convert.py b/conda_build/convert.py index b3cfcd0e65..0a2fd5846e 100644 --- a/conda_build/convert.py +++ b/conda_build/convert.py @@ -764,7 +764,8 @@ def conda_convert(file_path, output_dir=".", show_imports=False, platforms=None, source_platform_architecture = '{}-{}' .format(source_platform, architecture) if 'all' in platforms: - platforms = ['osx-64', 'linux-32', 'linux-64', 'linux-ppc64', 'linux-ppc64le', + platforms = ['osx-64', 'osx-arm64', + 'linux-32', 'linux-64', 'linux-ppc64', 'linux-ppc64le', 'linux-s390x', 'linux-armv6l', 'linux-armv7l', 'linux-aarch64', 'win-32', 'win-64'] diff --git a/conda_build/meta b/conda_build/meta new file mode 100644 index 0000000000..e69de29bb2 diff --git a/conda_build/metadata.py b/conda_build/metadata.py index 07d2c64ea0..3d777017f0 100644 --- a/conda_build/metadata.py +++ b/conda_build/metadata.py @@ -125,7 +125,7 @@ def ns_cfg(config): d['luajit'] = bool(lua[0] == "2") for machine in non_x86_linux_machines: - d[machine] = bool(plat == 'linux-%s' % machine) + d[machine] = bool(plat.endswith('-%s' % machine)) for feature, value in feature_list: d[feature] = value diff --git a/conda_build/utils.py b/conda_build/utils.py index f04984e678..b1dca37c22 100644 --- a/conda_build/utils.py +++ b/conda_build/utils.py @@ -106,6 +106,7 @@ def glob(pathname, recursive=True): "win-64", "win-32", "osx-64", + "osx-arm64", "zos-z", "noarch", }