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 | 9875a7b2586d737ac4d2294044187e17e5533e35 (patch) | |
tree | 44aa8a12e89d65631bbb7dc537ee2bdf97004799 /setup.py | |
parent | c7de48c1f42611b25b0ab776ece87763515cc120 (diff) | |
download | external_python_setuptools-9875a7b2586d737ac4d2294044187e17e5533e35.tar.gz external_python_setuptools-9875a7b2586d737ac4d2294044187e17e5533e35.tar.bz2 external_python_setuptools-9875a7b2586d737ac4d2294044187e17e5533e35.zip |
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() |