-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
requirements.txt installed when not indicated #2812
Comments
I tried setting |
Creating an empty requirements file and pointing to that seems to work around the issue. |
Here's another, related failure: https://readthedocs.org/projects/pathpy/builds/5890289/
Correction - I thought I'd tried to clear that setting, but when I went back to the admin, I'd apparently not succeeded in clearing that setting. Ensuring that the setting was cleared fixed the issue and that build is working now. |
I do suspect this originally-reported issue is still present, that there's apparently no way to ask RTD not to install the requirements.txt file if it exists except to specify an alternate file that's empty. |
I'm not sure to fully understand your problem. I mean, even if your repository doesn't have a reqs.txt RTD will install some base dependencies to build the docs. There is no way to avoid that. Is that what you mean? |
@xflr6 thanks for your report. RTD automatically finds a Reading the code, with an empty I think changing this default behaviour will break tons of projects, though. |
Thanks: I agree. It is probaly enough to provide some form of opt-out (on the website and/or |
I have same problem. My case is
Actual result is same as the original report. readthedocs finds the With the support of
I think the fix to the first step in above order must be much helpful for fixing the problem this issue reports. And that should not break anyone else who does not use [1] https://docs.readthedocs.io/en/latest/yaml-config.html#python-extra-requirements |
After reading the code, I find I was wrong.
But, I really think that settings in BTW, the current behavior of handling |
The empty docs/requirements.txt is a workaround to make readthedocs not install anything from possible requirements files found from default places automatically. Refer to: readthedocs/readthedocs.org#2812 Signed-off-by: Chenxiong Qi <qcxhome@gmail.com>
I apologize for not seeing this message or responding sooner. The issue I have is the same as xflr6 described. We have a requirements.txt there for heroku to install the project, but those aren't the requirements needed to build the docs.
That's a better workaround than the one I found (setting the requirements file to another, empty file). I suggest |
I find otherwise. In this commit, I removed the explicit pointer to So I'll be restoring that workaround. |
mmm, that's strange, I going to take a look at the code. Probably that is a bug. |
I found it, it's a bug. The |
How about this? for path, req_file in itertools.product([docs_dir, ''], ['pip_requirements.txt', 'requirements.txt']):
test_path = os.path.join(self.checkout_path, path, req_file)
if os.path.exists(test_path):
requirements_file_path = test_path
break |
@xflr6 I think that would work, will you like to make a PR? Also, some tests will be needed. |
@stsewd I took a glimpse at the test setup: I don't think I'll find enough time to add that soon. |
@xflr6 don't worry, I'll take care of submit the fix with the tests. |
Details
Expected Result
Since the config specifies nothing for requirements.txt, it should not attempt to install any requirements.
Actual Result
Even with requirements.txt set to nothing and with a .readthedocs.yml indicating nothing for
requirements_file
, the build attempts to install requirements and fails.The text was updated successfully, but these errors were encountered: