Skip to content

Commit

Permalink
Merge pull request #243 from PrimozGodec/pip-upgrade
Browse files Browse the repository at this point in the history
[FIX] pip - upgrade dependencies if necessary
  • Loading branch information
markotoplak authored Oct 21, 2022
2 parents 3d53247 + fff07ee commit c37b4a4
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions orangecanvas/application/addons.py
Original file line number Diff line number Diff line change
Expand Up @@ -1501,11 +1501,12 @@ def __init__(self):

def install(self, pkg):
# type: (Installable) -> None
cmd = ["python", "-m", "pip", "install"] + self.arguments
cmd = [
"python", "-m", "pip", "install", "--upgrade",
"--upgrade-strategy=only-if-needed",
] + self.arguments
if pkg.package_url.startswith(("http://", "https://")):
version = (
"=={}".format(pkg.version) if pkg.version is not None else ""
)
version = "=={}".format(pkg.version) if pkg.version is not None else ""
cmd.append(pkg.name + version)
else:
# Package url is path to the (local) wheel
Expand Down

0 comments on commit c37b4a4

Please sign in to comment.