- Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathsetup.py
More file actions
Latest commit
85 lines (78 loc) · 2.33 KB
/
Copy pathsetup.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.
fromdistutils.coreimportsetup, Extension, Command
importdistutils
importinspect
importshutil
importos
# Import application modules.
importconfig
classClean2(Command):
"""A more thorough clean command."""
description='clean everything generated by a build* command'
user_options= []
definitialize_options(self):
pass
deffinalize_options(self):
pass
defrun(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)
forentryinos.listdir(this_dir):
ifentrynotinto_remove:
continue
entry=os.path.join(this_dir, entry)
print('erasing %s'%entry)
ifos.path.isfile(entry):
os.remove(entry)
elifos.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.