docs: add python packaging docs

This commit is contained in:
Benjamin Labrecque
2026-07-23 16:25:20 +02:00
parent b9cbca2c3c
commit 68e51b5f6f
+28
View File
@@ -0,0 +1,28 @@
# Python packaging
## Gitea
To publish to Gitea you need a personal access token.
Packages belong to an organization (e.g. `sls` or a user `labrec_b`), not a repo.
You can then link a repo to use the packages.
Configure your `~/pypirc`:
```
[distutils]
index-servers = gitea
[gitea]
; repository = https://gitea.psi.ch/api/packages/sls/pypi
repository = https://gitea.psi.ch/api/packages/labrec_b/pypi
username = labrec_b
password = <personal-access-token>
```
then
```
python3 -m twine upload --repository gitea dist/* --verbose
```