-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsetup.py
97 lines (92 loc) · 2.69 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
from os import path
from setuptools import setup, find_packages
from distutils.extension import Extension
from Cython.Build import cythonize
here = path.abspath(path.dirname(__file__))
package_name = 'zsmash'
version = {}
with open('version.py') as fp:
exec(fp.read(), version)
with open(path.join(here, 'README.md'), encoding='utf-8') as f:
long_description = f.read()
extensions = [Extension(
name=f'{package_name}.bootstrap',
sources=[
f'{package_name}/bootstrap.pyx',
f'{package_name}/smash.pyx',
],
extra_compile_args=[
'-std=c++11',
'-O3',
'-static',
'-fopenmp',
'-I./zbase',
'-I./boost',
'-Wl,--as-needed',
'-DCYTHON_PEP489_MULTI_PHASE_INIT=0', # switch multi-phase initialization off which is default in Cython 0.29 for Python>=3.5
],
libraries=[
'semcrct', 'configfile', # recompiled from zbase/lib with -fPIC
'gsl', 'gslcblas',
'gomp',
'm',
'boost_system',
'boost_thread',
'boost_program_options',
'boost_timer',
'boost_chrono',
],
extra_link_args=[
'-std=c++11',
'-fopenmp',
'-static-libgcc',
'-static-libstdc++',
'-O3',
'-Wl,--as-needed',
],
library_dirs=[
'.',
f'./{package_name}',
'./boost/lib',
'/usr/lib64', # use gsl libs here instead of in zbase
'./zbase/lib',
],
language='c++'
)]
setup(
name=package_name,
author='zed.uchicago.edu',
author_email='ishanu@uchicago.edu',
version = str(version['__version__']),
packages=find_packages(),
scripts=[],
url='https://github.com/zeroknowledgediscovery/python_implementations_',
license='LICENSE',
description='Cythonized Libraires of ZeD Code',
keywords=[
'cython',
'machine learning',
],
# download_url='https://github.com/zeroknowledgediscovery/python_implementations_/archive/'+str(version['__version__'])+'.tar.gz',
long_description=long_description,
long_description_content_type='text/x-rst',
ext_modules=cythonize(
extensions,
language_level='3' # set python3
),
install_requires=[
'Cython>=0.29.23'
'numpy',
'pandas',
],
python_requires='>=3.6',
classifiers=[
'Development Status :: 4 - Beta',
'Intended Audience :: Developers',
'Intended Audience :: Science/Research',
'Topic :: Scientific/Engineering :: Information Analysis',
'Topic :: Software Development :: Libraries',
'License :: OSI Approved :: MIT License',
'Programming Language :: Python :: 3.6'],
include_package_data=True,
)