Packaging
Create python package
Packaging for a Python repository like e.g. PyPI is automated via our Continuous Integration (CircleCI) (see build-package). If you want to do the packaging process manually, follow these steps:
Build all static files which are required:
# Compile translation file integreat-cms-cli compilemessages # Bundle static files npm run prod
Move the README to make sure to include the PyPI-README instead of the GitHub-README:
mv integreat_cms/README.md .
Bundle the locked dependency versions into the package (see Bundled lock files):
uv export --frozen --no-dev --no-emit-project --no-annotate \ --format pylock.toml -o integreat_cms/pylock.toml uv export --frozen --no-dev --no-emit-project --no-annotate \ --format requirements.txt -o integreat_cms/requirements.lock.txt
After that, you can build the python package with Documentation:
python3 -m build
Then, the built package can be found in
./dist/.
Bundled lock files
Every distribution contains the exact dependency versions the release was tested with, exported from uv.lock:
integreat_cms/pylock.toml- the PEP 751 lock format, including asha256hash per package. Requires pip 26.1 or later.integreat_cms/requirements.lock.txt- the same set in therequirements.txtformat, as a fallback for older pip versions.
These files do not constrain a regular pip install integreat-cms, which keeps resolving the
dependencies as usual. They only take effect when a deployment explicitly passes them to pip, see
Install pinned dependencies.
Publish package
You can publish the package to a python repository like e.g. PyPI with Twine:
twine upload ./dist/integreat_cms-*.tar.gz
See the Twine documentation for all configuration options of this command.