-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
version collisions on readthedocs #3567
Comments
this is something that looks somewhat like a hack to me, but how about not installing at all but rather using PYTHONPATH=$(readlink -f ..) sphinx-build -M html -d _build/doctrees -n . _build/html to call sphinx (the important part is the environment variable)? I think that should run the correct module even if a different version should happen to be installed. Edit: unfortunately Edit2: it might have side-effects, but using Actually, we only need import pathlib
import sys
root = pathlib.Path(__file__).parent.parent.absolute()
sys.path = [path for path in sys.path if path not in (str(root), str(root.parent))]
sys.path.insert(0, str(root)) but this looks even more like a hack to me. What do you think? |
It seems we can solve this by setting import os
import pathlib
import sys
root = pathlib.Path(__file__).parent.parent.absolute()
os.environ["PYTHONPATH"] = str(root)
sys.path.insert(0, str(root)) what confuses me is that the Edit: I asked the |
looks like it is supported but the maintainer of |
In #3199 the documentation on
readthedocs
did not build because the newest packaged version of xarray was pulled in by a dependency -- in this casecfgrib
. I'm not sure why, but this shadows the versions installed by at leastpython setup.py install --force
andpython -m pip install -e .
(notpython -m pip install .
, I think, butreadthedocs
uses--update-strategy=eager
for pip-installing, which deactivates version pinning).Fortunately,
cfgrib
does not have a hard dependency onxarray
(it's in theextras_require
section), so this issue was bypassed in #3557 by using pip to install it. Should we ever want to introduce a dependency that requiresxarray
(or to use conda to installcfgrib
), this is bound to resurface.It might be that this is a problem with how versioneer constructs versions based on git commit hashes and a fix to #2853 is a fix to this, but it certainly needs more investigation.
#3369 is related, but more about catching these sort of issues before merging.
The text was updated successfully, but these errors were encountered: