Loading topic
pyproject.toml do and how to spot the usual mistakes.2 min readpyproject.toml and have used pip in a virtual environment. It explains the two roles involved in turning source into installable files, and it covers the errors you are most likely to hit.2 min readpyproject.toml with a [build-system] table, and that you know how to build a package with python -m build. Here we fill in the [project] table, which holds the metadata that PyPI and pip read.2 min readpyproject.toml with a [project] table, as built in the earlier chapters, and that you can create a virtual environment and run pip install. Here you will declare what your library needs at runtime and what only some users need.2 min readpyproject.toml with a [project] table and know how to build a package. It covers what a valid version string looks like, how to pick the next one, and how installers order versions.2 min readpyproject.toml with a [project] table, and know how to install a package into a virtual environment with pip.2 min readpyproject.toml, have built a wheel with python -m build, and know that a wheel is a zip archive you can open. It covers two things that often go missing from a build: non-Python files inside your package, and license files.2 min readgreeter project from earlier chapters, and know that pyproject.toml controls what goes into a wheel. By the end you will know how to tell type checkers that your library is typed, and how to confirm the marker is in your build.2 min readgreeter project from the earlier chapters: a src layout and a pyproject.toml with a [build-system] table and a [project] table. It also assumes you can use a virtual environment and pip.2 min readpython -m build and have a greeter project with a pyproject.toml, a src/ layout, and a dist/ directory holding one sdist and one wheel. PyPI does not let you replace a file once uploaded, so check the artifacts first.2 min readpython -m build, and that you know how to create a virtual environment and use pip. Here you install the built wheel somewhere that has never seen your source tree, and check that it works.2 min readpython -m build, and that twine check passes on them. It also assumes you can install a wheel into a clean virtual environment. If not, finish those chapters first.2 min readgreeter project into dist/ with python -m build. It also assumes you have a working virtual environment and have already rehearsed the release on TestPyPI. Here you publish the same files to the real index.2 min readtwine, and that your project lives in a GitHub repository. You should know what an API token is and why leaking one is a problem.2 min readpyproject.toml that builds cleanly with python -m build. It also assumes you have a GitHub repository and a PyPI account. It automates the manual build and twine upload steps so that publishing a GitHub release publishes the package.2 min readgreeter to PyPI, understand PEP 440 versions, and can build and upload with build and twine. Once a release is public, you can't edit it. This chapter covers how to respond when a release turns out to be faulty, and how to tell users what changed2 min read