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

Support for multiple requirements files #1112

Closed
zaro0508 opened this issue Jan 2, 2015 · 9 comments
Closed

Support for multiple requirements files #1112

zaro0508 opened this issue Jan 2, 2015 · 9 comments

Comments

@zaro0508
Copy link

zaro0508 commented Jan 2, 2015

My project is here: https://readthedocs.org/projects/jenkins-job-builder/

My project has two requirements files (requirements.txt and test-requirements.txt). I enable the "use virtualenv" setting and set requirements file to "-rrequirements.txt -rtest-requirements.txt". When the build runs I get the following error: Could not open requirements file: [Errno 2] No such file or directory: '-rrequirements.txt'

I've tried a few other combinations to set both requirements files but none work. Does rtfd support multiple requirements files or am I just not setting it correctly?

@ericholscher
Copy link
Member

You can include other requirements files within a single. For example:
https://github.com/rtfd/readthedocs.org/blob/master/deploy_requirements.txt#L1

On Fri, Jan 2, 2015 at 12:52 PM, Zaro notifications@github.com wrote:

My project is here: https://readthedocs.org/projects/jenkins-job-builder/

My project has two requirements files (requirements.txt and
test-requirements.txt). I enable the "use virtualenv" setting and set
requirements file to "-rrequirements.txt -rtest-requirements.txt". When the
build runs I get the following error: Could not open requirements file:
[Errno 2] No such file or directory: '-rrequirements.txt'

I've tried a few other combinations to set both requirements files but
none work. Does rtfd support multiple requirements files or am I just not
setting it correctly?


Reply to this email directly or view it on GitHub
#1112.

Eric Holscher
Maker of the internet residing in Portland, Or
http://ericholscher.com

@zaro0508
Copy link
Author

zaro0508 commented Jan 2, 2015

I keep them separate because I want to deploy my app without requiring the test dependencies. If i use the '-r' flag as you suggested a pip install would also install the test-requirements.

@ericholscher
Copy link
Member

We will only support 1 requirements file. Feel free to make a custom one just for us that points at multiple others.

@KeyWeeUsr
Copy link

The file was moved here

@dtantsur
Copy link

We will only support 1 requirements file. Feel free to make a custom one just for us that points at multiple others.

That's a really bad decision. You're excluding essentially any serious projects using autodoc, which have to install both requirements.txt (for autodoc) and test-requirements.txt (for sphinx plugins). For example, you're excluding any OpenStack project (following OpenStack guidelines https://governance.openstack.org/tc/reference/project-testing-interface.html#pti-documentation).

@fungi
Copy link

fungi commented May 18, 2018

Note that the documentation portion of OpenStack's PTI selected doc/requirements.txt expressly to maintain compatibility with RTD. If there is still something missing which prevents use of RTD by projects following the PTI recommendations then we can probably get those recommendations updated.

@dtantsur
Copy link

@fungi autodoc requires installing the complete requirements. Which, given the decision made in this bug, requires copying everything from requirements.txt to doc/requirements.txt and then keeping both in sync. And if we consider people building docs locally, then we need the 3rd file just for RTD, and then keep it in sync with the 2 previously created... This is just a nightmare compared to potential change to support a list of files instead of one.

@ericholscher
Copy link
Member

You can reference requirements files from each other: https://stackoverflow.com/questions/11704287/split-requirements-files-in-pip

@KeyWeeUsr
Copy link

You can reference requirements files from each other: https://stackoverflow.com/questions/11704287/split-requirements-files-in-pip

While this is true via using include PATH inside the requirements.txt, it does not allow installing packages from the multiple requirements.txt one after another. For example:

req1.txt:

Pillow

req2.txt:

some-package-that-depends-on-Pillow-already-installed  # fail

FedericoRessi pushed a commit to FedericoRessi/tobiko that referenced this issue Aug 24, 2019
In Read The Docs service only one single requirements file is
supported for the project. See [1] for details.
So we need to have "rtd-requirements" file which will include all
requirements for the project.

[1] readthedocs/readthedocs.org#1112

Change-Id: I6512558ae67d4a874135cdbf2bcb50d8a94ac7f5
mika pushed a commit to sipwise/jenkins-job-builder that referenced this issue Apr 29, 2024
Abandoned

created a rtfd.org upstream bug: readthedocs/readthedocs.org#1112

Patch-set: 1
Status: abandoned
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants