8000 Remove the 'Without make' section by matrixise · Pull Request #327 · python/devguide · GitHub
[go: up one dir, main page]

Skip to content

Remove the 'Without make' section #327

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Aug 6, 2018

Conversation

matrixise
Copy link
Member

Firstly, 'Without make' makes no sense because we can pass a parameter to the
make command, for example, make html, or make latexpdf and
we will get the same result.

Secondly, We have to provide an easy way for the developers which want
to generate the documentation.

Firstly, 'Without make' makes no sense because we can pass a parameter to the
``make`` command, for example, ``make html``, or ``make latexpdf`` and
we will get the same result.

Secondly, We have to provide an easy way for the developers which want
to generate the documentation.
@matrixise
Copy link
Member Author

Hi all,

I just created this PR, but I prefer that we discuss before an eventual merge.

@Mariatta and @ned-deily

@JulienPalard
Copy link
Member

Why removing it? I can imagine some distro without make where it make sense to be able to simply build the doc this way.

@ezio-melotti
Copy link
Member

Are you sure that using make is always possible?

I suggest 3 different ways to deal with this (depending on the answer of the previous question):

  1. leave it as is;
  2. Merge the two sections and convert the latter to a single line/paragraph at the end (It is also possible to build the documentation by running `sphinx-build -b<builder> . build/<builder>` in the `Doc` dir, where `<builder>` is one of html, text, latex, or htmlhelp.);
  3. Remove the section and the header of the previous one (using make);

@ned-deily
Copy link
Member

Are you sure that using make is always possible?

We only support building Python itself with make for non-Windows platforms, so it's reasonable to assume that make is available for Doc builds on those platforms, too.

IMO, a primary purpose of the devguide is to provide one standard way to accomplish a task, in this case, produce the most commonly used docs, the HTML version. It is not intended to be a reference guide for the whole doc build process. The information about using sphinx-build directly appears to be duplicated from that in Doc/README.rst. How about just replacing the without make section with a reference to the README.rst?

Copy link
Member
@Mariatta Mariatta left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  1. There is conflict now. Please rebase.
  2. Please remove the "Using make / make.bat" heading (lines 1476-1477)

Copy link
Member
@terryjreedy terryjreedy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please close this PR and leave this little section alone. It hurts nothing. [Edit: see next comment for revised suggestion.] It tells a developer exactly the command needed to build the docs in a customized OS shell script.

Here, for example, is my F:/dev/dmake.bat.

echo off
if "%1" EQU "36" cd f:\dev\36\Doc
if "%1" EQU "37" cd f:\dev\37\Doc
if "%1" EQU "38" cd f:\dev\3x\Doc
C:\programs\python36\scripts\sphinx-build -bhtml . build/html
cd ..
call python.bat -c "from idlelib.help import copy_strip; copy_strip()"

When I first wrote my script, I tried calling make.bat to call sphinx-build but that did not work so I had to call sphinx-build directly.

There is a separate issue that sphinx-build seems to no longer work for me either in the above or in make.bat. When I run the .bat file above, I get a failure message. When I run make.bat, the failure message does not appear, and it says "Build succeeded." -- when it also failed. I prefer the former. I will ask on core-mentorship about the failure.

@terryjreedy
Copy link
Member

Ned is correct that this section is indeed a copy. It can be criticized for repeating 'install sphinx' (already said above) and being too general (the topic is building the html version). I suggest condensing it to just two lines before the 'See also' note, with the specific command.

To build html without make, run the following in the Doc directory:
sphinx-build -bhelp . build/html

I suggest putting this before 'see also' because 'see also' applies to this as well as the make stuff.

@brettcannon
Copy link
Member

But people can always read the Makefile. If people feel that strongly about this then they can simply state the fact that people can always inspect the Makefile manually to see what it's doing. Otherwise we are needlessly duplicating what is in the Makefile in the docs which becomes annoying when maintaining the Makefile.

@terryjreedy
Copy link
Member

Reading the windows make.bat is a real pain and extracting the single command needed for developers to check their docs patches is not completely trivial. Make.bat also merges blurbs into the news log, which is irrelevant unless one uses rst makeup.

@brettcannon
Copy link
Member

OK, so it sounds like we are not going to reach consensus beyond "keep it as small as possible", so let's aim for that.

@willingc
Copy link
Collaborator

Hi @matrixise,

Let's get the PR completed finished off. I have two suggestions below if you would like to add them. If you are too busy post-PyCon to do so, I will happily add them. Just let me know... Thanks!

I left a message on the open issue #324:

Next actions:

@Mariatta Mariatta added the status-stale The PR hasn't been updated in a while, and pending removal label Jul 21, 2018
@Mariatta Mariatta removed the status-stale The PR hasn't been updated in a while, and pending removal label Jul 31, 2018
@matrixise
Copy link
Member Author

@willingc when you have time, just check my new commit.

PS: I am really sorry for this very late answer :/

documenting.rst Outdated
------------

Install the Sphinx, blurb, and python-docs-theme packages from PyPI.
Sometimes we directly want to execute the sphinx-build tool, in this case, you can
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"tool instead of through make (although the latter is still the preferred way). In this case,"""

documenting.rst Outdated

Install the Sphinx, blurb, and python-docs-theme packages from PyPI.
Sometimes we directly want to execute the sphinx-build tool, in this case, you can
use the following command line but before you have to install the Sphinx, blurb,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"command line from the Doc directory (make sure to install Sphinx, blurb, and python-docs-theme from PyPI)::" and link to their PyPI pages. This then means you should remove line 1575.

@matrixise
Copy link
Member Author

@brettcannon just updated, thank you for your review.

@matrixise matrixise merged commit 25c601a into python:master Aug 6, 2018
@willingc
Copy link
Collaborator
willingc commented Aug 7, 2018

Thanks @matrixise for finishing this off. Sorry I missed the review as I was taking some vacation 👍

AA-Turner pushed a commit to AA-Turner/devguide that referenced this pull request Jun 17, 2022
Explain how to use `sphinx-build` via the command line.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants
0