mirror of
https://github.com/gentoo-mirror/gentoo.git
synced 2026-09-24 04:59:14 -07:00
app-portage/gentoolkit: Fix TypeError in setup.py with python3
Bug: https://bugs.gentoo.org/568906 Package-Manager: portage-2.2.26_p32
This commit is contained in:
29
app-portage/gentoolkit/files/0.3.1-setup.py-print.patch
Normal file
29
app-portage/gentoolkit/files/0.3.1-setup.py-print.patch
Normal file
@@ -0,0 +1,29 @@
|
||||
From 4e06e9f032ed187ce682434955778c3241854e26 Mon Sep 17 00:00:00 2001
|
||||
From: Mike Gilbert <floppym@gentoo.org>
|
||||
Date: Sun, 20 Dec 2015 15:19:06 -0500
|
||||
Subject: [PATCH] Remove useless print() in set_version
|
||||
|
||||
This was causing a TypeError in python3.
|
||||
|
||||
Bug: https://bugs.gentoo.org/568906
|
||||
---
|
||||
setup.py | 3 ---
|
||||
1 file changed, 3 deletions(-)
|
||||
|
||||
diff --git a/setup.py b/setup.py
|
||||
index b32b7d6..01e4b3e 100755
|
||||
--- a/setup.py
|
||||
+++ b/setup.py
|
||||
@@ -80,9 +80,6 @@ class set_version(core.Command):
|
||||
with io.open(f[0], 'r', 1, 'utf_8') as s:
|
||||
for line in s:
|
||||
newline = re.sub(pattern %f[1], '"%s"' % ver, line, 1)
|
||||
- if newline != line:
|
||||
- #log.info("%s: %s" % (f, newline))
|
||||
- print("%s: %s" % (f[0], newline.encode('utf_8').strip('\n')))
|
||||
updated_file.append(newline)
|
||||
with io.open(f[0], 'w', 1, 'utf_8') as s:
|
||||
s.writelines(updated_file)
|
||||
--
|
||||
2.6.4
|
||||
|
||||
@@ -7,7 +7,7 @@ EAPI="5"
|
||||
PYTHON_COMPAT=(python{2_7,3_3,3_4} pypy)
|
||||
PYTHON_REQ_USE="xml(+),threads(+)"
|
||||
|
||||
inherit distutils-r1
|
||||
inherit distutils-r1 eutils
|
||||
|
||||
DESCRIPTION="Collection of administration scripts for Gentoo"
|
||||
HOMEPAGE="https://www.gentoo.org/proj/en/portage/tools/index.xml"
|
||||
@@ -36,6 +36,7 @@ PATCHES=(
|
||||
)
|
||||
|
||||
python_prepare_all() {
|
||||
epatch "${FILESDIR}/0.3.1-setup.py-print.patch"
|
||||
python_setup
|
||||
echo VERSION="${PVR}" "${PYTHON}" setup.py set_version
|
||||
VERSION="${PVR}" "${PYTHON}" setup.py set_version
|
||||
|
||||
@@ -7,7 +7,7 @@ EAPI="5"
|
||||
PYTHON_COMPAT=(python{2_7,3_3,3_4,3_5} pypy)
|
||||
PYTHON_REQ_USE="xml(+),threads(+)"
|
||||
|
||||
inherit distutils-r1
|
||||
inherit distutils-r1 eutils
|
||||
|
||||
DESCRIPTION="Collection of administration scripts for Gentoo"
|
||||
HOMEPAGE="https://www.gentoo.org/proj/en/portage/tools/index.xml"
|
||||
@@ -28,6 +28,7 @@ RDEPEND="${DEPEND}
|
||||
sys-apps/grep"
|
||||
|
||||
python_prepare_all() {
|
||||
epatch "${FILESDIR}/0.3.1-setup.py-print.patch"
|
||||
python_setup
|
||||
echo VERSION="${PVR}" "${PYTHON}" setup.py set_version
|
||||
VERSION="${PVR}" "${PYTHON}" setup.py set_version
|
||||
|
||||
Reference in New Issue
Block a user