The State of Python Packaging

The State of Python Packaging

Here’s a simple example structure of it viewed as a source tree (also available under gaborbernat/pugs):

We have four distinct content type here:

What would it mean for our package to be available on a user machine’s interpreter? For a given module, one can print out the representation of the module to find out:

The folder under you’ll find it depends on:

Generally speaking though, for a given python interpreter, one can find a list of possible directories by printing out the variables content, for example on my MacOS:

For third-party packages, it’s going to be some folder. In these cases the build operation actually involves calling a binary compiler, not just metadata and folder structure generation as was the case with pure python packages (such as our pugs library was).

Source: www.bernat.tech