Ticket #41122: patch-setup.py.diff

File patch-setup.py.diff, 1.4 KB (added by anowacki (Andy Nowacki), 11 years ago)
  • setup.

    old new  
    2727from distutils.unixccompiler import UnixCCompiler
    2828from setuptools import find_packages, setup
    2929from setuptools.extension import Extension
    30 import distribute_setup
    3130import glob
    3231import os
    3332import platform
     
    370369            # otherwise we just use the original compile method
    371370            UnixCCompiler.linker_so = None
    372371            return self._original_compile(obj, src, *args, **kwargs)
    373         UnixCCompiler.linker_so = ["gfortran"]
    374         self.compiler_so = ["gfortran"]
     372        UnixCCompiler.linker_so = [os.environ.get("F77")]
     373        self.compiler_so = [os.environ.get("F77")]
    375374        cc_args = ['-c', '-fno-underscoring']
    376375        cc_args.append('-fPIC')
    377376        try:
     
    621620    taupargs = []
    622621
    623622    lib = MyExtension(lib_name,
    624623                      libraries=['gfortran'],
    625                       extra_link_args=extra_link_args,
     624                      extra_link_args=['-L/opt/local/lib/gcc46'],
    626625                      sources=[src + 'emdlv.f', src + 'libtau.f',
    627626                               src + 'ttimes_subrout.f'])
     
    629627
    630628
    631629def setupPackage(gfortran=True, ccompiler=True):
    632     # automatically install distribute if the user does not have it installed
    633     distribute_setup.use_setuptools()
    634630    # use lib2to3 for Python 3.x
    635631    if sys.version_info[0] == 3:
    636632        convert2to3()