-
Notifications
You must be signed in to change notification settings - Fork 13
/
setup.py
55 lines (49 loc) · 1.43 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
import logging
from setuptools import setup, find_packages, Extension
logger = logging.getLogger()
if not logger.handlers:
logger.addHandler(logging.StreamHandler())
logger.setLevel(logging.INFO)
setup_kwargs = {}
try:
from Cython.Distutils import build_ext
setup_kwargs.update(dict(
ext_modules=[
Extension(
'olo.utils',
sources=['olo/utils.py'],
extra_compile_args=['-O3'],
language='c++'
),
Extension(
'olo._speedups',
sources=['olo/_speedups.py'],
extra_compile_args=['-O3'],
language='c++'
),
],
cmdclass={'build_ext': build_ext},
))
except ImportError:
logger.warn('No cython for optimize!!!')
install_requires = []
for line in open('requirements.txt', 'r'):
install_requires.append(line.strip())
setup(
name='olo',
version='0.5.0',
keywords=['ORM', 'olo', 'cache', 'sqlstore'],
description='ORM with intelligent and elegant cache manager',
url='https://github.com/yetone/olo',
license='MIT License',
author='yetone',
author_email='guanxipeng@douban.com',
packages=find_packages(exclude=['test.*', 'test', 'benchmarks']),
setup_requires=['Cython >= 0.20'],
install_requires=install_requires,
platforms='any',
tests_require=(
'pytest==7.1.2',
),
**setup_kwargs
)