/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to tools/package_docs.py

  • Committer: Richard Wilbur
  • Date: 2016-02-04 19:07:28 UTC
  • mto: This revision was merged to the branch mainline in revision 6618.
  • Revision ID: richard.wilbur@gmail.com-20160204190728-p0zvfii6zase0fw7
Update COPYING.txt from the original http://www.gnu.org/licenses/gpl-2.0.txt  (Only differences were in whitespace.)  Thanks to Petr Stodulka for pointing out the discrepancy.

Show diffs side-by-side

added added

removed removed

Lines of Context:
41
41
    copytree(src_html, dest_html)
42
42
 
43
43
    # Package the html as a downloadable archive
44
 
    archive_root = "brz-%s-html" % (section,)
 
44
    archive_root = "bzr-%s-html" % (section,)
45
45
    archive_basename = "%s.tar.bz2" % (archive_root,)
46
46
    archive_name = os.path.join(dest_downloads, archive_basename)
47
47
    build_archive(src_html, archive_name, archive_root, 'bz2')
49
49
    # Copy across the PDF docs, if any, including the quick ref card
50
50
    pdf_files = []
51
51
    quick_ref = os.path.join(src_html,
52
 
        '_static/%s/brz-%s-quick-reference.pdf' % (section, section))
 
52
        '_static/%s/bzr-%s-quick-reference.pdf' % (section, section))
53
53
    if os.path.exists(quick_ref):
54
54
        pdf_files.append(quick_ref)
55
55
    src_pdf = os.path.join(src_build, 'latex')
68
68
 
69
69
 
70
70
def build_archive(src_dir, archive_name, archive_root, format):
71
 
    print("creating %s ..." % (archive_name,))
 
71
    print "creating %s ..." % (archive_name,)
72
72
    tar = tarfile.open(archive_name, "w:%s" % (format,))
73
73
    for relpath in os.listdir(src_dir):
74
74
        src_path = os.path.join(src_dir, relpath)
98
98
    dest_downloads = os.path.join(dest_dir, 'downloads')
99
99
    for d in [dest_dir, dest_downloads]:
100
100
        if not os.path.exists(d):
101
 
            print("creating directory %s ..." % (d,))
 
101
            print "creating directory %s ..." % (d,)
102
102
            os.mkdir(d)
103
103
 
104
104
    # Package and copy the files across