[pyftpdlib] r1240 committed - add makefile

0 views
Skip to first unread message

pyft...@googlecode.com

unread,
Dec 30, 2013, 5:46:10 AM12/30/13
to pyftpdli...@googlegroups.com
Revision: 1240
Author: g.rodola
Date: Mon Dec 30 10:45:50 2013 UTC
Log: add makefile
http://code.google.com/p/pyftpdlib/source/detail?r=1240

Added:
/trunk/Makefile

=======================================
--- /dev/null
+++ /trunk/Makefile Mon Dec 30 10:45:50 2013 UTC
@@ -0,0 +1,59 @@
+# Shortcuts for various tasks (UNIX only).
+# To use a specific Python version run:
+# $ make install PYTHON=python3.3
+
+.PHONY: build install uninstall test test_contrib nosetests pep8 pyflakes \
+ clean upload-src
+
+PYTHON=python
+TSCRIPT=test/test_ftpd.py
+FLAGS=
+
+all: test
+
+clean:
+ rm -f `find . -type f -name \*.py[co]`
+ rm -f `find . -type f -name .\*~`
+ 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 build
+ rm -rf dist
+
+build: clean
+ $(PYTHON) setup.py build
+
+install: build
+ if test $(PYTHON) = python2.4; then \
+ $(PYTHON) setup.py install; \
+ elif test $(PYTHON) = python2.5; then \
+ $(PYTHON) setup.py install; \
+ else \
+ $(PYTHON) setup.py install --user; \
+ fi
+
+uninstall:
+ pip-`$(PYTHON) -c "import sys; sys.stdout.write('.'.join(map(str,
sys.version_info)[:2]))"` uninstall -y -v pyftpdlib
+
+test: install
+ $(PYTHON) $(TSCRIPT)
+
+test-contrib:
+ $(PYTHON) test/test_contrib.py
+
+nosetest: install
+ # $ make nosetest FLAGS=test_name
+ nosetests $(TSCRIPT) -v -m $(FLAGS)
+
+pep8:
+ pep8 pyftpdlib/ demo/ test/ setup.py --ignore E302
+
+pyflakes:
+ # ignore doctests
+ export PYFLAKES_NODOCTEST=1 && \
+ pyflakes pyftpdlib/ demo/ test/ setup.py
+
+upload-src: clean
+ $(PYTHON) setup.py sdist upload
Reply all
Reply to author
Forward
0 new messages