Created
July 31, 2016 15:47
-
-
Save darvid/3c51f6e67cee0eb8101141e143a683c6 to your computer and use it in GitHub Desktop.
This file contains 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
REQUIREMENTS_DIR=requirements | |
REQUIREMENTS_ARTIFACTS=$(REQUIREMENTS_DIR)/%.txt | |
REQUIREMENTS_TARGETS=main qa test | |
PYENV_TEST_VERSIONS=2.7.11 3.5.1 | |
.PHONY: clean clean_docs clean_requirements docs requirements test | |
clean_docs: | |
cd docs && make clean && rm -rf source/api | |
clean_requirements: | |
rm -rf requirements/*.txt | |
clean: clean_docs clean_requirements | |
find . -name "*.pyc" -delete | |
find . -path "*/__pycache__/*" -delete | |
find . -type d -name "__pycache__" -empty -delete | |
rm -rf .tox | |
python setup.py clean | |
docs: | |
python setup.py docs | |
$(REQUIREMENTS_ARTIFACTS): $(REQUIREMENTS_DIR)/src/%.in | |
pip-compile $< -o $@ | |
requirements: clean_requirements $(patsubst %,$(REQUIREMENTS_ARTIFACTS),$(REQUIREMENTS_TARGETS)) | |
test: requirements | |
pyenv local $(PYENV_TEST_VERSIONS) | |
tox -- -s |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment