관리-도구
편집 파일: scripts.cpython-34.pyc
� �Re0 � @ s� d d l m Z d d l Z d d l Z d d l Z d d l Z d d l Z d d l m Z m Z m Z m Z d d l m Z d d l m Z m Z m Z m Z m Z e j e � Z d j � Z e j d � Z d Z Gd d � d e � Z d S)� )�BytesION� )� sysconfig�fsencode�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.]*([ ].*)?$a{ # -*- coding: utf-8 -*- if __name__ == '__main__': import sys, re def _resolve(module, func): __import__(module) mod = sys.modules[module] parts = func.split('.') result = getattr(mod, parts.pop(0)) for p in parts: result = getattr(result, p) return result try: sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0]) func = _resolve('%(module)s', '%(func)s') rc = func() # None interpreted as 0 except Exception as e: # only supporting Python >= 2.6 sys.stderr.write('%%s\n' %% e) rc = 1 sys.exit(rc) c @ s� e Z d Z d Z e Z d Z d d d d d � Z d d � Z d d d d � Z d d � Z e Z d d � Z d d � Z d d d � Z d d � Z e d d � � Z e j d d � � Z e j d k r� d d � Z n d d d � Z d d d � Z d S) �ScriptMakerz_ A class to copy or create scripts from source scripts or callable specifications. NTFc C sg | | _ | | _ | | _ d | _ d | _ t j d k | _ t d � | _ | p] t | � | _ d S)NF�posix� �X.Y)r r )� source_dir� target_dir� add_launchers�force�clobber�os�name�set_mode�set�variantsr �_fileop)�selfr r r �dry_run�fileop� r �6/tmp/pip-ztkk0jow-build/pip/_vendor/distlib/scripts.py�__init__K s zScriptMaker.__init__c C sg | j d d � rc t j d k rc t j j | � \ } } | j d d � } t j j | | � } n | S)N�guiF�nt�python�pythonw)�getr r �path�split�replace�join)r � executable�options�dn�fnr r r! �_get_alternate_executableW s !z%ScriptMaker._get_alternate_executable� c C s� d } | j r! | j } d } n� t j � s9 t � } nq t � rp t j j t j d � d t j d � � } n: t j j t j d � d t j d � t j d � f � } | r� | j | | � } n | r� d | k r� d | } n t | � } d | | d } y | j d � Wn"