[arch-commits] Commit in pep8/repos (4 files)
Felix Yan
fyan at archlinux.org
Sat Sep 19 10:25:43 UTC 2015
Date: Saturday, September 19, 2015 @ 12:25:43
Author: fyan
Revision: 140728
archrelease: copy trunk to community-staging-any
Added:
pep8/repos/community-staging-any/
pep8/repos/community-staging-any/LICENSE
(from rev 140727, pep8/trunk/LICENSE)
pep8/repos/community-staging-any/PKGBUILD
(from rev 140727, pep8/trunk/PKGBUILD)
pep8/repos/community-staging-any/revert-cli-options-only.patch
(from rev 140727, pep8/trunk/revert-cli-options-only.patch)
-------------------------------+
LICENSE | 24 +++++++++++++
PKGBUILD | 70 ++++++++++++++++++++++++++++++++++++++
revert-cli-options-only.patch | 73 ++++++++++++++++++++++++++++++++++++++++
3 files changed, 167 insertions(+)
Copied: pep8/repos/community-staging-any/LICENSE (from rev 140727, pep8/trunk/LICENSE)
===================================================================
--- community-staging-any/LICENSE (rev 0)
+++ community-staging-any/LICENSE 2015-09-19 10:25:43 UTC (rev 140728)
@@ -0,0 +1,24 @@
+Copyright © 2006-2009 Johann C. Rocholl <johann at rocholl.net>
+Copyright © 2009-2013 Florent Xicluna <florent.xicluna at gmail.com>
+
+Licensed under the terms of the Expat License
+
+Permission is hereby granted, free of charge, to any person
+obtaining a copy of this software and associated documentation files
+(the "Software"), to deal in the Software without restriction,
+including without limitation the rights to use, copy, modify, merge,
+publish, distribute, sublicense, and/or sell copies of the Software,
+and to permit persons to whom the Software is furnished to do so,
+subject to the following conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
+BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
+ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
Copied: pep8/repos/community-staging-any/PKGBUILD (from rev 140727, pep8/trunk/PKGBUILD)
===================================================================
--- community-staging-any/PKGBUILD (rev 0)
+++ community-staging-any/PKGBUILD 2015-09-19 10:25:43 UTC (rev 140728)
@@ -0,0 +1,70 @@
+# $Id$
+# Maintainer: Felix Yan <felixonmars at archlinux.org>
+# Contributor: Ismael Carnales <icarnales at gmail dot com>
+# Contributor: Sergey Mastykov <smastykov[at]gmail[dot]com>
+
+pkgbase=pep8
+pkgname=("$pkgbase" "python2-$pkgbase")
+pkgver=1.6.2
+pkgrel=3
+pkgdesc="Python style guide checker"
+arch=('any')
+url="http://github.com/jcrocholl/pep8/"
+license=('custom:Expat')
+makedepends=('python-setuptools' 'python2-setuptools' 'git')
+source=("git+https://github.com/jcrocholl/${pkgbase}.git#tag=$pkgver"
+ revert-cli-options-only.patch)
+sha256sums=('SKIP'
+ 'ffa25c07cbff7f20e799c5ad6f0bc205c255898ffc7bab3c4157abfb83c43f7b')
+
+prepare() {
+ # Cherry-picked from https://github.com/jcrocholl/pep8/commit/435d1cbf995a659a82d1d4b42d25e3459556ef21
+ (cd $pkgbase; patch -p1 -i ../revert-cli-options-only.patch)
+
+ cp -a $pkgbase{,-py2}
+
+ sed -i '1s/env python$/python2/' $pkgbase-py2/pep8.py
+}
+
+build() {
+ cd "${srcdir}/${pkgbase}"
+ python setup.py build
+
+ cd "${srcdir}/${pkgbase}-py2"
+ python2 setup.py build
+}
+
+check() {
+ cd "${srcdir}/${pkgbase}"
+ python setup.py test
+
+ cd "${srcdir}/${pkgbase}-py2"
+ python2 setup.py test
+}
+
+package_pep8() {
+ depends=('python' 'python-setuptools')
+ provides=('pep8-python3')
+ conflicts=('pep8-python3')
+ replaces=('pep8-python3')
+
+ cd $pkgbase
+ python3 setup.py install -O1 --prefix=/usr --root="$pkgdir/"
+
+ install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
+}
+
+package_python2-pep8() {
+ depends=('python2' 'python2-setuptools')
+ provides=('pep8-python2')
+ conflicts=('pep8-python2')
+ replaces=('pep8-python2')
+
+ cd $pkgbase-py2
+ python2 setup.py install -O1 --prefix=/usr --root="$pkgdir/"
+ mv "$pkgdir/usr/bin/pep8" "$pkgdir/usr/bin/pep8-python2"
+
+ install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
+}
+
+# vim:set ts=2 sw=2 et:
Copied: pep8/repos/community-staging-any/revert-cli-options-only.patch (from rev 140727, pep8/trunk/revert-cli-options-only.patch)
===================================================================
--- community-staging-any/revert-cli-options-only.patch (rev 0)
+++ community-staging-any/revert-cli-options-only.patch 2015-09-19 10:25:43 UTC (rev 140728)
@@ -0,0 +1,73 @@
+From 435d1cbf995a659a82d1d4b42d25e3459556ef21 Mon Sep 17 00:00:00 2001
+From: Ian Lee <IanLee1521 at gmail.com>
+Date: Tue, 17 Mar 2015 21:52:23 -0700
+Subject: [PATCH] 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
+---
+ CHANGES.txt | 6 ++++++
+ pep8.py | 28 ++++++++++++++--------------
+ 2 files changed, 20 insertions(+), 14 deletions(-)
+
+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):
More information about the arch-commits
mailing list