Commit a04851c3 authored by Jason R. Coombs's avatar Jason R. Coombs

Attempting a new streamlined, Travis-powered release process.

parent ca90f3cf
...@@ -27,3 +27,13 @@ script: ...@@ -27,3 +27,13 @@ script:
# test the bootstrap script # test the bootstrap script
- python ez_setup.py - python ez_setup.py
before_deploy:
- export SETUPTOOLS_INSTALL_WINDOWS_SPECIFIC_FILES=1
deploy:
provider: pypi
on:
tags: true
user: jaraco
password:
secure: tfWrsQMH2bHrWjqnP+08IX1WlkbW94Q30f4d7lCyhWS1FIf/jBDx4jrEILNfMxQ1NCwuBRje5sihj1Ow0BFf0vVrkaeff2IdvnNDEGFduMejaEQJL3s3QrLfpiAvUbtqwyWaHfAdGfk48PovDKTx0ZTvXZKYGXZhxGCYSlG2CE6Y6RDvnEl6Tk8e+LqUohkcSOwxrRwUoyxSnUaavdGohXxDT8MJlfWOXgr2u+KsRrriZqp3l6Fdsnk4IGvy6pXpy42L1HYQyyVu9XyJilR2JTbC6eCp5f8p26093m1Qas49+t6vYb0VLqQe12dO+Jm3v4uztSS5pPQzS7PFyjEYd2Rdb6ijsdbsy1074S4q7G9Sz+T3RsPUwYEJ07lzez8cxP64dtj5j94RL8m35A1Fb1OE8hHN+4c1yLG1gudfXbem+fUhi2eqhJrzQo5vsvDv1xS5x5GIS5ZHgKHCsWcW1Tv+dsFkrhaup3uU6VkOuc9UN+7VPsGEY7NvquGpTm8O1CnGJRzuJg6nbYRGj8ORwDpI0KmrExx6akV92P72fMC/I5TCgbSQSZn370H3Jj40gz1SM30WAli9M+wFHFd4ddMVY65yxj0NLmrP+m1tvnWdKtNh/RHuoW92d9/UFtiA5IhMf1/3djfsjBq6S9NT1uaLkVkTttqrPYJ7hOql8+g=
distributions: release
...@@ -2,6 +2,13 @@ ...@@ -2,6 +2,13 @@
CHANGES CHANGES
======= =======
20.6
----
* New release process that relies on
`bumpversion <https://github.com/peritus/bumpversion>`_
and Travis CI for continuous deployment.
20.5 20.5
---- ----
......
...@@ -3,19 +3,14 @@ Release Process ...@@ -3,19 +3,14 @@ Release Process
=============== ===============
In order to allow for rapid, predictable releases, Setuptools uses a In order to allow for rapid, predictable releases, Setuptools uses a
mechanical technique for releases. The release script, ``release.py`` in the mechanical technique for releases, enacted by Travis following a
repository, defines the details of the releases, and is executed by the successful build of a tagged release per
`jaraco.packaging <https://bitbucket.org/jaraco/jaraco.packaging>`_ release `PyPI deployment <https://docs.travis-ci.com/user/deployment/pypi>`_.
module. The script does some checks (some interactive) and fully automates
the release process.
A Setuptools release manager must have maintainer access on PyPI to the To cut a release, install and run ``bumpversion {part}`` where ``part``
project and administrative access to the Bitbucket project. is major, minor, or patch based on the scope of the changes in the
release. Then, push the commits to the master branch. If tests pass,
To make a release, run the following from a Mercurial checkout at the the release will be uploaded to PyPI.
revision slated for release::
python -m jaraco.packaging.release
Bootstrap Bookmark Bootstrap Bookmark
------------------ ------------------
...@@ -23,7 +18,7 @@ Bootstrap Bookmark ...@@ -23,7 +18,7 @@ Bootstrap Bookmark
Setuptools has a bootstrap script (ez_setup.py) which is hosted in the Setuptools has a bootstrap script (ez_setup.py) which is hosted in the
repository and must be updated with each release (to bump the default version). repository and must be updated with each release (to bump the default version).
The "published" version of the script is the one indicated by the ``bootstrap`` The "published" version of the script is the one indicated by the ``bootstrap``
bookmark (Mercurial) or branch (Git). branch.
Therefore, the latest bootstrap script can be retrieved by checking out the Therefore, the latest bootstrap script can be retrieved by checking out the
repository at that bookmark. It's also possible to get the bootstrap script for repository at that bookmark. It's also possible to get the bootstrap script for
...@@ -57,7 +52,5 @@ corrected quickly, in many cases before other users have yet to encounter them. ...@@ -57,7 +52,5 @@ corrected quickly, in many cases before other users have yet to encounter them.
Release Managers Release Managers
---------------- ----------------
Jason R. Coombs is the primary release manager. Additionally, the following Additionally, anyone with push access to the master branch has access to cut
people have access to create releases: releases.
- Matthew Iversen (Ivoz)
"""
Setuptools is released using 'jaraco.packaging.release'. To make a release,
install jaraco.packaging and run 'python -m jaraco.packaging.release'
"""
import os
import pkg_resources
pkg_resources.require('jaraco.packaging>=2.11')
pkg_resources.require('wheel')
files_with_versions = 'setuptools/version.py',
# bdist_wheel must be included or pip will break
dist_commands = 'sdist', 'bdist_wheel'
test_info = "Travis-CI tests: http://travis-ci.org/#!/pypa/setuptools"
os.environ["SETUPTOOLS_INSTALL_WINDOWS_SPECIFIC_FILES"] = "1"
[egg_info] [egg_info]
tag_build = dev tag_build = .post
tag_date = 1
[aliases] [aliases]
release = egg_info -RDb '' clean_egg_info = egg_info -RDb ''
release = clean_egg_info build_sphinx sdist bdist_wheel upload_docs
source = register sdist binary source = register sdist binary
binary = bdist_egg upload --show-response binary = bdist_egg upload --show-response
test = pytest test = pytest
...@@ -20,3 +22,14 @@ formats = gztar zip ...@@ -20,3 +22,14 @@ formats = gztar zip
[wheel] [wheel]
universal=1 universal=1
[bumpversion]
current_version = 20.5
commit = True
tag = True
parse = (?P<major>\d+)\.(?P<minor>\d+)(\.(?P<patch>\d+))?
serialize=
{major}.{minor}.{patch}
{major}.{minor}
[bumpversion:file:setup.py]
...@@ -22,11 +22,6 @@ with open(init_path) as init_file: ...@@ -22,11 +22,6 @@ with open(init_path) as init_file:
SETUP_COMMANDS = command_ns['__all__'] SETUP_COMMANDS = command_ns['__all__']
main_ns = {}
ver_path = convert_path('setuptools/version.py')
with open(ver_path) as ver_file:
exec(ver_file.read(), main_ns)
import setuptools import setuptools
scripts = [] scripts = []
...@@ -68,10 +63,12 @@ needs_pytest = set(['ptr', 'pytest', 'test']).intersection(sys.argv) ...@@ -68,10 +63,12 @@ needs_pytest = set(['ptr', 'pytest', 'test']).intersection(sys.argv)
pytest_runner = ['pytest-runner'] if needs_pytest else [] pytest_runner = ['pytest-runner'] if needs_pytest else []
needs_sphinx = set(['build_sphinx', 'upload_docs']).intersection(sys.argv) needs_sphinx = set(['build_sphinx', 'upload_docs']).intersection(sys.argv)
sphinx = ['sphinx', 'rst.linker>=1.5'] if needs_sphinx else [] sphinx = ['sphinx', 'rst.linker>=1.5'] if needs_sphinx else []
needs_wheel = set(['release', 'bdist_wheel']).intersection(sys.argv)
wheel = ['wheel'] if needs_wheel else []
setup_params = dict( setup_params = dict(
name="setuptools", name="setuptools",
version=main_ns['__version__'], version="20.5",
description="Easily download, build, install, upgrade, and uninstall " description="Easily download, build, install, upgrade, and uninstall "
"Python packages", "Python packages",
author="Python Packaging Authority", author="Python Packaging Authority",
...@@ -161,7 +158,7 @@ setup_params = dict( ...@@ -161,7 +158,7 @@ setup_params = dict(
'pytest>=2.8', 'pytest>=2.8',
] + (['mock'] if sys.version_info[:2] < (3, 3) else []), ] + (['mock'] if sys.version_info[:2] < (3, 3) else []),
setup_requires=[ setup_requires=[
] + sphinx + pytest_runner, ] + sphinx + pytest_runner + wheel,
) )
if __name__ == '__main__': if __name__ == '__main__':
......
__version__ = '20.6' import pkg_resources
__version__ = pkg_resources.require('setuptools')[0].version
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment