Makefile
PACKAGE_NAME = pyaxonaut
WORKON_HOME ?= $(HOME)/.virtualenvs
VIRTUAL_ENV ?= $(WORKON_HOME)/$(PACKAGE_NAME)
PATH := $(VIRTUAL_ENV)/bin:$(PATH)
MAKE := $(MAKE) --no-print-directory
SHELL = bash
default:
@echo "Makefile for $(PACKAGE_NAME)"
@echo
@echo 'Usage:'
@echo
@echo ' make install install the package in a virtual environment'
@echo ' make publish publish changes to GitHub/PyPI'
@echo ' make clean cleanup all temporary files'
@echo
install:
@test -d "$(VIRTUAL_ENV)" || mkdir -p "$(VIRTUAL_ENV)"
@test -x "$(VIRTUAL_ENV)/bin/python" || virtualenv --quiet "$(VIRTUAL_ENV)"
@test -x "$(VIRTUAL_ENV)/bin/pip" || easy_install pip
@pip uninstall --yes $(PACKAGE_NAME) &>/dev/null || true
@pip install --quiet --no-deps --ignore-installed .
publish: install
git push origin && git push --tags origin
pip install --quiet twine wheel
python setup.py sdist bdist_wheel
twine upload dist/*
.PHONY: default install publish