Changes in setup.py [785cc657:899e084] in sasview


Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • setup.py

    r785cc657 r899e084  
    1111 
    1212# Manage version number ###################################### 
    13 import sasview 
    14 VERSION = sasview.__version__ 
     13with open(os.path.join("src", "sas", "sasview", "__init__.py")) as fid: 
     14    for line in fid: 
     15        if line.startswith('__version__'): 
     16            VERSION = line.split('"')[1] 
     17            break 
     18    else: 
     19        raise ValueError("Could not find version in src/sas/sasview/__init__.py") 
    1520############################################################## 
    1621 
     
    5156    #             file_path =  os.path.join(f_path, f) 
    5257    #             os.remove(file_path) 
    53     if os.path.exists(SASVIEW_BUILD): 
    54         print "Removing existing build directory", SASVIEW_BUILD, "for a clean build" 
    55         shutil.rmtree(SASVIEW_BUILD) 
     58 
     59if os.path.exists(SASVIEW_BUILD): 
     60    print "Removing existing build directory", SASVIEW_BUILD, "for a clean build" 
     61    shutil.rmtree(SASVIEW_BUILD) 
    5662                     
    5763# 'sys.maxsize' and 64bit: Not supported for python2.5 
    58 is_64bits = False 
    59 if sys.version_info >= (2, 6): 
    60     is_64bits = sys.maxsize > 2**32 
    61      
     64is_64bits = sys.maxsize > 2**32 
    6265enable_openmp = False 
    6366 
     
    287290 
    288291# SasView 
    289 package_dir["sas.sasview"] = "sasview" 
    290292package_data['sas.sasview'] = ['images/*', 
    291293                               'media/*', 
     
    334336    zip_safe = False, 
    335337    entry_points = { 
    336                     'console_scripts':[ 
    337                                        "sasview = sas.sasview.sasview:run", 
    338                                        ] 
    339                     }, 
    340     cmdclass = {'build_ext': build_ext_subclass, 
    341                 'docs': BuildSphinxCommand, 
    342                 'disable_openmp': DisableOpenMPCommand} 
     338        'console_scripts': ["sasview = sas.sasview.sasview:run_cli"] 
     339        }, 
     340    cmdclass = { 
     341        'build_ext': build_ext_subclass, 
     342        'docs': BuildSphinxCommand, 
     343        'disable_openmp': DisableOpenMPCommand, 
     344        } 
    343345    )    
Note: See TracChangeset for help on using the changeset viewer.