-
Notifications
You must be signed in to change notification settings - Fork 40
/
setup.py
35 lines (28 loc) · 996 Bytes
/
setup.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
#!/usr/bin/env python #pylint: disable=missing-docstring
import ast
import os
import re
try:
from setuptools import setup
except ImportError:
from distutils.core import setup
def open_(fname, *args, **kwargs):
return open(os.path.join(os.path.dirname(__file__), fname), *args, **kwargs)
# Extract the version string from lector/__init__.py
_version_re = re.compile(r'__version__\s+=\s+(.*)')
with open_('lector/__init__.py', 'rb') as f:
version = str(ast.literal_eval(_version_re.search(
f.read().decode('utf-8')).group(1)))
# Extract the package requirements from requirements.txt
with open_('requirements.txt') as f:
requires = f.read().splitlines()
setup(name='Lector',
version=version,
description='An API for Amazon Kindle Data',
author='Matthew Suozzo',
author_email='[email protected]',
url='https://github.com/msuozzo/Lector',
packages=['lector'],
install_requires=requires,
license='MIT'
)