I need some help packaging a python module that I built. It references a few different python files, and .csv within the folder structure, and searching leads me to examples/tutorials that are either too simple, or way too complex. I can't find anything bridging the gap.

Any blogs, courses, tutorial, or even as a last resort youtube videos, that may help me out? #python #packaging #flit #setuptools #hatchling

The project that I'm trying to package is here - https://git.jmkengineering.com/JMK_Engineering_Inc/JEPL/src/branch/main/jepl

JEPL

JMK Engineering Python Library

Forgejo: Beyond coding. We forge.

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

#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 https://www.xkcd.com/1987/

Python Environment

xkcd

#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 https://www.xkcd.com/1987/

#packaging

Python Environment

xkcd

@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

Revealing Data: Visualizations in Historical Collections

By Adam Korengold ~ Data visualization is a new and quickly evolving discipline. While the modern form of the practice often uses complex IT tools, the practice of using charts, graphs, and visual …

Circulating Now from the NLM Historical Collections

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

https://flit.pypa.io/en/stable/cmdline.html#cmdoption-flit-build-setup-py

#python

Flit command line interface — Flit 3.9.0 documentation

@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.

https://flit.pypa.io/en/stable/index.html

Flit 3.9.0 — Flit 3.9.0 documentation

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