Skip to content

readthedocs.yaml not respecting requirements_file directive #4807

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
feuGeneA opened this issue Oct 24, 2018 · 2 comments
Closed

readthedocs.yaml not respecting requirements_file directive #4807

feuGeneA opened this issue Oct 24, 2018 · 2 comments
Labels
Support Support question

Comments

@feuGeneA
Copy link

Details

I have two requirements, and they seem to be supported independently, but not together.

One requirement is that my docs be built from a folder that's deep within my repo source (specifically, python-projects/order_utils/setup.py). For this I can use a requirements.txt file, and if I specify that file in Admin, Advanced settings, then the build will properly find my project.

The other requirement is that my setup.py demands Python >= 3.6. To work with this, I've put in place a readthedocs.yaml file, specifying python: version: 3.6, and it does indeed use that version of the interpreter.

However, mixing these two together does not work. The crux of my problem seems to be that the build isn't using the requirements_file specified in my readthedocs.yaml.

However, combining these two approaches does not work.

Expected Result

A build using the interpreter and requirements file specified in readthedocs.yaml.

Actual Result

Using a requirements file but no readthedocs.yaml

Processing ./python-packages/order_utils
0x-order-utils requires Python '>=3.6, <4' but the running Python is 3.5.2
You are using pip version 9.0.1, however version 18.1 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.

https://readthedocs.org/projects/0x-order-utils/builds/7994051/
This shows that my requirements file works.

Using a readthedocs.yaml without specifying a requirements_file

Using base prefix '/home/docs/.pyenv/versions/3.6.2'
...
python: can't open file 'setup.py': [Errno 2] No such file or directory

https://readthedocs.org/projects/0x-order-utils/builds/7994020/
This build shows that my readthedocs.yaml file is getting me the interpreter I need, but of course it doesn't know how to find my setup.py.

Using a readthedocs.yaml that specifies a requirements_file

Using base prefix '/home/docs/.pyenv/versions/3.6.2'
...
python: can't open file 'setup.py': [Errno 2] No such file or directory

https://readthedocs.org/projects/0x-order-utils/builds/7994617/
This build shows that, even though readthedocs.yaml contains requirements_file: requirements.readthedocs.txt, the behavior is the same as when it doesn't contain that directive.

@stsewd
Copy link
Member

stsewd commented Oct 24, 2018

requirements_file is to indicate a requirements file only, it doesn't mean to change the working directory. But I think your problem is solved, this is from your build https://readthedocs.org/projects/0x-order-utils/builds/7994617

screenshot_2018-10-24 0x-order-utils read the docs

As you can see, rtd is installing your requirements file, the next step is falling because you have checked the install project option in your dashboard (can you please check that?). RTD combines both, options from the web and from the configuration file.

Also, soon you can install a setup.py from any path #4740

@stsewd stsewd added the Support Support question label Oct 24, 2018
@feuGeneA
Copy link
Author

@stsewd Thank you for the 🌟stellar🌟 support! I've got everything working great now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Support Support question
Projects
None yet
Development

No branches or pull requests

2 participants