3131USE_AAF_SDK_DEBUG = bool (int (os .environ .get ("USE_AAF_SDK_DEBUG" , debug_default )))
3232NTHREADS = int (os .environ .get ("NTHREADS" ,0 ))
3333
34+ if '--debug' in copy_args :
35+ USE_AAF_SDK_DEBUG = True
36+
3437space = ' '
3538if AAF_ROOT is None :
3639
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
4450if not os .path .exists (AAF_ROOT ):
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 :
7581
7682 ext_extra ['library_dirs' ].extend ([os .path .join (AAF_ROOT , 'lib' ),
7783 os .path .join (AAF_ROOT , 'bin' )])
78-
7984print ("AAF_ROOT =" ,AAF_ROOT )
8085
81-
8286ext_modules = []
8387for dirname , dirnames , filenames in os .walk ("aaf" , topdown = True ):
8488 for filename in filenames :
@@ -198,16 +202,11 @@ def run(self):
198202class 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):
221220include_path = ext_extra ['include_dirs' ]
222221
223222if 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
226228setup (
0 commit comments