ruạṛ
a �u:j� � @ s: d dl Z d dlZd dlmZ ddlmZ G dd� d�ZdS )� N)�paths_on_pythonpath� )� namespacesc @ s, e Zd Zdd� Zdd� Zdd� Zdd� Zd S ) �TestNamespacesc C s� t �|d�}t �|d�}|d }|d }||f}tjdddt|�dt|�g}t�|� t �|� tjdddt|�dt|�g}t�|� tjd d g}tt t|��� t�|� W d � n1 s�0 Y dS )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_packagesZ path_packages�targets�install_cmd� try_import� r �S/opt/bart/bart_venv/lib/python3.9/site-packages/setuptools/tests/test_namespaces.py�test_mixed_site_and_non_site s<