Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove tests from the wheel and simplify setup.py. #746

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -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"
33 changes: 2 additions & 31 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -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",
Expand All @@ -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",
Expand Down