Skip to content

Commit

Permalink
modify setup
Browse files Browse the repository at this point in the history
  • Loading branch information
mkb79 committed Jul 30, 2019
1 parent edf6e10 commit 7fbacb0
Show file tree
Hide file tree
Showing 3 changed files with 59 additions and 39 deletions.
19 changes: 8 additions & 11 deletions audible/__init__.py
Original file line number Diff line number Diff line change
@@ -1,20 +1,17 @@
# -*- coding: utf-8 -*-

from .client import AudibleAPI
from .client import DeprecatedClient as Client # backward comp
from .auth import LoginAuthenticator, FileAuthenticator
from .cryptography import encrypt_metadata, decrypt_metadata
from .localization import Locale, autodetect_locale
from .localization import custom_locale as custom_local # backward comp
from ._logging import set_file_logger, set_console_logger
from ._version import *


VERSION = (0, 2, 0)
__version__ = ".".join(map(str, VERSION))

__all__ = ["AudibleAPI", "LoginAuthenticator", "FileAuthenticator",
"encrypt_metadata", "decrypt_metadata", "Locale",
"autodetect_locale", "set_file_logger", "set_console_logger",
"__version__", "Client", "custom_local"]

__author__ = "mkb79"
__email__ = "mkb79@hackitall.de"
__status__ = "Development"
__all__ = [
"__version__", "AudibleAPI", "LoginAuthenticator", "FileAuthenticator",
"encrypt_metadata", "decrypt_metadata", "Locale", "autodetect_locale",
"set_file_logger", "set_console_logger", "Client", "custom_local"
]
14 changes: 14 additions & 0 deletions audible/_version.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
__title__ = 'audible'
__description__ = 'A(Sync) Interface for internal Audible API written in pure Python.'
__url__ = 'https://github.com/mkb79/audible'
__version__ = '0.2.1a0'
__author__ = 'mkb79'
__author_email__ = 'mkb79@hackitall.de'
__license__ = 'AGPL'
__status__ = 'Development'


__all__ = [
"__title__", "__description__", "__url__", "__version__",
"__author__", "__author_email__", "__license__", "__status__"
]
65 changes: 37 additions & 28 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,42 +1,51 @@
from os import path
import re
from setuptools import setup, find_packages
from os import system
import pathlib
from setuptools import setup
import sys


dirname = path.abspath(path.dirname(__file__))
# 'setup.py publish' shortcut.
if sys.argv[-1] == 'publish':
system('python setup.py sdist bdist_wheel')
system('twine upload dist/*')
sys.exit()

description = 'A(Sync) Interface for internal Audible API written in pure Python.'
if sys.version_info < (3, 6, 0):
raise RuntimeError("audible requires Python 3.6.0+")

try:
with open(path.join(dirname, 'README.md')) as f:
long_description = f.read()
except:
long_description = description
here = pathlib.Path(__file__).parent

packages = ['audible']

about = {}
exec((here / 'audible' / '_version.py').read_text('utf-8'), about)

long_description = (here / 'README.md').read_text('utf-8')

requires = (here / 'requirements.txt').read_text('utf-8').split()

with open(path.join(dirname, 'audible/__init__.py')) as f:
data = f.read()
version = re.search('VERSION(.*?)\((.*?)\)', data).group(2).split(", ")
version = ".".join(map(str, version))

setup(
name='audible',
version=version,
packages=find_packages(exclude=["tests", "*.tests", "*.tests.*", "tests.*"]),
description=description,
url='https://github.com/mkb79/audible',
license='AGPL',
author='mkb79',
author_email='mkb79@hackitall.de',
name=about['__title__'],
version=about['__version__'],
packages=packages,
package_dir={'audible': 'audible'},
description=about['__description__'],
url=about['__url__'],
license=about['__license__'],
author=about['__author__'],
author_email=about['__author_email__'],
classifiers=[
'Development Status :: 3 - Alpha',
'Development Status :: 4 - Beta',
'Intended Audience :: Developers',
'License :: OSI Approved :: GNU General Public License v3 (GPLv3)',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.6'
'License :: OSI Approved :: GNU Affero General Public License v3',
'Programming Language :: Python :: 3.6',
'Programming Language :: Python :: 3.7',
'Programming Language :: Python :: 3.8'
],
install_requires=open('requirements.txt').readlines(),
install_requires=requires,
python_requires='>=3.6',
keywords='Audible, API',
keywords='Audible, API, async',
include_package_data=True,
long_description=long_description,
long_description_content_type='text/markdown',
Expand Down

0 comments on commit 7fbacb0

Please sign in to comment.