summaryrefslogtreecommitdiffstats
path: root/Doc/tools
diff options
context:
space:
mode:
authorFred Drake <fdrake@acm.org>2002-08-09 20:20:50 (GMT)
committerFred Drake <fdrake@acm.org>2002-08-09 20:20:50 (GMT)
commit1a0199a74f23c977485951ed61f531f8df235388 (patch)
treeb14acd7bf0412d28d3424682746555b40e298859 /Doc/tools
parent7ec34b556c08f3cc47afaea16989b117ad9f0d91 (diff)
downloadcpython-1a0199a74f23c977485951ed61f531f8df235388.zip
cpython-1a0199a74f23c977485951ed61f531f8df235388.tar.gz
cpython-1a0199a74f23c977485951ed61f531f8df235388.tar.bz2
Lots of changes to the packaging of the documentation, all to keep
directories clean where the packages are unpacked. Each package now contains a single directory, Python-Docs-<version>/, which contains the files for that version of the documentation. Closes SF feature request #567576.
Diffstat (limited to 'Doc/tools')
-rwxr-xr-xDoc/tools/mksourcepkg21
1 files changed, 11 insertions, 10 deletions
diff --git a/Doc/tools/mksourcepkg b/Doc/tools/mksourcepkg
index c3ea863..e5e6e65 100755
--- a/Doc/tools/mksourcepkg
+++ b/Doc/tools/mksourcepkg
@@ -73,7 +73,7 @@ def main():
cvstag = args[1]
tempdir = tempfile.mktemp()
os.mkdir(tempdir)
- pkgdir = os.path.join(tempdir, "Python-" + release)
+ pkgdir = os.path.join(tempdir, "Python-Docs-" + release)
os.mkdir(pkgdir)
pwd = os.getcwd()
mydir = os.path.abspath(os.path.dirname(sys.argv[0]))
@@ -90,14 +90,15 @@ def main():
# For some reason, SourceForge/CVS doesn't seem to care that we
# might not have done a "cvs login" to the anonymous server.
# That avoids a lot of painful gunk here.
- os.chdir(pkgdir)
+ os.chdir(tempdir)
if not quiet:
print "--- current directory is:", pkgdir
if cvstag:
- run("cvs -d%s export -r %s -d Doc python/dist/src/Doc"
- % (cvsroot, cvstag))
+ run("cvs -d%s export -r %s -d Python-Docs-%s python/dist/src/Doc"
+ % (cvsroot, cvstag, release))
else:
- run("cvs -Q -d%s checkout -d Doc python/dist/src/Doc" % cvsroot)
+ run("cvs -Q -d%s checkout -d Python-Docs-%s python/dist/src/Doc"
+ % (cvsroot, release))
# remove CVS directories
for p in ('*/CVS', '*/*/CVS', '*/*/*/CVS'):
map(shutil.rmtree, glob.glob(p))
@@ -105,13 +106,13 @@ def main():
map(os.unlink, glob.glob(f))
LICENSE = os.path.normpath(
os.path.join(mydir, os.pardir, os.pardir, "LICENSE"))
- shutil.copyfile(LICENSE, "Doc/LICENSE")
+ shutil.copyfile(LICENSE, "LICENSE")
if tools:
archive = "doctools-" + release
# we don't want the actual documents in this case:
for d in ("api", "dist", "doc", "ext", "inst",
"lib", "mac", "ref", "tut"):
- shutil.rmtree(os.path.join(os.path.join(pkgdir, "Doc"), d))
+ shutil.rmtree(os.path.join(pkgdir, d))
else:
archive = "latex-" + release
@@ -121,15 +122,15 @@ def main():
archive = os.path.join(pwd, archive)
for format in formats:
if format == "bzip2":
- run("tar cf - Python-%s | bzip2 -9 >%s.tar.bz2"
+ run("tar cf - Python-Docs-%s | bzip2 -9 >%s.tar.bz2"
% (release, archive))
elif format == "gzip":
- run("tar cf - Python-%s | gzip -9 >%s.tgz"
+ run("tar cf - Python-Docs-%s | gzip -9 >%s.tgz"
% (release, archive))
elif format == "zip":
if os.path.exists(archive + ".zip"):
os.unlink(archive + ".zip")
- run("zip -q -r9 %s.zip Python-%s"
+ run("zip -q -r9 %s.zip Python-Docs-%s"
% (archive, release))
# clean up the work area: