Skip to content

Commit 9f19f3f

Browse files
authored
Remove tests from the wheel and simplify setup.py. (#746)
1 parent 7a6348a commit 9f19f3f

File tree

2 files changed

+7
-31
lines changed

2 files changed

+7
-31
lines changed

pyproject.toml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
[build-system]
2+
# Suggest a reasonably modern floor for setuptools to ensure
3+
# the source dist package is assembled with all the expected resources.
4+
requires = ["setuptools >= 60", "wheel"]
5+
build-backend = "setuptools.build_meta"

setup.py

Lines changed: 2 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,7 @@
99
:license: Apache 2.0
1010
"""
1111

12-
import sys
13-
1412
from setuptools import setup
15-
from setuptools.command.test import test as TestCommand
16-
17-
setup_requires = []
1813

1914
install_requires = [
2015
"requests>=2.30.0,<3.0",
@@ -37,31 +32,11 @@
3732
"tomli-w",
3833
]
3934

40-
if "test" in sys.argv:
41-
setup_requires.extend(tests_require)
42-
4335
extras_require = {"tests": tests_require}
4436

45-
46-
class PyTest(TestCommand):
47-
"""Designed to be run via `python setup.py test`"""
48-
49-
def finalize_options(self):
50-
TestCommand.finalize_options(self)
51-
self.test_args = []
52-
self.test_suite = True
53-
54-
def run_tests(self):
55-
# import here, cause outside the eggs aren't loaded
56-
import pytest
57-
58-
errno = pytest.main(self.test_args)
59-
sys.exit(errno)
60-
61-
6237
setup(
6338
name="responses",
64-
version="0.25.3",
39+
version="0.25.4",
6540
author="David Cramer",
6641
description="A utility library for mocking out the `requests` Python library.",
6742
url="https://github.com/getsentry/responses",
@@ -72,17 +47,13 @@ def run_tests(self):
7247
"Source Code": "https://github.com/getsentry/responses",
7348
},
7449
license="Apache 2.0",
75-
long_description=open("README.rst").read(),
50+
long_description=open("README.rst", encoding="utf-8").read(),
7651
long_description_content_type="text/x-rst",
7752
packages=["responses"],
7853
zip_safe=False,
7954
python_requires=">=3.8",
8055
install_requires=install_requires,
8156
extras_require=extras_require,
82-
tests_require=tests_require,
83-
setup_requires=setup_requires,
84-
cmdclass={"test": PyTest},
85-
include_package_data=True,
8657
classifiers=[
8758
"Intended Audience :: Developers",
8859
"Intended Audience :: System Administrators",

0 commit comments

Comments
 (0)