Update README and pyproject.toml for Gitea package registry installation and publishing instructions
This commit is contained in:
@@ -43,6 +43,35 @@ PYTHONPATH=/path/to/python-helpers python3 -m python_helpers.cli.token_decoder -
|
|||||||
The module path replaces the installed command's short hyphenated name; the underlying `main()`
|
The module path replaces the installed command's short hyphenated name; the underlying `main()`
|
||||||
and behavior are identical.
|
and behavior are identical.
|
||||||
|
|
||||||
|
### Install from the Gitea package registry
|
||||||
|
|
||||||
|
```bash
|
||||||
|
pip install --index-url https://<username>:<token>@<gitea-host>/api/packages/<owner>/pypi/simple python-helpers
|
||||||
|
```
|
||||||
|
|
||||||
|
## Publishing
|
||||||
|
|
||||||
|
Add the registry to `~/.pypirc`:
|
||||||
|
|
||||||
|
```
|
||||||
|
[distutils]
|
||||||
|
index-servers = gitea
|
||||||
|
|
||||||
|
[gitea]
|
||||||
|
repository = https://<gitea-host>/api/packages/<owner>/pypi
|
||||||
|
username = <username>
|
||||||
|
password = <token>
|
||||||
|
```
|
||||||
|
|
||||||
|
```bash
|
||||||
|
pip install build twine
|
||||||
|
python3 -m build
|
||||||
|
python3 -m twine upload --repository gitea dist/*
|
||||||
|
```
|
||||||
|
|
||||||
|
> **Note**: a name and version already in the registry cannot be republished. Raise `version`
|
||||||
|
> in `pyproject.toml` before each upload.
|
||||||
|
|
||||||
## Library
|
## Library
|
||||||
|
|
||||||
- `console`: colored console output and the `fail()` helper used to report errors and exit
|
- `console`: colored console output and the `fail()` helper used to report errors and exit
|
||||||
|
|||||||
@@ -6,6 +6,7 @@ build-backend = "setuptools.build_meta"
|
|||||||
name = "python-helpers"
|
name = "python-helpers"
|
||||||
version = "1.0.0"
|
version = "1.0.0"
|
||||||
description = "Generic Python helpers and command-line tools with no cloud-specific logic"
|
description = "Generic Python helpers and command-line tools with no cloud-specific logic"
|
||||||
|
readme = "README.md"
|
||||||
requires-python = ">=3.9"
|
requires-python = ">=3.9"
|
||||||
|
|
||||||
[project.scripts]
|
[project.scripts]
|
||||||
|
|||||||
Reference in New Issue
Block a user