Path: csiph.com!news.samoylyk.net!gothmog.csi.it!bofh.it!news.nic.it!robomod From: Soren Stoutner Newsgroups: linux.debian.maint.python Subject: Re: Requesting guidance on the best way to package Python packages that include Rust code (specifically uv_build) Date: Sun, 21 Sep 2025 04:30:01 +0200 Message-ID: References: X-Original-To: debian-python@lists.debian.org, debian-rust@lists.debian.org, Manuel Guerra X-Mailbox-Line: From debian-python-request@lists.debian.org Sun Sep 21 02:26:01 2025 Old-Return-Path: X-Amavis-Spam-Status: No, score=-114.51 tagged_above=-10000 required=5.3 tests=[BAYES_00=-2, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, LDO_WHITELIST=-5, PGPSIGNATURE=-5, RCVD_IN_DNSWL_MED=-2.3, UNPARSEABLE_RELAY=0.001, USER_IN_DKIM_WELCOMELIST=-0.01, USER_IN_DKIM_WHITELIST=-100] autolearn=ham autolearn_force=no Organization: Debian Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAAFVBMVEWIg4F7bGiws7ReTkyy kYoXFRrd6/4yMA0PAAACaklEQVQ4y22TwXabMBBFJaPuNZGSNZZp1uhM6BpkJeu4VFk3bsL/f0Lf CHC6qHyOgbl68zTDoIwaVfh3tUopTUGpbFToDiFnY9IY2oMAZYMiS4R9SfbSXepSS5EcFAa/muIU aRj8mkoUqrEraFzhYegBmqig0LyCIyM8DAwPlpBqmJVYaD2UeWZ3abVjsqKIojg+hY4omsyIcNSi qIBM6jJWOveS6kvBeVvHJ+VYzJUW88RmA12UiBx3HEcUMRuzIZI6tBQovTrPclNB3AuUXoXvs0XY C3B2baJpW4Dn2ZpVMInCirkxoyhM1qpK5nFrO65QvCrCqql2DyPgvm94iMQz5/PmISuEotxQGMD5 M5G1N9CjXJ5HQH96BZG2xx6AzejYZccxT4Re3Zr4bPKkCcGcz5Or3dVEABkAUY/znnVcQVVkrXVU vomoEJFe7x4nQuaZmZELL6qnXZGIB5YV/Q2IogtSmyNybEcBX2+QCLOAQYm+gmoORUrYzV7dc6R2 T1WPm45oVEQqsjtoIovHyTmcyxMhVVxTqapomZyLlAmTKC9AmjgamXXGZo+epNrXO3wGGiPRHbKL FnMy2RRgRb1gzFXXGjhICp8wqaTtdtyQH6nWTfkatJvJJoUCbOjSC7wR9/naEVognxrOFdLh7Ugx QpA/0QT4pRV0+u2dqsXD5y9EBDjVAJS3ZZLxmZblgmsU8x7mBeCKg48Py7WU2IiH1epbEbC8K9Ms y0cpcySVUcdQVrBY+rEsv+XpYgFKXT8B3v2yATxv8fKK2EfC358tsIMLYqfD401xA0j1EY4P/wWf IbhlOWyBv4OQsywBM8MAAAAAAElFTkSuQmCC MIME-Version: 1.0 Content-Type: multipart/signed; boundary="nextPart10724608.nUPlyArG6x"; micalg="pgp-sha512"; protocol="application/pgp-signature" X-Debian-User: soren X-Mailing-List: archive/latest/23266 List-ID: List-URL: List-Archive: https://lists.debian.org/msgid-search/8580191.T7Z3S40VBb@soren-desktop Approved: robomod@news.nic.it Lines: 92 Sender: robomod@news.nic.it X-Original-Date: Sat, 20 Sep 2025 19:25:13 -0700 X-Original-Message-ID: <8580191.T7Z3S40VBb@soren-desktop> X-Original-References: <13846854.uLZWGnKmhe@soren-desktop> Xref: csiph.com linux.debian.maint.python:17082 --nextPart10724608.nUPlyArG6x Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8"; protected-headers="v1" From: Soren Stoutner Date: Sat, 20 Sep 2025 19:25:13 -0700 Message-ID: <8580191.T7Z3S40VBb@soren-desktop> Organization: Debian In-Reply-To: MIME-Version: 1.0 Ananthu and Louis-Philippe, thank you. Both of your responses were very=20 helpful. On Friday, September 19, 2025 4:32:35=E2=80=AFAM Mountain Standard Time Ana= nthu C V=20 wrote: > Hi Soren, >=20 > On Thu, Sep 18, 2025 at 02:08:47PM -0700, Soren Stoutner wrote: > > There are a couple of Python packages I maintain which have introduced = new > > dependencies written in Python but containing Rust code. In particular, > > this > > email is regarding uv_build, which is a Python build system that is bei= ng > > adopted by a number of upstream projects whose packages I maintain. > >=20 > > Manuel Guerra has been looking into how difficult it is to package=20 uv_build. >=20 > I will talk more about this below. >=20 > > https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=3D1115616 > >=20 > > By default, it wants to download Rust code at build-time based on a > > Cargo.toml. I assume this is not unique nor the first time this can co= me=20 up > > with a Python package. My question is, what is the canonical way for > > handing > > such dependencies? >=20 > The rust cargo wrapper is currently the way we usually go with, you > can refer to [0]. pollo already shared an example, some other ones are > python-orjson, pendulum etc. This is all under the impression of your > package not using uv_build itself as build backend, or you will have to=20 either > switch it over to another build backend or wait until uv_build is package= d. >=20 > Coming back to the packaging of uv_build, there is already ongoing > effor for packaging uv. But it is not easy as the dependency is tree > is quite huge. I'd expect most of it to be packaged though, but > there's a huge pain with uv itself. uv has an insane amount of > internal crates, none of which are in crates.io, which means the > typical rust team workflow can't be applied to them at least. A simple > 'find crates/ -maxdepth 1 -name uv-* -type d | wc -l' in the uv repo > will give you 61 as result, which is 60 other internal crates than uv > itself. Now uv_build does not require all of that, but working on this > will require a lot of things to be figured out first; such as what all > binaries need to be shipped, how to handle the build, etc. So it is > quite complicated and probably will take some time to get sorted out. >=20 > [0] https://rust-team.pages.debian.net/book/process-workspace.html =2D-=20 Soren Stoutner soren@debian.org --nextPart10724608.nUPlyArG6x Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part. Content-Transfer-Encoding: 7Bit -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEJKVN2yNUZnlcqOI+wufLJ66wtgMFAmjPYgkACgkQwufLJ66w tgMo7A/9E7vmn7H4BLS2B7ihqpM0D+fS7S1w5us8qkaaWHtwrvb+dzSUesQ54ma7 sAH6SQOXJ1+j7ms9EdjZ+VyaJWTCQh2dnAfsizdjRZQastk4R+jIe/ZRIuKra0Ah MkVBC8/ag5IkZ96nY/vYRNY0LHMympf5TxWf2tvQSInKCFgI59z8e19QTOidEzBW PU68DLveg2E8+XwqPUO8u5Y8HetksEG3oZ8zbEF5Ci/U5jE8MkIgpj/Rx4PTnDRX h/5XWLYVwXwXrxVJxoJaMH8cphZ2672oxp2CQFa+V94MGjiTKhya5ZvYn4q+WGu/ Vp0t7O1tagA6nkUQq4YzEeGXGAIMi/MwvlmEL4LZ8+hixwMhSRpKa8utKKlc9DOW q8f0NiTVwE1SdG5RHfFvkTnrVatAnbCL5ZH3aP8ckWxetVpl/kV4lK3Si+untpsl oeXatlh3RJoeEhDd6IAWjWO2Ch1PmDCdQIfmWVIfA+Kiq8RnmiLElcop4jHNqo/2 RZ3LSLOGG91vSI3bM0kosk1C8AYLKyABZLEBdDDV1V7+ZY1EvO0sffspXQJ0zew1 nvUZVflHd4owLvCtuAO1eafyuF0w5Pc9WYQytXYBM6Oo0bsT8Em6P7ImdRrJUxi+ OTRgDYrNX7TnSZCMU2UQp87qiUOXsSjMO99gdkGmMDwiU+WFuJs= =I7ax -----END PGP SIGNATURE----- --nextPart10724608.nUPlyArG6x--