Poetry: usage on readthedocs.org

Created on 19 Dec 2018  ·  9Comments  ·  Source: python-poetry/poetry

  • [X] I have searched the issues of this repo and believe that this is not a duplicate.

Issue


How can I have readthedocs.org build a project that I'm developing using poetry?
Hopefully this is just a documentation issue...

Documentation

Most helpful comment

Is there any way to install dev-dependencies by pip install . instead of put sphinx in extra requirements?

version: 2

python:
  version: 3.6
  install:
    - method: pip
      path: .
      extra_requirements:
        - docs

All 9 comments

@cjw296 Did you run into a specific error when building your site?

My mkdocs site built fine without telling readthedocs.org anything about poetry: https://datafiles.readthedocs.io

How did you install your package? Doesn’t rtd only support pip (and maybe conda if you’re very lucky?)

On 19 Dec 2018, at 15:20, Jace Browning notifications@github.com wrote:

@cjw296 Did you run into a specific error when building your site?

My mkdocs site built fine without telling readthedocs.org anything about poetry: https://datafiles.readthedocs.io


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.

The only setting I changed from the defaults was to select the framework for my docs:

I don't think RTD needs the rest of your dependencies.

I use Sphinx, and to build correctly, the package needs to be installed.

Aside from documentation I don't belive this is an issue of poetry, but of readthedocs.
Installing it there should not be a problem, but I was not successful running poetry there, because of missing system packages.

However, documentation on how to use RTD would be great! 👍

Not a super elegant solution, but you can use a requirements.txt to manually point to the packages you want autodoc to find. E.g add the following file to your repo root:

requirements.readthedocs.txt

src/my_package
src/my_other_package

Then enable requirements.readthedocs.txt in the readthedocs admin panel. That's enough to allow autodoc to find the package. You may need to add some dependencies there too.

Is there any way to install dev-dependencies by pip install . instead of put sphinx in extra requirements?

version: 2

python:
  version: 3.6
  install:
    - method: pip
      path: .
      extra_requirements:
        - docs

I suspect this requires the "editable install support as an extension to PEP 517" mentioned in https://github.com/pypa/pip/issues/6314#issuecomment-470041521.

Was this page helpful?
0 / 5 - 0 ratings