diff options
author | Ian Delaney <idella4@gentoo.org> | 2015-09-25 12:26:31 +0800 |
---|---|---|
committer | Ian Delaney <idella4@gentoo.org> | 2015-09-25 13:33:17 +0800 |
commit | f9eac8f6c208ecdad7c3848b7becd6c426fee78b (patch) | |
tree | 6eafc9fb48812a6b9a676d9fcaa58d5bfab6ac1b /dev-python/pep8 | |
parent | net-analyzer/argus: Fix file permissions (bug #561360 by Toralf Förster). (diff) | |
download | gentoo-f9eac8f6c208ecdad7c3848b7becd6c426fee78b.tar.gz gentoo-f9eac8f6c208ecdad7c3848b7becd6c426fee78b.tar.bz2 gentoo-f9eac8f6c208ecdad7c3848b7becd6c426fee78b.zip |
dev-python/pep8: revbump to 1.6.2-r1
backport upstream patch restoring flake8 compatibility, patch by maintainer
see https://github.com/gentoo/gentoo/pull/129/ and Bug #561394
Package-Manager: portage-2.2.20.1
Diffstat (limited to 'dev-python/pep8')
-rw-r--r-- | dev-python/pep8/files/pep8-1.6.2-restore-flake8-compatibility.patch | 69 | ||||
-rw-r--r-- | dev-python/pep8/pep8-1.6.2-r1.ebuild | 37 |
2 files changed, 106 insertions, 0 deletions
diff --git a/dev-python/pep8/files/pep8-1.6.2-restore-flake8-compatibility.patch b/dev-python/pep8/files/pep8-1.6.2-restore-flake8-compatibility.patch new file mode 100644 index 000000000000..f3557728a733 --- /dev/null +++ b/dev-python/pep8/files/pep8-1.6.2-restore-flake8-compatibility.patch @@ -0,0 +1,69 @@ +commit 435d1cbf995a659a82d1d4b42d25e3459556ef21 +Author: Ian Lee <IanLee1521@gmail.com> +Date: Tue Mar 17 21:52:23 2015 -0700 + + Reverted fix for #368 which had unintended repurcussions in flake8 and other places. + + This fix reverts to the parsing of user config (~/.config/pep8), then local directory + config files, and finally overrides with cli options as was the behavior back in 1.5.7 + +diff --git a/CHANGES.txt b/CHANGES.txt +index 85eb043..5499abd 100644 +--- a/CHANGES.txt ++++ b/CHANGES.txt +@@ -5,6 +5,12 @@ Changelog + 1.6.x (unreleased) + ------------------ + ++Changes: ++ ++* Reverted the fix in #368, "options passed on command line are only ones ++ accepted" feature. This has many unintended consequences in pep8 and flake8 ++ and needs to be reworked when I have more time. ++ + 1.6.2 (2015-02-15) + ------------------ + +diff --git a/pep8.py b/pep8.py +index 9f40381..4d993da 100755 +--- a/pep8.py ++++ b/pep8.py +@@ -1984,24 +1984,24 @@ def read_config(options, args, arglist, parser): + + local_dir = os.curdir + ++ if USER_CONFIG and os.path.isfile(USER_CONFIG): ++ if options.verbose: ++ print('user configuration: %s' % USER_CONFIG) ++ config.read(USER_CONFIG) ++ ++ parent = tail = args and os.path.abspath(os.path.commonprefix(args)) ++ while tail: ++ if config.read(os.path.join(parent, fn) for fn in PROJECT_CONFIG): ++ local_dir = parent ++ if options.verbose: ++ print('local configuration: in %s' % parent) ++ break ++ (parent, tail) = os.path.split(parent) ++ + if cli_conf and os.path.isfile(cli_conf): + if options.verbose: + print('cli configuration: %s' % cli_conf) + config.read(cli_conf) +- else: +- if USER_CONFIG and os.path.isfile(USER_CONFIG): +- if options.verbose: +- print('user configuration: %s' % USER_CONFIG) +- config.read(USER_CONFIG) +- +- parent = tail = args and os.path.abspath(os.path.commonprefix(args)) +- while tail: +- if config.read(os.path.join(parent, fn) for fn in PROJECT_CONFIG): +- local_dir = parent +- if options.verbose: +- print('local configuration: in %s' % parent) +- break +- (parent, tail) = os.path.split(parent) + + pep8_section = parser.prog + if config.has_section(pep8_section): diff --git a/dev-python/pep8/pep8-1.6.2-r1.ebuild b/dev-python/pep8/pep8-1.6.2-r1.ebuild new file mode 100644 index 000000000000..c9ac898b9889 --- /dev/null +++ b/dev-python/pep8/pep8-1.6.2-r1.ebuild @@ -0,0 +1,37 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=5 +PYTHON_COMPAT=( python{2_7,3_3,3_4} pypy pypy3 ) + +inherit distutils-r1 + +DESCRIPTION="Python style guide checker" +HOMEPAGE="https://github.com/jcrocholl/pep8 https://pypi.python.org/pypi/pep8" +SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz" + +LICENSE="MIT" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" +IUSE="doc" + +DEPEND="dev-python/setuptools[${PYTHON_USEDEP}] + doc? ( dev-python/sphinx[${PYTHON_USEDEP}] )" +RDEPEND="${DEPEND}" + +PATCHES=( "${FILESDIR}/${P}-restore-flake8-compatibility.patch" ) + +python_compile_all() { + use doc && emake -C docs html +} + +python_test() { + PYTHONPATH="${S}" "${PYTHON}" pep8.py -v --testsuite=testsuite || die + PYTHONPATH="${S}" "${PYTHON}" pep8.py --doctest -v || die +} + +python_install_all() { + use doc && local HTML_DOCS=( docs/_build/html/. ) + distutils-r1_python_install_all +} |