OwlCyberSecurity - MANAGER
Edit File: libgeos.cpython-39.pyc
a ���e{ � @ s8 d Z ddlZddlZddlmZmZmZmZmZ ddl m Z ddlmZ ddl mZmZ ddlmZ e�d�Zd d � Zedee�Zdd� Zee�Zedee�Zd d� Zee�ZG dd� de�ZG dd� de�ZG dd� de�ZG dd� de�Zee�Zee�Zee�Zee�Z ee�Z!G dd� d�Z"dd� Z#dd� Z$dS )a This module houses the ctypes initialization procedures, as well as the notice and error handler function callbacks (get called when an error occurs in GEOS). This module also houses GEOS Pointer utilities, including get_pointer_arr(), and GEOM_PTR. � N)�CDLL� CFUNCTYPE�POINTER� Structure�c_char_p)�find_library)�ImproperlyConfigured)�SimpleLazyObject�cached_property)�get_version_tuplezdjango.contrib.gisc C s� zddl m} | j}W n ttttfy4 d }Y n0 |r@d }n6tjdkrTddg}n"tjdkrhddg}ntdtj ��|r�|D ]}t |�}|d ur~ q�q~|d u r�td d � |� ��t|�}t|j _tg|j_t|j_|S )Nr )�settings�ntZgeos_czlibgeos_c-1�posixZGEOSzUnsupported OS "%s"z]Could not find the GEOS library (tried "%s"). Try setting GEOS_LIBRARY_PATH in your settings.z", ")Zdjango.confr ZGEOS_LIBRARY_PATH�AttributeError�ImportErrorr �OSError�os�namer �joinr �CONTEXT_PTRZ initGEOS_r�restypeZfinishGEOS_r�argtypesr �GEOSversion)r Zlib_pathZ lib_namesZlib_nameZ_lgeos� r �`/home/gouroczh/virtualenv/pat/3.9/lib/python3.9/site-packages/django/contrib/gis/geos/libgeos.py� load_geos s8 �� r c C sF | � � |� � } }z| | }W n ty4 | }Y n0 t�d|� d S )NzGEOS_NOTICE: %s )�decode� TypeError�logger�warning)�fmt�lstZwarn_msgr r r �notice_hO s r"