Changeset 1a3602d in sasview


Ignore:
Timestamp:
Nov 22, 2017 12:21:13 PM (7 years ago)
Author:
Paul Kienzle <pkienzle@…>
Branches:
master, magnetic_scatt, release-4.2.2, ticket-1009, ticket-1094-headless, ticket-1242-2d-resolution, ticket-1243, ticket-1249, ticket885, unittest-saveload
Children:
237f35e
Parents:
f0ce6e2
Message:

tinycc support in setup (sldi branch)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • setup.py

    raab23e3 r1a3602d  
    1818from setuptools import Extension, setup 
    1919 
    20 if os.name == 'nt': 
    21     try: 
    22         import tinycc 
    23     except ImportError: 
    24         os.path.insert(os.path.insert(0, '..', 'tinycc')) 
    25         import tinycc 
    26     use_tinycc = True 
    27     sys.argv.append('--compiler=mingw32') 
    28     print(tinycc.TCC) 
    29 else: 
    30     use_tinycc = False 
     20try: 
     21    import tinycc.distutils 
     22except ImportError: 
     23    pass 
    3124 
    3225# Manage version number ###################################### 
     
    147140class build_ext_subclass(build_ext): 
    148141    def build_extensions(self): 
    149         if use_tinycc: 
    150             # Note: no -O option because not an optimizer 
    151             self.compiler.set_executables( 
    152                 #archiver = ['ar', '-cr'], 
    153                 compiler=[tinycc.TCC, '-DMS_WIN64', '-D__TINYCC__', '-Wall'], 
    154                 #compiler_cxx=['g__', '-DMS_WIN64', '-Wall'],  # tinycc is not a C++ compiler 
    155                 compiler_so=[tinycc.TCC, '-DMS_WIN64', '-D__TINYCC__', '-Wall'],  # and '-c'?? 
    156                 #dll_libraries=['msvcr90'], 
    157                 linker_exe=[tinycc.TCC, '-DMS_WIN64'], 
    158                 linker_so=[tinycc.TCC, '-DMS_WIN64', '-shared'], 
    159                 #linker_dll=tinycc.TCC, 
    160             ) 
    161             sysroot = os.path.dirname(os.path.realpath(sys.executable)) 
    162             self.compiler.include_dirs = [os.path.join(sysroot, 'include')] 
    163             self.compiler.library_dirs = [sysroot] 
    164142        # Get 64-bitness 
    165143        c = self.compiler.compiler_type 
Note: See TracChangeset for help on using the changeset viewer.