Changeset 6dba2f0 in sasmodels for sasmodels/core.py


Ignore:
Timestamp:
Jan 27, 2018 9:00:07 PM (6 years ago)
Author:
Paul Kienzle <pkienzle@…>
Branches:
master, core_shell_microgels, magnetic_model, ticket-1257-vesicle-product, ticket_1156, ticket_1265_superball, ticket_822_more_unit_tests
Children:
e59f60a
Parents:
2ab1bac
Message:

py.test needs kernelcl import to succeed even if pyopencl is not available

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sasmodels/core.py

    ra69d8cd r6dba2f0  
    2121from . import mixture 
    2222from . import kernelpy 
     23from . import kernelcl 
    2324from . import kerneldll 
    2425from . import custom 
    2526 
    26 if os.environ.get("SAS_OPENCL", "").lower() == "none": 
    27     HAVE_OPENCL = False 
    28 else: 
    29     try: 
    30         from . import kernelcl 
    31         HAVE_OPENCL = True 
    32     except Exception: 
    33         HAVE_OPENCL = False 
     27# Other modules look for HAVE_OPENCL in core, not in kernelcl. 
     28HAVE_OPENCL = kernelcl.HAVE_OPENCL 
    3429 
    3530CUSTOM_MODEL_PATH = os.environ.get('SAS_MODELPATH', "") 
Note: See TracChangeset for help on using the changeset viewer.