/
lib
/
python3.9
/
site-packages
/
distlib
/
__pycache__
/
Upload File
HOME
a ��a`C � @ s� d dl mZ d dlZd dlZd dlZd dlZd dlZddlmZm Z m Z ddlmZ ddl mZmZmZmZmZ e�e�Zd�� Ze�d�Zd Zd d� ZeZG dd � d e�ZdS )� )�BytesION� )� sysconfig�detect_encoding�ZipFile)�finder)�FileOperator�get_export_entry�convert_path�get_executable�in_venva� <?xml version="1.0" encoding="UTF-8" standalone="yes"?> <assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0"> <assemblyIdentity version="1.0.0.0" processorArchitecture="X86" name="%s" type="win32"/> <!-- Identify the application security requirements. --> <trustInfo xmlns="urn:schemas-microsoft-com:asm.v3"> <security> <requestedPrivileges> <requestedExecutionLevel level="asInvoker" uiAccess="false"/> </requestedPrivileges> </security> </trustInfo> </assembly>s ^#!.*pythonw?[0-9.]*([ ].*)?$z�# -*- coding: utf-8 -*- import re import sys from %(module)s import %(import_name)s if __name__ == '__main__': sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0]) sys.exit(%(func)s()) c C sX d| v rT| � d�rB| �dd�\}}d|v rT|� d�sTd||f } n| � d�sTd| } | S )N� z /usr/bin/env r �"z%s "%s"z"%s")� startswith�split)� executable�envZ_executable� r �3/usr/lib/python3.9/site-packages/distlib/scripts.py�enquote_executable3 s r c @ s� e Zd ZdZeZdZd*dd�Zdd� Ze j �d �rBd d� Zdd � Z dd� Zd+dd�Zdd� ZeZdd� Zdd� ZdZdd� Zd,dd�Zdd� Zed d!� �Zejd"d!� �Zejd#ks�ejd kr�ejd#kr�d$d%� Zd-d&d'�Z d.d(d)�Z!dS )/�ScriptMakerz_ A class to copy or create scripts from source scripts or callable specifications. NTFc C s� || _ || _|| _d| _d| _tjdkp:tjdko:tjdk| _t d�| _ |pRt|�| _tjdkprtjdkortjdk| _ tj| _d S )NF�posix�java)� �X.Y�nt)� source_dir� target_dir� add_launchers�force�clobber�os�name�_name�set_mode�set�variantsr �_fileop�_is_nt�sys�version_info)�selfr r r �dry_runZfileopr r r �__init__N s � �zScriptMaker.__init__c C s@ |� dd�r<| jr<tj�|�\}}|�dd�}tj�||�}|S )N�guiFZpythonZpythonw)�getr( r! �pathr �replace�join)r+ r �optionsZdn�fnr r r �_get_alternate_executable_ s z%ScriptMaker._get_alternate_executabler c C sf z<t |�� }|�d�dkW d � W S 1 s00 Y W n$ ttfy` t�d|� Y dS 0 dS )zl Determine if the specified executable is a script (contains a #! line) � z#!NzFailed to open %sF)�open�read�OSError�IOError�logger�warning)r+ r �fpr r r � _is_shellg s 2zScriptMaker._is_shellc C sD | � |�r*dd l}|jj�d�dkr<|S n|�� �d�r<|S d| S )Nr zos.nameZLinuxz jython.exez/usr/bin/env %s)r>