Porównajmy backendy #PEP517 dla paczek napisanych w samym Pythonie:

#flit-core: 51 KiB archiwum źródłowe, bez zależności, instaluje się 0,05 s, ~150 KiB po zainstalowaniu, działa wszedzie
#UvBuild: 300 KiB archiwum, wymaga ~250 zależności crate (54 MiB pobierania, ~600 MiB w .cargo), buduje się 1 min 20 s (na 12-wątkowym procesorze), 4,2 MiB po zainstalowaniu, wspiera kilkanaście platform

I oczywiście, że flit-core ma szerszą funkcjonalność. Ale jestem przekonany, że gdzieś ktoś potrzebuje zaoszczędzić te kilka milisekund budowania paczek Pythona.

#Python #RustLang #uv

Let's compare #PEP517 backends for pure #Python packages:

#flit-core: 51 KiB sdist, no dependencies, 0.05 s to install, ~150 KiB after installing, works everywhere
#UvBuild: 300 KiB sdist, requires ~250 crates (54 MiB download, ~600 MiB .cargo directory), 1 min 20 s to install (on a 12-thread system), 4.2 MiB after installing, supports a dozen platforms

And yes, you guessed right, flit-core has more functionality. But I'm sure that there are performance-critical wheel building workflows that will benefit from these few milliseconds shaved off wheel building time.

#RustLang #uv

Jakby ktoś nie śledził, to informuję, że #UvBuild jednak powstaje — i to straszna wiadomość dla wszystkich tych, których system nie jest wspierany przez #RustLang.

O co chodzi? Otóż, uv-build to system budowania #PEP517 dla projektów w "czystym" Pythonie (znaczy, bez kompilowanych rozszerzeń), który jest napisany w Ruście. Tak, dobrze wnioskujecie: budowanie niektórych paczek, które zawierają *wyłącznie pliki Pythona*, będzie teraz wymagało programu skompilowanego w Ruście.

Co to oznacza dla mnie? Czeka ma tłumaczenie ludziom, raz po raz, że wybrali "zły" backend, i ich paczka teraz nie jest przenośna, i niektórzy użytkownicy #Gentoo nie będą mogli już jej używać. Użeranie się z większą liczbą toksycznych ludzi, których po prostu nie obchodzą problemy innych, albo wprost wykorzystają sytuację, by kopnąć leżącego.

Oczywiście, zawsze jest nadzieja, że ktoś napisze wersję w Pythonie, której będzie można używać w miejsce standardowej. Ale nie będzie to nic przyjemnego, bo mówimy o projekcie "z szybkim tempem rozwoju" — który wprost odrzucił utrzymanie dodatkowej wersji w Pythonie, "ze względu na ograniczenia czasowe i, jak wspominano w wątku, fundamentalne różnice zachowania pomiędzy bibliotekami standardowymi Rusta I Pythona" [tłum. własne].

https://github.com/astral-sh/uv/issues/3957#issuecomment-2657825266

#Python

Add a uv build backend · Issue #3957 · astral-sh/uv

uv is a fantastic tool that is ahead of its time. In the same vein as ruff, it is bundling many capabilities that Python developers need into a single tool. It currently provides the capabilities o...

GitHub

In case you aren't following the threads, #UvBuild is happening after all — and that's horrible news for anyone whose platform isn't supported by #RustLang.

What's that all about? Well, uv-build is a #PEP517 backend for pure #Python packages, that's written in Rust. Yes, that's what you think it means — building some *pure Python* packages will now require using a binary written in Rust now.

What does that mean for me? Having to repeatedly explain to people that their build backend decision is a problem for the portability of their package, and that some of #Gentoo users can't use it anymore. Having to deal even more with toxic people who are not interested in our problems, or who will even deliberately use this backend as an excuse to remove platform support.

Though, there is always some hope that someone will write a drop-in pure Python replacement for the backend, though it's going to be a pain since we're talking of following a project with high "rate of development" — a project that explicitly rejected maintaining a pure Python fallback "due to time constraints and, as mentioned by some, foundational differences in behavior between the Rust and Python standard libraries".

https://github.com/astral-sh/uv/issues/3957#issuecomment-2657825266

Add a uv build backend · Issue #3957 · astral-sh/uv

uv is a fantastic tool that is ahead of its time. In the same vein as ruff, it is bundling many capabilities that Python developers need into a single tool. It currently provides the capabilities o...

GitHub