-
-
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
Alter order of processing dependencies #1364
Comments
See readthedocs#1364 for details.
I have a pull request for option one 90% of the way done, but I can't get RTD's tests to run on my system, so I don't feel comfortable pulling the trigger on it. Please advise. |
I'm not sure what this change will have as implication, so someone with more experience over the builds must decide if that is a good idea. But I might be able to help with your tests. How do you run your tests and what fails while doing so? |
@gregmuellegger I can't even get the virtualenv set up. See this paste. I get this error in particular:
I forgot to do this during the paste, but the file /tmp/pip-build-eZd5CA/factory-boy does not exist. |
Option 1 is the only one I think we'd consider. We need to specific the version of Sphinx that we officially support, which is 1.3.1, and specific versions of several extensions and our theme. This can likely happen after per-project dependencies are installed, though there is a duplication of effort that will happen when Sphinx is installed by the project, and then upgraded to 1.3.1 if it isn't already current. With 1.3 shipping themes as dependencies, it's probably worth re-evaluating how we are installing dependencies. |
I should note that the Another option I didn't specifically mention would be to add versions for every package which is part of the basic Sphinx+RTD requirements, including Alabaster (i.e. use the full output of |
@NYKevin that error indicates that there is a versioned setup-requires on a newer setuptools than you have, and setuptools is bailing out (it can't handle that situation itself). upgrading your virtualenv package should get you a newer bundled setuptools, and that should get things going. |
@rbtcollins do you see this as related to #1428 ? |
@gregmuellegger no - I was looking for related issues, and saw that @NYKevin had gotten stuck here with something i could explain. The setuptools issue encountered is outside the venv that rtd creates during builds - its the one that NYKevin was using to test rtd, so yeah, unrelated. |
This appears to be actively breaking documentation one of my projects (https://readthedocs.org/projects/mozilla-balrog/builds/) because of the old version of setuptools that is installed prior my project's own dependencies. Other than downgrading my own dependencies, is there a way to work around this? |
We've altered how we're installing our dependencies, and have also upgraded setuptools to a more recent release. Considering this issue closed. |
See this build, and in particular, note this information:
My documentation does not build with Alabaster 0.7.5 because of #1350. But my requirements explicitly specify 0.7.4:
Read The Docs, ideally, should not install things the user did not ask for. I asked for 0.7.4, so I should get 0.7.4, not some other version. These docs build fine locally, because I have the right version of Alabaster. I imagine this problem affects everyone on Python 3.
According to the output, this is likely because Read The Docs is installing Sphinx into the virtualenv before it installs my requirements, so it ends up grabbing something I didn't ask for. Option one would be to install project requirements first, and the basic Sphinx etc. requirements afterwards. This is trivially accomplished; just move this function call down to here, and remove the
-U
flag. Since the virtualenv is created anew every time, that flag isn't doing anything anyway (Pip will already replace an existing package with a different version if asked). The downside is that this will override the versions of Sphinx etc. specified in the project's requirements, which is bad.If we removed the version specifiers from the list here (so it's just a list of package names), that wouldn't happen, but then Read The Docs wouldn't have a consistent environment. On the other hand, the
-U
flag suggests you actually want that, so I'm not entirely sure what the intent here is in the first place.As a compromise, we could change those version specifiers into a different kind of specifier, such as
sphinx~=1.3.1
(basically meaning "You can specify your own version of Sphinx, but it can't be too old or too new, and we'll use the latest compatible one if you don't ask for anything," assuming we also move the call down as described above). Note that Pip never installs pre-releases unless explicitly asked with--pre
, so this won't grab some randomly broken trunk snapshot by mistake.Option two would be to check whether Sphinx (etc.) is already installed in the project requirements, and skip it if so. We can do this by calling
pip show sphinx
and checking for output, or grepping the output ofpip freeze
for packages we need. This has the downside of being significantly more involved (more code, checking the output of commands, etc.).Going the really crazy route (option three), we could parse the user's requirements file and try to merge it with Read The Docs' requirements. I think this is a Bad Idea because it's particularly convoluted compared to the other solutions with no obvious upside. Pip already knows how to read these files. Trying to outsmart it is, I think, a poor choice.
The "quick fix" (option four?) is to specify
alabaster==0.7.4
in the list, but that's #1350, not this bug, and a variation of this has already been rejected.I originally reported this as #1359, but I badly misdiagnosed the issue and did a poor job of explaining the problem, so I'm re-reporting it with a brand-new description. I apologize if opening multiple issues is excessive in this case.
The text was updated successfully, but these errors were encountered: