question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Git dependency with sepcified branch gets overriden by dependency of other package.

See original GitHub issue

This 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:closed
  • Created 5 years ago
  • Comments:10 (9 by maintainers)

github_iconTop GitHub Comments

1reaction
techalchemycommented, Jun 9, 2018

Ah, I think I know why this is happening!

1reaction
uranusjrcommented, Jun 6, 2018

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.

Read more comments on GitHub >

github_iconTop Results From Across the Web

rfcs/0036-overrides.md at main · npm/rfcs - GitHub
Dependency resolution overrides. Summary. Provide a mechanism for users to specify a different dependency resolution at a specific point in the tree.
Read more >
With npm can I depend on a git branch rather than scoped ...
I have a project which depends on an scoped npm module from (lerna) monorepo: "devDependencies": { "@as-pect/cli": "^5.0.0" },.
Read more >
Package dependencies - Dart
Dependencies are one of the core concepts of the pub package manager. A dependency is another package that your package needs in order...
Read more >
Overriding Dependencies - The Cargo Book
This chapter walks through a few different use cases, and includes details on the different ways to override a dependency. Example use cases....
Read more >
Packaging Guide — Spack 0.20.0.dev0 documentation
Packages allow the packager to encapsulate the build logic for different versions, compilers, options, platforms, and dependency combinations in one place.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found