Changeset 0d7da2a in sasview for setup.py


Ignore:
Timestamp:
Nov 29, 2011 4:33:11 PM (12 years ago)
Author:
Mathieu Doucet <doucetm@…>
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:
f489b9d
Parents:
a1968c4
Message:

Re #5 fixing windows build

File:
1 edited

Legend:

Unmodified
Added
Removed
  • setup.py

    r663bd0e r0d7da2a  
    77#from distutils.core import setup, Extension 
    88from setuptools import setup, Extension, find_packages 
    9 try: 
    10     from numpy.distutils.misc_util import get_numpy_include_dirs 
    11     NUMPY_INC = get_numpy_include_dirs()[0] 
    12 except: 
     9 
     10if sys.platform is not 'win32': 
    1311    try: 
    14         import numpy 
    15         NUMPY_INC = os.path.join(os.path.split(numpy.__file__)[0],"core","include") 
     12        from numpy.distutils.misc_util import get_numpy_include_dirs 
     13        NUMPY_INC = get_numpy_include_dirs()[0] 
    1614    except: 
    17         print "\nNumpy is needed to build SansView. Try easy_install numpy.\n  %s" % str(sys.exc_value) 
    18         sys.exit(0) 
     15        try: 
     16            import numpy 
     17            NUMPY_INC = os.path.join(os.path.split(numpy.__file__)[0],"core","include") 
     18        except: 
     19            print "\nNumpy is needed to build SansView. Try easy_install numpy.\n  %s" % str(sys.exc_value) 
     20            sys.exit(0) 
     21else: 
     22    v_info = sys.version_info 
     23    NUMPY_INC = os.path.join("C:\\python%1g%1g\\Lib\\site-packages\\numpy\\core\\include" % (v_info[0], v_info[1])) 
    1924 
    2025package_dir = {} 
     
    6469            os.path.join(srcdir, "invertor.c"), 
    6570            ], 
    66          include_dirs=[numpy_incl_path] 
     71         include_dirs=[numpy_incl_path], 
     72         undef_opts=['mno-cygwin'] 
    6773 ) ) 
    6874         
Note: See TracChangeset for help on using the changeset viewer.