Skip to content

Commit 1d6f382

Browse files
author
maliki
committed
Switch to setuptools-scm for versioning
Following other pytest projects like pytest-html, that use setuptool-scm to manage version, it would be nice other projects follow the suit and let setuptools-scm manage version of this project.
1 parent 150e913 commit 1d6f382

File tree

2 files changed

+2
-12
lines changed

2 files changed

+2
-12
lines changed

pytest_asyncio/__init__.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +0,0 @@
1-
__version__ = '0.5.0'

setup.py

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -11,19 +11,9 @@ def read(*parts):
1111
here = os.path.abspath(os.path.dirname(__file__))
1212
return codecs.open(os.path.join(here, *parts), 'r').read()
1313

14-
15-
def find_version(*file_paths):
16-
version_file = read(*file_paths)
17-
version_match = re.search(r"^__version__ = ['\"]([^'\"]*)['\"]",
18-
version_file, re.M)
19-
if version_match:
20-
return version_match.group(1)
21-
22-
raise RuntimeError("Unable to find version string.")
23-
2414
setup(
2515
name='pytest-asyncio',
26-
version=find_version('pytest_asyncio', '__init__.py'),
16+
use_scm_version=True,
2717
packages=find_packages(),
2818
url='https://github.com/pytest-dev/pytest-asyncio',
2919
license='Apache 2.0',
@@ -41,6 +31,7 @@ def find_version(*file_paths):
4131
"Topic :: Software Development :: Testing",
4232
"Framework :: Pytest",
4333
],
34+
setup_requires=['setuptools_scm'],
4435
install_requires=[
4536
'pytest >= 3.0.2',
4637
],

0 commit comments

Comments
 (0)