From af0c6b504fc2e4d02b3f770f75f89047fc53ba16 Mon Sep 17 00:00:00 2001 From: Aaron Guise Date: Mon, 16 May 2022 14:48:53 +1200 Subject: [PATCH] Use scm for versioning --- akauntingpy/__init__.py | 4 +++- akauntingpy/api.py | 4 ++-- setup.py | 10 ++++------ 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/akauntingpy/__init__.py b/akauntingpy/__init__.py index fbff91d..3086eed 100644 --- a/akauntingpy/__init__.py +++ b/akauntingpy/__init__.py @@ -1,2 +1,4 @@ from akauntingpy.api import Client -from akauntingpy.exceptions import * \ No newline at end of file +from akauntingpy.exceptions import * + +__version__ = '1.0.0' \ No newline at end of file diff --git a/akauntingpy/api.py b/akauntingpy/api.py index 939a100..78922f4 100644 --- a/akauntingpy/api.py +++ b/akauntingpy/api.py @@ -1,7 +1,7 @@ import requests import json from requests.auth import HTTPBasicAuth -from akauntingpy import exceptions +from akauntingpy import exceptions, __version__ from akauntingpy.helpers import * @@ -25,7 +25,7 @@ class Client(object): self.url = url self.authentication = HTTPBasicAuth(username, password) self.headers = { - 'User-Agent': 'AkauntingPy 1.0', + 'User-Agent': 'AkauntingPy v' + __version__, } self.company_id = company_id self.default_params = {'company_id': company_id} diff --git a/setup.py b/setup.py index 2516efe..af6c343 100644 --- a/setup.py +++ b/setup.py @@ -6,12 +6,10 @@ with open('README.md', 'r') as readme: long_description = readme.read() -version = '0.0.1' - setup( name='akauntingpy', - version=version, + use_scm_version=True, author='CyberCinch', description='Python interface to the Akaunting API.', url='https://github.com/cybercinch/akaunting-py', @@ -29,8 +27,8 @@ setup( 'Operating System :: OS Independent', ], command_options={ - 'build_sphinx': { - 'version': ('setup.py', version), - }, + # 'build_sphinx': { + # 'version': ('setup.py', version), + # }, }, )