File: //lib/python3.10/__pycache__/_distutils_system_mod.cpython-310.pyc
o
    E�h�  �                   @   s�   d Z ddlZddlZddlZddlZddlm  mZ	 ddl
m  mZ ddl
m
Z
mZmZ ddlmZ G dd� de	j�ZG dd� dej�Zd	d
� Zdd� Zd
d� Zdd� Zdd� Zdd� Ze�  dS )a  
Apply Debian-specific patches to distutils commands.
Extracts the customized behavior from patches as reported
in pypa/distutils#2 and applies those customizations (except
for scheme definitions) to those commands.
Place this module somewhere in sys.path to take effect.
�    N)�to_filename�	safe_name�safe_version)�DistutilsOptionErrorc                       sF   e Zd Zeejj�dg Z� fdd�Z� fdd�Z� fdd�Z	�  Z
S )�install)zinstall-layout=Nz7installation layout to choose (known values: deb, unix)c                    �   t � ��  d | _d | _d S �N��super�initialize_options�
prefix_option�install_layout��self��	__class__� �,/usr/lib/python3.10/_distutils_system_mod.pyr       �   
zinstall.initialize_optionsc                    s�   |dkrH| j r| j �� dv rd}n7| j �� dv rd}n-td��| jr+tj�| j�dks.t� r1d}ntj�| j�dkrFd | _| _	d | _
| _d}t� �
|� d S )	N�posix_prefix)�deb�
deb_system)�unix�"unknown value for --install-layout�
/usr/local�/usr�posix_local)r
   �lowerr   r   �os�path�normpath�prefix�is_virtual_environment�exec_prefix�install_base�install_platbaser
   �
select_scheme)r   �namer   r   r   r&