Changeset 5972029 in sasview


Ignore:
Timestamp:
Feb 12, 2015 8:38:12 AM (6 years ago)
Author:
Peter Parker
Branches:
master, ESS_GUI, ESS_GUI_Docs, ESS_GUI_batch_fitting, ESS_GUI_bumps_abstraction, ESS_GUI_iss1116, ESS_GUI_iss879, ESS_GUI_iss959, ESS_GUI_opencl, ESS_GUI_ordering, ESS_GUI_sync_sascalc, costrafo411, magnetic_scatt, release-4.1.1, release-4.1.2, release-4.2.2, release_4.0.1, ticket-1009, ticket-1094-headless, ticket-1242-2d-resolution, ticket-1243, ticket-1249, ticket885, unittest-saveload
Children:
8934fef
Parents:
f3efa09
Message:

Allow proper disabling of OpenMP so that we can build using Anaconda.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • setup.py

    rb44da61 r5972029  
    6868    is_64bits = sys.maxsize > 2**32 
    6969     
    70 enable_openmp = False if "--disable-open-mp" in sys.argv else True 
     70enable_openmp = True 
    7171 
    7272if sys.platform =='darwin': 
     
    104104        print "PROBLEM determining Darwin version" 
    105105 
    106  
     106class DisableOpenMPCommand(Command): 
     107    description = "The version of MinGW that comes with Anaconda does not come with OpenMP :( "\ 
     108                  "This commands means we can turn off compiling with OpenMP for this or any "\ 
     109                  "other reason." 
     110    user_options = [] 
     111 
     112    def initialize_options(self): 
     113        self.cwd = None 
     114 
     115    def finalize_options(self): 
     116        self.cwd = os.getcwd() 
     117        global enable_openmp 
     118        enable_openmp = False 
     119 
     120    def run(self): 
     121        pass 
    107122 
    108123class build_ext_subclass( build_ext ): 
     
    386401                    }, 
    387402    cmdclass = {'build_ext': build_ext_subclass, 
    388                 'docs': BuildSphinxCommand} 
     403                'docs': BuildSphinxCommand, 
     404                'disable_openmp': DisableOpenMPCommand} 
    389405    )    
Note: See TracChangeset for help on using the changeset viewer.