-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathsetup.py
More file actions
38 lines (34 loc) · 945 Bytes
/
setup.py
File metadata and controls
38 lines (34 loc) · 945 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
34
35
36
37
38
import glob
import os
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 = 'vtfunc.pyx'
else:
python_source = 'vtfunc.c'
cythonize = lambda obj: obj
extension = Extension(
'vtfunc',
define_macros=[('MODULE_NAME', '"vtfunc"')],
libraries=['sqlite3'],
sources=[python_source])
setup(
name='vtfunc',
version='0.4.1',
description='Tabular user-defined functions for SQLite3.',
url='https://github.com/coleifer/sqlite-vtfunc',
dependency_links=[
'https://github.com/coleifer/pysqlite/zipball/master#egg=pysqlite',
],
author='Charles Leifer',
author_email='',
ext_modules=cythonize([extension]),
)