Skip to content

Commit

Permalink
Added support for setuptools-git-versioning
Browse files Browse the repository at this point in the history
Signed-off-by: Ray Kinsella <mdr@ashroe.eu>
  • Loading branch information
mdr78 committed Sep 3, 2024
1 parent 5d9ed6d commit 7eab066
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 10 deletions.
2 changes: 2 additions & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
requests
setuptools >= 74.1.0
setuptools_git_versioning >= 2.0.0
17 changes: 7 additions & 10 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,19 +1,12 @@
import sys
from setuptools import setup
import setuptools
from pathlib import Path

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

version = sys.argv[3:]
if version:
version = str(version[0])
sys.argv.remove(version)
else:
raise Exception("Version is not set")

setup(
setuptools.setup(
name="ThermiaOnlineAPI",
packages=[
"ThermiaOnlineAPI",
Expand All @@ -22,7 +15,10 @@
"ThermiaOnlineAPI.model",
"ThermiaOnlineAPI.utils",
],
version=version,
setuptools_git_versioning={
"enabled": True,
"dev_template": "{tag}",
},
license="GPL-3.0",
description="A Python API for Thermia heat pumps using https://online.thermia.se",
long_description=long_description,
Expand All @@ -33,5 +29,6 @@
download_url="https://github.com/klejejs/python-thermia-online-api/releases",
keywords=["Thermia", "Online"],
install_requires=[],
setup_requires=["setuptools-git-versioning"],
classifiers=[],
)

0 comments on commit 7eab066

Please sign in to comment.