Commit 49f18a7b authored by Maciej Delmanowski's avatar Maciej Delmanowski

Add 'sdist' and 'wheel' targets in the Makefile

The 'sdist' and 'wheel' Makefile targets can be used to build DebOps
Python packages, to be published on PyPI. There is also an alternative
set of '-sign' targets, used to create detached package GPG signatures.
parent 73ce2a5a
......@@ -14,7 +14,7 @@ check: fail-if-git-dirty
.PHONY: clean
clean: ## Clean up project directory
clean: clean-tests
clean: clean-tests clean-sdist clean-wheel
.PHONY: docker
docker: ## Check Docker image build
......@@ -40,6 +40,38 @@ test: test-all
yaml: ## Test YAML syntax using yamllint
yaml: test-yaml
.PHONY: sdist
sdist: ## Create Python sdist package
sdist: clean-sdist
@python setup.py sdist
.PHONY: sdist-sign
sdist-sign: ## Create signed Python sdist package
sdist-sign: sdist
@gpg --detach-sign --armor dist/debops-*.tar.gz
.PHONY: clean-sdist
clean-sdist:
@rm -vrf debops.egg-info dist/debops-*.tar.gz*
.PHONY: wheel
wheel: ## Create Python wheel package
wheel: clean-wheel
@python setup.py bdist_wheel
.PHONY: wheel-sign
wheel-sign: ## Create signed Python wheel package
wheel-sign: wheel
@gpg --detach-sign --armor dist/debops-*.whl
.PHONY: clean-wheel
clean-wheel:
@rm -vrf build debops.egg-info dist/debops-*.whl*
.PHONY: twine-upload
twine-upload: ## Upload Python packages to PyPI
@twine upload dist/*
.PHONY: test-all
test-all: clean-tests test-pep8 test-debops-tools test-docs test-playbook-syntax test-yaml test-docker-build
......
......@@ -4,6 +4,12 @@ formats=gztar
[bdist]
formats=egg
[bdist_wheel]
universal = 1
[metadata]
license_file = LICENSE
[aliases]
home = develop --install-dir ~/lib/python/ --script-dir ~/bin
devel = develop --multi-version --install-dir bin
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment