You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
2 years ago | |
|---|---|---|
| math | 2 years ago | |
| .gitignore | 2 years ago | |
| README.md | 2 years ago | |
| __init__.py | 2 years ago | |
| setup.py | 2 years ago | |
README.md
This is a demo project for publishing a python package to gitea.
- Generate your
auth tokenat gitea:
Profile -> Settings -> Applications -> Token Name -> Generate Token
Copy your token, note that the token value will only be shown to you once.
- To register the package registry you need to edit your local
~/.pypircfile. Add
[distutils]
index-servers = gitea
[gitea]
repository = https://gitea.sparkle-in-tech.com/api/packages/{owner, eg., Sparkle-Techbank}/pypi
username = {your gitea username, eg., vincent}
password = {token generated from last step}
- Publish a package
python -m twine upload --repository gitea dist/testpythonpackaging-0.0.1.tar.gz
-
Go to the owner site eg, for this test project the owner is alex, and click on
packagehttps://gitea.sparkle-in-tech.com/alex/-/packages -
Click on the package you just created and uploaded and then click on
Settings -
Link the package to your project repository so it will show up correctly!
-
Use the following command to install a python package
pip install --extra-index-url https://gitea.sparkle-in-tech.com/api/packages/alex/pypi/simple testpythonpackaging