Debian Codegraph @

debian/patches/2to3.patch

raw symbols SCIP
1 Description: Use 2to3 to port to Python3
2 Bug-Debian: https://bugs.debian.org/937512
3 Author: Andreas Tille <[email protected]>
4 Last-Update: 2025-01-08
5 Reviewed-By: Étienne Mollier <[email protected]>
6
7 --- pyqi.orig/doc/conf.py
8 +++ pyqi/doc/conf.py
9 @@ -40,8 +40,8 @@
10 master_doc = 'index'
11
12 # General information about the project.
13 -project = u'pyqi'
14 -copyright = u'2013, The BiPy Development Team'
15 +project = 'pyqi'
16 +copyright = '2013, The BiPy Development Team'
17
18 # The version info for the project you're documenting, acts as replacement for
19 # |version| and |release|, also used in various other places throughout the
20 @@ -181,8 +181,8 @@
21 # Grouping the document tree into LaTeX files. List of tuples
22 # (source start file, target name, title, author, documentclass [howto/manual]).
23 latex_documents = [
24 - ('index', 'pyqi.tex', u'pyqi Documentation',
25 - u'The BiPy Development Team', 'manual'),
26 + ('index', 'pyqi.tex', 'pyqi Documentation',
27 + 'The BiPy Development Team', 'manual'),
28 ]
29
30 # The name of an image file (relative to this directory) to place at the top of
31 @@ -211,8 +211,8 @@
32 # One entry per manual page. List of tuples
33 # (source start file, name, description, authors, manual section).
34 man_pages = [
35 - ('index', 'pyqi', u'pyqi Documentation',
36 - [u'The BiPy Development Team'], 1)
37 + ('index', 'pyqi', 'pyqi Documentation',
38 + ['The BiPy Development Team'], 1)
39 ]
40
41 # If true, show URL addresses after external links.
42 @@ -225,8 +225,8 @@
43 # (source start file, target name, title, author,
44 # dir menu entry, description, category)
45 texinfo_documents = [
46 - ('index', 'pyqi', u'pyqi Documentation',
47 - u'The BiPy Development Team', 'pyqi', 'One line description of project.',
48 + ('index', 'pyqi', 'pyqi Documentation',
49 + 'The BiPy Development Team', 'pyqi', 'One line description of project.',
50 'Miscellaneous'),
51 ]
52
53 --- pyqi.orig/doc/tutorials/defining_new_commands.rst
54 +++ pyqi/doc/tutorials/defining_new_commands.rst
55 @@ -20,7 +20,7 @@
56
57 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::
58
59 - #!/usr/bin/env python
60 + #!/usr/bin/python3
61 from __future__ import division
62
63 __credits__ = ["Greg Caporaso"]
64 @@ -117,7 +117,7 @@
65
66 The following illustrates a complete python file defining a new pyqi ``Command``::
67
68 - #!/usr/bin/env python
69 + #!/usr/bin/python3
70 from __future__ import division
71
72 __credits__ = ["Greg Caporaso"]
73 @@ -180,11 +180,11 @@
74 >>> r
75 {'max_length': 12, 'min_length': 6, 'num_seqs': 2}
76 # Alternatively, you can access each value independently, as with any dictionary.
77 - >>> print r['num_seqs']
78 + >>> print(r['num_seqs'])
79 2
80 - >>> print r['min_length']
81 + >>> print(r['min_length'])
82 6
83 - >>> print r['max_length']
84 + >>> print(r['max_length'])
85 12
86 # You can call this command again with different input.
87 # For example, we can call the command again passing the
88 --- pyqi.orig/doc/tutorials/defining_new_interfaces.rst
89 +++ pyqi/doc/tutorials/defining_new_interfaces.rst
90 @@ -24,7 +24,7 @@
91
92 The resulting file will look something like this::
93
94 - #!/usr/bin/env python
95 + #!/usr/bin/python3
96 from __future__ import division
97
98 __credits__ = ["Greg Caporaso"]
99 @@ -281,7 +281,7 @@
100
101 At this stage we've fully configured our interface. The final interface configuration file should look like this::
102
103 - #!/usr/bin/env python
104 + #!/usr/bin/python3
105 from __future__ import division
106
107 __credits__ = ["Greg Caporaso"]
108 --- pyqi.orig/pyqi/__init__.py
109 +++ pyqi/pyqi/__init__.py
110 @@ -1,4 +1,4 @@
111 -#!/usr/bin/env python
112 +#!/usr/bin/python3
113
114 #-----------------------------------------------------------------------------
115 # Copyright (c) 2013, The BiPy Development Team.
116 --- pyqi.orig/pyqi/commands/__init__.py
117 +++ pyqi/pyqi/commands/__init__.py
118 @@ -1,4 +1,4 @@
119 -#!/usr/bin/env python
120 +#!/usr/bin/python3
121
122 #-----------------------------------------------------------------------------
123 # Copyright (c) 2013, The BiPy Development Team.
124 --- pyqi.orig/pyqi/commands/code_header_generator.py
125 +++ pyqi/pyqi/commands/code_header_generator.py
126 @@ -1,5 +1,5 @@
127 -#!/usr/bin/env python
128 -from __future__ import division
129 +#!/usr/bin/python3
130 +
131
132 #-----------------------------------------------------------------------------
133 # Copyright (c) 2013, The BiPy Development Team.
134 @@ -61,12 +61,12 @@
135 credits = [head['author']]
136 if kwargs['credits'] is not None:
137 credits.extend(kwargs['credits'])
138 - credits = filter(lambda x: x is not None, credits)
139 + credits = [x for x in credits if x is not None]
140 f = lambda x: '"%s"' % x
141 head['credits'] = ', '.join(map(f, credits))
142
143 header_lines = []
144 - header_lines.append("#!/usr/bin/env python")
145 + header_lines.append("#!/usr/bin/python3")
146 header_lines.append("from __future__ import division")
147 header_lines.append("")
148
149 --- pyqi.orig/pyqi/commands/make_bash_completion.py
150 +++ pyqi/pyqi/commands/make_bash_completion.py
151 @@ -1,4 +1,4 @@
152 -#!/usr/bin/env python
153 +#!/usr/bin/python3
154
155 #-----------------------------------------------------------------------------
156 # Copyright (c) 2013, The BiPy Development Team.
157 @@ -8,7 +8,7 @@
158 # The full license is in the file COPYING.txt, distributed with this software.
159 #-----------------------------------------------------------------------------
160
161 -from __future__ import division
162 +
163
164 __credits__ = ["Daniel McDonald", "Jai Ram Rideout", "Doug Wendel",
165 "Greg Caporaso"]
166 --- pyqi.orig/pyqi/commands/make_command.py
167 +++ pyqi/pyqi/commands/make_command.py
168 @@ -1,4 +1,4 @@
169 -#!/usr/bin/env python
170 +#!/usr/bin/python3
171
172 #-----------------------------------------------------------------------------
173 # Copyright (c) 2013, The BiPy Development Team.
174 --- pyqi.orig/pyqi/commands/make_optparse.py
175 +++ pyqi/pyqi/commands/make_optparse.py
176 @@ -1,4 +1,4 @@
177 -#!/usr/bin/env python
178 +#!/usr/bin/python3
179
180 #-----------------------------------------------------------------------------
181 # Copyright (c) 2013, The BiPy Development Team.
182 @@ -8,7 +8,7 @@
183 # The full license is in the file COPYING.txt, distributed with this software.
184 #-----------------------------------------------------------------------------
185
186 -from __future__ import division
187 +
188 from operator import attrgetter
189 from pyqi.core.command import (Command, CommandIn, CommandOut,
190 ParameterCollection)
191 @@ -137,7 +137,7 @@
192
193 # construct inputs based off of CommandIns
194 cmdin_formatted = []
195 - for cmdin in sorted(kwargs['command'].CommandIns.values(),
196 + for cmdin in sorted(list(kwargs['command'].CommandIns.values()),
197 key=attrgetter('Name')):
198 if cmdin.Required:
199 default_block = ''
200 @@ -162,7 +162,7 @@
201 cmdin_formatted.append(input_format % fmt)
202
203 cmdout_formatted = []
204 - for cmdin in sorted(kwargs['command'].CommandOuts.values(),
205 + for cmdin in sorted(list(kwargs['command'].CommandOuts.values()),
206 key=attrgetter('Name')):
207 fmt = {'name':cmdin.Name}
208 cmdout_formatted.append(output_format % fmt)
209 --- pyqi.orig/pyqi/commands/make_release.py
210 +++ pyqi/pyqi/commands/make_release.py
211 @@ -1,5 +1,5 @@
212 -#!/usr/bin/env python
213 -from __future__ import division
214 +#!/usr/bin/python3
215 +
216
217 #-----------------------------------------------------------------------------
218 # Copyright (c) 2013, The BiPy Development Team.
219 @@ -74,7 +74,7 @@
220
221 def _bump_version(self, version):
222 try:
223 - parts = map(int, version.split('.'))
224 + parts = list(map(int, version.split('.')))
225 except ValueError:
226 self._fail('Current version is not numeric')
227 parts[-1] += 1
228 --- pyqi.orig/pyqi/commands/serve_html_interface.py
229 +++ pyqi/pyqi/commands/serve_html_interface.py
230 @@ -1,4 +1,4 @@
231 -#!/usr/bin/env python
232 +#!/usr/bin/python3
233
234 #-----------------------------------------------------------------------------
235 # Copyright (c) 2013, The BiPy Development Team.
236 @@ -8,7 +8,7 @@
237 # The full license is in the file COPYING.txt, distributed with this software.
238 #-----------------------------------------------------------------------------
239
240 -from __future__ import division
241 +
242
243 __credits__ = ["Evan Bolyen"]
244
245 --- pyqi.orig/pyqi/core/__init__.py
246 +++ pyqi/pyqi/core/__init__.py
247 @@ -1,4 +1,4 @@
248 -#!/usr/bin/env python
249 +#!/usr/bin/python3
250
251 #-----------------------------------------------------------------------------
252 # Copyright (c) 2013, The BiPy Development Team.
253 --- pyqi.orig/pyqi/core/command.py
254 +++ pyqi/pyqi/core/command.py
255 @@ -1,4 +1,4 @@
256 -#!/usr/bin/env python
257 +#!/usr/bin/python3
258
259 #-----------------------------------------------------------------------------
260 # Copyright (c) 2013, The BiPy Development Team.
261 @@ -7,7 +7,7 @@
262 #
263 # The full license is in the file COPYING.txt, distributed with this software.
264 #-----------------------------------------------------------------------------
265 -from __future__ import division
266 +
267
268 __credits__ = ["Greg Caporaso", "Daniel McDonald", "Doug Wendel",
269 "Jai Ram Rideout"]
270 @@ -162,7 +162,7 @@
271 self_str = str(self.__class__)
272
273 # check required parameters
274 - for p in self.CommandIns.values():
275 + for p in list(self.CommandIns.values()):
276 if p.Required and p.Name not in kwargs:
277 err_msg = 'Missing required CommandIn %s in %s' % (p.Name,
278 self_str)
279 @@ -187,7 +187,7 @@
280 """Validate the result from a ``Command.run``"""
281 self_str = str(self.__class__)
282
283 - for p in self.CommandOuts.values():
284 + for p in list(self.CommandOuts.values()):
285 if p.Name not in result:
286 err_msg = "CommandOut %s not in %s" % (p.Name, self_str)
287 self._logger.fatal(err_msg)
288 @@ -200,7 +200,7 @@
289
290 def _set_defaults(self, kwargs):
291 """Set defaults for optional parameters"""
292 - for p in self.CommandIns.values():
293 + for p in list(self.CommandIns.values()):
294 if not p.Required and p.Name not in kwargs:
295 kwargs[p.Name] = p.Default
296
297 --- pyqi.orig/pyqi/core/container.py
298 +++ pyqi/pyqi/core/container.py
299 @@ -1,4 +1,4 @@
300 -#!/usr/bin/env python
301 +#!/usr/bin/python3
302
303 #-----------------------------------------------------------------------------
304 # Copyright (c) 2013, The BiPy Development Team.
305 --- pyqi.orig/pyqi/core/exception.py
306 +++ pyqi/pyqi/core/exception.py
307 @@ -1,4 +1,4 @@
308 -#!/usr/bin/env python
309 +#!/usr/bin/python3
310
311 #-----------------------------------------------------------------------------
312 # Copyright (c) 2013, The BiPy Development Team.
313 --- pyqi.orig/pyqi/core/factory.py
314 +++ pyqi/pyqi/core/factory.py
315 @@ -1,4 +1,4 @@
316 -#!/usr/bin/env python
317 +#!/usr/bin/python3
318
319 #-----------------------------------------------------------------------------
320 # Copyright (c) 2013, The BiPy Development Team.
321 --- pyqi.orig/pyqi/core/interface.py
322 +++ pyqi/pyqi/core/interface.py
323 @@ -1,4 +1,4 @@
324 -#!/usr/bin/env python
325 +#!/usr/bin/python3
326
327 #-----------------------------------------------------------------------------
328 # Copyright (c) 2013, The BiPy Development Team.
329 --- pyqi.orig/pyqi/core/interfaces/__init__.py
330 +++ pyqi/pyqi/core/interfaces/__init__.py
331 @@ -1,4 +1,4 @@
332 -#!/usr/bin/env python
333 +#!/usr/bin/python3
334
335 #-----------------------------------------------------------------------------
336 # Copyright (c) 2013, The BiPy Development Team.
337 --- pyqi.orig/pyqi/core/interfaces/html/__init__.py
338 +++ pyqi/pyqi/core/interfaces/html/__init__.py
339 @@ -1,4 +1,4 @@
340 -#!/usr/bin/env python
341 +#!/usr/bin/python3
342
343 #-----------------------------------------------------------------------------
344 # Copyright (c) 2013, The BiPy Development Team.
345 @@ -18,11 +18,10 @@
346
347 from pyqi.util import is_py2
348 if is_py2():
349 - from BaseHTTPServer import BaseHTTPRequestHandler, HTTPServer
350 + from http.server import BaseHTTPRequestHandler, HTTPServer
351 else:
352 from http.server import BaseHTTPRequestHandler, HTTPServer
353
354 -from cgi import parse_header, parse_multipart, parse_qs, FieldStorage
355 from copy import copy
356 from glob import glob
357 from os.path import abspath, exists, isdir, isfile, split
358 @@ -125,7 +124,7 @@
359 if self.Choices is None:
360 raise IncompetentDeveloperError(
361 "must supply a list of Choices for type '%s'" % self.type, self)
362 - elif type(self.Choices) not in (types.TupleType, types.ListType):
363 + elif type(self.Choices) not in (tuple, list):
364 raise IncompetentDeveloperError(
365 "choices must be a list of strings ('%s' supplied)"
366 % str(type(self.Choices)).split("'")[1], self)
367 @@ -513,7 +512,7 @@
368 def start_server(port, module):
369 """Start a server for the HTMLInterface on the specified port"""
370 interface_server = HTTPServer(("", port), get_http_handler(module))
371 - print("-- Starting server at http://localhost:%d --" % port)
372 + print(("-- Starting server at http://localhost:%d --" % port))
373 print("To close the server, type 'ctrl-c' into this window.")
374 try:
375 interface_server.serve_forever()
376 --- pyqi.orig/pyqi/core/interfaces/html/input_handler.py
377 +++ pyqi/pyqi/core/interfaces/html/input_handler.py
378 @@ -1,4 +1,4 @@
379 -#!/usr/bin/env python
380 +#!/usr/bin/python3
381
382
383 #-----------------------------------------------------------------------------
384 --- pyqi.orig/pyqi/core/interfaces/html/output_handler.py
385 +++ pyqi/pyqi/core/interfaces/html/output_handler.py
386 @@ -1,4 +1,4 @@
387 -#!/usr/bin/env python
388 +#!/usr/bin/python3
389
390
391 #-----------------------------------------------------------------------------
392 --- pyqi.orig/pyqi/core/interfaces/optparse/__init__.py
393 +++ pyqi/pyqi/core/interfaces/optparse/__init__.py
394 @@ -1,4 +1,4 @@
395 -#!/usr/bin/env python
396 +#!/usr/bin/python3
397
398 #-----------------------------------------------------------------------------
399 # Copyright (c) 2013, The BiPy Development Team.
400 --- pyqi.orig/pyqi/core/interfaces/optparse/input_handler.py
401 +++ pyqi/pyqi/core/interfaces/optparse/input_handler.py
402 @@ -1,4 +1,4 @@
403 -#!/usr/bin/env python
404 +#!/usr/bin/python3
405
406 """Command line interface input handlers
407
408 --- pyqi.orig/pyqi/core/interfaces/optparse/output_handler.py
409 +++ pyqi/pyqi/core/interfaces/optparse/output_handler.py
410 @@ -1,4 +1,4 @@
411 -#!/usr/bin/env python
412 +#!/usr/bin/python3
413
414 """Command line interface output handlers
415
416 --- pyqi.orig/pyqi/core/log.py
417 +++ pyqi/pyqi/core/log.py
418 @@ -1,4 +1,4 @@
419 -#!/usr/bin/env python
420 +#!/usr/bin/python3
421
422 #-----------------------------------------------------------------------------
423 # Copyright (c) 2013, The BiPy Development Team.
424 @@ -7,7 +7,7 @@
425 #
426 # The full license is in the file COPYING.txt, distributed with this software.
427 #-----------------------------------------------------------------------------
428 -from __future__ import division
429 +
430
431 from sys import stderr
432 from datetime import datetime
433 --- pyqi.orig/pyqi/core/parallel.py
434 +++ pyqi/pyqi/core/parallel.py
435 @@ -1,4 +1,4 @@
436 -#!/usr/bin/env python
437 +#!/usr/bin/python3
438
439 """Manage IPython.parallel clusters in the notebook.
440
441 @@ -73,7 +73,7 @@
442 def update_profiles(self):
443 """List all profiles in the ipython_dir and cwd.
444 """
445 - for path in [get_ipython_dir(), os.getcwdu()]:
446 + for path in [get_ipython_dir(), os.getcwd()]:
447 for profile in list_profiles_in(path):
448 pd = self.get_profile_dir(profile, path)
449 if profile not in self.profiles:
450 @@ -94,7 +94,7 @@
451
452 def check_profile(self, profile):
453 if profile not in self.profiles:
454 - raise IOError(u'profile not found')
455 + raise IOError('profile not found')
456
457 def profile_info(self, profile):
458 self.check_profile(profile)
459 @@ -112,7 +112,7 @@
460 self.check_profile(profile)
461 data = self.profiles[profile]
462 if data['status'] == 'running':
463 - raise ValueError(u'cluster already running')
464 + raise ValueError('cluster already running')
465 cl, esl, default_n = self.build_launchers(data['profile_dir'])
466 n = n if n is not None else default_n
467
468 @@ -154,7 +154,7 @@
469 self.check_profile(profile)
470 data = self.profiles[profile]
471 if data['status'] == 'stopped':
472 - raise ValueError(u'cluster not running')
473 + raise ValueError('cluster not running')
474 data = self.profiles[profile]
475 cl = data['controller_launcher']
476 esl = data['engine_set_launcher']
477 @@ -172,7 +172,7 @@
478 return result
479
480 def stop_all_clusters(self):
481 - for p in self.profiles.keys():
482 + for p in list(self.profiles.keys()):
483 self.stop_cluster(p)
484
485
486 --- pyqi.orig/pyqi/functional.py
487 +++ pyqi/pyqi/functional.py
488 @@ -1,4 +1,4 @@
489 -#!/usr/bin/env python
490 +#!/usr/bin/python3
491
492 from pyqi.core.interface import Interface, InterfaceOption
493 from testing import FilterSamples, FilterObservations
494 @@ -7,6 +7,7 @@
495 from pyqi.core.factory import general_factory
496 from biom.table import Table as BIOMTable
497 from biom.parse import parse_biom_table
498 +from functools import reduce
499
500
501 class Functional(Interface):
502 @@ -67,11 +68,11 @@
503 open('/Users/mcdonadt/ResearchWork/software/biom-format/examples/rich_sparse_otu_table.biom'))
504
505 res = g(f("asdasdasd", seqs_per_sample=3), seqs_per_observation=1)
506 -res2 = map(lambda x: f(x, seqs_per_sample=3), [t1, t2, t3])
507 +res2 = [f(x, seqs_per_sample=3) for x in [t1, t2, t3]]
508 res3 = reduce(lambda x, y: x.merge(f(y, seqs_per_sample=3)), [t1, t2, t3])
509
510 -print res
511 +print(res)
512 for i in res2:
513 - print i
514 -print "***"
515 -print res3
516 + print(i)
517 +print("***")
518 +print(res3)
519 --- pyqi.orig/pyqi/interfaces/__init__.py
520 +++ pyqi/pyqi/interfaces/__init__.py
521 @@ -1,4 +1,4 @@
522 -#!/usr/bin/env python
523 +#!/usr/bin/python3
524
525 #-----------------------------------------------------------------------------
526 # Copyright (c) 2013, The BiPy Development Team.
527 @@ -7,7 +7,7 @@
528 #
529 # The full license is in the file COPYING.txt, distributed with this software.
530 #-----------------------------------------------------------------------------
531 -from __future__ import division
532 +
533
534 __credits__ = ["Greg Caporaso", "Daniel McDonald", "Doug Wendel",
535 "Jai Ram Rideout"]
536 --- pyqi.orig/pyqi/interfaces/html/config/make_bash_completion.py
537 +++ pyqi/pyqi/interfaces/html/config/make_bash_completion.py
538 @@ -1,4 +1,4 @@
539 -#!/usr/bin/env python
540 +#!/usr/bin/python3
541
542 #-----------------------------------------------------------------------------
543 # Copyright (c) 2013, The BiPy Development Team.
544 --- pyqi.orig/pyqi/interfaces/html/config/make_command.py
545 +++ pyqi/pyqi/interfaces/html/config/make_command.py
546 @@ -1,4 +1,4 @@
547 -#!/usr/bin/env python
548 +#!/usr/bin/python3
549
550 #-----------------------------------------------------------------------------
551 # Copyright (c) 2013, The BiPy Development Team.
552 --- pyqi.orig/pyqi/interfaces/html/config/make_optparse.py
553 +++ pyqi/pyqi/interfaces/html/config/make_optparse.py
554 @@ -1,4 +1,4 @@
555 -#!/usr/bin/env python
556 +#!/usr/bin/python3
557
558 #-----------------------------------------------------------------------------
559 # Copyright (c) 2013, The BiPy Development Team.
560 --- pyqi.orig/pyqi/interfaces/optparse/__init__.py
561 +++ pyqi/pyqi/interfaces/optparse/__init__.py
562 @@ -1,4 +1,4 @@
563 -#!/usr/bin/env python
564 +#!/usr/bin/python3
565
566 #-----------------------------------------------------------------------------
567 # Copyright (c) 2013, The BiPy Development Team.
568 @@ -7,7 +7,7 @@
569 #
570 # The full license is in the file COPYING.txt, distributed with this software.
571 #-----------------------------------------------------------------------------
572 -from __future__ import division
573 +
574
575 __credits__ = ["Greg Caporaso", "Daniel McDonald", "Doug Wendel",
576 "Jai Ram Rideout"]
577 --- pyqi.orig/pyqi/interfaces/optparse/config/__init__.py
578 +++ pyqi/pyqi/interfaces/optparse/config/__init__.py
579 @@ -1,4 +1,4 @@
580 -#!/usr/bin/env python
581 +#!/usr/bin/python3
582
583 #-----------------------------------------------------------------------------
584 # Copyright (c) 2013, The BiPy Development Team.
585 --- pyqi.orig/pyqi/interfaces/optparse/config/make_bash_completion.py
586 +++ pyqi/pyqi/interfaces/optparse/config/make_bash_completion.py
587 @@ -1,4 +1,4 @@
588 -#!/usr/bin/env python
589 +#!/usr/bin/python3
590
591 #-----------------------------------------------------------------------------
592 # Copyright (c) 2013, The BiPy Development Team.
593 --- pyqi.orig/pyqi/interfaces/optparse/config/make_command.py
594 +++ pyqi/pyqi/interfaces/optparse/config/make_command.py
595 @@ -1,4 +1,4 @@
596 -#!/usr/bin/env python
597 +#!/usr/bin/python3
598
599 #-----------------------------------------------------------------------------
600 # Copyright (c) 2013, The BiPy Development Team.
601 --- pyqi.orig/pyqi/interfaces/optparse/config/make_optparse.py
602 +++ pyqi/pyqi/interfaces/optparse/config/make_optparse.py
603 @@ -1,4 +1,4 @@
604 -#!/usr/bin/env python
605 +#!/usr/bin/python3
606
607 #-----------------------------------------------------------------------------
608 # Copyright (c) 2013, The BiPy Development Team.
609 --- pyqi.orig/pyqi/interfaces/optparse/config/make_release.py
610 +++ pyqi/pyqi/interfaces/optparse/config/make_release.py
611 @@ -1,5 +1,5 @@
612 -#!/usr/bin/env python
613 -from __future__ import division
614 +#!/usr/bin/python3
615 +
616
617 __credits__ = ["Daniel McDonald"]
618
619 --- pyqi.orig/pyqi/interfaces/optparse/config/serve_html_interface.py
620 +++ pyqi/pyqi/interfaces/optparse/config/serve_html_interface.py
621 @@ -1,4 +1,4 @@
622 -#!/usr/bin/env python
623 +#!/usr/bin/python3
624
625 #-----------------------------------------------------------------------------
626 # Copyright (c) 2013, The BiPy Development Team.
627 --- pyqi.orig/pyqi/interfaces/optparse/input_handler.py
628 +++ pyqi/pyqi/interfaces/optparse/input_handler.py
629 @@ -1,4 +1,4 @@
630 -#!/usr/bin/env python
631 +#!/usr/bin/python3
632
633 #-----------------------------------------------------------------------------
634 # Copyright (c) 2013, The BiPy Development Team.
635 @@ -7,7 +7,7 @@
636 #
637 # The full license is in the file COPYING.txt, distributed with this software.
638 #-----------------------------------------------------------------------------
639 -from __future__ import division
640 +
641
642 __credits__ = ["Greg Caporaso", "Daniel McDonald", "Doug Wendel",
643 "Jai Ram Rideout"]
644 --- pyqi.orig/pyqi/interfaces/optparse/output_handler.py
645 +++ pyqi/pyqi/interfaces/optparse/output_handler.py
646 @@ -1,4 +1,4 @@
647 -#!/usr/bin/env python
648 +#!/usr/bin/python3
649
650 #-----------------------------------------------------------------------------
651 # Copyright (c) 2013, The BiPy Development Team.
652 @@ -7,7 +7,7 @@
653 #
654 # The full license is in the file COPYING.txt, distributed with this software.
655 #-----------------------------------------------------------------------------
656 -from __future__ import division
657 +
658
659 __credits__ = ["Greg Caporaso", "Daniel McDonald", "Doug Wendel",
660 "Jai Ram Rideout"]
661 --- pyqi.orig/pyqi/util.py
662 +++ pyqi/pyqi/util.py
663 @@ -1,4 +1,4 @@
664 -#!/usr/bin/env python
665 +#!/usr/bin/python3
666
667 #-----------------------------------------------------------------------------
668 # Copyright (c) 2013, The BiPy Development Team.
669 @@ -88,7 +88,7 @@
670
671 Use like this (put in the script you want to deprecate):
672
673 - #!/usr/bin/env python
674 + #!/usr/bin/python3
675 import sys
676 from pyqi.util import old_to_new_command
677
678 --- pyqi.orig/scripts/bar
679 +++ pyqi/scripts/bar
680 @@ -1,4 +1,4 @@
681 -#!/usr/bin/env python
682 +#!/usr/bin/python3
683
684 __author__ = "b"
685 __copyright__ = "q"
686 --- pyqi.orig/scripts/direct_make_command.py
687 +++ pyqi/scripts/direct_make_command.py
688 @@ -1,4 +1,4 @@
689 -#!/usr/bin/env python
690 +#!/usr/bin/python3
691
692 #-----------------------------------------------------------------------------
693 # Copyright (c) 2013, The BiPy Development Team.
694 --- pyqi.orig/scripts/foo
695 +++ pyqi/scripts/foo
696 @@ -1,4 +1,4 @@
697 -#!/usr/bin/env python
698 +#!/usr/bin/python3
699 from __future__ import division
700
701 __author__ = "b"
702 --- pyqi.orig/scripts/optparse
703 +++ pyqi/scripts/optparse
704 @@ -1,4 +1,4 @@
705 -#!/usr/bin/env python
706 +#!/usr/bin/python3
707
708 #-----------------------------------------------------------------------------
709 # Copyright (c) 2013, The BiPy Development Team.
710 --- pyqi.orig/scripts/pyqi
711 +++ pyqi/scripts/pyqi
712 @@ -1,4 +1,4 @@
713 -#!/usr/bin/env python
714 +#!/usr/bin/python3
715
716 #-----------------------------------------------------------------------------
717 # Copyright (c) 2013, The BiPy Development Team.
718 --- pyqi.orig/scripts/qiime
719 +++ pyqi/scripts/qiime
720 @@ -1,4 +1,4 @@
721 -#!/usr/bin/env python
722 +#!/usr/bin/python3
723
724 #-----------------------------------------------------------------------------
725 # Copyright (c) 2013, The BiPy Development Team.
726 --- pyqi.orig/scripts/test_bar
727 +++ pyqi/scripts/test_bar
728 @@ -1,4 +1,4 @@
729 -#!/usr/bin/env python
730 +#!/usr/bin/python3
731
732 __author__ = "b"
733 __copyright__ = "q"
734 --- pyqi.orig/scripts/testing
735 +++ pyqi/scripts/testing
736 @@ -1,4 +1,4 @@
737 -#!/usr/bin/env python
738 +#!/usr/bin/python3
739
740 from pyqi.core.interfaces.optparse import (OptparseOption,
741 OptparseUsageExample,
742 --- pyqi.orig/setup.py
743 +++ pyqi/setup.py
744 @@ -1,4 +1,4 @@
745 -#!/usr/bin/env python
746 +#!/usr/bin/python3
747
748 #-----------------------------------------------------------------------------
749 # Copyright (c) 2013, The BiPy Development Team.
750 @@ -32,8 +32,11 @@
751 Topic :: Software Development :: Libraries :: Application Frameworks
752 Topic :: Software Development :: User Interfaces
753 Programming Language :: Python
754 - Programming Language :: Python :: 2.7
755 - Programming Language :: Python :: 3.3
756 + Programming Language :: Python :: 3.9
757 + Programming Language :: Python :: 3.10
758 + Programming Language :: Python :: 3.11
759 + Programming Language :: Python :: 3.12
760 + Programming Language :: Python :: 3.13
761 Programming Language :: Python :: Implementation :: CPython
762 Operating System :: OS Independent
763 Operating System :: POSIX
764 @@ -43,8 +46,8 @@
765
766 # Verify Python version
767 ver = '.'.join(map(str, [sys.version_info.major, sys.version_info.minor]))
768 -if ver not in ['2.7', '3.3']:
769 - sys.stderr.write("Only Python 2.7 and 3.3 are supported.")
770 +if ver not in ['3.9', '3.10', '3.11', '3.12', '3.13']:
771 + sys.stderr.write("Only Python 3.9 to 3.13 are supported.")
772 sys.exit(1)
773
774 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."""