Building and publishing packages
We are going to be using the package builder provided by the build project (https://pypi.org/project/build/) to build our distribution package. We're also going to need the twine (https://pypi.org/project/twine/) utility to upload our packages to PyPI. You can install these tools from the requirements/build.txt
file provided with the source code of this chapter. We recommend installing these into a new virtual environment.
Because project names on PyPI have to be unique, you won't be able to upload the train-schedule
project without changing the name first. You should change the name
in the setup.cfg
file to something unique before building distribution packages. Bear in mind that this means that the filenames of your distribution packages will also be different from ours.
Building
The build
project provides a simple script for building packages according to the PEP 517 specification. It will take care of all the...