forked from matpow2/cuwo
-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.py
45 lines (38 loc) · 1.4 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
# Copyright (c) Mathias Kaerlev 2013.
#
# This file is part of cuwo.
#
# cuwo is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# cuwo is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with cuwo. If not, see <http://www.gnu.org/licenses/>.
import sys
from distutils.core import setup
from distutils.extension import Extension
from Cython.Distutils import build_ext
from Cython.Build import cythonize
ext_modules = []
names = [
'cuwo.bytes',
'cuwo.entity'
]
includes = ['./cuwo', './terraingen/include']
lib_dirs = ['./lib']
for name in names:
ext_modules.append(Extension(name, ['./%s.pyx' % name.replace('.', '/')],
language='c++', include_dirs=includes))
ext_modules.append(Extension('cuwo.tgen', ['./cuwo/tgen.pyx'],
language='c++', include_dirs=includes,
library_dirs=lib_dirs, libraries=['tgen']))
setup(
name='cuwo extensions',
ext_modules=cythonize(ext_modules)
)