Skip to content
This repository has been archived by the owner on Jan 30, 2023. It is now read-only.

Commit

Permalink
sage --package update-latest: Distinguish pypi package name and spkg …
Browse files Browse the repository at this point in the history
…name
  • Loading branch information
Matthias Koeppe committed Jan 22, 2021
1 parent 13b4090 commit 9d747fc
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion build/sage_bootstrap/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ def update_latest(self, package_name):
log.debug('%s is not a pypi package', package_name)
return
else:
pypi.update()
pypi.update(Package(package_name))

def update_latest_all(self):
log.debug('Attempting to update all packages')
Expand Down
9 changes: 5 additions & 4 deletions build/sage_bootstrap/pypi.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,12 +100,13 @@ def summary(self):
"""
return self.json['info']['summary']

def update(self):
package = Package(self.name)
def update(self, package=None):
if package is None:
package = Package(self.name)
if package.version == self.version:
log.info('%s is already at the latest version', self.name)
return
log.info('Updating %s: %s -> %s', self.name, package.version, self.version)
update = PackageUpdater(self.name, self.version)
log.info('Updating %s: %s -> %s', package.name, package.version, self.version)
update = PackageUpdater(package.name, self.version)
update.download_upstream(self.url)
update.fix_checksum()

0 comments on commit 9d747fc

Please sign in to comment.