Git dependency with sepcified branch gets overriden by dependency of other package.
See original GitHub issueThis issue is simillar to #1779, but the solution stated there is not working for me.
I need to install specific version of a PyInstaller
package, but PyInstaller
is also a dependency of PyUpdater
which is also required in my project and overrides other my specific PyInstaller
version.
`$ python -m pipenv.help` output:
python -m pipenv.help
C:\Program Files (x86)\Python36-32\python.exe: No module named pipenv.help
I am aware this is not how this output should look like, but I can not make it work. Any help here? I’m on pipenv version 11.0.2.
Expected result
I need latest develop
branch of PyInstaller installed and I don’t want PyUpdater to override this with the PyInstaller-3.3.1
version. As suggested in #1779 I placed PyUpdater above the PyInstaller in [packages]
in Pipfile.
Actual result
Regardless whether the important part of Pipfile looks like this:
PyUpdater = "*"
PyInstaller = {git = "https://github.com/pyinstaller/pyinstaller", ref = "develop"}
or like this:
PyInstaller = {git = "https://github.com/pyinstaller/pyinstaller", ref = "develop"}
PyUpdater = "*"
the PyInstaller version in Pipfile.lock will be 3.3.1
and I end up with this version installed.
What is interesting is that if I uninstall PyInstaller with pipenv uninstall pyinstaller
and then install it again with pipenv install https://github.com/pyinstaller/pyinstaller/archive/develop.zip
I get the Successfully installed PyInstaller-3.4.dev0+b31794cf1
but in fact the 3.3.1
version in installed instead.
Steps to replicate
# Pipfile
[[source]]
url = "https://pypi.python.org/simple"
verify_ssl = true
name = "pypi"
[packages]
PyUpdater = "*"
PyInstaller = {git = "https://github.com/pyinstaller/pyinstaller", ref = "develop"}
pipenv install
Check version: pipenv run pyinstaller --version
or
Create new clean environment
pipenv install pyupdater
pipenv uninstall pyinstaller
pipenv install https://github.com/pyinstaller/pyinstaller/archive/develop.zip
Check version: pipenv run pyinstaller --version
Issue Analytics
- State:
- Created 5 years ago
- Comments:10 (9 by maintainers)
Ah, I think I know why this is happening!
Top-level dependency should always win, however, IMO. PyInstaller is specified in the Pipfile (i.e. top-level), so its version information shouldn’t be overridden by PyUpdater’s dependency specification. It could be sensible to raise an exception if it cannot reasonably resolve, but not silently override.