
    vKg                     @    S SK r S SKrS SKJr  SSKJr   " S S5      rg)    N)paths_on_pythonpath   )
namespacesc                   ,    \ rS rSrS rS rS rS rSrg)TestNamespaces	   c           	      Z   [         R                  " US5      n[         R                  " US5      nUS-  nUS-  nXE4n[        R                  SSS[	        U5      S[	        U5      /n[
        R                  " U5        [         R                  " U5        [        R                  SSS[	        U5      S[	        U5      /n[
        R                  " U5        [        R                  S	S
/n[        [        [        U5      5         [
        R                  " U5        SSS5        g! , (       d  f       g= f)z
Installing two packages sharing the same namespace, one installed
to a site dir and the other installed just to a path on PYTHONPATH
should leave the namespace in tact and both packages reachable by
import.
	myns.pkgA	myns.pkgBzsite-packageszpath-packages-mpip.__main__install-t-cz"import myns.pkgA; import myns.pkgBN)
r   build_namespace_packagesys
executablestr
subprocess
check_callmake_site_dirr   map)	selftmpdirpkg_Apkg_Bsite_packagespath_packagestargetsinstall_cmd
try_imports	            `/var/www/highfloat_scraper/venv/lib/python3.13/site-packages/setuptools/tests/test_namespaces.pytest_mixed_site_and_non_site+TestNamespaces.test_mixed_site_and_non_site
   s    226;G226;G00. NNJ
 	k*  /NNJ
 	k*NN0


 !S'!23!!*- 433s   <D
D*c           	         [         R                  " US5      nUS-  nUR                  5         [        R                  SSSS[        U5      [        U5      /n[        [        U5      /5         [        R                  " U5        SSS5        [         R                  " U5        [        R                  SS	/n[        [        U5      /5         [        R                  " U5        SSS5        g! , (       d  f       Nl= f! , (       d  f       g= f)
zK
Ensure that a namespace package doesn't break on import
of pkg_resources.
r
   packagesr   pipr   r   Nr   zimport pkg_resources)
r   r   mkdirr   r   r   r   r   r   r   )r   r   pkgtargetr    r!   s         r"   test_pkg_resources_import(TestNamespaces.test_pkg_resources_import4   s    
 00E*$NNKH
 !#f+/!!+. 0  (NN"


 !#f+/!!*- 0/ 0/ 0/s   +C(C9(
C69
Dc           	         [         R                  " US5      nUS-  n[        R                  SSS[	        U5      S[	        U5      /n[
        R                  " U5        [         R                  " U5        [        R                  SS/n[        [	        U5      /5         [
        R                  " U[	        U5      S	9  S
S
S
5        g
! , (       d  f       g
= f)z
Installing a namespace packages but also having it in the current
working directory, only one version should take precedence.
r
   r&   r   r   r   r   r   z&import pkg_resources; import myns.pkgAcwdN	r   r   r   r   r   r   r   r   r   )r   r   r   r*   r    pkg_resources_imps         r"   (test_namespace_package_installed_and_cwd7TestNamespaces.test_namespace_package_installed_and_cwdP   s    
 226;G*$ NNJK
 	k*  ( NN4

 !#f+/!!"3UD 0//s   C
Cc           	         [         R                  " US5      n[         R                  " US5      nUS-  n[        R                  SSS[	        U5      S[	        U5      /n[
        R                  " U5        [         R                  " U5        [        R                  SS	/n[        [	        U5      /5         [
        R                  " U[	        U5      S
9  SSS5        g! , (       d  f       g= f)z
Installing one namespace package and also have another in the same
namespace in the current working directory, both of them must be
importable.
r
   r   r&   r   r   r   r   r   z8import pkg_resources; import myns.pkgA; import myns.pkgBr.   Nr0   )r   r   r   r   r*   r    r1   s          r"   5test_packages_in_the_same_namespace_installed_and_cwdDTestNamespaces.test_packages_in_the_same_namespace_installed_and_cwdm   s     226;G226;G*$ NNJK
 	k*  ( NNF

 !#f+/!!"3UD 0//s   1C
C' N)	__name__
__module____qualname____firstlineno__r#   r+   r2   r5   __static_attributes__r7       r"   r   r   	   s    (.T.8E:Er=   r   )r   r   setuptools._pathr    r   r   r7   r=   r"   <module>r@      s     
 0 AE AEr=   