mirror of
https://git.mirrors.martin98.com/https://github.com/petaflot/pygcode
synced 2025-06-04 11:25:20 +08:00
Notes on deployment
How I deploy this package.
For anyone reading, this readme and all files in this folder are mainly just notes for myself; they have little to do with pygcode itself. However, if you're interested in deploying your own PyPi package, then hopefully this can help.
Method based on the articles:
- http://peterdowns.com/posts/first-time-with-pypi.html and
- https://hynek.me/articles/sharing-your-labor-of-love-pypi-quick-and-dirty/
PyPi deployment
Install Required Tools
./deploy.sh setup
PyPi rc
cat ~/.pypirc
[distutils]
index-servers =
prod
test
[prod]
repository = https://upload.pypi.org/legacy/
username=FraggaMuffin
password=secret
[test]
repository=https://test.pypi.org/legacy/
username=FraggaMuffin
password=secret
chmod 600 ~/.pypirc
Build and Test sdist
and wheel
Build
./deploy.sh build
Test sdist
# Python 2.x
./deploy.sh remkenv py2
./deploy.sh install sdist py2
./deploy.sh test installed py2
# Python 3.x
./deploy.sh remkenv py3
./deploy.sh install sdist py3
./deploy.sh test installed py3
Test wheel
# Python 2.x
./deploy.sh remkenv py2
./deploy.sh install wheel py2
./deploy.sh test installed py2
# Python 3.x
./deploy.sh remkenv py3
./deploy.sh install wheel py3
./deploy.sh test installed py3
Upload to PyPi Test server
./deploy.sh test
Test
# Python 2.x
./deploy.sh remkenv py2
./deploy.sh install pypitest py2
./deploy.sh test installed py2
# Python 3.x
./deploy.sh remkenv py3
./deploy.sh install pypitest py3
./deploy.sh test installed py3
have a look at: https://testpypi.python.org/pypi/pygcode to make sure it's sane
Upload to PyPy server
all good!? sweet 👍 time to upload to 'production'
./deploy.sh prod
Test
# Python 2.x
./deploy.sh remkenv py2
./deploy.sh install pypi py2
./deploy.sh test installed py2
# Python 3.x
./deploy.sh remkenv py3
./deploy.sh install pypi py3
./deploy.sh test installed py3
have a look at: https://pypi.python.org/pypi/pygcode to make sure it's sane
Deployment in Git
merge deployed branch to master
git tag ${version} -m "<change description>"
git push --tags origin master
have a look at the releases page and it should be there.
tadaaaaaa!... go to sleep; it's probably late