o
    i                     @   s(   d dl Z d dlmZ dd Zdd ZdS )    N)Pathc                  C   s&  g d} g d}i }t tj}|d }| *}| }|D ]}| }|ds9t|\}}	|r9|| vr9|	||< qW d    n1 sDw   Y  |d }
|
 }| }W d    n1 s`w   Y  t }|D ]C}| }|dst|\}}	|r|ds||vr|	|d }|d usJ d
|||	 || ksJ d
||	||| qjt|t| ksJ |d	 }| }| }W d    n1 sw   Y  |D ]8}| d
d}|dst|\}}	|r|| vr|	|d }||	 || ksJ d
||	|qd S )N)numpypytestzpytest-timeoutmockflake8
hypothesisz
pre-commitzcython-lintblackisortmypyztypes-dataclassesz
types-mockztypes-requestsztypes-setuptools)r   fugashiznatto-py	pythainlp	sudachipysudachidict_corezspacy-pkusegzthinc-apple-opszrequirements.txt#z	setup.cfgcupyz+{} in setup.cfg but not in requirements.txtzU{} has different version in setup.cfg and in requirements.txt: {} and {} respectivelyzpyproject.toml,"zZ{} has different version in pyproject.toml and in requirements.txt: {} and {} respectively)r   __file__parentopen	readlinesstrip
startswith
_parse_reqsetgetformataddsortedkeys)libs_ignore_requirementslibs_ignore_setupreq_dictroot_dirreq_fileflineslinelibv
setup_file
setup_keysreq_v	toml_file r.   Y/home/ubuntu/.local/lib/python3.10/site-packages/spacy/tests/package/test_requirements.pytest_build_dependencies   sn   













r0   c                 C   s:   t d| d}| |d }t d|sdS ||fS )Nz^[a-z0-9\-]*r    z^[<>=][<>=].*)NN)rematchgroupreplacer   )r'   r(   r)   r.   r.   r/   r   [   s
   r   )r2   pathlibr   r0   r   r.   r.   r.   r/   <module>   s    V