Permalink
Browse files

Added some sanity checks for the virtualenvs.

This shows that python-2.5 is currently broken on Snow Leopard.
  • Loading branch information...
1 parent 4208167 commit d1624d32e6b58ed212f21f4309860ad7017b17a1 fschulze committed Oct 7, 2009
Showing with 33 additions and 0 deletions.
  1. +7 −0 src/python24.cfg
  2. +7 −0 src/python25.cfg
  3. +7 −0 src/python26.cfg
  4. +12 −0 src/test-python.py
View
@@ -6,6 +6,7 @@ python24-parts =
python-2.4-virtualenv
python-2.4
python-2.4-PIL
+ python-2.4-test
# python-2.4-buildout
[python-2.4-build:default]
@@ -55,6 +56,12 @@ command =
${:location}/bin/easy_install -f http://dist.repoze.org/plone/latest -U PIL
update-command = ${:command}
+[python-2.4-test]
+recipe = z3c.recipe.runscript
+install-script = ${buildout:python-buildout-root}/test-python.py:test
+update-script = ${:install-script}
+python = ${python-2.4:location}/bin/python
+
[python-2.4-buildout]
recipe = zc.recipe.egg
python = python-2.4-build
View
@@ -6,6 +6,7 @@ python25-parts =
python-2.5-virtualenv
python-2.5
python-2.5-PIL
+ python-2.5-test
# python-2.5-buildout
[python-2.5-build:default]
@@ -48,6 +49,12 @@ command =
${:location}/bin/easy_install -f http://dist.repoze.org/plone/latest -U PIL
update-command = ${:command}
+[python-2.5-test]
+recipe = z3c.recipe.runscript
+install-script = ${buildout:python-buildout-root}/test-python.py:test
+update-script = ${:install-script}
+python = ${python-2.5:location}/bin/python
+
[python-2.5-buildout]
recipe = zc.recipe.egg
python = python-2.5-build
View
@@ -6,6 +6,7 @@ python26-parts =
python-2.6-virtualenv
python-2.6
python-2.6-PIL
+ python-2.6-test
# python-2.6-buildout
[python-2.6-build:default]
@@ -41,6 +42,12 @@ command =
${:location}/bin/easy_install -f http://dist.repoze.org/plone/latest -U PIL
update-command = ${:command}
+[python-2.6-test]
+recipe = z3c.recipe.runscript
+install-script = ${buildout:python-buildout-root}/test-python.py:test
+update-script = ${:install-script}
+python = ${python-2.6:location}/bin/python
+
[python-2.6-buildout]
recipe = zc.recipe.egg
python = python-2.6-build
View
@@ -0,0 +1,12 @@
+def test(options, buildout):
+ from subprocess import Popen, PIPE
+ import os
+ import sys
+
+ python = options['python']
+ if not os.path.exists(python):
+ raise IOError("There is no file at %s" % python)
+ if sys.platform == 'darwin':
+ output = Popen([python, "-c", "import platform; print platform.mac_ver()"], stdout=PIPE).communicate()[0]
+ if not output.startswith("('10."):
+ raise IOError("Your python at %s doesn't return proper data for platform.mac_ver(), got: %s" % (python, output))

0 comments on commit d1624d3

Please sign in to comment.