
    QpgdE                        d Z ddlZddlmZ ddlZddlmZmZm	Z	 ddl
mZ  ej                   ej                  e            Zej                   dd dk(  ZdZdZd	Zd
ZdZdZdZdZdZdZdZdZdZerdndZdZ dZ!dZ"dZ#dZ$dZ%dZ&dZ'dZ(dZ)d Z*d!Z+d"Z,dZ-d#Z.d$Z/d%Z0d&Z1d'Z2d(Z3d)Z4d*Z5d+Z6d,Z7d-Z8d.Z9d/Z:d0Z;d1Z<d2Z=d3Z>d4Z?d5Z@d6ZAd7ZBd8ZCd9ZDd:ZEd;ZFd<ZGg d=d= ed>      ed?d@d@ edA      eej                  dBk(  xr  e	        dCdDdD edE      ed?dFdF edG      ed?dHdH edI      ed?dJdJ edK      ed?dLdL edM      ed?dNdO edP      ed?dQdR edS      ed?dTdT edU      ed?dVdV edW      ed?dXdX edY      e d?dZdZ ed[      e!d?d\d\ ed]      e"d?d^d^ ed_      e#d?d`d` eda      e$d?dbdb edc      e%d?dddd ede      e&d?dfdf edg      e'd?dhdh edi      e(d?djdj edk      e)d?dldm edn      e*d?dodo edp      e+d?dqdq edr      e,d?dsdt edu      e-d?dvdw edx      e.d?dydz ed{      e/d?d|d} ed~      e0d?dd ed      e1d?dd ed      e2ej                  j                  d      dCdd ed      e3d?dd ed      e4d?dd ed      e5d?dd ed      e6d?dd ed      e7d?dd ed      e8d?dd ed      e9d?dd ed      e:d?dd ed      e;d?dd ed      e<d?dd ed      e=d?dd ed      e>d?dd ed      e?d?dd ed      e@d?dd ed      eAd?ZJeJdd ed      eBeddd ed      eCeddd ed      eDeddd ed      eEeddd ed      eFeddd ed      eGedgz  ZJ G d deK      ZLg aMdefdZNd ZOt        ej                  fdZQd ZRd ZSy)z+Module checking Spyder runtime dependencies    N)_running_in_ciis_conda_based_app)programs   )      	mandatoryoptionalzspyder pluginsz>=3.9.3z>=0.3.0z>=2.14.0,<3.0.0z>=1.2.0z>=2.0.0z>=0.5.0z>=1.6.0z
>=20181111z>=4.6.0z>=3.0.2z>=8.12.2,<8.13.0z>=8.13.0,<9.0.0,!=8.17.1z>=0.17.2,<0.20.0z>=0.7z>=3.2.0z>=17.0.0z>=4.0z>=0.6.0z>=0.7.0,<0.9.0z>=4.4.0z>=0.4z>=5.3z>=2.3.0z>=2.0z>=3.1,<4z>=1.12.0,<1.13.0z>=2.0.0,<3.0.0z>=0.4.0z>=1.2z>=0.26z>=24.0.0z>=3.2.0,<3.3.0z>=0.2.2z>=1.3.1,<1.4.0z>=5.6.1,<5.7.0z>=2.4.0z>=0.9.7z>=49.6.0z>=0.6.6z>=3.0.2,<3.1.0z>=0.6.2,<1.0.0z>=4.2.0z>=0.1.1z>=0.10.3z>=1.9.4z>=0.21z>=3.0.0z>=1.7z>=1.1.1z>=0.17.0z>=0.7.3aiohttpzAsync http client/server)modnamepackage_namefeaturesrequired_versionapplaunchservicesz.Notify macOS that Spyder can open Python filesdarwin)r   r   r   r   displayasyncsshz%Connect to remote kernels through SSHatomicwritesz Atomic file writes in the Editorchardetz0Character encoding auto-detection for the Editorcloudpicklez1Handle communications between kernel and frontendcookiecutterz+Create projects from cookiecutter templatesdiff_match_patchzdiff-match-patchz-Compute text file diff changes during editionimportlib_metadatazimportlib-metadataz(Access the metadata for a Python packageintervaltreez$Compute folding range nesting levelsIPythonz&IPython interactive python environmentjediz+Main backend for the Python Language Server	jellyfishzOptimize algorithms for folding
jsonschemaz"Verify if snippets files are validkeyringz:Save Github credentials to report internal errors securely	nbconvertz*Manipulate Jupyter notebooks in the Editornumpydocz=Improve code completion for objects that use Numpy docstringsparsozAPython parser that supports error recovery and round-trip parsingpexpectz,Stdio support for our language server clientpicklesharez*Cache the list of installed Python modulespsutilz+CPU and memory usage info in the status bargithubpygithubzPython API for Github REST APIpygmentsz9Syntax highlighting for a lot of file types in the EditorpylintzStatic code analysispylint_venvzpylint-venvzDUse the same Pylint installation with different virtual environmentspylspzpython-lsp-serverz*Code completion and linting for the Editorpylsp_blackzpython-lsp-blackz<Autoformat Python files in the Editor with the Black packagepyls_spyderzpyls-spyderz'Spyder plugin for the Python LSP Serverpyucaz*Properly sort lists of non-English stringsxdgpyxdgzParse desktop files on Linuxlinuxzmqpyzmqz-Client for the language server protocol (LSP)
qdarkstylez#Dark style for the entire interface	qstylizerzCustomize Qt stylesheets	qtawesomez9Icon theme based on FontAwesome and Material Design icons	qtconsolez$Main package for the IPython consoleqtpyz)Abstraction layer for Python Qt bindings.rtreez#Fast access to code snippet regions
setuptoolszDetermine package versionssphinxzDShow help for objects in the Editor and Consoles in a dedicated panespyder_kernelszspyder-kernelsz&Jupyter kernels for the Spyder consolesuperqtz3Special widgets and utilities for PyQt applicationstextdistancez!Compute distances between stringsthree_mergezthree-mergez/3-way merge algorithm to merge document changeswatchdogz)Watch file changes on project directoriesyarlzURL parsing and changingcythonz'Run Cython files in the IPython Console)r   r   r   r   kind
matplotlibz%2D/3D plotting in the IPython consolenumpyzGView and edit two and three dimensional arrays in the Variable Explorerpandasz<View and edit DataFrames and Series in the Variable Explorerscipyz6Import Matlab workspace files in the Variable Explorersympyz+Symbolic mathematics in the IPython Consolec                   6    e Zd ZdZdZdZdefdZd Zd Z	d Z
y)	
Dependencyz
    Spyder's dependency

    Version may starts with =, >=, > or < to specify the exact requirement;
    multiple conditions may be separated by ',' (e.g. '>=0.13,<1.0')OKNOKNc                 d   || _         || _        || _        || _        || _        | j                  j                  dd      | _        |M	 t        j                  |      | _	        | j                  s%t        j                  | j                        | _	        y y || _	        y # t        $ r
 d | _	        Y y w xY w)N-r   )r   r   r   r   rD   replacedistribution_namer   get_module_versioninstalled_versionget_package_version	Exception)selfr   r   r   r   rS   rD   s          3lib/python3.12/site-packages/spyder/dependencies.py__init__zDependency.__init__Q  s    (  0	 "&!2!2!:!:3!D$.)1)D)DW)M&-- .6-I-I...0D*	 . &7D"  . *.&	.s   A
B B/.B/c                     | j                   dk(  ry| j                  r8t        j                  | j                   | j                  | j                        }|S y)z Check if dependency is installedr=   T)rQ   )r   r   r   is_module_installedrQ   )rV   	installeds     rW   checkzDependency.checkr  sO    <<++   44%%"&"8"8I
     c                     | j                         r| j                  d| j                  dS | j                  d| j                  dS )!Return dependency status (string)z ())r\   rS   rL   rM   rV   s    rW   get_installed_versionz Dependency.get_installed_version  s5    ::< $ 6 6@@ $ 6 6AAr]   c                 R    | j                         r| j                  S | j                  S )r_   )r\   rL   rM   ra   s    rW   
get_statuszDependency.get_status  s    ::<77N88Or]   )__name__
__module____qualname____doc__rL   rM   	MANDATORYrX   r\   rb   rd    r]   rW   rK   rK   G  s1    H 
B
C $(i7BBr]   rK   c           	          t         D ].  }t               rd| v r|j                  | k(  s"t        d|         t         t	        | |||||      gz  a y)zAdd Spyder dependencyspyder_boilerplatez(Dependency has already been registered: N)DEPENDENCIESr   r   
ValueErrorrK   )r   r   r   r   rS   rD   
dependencys          rW   addrp     sk     #
?3w>(:7)DF F # Zx 0 149 : :Lr]   c                 v    t         D ]#  }|j                  | k(  s|j                         c S  t        d| z        )z)Check if required dependency is installedzUnknown dependency %s)rm   r   r\   RuntimeError)r   ro   s     rW   r\   r\     s<    "
(##%% # 2W<==r]   c                 d   d}g }| D ]  }|j                   }|j                  |d|j                  z   z  }t        |t        |      g      }t        dt
        dt        di}t        t
        t        d}|j                  ||j                     ||j                         g        |dz  }d	}d
}	t        |d       D ]k  \  }
}}|
|	k7  rE|
   }|t        k(  r|d|j                          d| z  }n|| d|j                          d| z  }|
}	||j                  |       d| | z  }m |dk(  s|dd }|S )z Return a status of dependencies.r   N 012)ru   rv   rw       z-1c                 4    | d   | d   j                         z   S )Nr   rx   )lower)xs    rW   <lambda>zstatus.<locals>.<lambda>  s    !qtzz| 3r]   )keyz# :z:  <br>)r   r   maxlenri   OPTIONALPLUGINappendrD   rb   sorted
capitalizeljust)depslinesepmaxwidthdatadeptitle	dep_order	order_deptext
prev_orderorderversionnames                rW   statusr     sg   HD +S3////E#e*-.XsFC@	#(@	Ysxx(%1J1J1LMN  MHDJ!'3"5ugJU#Dy "T__./q	::7)2doo&7%8'CCJ5;;x()WIgY??"5 fCRyKr]   c                      g } t         D ]8  }|j                  t        k7  s|j                         r(| j	                  |       : | rt        | d      S y)z2Return the status of missing dependencies (if any)r   )r   r   ry   )rm   rD   r   r\   r   r   )missing_depsro   s     rW   missing_dependenciesr     sK    L"
??h&z/?/?/A
+ # <88r]   c                      t         D ]E  } | j                  dd      st        | d   | d   | d   | d   | j                  dt                     G y )	Nr   Tr   r   r   r   rD   )rD   )DESCRIPTIONSgetrp   ri   )r   s    rW   declare_dependenciesr     sL    779d#IN 3J%7!8WWVY/1 r]   )Trh   osos.pathpathospsysspyder.config.baser   r   r   spyder.utilsr   dirnameabspath__file__HEREversion_infoPY38ri   r   r   AIOHTTP_REQVERAPPLAUNCHSERVICES_REQVERASYNCSSH_REQVERATOMICWRITES_REQVERCHARDET_REQVERCLOUDPICKLE_REQVERCOOKIECUTTER_REQVERDIFF_MATCH_PATCH_REQVERIMPORTLIB_METADATA_REQVERINTERVALTREE_REQVERIPYTHON_REQVERJEDI_REQVERJELLYFISH_REQVERJSONSCHEMA_REQVERKEYRING_REQVERNBCONVERT_REQVERNUMPYDOC_REQVERPARSO_REQVERPEXPECT_REQVERPICKLESHARE_REQVERPSUTIL_REQVERPYGITHUB_REQVERPYGMENTS_REQVERPYLINT_REQVERPYLINT_VENV_REQVERPYLSP_REQVERPYLSP_BLACK_REQVERPYLS_SPYDER_REQVERPYUCA_REQVERPYXDG_REQVERPYZMQ_REQVERQDARKSTYLE_REQVERQSTYLIZER_REQVERQTAWESOME_REQVERQTCONSOLE_REQVERQTPY_REQVERRTREE_REQVERSETUPTOOLS_REQVERSPHINX_REQVERSPYDER_KERNELS_REQVERSUPERQT_REQVERTEXTDISTANCE_REQVERTHREE_MERGE_REQVERWATCHDOG_REQVERYARL_REQVERCYTHON_REQVERMATPLOTLIB_REQVERNUMPY_REQVERPANDAS_REQVERSCIPY_REQVERSYMPY_REQVERplatform
startswithr   objectrK   rm   rp   r\   r   r   r   r   rj   r]   rW   <module>r      s   2 
  
 D C ! s{{;3;;x() v% 		 $ #   & %  '+#1K      !%  $  # #  ( !    {-.'){
 $(CD1(E1C1E-E	G{ :;(*{ #56,.{$ EF')%{, "FG+--{4 #@A,.5{< #'BC02={D %)=>24E{L #9:,.M{T ;<')U{\ @A$&]{d  45)+e{l !78*,m{t  % &'	)u{~  ?@)+{F RS(*G{N  ( )%	'O{X AB')Y{` "?@+-a{h @A&(i{p 34(*q{x NO(*y{@ )*&(A{H " # $+	-I{R (?@%'S{Z '  +	-[{d "<=+-e{l ?@%'m{t 12%''0	2u{~ BC%'{F !89*,G{N  -.)+O{V  NO)+W{^  9:)+_{f >?$&g{n 89%'o{v !/0*,w{~ YZ&({F !%;<.0G{N HI')O{V #67,.W{^ "DE+-_{f >?(*g{n -.$&o{~ <=&	
 !:;*	
 \]%	
 QR&	
 KL%	
 @A%	5 JF FR  Y:$> bjj $N
1r]   