Mercurial > p > roundup > code
comparison setup.py @ 5376:64b05e24dbd8
Python 3 preparation: convert print to a function.
Tool-assisted patch. It is possible that some "from __future__ import
print_function" are not in fact needed, if a file only uses print()
with a single string as an argument and so would work fine in Python 2
without that import.
| author | Joseph Myers <jsm@polyomino.org.uk> |
|---|---|
| date | Tue, 24 Jul 2018 09:54:52 +0000 |
| parents | dca36294a733 |
| children | fe1bd8f12a9f |
comparison
equal
deleted
inserted
replaced
| 5375:1ad46057ae4a | 5376:64b05e24dbd8 |
|---|---|
| 17 # BASIS, AND THERE IS NO OBLIGATION WHATSOEVER TO PROVIDE MAINTENANCE, | 17 # BASIS, AND THERE IS NO OBLIGATION WHATSOEVER TO PROVIDE MAINTENANCE, |
| 18 # SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. | 18 # SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. |
| 19 # | 19 # |
| 20 | 20 |
| 21 | 21 |
| 22 from __future__ import print_function | |
| 22 from roundup.dist.command.build_doc import build_doc | 23 from roundup.dist.command.build_doc import build_doc |
| 23 from roundup.dist.command.build_scripts import build_scripts | 24 from roundup.dist.command.build_scripts import build_scripts |
| 24 from roundup.dist.command.build import build, list_message_files | 25 from roundup.dist.command.build import build, list_message_files |
| 25 from roundup.dist.command.bdist_rpm import bdist_rpm | 26 from roundup.dist.command.bdist_rpm import bdist_rpm |
| 26 from roundup.dist.command.install_lib import install_lib | 27 from roundup.dist.command.install_lib import install_lib |
| 109 long_description=open('doc/announcement.txt').read() | 110 long_description=open('doc/announcement.txt').read() |
| 110 try: | 111 try: |
| 111 # attempt to interpret string as 'ascii' | 112 # attempt to interpret string as 'ascii' |
| 112 long_description = long_description.encode('ascii') | 113 long_description = long_description.encode('ascii') |
| 113 except UnicodeEncodeError as cause: | 114 except UnicodeEncodeError as cause: |
| 114 print >> sys.stderr, "doc/announcement.txt contains non-ascii: %s" \ | 115 print("doc/announcement.txt contains non-ascii: %s" |
| 115 % cause | 116 % cause, file=sys.stderr) |
| 116 sys.exit(42) | 117 sys.exit(42) |
| 117 | 118 |
| 118 setup(name='roundup', | 119 setup(name='roundup', |
| 119 version=__version__, | 120 version=__version__, |
| 120 author="Richard Jones", | 121 author="Richard Jones", |
