3D model(pmd, mqo...) IO library using C++.
Revision | 2a17cee6192f58b3fccef2a9bab6a1214037dcbb (tree) |
---|---|
Time | 2011-05-04 02:25:29 |
Author | ousttrue <ousttrue@gmai...> |
Commiter | ousttrue |
vc2008, gcc-4.5
@@ -10,7 +10,7 @@ | ||
10 | 10 | #include <stdlib.h> |
11 | 11 | #include <cstring> |
12 | 12 | |
13 | -#if defined(_WIN32) | |
13 | +#ifdef _MSC_VER | |
14 | 14 | #include <windows.h> |
15 | 15 | #else |
16 | 16 | #include <iconv.h> |
@@ -1,5 +1,5 @@ | ||
1 | 1 | import os |
2 | -import commands | |
2 | +import shutil | |
3 | 3 | from distutils.core import setup, Extension |
4 | 4 | |
5 | 5 | def exec_command(cmd): |
@@ -12,16 +12,26 @@ if os.name=='nt': | ||
12 | 12 | extra_compile_args=["/EHsc", "/wd4996"] |
13 | 13 | libraries=[] |
14 | 14 | include_dirs=['../../src', BOOST_ROOT] |
15 | + if os.path.exists("meshio/mqo.py"): | |
16 | + os.remove("meshio/mqo.py") | |
17 | + if os.path.exists("meshio/pmd.py"): | |
18 | + os.remove("meshio/pmd.py") | |
15 | 19 | exec_command("swig -c++ -python -o mqo_wrap.cpp -D_MSC_VER ../mqo.i") |
16 | 20 | exec_command("swig -c++ -python -o pmd_wrap.cpp -D_MSC_VER ../pmd.i") |
17 | - exec_command("mv mqo.py pmd.py meshio") | |
21 | + shutil.move("mqo.py", "meshio") | |
22 | + shutil.move("pmd.py", "meshio") | |
18 | 23 | else: |
19 | 24 | extra_compile_args=['-std=c++0x'] |
20 | 25 | libraries=["iconv"] |
21 | 26 | include_dirs=['../../src'] |
27 | + if os.path.exists("meshio/mqo.py"): | |
28 | + os.remove("meshio/mqo.py") | |
29 | + if os.path.exists("meshio/pmd.py"): | |
30 | + os.remove("meshio/pmd.py") | |
22 | 31 | exec_command("swig -c++ -python -o mqo_wrap.cpp ../mqo.i") |
23 | 32 | exec_command("swig -c++ -python -o pmd_wrap.cpp ../pmd.i") |
24 | - exec_command("mv mqo.py pmd.py meshio") | |
33 | + shutil.move("mqo.py", "meshio") | |
34 | + shutil.move("pmd.py", "meshio") | |
25 | 35 | |
26 | 36 | setup( |
27 | 37 | name='meshio', |