forked from coleifer/python-lsm-db
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup.py
More file actions
33 lines (28 loc) · 743 Bytes
/
setup.py
File metadata and controls
33 lines (28 loc) · 743 Bytes
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
import glob
import os
from distutils.core import setup, Extension
try:
from Cython.Build import cythonize
except ImportError:
import warnings
cython_installed = False
warnings.warn('Cython not installed, using pre-generated C source file.')
else:
cython_installed = True
if cython_installed:
python_source = 'lsm.pyx'
else:
python_source = 'lsm.c'
cythonize = lambda obj: [obj]
library_source = glob.glob('src/*.c')
lsm_extension = Extension(
'lsm',
sources=[python_source] + library_source)
setup(
name='lsm-db',
version='0.4.0',
description='Python bindings for the SQLite4 LSM database.',
author='Charles Leifer',
author_email='',
ext_modules=cythonize(lsm_extension),
)