[Distutils] Deprecating little used file types/extensions on PyPI?

Donald Stufft donald at stufft.io
Fri Aug 19 13:21:42 EDT 2016


> On Aug 19, 2016, at 1:14 PM, Paul Moore <p.f.moore at gmail.com> wrote:
> 
> On 19 August 2016 at 16:14, Donald Stufft <donald at stufft.io> wrote:
>> Not sure if we’ll be able to back port it to 2.7 itself, but it’s a trivial
>> change to make inside of setuptools as well. Here’s a PR to setuptools that
>> will adjust the default: https://github.com/pypa/setuptools/pull/748.
> 
> Hmm. So the question becomes, do we care about supporting users
> building sdists without setuptools? It's not like this is a scenario
> controlled by pip, which auto-injects setuptools. So I guess we'd need
> to also publicise the --formats=gztar flag (at
> https://packaging.python.org/distributing/#source-distributions if
> nowhere else).
> 
> So, the plan becomes:
> 
> 1. Change Python 3.6 to default to .tar.gz on Windows
> 2. Change setuptoos to default to .tar.gz, to catch users of older versions
> 3. Document how to create a source distribution as "python setup.py
> sdist (add the --formats=gztar flag if you're on Windows and using a
> Python older than 3.6 and not using setuptools)" in the PUG
> 4. Update https://docs.python.org/3/distutils/sourcedist.html for 3.6
> to note the change in default.
> 
> For (3) soften the laboured conditional comment as much as you like,
> but I think we need something to help people who don't understand
> what's going on. For (1) and (4), maybe we don't target 3.6 (given
> setuptools, it's not urgent) but I think we should change the core, if
> only to avoid surprises for people who don't include setuptools in
> their setup.py (maybe relying on pip injecting it for things like
> wheel builds), and so that distutils isn't (in effect) deliberately
> wrong going forward.


FWIW, they can also drop a setup.cfg in their project too that looks
like: https://bpaste.net/show/90dd1280eba6 and then forget about it, which
makes it somewhat less painful, since they won’t have to remember to do it
on a per project basis past the first time. I believe that can also be put
in ~/.pydistutils.cfg (or w/e that file is again…) to change the default on
a per user basis.


>> While I think it’s OK to allow .zip in the interim, I do think we should be
>> trying to move towards only allowing a single format.
> 
> Your arguments are compelling, I have no problem with the conclusion -
> we just need a little more thought on the transition.
> 

Sure! I have some other things to do today, but I’ll try and figure out something
a bit more fleshed out for the transition given this new (to me) information.

—
Donald Stufft





More information about the Distutils-SIG mailing list