summaryrefslogtreecommitdiffstats
path: root/openstack/common/setup.py
diff options
context:
space:
mode:
authorChuck Short <chuck.short@canonical.com>2013-05-01 09:40:43 -0500
committerChuck Short <chuck.short@canonical.com>2013-05-02 08:06:01 -0500
commit2f771aca390639cc49f71c451bd55c1d10db6f58 (patch)
tree5873dda954d351f5522a7451acb1215b7c85ab7c /openstack/common/setup.py
parent90e83530d4dc49d570fa05ea63a93805717dcfa0 (diff)
downloadoslo-2f771aca390639cc49f71c451bd55c1d10db6f58.tar.gz
oslo-2f771aca390639cc49f71c451bd55c1d10db6f58.tar.xz
oslo-2f771aca390639cc49f71c451bd55c1d10db6f58.zip
Improve python3 compatibility
Change print statements so that it works with python3 as well. Change-Id: Iff16b62e4b875c79862c9af7726ea77627aa7b4f Signed-off-by: Chuck Short <chuck.short@canonical.com>
Diffstat (limited to 'openstack/common/setup.py')
-rw-r--r--openstack/common/setup.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/openstack/common/setup.py b/openstack/common/setup.py
index ba6b54a..03b0675 100644
--- a/openstack/common/setup.py
+++ b/openstack/common/setup.py
@@ -20,6 +20,8 @@
Utilities with minimum-depends for use in setup.py
"""
+from __future__ import print_function
+
import email
import os
import re
@@ -232,7 +234,7 @@ def get_cmdclass():
builders = ['html', 'man']
def generate_autoindex(self):
- print "**Autodocumenting from %s" % os.path.abspath(os.curdir)
+ print("**Autodocumenting from %s" % os.path.abspath(os.curdir))
modules = {}
option_dict = self.distribution.get_option_dict('build_sphinx')
source_dir = os.path.join(option_dict['source_dir'][1], 'api')
@@ -257,7 +259,7 @@ def get_cmdclass():
values = dict(module=module, heading=heading,
underline=underline)
- print "Generating %s" % output_filename
+ print("Generating %s" % output_filename)
with open(output_filename, 'w') as output_file:
output_file.write(_rst_template % values)
autoindex.write(" %s.rst\n" % module)