-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
Provide sphinx
command and integrate sphinx commands
#5618
Comments
+1 |
+1 |
1 similar comment
+1 |
👍 Very good idea! I've always hated the fact that two different platform-specific scripts ( I think having a single command However, please also consider the use-case when the
This works great if you have multiple Python versions and/or environments.
... and for
Instead of
I'm using many Python-based tools, and this way I never have to remember the names of the "executables" (because sometimes they are different than the module name, which is annoying) and I don't have to worry if I've set up the right If you change the main
... please make it also possible to do exactly the same by running this:
On top of all this, it would be great to have a similar interface to use Sphinx from a Python script. Some time ago, I've tried to use the Ideally, the As users, we should have the free choice of using either of the 3 methods, and ideally all 3 methods should look similar and work in a similar way. |
relative issees/PRs
|
Idea
|
The goal of this issue is "Makefile-less sphinx project". So I agreed for @astromatt 's idea basically. But we need to discuss about some points.
I suppose large amount of sphinx users use
I don't think so. I think sourcedir and builddir are runtime options (some kinds of other options are also). For example, |
Agreed. I think there should be a deprecation period for this. Perhaps for the new, unified
We're discussing this at #6939, but I think builddir isn't really a runtime option and is usually static for a given project so it does make sense to be in |
+1! |
I would second this and say that all options should be configurable in conf.py (of course, passing options directly to the command line would override the configured defaults). In general, the sphinx command needs to be able to build the documentation with just one command, e.g.,
not
or
If the user is required to type all these things, projects will just continue to use a Makefile to wrap it. Right now, I can build the docs in just about any project that uses Sphinx with
which is less than 10 characters. |
What is the status of this? There is |
Proposal
I propose to integrate multiple commands into ONE
sphinx
command and provide existing commands as subcommands.In Japanese
Subject: sphinx コマンドを提供し、sphinxの各コマンドを統合する私は、複数あるコマンドを1つのsphinxコマンドに統合し、既存のコマンドをサブコマンドとして提供することを提案します。
Background
We have several sphinx related commands as:
Makefile
andmake.bat
are provided to use the make command as a thin wrapper forsphinx-build
. The make command is very flexible and easy to understand for people familiar with make. However, it was unfortunate for some unfamiliar persons to hinder proper reporting when something goes wrong (#1693, #2521), or not to work in some shell environments (#3145). We are also receiving proposals to makeMakefile
/make.bat
highly functional which wants to make such an unkind part more kind, more convenient (e3ae24f, #3741). At the same time, there is also a proposal to discard the make command and replace it with a make command that can be written in Python (#3196).It is the purpose of this proposal to finish these situations and make it a simple world.
For this reason, I propose the following changes to the following.
sphinx
command.Makefile
/make.bat
generating on quickstart.sphinx- *
commandssphinx
command (Provide subcommand plugin feature etc)In Japanese
`Makefile` と `make.bat` は `sphinx-build` の薄いラッパーとしてmakeコマンドを使えるように提供されています。makeコマンドはmakeを使い慣れている人にとってはとても柔軟で分かりやすいものです。しかし、不慣れな人にとってはなにか問題が発生した場合に適切にレポートする妨げとなったり (#1693, #2521)、一部のシェル環境では動作しないといった不親切な面もありました(#3145)。こういった不親切な部分をより親切にしたい、より便利にしたいというMakefile/make.batを高機能化する提案もいただいています(e3ae24f, #3741)。同時に、makeコマンドを捨ててPythonで書けるmake系コマンドに置き換える提案もあります (#3196)。こういった状況を終わらせ、シンプルな世界にするのがこの提案の目的です。
このため、大きく以下の変更を提案します。
sphinx
コマンドの導入による既存コマンドの引き継ぎMakefile
/make.bat
提供をオプション化sphinx-*
コマンドの廃止と削除sphinx
コマンドの高機能化(サブコマンドプラグイン機能を提供等)Step1: taking over existing command features by introducing
sphinx
command.sphinx
command has global options such as--version
,--verbose
sphinx quickstart
invokesphinx-quickstart
feature.sphinx build html
invokesphinx-build -M html
featuresphinx autodoc
invokesphinx-apidoc
and/orsphinx-autogen
featureStep2: Optionalization of
Makefile
/make.bat
generating on quickstart.Makefile
/make.bat
will not be created by default.Makefile
/make.bat
by option that invokesphinx
command instead ofsphinx-build
Makefile
/make.bat
by option that will be removed on Step3 because it invokesphinx-build
Step3: Stepwise deprecate and remove the existing
sphinx- *
commandssphinx-
commandssphinx-
commandsStep4: enhancement of
sphinx
commandsphinx intl
sub command.make clean html
Timeline
Maybe..
sphinx
commandOther related issues/PRs
The text was updated successfully, but these errors were encountered: