Skip to content

Commit 8885f2b

Browse files
malikinicoddemus
authored andcommitted
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 1ada096 commit 8885f2b

File tree

3 files changed

+9
-3
lines changed

3 files changed

+9
-3
lines changed

.gitignore

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,4 +57,7 @@ docs/_build/
5757
target/
5858

5959
.venv*
60-
.idea
60+
.idea
61+
62+
# generated by setuptools_scm
63+
pytest_asyncio/_version.py

pytest_asyncio/__init__.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,4 @@
1+
12
"""The main point for importing pytest-asyncio items."""
2-
__version__ = "0.10.0.dev0"
3+
4+
from ._version import version as __version__

setup.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,8 @@ def find_version():
2121

2222
setup(
2323
name="pytest-asyncio",
24-
version=find_version(),
24+
use_scm_version={"write_to": "pytest_asyncio/_version.py"},
25+
setup_requires=["setuptools-scm"],
2526
packages=find_packages(),
2627
url="https://github.com/pytest-dev/pytest-asyncio",
2728
license="Apache 2.0",

0 commit comments

Comments
 (0)