diff options
author | Giampaolo Rodola <g.rodola@gmail.com> | 2014-05-27 02:21:36 +0200 |
---|---|---|
committer | Giampaolo Rodola <g.rodola@gmail.com> | 2014-05-27 02:21:36 +0200 |
commit | 6897b5811cb29fd17349ba3a5a5d41f16658ba79 (patch) | |
tree | 4fe3d667acc46ccf00f78d9ce5e86526e5be2cc4 /Makefile | |
parent | ffc5b407c04e7aa8b341d9ea484463420ea14a9c (diff) | |
download | pysendfile-6897b5811cb29fd17349ba3a5a5d41f16658ba79.tar.gz |
github migration including travis support, Makefile, README and HISTORY turned into RsT files, python 3.4 fix, pep8ify
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 58 |
1 files changed, 58 insertions, 0 deletions
diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..8981d6a --- /dev/null +++ b/Makefile @@ -0,0 +1,58 @@ +# Shortcuts for various tasks (UNIX only). +# To use a specific Python version run: +# $ make install PYTHON=python3.3 + +# You can set these variables from the command line. +PYTHON = python +TSCRIPT = test/test_sendfile.py + +all: test + +clean: + rm -f `find . -type f -name \*.py[co]` + rm -f `find . -type f -name \*.so` + rm -f `find . -type f -nam1e .\*~` + rm -f `find . -type f -name \*.orig` + rm -f `find . -type f -name \*.bak` + rm -f `find . -type f -name \*.rej` + rm -rf `find . -type d -name __pycache__` + rm -rf *.egg-info + rm -rf *\$testfile* + rm -rf .tox + rm -rf build + rm -rf dist + rm -rf docs/_build + +build: clean + $(PYTHON) setup.py build + +install: build + if test $(PYTHON) = python2.5; then \ + $(PYTHON) setup.py install; \ + else \ + $(PYTHON) setup.py install --user; \ + fi + +uninstall: + cd ..; $(PYTHON) -m pip uninstall -y -v pysendfile; \ + +test: install + $(PYTHON) $(TSCRIPT) + +# requires "pip install pep8" +pep8: + @git ls-files | grep \\.py$ | xargs pep8 + +# requires "pip install pyflakes" +pyflakes: + @export PYFLAKES_NODOCTEST=1 && \ + git ls-files | grep \\.py$ | xargs pyflakes + +# requires "pip install flake8" +flake8: + @git ls-files | grep \\.py$ | xargs flake8 + + +# Upload source tarball on https://pypi.python.org/pypi/pysendfile. +upload-src: clean + $(PYTHON) setup.py sdist upload |