-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
use --no-deps when installing using pip #7345
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
Comments
gentle ping. If I understand it correctly, what I'm asking for is to add readthedocs.org/readthedocs/doc_builder/python_environments.py Lines 100 to 115 in 97334e9
|
https://pip.pypa.io/en/stable/reference/pip_install/#cmdoption-no-deps If I understand this correctly, Can you link me to your package and config file? I'm not sure to understand the problem correctly. |
yes, that's right, it will skip resolving dependencies and only install the package itself. For that to work properly, all dependencies have to be installed manually or using a requirements file (for There are two experimental branches which differ only by the install method on my personal setup:
I think this can be fixed using |
Thanks for the explanation. I think the way to solve this would be to have an upper limit for pandas in https://github.com/keewis/xarray/blob/6ac5056dc0377b05458553e39982bc34b22964d0/setup.cfg#L78 since that will break if your users have pandas 1.0.x as https://github.com/keewis/xarray/blob/6ac5056dc0377b05458553e39982bc34b22964d0/ci/requirements/doc.yml#L20. |
that's true, we could fix this particular issue using That's just a workaround, though, and I would argue that that file is not the best way to pin dependencies in a particular CI because it would affect other CI where we actually want to install the conflicting version of Additionally, we're currently considering a workflow where all dependencies are pinned to a specific version and updated in PRs automatically opened by |
I think you can solve this by not calling Another solution would be to first install the package and after that install the pinned packages (not sure if this is possible in conda) |
that's what we're currently doing. It works, but since we're also using
I'll investigate and report back. |
it works if I use something like - pip
- pip:
- -e ../.. # path to folder containing setup.py relative to environment file I still think that using |
I don't think we will be changing this as it would break some builds, and not sure if this is common enough to add a new setting. |
okay, so it seems to work fine, except with PRs, where it doesn't. I think I tracked this down to the shallow clone of the git repository (which is created using git clone --no-single-branch --depth 50 https://github.com/pydata/xarray.git .
git fetch origin --force --tags --prune --prune-tags --depth 50 pull/4355/head:external-4355
git checkout --force 9076bb28a0bbc149308a3742cba6dedf9aea36b2 ). If the number of commits since the last release exceeds 50, Do you have any advice on how to fix that? |
@keewis I can disable the shallow cloning for your project. Currently, we don't expose that option to users. What's the project? |
xarray (slug: |
Done, your projects shouldn't shallow clone now https://readthedocs.org/projects/xray/builds/11699942/ |
thank you very much for the really quick responses, I can confirm they don't shallow clone. |
#5635 switched to
python -m pip install --upgrade --upgrade-strategy eager .
withwhich will update every dependency, even if we pinned it to a certain version. I could use
method: setuptools
instead, but that is unreliable / fails if a dependency depends on the package to be installed (i.e. a circular dependency graph).Would it be possible to use
--no-deps
:python -m pip install --upgrade --upgrade-strategy eager --no-deps .
which means that
--upgrade
only reinstalls the package at.
instead of also upgrading every dependency?If you're concerned about someone's docs build failing because a dependency is missing, would it be possible to conditionally enable this flag (e.g. when using
conda
where upgrading dependencies usingpip
is not really a good idea)?The text was updated successfully, but these errors were encountered: