Commit aa499b6c authored by Kai Lautaportti's avatar Kai Lautaportti

Added Python 3.3. support.

parent 2cf107fb
include README.txt
include CHANGES.txt
include tox.ini
recursive-include hexagonit *
......@@ -208,7 +208,7 @@ Let's create a buildout to build and install the package.
This will download, extract and build our demo package with the
default build options.
>>> print system(buildout)
>>> print(system(buildout))
Installing package.
package: Extracting package to /sample_buildout/parts/package__compile__
configure --prefix=/sample_buildout/parts/package
......@@ -242,7 +242,7 @@ a custom location within the buildout::
... url = file://%s/Foo-Bar-0.0.0.tar.gz
... """ % src)
>>> print system(buildout)
>>> print(system(buildout))
Uninstalling package.
Installing foobar.
foobar: Extracting package to /sample_buildout/parts/foobar__compile__
......@@ -281,7 +281,7 @@ Makefile and using explicit ``make`` options to control the build process.
... url = file://%s/haproxy-1.4.8-dummy.tar.gz
... """ % src)
>>> print system(buildout)
>>> print(system(buildout))
Uninstalling foobar.
Installing haproxy.
haproxy: Extracting package to /sample_buildout/parts/haproxy__compile__
......@@ -322,7 +322,7 @@ and building that.
... path = %s/package-0.0.0
... """ % checkout_dir)
>>> print system(buildout)
>>> print(system(buildout))
Uninstalling haproxy.
Installing package.
package: Using local source directory: /checkout/package-0.0.0
......@@ -379,7 +379,7 @@ This configuration uses custom configure options, an environment section,
per-part customization to the environment, custom prefix, multiple make
targets and also patches the source code before the scripts are run.
>>> print system(buildout)
>>> print(system(buildout))
Uninstalling package.
Installing package.
package: [ENV] CFLAGS = -I/sw/include
......@@ -464,7 +464,7 @@ and a new buildout to try it out
... post-make-hook = %(module)s:postmake
... """ % dict(src=src, module='%s/customhandlers.py' % hooks))
>>> print system(buildout)
>>> print(system(buildout))
Uninstalling package.
Installing package.
package: Extracting package to /sample_buildout/parts/package__compile__
......
......@@ -95,7 +95,7 @@ class Recipe(object):
elif retcode > 0:
log.error('Command failed with exit code %s: %s' % (retcode, cmd))
raise zc.buildout.UserError('System error')
except OSError, e:
except OSError as e:
log.error('Command failed: %s: %s' % (e, cmd))
raise zc.buildout.UserError('System error')
......@@ -148,7 +148,7 @@ class Recipe(object):
current_dir = os.getcwd()
try:
os.mkdir(self.options['location'])
except OSError, e:
except OSError as e:
if e.errno == errno.EEXIST:
pass
os.chdir(compile_dir)
......
from zope.testing import doctest
from zope.testing import renormalizing
import doctest
import errno
import os
import re
......@@ -31,7 +30,7 @@ class NonInformativeTests(unittest.TestCase):
def tearDown(self):
shutil.rmtree(self.dir)
for var in os.environ.keys():
for var in list(os.environ.keys()):
if var.startswith('HRC_'):
del os.environ[var]
......@@ -48,7 +47,7 @@ class NonInformativeTests(unittest.TestCase):
parts_directory_path = os.path.join(self.dir, 'test_parts')
try:
os.mkdir(parts_directory_path)
except OSError, e:
except OSError as e:
if e.errno != errno.EEXIST:
raise
bo = {
......@@ -167,7 +166,7 @@ class NonInformativeTests(unittest.TestCase):
try:
recipe.call_script('%s:my_hook' % filename)
self.fail("The hook script was not called.")
except ValueError, e:
except ValueError as e:
self.assertEquals(str(e), 'I got called')
def test_call_script__augmented_environment_as_third_parameter(self):
......@@ -189,7 +188,7 @@ class NonInformativeTests(unittest.TestCase):
try:
recipe.call_script('%s:my_hook' % filename)
self.fail("The hook script was not called.")
except ValueError, e:
except ValueError as e:
self.assertEquals(str(e), 'sentinel bar')
......@@ -211,6 +210,3 @@ def test_suite():
unittest.makeSuite(NonInformativeTests),
))
return suite
if __name__ == '__main__':
unittest.main(defaultTest='test_suite')
......@@ -51,6 +51,6 @@ setup(
'test': ['zope.testing'],
},
tests_require=['zope.testing'],
test_suite='%s.tests.test_suite' % name,
entry_points={'zc.buildout': ['default = %s:Recipe' % name]},
test_suite='hexagonit.recipe.cmmi.tests.test_suite',
entry_points={'zc.buildout': ['default = hexagonit.recipe.cmmi:Recipe']},
)
......@@ -4,9 +4,15 @@
# and then run "tox" from this directory.
[tox]
envlist = py26, py27
envlist = py26, py27, py33
[testenv]
commands = python setup.py test
deps =
zc.buildout==1.6.3
[testenv:py33]
deps =
zc.buildout==2.0.0
zope.testing
manuel
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment