[Zope-Coders] Zope 2.7 configure finds wrong Python version

Matt Behrens matt@zigg.com
Tue, 10 Jun 2003 13:54:30 -0400


--4Ckj6UjgE2iN1+kY
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Tue, Jun 10, 2003 at 01:11:15PM -0400, Guido van Rossum wrote:

> Hm.  There's also a list of "ACCEPTABLE" versions.  Unfortunately it
> appears out of date (2.3b1 is not on it).  Plus, I don't know if a
> trailing sub-version or "+" is accepted or not.  Etc.

It's a direct compare between whatever string.split(sys.version)[0]
returns and the item in the shell vars you're looking at.  So, no.

This is chrism's code -- my aborted attempt last year delegated to
a short python script to test the version:

---8<---

version =3D string.split(sys.version, ' ')[0]
print '%s is %s' % (sys.executable, version)

supported_version =3D sys.argv[1]
minimum_patchlevel =3D sys.argv[2]

if version[:3] =3D=3D supported_version:
    if version >=3D minimum_patchlevel:
	sys.exit(0)

sys.exit(1)

---8<---

The shell script would invoke 'inst/acceptable_version.py 2.2 2.2.3',
then the exit code was used to determine whether or not this was
an "acceptable" version.

--=20
Matt Behrens <matt@zigg.com> <URL:http://zigg.com/>

--4Ckj6UjgE2iN1+kY
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.1 (OpenBSD)

iD8DBQE+5htW+xq4JbgNGlMRAhN1AJ4vk4eMWDP9XiO3bBCnIYDd/0V+dQCfXExp
t1zmWzQtGVkTQrEPrD+M3pE=
=R3wF
-----END PGP SIGNATURE-----

--4Ckj6UjgE2iN1+kY--