This repository has been archived by the owner on Jun 17, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
/
setup.py
71 lines (61 loc) · 1.88 KB
/
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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
#!/bin/env python
# coding: utf-8
"""
asyncio support sqlite
"""
import os
import re
import sys
from setuptools import setup, find_packages
PY_VER = sys.version_info
INSTALL_REQUIRES = []
if PY_VER >= (3, 4):
pass
elif PY_VER >= (3, 3):
INSTALL_REQUIRES.append('asyncio')
else:
raise RuntimeError("aiomysql doesn't suppport Python earllier than 3.3")
def find_version(*file_paths):
"""
read __init__.py
"""
file_path = os.path.join(*file_paths)
with open(file_path, 'r') as version_file:
line = version_file.readline()
while line:
if line.startswith('__version__'):
version_match = re.search(
r"^__version__ = ['\"]([^'\"]*)['\"]",
line,
re.M
)
if version_match:
return version_match.group(1)
line = version_file.readline()
raise RuntimeError('Unable to find version string.')
EXTRAS_REQUIRE = {'sa': ['sqlalchemy>=0.9']}
setup(
name='aiosqlite3',
version=find_version('aiosqlite3', '__init__.py'),
packages=find_packages(exclude=["tests", "tests.*"]),
url='https://github.com/zeromake/aiosqlite3',
license='MIT',
author='zeromake',
author_email='a390720046@gmail.com',
description='sqlite3 support for asyncio.',
platforms=['POSIX'],
classifiers=[
'License :: OSI Approved :: MIT License',
'Development Status :: 4 - Beta',
'Intended Audience :: Developers',
'Programming Language :: Python :: 3.5',
'Programming Language :: Python :: 3.6',
'Programming Language :: Python :: Implementation :: PyPy',
'Operating System :: POSIX',
'Environment :: Web Environment',
'Topic :: Database',
'Framework :: AsyncIO',
],
install_requires=INSTALL_REQUIRES,
extras_require=EXTRAS_REQUIRE
)