|
1 | | -import re |
2 | | -from pathlib import Path |
| 1 | +from setuptools import setup |
3 | 2 |
|
4 | | -from setuptools import find_packages, setup |
5 | | - |
6 | | - |
7 | | -def find_version(): |
8 | | - version_file = ( |
9 | | - Path(__file__).parent.joinpath("pytest_asyncio", "__init__.py").read_text() |
10 | | - ) |
11 | | - version_match = re.search(r"^__version__ = ['\"]([^'\"]*)['\"]", version_file, re.M) |
12 | | - if version_match: |
13 | | - return version_match.group(1) |
14 | | - |
15 | | - raise RuntimeError("Unable to find version string.") |
16 | | - |
17 | | - |
18 | | -setup( |
19 | | - name="pytest-asyncio", |
20 | | - version=find_version(), |
21 | | - packages=find_packages(), |
22 | | - url="https://github.com/pytest-dev/pytest-asyncio", |
23 | | - license="Apache 2.0", |
24 | | - author="Tin Tvrtković", |
25 | | - author_email="tinchester@gmail.com", |
26 | | - description="Pytest support for asyncio.", |
27 | | - long_description=Path(__file__).parent.joinpath("README.rst").read_text(), |
28 | | - classifiers=[ |
29 | | - "Development Status :: 4 - Beta", |
30 | | - "Intended Audience :: Developers", |
31 | | - "License :: OSI Approved :: Apache Software License", |
32 | | - "Programming Language :: Python :: 3.7", |
33 | | - "Programming Language :: Python :: 3.8", |
34 | | - "Programming Language :: Python :: 3.9", |
35 | | - "Programming Language :: Python :: 3.10", |
36 | | - "Topic :: Software Development :: Testing", |
37 | | - "Framework :: Asyncio", |
38 | | - "Framework :: Pytest", |
39 | | - ], |
40 | | - python_requires=">= 3.7", |
41 | | - install_requires=["pytest >= 5.4.0"], |
42 | | - extras_require={ |
43 | | - "testing": ["coverage", "hypothesis >= 5.7.1", "flaky >= 3.5.0"], |
44 | | - }, |
45 | | - entry_points={"pytest11": ["asyncio = pytest_asyncio.plugin"]}, |
46 | | -) |
| 3 | +if __name__ == "__main__": |
| 4 | + setup() |
0 commit comments