#Flit

Jezus Michał "Le Wzdych" (on)mgorny@pol.social
2025-03-22

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

Jesus Michał "Le Sigh" 🏔 (he)mgorny@treehouse.systems
2025-03-22

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

Jezus Michał "Le Wzdych" (on)mgorny@pol.social
2025-01-11

#Gentoo powinno być już gotowe na testowanie przypadkowych paczek w języku #Python.

Obok #tox i #nox, mamy już: #flit, #hatch, #pdm, #pixi, #PythonPoetry i #uv. Coś przeoczyłem?

/me porównuje z xkcd.com/1987/

Jesus Michał "Le Sigh" 🏔 (he)mgorny@treehouse.systems
2025-01-11

#Gentoo should be prepared for testing random #Python packages now.

In addition to #tox and #nox, we have #flit, #hatch, #pdm, #pixi, #PythonPoetry and #uv. Did I miss anything?

/me compares with xkcd.com/1987/

#packaging

2024-01-26

@venthur @fcodvpt nice stats! I would have expected flit to have higher percentage. The python packaging is still in the middle of changes and it's interesting to see where this is going and what kind of tools we will be using in five years from now.

#python #pythonpackaging #flit

@mgorny You can use #flit to produce sdist distributions with autogenerated setup.py:

flit.pypa.io/en/stable/cmdline

#python

2022-12-01

@m_cadek I found #Flit to be relatively easy when I started using it recently. The only thing that stumped me initially was that I had a single-file module, but I wanted some data files to get packaged with it. Flit handles that automatically, but you need to structure your code as a package (directory w/ an __init__.py file) instead of just a module. Once I got that straightened out, it was smooth sailing.

flit.pypa.io/en/stable/index.h

2022-11-28

Solved! After banging my head on this some more I found it's related to the distinction between a module (a single .py file) and a package (a directory with a __init__.py file in it, along with other stuff).

The #Flit docs say 'Data files within a package directory are automatically included.' This is 100% technically correct, but easy for a beginner (like me, in this case!) to misunderstand and think that anything in their project directory will be included.

#TIL #python #packaging

crvscrvs
2018-08-10

Is it me or there are circular dependencies in the basic environment, namely, in order to install anything relatively recent with you need and in order to install you need stuff that depends on ...

Client Info

Server: https://mastodon.social
Version: 2025.07
Repository: https://github.com/cyevgeniy/lmst