core: quick fix for packages without URLs
Some packages do not have a `url` and are instead downloaded via `git`, `hg`, or `svn`. Some packages like `spectrum-mpi` cannot be downloaded at all, and are placeholder packages for system installations. Previously, `__init__()` in `PackageBase` crashed if a package did not have a `url` attribute defined. I hacked this section of code out, but I have no idea what the repercussions of that are.
This commit is contained in:
parent
f59666587b
commit
5792a805fc
@ -494,17 +494,6 @@ def __init__(self, spec):
|
||||
self._fetcher = None
|
||||
self.url = getattr(self.__class__, 'url', None)
|
||||
|
||||
# Fix up self.url if this package fetches with a URLFetchStrategy.
|
||||
# This makes self.url behave sanely.
|
||||
if self.spec.versions.concrete:
|
||||
# TODO: this is a really roundabout way of determining the type
|
||||
# TODO: of fetch to do. figure out a more sane fetch
|
||||
# TODO: strategy/package init order (right now it's conflated with
|
||||
# TODO: stage, package, and the tests make assumptions)
|
||||
f = fs.for_package_version(self, self.version)
|
||||
if isinstance(f, fs.URLFetchStrategy):
|
||||
self.url = self.url_for_version(self.spec.version)
|
||||
|
||||
# Set a default list URL (place to find available versions)
|
||||
if not hasattr(self, 'list_url'):
|
||||
self.list_url = None
|
||||
|
Loading…
Reference in New Issue
Block a user