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.
 
Alex Shen d39244c73f
first commit
2 years ago
math first commit 2 years ago
.gitignore first commit 2 years ago
README.md first commit 2 years ago
__init__.py first commit 2 years ago
setup.py first commit 2 years ago

README.md

This is a demo project for publishing a python package to gitea.

  1. Generate your auth token at gitea:
Profile -> Settings -> Applications -> Token Name -> Generate Token

Copy your token, note that the token value will only be shown to you once.

  1. To register the package registry you need to edit your local ~/.pypirc file. 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}
  1. Publish a package
python -m twine upload --repository gitea dist/testpythonpackaging-0.0.1.tar.gz
  1. Go to the owner site eg, for this test project the owner is alex, and click on package https://gitea.sparkle-in-tech.com/alex/-/packages

  2. Click on the package you just created and uploaded and then click on Settings

  3. Link the package to your project repository so it will show up correctly!

  4. 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