mirror of
https://github.com/wxWidgets/Phoenix.git
synced 2026-01-04 19:10:09 +01:00
Generate a zip file of the documentation suitable for use on pythonhosted.org
This commit is contained in:
46
build.py
46
build.py
@@ -990,16 +990,13 @@ def cmd_wxtools(options, args):
|
||||
msg('Command wxtools has been folded into command wxlib.')
|
||||
|
||||
|
||||
def cmd_docs_bdist(options, args):
|
||||
# TODO: get rid of this function after a while
|
||||
cmd_bdist_docs(options, args)
|
||||
|
||||
def cmd_bdist_docs(options, args):
|
||||
cmdTimer = CommandTimer('docs_bdist')
|
||||
cmdTimer = CommandTimer('bdist_docs')
|
||||
pwd = pushDir(phoenixDir())
|
||||
|
||||
cfg = Config()
|
||||
|
||||
msg("Archiving wxPython Phoenix documentation...")
|
||||
rootname = "%s-docs-%s" % (baseName, cfg.VERSION)
|
||||
tarfilename = "dist/%s.tar.gz" % rootname
|
||||
|
||||
@@ -1008,11 +1005,9 @@ def cmd_bdist_docs(options, args):
|
||||
if os.path.exists(tarfilename):
|
||||
os.remove(tarfilename)
|
||||
|
||||
msg("Archiving Phoenix documentation...")
|
||||
tarball = tarfile.open(name=tarfilename, mode="w:gz")
|
||||
tarball.add('docs/html', os.path.join(rootname, 'docs/html'),
|
||||
filter=lambda info: None if '.svn' in info.name else info)
|
||||
tarball.close()
|
||||
with tarfile.open(name=tarfilename, mode="w:gz") as tarball:
|
||||
tarball.add('docs/html', os.path.join(rootname, 'docs/html'),
|
||||
filter=lambda info: None if '.svn' in info.name else info)
|
||||
|
||||
if options.upload:
|
||||
uploadPackage(tarfilename, options, keep=5,
|
||||
@@ -1021,6 +1016,37 @@ def cmd_bdist_docs(options, args):
|
||||
msg('Documentation tarball built at %s' % tarfilename)
|
||||
|
||||
|
||||
# pythonhosted.org can host the wxPython documentation for us, so let's
|
||||
# use it for the docs associated with the latest release of wxPython. It
|
||||
# requires that the docs be in a .zip file with an index.html file at the
|
||||
# top level. To build this we'll just need to do like the above tarball
|
||||
# code, except add the files from within the docs/html folder so they will
|
||||
# all be at the top level of the archive. shutil.make_archive can be used
|
||||
# in this case because we don't need to rewrite the pathnames in the
|
||||
# archive.
|
||||
if options.release:
|
||||
msg("Archiving wxPython Phoenix documentation for pythonhosted.org...")
|
||||
rootname = "%s-docs-pythonhosted-%s" % (baseName, cfg.VERSION)
|
||||
zipfilename = "dist/%s.zip" % rootname
|
||||
|
||||
if os.path.exists(zipfilename):
|
||||
os.remove(zipfilename)
|
||||
|
||||
# with zipfile.ZipFile(zipfilename, 'w', zipfile.ZIP_DEFLATED) as zip:
|
||||
# pwd2 = pushDir('docs/html')
|
||||
|
||||
zipfilename = shutil.make_archive(base_name=os.path.splitext(zipfilename)[0],
|
||||
format="zip",
|
||||
root_dir="docs/html")
|
||||
|
||||
if options.upload:
|
||||
uploadPackage(zipfilename, options, keep=5,
|
||||
mask='%s-docs-pythonhosted-%s*' % (baseName, cfg.VER_MAJOR))
|
||||
|
||||
msg('Pythonhosted zip file built at %s' % zipfilename)
|
||||
|
||||
|
||||
|
||||
def cmd_sip(options, args):
|
||||
cmdTimer = CommandTimer('sip')
|
||||
cfg = Config()
|
||||
|
||||
@@ -53,25 +53,28 @@ HOWTO Release wxPython Phoenix
|
||||
(Twine doesn't know what to do with the docs and other files so they need
|
||||
to be excluded by the wildcard.)
|
||||
|
||||
14. Upload the docs, demos and pdb archive files to wxpython.org/Phoenix/release-extras/::
|
||||
14. Upload the wxPython-docs-pythonhosted*.zip documentation file using the
|
||||
form on PyPI. Remove the local copy of the file before the next step.
|
||||
|
||||
15. Upload the docs, demos and pdb archive files to wxpython.org/Phoenix/release-extras/::
|
||||
|
||||
VERSION={current release version number}
|
||||
ssh wxpython-extras "mkdir -p wxpython-extras/$VERSION"
|
||||
scp wxPython-[^0-9]* wxpython-extras:wxpython-extras/$VERSION
|
||||
|
||||
15. Upload the Linux wheels::
|
||||
16. Upload the Linux wheels::
|
||||
|
||||
scp -r linux wxpython-extras:wxpython-extras/
|
||||
|
||||
16. Tag the released revision in git, using a name like wxPython-4.0.0 (using
|
||||
17. Tag the released revision in git, using a name like wxPython-4.0.0 (using
|
||||
the actual version number of course.) Push the tag to all remotes.
|
||||
|
||||
17. Bump the version numbers in buildtools/version.py appropriately for the
|
||||
18. Bump the version numbers in buildtools/version.py appropriately for the
|
||||
next anticipated release, so future snapshot builds will be recognized as
|
||||
pre-release development versions for the next official release, not the
|
||||
one just completed.
|
||||
|
||||
18. If making an announcement about this release, (I think it's okay not to
|
||||
19. If making an announcement about this release, (I think it's okay not to
|
||||
for minor releases or smallish bug fixes,) send the text in
|
||||
packaging/ANNOUNCE.txt to the email addresses listed at the top of the
|
||||
file.
|
||||
|
||||
Reference in New Issue
Block a user