Skip to content

Commit b37699a

Browse files
committed
copy com_api first
1 parent 7979212 commit b37699a

File tree

1 file changed

+11
-9
lines changed

1 file changed

+11
-9
lines changed

setup.py

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,9 @@
3131
USE_AAF_SDK_DEBUG = bool(int(os.environ.get("USE_AAF_SDK_DEBUG", debug_default)))
3232
NTHREADS= int(os.environ.get("NTHREADS",0))
3333

34+
if '--debug' in copy_args:
35+
USE_AAF_SDK_DEBUG=True
36+
3437
space = ' '
3538
if AAF_ROOT is None:
3639

@@ -39,6 +42,9 @@
3942
print( space, "AAF SDK can be found from http://aaf.sourceforge.net")
4043
print( space, "Pre-built devel libraries can be found here")
4144
print( space, "http://sourceforge.net/projects/aaf/files/AAF-devel-libs/1.1.6")
45+
print( space, "If you compiled the full SDK yourself, set AAF_ROOT")
46+
print( space, "to the build directory in the SDK for your platform.")
47+
print( space, "For example AAFx86_64LinuxSDK/g++ or AAFWinSDK/vs9")
4248
sys.exit(-1)
4349

4450
if not os.path.exists(AAF_ROOT):
@@ -66,7 +72,7 @@
6672
import platform
6773
if platform.architecture()[0] == '64bit':
6874
WIN_ARCH = 'x64'
69-
if '--debug' in copy_args or USE_AAF_SDK_DEBUG:
75+
if USE_AAF_SDK_DEBUG:
7076
ext_extra['library_dirs'] = [os.path.join(AAF_ROOT,WIN_ARCH ,'Debug','Refimpl')]
7177
ext_extra['libraries'] = ['AAFD', 'AAFIIDD']
7278
else:
@@ -75,10 +81,8 @@
7581

7682
ext_extra['library_dirs'].extend([os.path.join(AAF_ROOT, 'lib'),
7783
os.path.join(AAF_ROOT, 'bin')])
78-
7984
print("AAF_ROOT =",AAF_ROOT)
8085

81-
8286
ext_modules = []
8387
for dirname, dirnames, filenames in os.walk("aaf", topdown=True):
8488
for filename in filenames:
@@ -198,16 +202,11 @@ def run(self):
198202
class build_pyaaf_ext(build_ext):
199203

200204
def build_extensions(self):
201-
com_api, libaafintp, libaafpgapi = copy_com_api(debug=self.debug)
202-
if sys.platform == 'darwin':
203-
name_tool_fix_com_api(com_api)
204-
205+
205206
result = build_ext.build_extensions(self)
206-
207207
if sys.platform == 'darwin':
208208
for item in self.get_outputs():
209209
install_name_tool(item)
210-
print("done!")
211210
return result
212211

213212

@@ -221,6 +220,9 @@ def build_extensions(self):
221220
include_path = ext_extra['include_dirs']
222221

223222
if not 'clean' in copy_args:
223+
copy_com_api(USE_AAF_SDK_DEBUG)
224+
if sys.platform == 'darwin':
225+
name_tool_fix_com_api(com_api)
224226
ext_modules = cythonize(ext_modules, include_path=include_path, nthreads=NTHREADS)
225227

226228
setup(

0 commit comments

Comments
 (0)