-
Notifications
You must be signed in to change notification settings - Fork 2
/
setup.py
executable file
·93 lines (87 loc) · 2.71 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
#!/usr/bin/env python3
from setuptools import setup
from Cython.Build import cythonize
from distutils.extension import Extension
import numpy
EXT_COMMON = dict(
language="c++",
extra_compile_args=[
'-fopenmp',
'-std=c++14',
],
extra_link_args=[
'-fopenmp',
],
)
SETUP_KWARGS = dict(
name='pylibosrm',
version='0.1.2',
packages=('pylibosrm',),
url='https://github.com/HoverHell/pylibosrm',
license='MIT',
author='HoverHell',
author_email='[email protected]',
install_requires=(),
tests_require=(),
ext_modules=cythonize([
Extension(
"pylibosrm.osrm_wrapper",
sources=["pylibosrm/osrm_wrapper.pyx"],
# sources=["pylibosrm/osrm_wrapper.pyx", "pylibosrm/osrm_simple.cpp"],
include_dirs=[
numpy.get_include(),
"./osrm-backend/include",
"./osrm-backend/third_party/variant/include",
],
library_dirs=[
'./osrm-backend/build',
],
libraries=[
':libosrm.a',
'boost_regex',
'boost_date_time',
'boost_chrono',
'boost_filesystem',
'boost_iostreams',
'boost_thread',
'boost_system',
'pthread',
'tbb',
'tbbmalloc',
'rt',
'z',
],
**EXT_COMMON),
Extension(
"pylibosrm.route_cache",
sources=["pylibosrm/route_cache.pyx"],
# sources=["pylibosrm/route_cache.pyx", "pylibosrm/route_cache_helper.cpp"],
include_dirs=[
numpy.get_include(),
'./msgpack-c/include/',
],
library_dirs=[
],
libraries=[
],
**EXT_COMMON),
]),
description=(
'libosrm Cython wrapper'),
classifiers=[
# https://github.com/HoverHell/python-pypi-template
'License :: OSI Approved :: MIT License',
'Development Status :: 2 - Pre-Alpha',
# 'Development Status :: 3 - Alpha',
# 'Development Status :: 4 - Beta',
# 'Development Status :: 5 - Production/Stable',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3 :: Only',
'Programming Language :: Python :: 3.6',
'Programming Language :: Python :: 3.7',
'Programming Language :: Python :: 3.8',
'Programming Language :: Python :: Implementation :: CPython',
'Programming Language :: Python :: Implementation :: PyPy',
])
if __name__ == '__main__':
setup(**SETUP_KWARGS)