Changeset 3371d81 in sasview for setup.py


Ignore:
Timestamp:
May 9, 2016 4:59:33 AM (8 years ago)
Author:
wojciech
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:
aa4a549
Parents:
aff7904 (diff), 1d5f5c2 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

setup.py fixed. Merged with Master

File:
1 edited

Legend:

Unmodified
Added
Removed
  • setup.py

    raff7904 r3371d81  
    99from distutils.command.build_ext import build_ext 
    1010from distutils.core import Command 
    11 from shutil import rmtree 
    12  
    13 try: 
    14     from numpy.distutils.misc_util import get_numpy_include_dirs 
    15     NUMPY_INC = get_numpy_include_dirs()[0] 
    16 except: 
    17     try: 
    18         import numpy 
    19         NUMPY_INC = os.path.join(os.path.split(numpy.__file__)[0],  
    20                                  "core","include") 
    21     except: 
    22         msg = "\nNumpy is needed to build SasView. " 
    23         print msg, "Try easy_install numpy.\n  %s" % str(sys.exc_value) 
    24         sys.exit(0) 
    2511 
    2612# Manage version number ###################################### 
     
    204190 
    205191# sas.sascalc.calculator 
    206 numpy_incl_path = os.path.join(NUMPY_INC, "numpy") 
    207192gen_dir = os.path.join("src", "sas", "sascalc", "calculator", "c_extensions") 
    208193package_dir["sas.sascalc.calculator.core"] = gen_dir 
     
    215200            os.path.join(gen_dir, "libfunc.c"), 
    216201            os.path.join(gen_dir, "librefl.c"), 
    217             os.path.join(gen_dir, "winFuncs.c"), 
    218202        ], 
    219         include_dirs=[numpy_incl_path, gen_dir], 
     203        include_dirs=[gen_dir], 
    220204    ) 
    221205) 
     
    231215                                         os.path.join(srcdir, "invertor.c"), 
    232216                                         ], 
    233                               include_dirs=[numpy_incl_path], 
     217                              include_dirs=[], 
    234218                              ) ) 
    235219         
     
    267251# package_dir["sas.models"] = os.path.join("src", "sas", "models") 
    268252# packages.append("sas.models") 
    269  
    270 IGNORED_FILES = [".svn"] 
    271 if not os.name=='nt': 
    272     IGNORED_FILES.extend(["gamma_win.c","winFuncs.c"]) 
    273253 
    274254EXTENSIONS = [".c", ".cpp"] 
     
    281261        if os.path.isfile(os.path.join(dir_path, f)): 
    282262            _, ext = os.path.splitext(f) 
    283             if ext.lower() in EXTENSIONS and f not in IGNORED_FILES: 
     263            if ext.lower() in EXTENSIONS: 
    284264                file_list.append(os.path.join(dir_path, f)) 
    285265        elif os.path.isdir(os.path.join(dir_path, f)) and \ 
     
    289269                if os.path.isfile(os.path.join(sub_dir, new_f)): 
    290270                    _, ext = os.path.splitext(new_f) 
    291                     if ext.lower() in EXTENSIONS and\ 
    292                          new_f not in IGNORED_FILES: 
     271                    if ext.lower() in EXTENSIONS: 
    293272                        file_list.append(os.path.join(sub_dir, new_f)) 
    294273 
     
    334313    required.extend(['html5lib', 'reportlab']) 
    335314else: 
    336     required.extend(['pil']) 
     315    # 'pil' is now called 'pillow' 
     316    required.extend(['pillow']) 
    337317 
    338318# Set up SasView     
Note: See TracChangeset for help on using the changeset viewer.