3
”ReC ã @ s° d dl mZ d dlZd dlZd dlZd dlZd dlZddlmZm Z m
Z
ddlmZ ddl
mZmZmZmZmZ ejeƒZdjƒ ZejdƒZd Zd
d„ ZeZG dd
„ d
eƒZdS )é )ÚBytesIONé )Ú sysconfigÚdetect_encodingÚZipFile)Úfinder)ÚFileOperatorÚget_export_entryÚconvert_pathÚget_executableÚin_venvañ
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 sZ d| krV| j dƒrD| jddƒ\}}d|krV|j dƒ rVd||f } n| j dƒsVd| } | S )Nú z
/usr/bin/env r ú"z%s "%s"z"%s")Ú
startswithÚsplit)Ú
executableÚenvÚ_executable© r úŠ/builddir/build/BUILDROOT/alt-python36-pip-20.2.4-5.el8.x86_64/opt/alt/python36/lib/python3.6/site-packages/pip/_vendor/distlib/scripts.pyÚenquote_executable3 s
r c @ sÚ e Zd ZdZeZdZd'dd„Zdd„ Ze j
jd ƒrBd
d„ Zdd
„ Z
dd„ Zd(dd„Zdd„ ZeZdd„ Zdd„ Zd)dd„Zdd„ Zedd„ ƒZejdd„ ƒZejd ksºejd krÂejd krÂd!d"„ Zd*d#d$„Zd+d%d&„ZdS ),Ú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)r r )Ú
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_runÚfileopr r r Ú__init__N s
zScriptMaker.__init__c C s@ |j ddƒr<| jr