Skip to content

Commit 4f513fc

Browse files
remove stub files from the package (#538)
add typing_extensions fix setup.py test
1 parent daa014b commit 4f513fc

File tree

2 files changed

+8
-7
lines changed

2 files changed

+8
-7
lines changed

MANIFEST.in

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
include README.rst CHANGES LICENSE
22
recursive-include responses *.py
3-
include **/*.pyi
43
include tox.ini
54
global-exclude *~

setup.py

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,10 @@
1616

1717
setup_requires = []
1818

19-
if "test" in sys.argv:
20-
setup_requires.append("pytest")
21-
2219
install_requires = [
2320
"requests>=2.0,<3.0",
2421
"urllib3>=1.25.10",
22+
"typing_extensions; python_version < '3.8'",
2523
]
2624

2725
tests_require = [
@@ -36,13 +34,18 @@
3634
"mypy",
3735
]
3836

37+
if "test" in sys.argv:
38+
setup_requires.extend(tests_require)
39+
3940
extras_require = {"tests": tests_require}
4041

4142

4243
class PyTest(TestCommand):
44+
"""Designed to be run via `python setup.py test`"""
45+
4346
def finalize_options(self):
4447
TestCommand.finalize_options(self)
45-
self.test_args = ["test_responses.py"]
48+
self.test_args = []
4649
self.test_suite = True
4750

4851
def run_tests(self):
@@ -57,7 +60,7 @@ def run_tests(self):
5760
name="responses",
5861
version="0.20.0",
5962
author="David Cramer",
60-
description=("A utility library for mocking out the `requests` Python library."),
63+
description="A utility library for mocking out the `requests` Python library.",
6164
url="https://github.com/getsentry/responses",
6265
license="Apache 2.0",
6366
long_description=open("README.rst").read(),
@@ -70,7 +73,6 @@ def run_tests(self):
7073
tests_require=tests_require,
7174
setup_requires=setup_requires,
7275
cmdclass={"test": PyTest},
73-
package_data={"responses": ["py.typed", "__init__.pyi"]},
7476
include_package_data=True,
7577
classifiers=[
7678
"Intended Audience :: Developers",

0 commit comments

Comments
 (0)