Tarek Ziadé wrote: > Hi, > > PEP 345 is the PEP for the new metadata format, replacing PEP 314. I > have upgraded it, using Tres's work from last year, and the next step > is to add the context marker presented in PEP 390. > > I have also updated PEP 386 to link it to PEP 345. > > = PEP 345 : Summary of Differences From PEP 314 = > > * Metadata-Version is now 1.2. > > * Added fields: > > - Maintainer > - Maintainer-email > - Requires-Python > - Requires-External > - Requires-Dist > - Provides-Dist > - Obsoletes-Dist > > * Deprecated fields: > > - Requires (in favor of Requires-Dist) > - Provides (in favor of Provides-Dist) > - Obsoletes (in favor of Obsoletes-Dist)
Where's the benefit of renaming the above three fields ? After all, the meta-data format is a distutils specific format, so the extra "-Dist" qualifier appears unnecessary. I'd also remove the "Requires-" from "Requires-Python" and simply use "Python" as field name. The intent should be clear, e.g. for Python 2 packages that need at least 2.6: Python: >2.6, <3.0 I'd also like to suggest the addition of conditional field values as already discussed in private mail. This would allow defining requirements based on the target platform and use the same micro-language as suggested in PEP 390. Here's a sketch (following Python's inline if syntax and the example from PEP 390): requires: pywin32; if sys_platform == 'win32' requires: bar (>1.0); if sys_platform == 'win32' requires: foo; if platform_machine == 'i386' requires: bar; if python_version == '2.4' or python_version == '2.5' requires: baz; if 'linux' in sys_platform Each of the listed requires field entries only applies if the condition matches the target platform. The micro-language should provide a limited number of variables to use on the conditions: python_version = sys.version sys_platform = sys.platform os_name = os.name platform_machine = platform.machine() platform_version = platform.version() and possibly more. The same notation could also be used in setup() keyword parameters for the meta-data fields, e.g. setup(..., requires=["pywin32; if sys_platform == 'win32'"], ...) -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Oct 20 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 - Distutils-SIG@python.org http://mail.python.org/mailman/listinfo/distutils-sig