diff options
| -rw-r--r-- | .hgtags | 5 | ||||
| -rw-r--r-- | .travis.yml | 2 | ||||
| -rw-r--r-- | CHANGES.rst | 30 | ||||
| -rwxr-xr-x | README.rst | 3 | ||||
| -rw-r--r-- | docs/conf.py | 2 | ||||
| -rw-r--r-- | docs/requirements.txt | 1 | ||||
| -rwxr-xr-x | setup.cfg | 13 | ||||
| -rwxr-xr-x | setup.py | 6 | ||||
| -rw-r--r-- | setuptools/command/build_py.py | 4 | ||||
| -rw-r--r-- | setuptools/command/test.py | 21 |
10 files changed, 67 insertions, 20 deletions
@@ -267,3 +267,8 @@ ddd3f81eb9e0860bf95c380c50a72c52a215231f v21.0.0 694111eadb10fe6003078895a2cbb803ce514ef2 v21.2.1 274f33435e9c3ba5019f2a2bfe478fa2db0da41d v21.2.2 451fbedb4c226d8ea5b6eab1e21679c9a4ec4a93 v22.0.0 +f5c4923b0400d61f67699c2d54388878f9e0c8bd v22.0.1 +8610a8b9635f15d33f94fccb295fd34aa6fbddee v22.0.2 +efee7d74a8478c0d08c801fb520e41b6e04d0dda v22.0.3 +77b20c09b04775cc936ab5d16cbc46ff05fc7080 v22.0.4 +d5832e5deb77027da474e79e5f047e9a81f7edf8 v22.0.5 diff --git a/.travis.yml b/.travis.yml index feeb039f..e91f7e78 100644 --- a/.travis.yml +++ b/.travis.yml @@ -26,6 +26,8 @@ before_deploy: - export SETUPTOOLS_INSTALL_WINDOWS_SPECIFIC_FILES=1 deploy: provider: pypi + # Also update server in setup.cfg + server: https://upload.pypi.io/legacy/ on: tags: true all_branches: true diff --git a/CHANGES.rst b/CHANGES.rst index 77edc67b..b763607c 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -2,6 +2,36 @@ CHANGES ======= +v22.0.5 +------- + +* #604: Restore repository for upload_docs command + to restore publishing of docs during release. + +v22.0.4 +------- + +* #589: Upload releases to pypi.io using the upload + hostname and legacy path. + +v22.0.3 +------- + +* #589: Releases are now uploaded to pypi.io (Warehouse) + even when releases are made on Twine via Travis. + +v22.0.2 +------- + +* #589: Releases are now uploaded to pypi.io (Warehouse). + +v22.0.1 +------- + +* #190: On Python 2, if unicode is passed for packages to + ``build_py`` command, it will be handled just as with + text on Python 3. + v22.0.0 ------- @@ -5,7 +5,8 @@ Installing and Using Setuptools .. contents:: **Table of Contents** -`Change History <https://pythonhosted.org/setuptools/history.html>`_. +.. image:: https://setuptools.readthedocs.io/en/latest/?badge=latest + :target: https://setuptools.readthedocs.io ------------------------- Installation Instructions diff --git a/docs/conf.py b/docs/conf.py index 604e7138..07d6ad41 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -200,7 +200,7 @@ latex_documents = [ #latex_use_modindex = True link_files = { - 'CHANGES.rst': dict( + '../CHANGES.rst': dict( using=dict( BB='https://bitbucket.org', GH='https://github.com', diff --git a/docs/requirements.txt b/docs/requirements.txt new file mode 100644 index 00000000..0871ed76 --- /dev/null +++ b/docs/requirements.txt @@ -0,0 +1 @@ +rst.linker>=1.6.1 @@ -1,5 +1,5 @@ [bumpversion] -current_version = 22.0.0 +current_version = 22.0.5 commit = True tag = True @@ -9,18 +9,13 @@ tag_date = 1 [aliases] clean_egg_info = egg_info -RDb '' -release = clean_egg_info sdist bdist_wheel build_sphinx +release = clean_egg_info sdist bdist_wheel source = register sdist binary binary = bdist_egg upload --show-response test = pytest -[build_sphinx] -source-dir = docs/ -build-dir = docs/build -all_files = 1 - -[upload_docs] -upload-dir = docs/build/html +[upload] +repository = https://upload.pypi.io/legacy/ [sdist] formats = gztar zip @@ -61,14 +61,12 @@ if (sys.platform == 'win32' or (os.name == 'java' and os._name == 'nt')) \ needs_pytest = set(['ptr', 'pytest', 'test']).intersection(sys.argv) pytest_runner = ['pytest-runner'] if needs_pytest else [] -needs_sphinx = set(['build_sphinx', 'upload_docs', 'release']).intersection(sys.argv) -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( name="setuptools", - version="22.0.0", + version="22.0.5", description="Easily download, build, install, upgrade, and uninstall " "Python packages", author="Python Packaging Authority", @@ -158,7 +156,7 @@ setup_params = dict( 'pytest>=2.8', ] + (['mock'] if sys.version_info[:2] < (3, 3) else []), setup_requires=[ - ] + sphinx + pytest_runner + wheel, + ] + pytest_runner + wheel, ) if __name__ == '__main__': diff --git a/setuptools/command/build_py.py b/setuptools/command/build_py.py index 758a3fdf..0bad8295 100644 --- a/setuptools/command/build_py.py +++ b/setuptools/command/build_py.py @@ -8,6 +8,7 @@ import io import distutils.errors import itertools +from setuptools.extern import six from setuptools.extern.six.moves import map, filter, filterfalse try: @@ -66,6 +67,9 @@ class build_py(orig.build_py, Mixin2to3): return orig.build_py.__getattr__(self, attr) def build_module(self, module, module_file, package): + if six.PY2 and isinstance(package, six.string_types): + # avoid errors on Python 2 when unicode is passed (#190) + package = package.split('.') outfile, copied = orig.build_py.build_module(self, module, module_file, package) if copied: diff --git a/setuptools/command/test.py b/setuptools/command/test.py index 371e913b..39746a02 100644 --- a/setuptools/command/test.py +++ b/setuptools/command/test.py @@ -1,6 +1,7 @@ +import sys +import contextlib from distutils.errors import DistutilsOptionError from unittest import TestLoader -import sys from setuptools.extern import six from setuptools.extern.six.moves import map @@ -102,6 +103,14 @@ class test(Command): yield self.test_suite def with_project_on_sys_path(self, func): + """ + Backward compatibility for project_on_sys_path context. + """ + with self.project_on_sys_path(): + func() + + @contextlib.contextmanager + def project_on_sys_path(self): with_2to3 = six.PY3 and getattr(self.distribution, 'use_2to3', False) if with_2to3: @@ -137,7 +146,7 @@ class test(Command): working_set.__init__() add_activation_listener(lambda dist: dist.activate()) require('%s==%s' % (ei_cmd.egg_name, ei_cmd.egg_version)) - func() + yield finally: sys.path[:] = old_path sys.modules.clear() @@ -154,9 +163,11 @@ class test(Command): cmd = ' '.join(self._argv) if self.dry_run: self.announce('skipping "%s" (dry run)' % cmd) - else: - self.announce('running "%s"' % cmd) - self.with_project_on_sys_path(self.run_tests) + return + + self.announce('running "%s"' % cmd) + with self.project_on_sys_path(): + self.run_tests() def run_tests(self): # Purge modules under test from sys.modules. The test loader will |
