1. Building semver

This project changed slightly its way how it is built. The reason for this was to still support the “traditional” way with setup.py, but at the same time try out the newer way with pyproject.toml. As Python 3.6 got deprecated, this project does support from now on only pyproject.toml.

1.1. Background information

Skip this section and head over to Building with pyproject-build if you just want to know how to build semver. This section gives some background information how this project is set up.

The traditional way with setup.py in this project uses a Declarative config. With this approach, the setup.py is stripped down to its bare minimum and all the metadata is stored in setup.cfg.

The new pyproject.toml contains only information about the build backend, currently setuptools.build_meta. The idea is taken from A Practical Guide to Setuptools and Pyproject.toml. Setuptools-specific configuration keys as defined in PEP 621 are currently not used.

1.2. Building with pyproject-build

To build semver you need:

  • The build module which implements the PEP 517 build frontend. Install it with:

    pip install build
    

    Some Linux distributions has already packaged it. If you prefer to use the module with your package manager, search for python-build or python3-build and install it.

  • The command pyproject-build from the build module.

To build semver, run:

pyproject-build

After the command is finished, you can find two files in the dist folder: a .tar.gz and a .whl file.