-
Notifications
You must be signed in to change notification settings - Fork 34
/
setup.py
68 lines (62 loc) · 2.13 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
import glob
import sys
import warnings
from setuptools import setup
from setuptools.extension import Extension
try:
from Cython.Build import cythonize
except ImportError:
cython_installed = False
warnings.warn('Cython not installed, using pre-generated C source file.')
else:
cython_installed = True
if cython_installed:
python_source = 'unqlite.pyx'
else:
python_source = 'unqlite.c'
cythonize = lambda obj: obj
if sys.platform.find('win') < 0:
libs = ['pthread']
else:
libs = []
library_source = ['src/unqlite.c']
unqlite_extension = Extension(
'unqlite',
define_macros=[('UNQLITE_ENABLE_THREADS', '1')],
libraries=libs,
sources=[python_source] + library_source)
setup(
name='unqlite',
version='0.9.6',
description='Fast Python bindings for the UnQLite embedded NoSQL database.',
author='Charles Leifer',
author_email='',
url='https://github.com/coleifer/unqlite-python',
license='MIT',
#install_requires=['Cython'],
#setup_requires=['cython'],
classifiers=[
'Development Status :: 3 - Alpha',
'Environment :: Web Environment',
'Intended Audience :: Developers',
'License :: OSI Approved :: MIT License',
'Operating System :: OS Independent',
'Programming Language :: C',
'Programming Language :: Cython',
'Programming Language :: Python',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.4',
'Programming Language :: Python :: 3.5',
'Programming Language :: Python :: 3.6',
'Programming Language :: Python :: 3.7',
'Programming Language :: Python :: 3.8',
'Programming Language :: Python :: 3.9',
'Programming Language :: Python :: 3.10',
'Programming Language :: Python :: 3.11',
'Programming Language :: Python :: Implementation :: CPython',
'Topic :: Database',
'Topic :: Database :: Database Engines/Servers',
'Topic :: Software Development :: Embedded Systems',
'Topic :: Software Development :: Libraries :: Python Modules'],
ext_modules=cythonize([unqlite_extension])
)