Skip to content

Commit

Permalink
Merge pull request #3 from MikeMoore63/feat/upgradeciaddosxarm64
Browse files Browse the repository at this point in the history
feat: add linux aarch64 support
  • Loading branch information
MikeMoore63 authored Jul 17, 2024
2 parents 7b2c398 + 7c7131e commit c614a82
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 8 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build_wheels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 BUILD.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Currently using quay.io/pypa/manylinux_2_24_x86_64:latest as latest image this g

Build is currently
```shell
setuptools-golang-build-manylinux-wheels --golang=1.21.1 --pythons 'cp36-cp36m cp37-cp37m cp38-cp38 cp39-cp39 cp310-cp310 cp311-cp311'
setuptools-golang-build-manylinux-wheels --golang=1.21.12 --pythons 'cp36-cp36m cp37-cp37m cp38-cp38 cp39-cp39 cp310-cp310 cp311-cp311'
cd src/pygobuildinfo
env GOOS="windows" GOARCH="amd64" CGO_ENABLED="1" CC="x86_64-w64-mingw32-gcc" go build -buildmode=c-shared -o pygo.dll
```
Expand Down
4 changes: 2 additions & 2 deletions installGo.ps1
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Install the current Go release
param(
[string]$w='c:\go',
[string]$v='1.21.1'
[string]$v='1.21.12'
)
Set-ExecutionPolicy -ExecutionPolicy Bypass -Scope CurrentUser
$OutputVariable = (go version) | Out-String
Expand All @@ -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/go@1.21/bin:/opt/homebrew/opt/go@1.21/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 = pyrustaudit
version = 0.0.4
version = 0.0.5
author = Mike Moore
author_email = z_z_zebra@yahoo.com
license = MIT
Expand Down

0 comments on commit c614a82

Please sign in to comment.