Skip to content

Commit c0542b3

Browse files
committed
Update Makefiles to support building manylinux2014_aarch64 wheels
Signed-off-by: Jono Yang <jyang@nexb.com>
1 parent 6fa52c0 commit c0542b3

3 files changed

Lines changed: 43 additions & 2 deletions

File tree

builtins/fetchcode_container/Makefile

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,15 @@
66
# See https://aboutcode.org for more information about nexB OSS projects.
77
#
88

9+
ARCH := $(shell uname -m)
10+
ifeq ($(ARCH),aarch64)
11+
PLAT_NAME := "manylinux2014_aarch64"
12+
GOARCH := "arm64"
13+
else
14+
PLAT_NAME := "manylinux1_x86_64"
15+
GOARCH := "amd64"
16+
endif
17+
918
clean:
1019
rm -rf build/ dist/
1120
find . -type f -name '*.py[co]' -delete -o -type d -name __pycache__ -delete
@@ -14,7 +23,7 @@ build:
1423
rm -f src/fetchcode_container/bin/skopeo*
1524
python setup.py clean --all sdist
1625
rm -f src/fetchcode_container/bin/skopeo*
17-
GOOS=linux GOARCH=amd64 python setup.py clean --all bdist_wheel --python-tag py3 --plat-name manylinux1_x86_64
26+
GOOS=linux GOARCH=$(GOARCH) python setup.py clean --all bdist_wheel --python-tag py3 --plat-name $(PLAT_NAME)
1827
# rm -f src/fetchcode_container/bin/skopeo*
1928
# GOOS=darwin GOARCH=amd64 python setup.py clean --all bdist_wheel --python-tag py3 --plat-name macosx_10_14_x86_64
2029
# rm -f src/fetchcode_container/bin/skopeo*

builtins/packagedcode_msitools-linux/Makefile

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,13 @@
66
# See https://aboutcode.org for more information about nexB OSS projects.
77
#
88

9+
ARCH := $(shell uname -m)
10+
ifeq ($(ARCH),aarch64)
11+
PLAT_NAME := "manylinux2014_aarch64"
12+
else
13+
PLAT_NAME := "manylinux1_x86_64"
14+
endif
15+
916
clean:
1017
rm -rf build/ dist/
1118
find . -type f -name '*.py[co]' -delete -o -type d -name __pycache__ -delete
@@ -14,6 +21,6 @@ build:
1421
rm -f src/packagedcode_msitools/bin/msi*
1522
python setup.py clean --all sdist
1623
rm -f src/packagedcode_msitools/bin/msi*
17-
python setup.py clean --all bdist_wheel --python-tag py3 --plat-name manylinux1_x86_64
24+
python setup.py clean --all bdist_wheel --python-tag py3 --plat-name $(PLAT_NAME)
1825

1926
.PHONY: clean build
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
#
2+
# Copyright (c) nexB Inc. and others. All rights reserved.
3+
# SPDX-License-Identifier: Apache-2.0
4+
# See http://www.apache.org/licenses/LICENSE-2.0 for the license text.
5+
# See https://github.com/aboutcode-org/ for support or download.
6+
# See https://aboutcode.org for more information about nexB OSS projects.
7+
#
8+
9+
ARCH := $(shell uname -m)
10+
ifeq ($(ARCH),aarch64)
11+
PLAT_NAME := "manylinux2014_aarch64"
12+
else
13+
PLAT_NAME := "manylinux1_x86_64"
14+
endif
15+
16+
clean:
17+
rm -rf build/ dist/
18+
find . -type f -name '*.py[co]' -delete -o -type d -name __pycache__ -delete
19+
20+
build:
21+
rm -f src/rpm_inspector_rpm/bin/rpm
22+
python setup.py clean --all sdist
23+
python setup.py clean --all bdist_wheel --python-tag py3 --plat-name $(PLAT_NAME)
24+
25+
.PHONY: clean build

0 commit comments

Comments
 (0)