Distribute your Python package
The Python language is now widely used in research. Many applications are developed in our laboratories and research teams using this language. But are these developments given back to the community ? How much time and energy does it cost to make work available ? What are the benefits ?
In this Tuto Techno, we'll explain what a Python package is, how to organize your code to be ready for distributing.
We'll look at how to make your software available via package management systems such as pip.
Finally, we'll then talk about the steps you can take to make it understandable to as many people as possible, and thus encourage interaction (documentation, tutorials, etc.).
During the session, we'll put all these pieces together on a toy library: splinart.
We'll be using the tools available on gitlab.inria.fr
, so you'll need an account to take part in the tutorial.
This Tuto Techno is largely inspired by Loïc Gouarin “Distribuer son Application Python” : https://gouarin.github.io/python-packaging-2023/
ℹ️ NoteThis Tuto Techno will focus on how packaging a library but you may want to distribute just an executable for example.
There are many techniques and technologies like pyInstaller or cx_Freeze which turn your Python program into an executable, most of which involve embedding the Python interpreter and any other dependencies into a single executable file.
This approach, called freezing, offers wide compatibility and seamless user experience, though often requires multiple technologies, and a good amount of effort.
See more information on https://packaging.python.org/en/latest/overview/