Last active
November 30, 2017 09:57
-
-
Save minhoryang/a7b498c742ec81c7a6661bca5f4232c1 to your computer and use it in GitHub Desktop.
PEX Trial
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
PACKAGE=$(shell basename `pwd`) # "" | |
VERSION=$(shell git describe --tags) # ignorable | |
OUTPUT_NAME=$(PACKAGE)-$(VERSION) | |
.PHONY: build_pex | |
build_pex: clean $(OUTPUT_NAME).pex | |
.PHONY: prepare_pex | |
prepare_pex: | |
pip install --upgrade pip wheel pex | |
$(OUTPUT_NAME).pex: prepare_pex dist/$(OUTPUT_NAME).tar.gz requirements.txt | |
pex -o $(OUTPUT_NAME).pex --no-pypi -f dist/ -c minhoryang -r requirements.txt $(PACKAGE) | |
dist/$(OUTPUT_NAME).tar.gz: setup.py requirements.txt | |
python setup.py sdist | |
pip download -r requirements.txt -d dist/ | |
.PHONY: clean | |
clean: | |
rm $(OUTPUT_NAME).pex | |
rm -rf dist/ | |
rm -rf *.egg-info build/ */__pycache__/ ~/.pex/build/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment