[Distutils] PEP 426 updated (with more than you ever wanted to know about version schemes)

Chris Jerdonek chris.jerdonek at gmail.com
Tue Feb 12 10:23:04 CET 2013


On Tue, Feb 12, 2013 at 12:48 AM, Ronald Oussoren
<ronaldoussoren at mac.com> wrote:
>
> On 12 Feb, 2013, at 9:33, Nick Coghlan <ncoghlan at gmail.com> wrote:
>
>> On Tue, Feb 12, 2013 at 6:25 PM, Ronald Oussoren <ronaldoussoren at mac.com> wrote:
>>>> PEPs 426 and 427 between them should achieve the first objective,
>>>> while the other parts of PEP 426 should get us a long way towards
>>>> achieving the second (with "./setup.py bdist_wheel" as the interim
>>>> build hook, pending the introduction of anything better in a PEP for a
>>>> clarified sdist format).
>>>
>>> How far do you want to standardize the sdist format? For the goals you
>>> mentioned earlier you'd only have to specify that an sdist contains
>>> a configuration file that says which builder should be used. It might be
>>> nice if the full PKG-INFO contents were also available to extract some
>>> metadata without invoking the builder.
>>
>> The sdist format already requires PKG-INFO
>
> Ouch, it's glaringly obviously now that you mention it but I never noticed the PKG-INFO file in sdists before :-(

One reason it might not be as well-known as it should is that it's not
documented in the Python distribution/distutils documentation.  I
filed an issue in the Python tracker about this a few months back:

http://bugs.python.org/issue16401

--Chris


>
>> - it just needs to be
>> documented *as* a standard format, rather than implied by "what
>> distutils creates when you call 'setup.py sdist'". PEP 426 actually
>> takes a fairly big step in that direction already by declaring that
>> sdist archives should contain a PKG-INFO file that follows PEP 426
>> (see http://www.python.org/dev/peps/pep-0426/#metadata-files)
>>
>> The missing piece is a standard hook for invoking the builder to
>> create a wheel. Currently, that would be via "./setup.py bdist_wheel",
>> but we want to get away from the setup.py format.
>
> I agree with that.  The hook could be one or two new header fields in the PKG-INFO
> file, with a PEP that describes those keys and how the builder is invoked and what
> it is supposed to do. Am I understanding this correctly?
>
> Something like:
>
> Extension: pepYYY-builder
> pepYYY-builder/dist: bento (>=1.1)
> pepYYY-builder/build: bento.builder:run
>
> Ronald
>
>>
>> Cheers,
>> Nick.
>>
>> --
>> Nick Coghlan   |   ncoghlan at gmail.com   |   Brisbane, Australia
>
> _______________________________________________
> Distutils-SIG maillist  -  Distutils-SIG at python.org
> http://mail.python.org/mailman/listinfo/distutils-sig


More information about the Distutils-SIG mailing list