Skip to content

Small bat files to build docs on Windows #45813

Closed

Description

@tiran
BPO 1472
Nosy @loewis, @birkenfeld, @amauryfa, @tiran
Files
  • builddoc.bat
  • Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

    Show more details

    GitHub fields:

    assignee = None
    closed_at = <Date 2008-01-18.12:00:32.292>
    created_at = <Date 2007-11-20.03:27:34.178>
    labels = ['type-feature', 'OS-windows']
    title = 'Small bat files to build docs on Windows'
    updated_at = <Date 2008-01-18.12:00:32.291>
    user = 'https://github.com/tiran'

    bugs.python.org fields:

    activity = <Date 2008-01-18.12:00:32.291>
    actor = 'christian.heimes'
    assignee = 'none'
    closed = True
    closed_date = <Date 2008-01-18.12:00:32.292>
    closer = 'christian.heimes'
    components = ['Windows']
    creation = <Date 2007-11-20.03:27:34.178>
    creator = 'christian.heimes'
    dependencies = []
    files = ['8784']
    hgrepos = []
    issue_num = 1472
    keywords = ['patch']
    message_count = 13.0
    messages = ['57690', '57692', '59264', '59682', '59714', '59717', '59718', '59721', '59733', '59820', '59826', '59856', '60088']
    nosy_count = 5.0
    nosy_names = ['loewis', 'georg.brandl', 'amaury.forgeotdarc', 'christian.heimes', 'JosephArmbruster']
    pr_nums = []
    priority = 'low'
    resolution = 'fixed'
    stage = None
    status = 'closed'
    superseder = None
    type = 'enhancement'
    url = 'https://bugs.python.org/issue1472'
    versions = ['Python 2.6', 'Python 3.0']

    Activity

    1. tiran commented on Nov 20, 2007

      @tiran
      MemberAuthor

      I've created a small bat files that mimics the Makefile in Docs/. It may
      be useful for some Windows users.

    2. loewis commented on Nov 20, 2007

      loewismannequin
      Mannequin

      See also Tools/buildbot/buildmsi.bat. With cygwin installed, building
      the documentation is as simple as

      bash.exe -c 'cd Doc;make PYTHON=python2.5 update htmlhelp'
      "%ProgramFiles%\HTML Help Workshop\hhc.exe" Doc\build\htmlhelp\pydoc.hhp

    3. JosephArmbruster commented on Jan 4, 2008

      JosephArmbrustermannequin
      Mannequin

      I tested this out out in the trunk (59706). Placed builddoc.bat in /Doc
      and ran the following commands:

      builddoc checkout
      builddoc html
      builddoc htmlhelp
      builddoc web

      All appeared to work fine on my system.

    4. amauryfa commented on Jan 10, 2008

      @amauryfa
      Contributor

      This batch file is a good idea. I have two remarks:

      • it assumes that the python program is spelled "python25".
        This could be configurable. Something along:
        IF "%PYTHON%"=="" SET PYTHON=python25
        Or is there a better way?

      • Also, I suggest to insert a
        SETLOCAL
        command on the second line of the script, so that the variables set in
        the script are restored at the end.

    5. JosephArmbruster commented on Jan 11, 2008

      JosephArmbrustermannequin
      Mannequin

      Is referencing the built python binary in the build tree a good idea?
      Just in case they do not have python installed on the system already?

    6. tiran commented on Jan 11, 2008

      @tiran
      MemberAuthor

      Joseph Armbruster wrote:

      Is referencing the built python binary in the build tree a good idea?
      Just in case they do not have python installed on the system already?

      The doc builder requires Python 2.5 and *may* work with 2.6 but
      definitely not with 3.x.

    7. JosephArmbruster commented on Jan 11, 2008

      JosephArmbrustermannequin
      Mannequin

      Ah, good to know :-)

    8. birkenfeld commented on Jan 11, 2008

      @birkenfeld
      Member

      Christian Heimes schrieb:

      Christian Heimes added the comment:

      Joseph Armbruster wrote:
      > Is referencing the built python binary in the build tree a good idea?
      > Just in case they do not have python installed on the system already?

      The doc builder requires Python 2.5 and *may* work with 2.6 but
      definitely not with 3.x.

      It should work with 2.6 without problems.

      3k compatibility is another story, of course :)

    9. JosephArmbruster commented on Jan 11, 2008

      JosephArmbrustermannequin
      Mannequin

      Which brings up a question. Would all things in the tree ideally work
      with the version that was built from checkout? Just in case something
      like this comes up in the future, i'd want to know if it is better to
      have it configured as this or to auto-magically point to the "right
      place" in the build tree for the python binary.

      Curiosity more than anything.

    10. birkenfeld commented on Jan 12, 2008

      @birkenfeld
      Member

      Ideally, yes. The case of the doc build is a bit more complicated
      because it relies on external libraries which may or may not work with
      the tree version.

    11. loewis commented on Jan 12, 2008

      loewismannequin
      Mannequin

      Would all things in the tree ideally work
      with the version that was built from checkout?

      It's more important that it works with many old versions,
      than with its own version. "python" should be on the path,
      and ideally, whatever you get there should work.

      The documentation, unfortunately, requires 2.5 as a minimum.
      It should stay that way for a long time, so that at some
      point, it works with whatever people typically have on their
      machines.

    12. birkenfeld commented on Jan 13, 2008

      @birkenfeld
      Member

      FTR, I'm currently removing all 2.5isms from Sphinx.

    13. tiran commented on Jan 18, 2008

      @tiran
      MemberAuthor

      I've implemented Amaury's suggestions and also added a call to hhc.exe
      if the target is htmlhelp. The files was added in r60048

    14. transferred this issue fromon Apr 10, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

    Metadata

    Metadata

    Assignees

    No one assigned

      Labels

      Projects

      No projects

        Milestone

        No milestone

        Relationships

        None yet

        Development

        No branches or pull requests

        Issue actions