Skip to content
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

Support specifying 'python setup.py build_sphinx' as an alternative build command #1857

Closed
tjanez opened this issue Dec 9, 2015 · 5 comments
Labels
Improvement Minor improvement to code Needed: design decision A core team decision is required

Comments

@tjanez
Copy link

tjanez commented Dec 9, 2015

According to Build Process documentation, RTD's build process runs:

sphinx-build -b html . _build/html

to build the documentation (html being replaced with the correct backend).

Would it be possible to support specifying an alternative build command, e.g.:

python setup.py build_sphinx

A nice advantage why I'm using python setup.py build_sphinx in my projects is that it allows one to avoid redefining project's project, version, release and copyright variables by specifying the following in setup.py:

    command_options={
        'build_sphinx': {
            'project': ('setup.py', name),
            'version': ('setup.py', version),
            'release': ('setup.py', release),
            'copyright': ('setup.py', copyright),
        }
    }

Using the above, these values are defined only once in a project.

@agjohnson
Copy link
Contributor

I'm -0 on this change, there are several other ways around this already, and we're working in another direction to simplify the configuration process. This is also an option specific to Python, we're moving more towards language-agnostic options.

@agjohnson agjohnson added Improvement Minor improvement to code Needed: design decision A core team decision is required labels Dec 14, 2015
@ericholscher
Copy link
Member

Agreed. Closing this, as we pass specific configuration to the sphinx build, and supporting vanity invocations isn't a good idea for us.

@tivaliy
Copy link

tivaliy commented Dec 15, 2017

For some reason I need to run build as:
python setup.py build_sphinx
So is it possible to invoke command in a such way using readthedocs.yml or any other approach (configuration process)?

@jonas-eschle
Copy link

For some reason I need to run build as: python setup.py build_sphinx So is it possible to invoke command in a such way using readthedocs.yml or any other approach (configuration process)?

What is the reason behind this? Maybe the issue is solved in a better way differently

@humitos
Copy link
Member

humitos commented Sep 1, 2022

In case this is still an issue for anybody, you can take a look at https://docs.readthedocs.io/en/latest/build-customization.html that allows you to run extra commands on Read the Docs build process.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Improvement Minor improvement to code Needed: design decision A core team decision is required
Projects
None yet
Development

No branches or pull requests

6 participants