-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathsetup.py
More file actions
85 lines (78 loc) · 2.33 KB
/
setup.py
File metadata and controls
85 lines (78 loc) · 2.33 KB
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
"""
setup.py file for Wild Magic Python extension
"""
# Import native Python modules.
from distutils.core import setup, Extension, Command
import distutils
import inspect
import shutil
import os
# Import application modules.
import config
class Clean2(Command):
"""A more thorough clean command."""
description = 'clean everything generated by a build* command'
user_options = []
def initialize_options(self):
pass
def finalize_options(self):
pass
def run(self):
to_remove = (
'build',
'wm5.py',
'wm5.pyc',
'wm5_wrap.cpp',
)
this_dir = os.path.dirname(inspect.getfile(inspect.currentframe()))
this_dir = os.path.normpath(this_dir)
for entry in os.listdir(this_dir):
if entry not in to_remove:
continue
entry = os.path.join(this_dir, entry)
print('erasing %s'%entry)
if os.path.isfile(entry):
os.remove(entry)
elif os.path.isdir(entry):
shutil.rmtree(entry)
module = Extension(
name = '_wm5',
sources = ['wm5.i'],
swig_opts = [
'-v',
'-c++',
'-cpperraswarn',
'-I%s'%config.WM5INCDIR,
],
include_dirs = [config.WM5INCDIR,
],
extra_compile_args = [
'-Wno-unused-but-set-variable',
],
library_dirs = [config.WM5LIBDIR],
libraries = [
'Wm5Core',
'Wm5Mathematics',
'Wm5Imagics',
'Wm5Physics',
'Wm5GlxGraphics',
'Wm5GlxApplication',
'GL',
],
)
setup(
name = 'wm5',
version = '5.9',
description = 'Python wrapper of Geometric Tools\' Wild Magic C++ libraries',
url = 'https://github.com/vmlaker/pythonwildmagic',
author = 'Velimir Mlaker',
author_email = 'velimir dot mlaker at g mail dot com',
license = 'MIT',
long_description =
'Python Wild Magic is a Python extension wrapper of Geometric Tools\' Wild Magic -- a collection of C++ libraries for real-time computer graphics and physics, mathematics, geometry, numerical analysis, and image analysis.',
platforms = ['Linux',],
ext_modules = [module],
py_modules = ['wm5'],
cmdclass = { 'clean2' : Clean2 },
)
# The end.