Changeset 1065

Show
Ignore:
Timestamp:
04/01/08 13:28:34
Author:
seang
Message:

Treat GEOS as unsafe. Load using PyDLL so that the GIL is not released (#158)

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • Shapely/trunk/CHANGES.txt

    r1052 r1065  
    11All ticket numbers are rooted at http://trac.gispython.org/projects/PCL/ticket/ 
    22 
    3 1.0.2: 26 February 2008 
    4 ----------------------- 
     31.0.3 (2008-04-01) 
     4------------------ 
     5- Do not release GIL when calling GEOS functions (#158). 
     6 
     71.0.2 (2008-02-26) 
     8------------------ 
    59- Fix loss of dimensionality in polygon rings (#155). 
    6  
    7  
  • Shapely/trunk/setup.py

    r1052 r1065  
    1212 
    1313setup(name          = 'Shapely', 
    14       version       = '1.0.2', 
     14      version       = '1.0.3', 
    1515      description   = 'Geospatial geometries, predicates, and operations', 
    1616      license       = 'BSD', 
  • Shapely/trunk/setup_windows.py

    r1052 r1065  
    1212 
    1313setup(name          = 'Shapely', 
    14       version       = '1.0.2', 
     14      version       = '1.0.3', 
    1515      description   = 'Geospatial geometries, predicates, and operations', 
    1616      license       = 'BSD', 
  • Shapely/trunk/shapely/geos.py

    r1048 r1065  
    44 
    55import atexit 
    6 from ctypes import cdll, CDLL, CFUNCTYPE, c_char_p 
     6from ctypes import cdll, CDLL, pydll, PyDLL, CFUNCTYPE, c_char_p 
    77from ctypes.util import find_library 
    88import os 
     
    1616        original_path = os.environ['PATH'] 
    1717        os.environ['PATH'] = "%s;%s" % (local_dlls, original_path) 
    18         lgeos = CDLL("geos.dll") 
     18        lgeos = PyDLL("geos.dll") 
    1919    except (ImportError, WindowsError): 
    2020        raise 
     
    3939            else: 
    4040                raise ImportError, "Could not find geos_c library" 
    41     lgeos = CDLL(lib) 
     41    lgeos = PyDLL(lib) 
    4242    free = CDLL(find_library('libc')).free 
    4343else: 
    4444    # Try the major versioned name first, falling back on the unversioned name. 
    4545    try: 
    46         lgeos = CDLL('libgeos_c.so.1') 
     46        lgeos = PyDLL('libgeos_c.so.1') 
    4747    except (OSError, ImportError): 
    48         lgeos = CDLL('libgeos_c.so') 
     48        lgeos = PyDLL('libgeos_c.so') 
    4949    except: 
    5050        raise