Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Linux AArch64 wheel build support #546

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions mssqlcli/mssqltoolsservice/externals.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
from future.standard_library import install_aliases
import requests
import utility
import platform

install_aliases()

Expand All @@ -18,6 +19,8 @@
SUPPORTED_PLATFORMS = {
'manylinux1_x86_64': SQLTOOLSSERVICE_BASE + 'manylinux1/' +
'Microsoft.SqlTools.ServiceLayer-rhel-x64-netcoreapp3.1.tar.gz',
manylinux2014_aarch64': SQLTOOLSSERVICE_BASE + 'manylinux2014/' +
'v3.0.0-release.72.tar.gz',
'macosx_10_11_intel': SQLTOOLSSERVICE_BASE + 'macosx_10_11_intel/' +
'Microsoft.SqlTools.ServiceLayer-osx-x64-netcoreapp3.1.tar.gz',
'win_amd64': SQLTOOLSSERVICE_BASE + 'win_amd64/' +
Expand All @@ -37,7 +40,10 @@ def download_sqltoolsservice_binaries():
os.makedirs(os.path.dirname(packageFilePath))

packageFileName = os.path.basename(packageFilePath)
githubUrl = 'https://github.com/microsoft/sqltoolsservice/releases/download/{}/{}'.format(SQLTOOLSSERVICE_RELEASE, packageFileName)
if platform.machine() == 'aarch64':
githubUrl = 'https://github.com/microsoft/sqltoolsservice/archive/refs/tags/v3.0.0-release.72.tar.gz'
else:
githubUrl = 'https://github.com/microsoft/sqltoolsservice/releases/download/{}/{}'.format(SQLTOOLSSERVICE_RELEASE, packageFileName)
print('Downloading {}'.format(githubUrl))
r = requests.get(githubUrl)
with open(packageFilePath, 'wb') as f:
Expand All @@ -53,7 +59,7 @@ def copy_sqltoolsservice(platform):
if not platform or platform not in SUPPORTED_PLATFORMS:
print('{} is not supported.'.format(platform))
print('Please provide a valid platform flag.' +
'[win32, win_amd64, manylinux1_x86_64, macosx_10_11_intel]')
'[win32, win_amd64, manylinux1_x86_64, macosx_10_11_intel, manylinux2014_aarch64]')
sys.exit(1)

copy_file_path = SUPPORTED_PLATFORMS[platform]
Expand Down
1 change: 1 addition & 0 deletions release.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@ def download_official_wheels():
blob_names = [
'mssql_cli-{}-py2.py3-none-macosx_10_11_intel.whl'.format(latest_version),
'mssql_cli-{}-py2.py3-none-manylinux1_x86_64.whl'.format(latest_version),
'mssql_cli-{}-py2.py3-none-manylinux2014_aarch64.whl'.format(latest_version),
'mssql_cli-{}-py2.py3-none-win_amd64.whl'.format(latest_version),
'mssql_cli-{}-py2.py3-none-win32.whl'.format(latest_version)
]
Expand Down
5 changes: 4 additions & 1 deletion utility.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,10 @@ def get_current_platform():
elif system == 'Darwin':
run_time_id = 'macosx_10_11_intel'
elif system == 'Linux':
run_time_id = 'manylinux1_x86_64'
if platform.machine() == 'x86_64':
run_time_id = 'manylinux1_x86_64'
elif platform.machine() == 'aarch64':
run_time_id = 'manylinux2014_aarch64'

return run_time_id

Expand Down