
    c                     P   d Z ddlZddlZddlZddlZddlmZ ej                            ej        	                    ej        
                    e                              Zej                            dd          ej                            ed          edgZdej        fdZdS )	zY
finder.py
------------

Locate `libspatialindex` shared library by any means necessary.
    N)find_librarySPATIALINDEX_C_LIBRARYlib returnc                  (   t           j        dk    rdt          j                    d         v rd} nd} d|  d}t           j                            t           j                            t          j        d                    sdt          j	        v rCt                              t           j                            t          j        d	d
                     t           j                            dd                                                              d          }t          D ]}|rt           j                            |          s$d                    ||g          t           j        d<   	 t           j                            t           j                            ||                    }|||t           j        d<   c S n4# t&          $ r Y n(t(          $ r}t+          d|           Y d}~nd}~ww xY w|t           j        d<   # |t           j        d<   w xY wt'          d|           t           j        dk    rt          j                    dk    rd}nd}t          j                    }t          D ]X}|t           j                            |          r#|}t           j                            ||          }nHt           j                            |          r(t           j                            |          d         }|}nt           j                            |          s	 t          j        |           t           j                            |          }||t          j        |           c S n,# t(          $ r}t+          d| d|           Y d}~nd}~ww xY wt          j        |           A# t          j        |           w xY w	 t9          d          }|t           j                            |          S n# t(          $ r Y nw xY wt'          d          )zTLoad the `libspatialindex` shared library.

    :returns: Loaded shared library
    nt64r   32zspatialindex_c-z.dllz
conda-metacondaLibrarybinPATHr   ;Nzrtree.finder unexpected error: zcould not find or load posixDarwinzlibspatialindex_c.dylibzlibspatialindex_c.sozrtree.finder (z) unexpected error: spatialindex_cz(Could not load libspatialindex_c library)osnameplatformarchitecturepathexistsjoinsysprefixversion_candidatesappendenvirongetstriprstripctypescdllLoadLibraryOSErrorBaseExceptionprintsystemgetcwdisdirisfilesplitchdirr   )	archlib_nameoldenvr   rtEcwdcandtargets	            ,lib/python3.11/site-packages/rtree/finder.pyloadr9      s!   
 
w$ L8(**1-- 	DDD/T/// GNN27<<
LAABB	K#+%	K rw||CJ	5IIJJJ ++1133::3?? 	, 	,D rw~~d33  "%4.!9!9BJv	,[,,RW\\$-I-IJJ  &,
6""""     ? ? ?===>>>>>>>>? &,
6""V
6"++++:::;;;	G	 ( ?( 	.0HH .H ikk 	 	D t$$ 	dH55%% w}}T**1-7>>&)) 
[,,V44    J J JHvHH1HHIIIIIIIIJ ,-- 	1;**4000	1     <
=
==s   %A F87G<8
G)G<	G)G$G<$G))G<<H6M('N*(
N2NN*NN**O /O5 5
PP)__doc__r$   r   r   r   ctypes.utilr   r   abspath
expanduserdirname__file___cwdr    r!   r   r   CDLLr9        r8   <module>rD      s      				  



 $ $ $ $ $ $ 
wrw))"'//(*C*CDDEE
 JNN+T22GLLu	\>fk \> \> \> \> \> \>rC   