forked from MonetDB/MonetDBLite-Python
-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.py
executable file
·87 lines (76 loc) · 2.92 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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import os
import numpy
import sys
from setuptools import setup, Extension
basedir = os.path.dirname(os.path.realpath(__file__))
long_description = ''
try:
import pypandoc
# Installation of pandoc for python 2 fails
if sys.version_info[0] >= 3:
long_description = pypandoc.convert_file(os.path.join(basedir, 'README.md'), 'rst')
except(IOError, ImportError):
long_description = ''
sources = []
includes = [numpy.get_include()]
excludes = ['strptime.c', 'inlined_scripts.c', 'decompress.c', 'fsync.c']
def generate_sources_includes(dir):
includes.append(dir)
for root, dirs, files in os.walk(dir):
for name in files:
if name.endswith('.c') and name not in excludes:
sources.append(os.path.join(root, name))
for name in dirs:
includes.append(os.path.join(root, name))
generate_sources_includes('src/embeddedpy')
generate_sources_includes('src/monetdblite/src')
libmonetdb5 = Extension('monetdblite.libmonetdb5',
define_macros=[('LIBGDK', None),
('LIBMAL', None),
('LIBOPTIMIZER', None),
('LIBSTREAM', None),
('LIBSQL', None),
('LIBPYAPI', None),
('MONETDBLITE_COMPILE', None)],
include_dirs=includes,
sources=sources,
extra_compile_args=['-std=c99'], # needed for linux build
language='c')
setup(
name = "monetdblite",
version = '0.6.2',
# version = '0.6.2+Aug2018.C-d8b1b5e',
description = 'Embedded MonetDB Python Database.',
author = 'Mark Raasveldt, Hannes Mühleisen',
author_email = '[email protected]',
keywords = 'MonetDB MonetDBLite Database SQL OLAP',
packages = ['monetdblite'],
package_dir = {'': 'lib'},
url="https://github.com/hannesmuehleisen/MonetDBLite-Python",
long_description = long_description,
install_requires=[
'numpy>=1.7',
'pandas>=0.20'
],
setup_requires=['pytest-runner'],
tests_require=['pytest'],
# zip_safe = False,
classifiers = [
'License :: OSI Approved :: Mozilla Public License 2.0 (MPL 2.0)',
'Programming Language :: Python :: 2',
'Programming Language :: Python :: 2.7',
'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 :: C',
'Topic :: Database',
'Topic :: Database :: Database Engines/Servers',
'Intended Audience :: Developers',
'Development Status :: 3 - Alpha'
],
ext_modules = [libmonetdb5]
)