Tarek Ziadé wrote: > On Tue, Oct 20, 2009 at 5:20 PM, M.-A. Lemburg <[email protected]> wrote: >>>> The micro-language should provide a limited number of >>>> variables to use on the conditions: >>>> >>>> python_version = sys.version >>>> sys_platform = sys.platform >>> >>> If we adopt such a micro-language (I'm reserving judgment until I've >>> had more time to read the relevant PEPs carefully), I'd rather see the >>> names match what's in the Python runtime more closely, probably only >>> avoiding the call syntax. >> >> We could do that as well, yes. > > +1 on close names + no call syntax > > but, notice that "python_version" here is: "%s.%s" % > sys.version_info[0], sys.version_info[1] > > thats why we came up with that name, to disinguish it from sys.version > (that contains more stuff)
I think we do need the full version here, so perhaps using sys.version.split()[0] would be better or simply the full version string and then have conditions use >=, <=, <, > only (ie. not =, since that would likely never match). Note that packages do sometimes need to know that a certain Python patch level release is installed (e.g. Zope often has had this need) and a proper dependency checker would have to detect a possible mismatch. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Oct 21 2009) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try our new mxODBC.Connect Python Database Interface for free ! :::: eGenix.com Software, Skills and Services GmbH Pastor-Loeh-Str.48 D-40764 Langenfeld, Germany. CEO Dipl.-Math. Marc-Andre Lemburg Registered at Amtsgericht Duesseldorf: HRB 46611 http://www.egenix.com/company/contact/ _______________________________________________ Distutils-SIG maillist - [email protected] http://mail.python.org/mailman/listinfo/distutils-sig
