Skip to content

Instantly share code, notes, and snippets.

@bbengfort
Created January 10, 2016 19:20
Show Gist options
  • Star 8 You must be signed in to star a gist
  • Fork 5 You must be signed in to fork a gist
  • Save bbengfort/17de016d6a51ce487a0f to your computer and use it in GitHub Desktop.
Save bbengfort/17de016d6a51ce487a0f 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