Changeset 9610:7deb76f1ad2d in orange


Ignore:
Timestamp:
02/01/12 13:51:45 (2 years ago)
Author:
ales_erjavec
Branch:
default
Message:

Added "_d" to linked orange library name for debug builds when required.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • setup.py

    r9584 r9610  
    300300            debug=self.debug, 
    301301            target_lang=language) 
     302         
     303    def get_libraries(self, ext): 
     304        """ Change the 'orange' library name to 'orange_d' if 
     305        building in debug mode. Using ``get_ext_filename`` to discover if 
     306        _d postfix is required. 
     307         
     308        """ 
     309        libraries = build_ext.get_libraries(self, ext) 
     310        if "orange" in libraries and self.debug: 
     311            filename = self.get_ext_filename("orange") 
     312            basename = os.path.basename(filename) 
     313            name, ext = os.path.splitext(basename) 
     314            if name.endswith("_d"): 
     315                index = libraries.index("orange") 
     316                libraries[index] = "orange_d" 
     317             
     318        return libraries 
    302319         
    303320    if not hasattr(build_ext, "get_ext_fullpath"): 
Note: See TracChangeset for help on using the changeset viewer.