forked from ugoertz/kombilo
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsetup.py
67 lines (59 loc) · 2.18 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
import sys
from setuptools import setup, find_packages, Extension
sources = [
'kombilo/libkombilo/sgfparser.cpp',
'kombilo/libkombilo/abstractboard.cpp',
'kombilo/libkombilo/search.cpp',
'kombilo/libkombilo/algos.cpp',
'kombilo/libkombilo/pattern.cpp',
'kombilo/libkombilo/libkombilo_wrap.cxx']
kwargs = {}
if sys.platform.startswith('win'):
sources.append('kombilo/libkombilo/sqlite3.c')
kwargs['library_dirs'] = ['C:\\Libraries\\boost_1_62_0', ]
kwargs['extra_compile_args'] = ['-I.', '-IC:\\Libraries\\boost_1_62_0', '-openmp']
elif sys.platform.startswith('darwin'):
kwargs['libraries'] = ['stdc++', 'sqlite3']
kwargs['library_dirs'] = ['/usr/lib', ]
kwargs['extra_compile_args'] = ['-I.', '-I/usr/local/include', '-I/opt/local/include'] # can use this w/ g++ to max optimization
kwargs['extra_link_args'] = [ ]
else:
kwargs['libraries'] = ['stdc++', 'sqlite3']
kwargs['library_dirs'] = ['/usr/lib', ]
kwargs['extra_compile_args'] = ['-O3', '-I.', '-fopenmp'] # can use this w/ g++ to max optimization
kwargs['extra_link_args'] = [ '-lgomp', ]
kwargs['sources'] = sources
sgfext = Extension('kombilo._libkombilo', **kwargs)
setup(
name = 'kombilo',
version = '0.8.4',
description = 'A database program for the game of go',
author = 'Ulrich Goertz',
author_email = '[email protected]',
url = 'http://u-go.net/kombilo/',
license = 'MIT License',
classifiers=[
'Programming Language :: Python :: 2.7',
],
entry_points = {'gui_scripts': [
'kombilo = kombilo.kombilo:run',
'v = kombilo.v:run',
], },
ext_modules = [ sgfext ],
packages = find_packages(),
package_data = {'kombilo': [
'default.cfg',
'data/*',
'license.rst',
'icons/*.*',
'tests/sgfs/*.sgf', 'tests/db/.keep',
'libkombilo/*.h',
'lang/*/LC_MESSAGES/kombilo.?o',
], },
install_requires = [
'configobj',
'Pillow',
'Pmw',
],
tests_require=['pytest'],
)