Use scm for versioning

This commit is contained in:
2022-05-16 14:48:53 +12:00
parent f94b982e16
commit af0c6b504f
3 changed files with 9 additions and 9 deletions

View File

@@ -1,2 +1,4 @@
from akauntingpy.api import Client
from akauntingpy.exceptions import *
from akauntingpy.exceptions import *
__version__ = '1.0.0'

View File

@@ -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}

View File

@@ -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),
# },
},
)