Skip to content

Support setuptools/distribute extras dependencies #173

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

Closed
domenkozar opened this issue Mar 11, 2012 · 10 comments · Fixed by #2368 or readthedocs/readthedocs-build#16
Closed

Support setuptools/distribute extras dependencies #173

domenkozar opened this issue Mar 11, 2012 · 10 comments · Fixed by #2368 or readthedocs/readthedocs-build#16
Labels
Improvement Minor improvement to code

Comments

@domenkozar
Copy link
Contributor

For example, I have in one of my projects:

  extras_require={
      'test': ['webtest', 'nose', 'coverage'],
      'develop': ['bpython', 'z3c.checkversions [buildout]'],
  },

For API documentation, 'test' packages need to be installed, would be nice if rtd supported this feature :)

@ericholscher
Copy link
Member

Is there a concept of documentation as a key here? I don't think it makes sense to install necessarily the test dependencies, but if there is one for creating the documentation, I would get behind that.

@domenkozar
Copy link
Contributor Author

Extras can be anything. Some people do like to put 'docs' extras, where they enumerate all dependencies needed to be installed for documentation generation.

@ericholscher
Copy link
Member

Closing this for now. I don't really see how it makes sense for RTD to support. If there was some kind of standard for "things I need to install to build docs", we could support that. Something in distribute, or a documentation_requirements.txt in the top-level or requirements/documentation.txt for pip. RTD might be able to take the lead in adding that, but this ticket doesn't really mean that. So feel free to re-open with a proposal for something awesome like that :)

@remcohaszing
Copy link

I would like to reopen this issue for discussion. Using setuptools and specifying extras_require has become pretty standard. Pip supports installing these extras using

pip install project\[docs,other,extra\]

Using extras_require instead of requirements prevent cluttering the root directory of a project.

Since a requirements file can already be specified for RTD, I think 'extras' can be specified just as easy.

@vrde
Copy link

vrde commented Mar 2, 2016

Hello from the future! I agree with @remcohaszing, extras_require is the standard approach, can someone from rtfd reopen this issue?

@ericholscher
Copy link
Member

What do you want to be able to do that you can't do now? Can't you just specify the extras_require in your requirements file?

@vrde
Copy link

vrde commented Mar 4, 2016

hi @ericholscher!

Instead of requirements.txt, I'd like to use my setup.py to specify dependencies to build the docs. Right now in our project we have duplication between setup.py and requirements.txt. Yes, it's not duplicated anymore if we remove the dependencies from setup.py, but I really like the idea to keep everything in a single place.

In the advanced settings I can only set the path to the requirements.txt, but it'd be a nice idea to support also dependencies specified in extras_require.

image

@agjohnson
Copy link
Contributor

I'm going to reopen this. I think stronger integration with setup.py would be a good thing for module maintainers, and other folks that have no other need for requirements files. This functionality likely won't make it into project options, but would be a good addition to our readthedocs.yaml and https://github.com/rtfd/readthedocs-build

Leaving it open here for now, though it will likely require work in multiple repos. If anyone wants to tackle this, there is some previous work adding similar options to the yaml spec here and in readthedocs-build.

@agjohnson agjohnson reopened this Mar 4, 2016
@Themanwithoutaplan
Copy link

I'm not a fan of the setuptools extensions of setup.py but it would be nice to see pip install -e . being used as this will pickup any dependencies required where python setup.py install will not. :-(

@kdeldycke
Copy link
Contributor

Discussion about this issue now moved to #2368 I guess.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Improvement Minor improvement to code
Projects
None yet
7 participants