On Tue, 23 Mar 2021 12:34:47 +0000 "Thomas Kluyver" <tho...@kluyver.me.uk> wrote:
> On Tue, 23 Mar 2021, at 11:13, Julian Smith wrote: > > So as far as i can tell, there are two levels of abstraction at which > > on can implement customised Python packaging (the setuptools.setup()'s > > callbacks or the setup.py command line), but neither one seems to be > > documented or standardised. > > That's right. PEP 517 (https://www.python.org/dev/peps/pep-0517/ ) is our > effort to have a standardised, documented interface to replace running > setup.py. setup.py is now run by setuptools as part of a PEP 517 backend. Many thanks for this, and the other replies from Bernat Gabor <gaborjber...@gmail.com> and Tzu-ping Chung <uranu...@gmail.com>. I had already come across PEP-517 actually, but hadn't appreciated its importance. I think i've managed to get my packaging to work using PEP-517 callbacks. I was a little surprised to find out that one can't use pip to create an sdist, but i'm a bit late to this party and it looks like there's been plenty of discussion about this in the past. I've ended up with a pyproject.toml that points to a setup.py file which functions both as a PEP-517 module (providing functions build_wheel() and (unused) build_sdist()), and also as a conventional setup.py script for things like './setup.py sdist'. I've come across a problem where an old pip-18.1 fails to install from an sdist or wheel, with error: ERROR: You must give at least one requirement to install (see "pip help install") pip-20.2.1 and pip-21.0.1 work fine, including installing from an sdist on test.py.pi. Should i be worried about this? I'd like my package to install on anyone's machine, regardless of their pip version. But maybe users are expected to always run a recent pip version? After all it's easy enough to upgrade it. Thanks, - Jules -- http://op59.net -- Distutils-SIG mailing list -- distutils-sig@python.org To unsubscribe send an email to distutils-sig-le...@python.org https://mail.python.org/mailman3/lists/distutils-sig.python.org/ Message archived at https://mail.python.org/archives/list/distutils-sig@python.org/message/TSMVUAACJTCCKPWXLHA2P3LQ6GV2UR6R/