Packing using pyproject.tom and hatchling
Project description
Package using pyproject.toml
Creating the package files
packaging_tutorial/
├── LICENSE
├── pyproject.toml
├── README.md
├── src/
│ └── your_package_YOUR_USERNAME_HERE/
│ ├── __init__.py
│ └── example.py
└── tests/
Choosing a build backend
Tools like pip and build do not actually convert your sources into a distribution package (like a wheel); that job is performed by a build backend.
The build backend determines how your project will specify its configuration, including metadata (information about the project, for example, the name and tags that are displayed on PyPI) and input files.
Build backends have different levels of functionality, such as whether they support building extension modules, and you should choose one that suits your needs and preferences.
- Hatchling
- setuptools
- Flit
- PDM
others that support the [project] table for metadata. The pyproject.toml tells build frontend tools like pip and build which backend to use for your project.
Generating distribution archives
python3 -m pip install --upgrade build
python3 -m build
Uploading the distribution archives
python3 -m pip install --upgrade twine
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for toml_package-0.0.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a0d8c6889f2dc728e1bca8637e3a804c45117c18a84690a7ed56afde4d62c643 |
|
MD5 | 9e2bd6b5be6784623a063d424951f680 |
|
BLAKE2b-256 | a31d064a3284185deaaa4f572418691013237ade8304a9d561fc00872250101d |