HEX
Server: LiteSpeed
System: Linux php-prod-1.spaceapp.ru 5.15.0-157-generic #167-Ubuntu SMP Wed Sep 17 21:35:53 UTC 2025 x86_64
User: sport3497 (1034)
PHP: 8.1.33
Disabled: NONE
Upload Files
File: //usr/local/lib/python3.10/dist-packages/setuptools/tests/__pycache__/test_develop.cpython-310.pyc
o

��h�@s~dZddlZddlZddlZddlZddlZddlmZddlm	Z	m
Z
dZdZej
dd	��Zej
d
d��ZGdd
�d
�ZdS)z
develop tests�N)�paths_on_pythonpath�)�contexts�
namespaceszHfrom setuptools import setup

setup(name='foo',
    packages=['foo'],
)
zprint "foo"
c	cs��t���4}t���}|�d|�|�d|�dVWd�n1s$wYWd�dSWd�dS1s<wYdS)Nzsite.USER_BASEzsite.USER_SITE)r�tempdir�setattr)�monkeypatch�	user_base�	user_site�r�H/usr/local/lib/python3.10/dist-packages/setuptools/tests/test_develop.py�	temp_users�

��"�r
ccs��|}|�d�}|d}|��rtt|���|�d��
}|�t�Wd�n1s+wY|d}|�d��
}|�t�Wd�n1sIwY|���|VWd�dS1sawYdS)N�foo�setup.py�wz__init__.py)	�mkdir�isfile�
ValueError�dir�open�write�SETUP_PY�INIT_PY�as_cwd)�tmpdirr
�targetr�setup�f�initrrr�test_env#s �
��
"�rc@s\eZdZedd��Zejjee	j
�d��dd�ejje�
�dkdd�ejjdd	����Zd
S)�TestNamespacesc	Cs�tjdddt|�g}|���-tt|�g��
t�|�Wd�n1s&wYWd�dSWd�dS1s>wYdS)Nr�developz
--install-dir)�sys�
executable�strrr�
subprocess�
check_call)�src_dirr�develop_cmdrrr�install_develop4s�
��"�zTestNamespaces.install_develop�APPVEYORz-https://github.com/pypa/setuptools/issues/851)�reason�PyPyz.https://github.com/pypa/setuptools/issues/1202cCs�t�|d�}t�|d�}|d}tjdddt|�dt|�g}t�|�|�||�t�|�tjdd	g}t	t|�g��
t�|�Wd
�n1sKwYtjddg}t	t|�g��t�|�Wd
�d
S1snwYd
S)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.pkgBNzimport 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_imprrr�!test_namespace_package_importableAs8�
	
���"�z0TestNamespaces.test_namespace_package_importableN)�__name__�
__module__�__qualname__�staticmethodr)�pytest�mark�skipif�bool�os�environ�get�platform�python_implementation�uses_networkr8rrrrr 3s
�
�r )�__doc__rArDr%r"r=�setuptools._pathr�rrrr�fixturer
rr rrrr�<module>s