[arch-commits] Commit in python-astroid/trunk (PKGBUILD python-3.4.patch)

Felix Yan fyan at nymeria.archlinux.org
Fri Apr 25 13:53:21 UTC 2014


    Date: Friday, April 25, 2014 @ 15:53:21
  Author: fyan
Revision: 211747

upgpkg: python-astroid 1.1.0-1

Modified:
  python-astroid/trunk/PKGBUILD
Deleted:
  python-astroid/trunk/python-3.4.patch

------------------+
 PKGBUILD         |   28 +++++---------
 python-3.4.patch |  104 -----------------------------------------------------
 2 files changed, 11 insertions(+), 121 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2014-04-25 13:42:30 UTC (rev 211746)
+++ PKGBUILD	2014-04-25 13:53:21 UTC (rev 211747)
@@ -3,29 +3,21 @@
 
 pkgbase=python-astroid
 pkgname=('python2-astroid' 'python-astroid')
-pkgver=1.0.1
-pkgrel=3
+pkgver=1.1.0
+pkgrel=1
 pkgdesc="Useful miscellaneous modules used by Logilab projects"
 arch=('any')
-url="http://www.logilab.org/project/logilab-common"
+url="https://bitbucket.org/logilab/astroid"
 license=('LGPL')
 makedepends=('python2' 'python')
-source=(https://pypi.python.org/packages/source/a/astroid/astroid-${pkgver}.tar.gz
-        python-3.4.patch)
-sha1sums=('4b0080576174cc0a3519a6c6e9025a8ee853956a'
-          '8d4f2f76f5b0c90ad508c5fded85d37bbbe9e15a')
+source=(https://pypi.python.org/packages/source/a/astroid/astroid-${pkgver}.tar.gz)
+sha1sums=('5565888ff76ddd1a14b952a5e3b651ebe08edd56')
 
 prepare() {
   cp -a astroid-${pkgver}{,-py3}
-
-  cd astroid-${pkgver}-py3
-  # FS#39585
-  patch -p1 -i "$srcdir/python-3.4.patch"
 }
 
 build() {
-  cd "${srcdir}"
-
   cd astroid-${pkgver}
   python2 setup.py build
 
@@ -37,12 +29,13 @@
   depends=('python2' 'python2-logilab-common')
   replaces=('python2-logilab-astng')
   conflicts=('python2-logilab-astng')
-  cd "${srcdir}"/astroid-${pkgver}
 
+  cd astroid-${pkgver}
+
   python2 setup.py install --optimize=1 --skip-build --prefix=/usr --root="${pkgdir}"
 
   # fix permissions ...
-  find "${pkgdir}" -type f -exec chmod +r {} \;
+  #find "${pkgdir}" -type f -exec chmod +r {} \;
 }
 
 package_python-astroid() {
@@ -49,10 +42,11 @@
   depends=('python' 'python-logilab-common')
   replaces=('python-logilab-astng')
   conflicts=('python-logilab-astng')
-  cd "${srcdir}"/astroid-${pkgver}-py3
 
+  cd astroid-${pkgver}-py3
+
   python3 setup.py install --optimize=1 --skip-build --prefix=/usr --root="${pkgdir}"
 
   # fix permissions ...
-  find "${pkgdir}" -type f -exec chmod +r {} \;
+  #find "${pkgdir}" -type f -exec chmod +r {} \;
 }

Deleted: python-3.4.patch
===================================================================
--- python-3.4.patch	2014-04-25 13:42:30 UTC (rev 211746)
+++ python-3.4.patch	2014-04-25 13:53:21 UTC (rev 211747)
@@ -1,104 +0,0 @@
-diff --git a/rebuilder.py b/rebuilder.py
---- a/rebuilder.py
-+++ b/rebuilder.py
-@@ -88,6 +88,8 @@
-             'Repr': 'Backquote',
-             }
-
-+PY34 = sys.version_info >= (3, 4)
-+
- def _init_set_doc(node, newnode):
-     newnode.doc = None
-     try:
-@@ -187,13 +188,20 @@
-         newnode.defaults = [self.visit(child, newnode) for child in node.defaults]
-         newnode.kwonlyargs = []
-         newnode.kw_defaults = []
--        newnode.vararg = node.vararg
--        newnode.kwarg = node.kwarg
-+        vararg, kwarg = node.vararg, node.kwarg
-+        # change added in 82732 (7c5c678e4164), vararg and kwarg
-+        # are instances of `_ast.arg`, not strings
-+        if vararg and PY34:
-+            vararg = vararg.arg
-+        if kwarg and PY34:
-+            kwarg = kwarg.arg
-+        newnode.vararg = vararg
-+        newnode.kwarg = kwarg
-         # save argument names in locals:
--        if node.vararg:
--            newnode.parent.set_local(newnode.vararg, newnode)
--        if node.kwarg:
--            newnode.parent.set_local(newnode.kwarg, newnode)
-+        if vararg:
-+            newnode.parent.set_local(vararg, newnode)
-+        if kwarg:
-+            newnode.parent.set_local(kwarg, newnode)
-         newnode.set_line_info(newnode.last_child())
-         return newnode
- 
-@@ -838,6 +846,12 @@
-         # XXX or we should instead introduce a Arg node in astroid ?
-         return self.visit_assname(node, parent, node.arg)
- 
-+    def visit_nameconstant(self, node, parent):
-+        # in Python 3.4 we have NameConstant for True / False / None
-+        newnode = new.Const(node.value)
-+        _set_infos(node, newnode, parent)
-+        return newnode
-+
-     def visit_arguments(self, node, parent):
-         newnode = super(TreeRebuilder3k, self).visit_arguments(node, parent)
-         self.asscontext = "Ass"
-diff --git a/test/unittest_inference.py b/test/unittest_inference.py
---- a/test/unittest_inference.py
-+++ b/test/unittest_inference.py
-@@ -52,6 +52,11 @@
- else:
-     EXC_MODULE = BUILTINS
- 
-+if sys.version_info < (3, 4):
-+    SITE = 'site'
-+else:
-+    SITE = '_sitebuiltins'
-+
- class InferenceTC(TestCase):
- 
-     CODE = '''
-@@ -700,7 +705,7 @@
-         self.assertEqual(len(infered), 1, infered)
-         self.assertIsInstance(infered[0], Instance)
-         self.assertEqual(str(infered[0]),
--                             'Instance of site._Helper')
-+                             'Instance of %s._Helper' % SITE)
- 
-     def test_builtin_open(self):
-         code = '''
-diff --git a/test/unittest_regrtest.py b/test/unittest_regrtest.py
---- a/test/unittest_regrtest.py
-+++ b/test/unittest_regrtest.py
-@@ -16,7 +16,7 @@
- # You should have received a copy of the GNU Lesser General Public License along
- # with astroid. If not, see <http://www.gnu.org/licenses/>.
- 
--from logilab.common.testlib import unittest_main, TestCase
-+from logilab.common.testlib import unittest_main, TestCase, require_version
- 
- from astroid import ResolveError, MANAGER, Instance, nodes, YES, InferenceError
- from astroid.builder import AstroidBuilder
-@@ -135,6 +135,15 @@
-         self.assertEqual(len(infered), 1)
-         self.assertIsInstance(infered[0], Instance)
- 
-+    @require_version('3.0')
-+    def test_nameconstant(self):
-+        # used to fail for Python 3.4
-+        builder = AstroidBuilder()
-+        astroid = builder.string_build("def test(x=True): pass")
-+        default = astroid.body[0].args.args[0]
-+        self.assertEqual(default.name, 'x')
-+        self.assertEqual(next(default.infer()).value, True)
-+
- 
- class Whatever(object):
-     a = property(lambda x: x, lambda x: x)




More information about the arch-commits mailing list