Changeset 9925:51ca3f2ff52d in orange for setup.py


Ignore:
Timestamp:
02/07/12 14:15:38 (2 years ago)
Author:
ales_erjavec
Branch:
default
rebase_source:
b9a5025d614120700746cba2d482a97281bc25cf
Message:

Fixed setup.py for building on windows.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • setup.py

    r9893 r9925  
    109109                # Copy ${TEMP}/orange/orange.lib to ${BUILD}/orange.lib 
    110110                ext_fullpath = self.get_ext_fullpath(ext.name) 
    111                 lib = glob.glob(os.path.join(self.build_temp, "*", "*", ext.name + ".lib"))[0] 
    112                 copy_file(lib, os.path.splitext(ext_fullpath)[0] + ".lib") 
     111                # Get the last component of the name 
     112                ext_name = ext.name.rsplit(".", 1)[-1] 
     113                libs = glob.glob(os.path.join(self.build_temp,  
     114                                              "*", "*", ext_name + ".lib")) 
     115                if not libs: 
     116                    log.info("Could not locate library %r in directory %r" \ 
     117                             %(ext_name, self.build_temp)) 
     118                else: 
     119                    lib = libs[0] 
     120                    copy_file(lib, os.path.splitext(ext_fullpath)[0] + ".lib") 
    113121            else: 
    114122                # Make lib{name}.so link to {name}.so 
Note: See TracChangeset for help on using the changeset viewer.