summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichal Nowikowski <godfryd@gmail.com>2014-08-30 06:37:08 +0200
committerMichal Nowikowski <godfryd@gmail.com>2014-08-30 06:37:08 +0200
commitae114c355ce6463e16c1bc5a7739daad4301a20b (patch)
treef79518183b2c77c1c3033417bdabbd3a8a8345e8
parentb4e426cb7443d465bfb0b641b1e9e69f66b330e6 (diff)
parent9e67cbe18bc8748ffadf29c3ac586029502b5f2c (diff)
downloadpylint-make.tar.gz
mergemake
-rw-r--r--.hgignore8
-rw-r--r--Makefile76
2 files changed, 84 insertions, 0 deletions
diff --git a/.hgignore b/.hgignore
index f03a730..eccf896 100644
--- a/.hgignore
+++ b/.hgignore
@@ -10,3 +10,11 @@
^pylint.egg-info/
.tox
(^|/)\..*\.sw[a-z]$
+doc/features.rst
+pyve
+build-stamp
+debian/files
+debian/pylint\..*\.log
+debian/pylint\..*\.debhelper
+debian/pylint.substvars
+debian/pylint$ \ No newline at end of file
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..b566c2b
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,76 @@
+# Makefile for handling various tasks of PyLint sources
+PYVE=pyve
+PIP=$(PYVE)/bin/pip
+TOX=$(PYVE)/bin/tox
+
+VERSION=$(shell PYTHONPATH=. python -c "from __pkginfo__ import version; print version")
+
+PKG_SDIST=dist/pylint-$(VERSION).tar.gz
+PKG_DEB=../pylint_$(VERSION)-1_all.deb
+
+# this is default target, it should always be first in this Makefile
+help:
+ @echo "Please use \`make <target>' where <target> is one of"
+ @echo " tests to run whole test suit of PyLint"
+ @echo " docs to generate all docs including man pages and exemplary pylintrc"
+ @echo " deb to build debian .deb package (it works only on Debian based Linux distros)"
+ @echo " sdist to build source .tar.gz package"
+ @echo " lint to check Pylint sources with itself"
+ @echo " all to run all targets"
+
+
+$(PIP):
+ virtualenv $(PYVE)
+
+$(TOX): $(PIP)
+ $(PIP) install tox==1.7
+
+
+ifdef TOXENV
+toxparams?=-e $(TOXENV)
+endif
+
+tests: $(TOX)
+ $(TOX) $(toxparams)
+
+docs: $(PIP)
+ $(PIP) install .
+ $(PIP) install Sphinx
+ . $(PYVE)/bin/activate; make all -C doc
+
+deb: $(PKG_DEB)
+$(PKG_DEB): /usr/bin/debuild /usr/bin/dh_pysupport
+ if [ -n "$$SUBVERSION" ]; then sed -i -e "0,/pylint (\(.*\))/s//pylint (\1.$${SUBVERSION})/" debian/changelog; fi
+ debuild -b -us -uc
+
+sdist: $(PKG_SDIST)
+$(PKG_SDIST):
+ python setup.py sdist
+
+lint: $(PIP)
+ $(PIP) install .
+ $(PYVE)/bin/pylint lint.py || true # for now ignore errors
+
+clean:
+ rm -rf $(PYVE)
+ rm -rf .tox
+ rm -rf dist
+ rm -rf build
+ make clean -C doc
+ rm -rf $(PKG_DEB) ../pylint_*.changes ../pylint_*.build
+ debuild clean || true
+
+clobber:
+ hg purge -p
+ hg purge -a
+
+
+/usr/bin/debuild:
+ sudo apt-get -y --force-yes install devscripts
+
+/usr/bin/dh_pysupport:
+ sudo apt-get -y --force-yes install python-support
+
+all: clean lint tests docs sdist deb
+
+.PHONY: help tests docs deb sdist lint clean clobber all