Skip to content

Commit 7eab066

Browse files
committed
Added support for setuptools-git-versioning
Signed-off-by: Ray Kinsella <mdr@ashroe.eu>
1 parent 5d9ed6d commit 7eab066

2 files changed

Lines changed: 9 additions & 10 deletions

File tree

requirements.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,3 @@
11
requests
2+
setuptools >= 74.1.0
3+
setuptools_git_versioning >= 2.0.0

setup.py

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,12 @@
11
import sys
2-
from setuptools import setup
2+
import setuptools
33
from pathlib import Path
44

55
# read the contents of your README file
66
current_directory = Path(__file__).parent
77
long_description = (current_directory / "README.md").read_text()
88

9-
version = sys.argv[3:]
10-
if version:
11-
version = str(version[0])
12-
sys.argv.remove(version)
13-
else:
14-
raise Exception("Version is not set")
15-
16-
setup(
9+
setuptools.setup(
1710
name="ThermiaOnlineAPI",
1811
packages=[
1912
"ThermiaOnlineAPI",
@@ -22,7 +15,10 @@
2215
"ThermiaOnlineAPI.model",
2316
"ThermiaOnlineAPI.utils",
2417
],
25-
version=version,
18+
setuptools_git_versioning={
19+
"enabled": True,
20+
"dev_template": "{tag}",
21+
},
2622
license="GPL-3.0",
2723
description="A Python API for Thermia heat pumps using https://online.thermia.se",
2824
long_description=long_description,
@@ -33,5 +29,6 @@
3329
download_url="https://github.com/klejejs/python-thermia-online-api/releases",
3430
keywords=["Thermia", "Online"],
3531
install_requires=[],
32+
setup_requires=["setuptools-git-versioning"],
3633
classifiers=[],
3734
)

0 commit comments

Comments
 (0)