%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /proc/self/root/opt/alt/python27/lib64/python2.7/site-packages/numpy/distutils/
Upload File :
Create Path :
Current File : //proc/self/root/opt/alt/python27/lib64/python2.7/site-packages/numpy/distutils/npy_pkg_config.pyo

�
�9Zc@`sPddlmZmZmZddlZddlZddlZejddkrlddlm	Z	m
Z
nddlm	Z	m
Z
ddddd	d
gZej
d�Zdefd��YZdefd
��YZd�Zd�Zdefd��YZdefd��YZd�Zd�Zd�Zd�Zdd�Zdd�ZiZdd�Ze dkrLddlZddl!m"Z"ddl#Z#e"�Z$e$j%dddddd d!�e$j%d"dd#ddd d$�e$j%d%dd&d d'�e$j%d(dd)ddd d*�e$j%d+dd,d d-�e$j%d.dd/ddd d-�e$j%d0dd1d d2�e$j&ej'�\Z(Z)e*e)�d3kr�e+d4��ne(j,r�e#j#d5�Z-x=e-D]2Z.ee.�Z/e0d6e/j1e/j1e/j2f�q�Wne)d7Z3ddlZej4j5d8�Z6e6r?ee3d9d:e6g�Z/nee3d9d:g�Z/e(j7rie(j7Z7nd;Z7e(j8r�ej9d<e(j8�Z:e:s�e+d=��ne:j;d7�Z1e:j;d3�Z<e<e/j=e1<ne(j>r�e0e/j>e7��ne(j?re0e/j?e7��ne(j@r'e0e/j@�ne(jArLe0e/j@e(jAk�qLndS(>i(tdivisiontabsolute_importtprint_functionNi(tRawConfigParsert
NoOptionErrortFormatErrortPkgNotFoundtLibraryInfotVariableSettread_configtparse_flagss\$\{([a-zA-Z0-9_-]+)\}cB`s eZdZd�Zd�ZRS(sQ
    Exception thrown when there is a problem parsing a configuration file.

    cC`s
||_dS(N(tmsg(tselfR((sQ/opt/alt/python27/lib64/python2.7/site-packages/numpy/distutils/npy_pkg_config.pyt__init__scC`s|jS(N(R(R((sQ/opt/alt/python27/lib64/python2.7/site-packages/numpy/distutils/npy_pkg_config.pyt__str__s(t__name__t
__module__t__doc__R
R(((sQ/opt/alt/python27/lib64/python2.7/site-packages/numpy/distutils/npy_pkg_config.pyRs	cB`s eZdZd�Zd�ZRS(s3Exception raised when a package can not be located.cC`s
||_dS(N(R(RR((sQ/opt/alt/python27/lib64/python2.7/site-packages/numpy/distutils/npy_pkg_config.pyR
scC`s|jS(N(R(R((sQ/opt/alt/python27/lib64/python2.7/site-packages/numpy/distutils/npy_pkg_config.pyR!s(RRRR
R(((sQ/opt/alt/python27/lib64/python2.7/site-packages/numpy/distutils/npy_pkg_config.pyRs	cC`s5igd6gd6gd6gd6gd6}d|jd�}x�|D]�}d|}t|�d	krC|jd
�r�|dj|dj��q-|jd�r�|dj|dj��q-|jd
�r�|dj|dj��q-|jd�r|dj|dj��q-|dj|�qCqCW|S(s�
    Parse a line from a config file containing compile flags.

    Parameters
    ----------
    line : str
        A single line containing one or more compile flags.

    Returns
    -------
    d : dict
        Dictionary of parsed flags, split into relevant categories.
        These categories are the keys of `d`:

        * 'include_dirs'
        * 'library_dirs'
        * 'libraries'
        * 'macros'
        * 'ignored'

    tinclude_dirstlibrary_dirst	librariestmacrostignoredt s -t-is-Iis-Ls-ls-D(tsplittlent
startswithtappendtstrip(tlinetdtflagstflag((sQ/opt/alt/python27/lib64/python2.7/site-packages/numpy/distutils/npy_pkg_config.pyR
$s 

cC`s|jdd�S(Ns\s\\(treplace(tval((sQ/opt/alt/python27/lib64/python2.7/site-packages/numpy/distutils/npy_pkg_config.pyt_escape_backslashNscB`sDeZdZdd�Zd�Zdd�Zdd�Zd�ZRS(s$
    Object containing build information about a library.

    Parameters
    ----------
    name : str
        The library name.
    description : str
        Description of the library.
    version : str
        Version string.
    sections : dict
        The sections of the configuration file for the library. The keys are
        the section headers, the values the text under each header.
    vars : class instance
        A `VariableSet` instance, which contains ``(name, value)`` pairs for
        variables defined in the configuration file for the library.
    requires : sequence, optional
        The required libraries for the library to be installed.

    Notes
    -----
    All input parameters (except "sections" which is a method) are available as
    attributes of the same name.

    cC`sL||_||_|r$||_n	g|_||_||_||_dS(N(tnametdescriptiontrequirestversiont	_sectionstvars(RR%R&R(tsectionsR*R'((sQ/opt/alt/python27/lib64/python2.7/site-packages/numpy/distutils/npy_pkg_config.pyR
ls					cC`st|jj��S(s�
        Return the section headers of the config file.

        Parameters
        ----------
        None

        Returns
        -------
        keys : list of str
            The list of section headers.

        (tlistR)tkeys(R((sQ/opt/alt/python27/lib64/python2.7/site-packages/numpy/distutils/npy_pkg_config.pyR+wstdefaultcC`s'|jj|j|d�}t|�S(Ntcflags(R*tinterpolateR)R$(RtsectionR#((sQ/opt/alt/python27/lib64/python2.7/site-packages/numpy/distutils/npy_pkg_config.pyR/�scC`s'|jj|j|d�}t|�S(Ntlibs(R*R0R)R$(RR1R#((sQ/opt/alt/python27/lib64/python2.7/site-packages/numpy/distutils/npy_pkg_config.pyR2�scC`sqd|jd|jg}|jr3|jd�n|jddj|j��|jd|j�dj|�S(NsName: %ssDescription: %ss	Requires:sRequires: %st,sVersion: %ss
(R%R&R'RtjoinR((Rtm((sQ/opt/alt/python27/lib64/python2.7/site-packages/numpy/distutils/npy_pkg_config.pyR�s	N(	RRRtNoneR
R+R/R2R(((sQ/opt/alt/python27/lib64/python2.7/site-packages/numpy/distutils/npy_pkg_config.pyRQs	cB`sMeZdZd�Zd�Zd�Zd�Zd�Zd�Zd�Z	RS(s
    Container object for the variables defined in a config file.

    `VariableSet` can be used as a plain dictionary, with the variable names
    as keys.

    Parameters
    ----------
    d : dict
        Dict of items in the "variables" section of the configuration file.

    cC`sTtg|j�D]\}}||f^q�|_i|_i|_|j�dS(N(tdicttitemst	_raw_datat_ret_re_subt_init_parse(RRtktv((sQ/opt/alt/python27/lib64/python2.7/site-packages/numpy/distutils/npy_pkg_config.pyR
�s4		cC`s4x-|jj�D]\}}|j||�qWdS(N(R9R8t_init_parse_var(RR=R>((sQ/opt/alt/python27/lib64/python2.7/site-packages/numpy/distutils/npy_pkg_config.pyR<�scC`s+tjd|�|j|<||j|<dS(Ns\$\{%s\}(tretcompileR:R;(RR%tvalue((sQ/opt/alt/python27/lib64/python2.7/site-packages/numpy/distutils/npy_pkg_config.pyR?�sc`sK�fd�}x5tj|�rF||�}||kr=Pn|}qW|S(Nc`s>x7�jj�D]&}�j|j�j||�}qW|S(N(R:R-tsubR;(RBR=(R(sQ/opt/alt/python27/lib64/python2.7/site-packages/numpy/distutils/npy_pkg_config.pyt_interpolate�s$(t_VARtsearch(RRBRDtnvalue((RsQ/opt/alt/python27/lib64/python2.7/site-packages/numpy/distutils/npy_pkg_config.pyR0�s
cC`st|jj��S(s�
        Return the list of variable names.

        Parameters
        ----------
        None

        Returns
        -------
        names : list of str
            The names of all variables in the `VariableSet` instance.

        (R,R9R-(R((sQ/opt/alt/python27/lib64/python2.7/site-packages/numpy/distutils/npy_pkg_config.pyt	variables�scC`s|j|S(N(R9(RR%((sQ/opt/alt/python27/lib64/python2.7/site-packages/numpy/distutils/npy_pkg_config.pyt__getitem__�scC`s!||j|<|j||�dS(N(R9R?(RR%RB((sQ/opt/alt/python27/lib64/python2.7/site-packages/numpy/distutils/npy_pkg_config.pyt__setitem__�s
(
RRRR
R<R?R0RHRIRJ(((sQ/opt/alt/python27/lib64/python2.7/site-packages/numpy/distutils/npy_pkg_config.pyR�s						cC`s�|jd�std��ni}x'|jd�D]\}}|||<q4Wx6dddgD]%}||kr^td|��q^q^Wd|kr�g|d<n|S(NtmetasNo meta section found !R%R&R(s6Option %s (section [meta]) is mandatory, but not foundR'(thas_sectionRR8(tconfigRR%RBR=((sQ/opt/alt/python27/lib64/python2.7/site-packages/numpy/distutils/npy_pkg_config.pyt
parse_meta�s
cC`sX|jd�std��ni}x'|jd�D]\}}|||<q4Wt|�S(NRHsNo variables section found !(RLRR8R(RMRR%RB((sQ/opt/alt/python27/lib64/python2.7/site-packages/numpy/distutils/npy_pkg_config.pytparse_variables�scC`s
ttfS(N(tmeta_dtr(RM((sQ/opt/alt/python27/lib64/python2.7/site-packages/numpy/distutils/npy_pkg_config.pytparse_sections�scC`sd|S(Ns%s.ini((tpkg_name((sQ/opt/alt/python27/lib64/python2.7/site-packages/numpy/distutils/npy_pkg_config.pytpkg_to_filename�scC`s�|r1g|D]}tjj||�^q
}n	|g}t�}|j|�}t|�dks}tdt|���nt|�}i}|j	d�r�x0|j
d�D]\}}	t|	�||<q�Wng|j�D]}
|
dkr�|
^q�}i}i}
xs|D]k}
i}|j
|
d�rF|j|
d�|
|
<nx'|j
|
�D]\}}	|	||<qVW|||
<qW||||
fS(NisCould not find file(s) %sRHRKR'(RKRH(tostpathR4RtreadRRtstrRNRLR8R$R+t
has_optiontget(tfilenametdirsRt	filenamesRMtnRKR*R%RBtstsecsR+R'((sQ/opt/alt/python27/lib64/python2.7/site-packages/numpy/distutils/npy_pkg_config.pytparse_configs.+		+
c`s���fd���|�\}}}}d|kr�d|kr�|d}|tjkrxtd||df��ntj|}ttjj|j��|d<ntd|dd|dd|dd|d	t	|��S(
Nc`s�t|��\}}}}x�|j�D]�\}}�t|��\}}}	}
x3|j�D]%\}}||kr_|||<q_q_Wx?|	|j�D]-\}
}|r�|||
cd|7<q�q�Wq(W||||fS(Ns %s(RaR8RT(tfRKR*R+treqstrnametrvaluetnmetatnvarst	nsectionstnreqsR=R>tonametovalue(t_read_configR\(sQ/opt/alt/python27/lib64/python2.7/site-packages/numpy/distutils/npy_pkg_config.pyRl%s#tpkgdirtpkgnames-You should import %s to get information on %sR%R&R(R+R*(
tsystmodulest
ValueErrorR$RURVtdirnamet__file__RR(R]R\RKR*R+RcRntmod((RlR\sQ/opt/alt/python27/lib64/python2.7/site-packages/numpy/distutils/npy_pkg_config.pyt_read_config_imp$s

"cC`sDyt|SWn1tk
r?tt|�|�}|t|<|SXdS(s
    Return library info for a package from its configuration file.

    Parameters
    ----------
    pkgname : str
        Name of the package (should match the name of the .ini file, without
        the extension, e.g. foo for the file foo.ini).
    dirs : sequence, optional
        If given, should be a sequence of directories - usually including
        the NumPy base directory - where to look for npy-pkg-config files.

    Returns
    -------
    pkginfo : class instance
        The `LibraryInfo` instance containing the build information.

    Raises
    ------
    PkgNotFound
        If the package is not found.

    See Also
    --------
    misc_util.get_info, misc_util.get_pkg_info

    Examples
    --------
    >>> npymath_info = np.distutils.npy_pkg_config.read_config('npymath')
    >>> type(npymath_info)
    <class 'numpy.distutils.npy_pkg_config.LibraryInfo'>
    >>> print(npymath_info)
    Name: npymath
    Description: Portable, core math library implementing C99 standard
    Requires:
    Version: 0.1  #random

    N(t_CACHEtKeyErrorRuRT(RnR\R>((sQ/opt/alt/python27/lib64/python2.7/site-packages/numpy/distutils/npy_pkg_config.pyR	Ms'

t__main__(tOptionParsers--cflagstdestR/tactiont
store_truethelps*output all preprocessor and compiler flagss--libsR2soutput all linker flagss
--use-sectionR1s/use this section instead of default for optionss	--versionR(soutput versions--atleast-versiontmin_versionsMinimal versions
--list-alltlist_alls--define-variabletdefine_variables%Replace variable with the given valueis(Expect package name on the command line:s*.inis
%s	%s - %sitNPY_PKG_CONFIG_PATHsnumpy/core/lib/npy-pkg-configt.R.s([\S]+)=([\S]+)sH--define-variable option should be of the form --define-variable=foo=bar(Bt
__future__RRRRoR@RUtversion_infotConfigParserRRtconfigparsert__all__RAREtIOErrorRRR
R$tobjectRRRNRORRRTR6RaRuRvR	RtoptparseRytglobtparsert
add_optiont
parse_argstargvtoptionstargsRRqRtfilesRbtinfotprintR%R&RStenvironRZRR1R�RFR5tgroupRBR*R/R2R(R~(((sQ/opt/alt/python27/lib64/python2.7/site-packages/numpy/distutils/npy_pkg_config.pyt<module>s�	*	HD				$(3		
'
						

Zerion Mini Shell 1.0