[arch-commits] Commit in pidgin-talkfilters/trunk (PKGBUILD python3.patch)
Connor Behan
cbehan at archlinux.org
Fri Jan 3 04:37:09 UTC 2020
Date: Friday, January 3, 2020 @ 04:37:08
Author: cbehan
Revision: 546860
upgpkg: pidgin-talkfilters 2.7.0-5: Port build script to python 3
Added:
pidgin-talkfilters/trunk/python3.patch
Modified:
pidgin-talkfilters/trunk/PKGBUILD
---------------+
PKGBUILD | 12 -
python3.patch | 423 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 430 insertions(+), 5 deletions(-)
Modified: PKGBUILD
===================================================================
--- PKGBUILD 2020-01-03 04:33:10 UTC (rev 546859)
+++ PKGBUILD 2020-01-03 04:37:08 UTC (rev 546860)
@@ -2,23 +2,25 @@
pkgname=pidgin-talkfilters
pkgver=2.7.0
-pkgrel=4
+pkgrel=5
pkgdesc="Implements GNU talkfilters in pidgin chats"
arch=('x86_64')
url="https://bitbucket.org/rekkanoryo/purple-plugin-pack"
license=('GPL')
depends=('libpurple' 'talkfilters')
-makedepends=('intltool' 'gettext' 'python2' 'pidgin')
-source=(https://bitbucket.org/rekkanoryo/purple-plugin-pack/downloads/purple-plugin-pack-$pkgver.tar.bz2)
-sha256sums=('2bbcf5e778a33968ba7f2864d2a6cb526a8984be3e4151642a583eee8eafb03c')
+makedepends=('intltool' 'gettext' 'python' 'pidgin')
+source=(https://bitbucket.org/rekkanoryo/purple-plugin-pack/downloads/purple-plugin-pack-$pkgver.tar.bz2 python3.patch)
+sha256sums=('2bbcf5e778a33968ba7f2864d2a6cb526a8984be3e4151642a583eee8eafb03c'
+ '842292c95e61fb5a45b30eaed490d29ee67f725b46301e3590feafeb10014980')
build() {
cd "$srcdir"/purple-plugin-pack-$pkgver
+ patch -Np1 -i ../python3.patch
sed -i -e 's|GETTEXT_PACKAGE=plugin_pack|GETTEXT_PACKAGE=pidgin_talkfilters|'\
configure.ac
autoreconf -vfi
- PYTHON=/usr/bin/python2 \
+ PYTHON=/usr/bin/python \
./configure --prefix=/usr --with-plugins=talkfilters
make
Added: python3.patch
===================================================================
--- python3.patch (rev 0)
+++ python3.patch 2020-01-03 04:37:08 UTC (rev 546860)
@@ -0,0 +1,423 @@
+diff -rudp purple-plugin-pack-2.7.0.orig/plugin_pack.py purple-plugin-pack-2.7.0/plugin_pack.py
+--- purple-plugin-pack-2.7.0.orig/plugin_pack.py 2020-01-02 23:03:39.000000000 -0500
++++ purple-plugin-pack-2.7.0/plugin_pack.py 2020-01-02 23:40:10.000000000 -0500
+@@ -32,7 +32,7 @@ Flags:
+ Commands:
+ """
+
+-import ConfigParser
++import configparser
+ import getopt
+ import glob
+ import os.path
+@@ -42,7 +42,7 @@ import sys
+ webpage = 'http://plugins.guifications.org/'
+
+ def printerr(msg):
+- print >> sys.stderr, msg
++ print(msg, file = sys.stderr)
+
+ class Plugin:
+ name = ''
+@@ -77,9 +77,9 @@ class Plugin:
+
+ def __str__(self):
+ output = 'name: %s\n' % self.name
+- output += 'authors: %s\n' % string.join(self.authors, ', ')
++ output += 'authors: %s\n' % ', '.join(self.authors)
+ output += 'type: %s\n' % self.type
+- output += 'depends: %s\n' % string.join(self.depends, ' ')
++ output += 'depends: %s\n' % ' '.join(self.depends)
+ output += 'provides: %s\n' % self.provides
+ output += 'directory: %s\n' % self.directory
+ output += 'summary: %s\n' % self.summary
+@@ -102,11 +102,11 @@ class PluginPack:
+ depends = None
+
+ for file in glob.glob('*/plugins.cfg'):
+- parser = ConfigParser.ConfigParser()
++ parser = configparser.ConfigParser()
+
+ try:
+ parser.read(file)
+- except ConfigParser.ParsingError, msg:
++ except configparser.ParsingError as msg:
+ printerr('Failed to parse \'%s\':\n%s' % (file, msg))
+ continue
+
+@@ -134,7 +134,7 @@ class PluginPack:
+ if plugin.type == type:
+ list.append(plugin)
+
+- list.sort()
++ #list.sort()
+
+ return list
+
+@@ -147,7 +147,7 @@ class PluginPack:
+ if dep in plugin.depends:
+ list.append(plugin)
+
+- list.sort()
++ #list.sort()
+
+ return list
+
+@@ -157,7 +157,7 @@ class PluginPack:
+ for plugin in list:
+ names.append(plugin.name)
+
+- print string.join(names, ',')
++ print(','.join(names))
+
+ def default_plugins(self):
+ return self.list_type('default')
+@@ -182,7 +182,7 @@ class PluginPack:
+ for name in self.plugins.keys():
+ dirs[self.plugins[name].directory] = 1
+
+- dirs = dirs.keys()
++ dirs = list(dirs.keys())
+ dirs.sort()
+
+ return dirs
+@@ -191,26 +191,26 @@ class PluginPack:
+ """Displays information about other commands"""
+ try:
+ cmd = self.commands[args[0]]
+- print cmd.__doc__
++ print(cmd.__doc__)
+ except KeyError:
+- print 'command \'%s\' was not found' % args[0]
++ print('command \'%s\' was not found' % args[0])
+ except IndexError:
+- print '%s' % (self.help.__doc__)
+- print
+- print 'help usage:'
+- print ' help <command>'
+- print
+- print 'Available commands:'
++ print('%s' % (self.help.__doc__))
++ print()
++ print('help usage:')
++ print(' help <command>')
++ print()
++ print('Available commands:')
+
+- cmds = self.commands.keys()
++ cmds = list(self.commands.keys())
+ cmds.remove('help')
+ cmds.sort()
+- print ' %s' % (string.join(cmds, ' '))
++ print(' %s' % (' '.join(cmds)))
+ commands['help'] = help
+
+ def dist_dirs(self, args):
+ """Displays a list of all plugin directories to included in the distribution"""
+- print string.join(self.unique_dirs(), ' ')
++ print(' '.join(self.unique_dirs()))
+ commands['dist_dirs'] = dist_dirs
+
+ def build_dirs(self, args):
+@@ -307,7 +307,7 @@ class PluginPack:
+
+ output.sort()
+
+- print "%s" % (string.join(output, ','))
++ print("%s" % (','.join(output)))
+ commands['build_dirs'] = build_dirs
+
+ def list_plugins(self, args):
+@@ -345,21 +345,21 @@ class PluginPack:
+
+ data[plugin.provides] = [type, ui, plugin.name, plugin.provides, plugin.summary]
+
+- print 'Type=Default/Incomplete/Abusive'
+- print '| UI=Finch/Pidgin/puRple/Unknown'
+- print '|/ Name%s Provides%s Summary' % (' ' * (widths[0] - 4), ' ' * (widths[1] - 8))
+- print '++-%s-%s-%s' % ('=' * (widths[0]), '=' * (widths[1]), '=' * (widths[2]))
++ print('Type=Default/Incomplete/Abusive')
++ print('| UI=Finch/Pidgin/puRple/Unknown')
++ print('|/ Name%s Provides%s Summary' % (' ' * (widths[0] - 4), ' ' * (widths[1] - 8)))
++ print('++-%s-%s-%s' % ('=' * (widths[0]), '=' * (widths[1]), '=' * (widths[2])))
+
+ # create the format var
+ fmt = '%%s%%s %%-%ds %%-%ds %%s' % (widths[0], widths[1]) #, widths[2])
+
+ # now loop through the list again, with everything formatted
+- list = data.keys()
+- list.sort()
++ mylist = list(data.keys())
++ mylist.sort()
+
+- for p in list:
++ for p in mylist:
+ d = data[p]
+- print fmt % (d[0], d[1], d[2], d[3], d[4])
++ print(fmt % (d[0], d[1], d[2], d[3], d[4]))
+ commands['list'] = list_plugins
+
+ def config_file(self, args):
+@@ -367,32 +367,32 @@ class PluginPack:
+ uniqdirs = self.unique_dirs()
+
+ # add our --with-plugins option
+- print 'AC_ARG_WITH(plugins,'
+- print ' AC_HELP_STRING([--with-plugins], [what plugins to build]),'
+- print ' ,with_plugins=all)'
+- print 'if test -z $with_plugins ; then'
+- print '\twith_plugins=all'
+- print 'fi'
++ print('AC_ARG_WITH(plugins,')
++ print(' AC_HELP_STRING([--with-plugins], [what plugins to build]),')
++ print(' ,with_plugins=all)')
++ print('if test -z $with_plugins ; then')
++ print('\twith_plugins=all')
++ print('fi')
+
+ # determine and add our output files
+- print 'PP_DIST_DIRS="%s"' % (string.join(uniqdirs, ' '))
+- print 'AC_SUBST(PP_DIST_DIRS)'
+- print
+- print 'AC_CONFIG_FILES(['
++ print('PP_DIST_DIRS="%s"' % (' '.join(uniqdirs)))
++ print('AC_SUBST(PP_DIST_DIRS)')
++ print()
++ print('AC_CONFIG_FILES([')
+ for dir in uniqdirs:
+- print '\t%s/Makefile' % (dir)
+- print '])'
+- print
++ print('\t%s/Makefile' % (dir))
++ print('])')
++ print()
+
+ # setup a second call to determine the plugins to be built
+- print 'PP_BUILD=`$PYTHON $srcdir/plugin_pack.py build_dirs $DEPENDENCIES $with_plugins`'
+- print
+- print 'PP_BUILD_DIRS=`echo $PP_BUILD | sed \'s/,/\ /g\'`'
+- print 'AC_SUBST(PP_BUILD_DIRS)'
+- print
+- print 'PP_PURPLE_BUILD="$PYTHON $srcdir/plugin_pack.py -p show_names $PP_BUILD"'
+- print 'PP_PIDGIN_BUILD="$PYTHON $srcdir/plugin_pack.py -P show_names $PP_BUILD"'
+- print 'PP_FINCH_BUILD="$PYTHON $srcdir/plugin_pack.py -f show_names $PP_BUILD"'
++ print('PP_BUILD=`$PYTHON $srcdir/plugin_pack.py build_dirs $DEPENDENCIES $with_plugins`')
++ print()
++ print('PP_BUILD_DIRS=`echo $PP_BUILD | sed \'s/,/\ /g\'`')
++ print('AC_SUBST(PP_BUILD_DIRS)')
++ print()
++ print('PP_PURPLE_BUILD="$PYTHON $srcdir/plugin_pack.py -p show_names $PP_BUILD"')
++ print('PP_PIDGIN_BUILD="$PYTHON $srcdir/plugin_pack.py -P show_names $PP_BUILD"')
++ print('PP_FINCH_BUILD="$PYTHON $srcdir/plugin_pack.py -f show_names $PP_BUILD"')
+ commands['config_file'] = config_file
+
+ def dependency_graph(self, args):
+@@ -407,40 +407,40 @@ class PluginPack:
+ for plugin in list:
+ node, label = node_label(plugin)
+
+- print '\t%s[label="%s"];' % (node, label)
++ print('\t%s[label="%s"];' % (node, label))
+
+- print 'digraph {'
+- print '\tlabel="Dependency Graph";'
+- print '\tlabelloc="t";'
+- print '\tsplines=TRUE;'
+- print '\toverlap=FALSE;'
+- print
+- print '\tnode[fontname="sans", fontsize="8", style="filled"];'
+- print
++ print('digraph {')
++ print('\tlabel="Dependency Graph";')
++ print('\tlabelloc="t";')
++ print('\tsplines=TRUE;')
++ print('\toverlap=FALSE;')
++ print()
++ print('\tnode[fontname="sans", fontsize="8", style="filled"];')
++ print()
+
+ # run through the default plugins
+- print '\t/* default plugins */'
+- print '\tnode[fillcolor="palegreen",shape="tab"];'
++ print('\t/* default plugins */')
++ print('\tnode[fillcolor="palegreen",shape="tab"];')
+ print_plugins(self.default_plugins())
+- print
++ print()
+
+ # run through the incomplete plugins
+- print '\t/* incomplete plugins */'
+- print '\tnode[fillcolor="lightyellow1",shape="note"];'
++ print('\t/* incomplete plugins */')
++ print('\tnode[fillcolor="lightyellow1",shape="note"];')
+ print_plugins(self.incomplete_plugins())
+- print
++ print()
+
+ # run through the abusive plugins
+- print '\t/* abusive plugins */'
+- print '\tnode[fillcolor="lightpink",shape="octagon"];'
++ print('\t/* abusive plugins */')
++ print('\tnode[fillcolor="lightpink",shape="octagon"];')
+ print_plugins(self.abusive_plugins())
+- print
++ print()
+
+ # run through again, this time showing the relations
+- print '\t/* dependencies'
+- print '\t * exteranl ones that don\'t have nodes get colored to the following'
+- print '\t */'
+- print '\tnode[fillcolor="powderblue", shape="egg"];'
++ print('\t/* dependencies')
++ print('\t * exteranl ones that don\'t have nodes get colored to the following')
++ print('\t */')
++ print('\tnode[fillcolor="powderblue", shape="egg"];')
+
+ for name in self.plugins.keys():
+ plugin = self.plugins[name]
+@@ -449,30 +449,30 @@ class PluginPack:
+
+ for dep in plugin.depends:
+ dep = dep.replace('-', '_')
+- print '\t%s -> %s;' % (node, dep)
++ print('\t%s -> %s;' % (node, dep))
+
+- print '}'
++ print('}')
+ commands['dependency_graph'] = dependency_graph
+
+ def debian_description(self, args):
+ """Outputs the description for the Debian packages"""
+- print 'Description: %d useful plugins for Pidgin, Finch, and Purple' % len(self.plugins)
+- print ' The Plugin Pack is a collection of many simple-yet-useful plugins for Pidgin,'
+- print ' Finch, and Purple. You will find a summary of each plugin below. For more'
+- print ' about an individual plugin, please see %s' % webpage
+- print ' .'
+- print ' Note: not all %d of these plugins are currently usable' % len(self.plugins)
++ print('Description: %d useful plugins for Pidgin, Finch, and Purple' % len(self.plugins))
++ print(' The Plugin Pack is a collection of many simple-yet-useful plugins for Pidgin,')
++ print(' Finch, and Purple. You will find a summary of each plugin below. For more')
++ print(' about an individual plugin, please see %s' % webpage)
++ print(' .')
++ print(' Note: not all %d of these plugins are currently usable' % len(self.plugins))
+
+- list = self.plugins.keys()
+- list.sort()
+- for key in list:
++ mylist = list(self.plugins.keys())
++ mylist.sort()
++ for key in mylist:
+ plugin = self.plugins[key]
+- print ' .'
+- print ' %s: %s' % (plugin.name, plugin.summary)
++ print(' .')
++ print(' %s: %s' % (plugin.name, plugin.summary))
+
+- print ' .'
+- print ' .'
+- print ' Homepage: %s' % webpage
++ print(' .')
++ print(' .')
++ print(' Homepage: %s' % webpage)
+ commands['debian_description'] = debian_description
+
+ def show_names(self, args):
+@@ -484,7 +484,7 @@ class PluginPack:
+
+ provides = args[0].split(',')
+ if len(provides) == 0:
+- print "none"
++ print("none")
+
+ line = " "
+
+@@ -495,24 +495,24 @@ class PluginPack:
+ name = self.plugins[provide].name
+
+ if len(line) + len(name) + 2 > 75:
+- print line.rstrip(',')
++ print(line.rstrip(','))
+ line = ' '
+
+ line += ' %s,' % name
+
+ if len(line) > 1:
+- print line.rstrip(',')
++ print(line.rstrip(','))
+ commands['show_names'] = show_names
+
+ def info(self, args):
+ """Displays all information about the given plugins"""
+ for p in args:
+ try:
+- print self.plugins[p].__str__().strip()
++ print(self.plugins[p].__str__().strip())
+ except KeyError:
+- print 'Failed to find a plugin that provides \'%s\'' % (p)
++ print('Failed to find a plugin that provides \'%s\'' % (p))
+
+- print
++ print()
+ commands['info'] = info
+
+ def stats(self, args):
+@@ -530,31 +530,31 @@ class PluginPack:
+ def value(val):
+ return "%3d (%6.2f%%)" % (val, (float(val) / float(counts['total'])) * 100.0)
+
+- print "Purple Plugin Pack Stats"
+- print ""
+- print "%d plugins in total" % (counts['total'])
+- print
+- print "Status:"
+- print " complete: %s" % (value(counts['default']))
+- print " incomplete: %s" % (value(counts['incomplete']))
+- print " abusive: %s" % (value(counts['abusive']))
+- print ""
+- print "Type:"
+- print " purple: %s" % (value(counts['purple']))
+- print " finch: %s" % (value(counts['finch']))
+- print " pidgin: %s" % (value(counts['pidgin']))
++ print("Purple Plugin Pack Stats")
++ print("")
++ print("%d plugins in total" % (counts['total']))
++ print()
++ print("Status:")
++ print(" complete: %s" % (value(counts['default'])))
++ print(" incomplete: %s" % (value(counts['incomplete'])))
++ print(" abusive: %s" % (value(counts['abusive'])))
++ print("")
++ print("Type:")
++ print(" purple: %s" % (value(counts['purple'])))
++ print(" finch: %s" % (value(counts['finch'])))
++ print(" pidgin: %s" % (value(counts['pidgin'])))
+ commands['stats'] = stats
+
+ def show_usage(pp, exitcode):
+- print __doc__
++ print(__doc__)
+
+- cmds = pp.commands.keys()
++ cmds = list(pp.commands.keys())
+ cmds.sort()
+
+ for cmd in cmds:
+- print " %-20s %s" % (cmd, pp.commands[cmd].__doc__)
++ print(" %-20s %s" % (cmd, pp.commands[cmd].__doc__))
+
+- print ""
++ print("")
+
+ sys.exit(exitcode)
+
+@@ -569,8 +569,8 @@ def main():
+ shortopts = 'adfiPp'
+
+ opts, args = getopt.getopt(sys.argv[1:], shortopts)
+- except getopt.error, msg:
+- print msg
++ except getopt.error as msg:
++ print(msg)
+ show_usage(pp, 1)
+
+ for o, a in opts:
More information about the arch-commits
mailing list