diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 00000000..f676d017 --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,5 @@ +[build-system] +# Suggest a reasonably modern floor for setuptools to ensure +# the source dist package is assembled with all the expected resources. +requires = ["setuptools >= 60", "wheel"] +build-backend = "setuptools.build_meta" diff --git a/setup.py b/setup.py index 26d6b39a..916c75bb 100644 --- a/setup.py +++ b/setup.py @@ -9,12 +9,7 @@ :license: Apache 2.0 """ -import sys - from setuptools import setup -from setuptools.command.test import test as TestCommand - -setup_requires = [] install_requires = [ "requests>=2.30.0,<3.0", @@ -37,31 +32,11 @@ "tomli-w", ] -if "test" in sys.argv: - setup_requires.extend(tests_require) - extras_require = {"tests": tests_require} - -class PyTest(TestCommand): - """Designed to be run via `python setup.py test`""" - - def finalize_options(self): - TestCommand.finalize_options(self) - self.test_args = [] - self.test_suite = True - - def run_tests(self): - # import here, cause outside the eggs aren't loaded - import pytest - - errno = pytest.main(self.test_args) - sys.exit(errno) - - setup( name="responses", - version="0.25.3", + version="0.25.4", author="David Cramer", description="A utility library for mocking out the `requests` Python library.", url="/~https://github.com/getsentry/responses", @@ -72,17 +47,13 @@ def run_tests(self): "Source Code": "/~https://github.com/getsentry/responses", }, license="Apache 2.0", - long_description=open("README.rst").read(), + long_description=open("README.rst", encoding="utf-8").read(), long_description_content_type="text/x-rst", packages=["responses"], zip_safe=False, python_requires=">=3.8", install_requires=install_requires, extras_require=extras_require, - tests_require=tests_require, - setup_requires=setup_requires, - cmdclass={"test": PyTest}, - include_package_data=True, classifiers=[ "Intended Audience :: Developers", "Intended Audience :: System Administrators",