Skip to content

Instantly share code, notes, and snippets.

@Jerakin
Created September 23, 2019 15:04
Show Gist options
  • Save Jerakin/706e30508ce3b31e5d22877a196d17bf to your computer and use it in GitHub Desktop.
Save Jerakin/706e30508ce3b31e5d22877a196d17bf to your computer and use it in GitHub Desktop.
Example python Makefile
clean:
rm -rf *.egg-info
rm -rf dist
build:
python setup.py bdist_wheel
install:
pip install ./dist/getbob-$(shell cat "./getbob/__init__.py" | grep -Eo -m 1 "[0-9\.ab]{5,}")-py3-none-any.whl
publish:
python setup.py bdist_wheel
twine upload ./dist/getbob-$(shell cat "./getbob/__init__.py" | grep -Eo -m 1 "[0-9\.ab]{5,}")-py3-none-any.whl
git tag v$(shell cat "./getbob/__init__.py" | grep -Eo -m 1 "[0-9\.ab]{5,}")
git push origin v$(shell cat "./getbob/__init__.py" | grep -Eo -m 1 "[0-9\.ab]{5,}")
.PHONY: clean build install publish
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment