Skip to content

Commit 5b1059b

Browse files
author
Greg Turnquist
committed
Removed maven stuff and old doc building procedures from build.py
1 parent f7dc1a0 commit 5b1059b

14 files changed

Lines changed: 1 addition & 809 deletions

build.py

Lines changed: 1 addition & 95 deletions
Original file line numberDiff line numberDiff line change
@@ -80,21 +80,15 @@ def usage():
8080
print "\t\t\t\tIf this option isn't used, default will be tag will be '%s.<current time>'" % p["version"]
8181
print "\t--publish\t\tpublish this release to the deployment server"
8282
print "\t--register\t\tregister this release with http://pypi.python.org/pypi"
83-
print "\t--site\t\t\tcreate the site and all its related documents"
84-
print "\t--docs-html-multi\tgenerate HTML documentation, split up into separate sections"
85-
print "\t--docs-html-single\tgenerate HTML documentation in a single file"
86-
print "\t--docs-pdf\t\tgenerate PDF documentation"
8783
print "\t--docs-sphinx\t\tgenerate Sphinx documentation"
88-
print "\t--docs-all\t\tgenerate all documents"
8984
print "\t--pydoc\t\t\tgenerate pydoc information"
9085
print
9186

9287
try:
9388
optlist, args = getopt.getopt(sys.argv[1:],
9489
"hct",
9590
["help", "clean", "test", "suite=", "debug-level=", "coverage", "package", "build-stamp=", \
96-
"publish", "register", \
97-
"site", "docs-html-multi", "docs-html-single", "docs-pdf", "docs-sphinx", "docs-all", "pydoc"])
91+
"publish", "register", "docs-sphinx", "pydoc"])
9892
except getopt.GetoptError:
9993
# print help information and exit:
10094
print "Invalid command found in %s" % sys.argv
@@ -114,12 +108,8 @@ def usage():
114108

115109
def clean(dir):
116110
print "Removing '%s' directory" % dir
117-
if os.path.exists("pom.xml"):
118-
os.remove("pom.xml")
119111
if os.path.exists(".coverage"):
120112
os.remove(".coverage")
121-
if os.path.exists("docs/reference/src/mangled.xml"):
122-
os.remove("docs/reference/src/mangled.xml")
123113
if os.path.exists(dir):
124114
shutil.rmtree(dir, True)
125115
for root, dirs, files in os.walk(".", topdown=False):
@@ -314,75 +304,6 @@ def setup(root, stylesheets=True):
314304
def sub_version(cur, version):
315305
_substitute(cur + "/" + p["doc.ref.dir"] + "/src/index.xml", cur + "/" + p["doc.ref.dir"] + "/src/mangled.xml", [("version", version)])
316306

317-
def site(version):
318-
_substitute("pom-template.xml", "pom.xml", [("version", version)])
319-
320-
docs_all(version)
321-
cur = os.path.abspath(".")
322-
shutil.copy(cur + "/docs/spring.ico", p["targetDir"]+"/docs/favicon.ico")
323-
os.system("mvn -Dspringpython.version=%s site" % version)
324-
os.remove("pom.xml")
325-
os.system("cp docs/resources/css/* target/docs/css/")
326-
create_pydocs()
327-
328-
def docs_all(version):
329-
copy("xml/schema/context/", p["targetDir"] + "/docs/schema/context/", ["*.xsd"])
330-
331-
docs_multi(version)
332-
docs_pdf(version)
333-
docs_sphinx()
334-
335-
def docs_multi(version):
336-
root = p["targetDir"] + "/" + p["dist.ref.dir"] + "/html"
337-
print root
338-
339-
setup(root)
340-
341-
cur = os.getcwd()
342-
sub_version(cur, version)
343-
os.chdir(root)
344-
ref = cur + "/" + p["doc.ref.dir"]
345-
os.system("java -classpath " + os.path.pathsep.join(glob(ref + "/lib/*.jar")) + \
346-
" -Xmx80M -XX:MaxPermSize=80m com.icl.saxon.StyleSheet " + \
347-
ref+"/src/mangled.xml " + ref+"/styles/html_chunk.xsl")
348-
os.remove(ref+"/src/mangled.xml")
349-
os.chdir(cur)
350-
351-
def docs_single(version):
352-
root = p["targetDir"] + "/" + p["dist.ref.dir"] + "/html_single"
353-
354-
setup(root)
355-
356-
cur = os.getcwd()
357-
sub_version(cur, version)
358-
os.chdir(root)
359-
ref = cur + "/" + p["doc.ref.dir"]
360-
os.system("java -classpath " + os.path.pathsep.join(glob(ref + "/lib/*.jar")) + \
361-
" -Xmx80M -XX:MaxPermSize=80m com.icl.saxon.StyleSheet " + \
362-
"-o index.html " + ref+"/src/mangled.xml " + ref+"/styles/html.xsl")
363-
364-
os.remove(ref+"/src/mangled.xml")
365-
os.chdir(cur)
366-
367-
def docs_pdf(version):
368-
root = p["targetDir"] + "/" + p["dist.ref.dir"] + "/pdf"
369-
370-
setup(root, stylesheets=False)
371-
372-
cur = os.getcwd()
373-
sub_version(cur, version)
374-
os.chdir(root)
375-
ref = cur + "/" + p["doc.ref.dir"]
376-
os.system("java -classpath " + os.path.pathsep.join(glob(ref + "/lib/*.jar")) + \
377-
" -Xmx80M -XX:MaxPermSize=80m com.icl.saxon.StyleSheet " + \
378-
"-o docbook_fop.tmp " + ref+"/src/mangled.xml " + ref+"/styles/fopdf.xsl double.sided=" + p["double.sided"])
379-
os.system("java -classpath " + os.path.pathsep.join(glob(ref + "/lib/*.jar")) + \
380-
" -Xmx80M -XX:MaxPermSize=80m org.apache.fop.apps.Fop " + \
381-
"docbook_fop.tmp springpython-reference.pdf")
382-
os.remove("docbook_fop.tmp")
383-
os.remove(ref+"/src/mangled.xml")
384-
os.chdir(cur)
385-
386307
def docs_sphinx():
387308
cur = os.getcwd()
388309
os.chdir("docs/sphinx")
@@ -536,21 +457,6 @@ def create_pydocs():
536457
if option[0] in ("--register"):
537458
register()
538459

539-
if option[0] in ("--site"):
540-
site(complete_version)
541-
542-
if option[0] in ("--docs-all"):
543-
docs_all(complete_version)
544-
545-
if option[0] in ("--docs-html-multi"):
546-
docs_multi(complete_version)
547-
548-
if option[0] in ("--docs-html-single"):
549-
docs_single(complete_version)
550-
551-
if option[0] in ("--docs-pdf"):
552-
docs_pdf(complete_version)
553-
554460
if option[0] in ("--docs-sphinx"):
555461
docs_sphinx()
556462

docs/app-context-sample.xml

Lines changed: 0 additions & 96 deletions
This file was deleted.

docs/apt/index.apt

Lines changed: 0 additions & 65 deletions
This file was deleted.

0 commit comments

Comments
 (0)