aboutsummaryrefslogtreecommitdiffstats
path: root/setup.py
diff options
context:
space:
mode:
authorMike Bayer <mike_mp@zzzcomputing.com>2019-07-31 16:39:38 -0400
committerMike Bayer <mike_mp@zzzcomputing.com>2019-07-31 23:16:39 -0400
commit800227cd83e50f06093b5feaac6aa6a9f9daa114 (patch)
tree640469d0b7024484c28c08a6e42166f852bf8f4b /setup.py
parent9a7d70a56186df845696b10f32b308857e0957cd (diff)
downloadexternal_python_mako-800227cd83e50f06093b5feaac6aa6a9f9daa114.tar.gz
external_python_mako-800227cd83e50f06093b5feaac6aa6a9f9daa114.tar.bz2
external_python_mako-800227cd83e50f06093b5feaac6aa6a9f9daa114.zip
remove python setup.py test
Removed the "python setup.py test" feature in favor of a straight run of "tox". Per Pypa / pytest developers, "setup.py" commands are in general headed towards deprecation in favor of tox. The tox.ini script has been updated such that running "tox" with no arguments will perform a single run of the test suite against the default installed Python interpreter. .. seealso:: https://github.com/pypa/setuptools/issues/1684 https://github.com/pytest-dev/pytest/issues/5534 Fixes: #303 Change-Id: I345fd46f8911a71c039adf2d51937175142db793
Diffstat (limited to 'setup.py')
-rw-r--r--setup.py31
1 files changed, 12 insertions, 19 deletions
diff --git a/setup.py b/setup.py
index 68b46ef..e9c12be 100644
--- a/setup.py
+++ b/setup.py
@@ -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