
    ,h                         d 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
 dZdZej                  d        Zej                  d	        Z G d
 d      Zy)zdevelop tests    N)paths_on_pythonpath   )contexts
namespaceszHfrom setuptools import setup

setup(name='foo',
    packages=['foo'],
)
zprint "foo"
c              #      K   t        j                         5 }t        j                         5 }| j                  d|       | j                  d|       d  d d d        d d d        y # 1 sw Y   xY w# 1 sw Y   y xY ww)Nzsite.USER_BASEzsite.USER_SITE)r   tempdirsetattr)monkeypatch	user_base	user_sites      _/var/www/html/Resume-Scraper/venv/lib/python3.12/site-packages/setuptools/tests/test_develop.py	temp_userr      su     				 y 	9 0)< 0)<	 	 	 s3   A>A2)A&A2	A>&A/	+A22A;7A>c              #     K   | }|j                  d      }|dz  }|j                         rt        t        |            |j	                  d      5 }|j                  t               d d d        |dz  }|j	                  d      5 }|j                  t               d d d        |j                         5  | d d d        y # 1 sw Y   [xY w# 1 sw Y   3xY w# 1 sw Y   y xY ww)Nfoosetup.pywz__init__.py)	mkdirisfile
ValueErrordiropenwriteSETUP_PYINIT_PYas_cwd)tmpdirr   targetr   setupfinits          r   test_envr!   #   s     F
,,u
CZE||~V%%	C A	D	3 1		     sN   AC$C &C$CC$2C7	C$ C	C$CC$C!C$c                      e Zd Zed        Zej                  j                   ee	j                  j                  d            d      ej                  j                   ej                         dk(  d      d               Zy)	TestNamespacesc                    t         j                  dddt        |      g}| j                         5  t	        t        |      g      5  t        j                  |       d d d        d d d        y # 1 sw Y   xY w# 1 sw Y   y xY w)Nr   developz--install-dir)sys
executablestrr   r   
subprocess
check_call)src_dirr   develop_cmds      r   install_developzTestNamespaces.install_develop4   sy     NNK
 ^^ 	3$c&k]3 3%%k23	3 	33 3	3 	3s#   A8A,A8,A5	1A88BAPPVEYORz-https://github.com/pypa/setuptools/issues/851)reasonPyPyz.https://github.com/pypa/setuptools/issues/1202c           	      x   t        j                  |d      }t        j                  |d      }|dz  }t        j                  dddt	        |      dt	        |      g}t        j                  |       | j                  ||       t        j                  |       t        j                  dd	g}t        t	        |      g      5  t        j                  |       d
d
d
       t        j                  ddg}t        t	        |      g      5  t        j                  |       d
d
d
       y
# 1 sw Y   PxY w# 1 sw Y   y
xY w)a  
        Installing two packages sharing the same namespace, one installed
        naturally using pip or `--single-version-externally-managed`
        and the other installed using `develop` should leave the namespace
        in tact and both packages reachable by import.
        z	myns.pkgAz	myns.pkgBpackagesz-mpipinstallz-tz-cz"import myns.pkgA; import myns.pkgBNzimport pkg_resources)
r   build_namespace_packager&   r'   r(   r)   r*   r-   make_site_dirr   )selfr   pkg_Apkg_Br   install_cmd
try_importpkg_resources_imps           r   !test_namespace_package_importablez0TestNamespaces.test_namespace_package_importableA   s!    226;G226;G*$ NNJK
 	k*UF+  (NN0


 !#f+/ 	.!!*-	.
 NN"

 !#f+/ 	5!!"34	5 	5	. 	.	5 	5s   ?D$D0$D-0D9N)__name__
__module____qualname__staticmethodr-   pytestmarkskipifboolosenvirongetplatformpython_implementationr=        r   r#   r#   3   s    
3 
3 [[RZZ^^J'(>   [[&&&(F2?  &5		&5rL   r#   )__doc__rF   rI   r)   r&   rB   setuptools._pathr    r   r   r   r   fixturer   r!   r#   rK   rL   r   <module>rQ      se     	   
  0 "    <5 <5rL   