- Git clone the repository.
git clone https://github.com/zcemycl/pypack-guide.git
- Add multiple remote repositories.
git remote set-url origin --push --add https://github.com/zcemycl/pypack-guide.git git remote set-url origin --push --add https://[email protected]/leoleung0900/pypack-guide/_git/pypack-guide git remote set-url origin --push --add https://[email protected]/leoleung0900/dummy/_git/dummy
- Install testing env.
pip install -e '.[testing]'
- Set up precommit hook.
pip install pre-commit pre-commit install pre-commit run pre-commit run --all-files
- Start contributing!!
git add . git commit -m 'message' git push
- Build the package.
python setup.py sdist bdist_wheel
- Upload to pypi website.
python -m twine upload dist/* twine upload dist/* -u** -p**
- Upload to azure devops.
python -m twine upload -r leoleung0900 --config-file .pyazrc dist/* twine upload -r pypack-guide --config-file .pyazrc dist/*
- Install from public pypi package.
pip install pypack-guide
- Install from private azure package.
pip install pypack-guide==0.1.dev23 \ --index-url https://<your-feed-name>:<pat-key>@pkgs.dev.azure.com/leoleung0900/_packaging/leoleung0900/pypi/simple # or pip install pypack-guide --extra-index-url=https://<your-feed-name>:<pat-key>@pkgs.dev.azure.com/leoleung0900/pypack-guide/_packaging/leoleung0900/pypi/simple/
- Create new release.
git tag v0.0.0 git push origin v0.0.0
- Update the release with specific tag.
git checkout v0.0.0 # make changes git commit -am 'commit messages' git tag -f v0.0.0 git push origin --delete v0.0.0 git push origin v0.0.0
- Twine upload to azure devops step can be used in github action too.
- Need requirement.txt and conda.yml testings for installation.
- Azure Devops check in branches can be ignored.
- Twine Documentation
- Get started with Python packages in Azure Artifacts
- Automate PyPi releases with Github Actions
- “tag already exists in the remote" error after recreating the git tag
- GitHub Action Automatic Releases
- How to Publish a Python Package from GitHub Actions
- Git tag
- Publish Python packages with Azure Pipelines
- Publish and download pipeline Artifacts