Skip to content

Instantly share code, notes, and snippets.

@yeongseon
Forked from bbengfort/Makefile
Created September 4, 2017 06:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save yeongseon/0cb142de624744756f3166f0adcd37fb to your computer and use it in GitHub Desktop.
Save yeongseon/0cb142de624744756f3166f0adcd37fb to your computer and use it in GitHub Desktop.
Basic Python Project files - my Makefile and the dependencies that I have in everything.
# Shell to use with Make
SHELL := /bin/bash
# Set important Paths
PROJECT := # Set to your project name
LOCALPATH := $(CURDIR)/$(PROJECT)
PYTHONPATH := $(LOCALPATH)/
PYTHON_BIN := $(VIRTUAL_ENV)/bin
# Export targets not associated with files
.PHONY: test coverage pip virtualenv clean publish
# Clean build files
clean:
find . -name "*.pyc" -print0 | xargs -0 rm -rf
-rm -rf htmlcov
-rm -rf .coverage
-rm -rf build
-rm -rf dist
-rm -rf $(PROJECT).egg-info
# Targets for testing
test:
$(PYTHON_BIN)/nosetests -v --with-coverage --cover-package=$(PROJECT) --cover-inclusive --cover-erase tests
# Publish to gh-pages
# Make sure to change the prefix to the subdirectory of your docs build
publish:
git subtree push --prefix=docs origin gh-pages
# Utilities
confire==0.2.0
PyYAML==3.11
python-dateutil==2.4.2
six==1.10.0
# Testing
coverage==4.0.3
nose==1.3.7
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment