diff options
Diffstat (limited to 'setup.py')
-rw-r--r-- | setup.py | 31 |
1 files changed, 12 insertions, 19 deletions
@@ -19,24 +19,19 @@ readme = os.path.join(os.path.dirname(__file__), "README.rst") install_requires = ["MarkupSafe>=0.9.2"] -class PyTest(TestCommand): - user_options = [("pytest-args=", "a", "Arguments to pass to py.test")] - - def initialize_options(self): - TestCommand.initialize_options(self) - self.pytest_args = [] - - def finalize_options(self): - TestCommand.finalize_options(self) - self.test_args = [] - self.test_suite = True +class UseTox(TestCommand): + RED = 31 + RESET_SEQ = "\033[0m" + BOLD_SEQ = "\033[1m" + COLOR_SEQ = "\033[1;%dm" def run_tests(self): - # import here, cause outside the eggs aren't loaded - import pytest - - errno = pytest.main(self.pytest_args) - sys.exit(errno) + sys.stderr.write( + "%s%spython setup.py test is deprecated by pypa. Please invoke " + "'tox' with no arguments for a basic test run.\n%s" + % (self.COLOR_SEQ % self.RED, self.BOLD_SEQ, self.RESET_SEQ) + ) + sys.exit(1) setup( @@ -67,11 +62,9 @@ setup( }, license="MIT", packages=find_packages(".", exclude=["examples*", "test*"]), - tests_require=["pytest", "mock"], - cmdclass={"test": PyTest}, + cmdclass={"test": UseTox}, zip_safe=False, install_requires=install_requires, - extras_require={}, entry_points=""" [python.templating.engines] mako = mako.ext.turbogears:TGPlugin |