3
ig8E @ s d dl mZ d dlZd dlZd dlZd dlZd dlZddlmZm Z m
Z
ddlmZ ddl
mZmZmZmZmZmZ ejeZdj ZejdZd Zd
d ZeZG dd
d
eZdS ) )BytesION ) sysconfigdetect_encodingZipFile)finder)FileOperatorget_export_entryconvert_pathget_executableget_platformin_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 drD| jdd\}}d|krV|j d rVd||f } n| j dsVd| } | S )N z
/usr/bin/env r "z%s "%s"z"%s")
startswithsplit)
executableenv_executable r :/tmp/pip-build-88gy_88q/pip/pip/_vendor/distlib/scripts.pyenquote_executable3 s
r c @ s e Zd ZdZeZdZd*ddZdd Ze j
jd rBd
d Zdd
Z
dd Zd+ddZdd ZeZdd Zdd ZdZdd Zd,ddZdd Zed d! Zejd"d! Zejd#ksejd krejd#krd$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 )NFposixjava X.Ynt)r r )
source_dir
target_dir
add_launchersforceclobberosname_nameset_modesetvariantsr _fileop_is_ntsysversion_info)selfr r r dry_runfileopr r r __init__N s
zScriptMaker.__init__c C s@ |j ddr<| jr