Skip to content
This repository has been archived by the owner on May 13, 2020. It is now read-only.

Commit

Permalink
I was wrong, sectionName!=packageName
Browse files Browse the repository at this point in the history
  • Loading branch information
Adam Groszer committed Jun 13, 2010
1 parent 304a4d6 commit 9546ff7
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 13 deletions.
33 changes: 21 additions & 12 deletions src/zope/wineggbuilder/build.py
Original file line number Diff line number Diff line change
Expand Up @@ -116,20 +116,23 @@ class Package(object):
urlGetterKlass = base.URLGetter
svnKlass = base.SVN

def __init__(self, name, config, options, compilers):
self.name = name
def __init__(self, sectionName, config, options, compilers):
self.sectionNameName = sectionName
self.options = options
self.read(config, compilers)

def read(self, config, compilers):
self.pypiurl = config.get(self.name, 'pypiurl')
self.tagurl = config.get(self.name, 'tagurl')
self.read(sectionName, config, compilers)

def read(self, sectionName, config, compilers):
self.name = config.get(sectionName, 'package')
self.pypiurl = getOption(config, sectionName, 'pypiurl',
'http://pypi.python.org/simple/%s/' % self.name)
self.tagurl = getOption(config, sectionName, 'tagurl',
'svn://svn.zope.org/repos/main/%s/tags' % self.name)
if self.tagurl.endswith('/'):
self.tagurl = self.tagurl[:-1]
self.minVersion = getOption(config, self.name, 'minVersion')
self.maxVersion = getOption(config, self.name, 'maxVersion')
self.minVersion = getOption(config, sectionName, 'minVersion')
self.maxVersion = getOption(config, sectionName, 'maxVersion')
self.targets = []
for target in config.get(self.name, 'targets').split():
for target in config.get(sectionName, 'targets').split():
self.targets.append(compilers[target])

def build(self):
Expand Down Expand Up @@ -209,8 +212,14 @@ def __init__(self, configFileName, options):
self.compilers[cmp] = Compiler(cmp, config, options)

self.packages = []
for pkg in config.get(base.BUILD_SECTION, 'packages').split():
self.packages.append(Package(pkg, config, options, self.compilers))
for section in config.sections():
if section == base.BUILD_SECTION:
continue
if section in self.compilers:
continue

self.packages.append(Package(section, config,
options, self.compilers))

def runCLI(self):
LOGGER.info('Starting to build')
Expand Down
3 changes: 2 additions & 1 deletion src/zope/wineggbuilder/test.ini
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@ command = call c:\program files\msvc\msvcvars.bat
fileEnding = py2.6-win-amd64.egg


[zope.proxy]
[zope.proxy_34_to_35]
package = zope.proxy
pypiurl = http://pypi.python.org/simple/zope.proxy/
tagurl = svn://svn.zope.org/repos/main/zope.proxy/tags/
minVersion = 3.4
Expand Down

0 comments on commit 9546ff7

Please sign in to comment.