Skip to content

Instantly share code, notes, and snippets.

@vimalkvn
Forked from audreyfeldroy/pypi-release-checklist.md
Last active March 4, 2017 12:12
Show Gist options
  • Save vimalkvn/c4c4d9edb34549f059f5 to your computer and use it in GitHub Desktop.
Save vimalkvn/c4c4d9edb34549f059f5 to your computer and use it in GitHub Desktop.

Revisions

  1. vimalkvn revised this gist Mar 4, 2017. 1 changed file with 15 additions and 3 deletions.
    18 changes: 15 additions & 3 deletions pypi-release-checklist.md
    Original file line number Diff line number Diff line change
    @@ -35,13 +35,25 @@ Based on: https://gist.github.com/audreyr/5990987
    git commit -m "Release 0.2.5"

    9. Upload to PyPI using twine

    Create or update ``~/.pypirc``

    [distutils]
    index-servers=pypi

    [pypi]
    repository = https://upload.pypi.org/legacy/
    username = <username>
    password = <password>

    Reference: https://packaging.python.org/distributing/#create-an-account

    For an existing package
    Then upload packages using twine to an existing PyPI project

    twine upload dist/project-version.tar.gz
    twine upload dist/project-version.whl

    Otherwise, register [new package on PyPI](https://pypi.python.org/pypi?%3Aaction=submit_form).
    If this is a new package, register [package on PyPI](https://pypi.python.org/pypi?%3Aaction=submit_form).
    The ``PKG-INFO`` file found under ``package.egg-info`` can be uploaded to prepopulate the
    form fields.

    @@ -61,7 +73,7 @@ Based on: https://gist.github.com/audreyr/5990987
    # test if package works
    deactivate

    11. Tag the last commit ::
    11. Tag the last commit

    git tag -a 0.2.5

  2. vimalkvn revised this gist Nov 30, 2015. 1 changed file with 72 additions and 64 deletions.
    136 changes: 72 additions & 64 deletions pypi-release-checklist.md
    Original file line number Diff line number Diff line change
    @@ -1,65 +1,73 @@
    - [x] Update HISTORY.rst
    - [x] Update version number in `my_project/__init__.py`
    - [x] Update version number in `setup.py`
    - [x] Install the package again for local development, but with the new version number:
    ```
    python setup.py develop
    ```
    - [x] Run the tests:
    ```
    python setup.py test
    tox
    ```

    - [x] Build the source distribution and wheel:
    ```
    python setup.py sdist
    python setup.py bdist_wheel
    ```

    - [x] Test that the sdist installs:
    ```
    mktmpenv
    cd dist
    tar xzvf my_project-0.1.1.tar.gz
    cd my_project-0.1.1/
    python setup.py install
    <try out my_project>
    deactivate
    ```

    - [x] Commit the changes:
    ```
    git add .
    git commit -m "Release 0.1.1"
    ```

    - [x] Release on PyPI by uploading both sdist and wheel

    Create package on PyPI using ``PKG-INFO`` at https://pypi.python.org/pypi?%3Aaction=submit_form

    Upload using twine:
    ```
    twine upload dist/*
    ```

    - [x] Test that it pip installs:
    ```
    mktmpenv
    pip install my_project
    <try out my_project>
    deactivate
    ```

    - [x] Tag the last git commit with the version number:
    ```
    git tag -a 0.1.1
    ```

    Put the same message as in HISTORY.rst.
    - [x] Push: `git push`
    - [x] Push tags: `git push --tags`
    - [x] Check the PyPI listing page to make sure that the README, release notes, and roadmap display properly. If not, copy and paste the RestructuredText into http://rst.ninjs.org/ to find out what broke the formatting.
    Another way to check is by using `python setup.py --long-description | rst2html > output.html`.
    - [ ] 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.
    # PyPI release checklist

    Based on: https://gist.github.com/audreyr/5990987

    1. Update version number in ``setup.py``.
    2. Update version number in ``package\__init__.py``.
    3. Update ``HISTORY.rst`` with information on the changes for this version.
    4. Install latest version in development mode

    pip install -e .

    5. Test

    python setup.py test

    6. Create source distribution and wheels

    # clean previous build environment
    python setup.py clean --all

    python setup.py sdist
    python setup.py bdist_wheel

    7. Test if the sdist installs

    mktmpenv
    cd project/dist
    pip install project-version.tar.gz
    # test if package works
    deactivate

    8. Commit changes

    git add [modified files]
    git commit -m "Release 0.2.5"

    9. Upload to PyPI using twine

    For an existing package

    twine upload dist/project-version.tar.gz
    twine upload dist/project-version.whl

    Otherwise, register [new package on PyPI](https://pypi.python.org/pypi?%3Aaction=submit_form).
    The ``PKG-INFO`` file found under ``package.egg-info`` can be uploaded to prepopulate the
    form fields.

    Check PyPI listing to make sure the description and changelog/history displays properly. If not,
    check rst syntax using

    python setup.py --long-description | rst2html > output.html

    or

    http://rst.ninjs.org

    10. Test if package can be installed using ``pip``

    mktmpenv
    pip install package
    # test if package works
    deactivate

    11. Tag the last commit ::

    git tag -a 0.2.5

    12. Push changes to Git

    git push
    git push --tags

    13. Edit the release notes on Github and draft a new release with a title.
  3. vimalkvn revised this gist Sep 8, 2015. 1 changed file with 6 additions and 6 deletions.
    12 changes: 6 additions & 6 deletions pypi-release-checklist.md
    Original file line number Diff line number Diff line change
    @@ -11,12 +11,6 @@ python setup.py test
    tox
    ```

    - [x] Commit the changes:
    ```
    git add .
    git commit -m "Release 0.1.1"
    ```

    - [x] Build the source distribution and wheel:
    ```
    python setup.py sdist
    @@ -34,6 +28,12 @@ python setup.py install
    deactivate
    ```

    - [x] Commit the changes:
    ```
    git add .
    git commit -m "Release 0.1.1"
    ```

    - [x] Release on PyPI by uploading both sdist and wheel

    Create package on PyPI using ``PKG-INFO`` at https://pypi.python.org/pypi?%3Aaction=submit_form
  4. vimalkvn revised this gist Aug 31, 2015. 1 changed file with 9 additions and 4 deletions.
    13 changes: 9 additions & 4 deletions pypi-release-checklist.md
    Original file line number Diff line number Diff line change
    @@ -17,9 +17,10 @@ git add .
    git commit -m "Release 0.1.1"
    ```

    - [x] Build the source distribution:
    - [x] Build the source distribution and wheel:
    ```
    python setup.py sdist
    python setup.py bdist_wheel
    ```

    - [x] Test that the sdist installs:
    @@ -33,10 +34,13 @@ python setup.py install
    deactivate
    ```

    - [x] Release on PyPI by uploading both sdist and wheel:
    - [x] Release on PyPI by uploading both sdist and wheel

    Create package on PyPI using ``PKG-INFO`` at https://pypi.python.org/pypi?%3Aaction=submit_form

    Upload using twine:
    ```
    python setup.py sdist upload
    python setup.py bdist_wheel upload
    twine upload dist/*
    ```

    - [x] Test that it pip installs:
    @@ -56,5 +60,6 @@ git tag -a 0.1.1
    - [x] Push: `git push`
    - [x] Push tags: `git push --tags`
    - [x] Check the PyPI listing page to make sure that the README, release notes, and roadmap display properly. If not, copy and paste the RestructuredText into http://rst.ninjs.org/ to find out what broke the formatting.
    Another way to check is by using `python setup.py --long-description | rst2html > output.html`.
    - [ ] 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.

  5. @audreyfeldroy audreyfeldroy revised this gist Aug 22, 2015. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion pypi-release-checklist.md
    Original file line number Diff line number Diff line change
    @@ -55,6 +55,6 @@ git tag -a 0.1.1
    Put the same message as in HISTORY.rst.
    - [x] Push: `git push`
    - [x] Push tags: `git push --tags`
    - [ ] Check the PyPI listing page to make sure that the README, release notes, and roadmap display properly. If not, copy and paste the RestructuredText into http://rst.ninjs.org/ to find out what broke the formatting.
    - [x] Check the PyPI listing page to make sure that the README, release notes, and roadmap display properly. If not, copy and paste the RestructuredText into http://rst.ninjs.org/ to find out what broke the formatting.
    - [ ] 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.

  6. @audreyfeldroy audreyfeldroy revised this gist Aug 22, 2015. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion pypi-release-checklist.md
    Original file line number Diff line number Diff line change
    @@ -54,7 +54,7 @@ git tag -a 0.1.1

    Put the same message as in HISTORY.rst.
    - [x] Push: `git push`
    - [ ] Push tags: `git push --tags`
    - [x] Push tags: `git push --tags`
    - [ ] Check the PyPI listing page to make sure that the README, release notes, and roadmap display properly. If not, copy and paste the RestructuredText into http://rst.ninjs.org/ to find out what broke the formatting.
    - [ ] 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.

  7. @audreyfeldroy audreyfeldroy revised this gist Aug 22, 2015. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion pypi-release-checklist.md
    Original file line number Diff line number Diff line change
    @@ -53,7 +53,7 @@ git tag -a 0.1.1
    ```

    Put the same message as in HISTORY.rst.
    - [ ] Push: `git push`
    - [x] 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, copy and paste the RestructuredText into http://rst.ninjs.org/ to find out what broke the formatting.
    - [ ] 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.
  8. @audreyfeldroy audreyfeldroy revised this gist Aug 22, 2015. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion pypi-release-checklist.md
    Original file line number Diff line number Diff line change
    @@ -47,7 +47,7 @@ pip install my_project
    deactivate
    ```

    - [ ] Tag the last git commit with the version number:
    - [x] Tag the last git commit with the version number:
    ```
    git tag -a 0.1.1
    ```
  9. @audreyfeldroy audreyfeldroy revised this gist Aug 22, 2015. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion pypi-release-checklist.md
    Original file line number Diff line number Diff line change
    @@ -39,7 +39,7 @@ python setup.py sdist upload
    python setup.py bdist_wheel upload
    ```

    - [ ] Test that it pip installs:
    - [x] Test that it pip installs:
    ```
    mktmpenv
    pip install my_project
  10. @audreyfeldroy audreyfeldroy revised this gist Aug 22, 2015. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion pypi-release-checklist.md
    Original file line number Diff line number Diff line change
    @@ -33,7 +33,7 @@ python setup.py install
    deactivate
    ```

    - [ ] Release on PyPI by uploading both sdist and wheel:
    - [x] Release on PyPI by uploading both sdist and wheel:
    ```
    python setup.py sdist upload
    python setup.py bdist_wheel upload
  11. @audreyfeldroy audreyfeldroy revised this gist Aug 22, 2015. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion pypi-release-checklist.md
    Original file line number Diff line number Diff line change
    @@ -22,7 +22,7 @@ git commit -m "Release 0.1.1"
    python setup.py sdist
    ```

    - [ ] Test that the sdist installs:
    - [x] Test that the sdist installs:
    ```
    mktmpenv
    cd dist
  12. @audreyfeldroy audreyfeldroy revised this gist Aug 22, 2015. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion pypi-release-checklist.md
    Original file line number Diff line number Diff line change
    @@ -17,7 +17,7 @@ git add .
    git commit -m "Release 0.1.1"
    ```

    - [ ] Build the source distribution:
    - [x] Build the source distribution:
    ```
    python setup.py sdist
    ```
  13. @audreyfeldroy audreyfeldroy revised this gist Aug 22, 2015. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion pypi-release-checklist.md
    Original file line number Diff line number Diff line change
    @@ -11,7 +11,7 @@ python setup.py test
    tox
    ```

    - [ ] Commit the changes:
    - [x] Commit the changes:
    ```
    git add .
    git commit -m "Release 0.1.1"
  14. @audreyfeldroy audreyfeldroy revised this gist Aug 22, 2015. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion pypi-release-checklist.md
    Original file line number Diff line number Diff line change
    @@ -5,7 +5,7 @@
    ```
    python setup.py develop
    ```
    - [ ] Run the tests:
    - [x] Run the tests:
    ```
    python setup.py test
    tox
  15. @audreyfeldroy audreyfeldroy revised this gist Aug 22, 2015. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion pypi-release-checklist.md
    Original file line number Diff line number Diff line change
    @@ -1,7 +1,7 @@
    - [x] Update HISTORY.rst
    - [x] Update version number in `my_project/__init__.py`
    - [x] Update version number in `setup.py`
    - [ ] Install the package again for local development, but with the new version number:
    - [x] Install the package again for local development, but with the new version number:
    ```
    python setup.py develop
    ```
  16. @audreyfeldroy audreyfeldroy revised this gist Aug 22, 2015. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion pypi-release-checklist.md
    Original file line number Diff line number Diff line change
    @@ -1,6 +1,6 @@
    - [x] Update HISTORY.rst
    - [x] Update version number in `my_project/__init__.py`
    - [ ] Update version number in `setup.py`
    - [x] Update version number in `setup.py`
    - [ ] Install the package again for local development, but with the new version number:
    ```
    python setup.py develop
  17. @audreyfeldroy audreyfeldroy revised this gist Aug 22, 2015. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion pypi-release-checklist.md
    Original file line number Diff line number Diff line change
    @@ -1,5 +1,5 @@
    - [x] Update HISTORY.rst
    - [ ] Update version number in `my_project/__init__.py`
    - [x] Update version number in `my_project/__init__.py`
    - [ ] Update version number in `setup.py`
    - [ ] Install the package again for local development, but with the new version number:
    ```
  18. @audreyfeldroy audreyfeldroy revised this gist Aug 22, 2015. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion pypi-release-checklist.md
    Original file line number Diff line number Diff line change
    @@ -1,4 +1,4 @@
    - [ ] Update HISTORY.rst
    - [x] Update HISTORY.rst
    - [ ] Update version number in `my_project/__init__.py`
    - [ ] Update version number in `setup.py`
    - [ ] Install the package again for local development, but with the new version number:
  19. @audreyfeldroy audreyfeldroy revised this gist Aug 22, 2015. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion pypi-release-checklist.md
    Original file line number Diff line number Diff line change
    @@ -56,5 +56,5 @@ git tag -a 0.1.1
    - [ ] 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, copy and paste the RestructuredText into http://rst.ninjs.org/ to find out what broke the formatting.
    - [x] 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.
    - [ ] 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.

  20. @audreyfeldroy audreyfeldroy revised this gist Aug 22, 2015. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion pypi-release-checklist.md
    Original file line number Diff line number Diff line change
    @@ -55,6 +55,6 @@ git tag -a 0.1.1
    Put the same message as in HISTORY.rst.
    - [ ] Push: `git push`
    - [ ] Push tags: `git push --tags`
    - [x] Check the PyPI listing page to make sure that the README, release notes, and roadmap display properly. If not, copy and paste the RestructuredText into http://rst.ninjs.org/ to find out what broke the formatting.
    - [ ] Check the PyPI listing page to make sure that the README, release notes, and roadmap display properly. If not, copy and paste the RestructuredText into http://rst.ninjs.org/ to find out what broke the formatting.
    - [x] 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.

  21. @audreyfeldroy audreyfeldroy revised this gist Aug 22, 2015. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion pypi-release-checklist.md
    Original file line number Diff line number Diff line change
    @@ -54,7 +54,7 @@ git tag -a 0.1.1

    Put the same message as in HISTORY.rst.
    - [ ] Push: `git push`
    - [x] Push tags: `git push --tags`
    - [ ] Push tags: `git push --tags`
    - [x] Check the PyPI listing page to make sure that the README, release notes, and roadmap display properly. If not, copy and paste the RestructuredText into http://rst.ninjs.org/ to find out what broke the formatting.
    - [x] 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.

  22. @audreyfeldroy audreyfeldroy revised this gist Aug 22, 2015. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion pypi-release-checklist.md
    Original file line number Diff line number Diff line change
    @@ -53,7 +53,7 @@ git tag -a 0.1.1
    ```

    Put the same message as in HISTORY.rst.
    - [x] Push: `git push`
    - [ ] Push: `git push`
    - [x] Push tags: `git push --tags`
    - [x] Check the PyPI listing page to make sure that the README, release notes, and roadmap display properly. If not, copy and paste the RestructuredText into http://rst.ninjs.org/ to find out what broke the formatting.
    - [x] 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.
  23. @audreyfeldroy audreyfeldroy revised this gist Aug 22, 2015. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion pypi-release-checklist.md
    Original file line number Diff line number Diff line change
    @@ -47,7 +47,7 @@ pip install my_project
    deactivate
    ```

    - [x] Tag the last git commit with the version number:
    - [ ] Tag the last git commit with the version number:
    ```
    git tag -a 0.1.1
    ```
  24. @audreyfeldroy audreyfeldroy revised this gist Aug 22, 2015. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion pypi-release-checklist.md
    Original file line number Diff line number Diff line change
    @@ -39,7 +39,7 @@ python setup.py sdist upload
    python setup.py bdist_wheel upload
    ```

    - [x] Test that it pip installs:
    - [ ] Test that it pip installs:
    ```
    mktmpenv
    pip install my_project
  25. @audreyfeldroy audreyfeldroy revised this gist Aug 22, 2015. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion pypi-release-checklist.md
    Original file line number Diff line number Diff line change
    @@ -33,7 +33,7 @@ python setup.py install
    deactivate
    ```

    - [x] Release on PyPI by uploading both sdist and wheel:
    - [ ] Release on PyPI by uploading both sdist and wheel:
    ```
    python setup.py sdist upload
    python setup.py bdist_wheel upload
  26. @audreyfeldroy audreyfeldroy revised this gist Aug 22, 2015. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion pypi-release-checklist.md
    Original file line number Diff line number Diff line change
    @@ -22,7 +22,7 @@ git commit -m "Release 0.1.1"
    python setup.py sdist
    ```

    - [x] Test that the sdist installs:
    - [ ] Test that the sdist installs:
    ```
    mktmpenv
    cd dist
  27. @audreyfeldroy audreyfeldroy revised this gist Aug 22, 2015. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion pypi-release-checklist.md
    Original file line number Diff line number Diff line change
    @@ -17,7 +17,7 @@ git add .
    git commit -m "Release 0.1.1"
    ```

    - [x] Build the source distribution:
    - [ ] Build the source distribution:
    ```
    python setup.py sdist
    ```
  28. @audreyfeldroy audreyfeldroy revised this gist Aug 22, 2015. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion pypi-release-checklist.md
    Original file line number Diff line number Diff line change
    @@ -11,7 +11,7 @@ python setup.py test
    tox
    ```

    - [x] Commit the changes:
    - [ ] Commit the changes:
    ```
    git add .
    git commit -m "Release 0.1.1"
  29. @audreyfeldroy audreyfeldroy revised this gist Aug 22, 2015. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion pypi-release-checklist.md
    Original file line number Diff line number Diff line change
    @@ -5,7 +5,7 @@
    ```
    python setup.py develop
    ```
    - [x] Run the tests:
    - [ ] Run the tests:
    ```
    python setup.py test
    tox
  30. @audreyfeldroy audreyfeldroy revised this gist Aug 22, 2015. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion pypi-release-checklist.md
    Original file line number Diff line number Diff line change
    @@ -1,7 +1,7 @@
    - [ ] Update HISTORY.rst
    - [ ] Update version number in `my_project/__init__.py`
    - [ ] Update version number in `setup.py`
    - [x] Install the package again for local development, but with the new version number:
    - [ ] Install the package again for local development, but with the new version number:
    ```
    python setup.py develop
    ```