Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 22 additions & 17 deletions {{cookiecutter.project_name}}/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -277,11 +277,26 @@ mkdocs-live: mkdocs ## Launch and continuously rebuild the mkdocs site
eval "sleep 3; open http://127.0.0.1:8000" &
$(MKDOCS) serve

%.rst: %.md
pandoc -f markdown_github -t rst -o $@ $<

# BUILD ########################################################################

PYINSTALLER := $(BIN_)pyinstaller
PYINSTALLER_MAKESPEC := $(BIN_)pyi-makespec

.PHONY: sdist
sdist: install dist/*.tar.gz
dist/*.tar.gz: $(MODULES) README.rst CHANGELOG.rst
$(PYTHON) setup.py check --restructuredtext --strict --metadata
$(PYTHON) setup.py sdist

.PHONY: bdist
bdist: install dist/*.whl
dist/*.whl: $(MODULES) README.rst CHANGELOG.rst
$(PYTHON) setup.py check --restructuredtext --strict --metadata
$(PYTHON) setup.py bdist_wheel

.PHONY: exe
exe: install $(PROJECT).spec
# For framework/shared support: https://github.com/yyuu/pyenv/wiki
Expand All @@ -292,25 +307,18 @@ $(PROJECT).spec:

# RELEASE ######################################################################

.PHONY: register-test
register-test: README.rst CHANGELOG.rst ## Register the project on the test PyPI
$(PYTHON) setup.py register --strict --repository https://testpypi.python.org/pypi
TWINE := $(BIN_)twine

.PHONY: register
register: README.rst CHANGELOG.rst ## Register the project on PyPI
$(PYTHON) setup.py register --strict

.PHONY: upload-test
upload-test: register-test ## Upload the current version to the test PyPI
$(PYTHON) setup.py sdist upload --repository https://testpypi.python.org/pypi
$(PYTHON) setup.py bdist_wheel upload --repository https://testpypi.python.org/pypi
$(OPEN) https://testpypi.python.org/pypi/$(PROJECT)
register: sdist bdist ## Register the project on PyPI
@ echo NOTE: your project must be registered manually
@ echo https://github.com/pypa/python-packaging-user-guide/issues/263
# TODO: switch to twine when the above issue is resolved
# $(TWINE) register dist/*.whl

.PHONY: upload
upload: .git-no-changes register ## Upload the current version to PyPI
$(PYTHON) setup.py check --restructuredtext --strict --metadata
$(PYTHON) setup.py sdist upload
$(PYTHON) setup.py bdist_wheel upload
$(TWINE) upload dist/*
$(OPEN) https://pypi.python.org/pypi/$(PROJECT)

.PHONY: .git-no-changes
Expand All @@ -324,9 +332,6 @@ upload: .git-no-changes register ## Upload the current version to PyPI
exit -1; \
fi;

%.rst: %.md
pandoc -f markdown_github -t rst -o $@ $<

# CLEANUP ######################################################################

.PHONY: clean
Expand Down
7 changes: 5 additions & 2 deletions {{cookiecutter.project_name}}/requirements/dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ sniffer
# Runner
honcho

# Release
pyinstaller
# Build
wheel
pyinstaller

# Release
twine