Skip to content

Commit

Permalink
some improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
saleweaver committed Oct 3, 2021
1 parent ef244f5 commit c0854c5
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 6 deletions.
3 changes: 2 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
from setuptools import setup
from sp_api.base import __version__

setup(
name='python-amazon-sp-api',
version='0.6.4',
version=__version__,
install_requires=[
"requests",
"six>=1.15,<2",
Expand Down
6 changes: 4 additions & 2 deletions sp_api/base/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@
from .reportTypes import ReportType
from sp_api.auth import AccessTokenClient

__version__ = '0.6.5'

__all__ = [
'AccessTokenClient',
'ReportType',
Expand Down Expand Up @@ -51,6 +53,6 @@
'encrypt_aes',
'NotificationType',
'CredentialProvider',
'MissingCredentials'

'MissingCredentials',
'__version__'
]
5 changes: 2 additions & 3 deletions sp_api/base/base_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,8 @@ class BaseClient:

def __init__(self, account='default', credentials=None):
try:
import pkg_resources
version = pkg_resources.require("python-amazon-sp-api")[0].version
self.user_agent += f'-{version}'
from sp_api.base import __version__
self.user_agent += f'-{__version__}'
except:
pass
self.credentials = CredentialProvider(account, credentials).credentials

0 comments on commit c0854c5

Please sign in to comment.