Files
rk35xx-android14/external/python/ipaddress/Makefile
T
hmz007 36ed224bac Rockchip Anroid14_SDK 20240628-rkr5 (2556df1a)
Signed-off-by: hmz007 <hmz007@gmail.com>
Change-Id: Ib87fdbe7a0be7dc961af3500fe9ea4589a127f9f
2024-10-29 18:12:02 +08:00

46 lines
1.1 KiB
Makefile

default: test lint
test:
python test_ipaddress.py
lint:
flake8 *.py
lint-if-2.7:
@if python --version 2>&1 | grep -q ' 2\.7\.'; then $(MAKE) lint ; fi
pypi:
python setup.py sdist bdist_wheel upload
release:
if test -z "${VERSION}"; then echo VERSION missing; exit 1; fi
sed -i "s#^\(__version__\s*=\s*'\)[^']*'\$$#\1${VERSION}'#" ipaddress.py
sed -i "s#^\(\s*'version':\s*'\)[^']*\('.*\)\$$#\1${VERSION}\2#" setup.py
git diff
git add ipaddress.py setup.py
git commit -m "release ${VERSION}"
git tag "v${VERSION}"
git push
git push --tags
$(MAKE) pypi
docker-test-all: docker-test-2.6 docker-test-2.7 docker-test-3.2 docker-test-3.3
docker-test-2.6:
docker build -t ipaddress-python2.6 . -f test-python2.6.Dockerfile
docker-test-2.7:
docker build -t ipaddress-python2.7 . -f test-python2.7.Dockerfile
docker-test-3.2:
docker build -t ipaddress-python3.2 . -f test-python3.2.Dockerfile
docker-test-3.3:
docker build -t ipaddress-python3.3 . -f test-python3.3.Dockerfile
clean:
rm -rf -- build dist ipaddress.egg-info
.PHONY: default test clean pypi lint docker-test-all docker-test-2.6 docker-test-2.7 docker-test-3.2 docker-test-3.3 lint-if-2.7