Installing Packages ¶ This section covers the basics of how to install Python packages. It’s important to note that the term “package” in this context is being used to describe a bundle of software to be installed (i.e. as a synonym for a distribution).
Packaging Python Projects ¶ This tutorial walks you through how to package a simple Python project. It will show you how to add the necessary files and structure to create the package, how to build the package, and how to upload it to the Python Package Index (PyPI).
Overview of Python Packaging ¶ As a general-purpose programming language, Python is designed to be used in many ways. You can build web sites or industrial robots or a game for your friends to play, and much more, all using the same core technology. Python’s flexibility is why the first step in every Python project must be to think about the project’s audience and the corresponding ...
When I run pip install xyz on a Linux machine (using Debian or Ubuntu or a derived Linux distribution), I get this error: error: externally-managed-environment × This environment is externally ma...
Semantic versioning vs. calendar versioning ¶ A versioning scheme is a formalized way to interpret the segments of a version number, and to decide which should be the next version number for a new release of a package. Two versioning schemes are commonly used for Python packages, semantic versioning and calendar versioning.
src layout vs flat layout ¶ The “flat layout” refers to organising a project’s files in a folder or repository, such that the various configuration files and import packages are all in the top-level directory.
Externally Managed Environments ¶ While some Python installations are entirely managed by the user that installed Python, others may be provided and managed by another means (such as the operating system package manager in a Linux distribution, or as a bundled Python environment in an application with a dedicated installer). Attempting to use conventional Python packaging tools to manipulate ...
Package Formats ¶ This page discusses the file formats that are used to distribute Python packages and the differences between them. You will find files in two formats on package indices such as PyPI: source distributions, or sdists for short, and binary distributions, commonly called wheels.
This guide shows you how to publish a Python distribution whenever a tagged commit is pushed. It will use the pypa/gh-action-pypi-publish GitHub Action for publishing. It also uses GitHub’s upload-artifact and download-artifact actions for temporarily storing and downloading the source packages.