Closed junaruga closed 6 years ago
I'm using twine for the uploads.
Assuming you already did git tag v1.1.1
:
Make source and wheel distribution files.
$ rm -f dist/* # Optional, clean old distribution files
(venv) $ python setup.py sdist bdist_wheel
(Optional) If you have GPG set up for PyPI, sign the distribution files.
$ for f in dist/*; do gpg --armour --detach-sign "$f"; done
Upload the files to PyPI using twine.
$ twine upload dist/*
2b. Try to install the packages to fresh venv and see if it works ;)
Thanks everyone, I will try to release referring the way.
I have released now.
I would log the process.
$ git branch | grep master
* master
$ git clean -fdx
$ git tag -n
v1.0.0 v1.0.0 release
v1.1.0 v1.1.0 release
$ git tag -a 'v1.1.1' -m 'v1.1.1 release'
$ git tag -n
v1.0.0 v1.0.0 release
v1.1.0 v1.1.0 release
v1.1.1 v1.1.1 release
$ git push origin v1.1.1
$ python3 -m venv ./venv
$ source venv/bin/activate
(venv) $ python --version
Python 3.6.2
(venv) $ pip list
Package Version
---------- -------
pip 9.0.1
setuptools 28.8.0
(venv) $ pip install wheel
(venv) $ pip list
Package Version
---------- -------
pip 9.0.1
setuptools 28.8.0
wheel 0.30.0
(venv) $ python setup.py sdist bdist_wheel
(venv) $ ls dist/
rpmlb-1.1.1-py3-none-any.whl rpmlb-1.1.1.tar.gz
It may not be efficient.
(venv) $ pip install dist/rpmlb-1.1.1-py3-none-any.whl
(venv) $ pip list | grep rpmlb
rpmlb 1.1.1
(venv) $ which rpmlb
/home/jaruga/git/rpm-build-tool/rpm-list-builder/venv/bin/rpmlb
(venv) $ rpmlb --version
rpmlb, version 1.1.1
(venv) $ deactivate
$ git clean -fdx
$ python3 -m venv ./venv
$ source venv/bin/activate
(venv) $ python setup.py sdist
(venv) $ pip install dist/rpmlb-1.1.1.tar.gz
(venv) $ which rpmlb
/home/jaruga/git/rpm-build-tool/rpm-list-builder/venv/bin/rpmlb
(venv) $ rpmlb --version
rpmlb, version 1.1.1
(venv) $ deactivate
$ git clean -fdx
$ python3 -m venv ./venv
$ source venv/bin/activate
(venv) $ pip install wheel
(venv) $ python setup.py sdist bdist_wheel
(venv) $ ls dist/
rpmlb-1.1.1-py3-none-any.whl rpmlb-1.1.1.tar.gz
(venv) $ deactivate
$ sudo /usr/local/python-3.6.2/bin/python3 -m pip install twine
$ python3 -m pip list | grep twine
twine 1.9.1
$ twine upload dist/*
Uploading distributions to https://upload.pypi.org/legacy/
Uploading rpmlb-1.1.1-py3-none-any.whl
Uploading rpmlb-1.1.1.tar.gz
I want to release new version 1.1.1. Because recently we fixed a issue that is related to a description for PyPI.
https://github.com/sclorg/rpm-list-builder/pull/102
@khardix could you tell me how did you run a command to upload archive to PYPI when you released for 1.1.0? I want to release it by myself referring your way.