Description: Use 2to3 to port to Python3 Bug-Debian: https://bugs.debian.org/937512 Author: Andreas Tille Last-Update: 2025-01-08 Reviewed-By: Étienne Mollier --- pyqi.orig/doc/conf.py +++ pyqi/doc/conf.py @@ -40,8 +40,8 @@ master_doc = 'index' # General information about the project. -project = u'pyqi' -copyright = u'2013, The BiPy Development Team' +project = 'pyqi' +copyright = '2013, The BiPy Development Team' # The version info for the project you're documenting, acts as replacement for # |version| and |release|, also used in various other places throughout the @@ -181,8 +181,8 @@ # Grouping the document tree into LaTeX files. List of tuples # (source start file, target name, title, author, documentclass [howto/manual]). latex_documents = [ - ('index', 'pyqi.tex', u'pyqi Documentation', - u'The BiPy Development Team', 'manual'), + ('index', 'pyqi.tex', 'pyqi Documentation', + 'The BiPy Development Team', 'manual'), ] # The name of an image file (relative to this directory) to place at the top of @@ -211,8 +211,8 @@ # One entry per manual page. List of tuples # (source start file, name, description, authors, manual section). man_pages = [ - ('index', 'pyqi', u'pyqi Documentation', - [u'The BiPy Development Team'], 1) + ('index', 'pyqi', 'pyqi Documentation', + ['The BiPy Development Team'], 1) ] # If true, show URL addresses after external links. @@ -225,8 +225,8 @@ # (source start file, target name, title, author, # dir menu entry, description, category) texinfo_documents = [ - ('index', 'pyqi', u'pyqi Documentation', - u'The BiPy Development Team', 'pyqi', 'One line description of project.', + ('index', 'pyqi', 'pyqi Documentation', + 'The BiPy Development Team', 'pyqi', 'One line description of project.', 'Miscellaneous'), ] --- pyqi.orig/doc/tutorials/defining_new_commands.rst +++ pyqi/doc/tutorials/defining_new_commands.rst @@ -20,7 +20,7 @@ If you run this command locally, substituting your own name where applicable, you'll have a new file called ``sequence_collection_summarizer.py``, which will look roughly like the following:: - #!/usr/bin/env python + #!/usr/bin/python3 from __future__ import division __credits__ = ["Greg Caporaso"] @@ -117,7 +117,7 @@ The following illustrates a complete python file defining a new pyqi ``Command``:: - #!/usr/bin/env python + #!/usr/bin/python3 from __future__ import division __credits__ = ["Greg Caporaso"] @@ -180,11 +180,11 @@ >>> r {'max_length': 12, 'min_length': 6, 'num_seqs': 2} # Alternatively, you can access each value independently, as with any dictionary. - >>> print r['num_seqs'] + >>> print(r['num_seqs']) 2 - >>> print r['min_length'] + >>> print(r['min_length']) 6 - >>> print r['max_length'] + >>> print(r['max_length']) 12 # You can call this command again with different input. # For example, we can call the command again passing the --- pyqi.orig/doc/tutorials/defining_new_interfaces.rst +++ pyqi/doc/tutorials/defining_new_interfaces.rst @@ -24,7 +24,7 @@ The resulting file will look something like this:: - #!/usr/bin/env python + #!/usr/bin/python3 from __future__ import division __credits__ = ["Greg Caporaso"] @@ -281,7 +281,7 @@ At this stage we've fully configured our interface. The final interface configuration file should look like this:: - #!/usr/bin/env python + #!/usr/bin/python3 from __future__ import division __credits__ = ["Greg Caporaso"] --- pyqi.orig/pyqi/__init__.py +++ pyqi/pyqi/__init__.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/python3 #----------------------------------------------------------------------------- # Copyright (c) 2013, The BiPy Development Team. --- pyqi.orig/pyqi/commands/__init__.py +++ pyqi/pyqi/commands/__init__.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/python3 #----------------------------------------------------------------------------- # Copyright (c) 2013, The BiPy Development Team. --- pyqi.orig/pyqi/commands/code_header_generator.py +++ pyqi/pyqi/commands/code_header_generator.py @@ -1,5 +1,5 @@ -#!/usr/bin/env python -from __future__ import division +#!/usr/bin/python3 + #----------------------------------------------------------------------------- # Copyright (c) 2013, The BiPy Development Team. @@ -61,12 +61,12 @@ credits = [head['author']] if kwargs['credits'] is not None: credits.extend(kwargs['credits']) - credits = filter(lambda x: x is not None, credits) + credits = [x for x in credits if x is not None] f = lambda x: '"%s"' % x head['credits'] = ', '.join(map(f, credits)) header_lines = [] - header_lines.append("#!/usr/bin/env python") + header_lines.append("#!/usr/bin/python3") header_lines.append("from __future__ import division") header_lines.append("") --- pyqi.orig/pyqi/commands/make_bash_completion.py +++ pyqi/pyqi/commands/make_bash_completion.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/python3 #----------------------------------------------------------------------------- # Copyright (c) 2013, The BiPy Development Team. @@ -8,7 +8,7 @@ # The full license is in the file COPYING.txt, distributed with this software. #----------------------------------------------------------------------------- -from __future__ import division + __credits__ = ["Daniel McDonald", "Jai Ram Rideout", "Doug Wendel", "Greg Caporaso"] --- pyqi.orig/pyqi/commands/make_command.py +++ pyqi/pyqi/commands/make_command.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/python3 #----------------------------------------------------------------------------- # Copyright (c) 2013, The BiPy Development Team. --- pyqi.orig/pyqi/commands/make_optparse.py +++ pyqi/pyqi/commands/make_optparse.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/python3 #----------------------------------------------------------------------------- # Copyright (c) 2013, The BiPy Development Team. @@ -8,7 +8,7 @@ # The full license is in the file COPYING.txt, distributed with this software. #----------------------------------------------------------------------------- -from __future__ import division + from operator import attrgetter from pyqi.core.command import (Command, CommandIn, CommandOut, ParameterCollection) @@ -137,7 +137,7 @@ # construct inputs based off of CommandIns cmdin_formatted = [] - for cmdin in sorted(kwargs['command'].CommandIns.values(), + for cmdin in sorted(list(kwargs['command'].CommandIns.values()), key=attrgetter('Name')): if cmdin.Required: default_block = '' @@ -162,7 +162,7 @@ cmdin_formatted.append(input_format % fmt) cmdout_formatted = [] - for cmdin in sorted(kwargs['command'].CommandOuts.values(), + for cmdin in sorted(list(kwargs['command'].CommandOuts.values()), key=attrgetter('Name')): fmt = {'name':cmdin.Name} cmdout_formatted.append(output_format % fmt) --- pyqi.orig/pyqi/commands/make_release.py +++ pyqi/pyqi/commands/make_release.py @@ -1,5 +1,5 @@ -#!/usr/bin/env python -from __future__ import division +#!/usr/bin/python3 + #----------------------------------------------------------------------------- # Copyright (c) 2013, The BiPy Development Team. @@ -74,7 +74,7 @@ def _bump_version(self, version): try: - parts = map(int, version.split('.')) + parts = list(map(int, version.split('.'))) except ValueError: self._fail('Current version is not numeric') parts[-1] += 1 --- pyqi.orig/pyqi/commands/serve_html_interface.py +++ pyqi/pyqi/commands/serve_html_interface.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/python3 #----------------------------------------------------------------------------- # Copyright (c) 2013, The BiPy Development Team. @@ -8,7 +8,7 @@ # The full license is in the file COPYING.txt, distributed with this software. #----------------------------------------------------------------------------- -from __future__ import division + __credits__ = ["Evan Bolyen"] --- pyqi.orig/pyqi/core/__init__.py +++ pyqi/pyqi/core/__init__.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/python3 #----------------------------------------------------------------------------- # Copyright (c) 2013, The BiPy Development Team. --- pyqi.orig/pyqi/core/command.py +++ pyqi/pyqi/core/command.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/python3 #----------------------------------------------------------------------------- # Copyright (c) 2013, The BiPy Development Team. @@ -7,7 +7,7 @@ # # The full license is in the file COPYING.txt, distributed with this software. #----------------------------------------------------------------------------- -from __future__ import division + __credits__ = ["Greg Caporaso", "Daniel McDonald", "Doug Wendel", "Jai Ram Rideout"] @@ -162,7 +162,7 @@ self_str = str(self.__class__) # check required parameters - for p in self.CommandIns.values(): + for p in list(self.CommandIns.values()): if p.Required and p.Name not in kwargs: err_msg = 'Missing required CommandIn %s in %s' % (p.Name, self_str) @@ -187,7 +187,7 @@ """Validate the result from a ``Command.run``""" self_str = str(self.__class__) - for p in self.CommandOuts.values(): + for p in list(self.CommandOuts.values()): if p.Name not in result: err_msg = "CommandOut %s not in %s" % (p.Name, self_str) self._logger.fatal(err_msg) @@ -200,7 +200,7 @@ def _set_defaults(self, kwargs): """Set defaults for optional parameters""" - for p in self.CommandIns.values(): + for p in list(self.CommandIns.values()): if not p.Required and p.Name not in kwargs: kwargs[p.Name] = p.Default --- pyqi.orig/pyqi/core/container.py +++ pyqi/pyqi/core/container.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/python3 #----------------------------------------------------------------------------- # Copyright (c) 2013, The BiPy Development Team. --- pyqi.orig/pyqi/core/exception.py +++ pyqi/pyqi/core/exception.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/python3 #----------------------------------------------------------------------------- # Copyright (c) 2013, The BiPy Development Team. --- pyqi.orig/pyqi/core/factory.py +++ pyqi/pyqi/core/factory.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/python3 #----------------------------------------------------------------------------- # Copyright (c) 2013, The BiPy Development Team. --- pyqi.orig/pyqi/core/interface.py +++ pyqi/pyqi/core/interface.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/python3 #----------------------------------------------------------------------------- # Copyright (c) 2013, The BiPy Development Team. --- pyqi.orig/pyqi/core/interfaces/__init__.py +++ pyqi/pyqi/core/interfaces/__init__.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/python3 #----------------------------------------------------------------------------- # Copyright (c) 2013, The BiPy Development Team. --- pyqi.orig/pyqi/core/interfaces/html/__init__.py +++ pyqi/pyqi/core/interfaces/html/__init__.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/python3 #----------------------------------------------------------------------------- # Copyright (c) 2013, The BiPy Development Team. @@ -18,11 +18,10 @@ from pyqi.util import is_py2 if is_py2(): - from BaseHTTPServer import BaseHTTPRequestHandler, HTTPServer + from http.server import BaseHTTPRequestHandler, HTTPServer else: from http.server import BaseHTTPRequestHandler, HTTPServer -from cgi import parse_header, parse_multipart, parse_qs, FieldStorage from copy import copy from glob import glob from os.path import abspath, exists, isdir, isfile, split @@ -125,7 +124,7 @@ if self.Choices is None: raise IncompetentDeveloperError( "must supply a list of Choices for type '%s'" % self.type, self) - elif type(self.Choices) not in (types.TupleType, types.ListType): + elif type(self.Choices) not in (tuple, list): raise IncompetentDeveloperError( "choices must be a list of strings ('%s' supplied)" % str(type(self.Choices)).split("'")[1], self) @@ -513,7 +512,7 @@ def start_server(port, module): """Start a server for the HTMLInterface on the specified port""" interface_server = HTTPServer(("", port), get_http_handler(module)) - print("-- Starting server at http://localhost:%d --" % port) + print(("-- Starting server at http://localhost:%d --" % port)) print("To close the server, type 'ctrl-c' into this window.") try: interface_server.serve_forever() --- pyqi.orig/pyqi/core/interfaces/html/input_handler.py +++ pyqi/pyqi/core/interfaces/html/input_handler.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/python3 #----------------------------------------------------------------------------- --- pyqi.orig/pyqi/core/interfaces/html/output_handler.py +++ pyqi/pyqi/core/interfaces/html/output_handler.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/python3 #----------------------------------------------------------------------------- --- pyqi.orig/pyqi/core/interfaces/optparse/__init__.py +++ pyqi/pyqi/core/interfaces/optparse/__init__.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/python3 #----------------------------------------------------------------------------- # Copyright (c) 2013, The BiPy Development Team. --- pyqi.orig/pyqi/core/interfaces/optparse/input_handler.py +++ pyqi/pyqi/core/interfaces/optparse/input_handler.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/python3 """Command line interface input handlers --- pyqi.orig/pyqi/core/interfaces/optparse/output_handler.py +++ pyqi/pyqi/core/interfaces/optparse/output_handler.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/python3 """Command line interface output handlers --- pyqi.orig/pyqi/core/log.py +++ pyqi/pyqi/core/log.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/python3 #----------------------------------------------------------------------------- # Copyright (c) 2013, The BiPy Development Team. @@ -7,7 +7,7 @@ # # The full license is in the file COPYING.txt, distributed with this software. #----------------------------------------------------------------------------- -from __future__ import division + from sys import stderr from datetime import datetime --- pyqi.orig/pyqi/core/parallel.py +++ pyqi/pyqi/core/parallel.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/python3 """Manage IPython.parallel clusters in the notebook. @@ -73,7 +73,7 @@ def update_profiles(self): """List all profiles in the ipython_dir and cwd. """ - for path in [get_ipython_dir(), os.getcwdu()]: + for path in [get_ipython_dir(), os.getcwd()]: for profile in list_profiles_in(path): pd = self.get_profile_dir(profile, path) if profile not in self.profiles: @@ -94,7 +94,7 @@ def check_profile(self, profile): if profile not in self.profiles: - raise IOError(u'profile not found') + raise IOError('profile not found') def profile_info(self, profile): self.check_profile(profile) @@ -112,7 +112,7 @@ self.check_profile(profile) data = self.profiles[profile] if data['status'] == 'running': - raise ValueError(u'cluster already running') + raise ValueError('cluster already running') cl, esl, default_n = self.build_launchers(data['profile_dir']) n = n if n is not None else default_n @@ -154,7 +154,7 @@ self.check_profile(profile) data = self.profiles[profile] if data['status'] == 'stopped': - raise ValueError(u'cluster not running') + raise ValueError('cluster not running') data = self.profiles[profile] cl = data['controller_launcher'] esl = data['engine_set_launcher'] @@ -172,7 +172,7 @@ return result def stop_all_clusters(self): - for p in self.profiles.keys(): + for p in list(self.profiles.keys()): self.stop_cluster(p) --- pyqi.orig/pyqi/functional.py +++ pyqi/pyqi/functional.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/python3 from pyqi.core.interface import Interface, InterfaceOption from testing import FilterSamples, FilterObservations @@ -7,6 +7,7 @@ from pyqi.core.factory import general_factory from biom.table import Table as BIOMTable from biom.parse import parse_biom_table +from functools import reduce class Functional(Interface): @@ -67,11 +68,11 @@ open('/Users/mcdonadt/ResearchWork/software/biom-format/examples/rich_sparse_otu_table.biom')) res = g(f("asdasdasd", seqs_per_sample=3), seqs_per_observation=1) -res2 = map(lambda x: f(x, seqs_per_sample=3), [t1, t2, t3]) +res2 = [f(x, seqs_per_sample=3) for x in [t1, t2, t3]] res3 = reduce(lambda x, y: x.merge(f(y, seqs_per_sample=3)), [t1, t2, t3]) -print res +print(res) for i in res2: - print i -print "***" -print res3 + print(i) +print("***") +print(res3) --- pyqi.orig/pyqi/interfaces/__init__.py +++ pyqi/pyqi/interfaces/__init__.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/python3 #----------------------------------------------------------------------------- # Copyright (c) 2013, The BiPy Development Team. @@ -7,7 +7,7 @@ # # The full license is in the file COPYING.txt, distributed with this software. #----------------------------------------------------------------------------- -from __future__ import division + __credits__ = ["Greg Caporaso", "Daniel McDonald", "Doug Wendel", "Jai Ram Rideout"] --- pyqi.orig/pyqi/interfaces/html/config/make_bash_completion.py +++ pyqi/pyqi/interfaces/html/config/make_bash_completion.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/python3 #----------------------------------------------------------------------------- # Copyright (c) 2013, The BiPy Development Team. --- pyqi.orig/pyqi/interfaces/html/config/make_command.py +++ pyqi/pyqi/interfaces/html/config/make_command.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/python3 #----------------------------------------------------------------------------- # Copyright (c) 2013, The BiPy Development Team. --- pyqi.orig/pyqi/interfaces/html/config/make_optparse.py +++ pyqi/pyqi/interfaces/html/config/make_optparse.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/python3 #----------------------------------------------------------------------------- # Copyright (c) 2013, The BiPy Development Team. --- pyqi.orig/pyqi/interfaces/optparse/__init__.py +++ pyqi/pyqi/interfaces/optparse/__init__.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/python3 #----------------------------------------------------------------------------- # Copyright (c) 2013, The BiPy Development Team. @@ -7,7 +7,7 @@ # # The full license is in the file COPYING.txt, distributed with this software. #----------------------------------------------------------------------------- -from __future__ import division + __credits__ = ["Greg Caporaso", "Daniel McDonald", "Doug Wendel", "Jai Ram Rideout"] --- pyqi.orig/pyqi/interfaces/optparse/config/__init__.py +++ pyqi/pyqi/interfaces/optparse/config/__init__.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/python3 #----------------------------------------------------------------------------- # Copyright (c) 2013, The BiPy Development Team. --- pyqi.orig/pyqi/interfaces/optparse/config/make_bash_completion.py +++ pyqi/pyqi/interfaces/optparse/config/make_bash_completion.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/python3 #----------------------------------------------------------------------------- # Copyright (c) 2013, The BiPy Development Team. --- pyqi.orig/pyqi/interfaces/optparse/config/make_command.py +++ pyqi/pyqi/interfaces/optparse/config/make_command.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/python3 #----------------------------------------------------------------------------- # Copyright (c) 2013, The BiPy Development Team. --- pyqi.orig/pyqi/interfaces/optparse/config/make_optparse.py +++ pyqi/pyqi/interfaces/optparse/config/make_optparse.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/python3 #----------------------------------------------------------------------------- # Copyright (c) 2013, The BiPy Development Team. --- pyqi.orig/pyqi/interfaces/optparse/config/make_release.py +++ pyqi/pyqi/interfaces/optparse/config/make_release.py @@ -1,5 +1,5 @@ -#!/usr/bin/env python -from __future__ import division +#!/usr/bin/python3 + __credits__ = ["Daniel McDonald"] --- pyqi.orig/pyqi/interfaces/optparse/config/serve_html_interface.py +++ pyqi/pyqi/interfaces/optparse/config/serve_html_interface.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/python3 #----------------------------------------------------------------------------- # Copyright (c) 2013, The BiPy Development Team. --- pyqi.orig/pyqi/interfaces/optparse/input_handler.py +++ pyqi/pyqi/interfaces/optparse/input_handler.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/python3 #----------------------------------------------------------------------------- # Copyright (c) 2013, The BiPy Development Team. @@ -7,7 +7,7 @@ # # The full license is in the file COPYING.txt, distributed with this software. #----------------------------------------------------------------------------- -from __future__ import division + __credits__ = ["Greg Caporaso", "Daniel McDonald", "Doug Wendel", "Jai Ram Rideout"] --- pyqi.orig/pyqi/interfaces/optparse/output_handler.py +++ pyqi/pyqi/interfaces/optparse/output_handler.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/python3 #----------------------------------------------------------------------------- # Copyright (c) 2013, The BiPy Development Team. @@ -7,7 +7,7 @@ # # The full license is in the file COPYING.txt, distributed with this software. #----------------------------------------------------------------------------- -from __future__ import division + __credits__ = ["Greg Caporaso", "Daniel McDonald", "Doug Wendel", "Jai Ram Rideout"] --- pyqi.orig/pyqi/util.py +++ pyqi/pyqi/util.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/python3 #----------------------------------------------------------------------------- # Copyright (c) 2013, The BiPy Development Team. @@ -88,7 +88,7 @@ Use like this (put in the script you want to deprecate): - #!/usr/bin/env python + #!/usr/bin/python3 import sys from pyqi.util import old_to_new_command --- pyqi.orig/scripts/bar +++ pyqi/scripts/bar @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/python3 __author__ = "b" __copyright__ = "q" --- pyqi.orig/scripts/direct_make_command.py +++ pyqi/scripts/direct_make_command.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/python3 #----------------------------------------------------------------------------- # Copyright (c) 2013, The BiPy Development Team. --- pyqi.orig/scripts/foo +++ pyqi/scripts/foo @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/python3 from __future__ import division __author__ = "b" --- pyqi.orig/scripts/optparse +++ pyqi/scripts/optparse @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/python3 #----------------------------------------------------------------------------- # Copyright (c) 2013, The BiPy Development Team. --- pyqi.orig/scripts/pyqi +++ pyqi/scripts/pyqi @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/python3 #----------------------------------------------------------------------------- # Copyright (c) 2013, The BiPy Development Team. --- pyqi.orig/scripts/qiime +++ pyqi/scripts/qiime @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/python3 #----------------------------------------------------------------------------- # Copyright (c) 2013, The BiPy Development Team. --- pyqi.orig/scripts/test_bar +++ pyqi/scripts/test_bar @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/python3 __author__ = "b" __copyright__ = "q" --- pyqi.orig/scripts/testing +++ pyqi/scripts/testing @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/python3 from pyqi.core.interfaces.optparse import (OptparseOption, OptparseUsageExample, --- pyqi.orig/setup.py +++ pyqi/setup.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/python3 #----------------------------------------------------------------------------- # Copyright (c) 2013, The BiPy Development Team. @@ -32,8 +32,11 @@ Topic :: Software Development :: Libraries :: Application Frameworks Topic :: Software Development :: User Interfaces Programming Language :: Python - Programming Language :: Python :: 2.7 - Programming Language :: Python :: 3.3 + Programming Language :: Python :: 3.9 + Programming Language :: Python :: 3.10 + Programming Language :: Python :: 3.11 + Programming Language :: Python :: 3.12 + Programming Language :: Python :: 3.13 Programming Language :: Python :: Implementation :: CPython Operating System :: OS Independent Operating System :: POSIX @@ -43,8 +46,8 @@ # Verify Python version ver = '.'.join(map(str, [sys.version_info.major, sys.version_info.minor])) -if ver not in ['2.7', '3.3']: - sys.stderr.write("Only Python 2.7 and 3.3 are supported.") +if ver not in ['3.9', '3.10', '3.11', '3.12', '3.13']: + sys.stderr.write("Only Python 3.9 to 3.13 are supported.") sys.exit(1) long_description = """pyqi (canonically pronounced pie chee) is a Python framework designed to support wrapping general commands in multiple types of interfaces, including at the command line, HTML, and API levels."""