forked from duckietown/lib-dt-apriltags
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
43 lines (39 loc) · 878 Bytes
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
ROOT=$(dir $(realpath $(firstword $(MAKEFILE_LIST))))
PYTHON_VERSION=""
ARCH="amd64"
INTERACTIVE="-it"
build:
# create build environment
docker build \
-t ${ARCH}/dt_apriltags:wheel-python${$PYTHON_VERSION} \
--build-arg ARCH="${ARCH}" \
--build-arg PYTHON_VERSION="${PYTHON_VERSION}" \
${ROOT}
# create wheel destination directory
mkdir -p ${ROOT}/dist
# build wheel
docker run \
${INTERACTIVE} \
--rm \
-v ${ROOT}:/source \
-v ${ROOT}/dist:/out \
${ARCH}/dt_apriltags:wheel-python${$PYTHON_VERSION}
upload:
twine upload ${ROOT}/dist/*
clean:
rm -rf ${ROOT}/dist/*
release-all:
# Python2
make build
# Python3
make build PYTHON_VERSION=3
# Python2
make build ARCH=arm32v7
# Python3
make build ARCH=arm32v7 PYTHON_VERSION=3
# Python2
make build ARCH=arm64v8
# Python3
make build ARCH=arm64v8 PYTHON_VERSION=3
# push wheels
make upload