-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathsetup.py
141 lines (124 loc) · 3.91 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
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
from __future__ import absolute_import
########################################################################
# File based on https://github.com/Blosc/bcolz
########################################################################
#
# License: BSD
# Created: October 5, 2015
# Author: Carst Vaartjes - cvaartjes@visualfabriq.com
#
########################################################################
import codecs
import os
from setuptools import setup, Extension, find_packages
from os.path import abspath
from sys import version_info as v
from setuptools.command.build_ext import build_ext as _build_ext
# Check this Python version is supported
if any([v < (2, 6), (3,) < v < (3, 5)]):
raise Exception("Unsupported Python version %d.%d. Requires Python >= 2.7 "
"or >= 3.5." % v[:2])
class build_ext(_build_ext):
def finalize_options(self):
_build_ext.finalize_options(self)
# Prevent numpy from thinking it is still in its setup process:
__builtins__.__NUMPY_SETUP__ = False
import numpy
self.include_dirs.append(numpy.get_include())
HERE = os.path.abspath(os.path.dirname(__file__))
def read(*parts):
"""
Build an absolute path from *parts* and and return the contents of the
resulting file. Assume UTF-8 encoding.
"""
with codecs.open(os.path.join(HERE, *parts), "rb", "utf-8") as f:
return f.read()
def get_version():
version = {}
with open("bqueryd/version.py") as fp:
exec (fp.read(), version)
return version
# Sources & libraries
inc_dirs = [abspath('bqueryd')]
try:
import numpy as np
inc_dirs.append(np.get_include())
except ImportError as e:
pass
lib_dirs = []
libs = []
def_macros = []
sources = []
cmdclass = {'build_ext': build_ext}
optional_libs = ['numexpr>=2.6.9']
install_requires = [
'bquery>=0.2.10',
'pyzmq>=17.1.2',
'redis>=3.0.1',
'boto3>=1.9.82',
'smart_open>=1.9.0',
'netifaces>=0.10.9',
'configobj>=5.0.6',
'psutil>=5.0.0',
'azure-storage-blob==12.0.0',
]
setup_requires = []
tests_requires = [
'pandas>=0.23.1',
'pytest>=4.0.0',
'pytest-cov>=2.6.0',
'codacy-coverage>=1.3.7',
]
extras_requires = []
ext_modules = []
package_data = {}
classifiers = [
'Development Status :: 4 - Beta',
'Intended Audience :: Developers',
'Intended Audience :: Information Technology',
'Intended Audience :: Science/Research',
'License :: OSI Approved :: BSD License',
'Programming Language :: Python',
'Topic :: Software Development :: Libraries :: Python Modules',
'Operating System :: Microsoft :: Windows',
'Operating System :: Unix',
'Programming Language :: Python :: 2',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.5',
'Programming Language :: Python :: 3.6',
'Programming Language :: Python :: 3.7',
]
setup(
name="bqueryd",
version=get_version()['__version__'],
description='A distribution framework for Bquery',
long_description=read("README.md"),
long_description_content_type='text/markdown',
classifiers=classifiers,
author='Carst Vaartjes',
author_email='cvaartjes@visualfabriq.com',
maintainer='Carst Vaartjes',
maintainer_email='cvaartjes@visualfabriq.com',
url='https://github.com/visualfabriq/bqueryd',
license='GPL2',
platforms=['any'],
ext_modules=ext_modules,
cmdclass=cmdclass,
install_requires=install_requires,
setup_requires=setup_requires,
tests_require=tests_requires,
extras_require=dict(
optional=extras_requires,
test=tests_requires
),
packages=find_packages(),
package_data=package_data,
include_package_data=True,
zip_safe=True,
entry_points={
'console_scripts': [
'bqueryd = bqueryd.node:main'
]
}
)