diff options
author | Jason R. Coombs <jaraco@jaraco.com> | 2014-12-30 12:57:30 -0500 |
---|---|---|
committer | Jason R. Coombs <jaraco@jaraco.com> | 2014-12-30 12:57:30 -0500 |
commit | 11ff6bc70c6b8a5f90d3b31c782d7ae651c198db (patch) | |
tree | d3b2900f00941926a8a6e0e93960078fedde4dbe /setup.py | |
parent | 0ef40874fa6fa05309de260eb68ca015935df201 (diff) | |
download | python-setuptools-bitbucket-11ff6bc70c6b8a5f90d3b31c782d7ae651c198db.tar.gz |
Remove support for setup.py test. Use the recommended test runner (setup.py ptr).
Diffstat (limited to 'setup.py')
-rwxr-xr-x | setup.py | 30 |
1 files changed, 0 insertions, 30 deletions
@@ -4,7 +4,6 @@ import io import os import sys import textwrap -import contextlib # Allow to run setup.py from another directory. os.chdir(os.path.dirname(os.path.abspath(__file__))) @@ -27,7 +26,6 @@ with open(ver_path) as ver_file: import setuptools from setuptools.command.build_py import build_py as _build_py -from setuptools.command.test import test as _test scripts = [] @@ -61,32 +59,6 @@ class build_py(_build_py): outf, copied = self.copy_file(srcfile, target) srcfile = os.path.abspath(srcfile) -class test(_test): - """Specific test class to avoid rewriting the entry_points.txt""" - def run(self): - with self._save_entry_points(): - _test.run(self) - - @contextlib.contextmanager - def _save_entry_points(self): - entry_points = os.path.join('setuptools.egg-info', 'entry_points.txt') - - if not os.path.exists(entry_points): - yield - return - - # save the content - with open(entry_points, 'rb') as f: - ep_content = f.read() - - # run the tests - try: - yield - finally: - # restore the file - with open(entry_points, 'wb') as f: - f.write(ep_content) - readme_file = io.open('README.txt', encoding='utf-8') @@ -116,7 +88,6 @@ setup_params = dict( long_description=long_description, keywords="CPAN PyPI distutils eggs package management", url="https://bitbucket.org/pypa/setuptools", - test_suite='setuptools.tests', src_root=src_root, packages=setuptools.find_packages(), package_data=package_data, @@ -125,7 +96,6 @@ setup_params = dict( zip_safe=True, - cmdclass={'test': test}, entry_points={ "distutils.commands": [ "%(cmd)s = setuptools.command.%(cmd)s:%(cmd)s" % locals() |