Skip to content

Instantly share code, notes, and snippets.

@carlkibler
Created November 13, 2015 21:45
Show Gist options
  • Save carlkibler/4bae3edff09609329c9e to your computer and use it in GitHub Desktop.
Save carlkibler/4bae3edff09609329c9e to your computer and use it in GitHub Desktop.
  • Update HISTORY.rst
  • $ bumpversion minor
  • Install the package again for local development, but with the new version number:
$ mkvirtualenv runtests
$ python setup.py develop
$ cookiecutter --version
  • Run the tests:
$ pip install tox
$ tox
  • Use restview package to confirm long description will look nice on PyPI:
$ pip install restview
$ sudo restview --long-description --pypi-strict
  • Commit the changes:
git add .
git commit -m "Release 1.3.0"
  • Build the source distribution:
$ mkvirtualenv sdist
$ make clean
$ python setup.py develop
$ python setup.py sdist
$ deactivate
  • Test that the sdist installs:
$ mktmpenv
$ cd dist
$ tar xzvf my_project-1.1.0.tar.gz
$ cd my_project-1.1.0/
$ python setup.py install
$ mkdir tmp
$ cookiecutter -o tmp --no-input https://github.com/pydanny/cookiecutter-django.git
$ cookiecutter gh:pytest-dev/cookiecutter-pytest-plugin
$ deactivate
  • Release on TestingPyPI:
$ mkvirtualenv testrelease
$ pip install -U wheel
$ python setup.py register -r pypitest
$ python setup.py sdist upload -r pypitest
$ python setup.py bdist_wheel upload -r pypitest
$ deactivate
  • Release on PyPI:
$ mkvirtualenv release
$ pip install -U wheel
$ python setup.py sdist upload -r pypi
$ python setup.py bdist_wheel upload -r pypi
  • Test that it pip installs:
$ mktmpenv
$ pip install my_project
$ cookiecutter -V
$ mkdir tmp
$ cookiecutter -o tmp --no-input https://github.com/pydanny/cookiecutter-django.git
$ cookiecutter gh:pytest-dev/cookiecutter-pytest-plugin
$ deactivate
  • Tag the last git commit with the version number (Bumpversion can't create annotated tags):
$ git tag -a -f 1.3.0 1.3.0 

Put the same message as in HISTORY.rst.

  • Push: git push
  • Push tags: git push --tags
  • Check the PyPI listing page to make sure that the README, release notes, and roadmap display properly. If not, use the readme package, installable off of PyPI, to determine why.
  • Edit the release on GitHub (e.g. https://github.com/audreyr/cookiecutter/releases). Paste the release notes into the release's release page, and come up with a title for the release.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment