diff options
author | Sylvain Thénault <sylvain.thenault@logilab.fr> | 2011-12-05 14:10:29 +0100 |
---|---|---|
committer | Sylvain Thénault <sylvain.thenault@logilab.fr> | 2011-12-05 14:10:29 +0100 |
commit | 751484e68edbb8345aa9a48ceadec60a772f14f2 (patch) | |
tree | 2007e1067e2ca36f0edca3065b352704717223d1 | |
parent | df62bb8696ad499435fa9313cb71828dfd189a52 (diff) | |
download | pylint-git-751484e68edbb8345aa9a48ceadec60a772f14f2.tar.gz |
[doc] update README.Python3 (closes: #82421)
Forget hardy distribution.
-rw-r--r-- | README.Python3 | 31 | ||||
-rwxr-xr-x | debian.hardy/rules | 79 | ||||
-rwxr-xr-x | debian.py3k/rules | 46 | ||||
-rw-r--r-- | debian.sid/control (renamed from debian.py3k/control) | 33 | ||||
-rwxr-xr-x | debian.sid/rules | 56 | ||||
-rw-r--r-- | debian.sid/source/format (renamed from debian.py3k/source/format) | 0 |
6 files changed, 103 insertions, 142 deletions
diff --git a/README.Python3 b/README.Python3 index 3c94863e3..ccc92972e 100644 --- a/README.Python3 +++ b/README.Python3 @@ -1,26 +1,27 @@ Python3 ======= -Source ------- +Compatibility +------------- + +Please, consider python3 >= 3.2 only. -Python3 portage is made by running the 2to3 script on all modules:: - find . ! -path "*/test/*py" -name "*py" -exec 2to3-3.1 -wn {} \; +Approach +-------- +We maintain a Python 2 base and use 2to3 to generate Python 3 code. -Dev ---- +2to3 is integrated into the distutils installation process and will be run as a +build step when invoked by the python3 interpreter:: -If you want to run the tests, simply remove the "! -path ..." option, hence -also refactoring the test files, including all data files. -Note that when running 2to3 on some test/input/ files, it will crash since -this folder contains corrupted files. Hence, we can not run directly -*2to3* on the test folder:: + NO_SETUPTOOLS=1 python3 setup.py install --no-compile - $ 2to3 test/ +In order to run pylint locally, you have to install the dependencies:: + + easy_install-3.2 logilab-common + easy_install-3.2 logilab-astng -But it will work nice with *find*. Debian ------ @@ -30,3 +31,7 @@ the debian/ folder:: cp debian.py3k/* debian/ + +Resources +--------- +http://wiki.python.org/moin/PortingPythonToPy3k diff --git a/debian.hardy/rules b/debian.hardy/rules deleted file mode 100755 index 81b90c375..000000000 --- a/debian.hardy/rules +++ /dev/null @@ -1,79 +0,0 @@ -#!/usr/bin/make -f -# Sample debian/rules that uses debhelper. -# GNU copyright 1997 to 1999 by Joey Hess. -# -# adapted by Logilab for automatic generation by debianize -# (part of the devtools project, http://www.logilab.org/projects/devtools) -# -# Copyright (c) 2003-2009 LOGILAB S.A. (Paris, FRANCE). -# http://www.logilab.fr/ -- mailto:contact@logilab.fr - -# Uncomment this to turn on verbose mode. -#export DH_VERBOSE=1 - -build: build-stamp -build-stamp: - dh_testdir - NO_SETUPTOOLS=1 python setup.py -q build - touch build-stamp - -clean: - dh_testdir - dh_testroot - - NO_SETUPTOOLS=1 python setup.py clean - - find . -name "*.pyc" -delete - - rm -rf build - - dh_clean build-stamp - -install: build - dh_testdir - dh_testroot - dh_clean -k - dh_installdirs - - NO_SETUPTOOLS=1 python setup.py -q install --no-compile \ - --root=$(CURDIR)/debian/pylint \ - - - rm -rf debian/pylint/usr/lib/python*/*-packages/pylint/test - - # fixes shebangs - for exec in pylint pylint-gui symilar ; do \ - if head -1 debian/pylint/usr/bin/$$exec | grep "^#! */usr/bin" | grep "python" >/dev/null ; then \ - sed -i "s@^#! */usr/bin/env \+python\$$@#!/usr/bin/python@" debian/pylint/usr/bin/$$exec; \ - fi ; \ - chmod a+x debian/pylint/usr/bin/$$exec; \ - done - - install -m 644 elisp/pylint.el debian/pylint/usr/share/emacs/site-lisp/pylint/ - - # install tests - #(cd test && find . -type f -not \( -path '*/CVS/*' -or -name '*.pyc' \) -exec install -D --mode=644 {} ../debian/pylint/usr/share/doc/pylint/test/{} \;) - -# Build architecture-independent files here. -binary-indep: build install - dh_testdir - dh_testroot - dh_install -i - dh_pysupport -i - dh_installchangelogs -i ChangeLog - dh_installexamples -i - dh_installdocs -i - dh_installman -i - dh_installemacsen - dh_link -i - dh_compress -i -X.py -X.ini -X.xml -Xtest - dh_fixperms -i - dh_installdeb -i - dh_gencontrol -i - dh_md5sums -i - dh_builddeb -i - -binary-arch: - -binary: binary-indep -.PHONY: build clean binary binary-indep binary-arch diff --git a/debian.py3k/rules b/debian.py3k/rules deleted file mode 100755 index 235205862..000000000 --- a/debian.py3k/rules +++ /dev/null @@ -1,46 +0,0 @@ -#!/usr/bin/make -f -# Sample debian/rules that uses debhelper. -# GNU copyright 1997 to 1999 by Joey Hess. -# -# adapted by Logilab for automatic generation by debianize -# (part of the devtools project, http://www.logilab.org/projects/devtools) -# -# Copyright (c) 2003-2010 LOGILAB S.A. (Paris, FRANCE). -# http://www.logilab.fr/ -- mailto:contact@logilab.fr - -# Uncomment this to turn on verbose mode. -#export DH_VERBOSE=1 - -PACKAGE:=$(shell grep Package debian/control | cut -d ' ' -f2) - -include /usr/share/python3/python.mk - -%: - dh --with python3 $@ - -override_dh_install: - NO_SETUPTOOLS=1 python3 setup.py -q install --no-compile \ - --root=$(CURDIR)/debian/$(PACKAGE)/ \ - ${py_setup_install_args} - # rename executables - for executable in pylint pylint-gui symilar epylint pyreverse ; do \ - new_exec="$$executable"3; \ - mv $(CURDIR)/debian/$(PACKAGE)/usr/bin/$$executable $(CURDIR)/debian/$(PACKAGE)/usr/bin/$$new_exec; \ - done - # remove test directory - rm -rf debian/$(PACKAGE)/usr/lib/python*/*-packages/pylint/test - # generate pylint man page automatically (only when sources are py3k compatible) - PYTHONPATH=debian/$(PACKAGE)/usr/lib/python3/dist-packages python3 $(CURDIR)/bin/pylint --generate-man > $(CURDIR)/man/pylint.1 - # rename and install man pages - #for manpage in man/* ; do \ - # new_manpage="$(shell basename ${manpage} .1)"3.1; \ - # mv $$manpage $$new_manpage; \ - #done - mv man/pylint.1 man/pylint3.1 - mv man/pyreverse.1 man/pyreverse3.1 - dh_installman man/*.1 - -override_dh_installdocs: - dh_installdocs README* - dh_installchangelogs -i ChangeLog - diff --git a/debian.py3k/control b/debian.sid/control index 82393f736..8941f0957 100644 --- a/debian.py3k/control +++ b/debian.sid/control @@ -4,17 +4,42 @@ Priority: optional Maintainer: Logilab S.A. <contact@logilab.fr> Uploaders: Sylvain Thénault <sylvain.thenault@logilab.fr>, Alexandre Fayolle <afayolle@debian.org>, Sandro Tosi <morph@debian.org>, Julien Jehannet <julien.jehannet@logilab.fr> -Build-Depends: debhelper (>= 7.0.50~), python3-all, python3-logilab-common, python3-logilab-astng -Standards-Version: 3.9.1 +Build-Depends: debhelper (>= 7.0.50~), python-all, python3-all +Standards-Version: 3.9.2 Homepage: http://www.logilab.org/project/pylint Vcs-Hg: http://hg.logilab.org/pylint Vcs-Browser: http://hg.logilab.org/pylint +Package: pylint +Architecture: all +Depends: ${python:Depends}, ${misc:Depends}, python-logilab-common (>= 0.53), python-logilab-astng (>= 0.21) +Recommends: python-tk +XB-Python-Version: ${python:Versions} +Description: python code static checker and UML diagram generator + Pylint is a Python source code analyzer which looks for programming + errors, helps enforcing a coding standard and sniffs for some code + smells (as defined in Martin Fowler's Refactoring book) + . + Pylint can be seen as another PyChecker since nearly all tests you + can do with PyChecker can also be done with Pylint. However, Pylint + offers some more features, like checking length of lines of code, + checking if variable names are well-formed according to your coding + standard, or checking if declared interfaces are truly implemented, + and much more. + . + Additionally, it is possible to write plugins to add your own checks. + . + The included command pyreverse generates UML class and package + diagrams. + . + The recommended python-tk package is only for using the pylint-gui + script. + Package: pylint3 Architecture: all -Depends: ${python:Depends}, ${misc:Depends}, python3-logilab-common (>= 0.53), python3-logilab-astng (>= 0.21) +Depends: ${python3:Depends}, ${misc:Depends}, python3-logilab-common (>= 0.53), python3-logilab-astng (>= 0.21) Recommends: python3-tk -XB-Python-Version: ${python:Versions} +XB-Python-Version: ${python3:Versions} Description: python code static checker and UML diagram generator Pylint is a Python source code analyzer which looks for programming errors, helps enforcing a coding standard and sniffs for some code diff --git a/debian.sid/rules b/debian.sid/rules new file mode 100755 index 000000000..6a0d59ccf --- /dev/null +++ b/debian.sid/rules @@ -0,0 +1,56 @@ +#!/usr/bin/make -f +# Sample debian/rules that uses debhelper. +# GNU copyright 1997 to 1999 by Joey Hess. +# +# adapted by Logilab for automatic generation by debianize +# (part of the devtools project, http://www.logilab.org/projects/devtools) +# +# Copyright (c) 2003-2010 LOGILAB S.A. (Paris, FRANCE). +# http://www.logilab.fr/ -- mailto:contact@logilab.fr + +# Uncomment this to turn on verbose mode. +#export DH_VERBOSE=1 + +include /usr/share/python/python.mk + +PYLIB:=$(call py_libdir,$(shell pyversions -d)) +PACKAGE:=$(call py_pkgname,pylint,python) +PYLIB3:=$(call py_libdir,python3.) +PACKAGE3:="pylint3" + +%: + dh $@ --with python2,python3 + +override_dh_install: + NO_SETUPTOOLS=1 python setup.py -q install --no-compile \ + --root=$(CURDIR)/debian/$(PACKAGE)/ \ + ${py_setup_install_args} + NO_SETUPTOOLS=1 python3 setup.py -q install --no-compile \ + --root=$(CURDIR)/debian/$(PACKAGE3)/ \ + ${py_setup_install_args} + # rename executables + for executable in pylint pylint-gui symilar epylint pyreverse ; do \ + new_exec="$$executable"3; \ + mv $(CURDIR)/debian/$(PACKAGE3)/usr/bin/$$executable $(CURDIR)/debian/$(PACKAGE3)/usr/bin/$$new_exec; \ + done + + # remove test directory + rm -rf debian/*/usr/lib/python*/*-packages/pylint/test + + # generate pylint man page automatically + #PYTHONPATH=$(CURDIR)/debian/$(PACKAGE)/$(PYLIB) python $(CURDIR)/bin/pylint --generate-man > $(CURDIR)/man/pylint.1 + + # rename and install man pages + dh_installman -ppylint man/*.1 + cd man && for i in *.1; do cp -v $$i "$$(basename $$i .1)3.1"; done + dh_installman -ppylint3 man/*3.1 + +override_dh_installdocs: + dh_installdocs README* + dh_installchangelogs -i ChangeLog + +override_dh_auto_test: +ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS))) + # PYTHON 2.X + # PYTHON 3.2 +endif diff --git a/debian.py3k/source/format b/debian.sid/source/format index 163aaf8d8..163aaf8d8 100644 --- a/debian.py3k/source/format +++ b/debian.sid/source/format |