Changeset 33af590 in sasmodels


Ignore:
Timestamp:
May 20, 2016 11:43:37 AM (9 years ago)
Author:
Paul Kienzle <pkienzle@…>
Branches:
master, core_shell_microgels, costrafo411, magnetic_model, release_v0.94, release_v0.95, ticket-1257-vesicle-product, ticket_1156, ticket_1265_superball, ticket_822_more_unit_tests
Children:
5efe850
Parents:
88b92e1
Message:

monkey patch pyopencl so that include path is quoted appropriately

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sasmodels/kernelcl.py

    r88b92e1 r33af590  
    6262    raise RuntimeError("OpenCL not available") 
    6363 
    64 # CRUFT: pyopencl as of June 2016 needs quotes around include path 
     64# CRUFT: pyopencl < 2017.1  (as of June 2016 needs quotes around include path) 
    6565def _quote_path(v): 
    66     return '"'+v+'"' if ' ' in v and not v.startswith('-') else v 
     66    """ 
     67    Quote the path if it is not already quoted. 
     68 
     69    If v starts with '-', then assume that it is a -I option or similar 
     70    and do not quote it.  This is fragile:  -Ipath with space needs to 
     71    be quoted. 
     72    """ 
     73    return '"'+v+'"' if v and ' ' in v and not v[0] in "\"'-" else v 
    6774 
    6875if hasattr(cl, '_DEFAULT_INCLUDE_OPTIONS'): 
Note: See TracChangeset for help on using the changeset viewer.