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

Commit

Permalink
working towards lxml builds
Browse files Browse the repository at this point in the history
  • Loading branch information
agroszer committed Mar 13, 2013
1 parent c01ed0b commit 20119fa
Show file tree
Hide file tree
Showing 5 changed files with 270 additions and 42 deletions.
84 changes: 42 additions & 42 deletions rackspace.ini
Original file line number Diff line number Diff line change
Expand Up @@ -6,103 +6,103 @@ compilers = py24_32
py32_32 py32_64 py32_32X py32_64X

[py24_32]
command = set PATH=%PATH%;c:\mingw\bin
c:\Python24_32\python setup.py build_ext --compiler mingw32 bdist_egg upload
setup = set PATH=%PATH%;c:\mingw\bin
command = c:\Python24_32\python setup.py build_ext --compiler mingw32 bdist_egg upload
fileEnding = py2.4-win32.egg

[py25_32]
command = set PATH=%PATH%;c:\mingw\bin
c:\Python25_32\python setup.py build_ext --compiler mingw32 bdist_egg upload
setup = set PATH=%PATH%;c:\mingw\bin
command = c:\Python25_32\python setup.py build_ext --compiler mingw32 bdist_egg upload
fileEnding = py2.5-win32.egg

[py25_32X]
# .exe
command = set PATH=%PATH%;c:\mingw\bin
c:\Python25_32\python setup.py build_ext --compiler mingw32 bdist_wininst upload
setup = set PATH=%PATH%;c:\mingw\bin
command = c:\Python25_32\python setup.py build_ext --compiler mingw32 bdist_wininst upload
fileEnding = win32-py2.5.exe

[py26_32]
# .egg
command = call "C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\VCVARSALL.bat" x86
set PATH=%PATH%;"C:\Program Files\Microsoft SDKs\Windows\v6.1\Bin"
c:\Python26_32\python setup.py build_ext --compiler msvc bdist_egg upload
setup = call "C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\VCVARSALL.bat" x86
set PATH=%PATH%;"C:\Program Files\Microsoft SDKs\Windows\v6.1\Bin"
command = c:\Python26_32\python setup.py build_ext --compiler msvc bdist_egg upload
fileEnding = py2.6-win32.egg

[py26_32X]
# .exe
command = call "C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\VCVARSALL.bat" x86
set PATH=%PATH%;"C:\Program Files\Microsoft SDKs\Windows\v6.1\Bin"
c:\Python26_32\python setup.py build_ext --compiler msvc bdist_wininst upload
setup = call "C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\VCVARSALL.bat" x86
set PATH=%PATH%;"C:\Program Files\Microsoft SDKs\Windows\v6.1\Bin"
command = c:\Python26_32\python setup.py build_ext --compiler msvc bdist_wininst upload
fileEnding = win32-py2.6.exe

[py26_64]
# .egg
command = call "C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\bin\VCVARSX86_AMD64.bat"
set PATH=%PATH%;"C:\Program Files\Microsoft SDKs\Windows\v6.1\Bin\x64"
c:\Python26_64\python setup.py build_ext --compiler msvc bdist_egg upload
setup = call "C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\bin\VCVARSX86_AMD64.bat"
set PATH=%PATH%;"C:\Program Files\Microsoft SDKs\Windows\v6.1\Bin\x64"
command = c:\Python26_64\python setup.py build_ext --compiler msvc bdist_egg upload
fileEnding = py2.6-win-amd64.egg

[py26_64X]
# .exe
command = call "C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\bin\VCVARSX86_AMD64.bat"
set PATH=%PATH%;"C:\Program Files\Microsoft SDKs\Windows\v6.1\Bin\x64"
c:\Python26_64\python setup.py build_ext --compiler msvc bdist_wininst upload
setup = call "C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\bin\VCVARSX86_AMD64.bat"
set PATH=%PATH%;"C:\Program Files\Microsoft SDKs\Windows\v6.1\Bin\x64"
command = c:\Python26_64\python setup.py build_ext --compiler msvc bdist_wininst upload
fileEnding = win-amd64-py2.6.exe

[py27_32]
# .egg
command = call "C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\VCVARSALL.bat" x86
set PATH=%PATH%;"C:\Program Files\Microsoft SDKs\Windows\v6.1\Bin"
c:\Python27_32\python setup.py build_ext --compiler msvc bdist_egg upload
setup = call "C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\VCVARSALL.bat" x86
set PATH=%PATH%;"C:\Program Files\Microsoft SDKs\Windows\v6.1\Bin"
command = c:\Python27_32\python setup.py build_ext --compiler msvc bdist_egg upload
fileEnding = py2.7-win32.egg

[py27_32X]
# .exe
command = call "C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\VCVARSALL.bat" x86
set PATH=%PATH%;"C:\Program Files\Microsoft SDKs\Windows\v6.1\Bin"
c:\Python27_32\python setup.py build_ext --compiler msvc bdist_wininst upload
setup = call "C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\VCVARSALL.bat" x86
set PATH=%PATH%;"C:\Program Files\Microsoft SDKs\Windows\v6.1\Bin"
command = c:\Python27_32\python setup.py build_ext --compiler msvc bdist_wininst upload
fileEnding = win32-py2.7.exe

[py27_64]
# .egg
command = call "C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\bin\VCVARSX86_AMD64.bat"
set PATH=%PATH%;"C:\Program Files\Microsoft SDKs\Windows\v6.1\Bin\x64"
c:\Python27_64\python setup.py build_ext --compiler msvc bdist_egg upload
setup = call "C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\bin\VCVARSX86_AMD64.bat"
set PATH=%PATH%;"C:\Program Files\Microsoft SDKs\Windows\v6.1\Bin\x64"
command = c:\Python27_64\python setup.py build_ext --compiler msvc bdist_egg upload
fileEnding = py2.7-win-amd64.egg

[py27_64X]
# .exe
command = call "C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\bin\VCVARSX86_AMD64.bat"
set PATH=%PATH%;"C:\Program Files\Microsoft SDKs\Windows\v6.1\Bin\x64"
c:\Python27_64\python setup.py build_ext --compiler msvc bdist_wininst upload
setup = call "C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\bin\VCVARSX86_AMD64.bat"
set PATH=%PATH%;"C:\Program Files\Microsoft SDKs\Windows\v6.1\Bin\x64"
command = c:\Python27_64\python setup.py build_ext --compiler msvc bdist_wininst upload
fileEnding = win-amd64-py2.7.exe

[py32_32]
# .egg
command = call "C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\VCVARSALL.bat" x86
set PATH=%PATH%;"C:\Program Files\Microsoft SDKs\Windows\v6.1\Bin"
c:\Python32_32\python setup.py build_ext --compiler msvc bdist_egg upload
setup = call "C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\VCVARSALL.bat" x86
set PATH=%PATH%;"C:\Program Files\Microsoft SDKs\Windows\v6.1\Bin"
command = c:\Python32_32\python setup.py build_ext --compiler msvc bdist_egg upload
fileEnding = py3.2-win32.egg

[py32_32X]
# .exe
command = call "C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\VCVARSALL.bat" x86
set PATH=%PATH%;"C:\Program Files\Microsoft SDKs\Windows\v6.1\Bin"
c:\Python32_32\python setup.py build_ext --compiler msvc bdist_wininst upload
setup = call "C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\VCVARSALL.bat" x86
set PATH=%PATH%;"C:\Program Files\Microsoft SDKs\Windows\v6.1\Bin"
command = c:\Python32_32\python setup.py build_ext --compiler msvc bdist_wininst upload
fileEnding = win32-py3.2.exe

[py32_64]
# .egg
command = call "C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\bin\VCVARSX86_AMD64.bat"
set PATH=%PATH%;"C:\Program Files\Microsoft SDKs\Windows\v6.1\Bin\x64"
c:\Python32_64\python setup.py build_ext --compiler msvc bdist_egg upload
setup = call "C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\bin\VCVARSX86_AMD64.bat"
set PATH=%PATH%;"C:\Program Files\Microsoft SDKs\Windows\v6.1\Bin\x64"
command = c:\Python32_64\python setup.py build_ext --compiler msvc bdist_egg upload
fileEnding = py3.2-win-amd64.egg

[py32_64X]
# .exe
command = call "C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\bin\VCVARSX86_AMD64.bat"
set PATH=%PATH%;"C:\Program Files\Microsoft SDKs\Windows\v6.1\Bin\x64"
c:\Python32_64\python setup.py build_ext --compiler msvc bdist_wininst upload
setup = call "C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\bin\VCVARSX86_AMD64.bat"
set PATH=%PATH%;"C:\Program Files\Microsoft SDKs\Windows\v6.1\Bin\x64"
command = c:\Python32_64\python setup.py build_ext --compiler msvc bdist_wininst upload
fileEnding = win-amd64-py3.2.exe


Expand Down
1 change: 1 addition & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,5 +62,6 @@ def read(*rnames):
entry_points = """
[console_scripts]
build = zope.wineggbuilder.build:main
lxml = zope.wineggbuilder.lxml:main
""",
)
8 changes: 8 additions & 0 deletions src/zope/wineggbuilder/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,14 @@ def checkout(self, branch):
return self.cmd.do(command)


class Download(object):
def __init__(self, exitOnError=True):
self.cmd = self.commandKlass(exitOnError=exitOnError)

def download(self, package, repourl, tmpfolder, version):
pass


class SVN(object):
user = None
passwd = None
Expand Down
13 changes: 13 additions & 0 deletions src/zope/wineggbuilder/build.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ def __init__(self, name, config, options):
self.read(config)

def read(self, config):
self.setup = config.get(self.name, 'setup')
self.command = config.get(self.name, 'command')
self.fileEnding = config.get(self.name, 'fileEnding')

Expand Down Expand Up @@ -82,6 +83,8 @@ def build(self, package, version, files, sourceFolder, status):
command = command.replace('upload', '')
status.setStatus(package, version, "dryrun", self)

command = self.setup + '\r\n' + command

LOGGER.debug('Running: %s\nIn: %s', command, sourceFolder)

tmpfile = None
Expand Down Expand Up @@ -127,6 +130,7 @@ class Package(object):
urlGetterKlass = base.URLGetter
svnKlass = base.SVN
gitKlass = base.Git
dlKlass = base.Download

def __init__(self, sectionName, config, options, compilers):
self.sectionName = sectionName
Expand All @@ -148,6 +152,11 @@ def read(self, sectionName, config, compilers):
'https://github.com/zopefoundation/%s.git' % self.name)
if self.repourl.endswith('/'):
self.repourl = self.repourl[:-1]
if self.repotype == 'download':
self.repourl = getOption(config, sectionName, 'repourl',
'https://pypi.python.org/packages/source/%s/%s' % (self.name[0], self.name))
if self.repourl.endswith('/'):
self.repourl = self.repourl[:-1]
self.minVersion = getOption(config, sectionName, 'minVersion')
self.maxVersion = getOption(config, sectionName, 'maxVersion')
self.needSource = bool(getOption(config, sectionName, 'needSource', 'True'))
Expand Down Expand Up @@ -263,6 +272,10 @@ def skip(version):
git = self.gitKlass(exitOnError=False)
git.clone(self.repourl, tmpfolder)
git.checkout(version)
if self.repotype == 'download':
# download source from pypi
dl = self.dlKlass()
dl.download(self.name, self.repourl, tmpfolder, version)
except OSError:
status.setStatus(self, version, "SVN/Git error")
else:
Expand Down
Loading

0 comments on commit 20119fa

Please sign in to comment.