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

setup.py docs does not work #142

Closed
Moritz90 opened this issue Jan 31, 2018 · 4 comments
Closed

setup.py docs does not work #142

Moritz90 opened this issue Jan 31, 2018 · 4 comments
Labels
bug Something isn't working

Comments

@Moritz90
Copy link

After creating a new project with pyscaffold, I tried to run python setup.py docs. This was the result:

usage: setup.py [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]
or: setup.py --help [cmd1 cmd2 ...]
or: setup.py --help-commands
or: setup.py cmd --help

error: invalid command 'build_sphinx'

I then tried running python setup.py build_sphinx directly, but this failed as well (output anonymized):

running build_sphinx
Running Sphinx v1.7.0b2
usage: usage: setup.py [OPTIONS] -o <OUTPUT_PATH> <MODULE_PATH> [EXCLUDE_PATTERN, ...]
setup.py: error: unrecognized arguments: {$dir}/docs/../src/{$module}

Configuration error:
The configuration file (or one of the modules it imports) called sys.exit()

@FlorianWilhelm
Copy link
Member

FlorianWilhelm commented Jan 31, 2018

Did you install sphinx? Or better how did you install sphinx? Does import sphinx in the Python shell work? Which version of Sphinx is installed?

@FlorianWilhelm FlorianWilhelm added the bug Something isn't working label Feb 1, 2018
@FlorianWilhelm
Copy link
Member

I could reproduce this in case Sphinx is not installed. Currently PyScaffold tries to install Sphinx locally as egg file but I don't like that solution any more and in Version 3.0 it even breaks. Better is to break directly and tell the user to install Sphinx. So the workaround for you is just to install Sphinx but I will add a better error message.

@Moritz90
Copy link
Author

Moritz90 commented Feb 5, 2018

I can confirm that everything works after manually installing sphinx. I was relying on the documentation which claimed this wasn't necessary.

I guess this is mostly a bug in the documentation, then.

@FlorianWilhelm
Copy link
Member

@Moritz90, thanks for confirming.

The problem was fixed in commit a4cf5ab, i.e., a more meaningful error message is emitted and the documentation was changed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants