Skip to content

readthecods uses virtual environment even when it is disabled #1621

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
SmokinCaterpillar opened this issue Sep 2, 2015 · 21 comments
Closed
Labels
Accepted Accepted issue on our roadmap Improvement Minor improvement to code
Milestone

Comments

@SmokinCaterpillar
Copy link

Hi, I haven't changed anything in my code but from one day to the next the built of my docs fails.

When building, it starts with

python -mvirtualenv --system-site-packages /home/docs/checkouts/readthedocs.org/user_builds/pypet/envs/latest

python /home/docs/checkouts/readthedocs.org/user_builds/pypet/envs/latest/bin/pip install --use-wheel --find-links=/home/docs/checkouts/readthedocs.org/deploy/wheels -U -I sphinx==1.3.1 Pygments==2.0.2 virtualenv==13.1.0 setuptools==18.0.1 docutils==0.11 mkdocs==0.14.0 mock==1.0.1 pillow==2.6.1 readthedocs-sphinx-ext==0.5.4 sphinx-rtd-theme==0.1.8 alabaster>=0.7,<0.8,!=0.7.5 recommonmark==0.1.1

 python /home/docs/checkouts/readthedocs.org/user_builds/pypet/envs/latest/bin/pip install --exists-action=w -rrequirements.txt 

The latest statement fails because it cannot find the HDF5 library (which is used by PyTables).
However, I don't want read the docs to install my package at all, I have not checked the box "Install your project inside a virtualenv using setup.py install". But it still tries to do that!
Why? How can I force read the docs not to install my package but just compile the docs?

Thanks!

@SmokinCaterpillar
Copy link
Author

Btw I do have a requirements.txt in my top-level project folder. Have there been some internal changes in read the docs that ignore the tick mark "Install your project inside a virtualenv using setup.py install" if there is such a file?

@SmokinCaterpillar
Copy link
Author

Well, I can confirm my hypothesis. In case I remove the requirements.txt file from my package, readthedocs stops installing my package.

Can you please fix the problem that having a requirements.txt file overrides the tick mark Install your project inside a virtualenv using setup.py install? Thanks!

@agjohnson
Copy link
Contributor

If the intended outcome is to skip requirements.txt or setup.py, we should have build options for those, and not piggyback on use_virtualenv. The use_virtualenv option only stops the setup.py as it stands now, and could likely be dropped.

Fixes for this are welcome.

@agjohnson agjohnson added Improvement Minor improvement to code Needed: design decision A core team decision is required labels Sep 3, 2015
@akosiaris
Copy link

Hello, bitten by this as well. I think I 've tracked the problem down to https://github.com/rtfd/readthedocs.org/blob/master/readthedocs/projects/tasks.py#L281

That piece of code uses the defined requirements file and if it does not exist, tries to guess it. Then in line 294 the requirements_file_path variable is bound to exist if the repo has a requirementst.txt file (or a pip_requirements.txt file). That part of code has been refactored in ff43236 although I must admit I do not see at this point in time why the previous version was working fine.

This seems to me to be entirely independent of the virtualenv setting, so the documentation is misleading as already pointed out. At least the part about "Requires Virtualenv" that is.

As far as a design decision goes, my proposal (if worth anything) is to have a flag to allow skipping installing requirements.txt, independent of the use_virtualenv setting.

@gregmuellegger
Copy link
Contributor

I think this is something that we need to consider for our upcoming new build system. See related ticket #1649,

@serhii-havrylov
Copy link

I can't build my documentation as well. It seems having a requirements.txt file overrides the tick mark Install your project inside a virtualenv using setup.py install.
So what is the status of this issue now?

@agjohnson
Copy link
Contributor

#1649 was closed after a proposed fix that changed this option

Is this still an issue for anyone?

@akosiaris
Copy link

@agjohnson I think so, yes. Not sure how this got fixed and what actions are required on my part, but what I did was empty out the requirements file option (I had worked around the problem by specifying a non-breaking-my-build doc-requirements.txt) in the admin interface and try to build my project. It failed, trying to build all of the dependencies in requirements.txt

Are there any docs detailing the new behavior and how it is configured ?

@Thor77
Copy link

Thor77 commented Aug 24, 2016

Hm, i guess this issue is related to my current problem:
I have pybluez listed in my requirements.txt and not checked anything to install my package but RTD still tries to do so and fails because pybluez depends on bluez-clibs.
Why does RTD parse and install my requirements.txt and is there any way to turn that off?

@agjohnson
Copy link
Contributor

We automatically try find requirements.txt. You should be able to explicitly set requirements_file: null in our yaml config, though I'm not sure if that triggers the auto-search or assumes we're explicitly not going to search for a file.

@agjohnson agjohnson modified the milestones: rtd-build, 2.5 Apr 11, 2018
@humitos
Copy link
Member

humitos commented Apr 18, 2018

You should be able to explicitly set requirements_file: null in our yaml config

This is still not working yet. There is a PR to handle this case at readthedocs/readthedocs-build#38

@stsewd
Copy link
Member

stsewd commented May 10, 2018

So, the residual problem of this ticket is that rtd automatically picks the requirements.txt file?

@stsewd
Copy link
Member

stsewd commented Jun 25, 2018

We currently automatically detect the configuration file if the setting is None in the configuration file, we could use '' (empty string).

@humitos
Copy link
Member

humitos commented Sep 6, 2018

From this comment https://github.com/rtfd/readthedocs.org/pull/4355/files#r202485887 I suppose that using '' we are forcing RTD to not use or install any requirements.txt file.

I don't really like that solution because it's not too explicit to me, but if that works to omit finding it, we can close this issue. @stsewd what do you think?

@stsewd
Copy link
Member

stsewd commented Sep 6, 2018

I was waiting to have the v2 released to close this, right now, people can't use '' in v1 (I haven't tested it, but I'm pretty sure it will raise an error).

@stsewd
Copy link
Member

stsewd commented Sep 28, 2018

This was implemented in our configuration file (v2), isn't available for users yet, but I hope it will be soon or at least for some users (we can add a flag to make it available to some projects).

@stsewd stsewd closed this as completed Sep 28, 2018
@humitos
Copy link
Member

humitos commented Oct 1, 2018

@stsewd I wouldn't close the issue if we don't have a solution for the final user yet.

@stsewd
Copy link
Member

stsewd commented Oct 1, 2018

I going to bring this to the team and see if we can select some projects to use the v2 of the config file, if not I'll open this till we are ready for that

@stsewd
Copy link
Member

stsewd commented Oct 1, 2018

So, we are planning to activate this to some projects, if anyone is interested in test the beta of the v2 config, please comment with your rtd project :)

@Thor77
Copy link

Thor77 commented Oct 1, 2018

I'm interested in testing it with Blueproximity. The doc build is currently failing because of this bug.

@stsewd
Copy link
Member

stsewd commented Oct 1, 2018

@Thor77 great! here are some docs of the v2 config file https://github.com/rtfd/readthedocs.org/pull/4451/files#diff-33bbde7fca852e881b51aa90f9f86b3f

I'll let you know when you can add the file to your project (we only need to activate a flag for your project)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Accepted Accepted issue on our roadmap Improvement Minor improvement to code
Projects
None yet
Development

No branches or pull requests

8 participants