Skip to content

Commit

Permalink
Switch to setuptools-scm for versioning
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
maliki committed Nov 27, 2016
1 parent 150e913 commit fa9f079
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 20 deletions.
1 change: 0 additions & 1 deletion pytest_asyncio/__init__.py
@@ -1 +0,0 @@
__version__ = '0.5.0'
21 changes: 2 additions & 19 deletions setup.py
@@ -1,29 +1,11 @@
import codecs
import os
import re
from setuptools import setup, find_packages

with open('README.rst') as f:
readme = f.read()


def read(*parts):
here = os.path.abspath(os.path.dirname(__file__))
return codecs.open(os.path.join(here, *parts), 'r').read()


def find_version(*file_paths):
version_file = read(*file_paths)
version_match = re.search(r"^__version__ = ['\"]([^'\"]*)['\"]",
version_file, re.M)
if version_match:
return version_match.group(1)

raise RuntimeError("Unable to find version string.")

setup(
name='pytest-asyncio',
version=find_version('pytest_asyncio', '__init__.py'),
use_scm_version=True,
packages=find_packages(),
url='https://github.com/pytest-dev/pytest-asyncio',
license='Apache 2.0',
Expand All @@ -41,6 +23,7 @@ def find_version(*file_paths):
"Topic :: Software Development :: Testing",
"Framework :: Pytest",
],
setup_requires=['setuptools_scm'],
install_requires=[
'pytest >= 3.0.2',
],
Expand Down

0 comments on commit fa9f079

Please sign in to comment.