-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsetup.py
48 lines (39 loc) · 1.29 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
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
import glob
import platform
import distutils.sysconfig
try:
from setuptools import setup, Extension
except ImportError:
from distutils.core import setup, Extension
def remove_unwanted_options():
cfg_vars = distutils.sysconfig.get_config_vars()
for key, value in cfg_vars.items():
if type(value) == str and cfg_vars[key].startswith('-'):
cfg_vars[key] = '' #value.replace('-Wstrict-prototypes', '')
remove_unwanted_options()
orderbook = Extension('orderbook',
language = 'c++',
extra_compile_args = [ '-Wall', '-pedantic', '-fPIC', '-std=c++14' ],
libraries = [ 'boost_python' + '.'.join(platform.python_version_tuple()[:2]) ],
include_dirs = [ '/usr/include/python' + '.'.join(platform.python_version_tuple()[:2]), 'src' ],
sources = (
glob.glob('src/*.cpp')
)
)
setup(
name = 'orderbook',
version = '1.0.0',
description = 'Orderbook engine',
url = 'https://github.com/pavelschon/OrderBook.git',
author ='Pavel Schön',
author_email = '[email protected]',
requires = [ 'twisted' ],
scripts = glob.glob('bin/*.py'),
ext_modules = [ orderbook ],
data_files = [
( 'orderbook/tests', glob.glob('test/*.py') ),
( 'orderbook/', [ 'README.md' ] ),
]
)