[Distutils] Q about best practices now (or near future)

Oscar Benjamin oscar.j.benjamin at gmail.com
Thu Jul 18 16:40:01 CEST 2013


On 18 July 2013 13:13, Nick Coghlan <ncoghlan at gmail.com> wrote:
>
> On 18 Jul 2013 21:48, "Oscar Benjamin" <oscar.j.benjamin at gmail.com> wrote:
>
>> In another thread you mentioned the idea that someone would build
>> without using distutils/setuptools by using a setup.py that simply
>> invokes an alternate build system that is build-required by the sdist.
>> That's fine for simple cases but how many 'python setup.py <command>'s
>> should the setup.py support?
>
> Please read PEP 426, as I cover this in detail. If anything needs further
> clarification, please let me know.

Okay, I have actually read that before but I forgot about that bit. It says:
'''
In the meantime, the above operations will be handled through the
distutils/setuptools command system:
python setup.py dist_info
python setup.py sdist
python setup.py build_ext --inplace
python setup.py test
python setup.py bdist_wheel
'''

That seems a sufficiently minimal set of commands. What I wonder when
reading it is whether any other command line options are expected to
be supported. For example if the setup.py is using
distutils/setuptools then you could do something like:

   python setup.py sdist --dist-dir=some_dir

Should it be explicitly not required that the setup.py should support
any other invocation than those listed and should just report
success/failure by error code?

Also in the event of failure is it the job of setup.py to clean up
after itself (since there's no clean command)?


Oscar


More information about the Distutils-SIG mailing list