multiple packages

This commit is contained in:
Frank DeMarco 2012-08-25 00:46:05 -04:00
parent addcfc6922
commit e8a4158085
2 changed files with 14 additions and 13 deletions

View File

@ -62,7 +62,7 @@ class Configuration(RawConfigParser):
set_option = self.set
section = "setup"
add_section(section)
set_option(section, "package-root", basename(getcwd()))
set_option(section, "packages", basename(getcwd()) + ", pgfw")
set_option(section, "title", "")
set_option(section, "classifiers", "")
set_option(section, "resources-search-path", "./, resources/")
@ -153,7 +153,7 @@ class Configuration(RawConfigParser):
def set_installation_path(self):
self.set("setup", "installation-path",
join(self.get("setup", "installation-dir"),
self.get("setup", "package-root")))
self.get("setup", "packages")[0]))
def set_resources_search_path(self):
section, option = "setup", "resources-search-path"
@ -182,7 +182,7 @@ class Configuration(RawConfigParser):
self.get(section, "rel-path")))
def build_home_path(self):
return join("~", "." + self.get("setup", "package-root"))
return join("~", "." + self.get("setup", "packages")[0])
def set_data_exclusion_list(self):
section, option = "setup", "data-exclude"
@ -191,7 +191,7 @@ class Configuration(RawConfigParser):
exclude = self.get(section, option)
exclude += [".git", ".gitignore", "README", "build/", "dist/",
"setup.py", "MANIFEST", "PKG-INFO",
self.get("setup", "package-root"),
self.get("setup", "packages")[0],
self.get("setup", "changelog")]
self.set(section, option, exclude)
@ -225,11 +225,10 @@ class TypeDeclarations(dict):
"int-list": "dimensions"},
"screen-captures": {"path": "path"},
"setup": {"list": ["classifiers", "resources-search-path",
"requirements", "data-exclude"],
"path": ["installation-dir", "package-root",
"changelog", "description-file",
"main-object", "icon-path",
"windows-dist-path"]},
"requirements", "data-exclude", "packages"],
"path": ["installation-dir", "changelog",
"description-file", "main-object",
"icon-path", "windows-dist-path"]},
"keys": {"list": ["up", "right", "down", "left"]}}
additional_defaults = {}

View File

@ -24,10 +24,12 @@ class Setup:
def build_package_list(self):
packages = []
package_root = self.config.get("setup", "package-root")
if exists(package_root):
for root, dirs, files in walk(package_root, followlinks=True):
packages.append(root.replace(sep, "."))
locations = self.config.get("setup", "packages")
for location in locations:
if exists(location):
for root, dirs, files in walk(location, followlinks=True):
packages.append(root.replace(sep, "."))
packages.append("pgfw")
return packages
def build_data_map(self):