[Python-checkins] python/dist/src/Doc/tools mksourcepkg,1.5,1.6
fdrake@users.sourceforge.net
fdrake@users.sourceforge.net
Fri, 09 Aug 2002 13:20:52 -0700
Update of /cvsroot/python/python/dist/src/Doc/tools
In directory usw-pr-cvs1:/tmp/cvs-serv1153/tools
Modified Files:
mksourcepkg
Log Message:
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.
Index: mksourcepkg
===================================================================
RCS file: /cvsroot/python/python/dist/src/Doc/tools/mksourcepkg,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** mksourcepkg 2 Feb 2001 15:48:00 -0000 1.5
--- mksourcepkg 9 Aug 2002 20:20:50 -0000 1.6
***************
*** 74,78 ****
tempdir = tempfile.mktemp()
os.mkdir(tempdir)
! pkgdir = os.path.join(tempdir, "Python-" + release)
os.mkdir(pkgdir)
pwd = os.getcwd()
--- 74,78 ----
tempdir = tempfile.mktemp()
os.mkdir(tempdir)
! pkgdir = os.path.join(tempdir, "Python-Docs-" + release)
os.mkdir(pkgdir)
pwd = os.getcwd()
***************
*** 91,102 ****
# might not have done a "cvs login" to the anonymous server.
# That avoids a lot of painful gunk here.
! os.chdir(pkgdir)
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))
else:
! run("cvs -Q -d%s checkout -d Doc python/dist/src/Doc" % cvsroot)
# remove CVS directories
for p in ('*/CVS', '*/*/CVS', '*/*/*/CVS'):
--- 91,103 ----
# might not have done a "cvs login" to the anonymous server.
# That avoids a lot of painful gunk here.
! os.chdir(tempdir)
if not quiet:
print "--- current directory is:", pkgdir
if 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 Python-Docs-%s python/dist/src/Doc"
! % (cvsroot, release))
# remove CVS directories
for p in ('*/CVS', '*/*/CVS', '*/*/*/CVS'):
***************
*** 106,110 ****
LICENSE = os.path.normpath(
os.path.join(mydir, os.pardir, os.pardir, "LICENSE"))
! shutil.copyfile(LICENSE, "Doc/LICENSE")
if tools:
archive = "doctools-" + release
--- 107,111 ----
LICENSE = os.path.normpath(
os.path.join(mydir, os.pardir, os.pardir, "LICENSE"))
! shutil.copyfile(LICENSE, "LICENSE")
if tools:
archive = "doctools-" + release
***************
*** 112,116 ****
for d in ("api", "dist", "doc", "ext", "inst",
"lib", "mac", "ref", "tut"):
! shutil.rmtree(os.path.join(os.path.join(pkgdir, "Doc"), d))
else:
archive = "latex-" + release
--- 113,117 ----
for d in ("api", "dist", "doc", "ext", "inst",
"lib", "mac", "ref", "tut"):
! shutil.rmtree(os.path.join(pkgdir, d))
else:
archive = "latex-" + release
***************
*** 122,134 ****
for format in formats:
if format == "bzip2":
! run("tar cf - Python-%s | bzip2 -9 >%s.tar.bz2"
% (release, archive))
elif format == "gzip":
! run("tar cf - Python-%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"
% (archive, release))
--- 123,135 ----
for format in formats:
if format == "bzip2":
! run("tar cf - Python-Docs-%s | bzip2 -9 >%s.tar.bz2"
% (release, archive))
elif format == "gzip":
! 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-Docs-%s"
% (archive, release))