Skip to content

Commit

Permalink
Merge pull request #9 from MikeMoore63/feat/updatecibuildwheeladdosxa…
Browse files Browse the repository at this point in the history
…rm64

feat: add linux arm64 support
  • Loading branch information
MikeMoore63 authored Jul 17, 2024
2 parents 2ce0355 + 11dd466 commit f6cc8df
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 7 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/build_wheels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-13, macos-14]
os: [ubuntu-22.04, windows-latest, macos-13, macos-14]

steps:
- uses: actions/checkout@v4
Expand All @@ -32,7 +32,7 @@ jobs:
env:
# configure cibuildwheel to build native archs ('auto'), and some
# emulated ones
CIBW_ARCHS_LINUX: auto64
CIBW_ARCHS_LINUX: auto64 aarch64

- uses: actions/upload-artifact@v3
with:
Expand Down
2 changes: 1 addition & 1 deletion installGo.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ $env:GOPATH= 'C:\go'
$newPath = ('{0}\bin;C:\Program Files\Go\bin;{1}' -f $env:GOPATH, $env:PATH);
Write-Host ('Updating PATH: {0}' -f $newPath);
[Environment]::SetEnvironmentVariable('PATH', $newPath, [EnvironmentVariableTarget]::User);
$url = 'https://dl.google.com/go/go1.21.1.windows-amd64.zip';
$url = 'https://dl.google.com/go/go1.21.12.windows-amd64.zip';
Write-Host ('Downloading {0} ...' -f $url);
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12;
Invoke-WebRequest -Uri $url -OutFile 'go.zip';
Expand Down
24 changes: 21 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ GOPATH="C:\\Go"
"""

[tool.cibuildwheel.linux]
archs=["x86_64"]
archs=["auto64","aarch64"]
before-all = '''
switch_eol_centos_repos()
{
Expand All @@ -27,11 +27,19 @@ switch_eol_centos_repos()
fi
}
switch_eol_centos_repos
if [ "${AUDITWHEEL_POLICY}" == "manylinux2014" ]
if [ "${AUDITWHEEL_POLICY}" == "manylinux2014" ] && [ "${AUDITWHEEL_ARCH}" == "x86_64" ]
then
yum install -y golang
fi
if [ "${AUDITWHEEL_POLICY}" == "manylinux2014" ] && [ "${AUDITWHEEL_ARCH}" == "aarch64" ]
then
mkdir -p /usr/local
curl https://dl.google.com/go/go1.21.12.linux-arm64.tar.gz | tar -C /usr/local -xzf -
fi
'''
environment = """
PATH=$PATH:/usr/local/go/bin
"""

[tool.cibuildwheel.macos]
before-all = '''
Expand All @@ -41,7 +49,17 @@ environment = "PATH=/usr/local/opt/[email protected]/bin:/opt/homebrew/opt/[email protected]/bin:$PA

[[tool.cibuildwheel.overrides]]
select = "*-musllinux*"
before-all = "wget https://golang.org/dl/go1.21.1.linux-amd64.tar.gz;tar -C /usr/local -xzf go1.21.1.linux-amd64.tar.gz"
before-all = '''
if [ "${AUDITWHEEL_ARCH}" == "x86_64" ]
then
wget https://golang.org/dl/go1.21.12.linux-amd64.tar.gz;tar -C /usr/local -xzf go1.21.12.linux-amd64.tar.gz
fi
if [ "${AUDITWHEEL_ARCH}" == "aarch64" ]
then
wget https://golang.org/dl/go1.21.12.linux-arm64.tar.gz;tar -C /usr/local -xzf go1.21.12.linux-arm64.tar.gz
fi
'''

environment = """
PATH=$PATH:/usr/local/go/bin
"""
Expand Down
2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[metadata]
name = pyrpmdb
version = 0.1.22
version = 0.1.23
author = Mike Moore
author_email = [email protected]
license = MIT
Expand Down

0 comments on commit f6cc8df

Please sign in to comment.