|
| 1 | +In this directory you can build the Python documentation in a form that |
| 2 | +is suitable for access with Apple Help Viewer. This will enable the |
| 3 | +"Python Documentation" menu entries in the MacPython IDE Help menu. |
| 4 | + |
| 5 | +Unfortunately the procedure to build the docs is not very streamlined. |
| 6 | + |
| 7 | +First, edit setup.py. At the top, edit MAJOR_VERSION and MINOR_VERSION, |
| 8 | +and check that DESTDIR makes sense. The documentation will be installed |
| 9 | +inside PythonIDE.app. |
| 10 | + |
| 11 | +In DocBuild.initialize_options, set self.download to True if you want to |
| 12 | +download the docs. Set it to False if you want to build the docs from |
| 13 | +the source tree, but this requires LaTex and lots of other stuff. |
| 14 | +Doable, but not easy. |
| 15 | + |
| 16 | +Second, if you want to download the docs you may need to do a couple |
| 17 | +more edits. The way the docs are packaged will often change between |
| 18 | +major releases. Fiddle DocBuild.downloadDocs to make it do the right |
| 19 | +thing (download the docs from python.org, unpack them, rename the |
| 20 | +directory to "build/html"). |
| 21 | + |
| 22 | +After these edits you should be ready to roll. "pythonw setup.py build" |
| 23 | +should download and unpack (or build) the docs. Next, it will do some |
| 24 | +magic to make the docs indexable. Finally, it will run the Apple Help |
| 25 | +Indexing Tool. (This last step is the reason you must use "pythonw" as |
| 26 | +opposed to "python"). Usually it will time out while waiting for AHIT to |
| 27 | +do its work. Wait until AHIT is done. |
| 28 | + |
| 29 | +Now you're ready to install with "python setup.py install". |
| 30 | + |
| 31 | +After this is done test your work. Fire up PythonIDE, and check that |
| 32 | +Help->Python Documentation brings up the documentation in the Help Viewer. |
| 33 | +Also open an IDE edit window, type something like "import sys", select |
| 34 | +"import", and use Help->Lookup in Python Documentation to check that the |
| 35 | +index has been generated correctly. |
0 commit comments