Path: csiph.com!newsfeed.xs4all.nl!newsfeed9.news.xs4all.nl!bofh.it!news.nic.it!robomod From: Scott Kitterman Newsgroups: linux.debian.maint.python Subject: Use of flit as a build-backend in pybuild Date: Mon, 29 Nov 2021 20:40:01 +0100 Message-ID: X-Original-To: debian-python@lists.debian.org X-Mailbox-Line: From debian-python-request@lists.debian.org Mon Nov 29 19:39:18 2021 Old-Return-Path: X-Amavis-Spam-Status: No, score=-12.2 tagged_above=-10000 required=5.3 tests=[BAYES_00=-2, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, LDO_WHITELIST=-5, PGPSIGNATURE=-5] autolearn=ham autolearn_force=no X-Policyd-Weight: using cached result; rate: -5.5 MIME-Version: 1.0 Content-Type: multipart/signed; boundary="nextPart3997470.iMpAui6yyq"; micalg="pgp-sha512"; protocol="application/pgp-signature" X-Mailing-List: archive/latest/19547 List-ID: List-URL: List-Archive: https://lists.debian.org/msgid-search/1706627.YggxlgfQ6i@localhost Approved: robomod@news.nic.it Lines: 66 Organization: linux.* mail to news gateway Sender: robomod@news.nic.it X-Original-Date: Mon, 29 Nov 2021 14:38:52 -0500 X-Original-Message-ID: <1706627.YggxlgfQ6i@localhost> Xref: csiph.com linux.debian.maint.python:13740 --nextPart3997470.iMpAui6yyq Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" The versions of pybuild in stable, testing, and unstable all support flit as a build-backend for packages built upstream using flit. You can tell if your package is built using flit if it has a pyproject.toml file and it contains a paragraph like: [build-system] requires = ["flit_core >=3.2.0,<4"] build-backend = "flit_core.buildapi" Of the packages I've looked at, they either have no setup.py at all or a very rudimentary generated setup.py. Although the generated setup.py will work, it's only going to provide limited Python metadata for the package. Under the hood, using flit provides a nicer package. To use the flit backend for pybuild all you should need to do is add flit to build-depends and drop whichever of python3-setuptools or python3-distutils you are using now. Flit will be autodetected (and you will see it mentioned in the build log). Flit 3.0 is the lowest version in Debian, so if the requires version is 3.0 or less, then an unversioned build-depends on flit is appropriate. For the example above it would be: flit >= 3.2.0 There is one issue at present, currently if upstream provides optional depends in PEP 621 metadata (there is a [project.optional-dependencies] paragraph in the pyproject.toml) these optional dependencies are added to the binary depends through the python3:Depends expansion variable. I expect this to be fixed in the next dh-python upload. In the meantime this can be disabled by: override_dh_python3: dh_python3 --no-guessing-deps As I'm going through updating my packages, I'm finding flit use is much more common than I was expecting. You may be able to use this more than you thought. I certainly am. Scott K --nextPart3997470.iMpAui6yyq Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part. Content-Transfer-Encoding: 7Bit -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEE53Kb/76FQA/u7iOxeNfe+5rVmvEFAmGlLEwACgkQeNfe+5rV mvFm0w//ZksrrgS3L8tn5Dz3nCUL1JR1zNBEWFrv8ulbvslSHmGomijgOFLfOZET g2b5JqBlh6USe/XXfoq8WUiXURo7mH82sm4jjiOHmqMdSbE2VpijoGSsFU091mtQ r4w8DK5kvfeCDP3eAA5Q5zvSf5rYa4tpUUPn5Z7KftxJi0AktGTSlaxVe+P10KV+ Uo6gyYZhC22bxVIqw9+lqwa2IMn81/9h0AGXH/WEcuyVk73kRQ/AEeZee6ZxgsEs IJX7/o9RKx0Bdps7Bg1+o3CiCNNs8AfgcxwzVG79HSSbxwhzpjDv2l1HeQ5ue78d JQBkTYd7RT8XqKPBho7bvNZehw85mKiNTrlj6QN+auL0To2oHwxBOiivsKJ0KrJ7 HLBUt/C563gseq76no6lrBfMk/mw+N5Vyz3Nu7MITM0iFRvqd4jMF8/yUJsi7SdO 6TFbNpbF4UFj2TyoCD/IycSQJDPGOcMnx5icmjhCJWeHayIxu7/hSGxhz4kYuOck wLmcBpxcJhSBMw8KoxLcCQI7DPf5zTKDO58xRql8iwVc6vVxfbBxhulQf8FCpgDB HxmwgTXUVZGA7wWF42cF9+UWkUnoJIiIvKlTtT5ufj10J41AqZNYXMLd35i3iqSr R+ZsxGnHGBXZA9sIdRq21J+qSyioq0xviIZ2COHhio/aOjSsT04= =BDIn -----END PGP SIGNATURE----- --nextPart3997470.iMpAui6yyq--