Modify Python script to work under 3.x

No PKGREVISION bump since it only affects builds that failed before.
This commit is contained in:
darcy 2012-12-20 13:32:34 +00:00
parent 54c3b5db8b
commit b4688591c3
2 changed files with 76 additions and 1 deletions

View file

@ -1,5 +1,6 @@
$NetBSD: distinfo,v 1.1 2012/12/04 15:19:52 darcy Exp $
$NetBSD: distinfo,v 1.2 2012/12/20 13:32:34 darcy Exp $
SHA1 (cloud_sptheme-1.5.tar.gz) = c0b76e26296ba6897ed4ba262a7aabc879b29e8e
RMD160 (cloud_sptheme-1.5.tar.gz) = 7f7e49aca840eb7623d6511a86e47a2730f323a3
Size (cloud_sptheme-1.5.tar.gz) = 391221 bytes
SHA1 (patch-cloud_sptheme.make_helper.py) = 49bbea0ab44ab53757a89fb23b877bcf54a9a848

View file

@ -0,0 +1,74 @@
$NetBSD: patch-cloud_sptheme.make_helper.py,v 1.1 2012/12/20 13:32:34 darcy Exp $
- Wrap print string in parens to allow compiling by Python 3.x
--- cloud_sptheme/make_helper.py.orig 2012-07-31 18:11:55.000000000 +0000
+++ cloud_sptheme/make_helper.py
@@ -150,16 +150,16 @@ class SphinxMaker(object):
#targets
#===============================================================
def target_help(self):
- print "Please use \`make <target>' where <target> is one of"
- print " clean remove all compiled files"
- print " html to make standalone HTML files"
- print " servehtml to serve standalone HTML files on port 8000"
-# print " pickle to make pickle files"
-# print " json to make JSON files"
- print " htmlhelp to make HTML files and a HTML help project"
-# print " latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter"
-# print " changes to make an overview over all changed/added/deprecated items"
-# print " linkcheck to check all external links for integrity"
+ print ("Please use \`make <target>' where <target> is one of")
+ print (" clean remove all compiled files")
+ print (" html to make standalone HTML files")
+ print (" servehtml to serve standalone HTML files on port 8000")
+# print (" pickle to make pickle files")
+# print (" json to make JSON files")
+ print (" htmlhelp to make HTML files and a HTML help project")
+# print (" latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter")
+# print (" changes to make an overview over all changed/added/deprecated items")
+# print (" linkcheck to check all external links for integrity")
def target_clean(self):
rmpath(self.BUILD)
@@ -182,7 +182,7 @@ class SphinxMaker(object):
# fall back to stdlib server
import SimpleHTTPServer as s
os.chdir(path)
- print "Serving files from %r on port %r" % (path, port)
+ print ("Serving files from %r on port %r" % (path, port))
s.BaseHTTPServer.HTTPServer(('',port), s.SimpleHTTPRequestHandler).serve_forever()
else:
serve(StaticURLParser(path), host="0.0.0.0", port=port)
@@ -191,8 +191,8 @@ class SphinxMaker(object):
##def target_latex(self):
## build("latex")
- ## print "Run \`make all-pdf' or \`make all-ps' in that directory to" \
- ## "run these through (pdf)latex."
+ ## print ("Run \`make all-pdf' or \`make all-ps' in that directory to"
+ ## "run these through (pdf)latex.")
##
##def target_pdf():
## assert os.name == "posix", "pdf build support not automated for your os"
@@ -200,7 +200,7 @@ class SphinxMaker(object):
## target = BUILD / "latex"
## target.chdir()
## subprocess.call(['make', 'all-pdf'])
- ## print "pdf built"
+ ## print ("pdf built")
#===============================================================
#helpers
@@ -217,9 +217,9 @@ class SphinxMaker(object):
rc = subprocess.call([self.SPHINXBUILD, "-b", name] + ALLSPHINXOPTS + [ target ])
if rc:
- print "Sphinx-Build returned error, exiting."
+ print ("Sphinx-Build returned error, exiting.")
sys.exit(rc)
- print "Build finished. The %s pages are in %r." % (name, target,)
+ print ("Build finished. The %s pages are in %r." % (name, target,))
return target
def get_paper_opts(self):