U
    md&                  
   @   s   d dl Z d dlmZ eejZdd Zz"d dlmZ e  ededZ	W n8 e
eefk
r   dd	lmZ eejZed
 Z	Y nX dd ZdS )    N)Pathc                  C   sJ   z0ddl } ddl}|j}| jD ]}|| qW n tk
rD   Y nX dS )z    Under some circumstances, (e.g. when installing a PEP 517 package via pip),
    pkg_resources.working_set.entries is stale. This tries to fix that.
    See https://github.com/pypa/setuptools_scm/issues/513
    r   N)syspkg_resourcesworking_setpath	add_entry	Exception)r   r   wsentry r   I/home/sam/Atlas/atlas_env/lib/python3.8/site-packages/scanpy/_metadata.pyrefresh_entry_points   s    
r   )get_versionz..)rootrelative_to   )pkg_metadataVersionc                  C   s"   t  D ]} | jdkr dS qdS )a      Checks if we are being imported by flit.
    This is necessary so flit can import __version__ without all depedencies installed.
    There are a few options to make this hack unnecessary, see:
    https://github.com/takluyver/flit/issues/253#issuecomment-737870438
    Z$get_docstring_and_version_via_importTF)	tracebackextract_stackname)framer   r   r   within_flit$   s    
r   )r   pathlibr   __file__parentherer   Zsetuptools_scmr   __version__ImportErrorLookupErrorFileNotFoundErrorZ_compatr   r   metadatar   r   r   r   r   <module>   s   

