Permalink
Browse files

Fixing builder; wasn't reading arrays of requirements

  • Loading branch information...
1 parent 1a1ac44 commit 8f8a1b6c95d890aca85dffeb34b55502de31c656 @anutron committed Jun 21, 2011
Showing with 14 additions and 7 deletions.
  1. +10 −3 django/src/depender/core.py
  2. +4 −4 django/src/depender/views.py
@@ -245,7 +245,7 @@ def expand_package(self, pkg):
"""
Expands a package name into all its components.
"""
- return [ (pkg, c) for c in self.packages[pkg].components ]
+ return [(pkg, c) for c in self.packages[pkg].components]
def get_files(self, components, excluded_components=None):
"""
@@ -291,8 +291,15 @@ def __init__(self, shortname, filename, package, metadata):
self.content = _force_unicode(file(filename).read())
self.metadata = metadata
self.package = package
- self.provides = [(package.key, module) for module in _coerce_string_to_list(metadata["provides"])]
- self.requires = []
+ self.provides = []
+ provides_self = False
+ for module in _coerce_string_to_list(metadata["provides"]):
+ self.provides.append((package.key, module))
+ if metadata.has_key("name") and module == metadata["name"]:
+ provides_self = True
+ if not provides_self and metadata.has_key("name"):
+ self.provides.append((package.key, metadata["name"]))
+
self.requires = [ self._parse_component_string(r) for r in _coerce_string_to_list(metadata.get("requires", [])) ]
def _parse_component_string(self, component):
@@ -65,11 +65,11 @@ def build(request):
def get(name):
return request.GET.get(name)
def get_arr(name):
- val = get(name)
- if val:
- return val.split(",")
+ val = request.GET.getlist(name)
+ if len(val) == 1:
+ return val[0].split(",")
else:
- return []
+ return request.GET.getlist(name)
require = get_arr("require")
exclude = get_arr("exclude")

0 comments on commit 8f8a1b6

Please sign in to comment.