#historical #medical #dataviz with a bonus side of #drseuss https://circulatingnow.nlm.nih.gov/2023/07/13/revealing-data-visualizations-in-historical-collections/ #flit
#historical #medical #dataviz #drseuss #flit
@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
@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.
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.