summaryrefslogtreecommitdiff
path: root/dev-python/yapps
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2018-07-14 21:03:06 +0100
committerV3n3RiX <venerix@redcorelinux.org>2018-07-14 21:03:06 +0100
commit8376ef56580626e9c0f796d5b85b53a0a1c7d5f5 (patch)
tree7681bbd4e8b05407772df40a4bf04cbbc8afc3fa /dev-python/yapps
parent30a9caf154332f12ca60756e1b75d2f0e3e1822d (diff)
gentoo resync : 14.07.2018
Diffstat (limited to 'dev-python/yapps')
-rw-r--r--dev-python/yapps/Manifest5
-rw-r--r--dev-python/yapps/files/yapps-Convert-print-statements-to-python3-style-print-func.patch46
-rw-r--r--dev-python/yapps/files/yapps-Don-t-capture-sys.stderr-at-import-time.patch32
-rw-r--r--dev-python/yapps/metadata.xml12
-rw-r--r--dev-python/yapps/yapps-2.2.0-r1.ebuild28
5 files changed, 123 insertions, 0 deletions
diff --git a/dev-python/yapps/Manifest b/dev-python/yapps/Manifest
new file mode 100644
index 000000000000..209ff3e4bca1
--- /dev/null
+++ b/dev-python/yapps/Manifest
@@ -0,0 +1,5 @@
+AUX yapps-Convert-print-statements-to-python3-style-print-func.patch 1572 BLAKE2B c1375ca4ad6a6d7430044f3bc3c29a7f62f06404d64f689a83cd4ff10781f51d4d0dc287c466a622933af7f360c6ce81ddafbddffc62c57d73ac7bc3008a2eb4 SHA512 36ab43698fc637cd52287c6649be064b04374a22b9e459a53f3e04850d0cf8276e042e45994a3d2e0d0c97e57478321631475170dfe3e8efa8debd3d32ea80a3
+AUX yapps-Don-t-capture-sys.stderr-at-import-time.patch 1088 BLAKE2B c00fd5b4834b600127f7eedfbc4a7f65716a412cb1a2011ce36ecfde10bb54d171028c47ea04be2065b7cafa9e612e16e633ac701166506690613e5569a3f651 SHA512 b3a3de5bc11cfc8926e430ab5d8834f00a15362e7a108ad11d40a2c6f804d51ddffbb467dbe1c767b345c3451f4feef642e1b55a735c5cb85c405e8c3c7c0107
+DIST Yapps-2.2.0.tar.gz 13630 BLAKE2B b1c3370c0a91febc7ab567fa9af05150f74d19e4de18d09e41ff7e361b06f8bd9aed0ad5ac01f9d1c46bdb381af57cfe11603ebf534b10979a16a5211171a31f SHA512 087f99071b2615f5382f453d9b3492675704aa7e7ff54b332d7c4e337e16fbd3ab3c1b3820a7941775c0b3ecf7e255a7773cb47ea20e8adb77dc3dc8d9a49faa
+EBUILD yapps-2.2.0-r1.ebuild 693 BLAKE2B 0f27edefc8ea13ab6f2fa738fa6a307f5dd9f09213951d10d3e2a89a366327cc81ca9e31887aa88563f5159ba69290a7100242f5d264561acfcc2a134a5a2eed SHA512 b464824fc10d972514dcb11cbcd210f125c26c3e39b3222ef5d1a0c8d5852dae90504b5cd578ef89c7e163e55cf6f49d50b70fb44f1cd01972236c83d9e1b798
+MISC metadata.xml 373 BLAKE2B cddb77338531df2a99d22a48d6d5e18cf9fb0f738ea840ac46945d7ca47626a2f4f57d8878898cfcbc0993286753cbbf71e45c66f88fd1e410471bc6671c16c2 SHA512 546f07634ad9ddbbfd3b95c8494f1592f1f38aaaa83f2325a6d0e03bbe64bad498fefef02082c5df8e075763b719993bd09c980f1cf9fdcde433113280edd74b
diff --git a/dev-python/yapps/files/yapps-Convert-print-statements-to-python3-style-print-func.patch b/dev-python/yapps/files/yapps-Convert-print-statements-to-python3-style-print-func.patch
new file mode 100644
index 000000000000..4bff7f8f40dd
--- /dev/null
+++ b/dev-python/yapps/files/yapps-Convert-print-statements-to-python3-style-print-func.patch
@@ -0,0 +1,46 @@
+From d051588873a54860cfb86ec0d330f7d855336618 Mon Sep 17 00:00:00 2001
+From: Julien Cristau <julien.cristau@logilab.fr>
+Date: Tue, 2 Dec 2014 10:41:05 +0100
+Subject: [PATCH 2/2] Convert print statements to python3-style print function
+
+Signed-off-by: Julien Cristau <julien.cristau@logilab.fr>
+---
+ yapps/runtime.py | 8 ++++----
+ 1 file changed, 4 insertions(+), 4 deletions(-)
+
+diff --git a/yapps/runtime.py b/yapps/runtime.py
+index 58017fe..5d40581 100644
+--- a/yapps/runtime.py
++++ b/yapps/runtime.py
+@@ -178,7 +178,7 @@ class Scanner(object):
+ file,line,p = pos
+ if file != self.filename:
+ if self.stack: return self.stack.print_line_with_pointer(pos,length=length,out=out)
+- print >>out, "(%s: not in input buffer)" % file
++ print("(%s: not in input buffer)" % file, file=out)
+ return
+
+ text = self.input
+@@ -201,7 +201,7 @@ class Scanner(object):
+ break
+ spos = cr+1
+ else:
+- print >>out, "(%s:%d not in input buffer)" % (file,origline)
++ print("(%s:%d not in input buffer)" % (file,origline), file=out)
+ return
+
+ # Now try printing part of the line
+@@ -230,8 +230,8 @@ class Scanner(object):
+ p = p - 7
+
+ # Now print the string, along with an indicator
+- print >>out, '> ',text
+- print >>out, '> ',' '*p + '^'
++ print('> ',text, file=out)
++ print('> ',' '*p + '^', file=out)
+
+ def grab_input(self):
+ """Get more input if possible."""
+--
+2.6.4
+
diff --git a/dev-python/yapps/files/yapps-Don-t-capture-sys.stderr-at-import-time.patch b/dev-python/yapps/files/yapps-Don-t-capture-sys.stderr-at-import-time.patch
new file mode 100644
index 000000000000..1e25a0059409
--- /dev/null
+++ b/dev-python/yapps/files/yapps-Don-t-capture-sys.stderr-at-import-time.patch
@@ -0,0 +1,32 @@
+From 482faec17f1c69784d8cc2757a79809458d71154 Mon Sep 17 00:00:00 2001
+From: Julien Cristau <julien.cristau@logilab.fr>
+Date: Tue, 2 Dec 2014 10:40:01 +0100
+Subject: [PATCH 1/2] Don't capture sys.stderr at import time
+
+Signed-off-by: Julien Cristau <julien.cristau@logilab.fr>
+---
+ yapps/runtime.py | 5 ++++-
+ 1 file changed, 4 insertions(+), 1 deletion(-)
+
+diff --git a/yapps/runtime.py b/yapps/runtime.py
+index 29f91e7..58017fe 100644
+--- a/yapps/runtime.py
++++ b/yapps/runtime.py
+@@ -168,10 +168,13 @@ class Scanner(object):
+ # output += '%s\n' % (repr(t),)
+ # return output
+
+- def print_line_with_pointer(self, pos, length=0, out=sys.stderr):
++ def print_line_with_pointer(self, pos, length=0, out=None):
+ """Print the line of 'text' that includes position 'p',
+ along with a second line with a single caret (^) at position p"""
+
++ if out is None:
++ out = sys.stderr
++
+ file,line,p = pos
+ if file != self.filename:
+ if self.stack: return self.stack.print_line_with_pointer(pos,length=length,out=out)
+--
+2.6.4
+
diff --git a/dev-python/yapps/metadata.xml b/dev-python/yapps/metadata.xml
new file mode 100644
index 000000000000..335bb8d11a4b
--- /dev/null
+++ b/dev-python/yapps/metadata.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="project">
+ <email>python@gentoo.org</email>
+ <name>Python</name>
+ </maintainer>
+ <upstream>
+ <remote-id type="pypi">Yapps</remote-id>
+ <remote-id type="github">smurfix/yapps</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/dev-python/yapps/yapps-2.2.0-r1.ebuild b/dev-python/yapps/yapps-2.2.0-r1.ebuild
new file mode 100644
index 000000000000..ed7a93b02e24
--- /dev/null
+++ b/dev-python/yapps/yapps-2.2.0-r1.ebuild
@@ -0,0 +1,28 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="5"
+PYTHON_COMPAT=( python{2_7,3_4,3_5,3_6} pypy )
+
+inherit distutils-r1
+
+MY_PN="Yapps"
+MY_P="${MY_PN}-${PV}"
+
+DESCRIPTION="An easy to use parser generator"
+HOMEPAGE="https://github.com/smurfix/yapps"
+SRC_URI="mirror://pypi/${MY_P:0:1}/${MY_PN}/${MY_P}.tar.gz"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+
+DEPEND="dev-python/setuptools[${PYTHON_USEDEP}]"
+RDEPEND=""
+
+S="${WORKDIR}/${MY_PN}-${PV}"
+
+src_prepare() {
+ epatch "${FILESDIR}/${PN}-Don-t-capture-sys.stderr-at-import-time.patch"
+ epatch "${FILESDIR}/${PN}-Convert-print-statements-to-python3-style-print-func.patch"
+}