Changeset f3bf622 in sasview for setup.py


Ignore:
Timestamp:
Apr 6, 2017 8:15:08 PM (7 years ago)
Author:
andyfaff
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.2.2, ticket-1009, ticket-1094-headless, ticket-1242-2d-resolution, ticket-1243, ticket-1249, ticket885, unittest-saveload
Children:
6435594
Parents:
ec8886e
Message:

MAINT: remove has_key occurences

File:
1 edited

Legend:

Unmodified
Added
Removed
  • setup.py

    red2276f rf3bf622  
    5353    #             os.remove(file_path) 
    5454    if os.path.exists(SASVIEW_BUILD): 
    55         print "Removing existing build directory", SASVIEW_BUILD, "for a clean build" 
     55        print("Removing existing build directory", SASVIEW_BUILD, "for a clean build") 
    5656        shutil.rmtree(SASVIEW_BUILD) 
    5757 
     
    7474                enable_openmp = False 
    7575        except: 
    76             print "PROBLEM determining Darwin version" 
     76            print("PROBLEM determining Darwin version") 
    7777 
    7878# Options to enable OpenMP 
     
    9595            platform_copt = {'unix' : ['-Wno-error=unused-command-line-argument-hard-error-in-future']} 
    9696    except: 
    97         print "PROBLEM determining Darwin version" 
     97        print("PROBLEM determining Darwin version") 
    9898 
    9999class DisableOpenMPCommand(Command): 
     
    118118        # Get 64-bitness 
    119119        c = self.compiler.compiler_type 
    120         print "Compiling with %s (64bit=%s)" % (c, str(is_64bits)) 
     120        print("Compiling with %s (64bit=%s)" % (c, str(is_64bits))) 
    121121 
    122122        # OpenMP build options 
    123123        if enable_openmp: 
    124             if copt.has_key(c): 
     124            if c in copt: 
    125125                for e in self.extensions: 
    126126                    e.extra_compile_args = copt[ c ] 
    127             if lopt.has_key(c): 
     127            if c in lopt: 
    128128                for e in self.extensions: 
    129129                    e.extra_link_args = lopt[ c ] 
    130130 
    131131        # Platform-specific build options 
    132         if platform_lopt.has_key(c): 
     132        if c in platform_lopt: 
    133133            for e in self.extensions: 
    134134                e.extra_link_args = platform_lopt[ c ] 
    135135 
    136         if platform_copt.has_key(c): 
     136        if c in platform_copt: 
    137137            for e in self.extensions: 
    138138                e.extra_compile_args = platform_copt[ c ] 
Note: See TracChangeset for help on using the changeset viewer.