Skip to content

Commit 4808275

Browse files
committed
migrate to setup.cfg
1 parent defad28 commit 4808275

File tree

2 files changed

+52
-106
lines changed

2 files changed

+52
-106
lines changed

setup.cfg

Lines changed: 51 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,52 @@
11
[bdist_wheel]
2-
universal=1
2+
universal = 1
3+
4+
[metadata]
5+
name = vcrpy
6+
version = 5.1.0
7+
author = Kevin McCarthy
8+
author_email = [email protected]
9+
license = MIT
10+
description = Automatically mock your HTTP interactions to simplify and speed up testing
11+
url = https://github.com/kevin1024/vcrpy
12+
long_description = file: README.rst
13+
long_description_content_type = text/x-rst
14+
classifiers =
15+
Development Status :: 5 - Production/Stable
16+
Environment :: Console
17+
Intended Audience :: Developers
18+
Programming Language :: Python
19+
Programming Language :: Python :: 3
20+
Programming Language :: Python :: 3.8
21+
Programming Language :: Python :: 3.9
22+
Programming Language :: Python :: 3.10
23+
Programming Language :: Python :: 3.11
24+
Programming Language :: Python :: 3 :: Only
25+
Programming Language :: Python :: Implementation :: CPython
26+
Programming Language :: Python :: Implementation :: PyPy
27+
Topic :: Software Development :: Testing
28+
Topic :: Internet :: WWW/HTTP
29+
License :: OSI Approved :: MIT License
30+
31+
[options]
32+
packages = find:
33+
install_requires =
34+
PyYAML
35+
wrapt
36+
yarl
37+
urllib3 <2; python_version <'3.10'
38+
python_requires = >=3.8
39+
tests_require =
40+
aiohttp
41+
boto3
42+
httplib2
43+
httpx
44+
pytest
45+
pytest-aiohttp
46+
pytest-httpbin
47+
requests>=2.16.2
48+
tornado
49+
Werkzeug==2.0.3
50+
51+
[options.packages.find]
52+
exclude = tests*

setup.py

Lines changed: 1 addition & 105 deletions
Original file line numberDiff line numberDiff line change
@@ -1,108 +1,4 @@
1-
#!/usr/bin/env python
2-
3-
import codecs
4-
import os
5-
import re
6-
import sys
7-
81
from setuptools import find_packages, setup
9-
from setuptools.command.test import test as TestCommand
10-
11-
long_description = open("README.rst").read()
12-
here = os.path.abspath(os.path.dirname(__file__))
13-
14-
15-
def read(*parts):
16-
# intentionally *not* adding an encoding option to open, See:
17-
# https://github.com/pypa/virtualenv/issues/201#issuecomment-3145690
18-
with codecs.open(os.path.join(here, *parts), "r") as fp:
19-
return fp.read()
20-
21-
22-
def find_version(*file_paths):
23-
version_file = read(*file_paths)
24-
version_match = re.search(r"^__version__ = ['\"]([^'\"]*)['\"]", version_file, re.M)
25-
if version_match:
26-
return version_match.group(1)
27-
28-
raise RuntimeError("Unable to find version string.")
29-
30-
31-
class PyTest(TestCommand):
32-
def finalize_options(self):
33-
TestCommand.finalize_options(self)
34-
self.test_args = []
35-
self.test_suite = True
36-
37-
def run_tests(self):
38-
# import here, cause outside the eggs aren't loaded
39-
import pytest
40-
41-
errno = pytest.main(self.test_args)
42-
sys.exit(errno)
43-
44-
45-
install_requires = [
46-
"PyYAML",
47-
"wrapt",
48-
"yarl",
49-
# Support for urllib3 >=2 needs Python >=3.10
50-
# so we need to block urllib3 >=2 for Python <3.10 for now.
51-
# Note that vcrpy would work fine without any urllib3 around,
52-
# so this block and the dependency can be dropped at some point
53-
# in the future. For more Details:
54-
# https://github.com/kevin1024/vcrpy/pull/699#issuecomment-1551439663
55-
"urllib3 <2; python_version <'3.10'",
56-
]
572

58-
tests_require = [
59-
"aiohttp",
60-
"boto3",
61-
"httplib2",
62-
"httpx",
63-
"pytest",
64-
"pytest-aiohttp",
65-
"pytest-httpbin",
66-
"requests>=2.16.2",
67-
"tornado",
68-
# Needed to un-break httpbin 0.7.0. For httpbin >=0.7.1 and after,
69-
# this pin and the dependency itself can be removed, provided
70-
# that the related bug in httpbin has been fixed:
71-
# https://github.com/kevin1024/vcrpy/issues/645#issuecomment-1562489489
72-
# https://github.com/postmanlabs/httpbin/issues/673
73-
# https://github.com/postmanlabs/httpbin/pull/674
74-
"Werkzeug==2.0.3",
75-
]
3+
setup()
764

77-
setup(
78-
name="vcrpy",
79-
version=find_version("vcr", "__init__.py"),
80-
description=("Automatically mock your HTTP interactions to simplify and speed up testing"),
81-
long_description=long_description,
82-
long_description_content_type="text/x-rst",
83-
author="Kevin McCarthy",
84-
author_email="[email protected]",
85-
url="https://github.com/kevin1024/vcrpy",
86-
packages=find_packages(exclude=["tests*"]),
87-
python_requires=">=3.8",
88-
install_requires=install_requires,
89-
license="MIT",
90-
tests_require=tests_require,
91-
classifiers=[
92-
"Development Status :: 5 - Production/Stable",
93-
"Environment :: Console",
94-
"Intended Audience :: Developers",
95-
"Programming Language :: Python",
96-
"Programming Language :: Python :: 3",
97-
"Programming Language :: Python :: 3.8",
98-
"Programming Language :: Python :: 3.9",
99-
"Programming Language :: Python :: 3.10",
100-
"Programming Language :: Python :: 3.11",
101-
"Programming Language :: Python :: 3 :: Only",
102-
"Programming Language :: Python :: Implementation :: CPython",
103-
"Programming Language :: Python :: Implementation :: PyPy",
104-
"Topic :: Software Development :: Testing",
105-
"Topic :: Internet :: WWW/HTTP",
106-
"License :: OSI Approved :: MIT License",
107-
],
108-
)

0 commit comments

Comments
 (0)