Commits

Vinay Sajip committed 888c1e7

Documentation build changes.

Comments (0)

Files changed (3)

-===========================
---------------
---------------
---------------------
  py
  py -2.6
  py -3
-------------
    #! python
    import sys
    sys.stdout.write("hello from Python %s\n" % (sys.version,))
   py hello.py
    #! python3
----------------------
-------------
-------------
  #! /usr/bin/python
--------------------------
  #! /usr/bin/python -v
-------------
-------------
---------------------------
    Two .ini files will be searched by the launcher - ``py.ini`` in the
    current user's "application data" directory (ie, the directory returned
    by calling the Windows function SHGetFolderPath with CSIDL_APPDATA) and 
    ``py.ini`` in the same directory as the launcher.  The same .ini files are
    used for both the 'console' version of the launcher (ie, py.exe) and for
    the 'windows' version (ie, pyw.exe)
    
    Customization specified in the "application directory" will have
    precendence over the one next to the executable, so a user, who may not
    have write access to the .ini file next to the launcher, can override
    commands in that global .ini file)
-----------------------------------
  ``python2`` will use the latest Python 2.x version installed and
  the command ``python3`` will use the lastest Python 3.x installed.
  options at all as the versions are fully specified.
  the latest installed Python 3 version.
  implementation of 3.1 whereas the command ``python3`` will use the latest
  installed Python (PY_PYTHON was not considered at all as a major
  version was specified.)
  ``python`` and ``python3`` will both use specifically 3.1
  [defaults]
  python=3.1
  containing:
  [defaults]
  python=3
  python3=3.1
-----------
-----------
+===========================
---------------
---------------
---------------------
  py
  py -2.6
  py -3
-------------
    #! python
    import sys
    sys.stdout.write("hello from Python %s\n" % (sys.version,))
   py hello.py
    #! python3
----------------------
-------------
-------------
  #! /usr/bin/python
--------------------------
  #! /usr/bin/python -v
-------------
-------------
---------------------------
    Two .ini files will be searched by the launcher - ``py.ini`` in the
    current user's "application data" directory (ie, the directory returned
    by calling the Windows function SHGetFolderPath with CSIDL_APPDATA) and 
    ``py.ini`` in the same directory as the launcher.  The same .ini files are
    used for both the 'console' version of the launcher (ie, py.exe) and for
    the 'windows' version (ie, pyw.exe)
    
    Customization specified in the "application directory" will have
    precendence over the one next to the executable, so a user, who may not
    have write access to the .ini file next to the launcher, can override
    commands in that global .ini file)
-----------------------------------
  ``python2`` will use the latest Python 2.x version installed and
  the command ``python3`` will use the lastest Python 3.x installed.
  options at all as the versions are fully specified.
  the latest installed Python 3 version.
  implementation of 3.1 whereas the command ``python3`` will use the latest
  installed Python (PY_PYTHON was not considered at all as a major
  version was specified.)
  ``python`` and ``python3`` will both use specifically 3.1
  [defaults]
  python=3.1
  containing:
  [defaults]
  python=3
  python3=3.1
-----------
-----------
+#!python3.2
+try:
+    from docutils.core import publish_cmdline
+except ImportError:
+    publish_cmdline = None
+import os.path
+import sys
+
+def main():
+    if publish_cmdline is None:
+        sys.stderr.write('Unable to produce documentation: docutils not found.\n')
+        rc = 1
+    else:
+        infile = os.path.join('Doc', 'launcher.rst')
+        outfile = os.path.join('Doc', 'launcher.html')
+        try:
+            publish_cmdline(writer_name='html',
+                            argv=[infile, outfile])
+            rc = 0
+        except Exception:
+            e = sys.exc_info()[1]
+            sys.stderr.write('Failed when producing documentation: %s\n',
+                             e)
+            rc = 2
+    return rc
+
+if __name__ == '__main__':
+    sys.exit(main())
 @echo off
+\python32\python builddoc.py
 REM x86 ...
-\python32\python makemsi.py -o launchsys Platform=x86 Version=1.0.0.0 "Manufacturer=Vinay Sajip" ToSystem launcher
+REM \python32\python makemsi.py -o launchsys Platform=x86 Version=1.0.0.0 "Manufacturer=Vinay Sajip" ToSystem launcher
 \python32\python makemsi.py -o launchwin Platform=x86 Version=1.0.0.0 "Manufacturer=Vinay Sajip" ToWindows launcher
 \python32\python makemsi.py Platform=x86 Version=1.0.0.0 "Manufacturer=Vinay Sajip" launcher
 
 REM x64 ...
-\python32\python makemsi.py -o launchsys Platform=x64 Version=1.0.0.0 "Manufacturer=Vinay Sajip" ToSystem launcher
+REM \python32\python makemsi.py -o launchsys Platform=x64 Version=1.0.0.0 "Manufacturer=Vinay Sajip" ToSystem launcher
 \python32\python makemsi.py -o launchwin Platform=x64 Version=1.0.0.0 "Manufacturer=Vinay Sajip" ToWindows launcher
 \python32\python makemsi.py Platform=x64 Version=1.0.0.0 "Manufacturer=Vinay Sajip" launcher