Skip to content

Commit

Permalink
Merge v0.2.0 into developing tree
Browse files Browse the repository at this point in the history
  • Loading branch information
mkb79 committed Jul 30, 2019
2 parents bec0ea8 + 7fbacb0 commit 9848eb0
Show file tree
Hide file tree
Showing 5 changed files with 62 additions and 43 deletions.
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
/test/*
/examples/log.log
/examples/credentials_enc.json
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ The whole code is written with Pythonista for iOS.

**This README is for the development tree only. The development tree contains many proof of concepts. Some needs still testing. Feel free to participate.**

The README for the latest stable release (v0.1.6) can be found [here](https://github.com/mkb79/Audible/blob/master/README.md).
The README for the latest stable release (v0.2.0) can be found [here](https://github.com/mkb79/Audible/blob/master/README.md).

## Requirements

Expand All @@ -34,10 +34,10 @@ The README for the latest stable release (v0.1.6) can be found [here](https://gi
## Installation

```python
# v0.1.6
# v0.2.0
pip install audible

# v0.2.0-alpha (development tree)
# development tree
pip install git+https://github.com/mkb79/audible.git@developing
```

Expand Down
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__ = "[email protected]"
__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__ = '[email protected]'
__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='[email protected]',
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 9848eb0

Please sign in to comment.