Ticket #42438: patch-setup.py.diff
File patch-setup.py.diff, 1.4 KB (added by petrrr, 11 years ago) |
---|
-
setup.
old new 434 434 libname = _get_lib_name("tau") 435 435 files = glob.glob(os.path.join(path, "*.f")) 436 436 # compiler specific options 437 kwargs = {'libraries': []} 437 # 2014-02-10, petr -- modification needed below 438 kwargs = {} 439 kwargs.update({'libraries': []}) 440 kwargs.update({'extra_link_args': []}) 438 441 # XXX: The build subdirectory is difficult to determine if installed 439 442 # via pypi or other means. I could not find a reliable way of doing it. 440 443 new_interface_path = os.path.join("build", libname + os.extsep + "pyf") … … 452 455 # gfortran the option -lgcov is required 453 456 if os.environ.get('OBSPY_C_COVERAGE', ""): 454 457 kwargs['libraries'].append('gcov') 458 459 # 2014-02-10, petr -- workaround for unexpected numpy.distutils behaviour 460 # This hot fix is needed for Macports. Macports sets `LDFLAGS` via 461 # `Python Portgroup` to control build architecture setings. 462 # For Fortran extentions this causes the default link arguments to be 463 # canceled, which does not correspond to C bevavior. The fix below adds 464 # these arguments manually. 465 # 466 # Should probably be adressed in numpy.distutils. 467 # 468 if platform.system() == 'Darwin': 469 kwargs['extra_link_args'].append('-bundle') 470 kwargs['extra_link_args'].append('-undefined dynamic_lookup') 471 455 472 config.add_extension(libname, files, **kwargs) 456 473 457 474 add_data_files(config)