o
    koi                     @  s   d dl mZ d dlZd dlZd dlZd dlZd dlZddlmZ ddl	m
Z
mZmZ dejv r6d dlmZ ndejv rFed	ZdddZndddZdddZdddZedkr^e  dS dS )    )annotationsN   )__version__)get_cmake_dirget_includeget_pkgconfig_dirposixquotentz[ 	
]sstrreturnc                 C  s4   | r	t | s	| S | drd|  dS d|  dS )N\"z\")UNSAFEsearchendswithr    r   E/home/ubuntu/.local/lib/python3.10/site-packages/pybind11/__main__.pyr
      s   "r
   c                 C  s   | S )Nr   r   r   r   r   r
       s   Nonec                  C  sX   t dt dt g} g }| D ]}|r||vr|| qtddd |D  d S )Nincludeplatinclude c                 s  s    | ]
}t d | V  qdS )z-INr	   ).0dr   r   r   	<genexpr>1   s    z!print_includes.<locals>.<genexpr>)	sysconfigget_pathr   appendprintjoin)dirsunique_dirsr   r   r   r   print_includes$   s   
r%   c                  C  s   t jtjdd} tjdkrt j| ddd} |  }|jddtdd	 |jd
ddd |jdddd |jdddd |jdddd | }tj	dd  sP|
  |jrVt  |jr`ttt  |jrjttt  |jrvttd d S d S )NF)allow_abbrev)      T)colorsuggest_on_errorz	--versionversionzPrint the version and exit.)actionr+   helpz
--includes
store_truez3Include flags for both pybind11 and Python headers.)r,   r-   z
--cmakedirzMPrint the CMake module directory, ideal for setting -Dpybind11_ROOT in CMake.z--pkgconfigdirzBPrint the pkgconfig directory, ideal for setting $PKG_CONFIG_PATH.z--extension-suffixz'Print the extension for a Python moduler   
EXT_SUFFIX)	functoolspartialargparseArgumentParsersysversion_infoadd_argumentr   
parse_argsargv
print_helpincludesr%   cmakedirr!   r
   r   pkgconfigdirr   extension_suffixr   get_config_var)make_parserparserargsr   r   r   main4   sT   
rB   __main__)r   r   r   r   )r   r   )
__future__r   r2   r0   rer4   r   _versionr   commandsr   r   r   builtin_module_namesshlexr
   compiler   r%   rB   __name__r   r   r   r   <module>   s&   



	

,
