BotZ/Makefile

64 lines
1.6 KiB
Makefile

.PHONY: clean clean-test clean-pyc clean-build
VERSION = 1.1.1
clean: clean-build clean-pyc clean-test ## remove all build, test, coverage and Python artifacts
clean-build: ## remove build artifacts
rm -fr build/
rm -fr dist/
rm -fr .eggs/
find . -name '*.egg-info' -exec rm -fr {} +
find . -name '*.egg' -exec rm -f {} +
rm -fr bot_z.web/build/
clean-pyc: ## remove Python file artifacts
find . -name '*.pyc' -exec rm -f {} +
find . -name '*.pyo' -exec rm -f {} +
find . -name '*~' -exec rm -f {} +
find . -name '__pycache__' -exec rm -fr {} +
clean-test: ## remove test and coverage artifacts
rm -fr .tox/
rm -f .coverage
rm -fr htmlcov/
release: clean build docker-release
sdist:
python setup.py sdist
build: sdist build-linux64 build-linux32 build-win32 build-win64 build-macos
build-linux64:
python setup.py bdist_wheel --plat-name manylinux1-x86_64
sdist/bot_z-$(VERSION)-py3-none-manylinux1_x86_64.whl: build-linux64
build-linux32:
python setup.py bdist_wheel --plat-name manylinux1-i686
sdist/bot_z-$(VERSION)-py3-none-manylinux1_i686.whl: build-linux32
build-win32:
python setup.py bdist_wheel --plat-name win32
sdist/bot_z-$(VERSION)-py3-none-win32.whl: build-win32
build-win64:
python setup.py bdist_wheel --plat-name win-amd64
sdist/bot_z-$(VERSION)-py3-none-manylinux1_win-amd64.whl: build-win64
build-macos:
python setup.py bdist_wheel --plat-name macosx
sdist/bot_z-$(VERSION)-py3-none-macosx.whl: build-macos
install: clean ## install the package to the active Python's site-packages
python setup.py install
docker-release:
docker build -t botz:latest .
docker tag botz:latest botz:$(VERSION)