§
    öÛgL  ã                   ó   — d Z ddlZddlZddlmZmZmZ ddlm	Z	m
Z
 dZg d¢Zg d¢Zd	d
ej                             ddd¦  «        giiZdgdgdœZ	 e�e                     d¦  «        dd…         Zne                     d¦  «        dd…         Zn# e$ r dgZY nw xY weefddddde	gfd„Zeef	 d#d„Zeef	 d$d„Zdefd „Z G d!„ d"e
¦  «        ZdS )%a§  
Python distutils data provisions module.

For sub-packagers, the `prefixed_packages` and `prefixed_extensions` functions
should be of particular interest. If the distribution including ``py-postgresql``
uses the standard layout, chances are that `prefixed_extensions` and
`prefixed_packages` will supply the appropriate information by default as they
use `default_prefix` which is derived from the module's `__package__`.
é    Né   )ÚversionÚnameÚidentity)Ú	ExtensionÚCommandaè  
py-postgresql is a set of Python modules providing interfaces to various parts
of PostgreSQL. Notably, it provides a pure-Python driver + C optimizations for
querying a PostgreSQL database.

http://python.projects.postgresql.org

Features:

 * Prepared Statement driven interfaces.
 * Cluster tools for creating and controlling a cluster.
 * Support for most PostgreSQL types: composites, arrays, numeric, lots more.
 * COPY support.

Sample PG-API Code::

	>>> import postgresql
	>>> db = postgresql.open('pq://user:password@host:port/database')
	>>> db.execute("CREATE TABLE emp (emp_first_name text, emp_last_name text, emp_salary numeric)")
	>>> make_emp = db.prepare("INSERT INTO emp VALUES ($1, $2, $3)")
	>>> make_emp("John", "Doe", "75,322")
	>>> with db.xact():
	...  make_emp("Jane", "Doe", "75,322")
	...  make_emp("Edward", "Johnson", "82,744")
	...

There is a DB-API 2.0 module as well::

	postgresql.driver.dbapi20

However, PG-API is recommended as it provides greater utility.

Once installed, try out the ``pg_python`` console script::

	$ python3 -m postgresql.bin.pg_python -h localhost -p port -U theuser -d database_name

If a successful connection is made to the remote host, it will provide a Python
console with the database connection bound to the `db` name.


History
-------

py-postgresql is not yet another PostgreSQL driver, it's been in development for
years. py-postgresql is the Python 3 port of the ``pg_proboscis`` driver and
integration of the other ``pg/python`` projects.
)z+Development Status :: 5 - Production/StablezIntended Audience :: Developersz&License :: OSI Approved :: BSD Licensez&License :: OSI Approved :: MIT Licensez8License :: OSI Approved :: Attribution Assurance Licensez=License :: OSI Approved :: Python Software Foundation LicensezNatural Language :: Englishz"Operating System :: OS IndependentzProgramming Language :: Pythonz#Programming Language :: Python :: 3zTopic :: Database)ÚbinÚ	encodingsÚlibÚprotocolÚdriverÚtestÚdocumentationÚpythonÚportÚreleaseÚresolvedÚtypesztypes.iozport.optimizedÚsourcesr   Ú
_optimizedzmodule.cz*.sqlz*.txt)r   r   ú.éÿÿÿÿéþÿÿÿÚ
postgresqlÚprefixzprefix to prepend to pathsÚextensions_dataz`extensions_data`Úreturnc           	   #   ó4  ‡K  — d                      | ¦  «        dz   }t          j        j                              | ¦  «        Š|                     ¦   «         D ]C\  }}t          ||z   ˆfd„|d         D ¦   «         |                     dd¦  «        d¬¦  «        V — ŒDdS )	z<
	Generator producing the `distutils` `Extension` objects.
	r   c                 óP   •— g | ]"}t           j                             ‰|¦  «        ‘Œ#S © )ÚosÚpathÚjoin)Ú.0ÚsrcÚpath_prefixs     €úR/granary/edev/quantum/lib/python3.11/site-packages/postgresql/release/distutils.pyú
<listcomp>z'prefixed_extensions.<locals>.<listcomp>€   s)   ø€ Ð>Ð>Ð> s…B„G‡L‚L�˜cÑ"Ô"Ð>Ð>Ð>ó    r   Ú	librariesr    T)r*   ÚoptionalN)r#   r!   r"   ÚsepÚitemsr   Úget)r   r   Ú
pkg_prefixÚmodÚdatar&   s        @r'   Úprefixed_extensionsr2   t   s¼   øè è € ð �hŠh�vÑÔ Ñ$€ÝŒwŒ{×Ò Ñ'Ô'€Ø!×'Ò'Ñ)Ô)ð ð �Y€Sˆ$ÝØ�ÑØ>Ð>Ð>Ð>¨d°9¬oÐ>Ñ>Ô>Ø�xŠx˜ RÑ(Ô(Øð		ñ 	ô 	ð ð ð ð ðð r)   ú!prefix to prepend to source pathsc              #   ó^   K  — d                      | ¦  «        } | V — | dz   } |D ]	}| |z   V — Œ
dS ©zK
	Generator producing the standard `package` list prefixed with `prefix`.
	r   N)r#   )r   ÚpackagesÚpkgs      r'   Úprefixed_packagesr8   …   sW   è è € ð �(Š(�6Ñ
Ô
€Ø€€€Ø
�3‰,€Øð ð €SØ�‰ÐÐÐÐðð r)   ú*prefix to prepend to dictionary keys pathsc              #   ó„   K  — d                      | ¦  «        } | dz   } |                     ¦   «         D ]\  }}| |z   |fV — ŒdS r5   )r#   r-   )r   Úpackage_datar7   r1   s       r'   Úprefixed_package_datar<   ’   sc   è è € ð �(Š(�6Ñ
Ô
€Ø
�3‰,€Ø×$Ò$Ñ&Ô&ð ð �Y€Sˆ$Ø�‰�dÐÐÐÐÐðð r)   Tc                 ó.  — t           t          dt          ddddt          t          t          t          |¬¦  «        ¦  «        t          t          |¬¦  «        ¦  «        t          t          ¬¦  «        dœ}| r t          t          |¬¦  «        ¦  «        |d<   |S )	z+
	Used by the py-postgresql distribution.
	z$PostgreSQL driver and tools library.zJames William Pyez
x@jwp.namezpython-general@pgfoundry.org)r   )r   )r   r   ÚdescriptionÚlong_descriptionÚauthorÚauthor_emailÚ
maintainerÚmaintainer_emailÚurlÚclassifiersr6   r;   ÚcmdclassÚext_modules)r   r   ÚLONG_DESCRIPTIONrD   ÚCLASSIFIERSÚlistr8   Údictr<   ÚTestCommandr2   )Úbuild_extensionsr   Úds      r'   Ústandard_setup_keywordsrO   ž   s˜   € õ
 ÝØ8Ý'Ø ØØ$Ø5Ý
ÝÝÕ%¨vÐ6Ñ6Ô6Ñ7Ô7ÝÕ-°vÐ>Ñ>Ô>Ñ?Ô?Ý�Ð$Ñ$Ô$ðð €ð ð @ÝÕ-°vÐ>Ñ>Ô>Ñ?Ô?€!€MÑØ	€r)   c                   ó(   — e Zd ZdZg Zd„ Zd„ Zd„ ZdS )rL   z	run testsc                 ó   — d S ©Nr    ©Úselfs    r'   Úinitialize_optionszTestCommand.initialize_options¼   ó   € Ø€$r)   c                 ó   — d S rR   r    rS   s    r'   Úfinalize_optionszTestCommand.finalize_options¿   rV   r)   c                 ó<   — dd l }|                     dd¬¦  «         d S )Nr   zpostgresql.test.testall)zsetup.py)ÚmoduleÚargv)ÚunittestÚmain)rT   r\   s     r'   ÚrunzTestCommand.runÂ   s(   € Ø€/€/€/Ø
‡-‚-Ð0°}€-ÑEÔEÐEÐEÐEr)   N)Ú__name__Ú
__module__Ú__qualname__r>   Úuser_optionsrU   rX   r^   r    r)   r'   rL   rL   µ   sR   € € € € € Ø€ð €ðð ð ðð ð ðFð Fð Fð Fð Fr)   rL   )r   r3   )r   r9   )Ú__doc__Úsysr!   Úprojectr   r   r   rD   Údistutils.corer   r   rH   rI   Úsubpackagesr"   r#   r   Úsubpackage_dataÚ__package__ÚsplitÚdefault_prefixr_   Ú	NameErrorr2   r8   r<   rO   rL   r    r)   r'   ú<module>rm      s  ððð ð €
€
€
Ø 	€	€	€	Ø 4Ð 4Ð 4Ð 4Ð 4Ð 4Ð 4Ð 4Ð 4Ð 4Ø -Ð -Ð -Ð -Ð -Ð -Ð -Ð -ð.Ð ð`ð ð €ðð ð €ð" ØˆrŒw�|Š|˜F L°*Ñ=Ô=Ð>ðð€ð ˆØ�9ðð €ð
!àÐØ×$Ò$ SÑ)Ô)¨#¨2¨#Ô.€.€.à—>’> #Ñ&Ô& s¨ sÔ+€.øøØð !ð !ð !Ø�.€€€ð!øøøð *8Ø)8ðð Ø
&ðà&ðð €[ðð ð ð ð$ 1?ØðØ
-ðð ð ð ð :HØð
Ø
6ð
ð 
ð 
ð 
ð 04¸nð 
ð 
ð 
ð 
ð.Fð Fð Fð Fð F�'ñ Fô Fð Fð Fð Fs   Á=B ÂBÂB