/home/fresvfqn/waterdamagerestorationandrepairsmithtown.com/Compressed/distutils.zip
PKU[���Z^@^@cygwinccompiler.pynu�[���"""distutils.cygwinccompiler

Provides the CygwinCCompiler class, a subclass of UnixCCompiler that
handles the Cygwin port of the GNU C compiler to Windows.  It also contains
the Mingw32CCompiler class which handles the mingw32 port of GCC (same as
cygwin in no-cygwin mode).
"""

# problems:
#
# * if you use a msvc compiled python version (1.5.2)
#   1. you have to insert a __GNUC__ section in its config.h
#   2. you have to generate an import library for its dll
#      - create a def-file for python??.dll
#      - create an import library using
#             dlltool --dllname python15.dll --def python15.def \
#                       --output-lib libpython15.a
#
#   see also http://starship.python.net/crew/kernr/mingw32/Notes.html
#
# * We put export_symbols in a def-file, and don't use
#   --export-all-symbols because it doesn't worked reliable in some
#   tested configurations. And because other windows compilers also
#   need their symbols specified this no serious problem.
#
# tested configurations:
#
# * cygwin gcc 2.91.57/ld 2.9.4/dllwrap 0.2.4 works
#   (after patching python's config.h and for C++ some other include files)
#   see also http://starship.python.net/crew/kernr/mingw32/Notes.html
# * mingw32 gcc 2.95.2/ld 2.9.4/dllwrap 0.2.4 works
#   (ld doesn't support -shared, so we use dllwrap)
# * cygwin gcc 2.95.2/ld 2.10.90/dllwrap 2.10.90 works now
#   - its dllwrap doesn't work, there is a bug in binutils 2.10.90
#     see also http://sources.redhat.com/ml/cygwin/2000-06/msg01274.html
#   - using gcc -mdll instead dllwrap doesn't work without -static because
#     it tries to link against dlls instead their import libraries. (If
#     it finds the dll first.)
#     By specifying -static we force ld to link against the import libraries,
#     this is windows standard and there are normally not the necessary symbols
#     in the dlls.
#   *** only the version of June 2000 shows these problems
# * cygwin gcc 3.2/ld 2.13.90 works
#   (ld supports -shared)
# * mingw gcc 3.2/ld 2.13 works
#   (ld supports -shared)

import os
import sys
import copy
from subprocess import Popen, PIPE, check_output
import re

from distutils.ccompiler import gen_preprocess_options, gen_lib_options
from distutils.unixccompiler import UnixCCompiler
from distutils.file_util import write_file
from distutils.errors import (DistutilsExecError, CCompilerError,
        CompileError, UnknownFileError)
from distutils import log
from distutils.version import LooseVersion
from distutils.spawn import find_executable

def get_msvcr():
    """Include the appropriate MSVC runtime library if Python was built
    with MSVC 7.0 or later.
    """
    msc_pos = sys.version.find('MSC v.')
    if msc_pos != -1:
        msc_ver = sys.version[msc_pos+6:msc_pos+10]
        if msc_ver == '1300':
            # MSVC 7.0
            return ['msvcr70']
        elif msc_ver == '1310':
            # MSVC 7.1
            return ['msvcr71']
        elif msc_ver == '1400':
            # VS2005 / MSVC 8.0
            return ['msvcr80']
        elif msc_ver == '1500':
            # VS2008 / MSVC 9.0
            return ['msvcr90']
        elif msc_ver == '1600':
            # VS2010 / MSVC 10.0
            return ['msvcr100']
        else:
            raise ValueError("Unknown MS Compiler version %s " % msc_ver)


class CygwinCCompiler(UnixCCompiler):
    """ Handles the Cygwin port of the GNU C compiler to Windows.
    """
    compiler_type = 'cygwin'
    obj_extension = ".o"
    static_lib_extension = ".a"
    shared_lib_extension = ".dll"
    static_lib_format = "lib%s%s"
    shared_lib_format = "%s%s"
    exe_extension = ".exe"

    def __init__(self, verbose=0, dry_run=0, force=0):

        UnixCCompiler.__init__(self, verbose, dry_run, force)

        status, details = check_config_h()
        self.debug_print("Python's GCC status: %s (details: %s)" %
                         (status, details))
        if status is not CONFIG_H_OK:
            self.warn(
                "Python's pyconfig.h doesn't seem to support your compiler. "
                "Reason: %s. "
                "Compiling may fail because of undefined preprocessor macros."
                % details)

        self.gcc_version, self.ld_version, self.dllwrap_version = \
            get_versions()
        self.debug_print(self.compiler_type + ": gcc %s, ld %s, dllwrap %s\n" %
                         (self.gcc_version,
                          self.ld_version,
                          self.dllwrap_version) )

        # ld_version >= "2.10.90" and < "2.13" should also be able to use
        # gcc -mdll instead of dllwrap
        # Older dllwraps had own version numbers, newer ones use the
        # same as the rest of binutils ( also ld )
        # dllwrap 2.10.90 is buggy
        if self.ld_version >= "2.10.90":
            self.linker_dll = "gcc"
        else:
            self.linker_dll = "dllwrap"

        # ld_version >= "2.13" support -shared so use it instead of
        # -mdll -static
        if self.ld_version >= "2.13":
            shared_option = "-shared"
        else:
            shared_option = "-mdll -static"

        # Hard-code GCC because that's what this is all about.
        # XXX optimization, warnings etc. should be customizable.
        self.set_executables(compiler='gcc -mcygwin -O -Wall',
                             compiler_so='gcc -mcygwin -mdll -O -Wall',
                             compiler_cxx='g++ -mcygwin -O -Wall',
                             linker_exe='gcc -mcygwin',
                             linker_so=('%s -mcygwin %s' %
                                        (self.linker_dll, shared_option)))

        # cygwin and mingw32 need different sets of libraries
        if self.gcc_version == "2.91.57":
            # cygwin shouldn't need msvcrt, but without the dlls will crash
            # (gcc version 2.91.57) -- perhaps something about initialization
            self.dll_libraries=["msvcrt"]
            self.warn(
                "Consider upgrading to a newer version of gcc")
        else:
            # Include the appropriate MSVC runtime library if Python was built
            # with MSVC 7.0 or later.
            self.dll_libraries = get_msvcr()

    def _compile(self, obj, src, ext, cc_args, extra_postargs, pp_opts):
        """Compiles the source by spawning GCC and windres if needed."""
        if ext == '.rc' or ext == '.res':
            # gcc needs '.res' and '.rc' compiled to object files !!!
            try:
                self.spawn(["windres", "-i", src, "-o", obj])
            except DistutilsExecError as msg:
                raise CompileError(msg)
        else: # for other files use the C-compiler
            try:
                self.spawn(self.compiler_so + cc_args + [src, '-o', obj] +
                           extra_postargs)
            except DistutilsExecError as msg:
                raise CompileError(msg)

    def link(self, target_desc, objects, output_filename, output_dir=None,
             libraries=None, library_dirs=None, runtime_library_dirs=None,
             export_symbols=None, debug=0, extra_preargs=None,
             extra_postargs=None, build_temp=None, target_lang=None):
        """Link the objects."""
        # use separate copies, so we can modify the lists
        extra_preargs = copy.copy(extra_preargs or [])
        libraries = copy.copy(libraries or [])
        objects = copy.copy(objects or [])

        # Additional libraries
        libraries.extend(self.dll_libraries)

        # handle export symbols by creating a def-file
        # with executables this only works with gcc/ld as linker
        if ((export_symbols is not None) and
            (target_desc != self.EXECUTABLE or self.linker_dll == "gcc")):
            # (The linker doesn't do anything if output is up-to-date.
            # So it would probably better to check if we really need this,
            # but for this we had to insert some unchanged parts of
            # UnixCCompiler, and this is not what we want.)

            # we want to put some files in the same directory as the
            # object files are, build_temp doesn't help much
            # where are the object files
            temp_dir = os.path.dirname(objects[0])
            # name of dll to give the helper files the same base name
            (dll_name, dll_extension) = os.path.splitext(
                os.path.basename(output_filename))

            # generate the filenames for these files
            def_file = os.path.join(temp_dir, dll_name + ".def")
            lib_file = os.path.join(temp_dir, 'lib' + dll_name + ".a")

            # Generate .def file
            contents = [
                "LIBRARY %s" % os.path.basename(output_filename),
                "EXPORTS"]
            for sym in export_symbols:
                contents.append(sym)
            self.execute(write_file, (def_file, contents),
                         "writing %s" % def_file)

            # next add options for def-file and to creating import libraries

            # dllwrap uses different options than gcc/ld
            if self.linker_dll == "dllwrap":
                extra_preargs.extend(["--output-lib", lib_file])
                # for dllwrap we have to use a special option
                extra_preargs.extend(["--def", def_file])
            # we use gcc/ld here and can be sure ld is >= 2.9.10
            else:
                # doesn't work: bfd_close build\...\libfoo.a: Invalid operation
                #extra_preargs.extend(["-Wl,--out-implib,%s" % lib_file])
                # for gcc/ld the def-file is specified as any object files
                objects.append(def_file)

        #end: if ((export_symbols is not None) and
        #        (target_desc != self.EXECUTABLE or self.linker_dll == "gcc")):

        # who wants symbols and a many times larger output file
        # should explicitly switch the debug mode on
        # otherwise we let dllwrap/ld strip the output file
        # (On my machine: 10KiB < stripped_file < ??100KiB
        #   unstripped_file = stripped_file + XXX KiB
        #  ( XXX=254 for a typical python extension))
        if not debug:
            extra_preargs.append("-s")

        UnixCCompiler.link(self, target_desc, objects, output_filename,
                           output_dir, libraries, library_dirs,
                           runtime_library_dirs,
                           None, # export_symbols, we do this in our def-file
                           debug, extra_preargs, extra_postargs, build_temp,
                           target_lang)

    # -- Miscellaneous methods -----------------------------------------

    def object_filenames(self, source_filenames, strip_dir=0, output_dir=''):
        """Adds supports for rc and res files."""
        if output_dir is None:
            output_dir = ''
        obj_names = []
        for src_name in source_filenames:
            # use normcase to make sure '.rc' is really '.rc' and not '.RC'
            base, ext = os.path.splitext(os.path.normcase(src_name))
            if ext not in (self.src_extensions + ['.rc','.res']):
                raise UnknownFileError("unknown file type '%s' (from '%s')" % \
                      (ext, src_name))
            if strip_dir:
                base = os.path.basename (base)
            if ext in ('.res', '.rc'):
                # these need to be compiled to object files
                obj_names.append (os.path.join(output_dir,
                                              base + ext + self.obj_extension))
            else:
                obj_names.append (os.path.join(output_dir,
                                               base + self.obj_extension))
        return obj_names

# the same as cygwin plus some additional parameters
class Mingw32CCompiler(CygwinCCompiler):
    """ Handles the Mingw32 port of the GNU C compiler to Windows.
    """
    compiler_type = 'mingw32'

    def __init__(self, verbose=0, dry_run=0, force=0):

        CygwinCCompiler.__init__ (self, verbose, dry_run, force)

        # ld_version >= "2.13" support -shared so use it instead of
        # -mdll -static
        if self.ld_version >= "2.13":
            shared_option = "-shared"
        else:
            shared_option = "-mdll -static"

        # A real mingw32 doesn't need to specify a different entry point,
        # but cygwin 2.91.57 in no-cygwin-mode needs it.
        if self.gcc_version <= "2.91.57":
            entry_point = '--entry _DllMain@12'
        else:
            entry_point = ''

        if is_cygwingcc():
            raise CCompilerError(
                'Cygwin gcc cannot be used with --compiler=mingw32')

        self.set_executables(compiler='gcc -O -Wall',
                             compiler_so='gcc -mdll -O -Wall',
                             compiler_cxx='g++ -O -Wall',
                             linker_exe='gcc',
                             linker_so='%s %s %s'
                                        % (self.linker_dll, shared_option,
                                           entry_point))
        # Maybe we should also append -mthreads, but then the finished
        # dlls need another dll (mingwm10.dll see Mingw32 docs)
        # (-mthreads: Support thread-safe exception handling on `Mingw32')

        # no additional libraries needed
        self.dll_libraries=[]

        # Include the appropriate MSVC runtime library if Python was built
        # with MSVC 7.0 or later.
        self.dll_libraries = get_msvcr()

# Because these compilers aren't configured in Python's pyconfig.h file by
# default, we should at least warn the user if he is using an unmodified
# version.

CONFIG_H_OK = "ok"
CONFIG_H_NOTOK = "not ok"
CONFIG_H_UNCERTAIN = "uncertain"

def check_config_h():
    """Check if the current Python installation appears amenable to building
    extensions with GCC.

    Returns a tuple (status, details), where 'status' is one of the following
    constants:

    - CONFIG_H_OK: all is well, go ahead and compile
    - CONFIG_H_NOTOK: doesn't look good
    - CONFIG_H_UNCERTAIN: not sure -- unable to read pyconfig.h

    'details' is a human-readable string explaining the situation.

    Note there are two ways to conclude "OK": either 'sys.version' contains
    the string "GCC" (implying that this Python was built with GCC), or the
    installed "pyconfig.h" contains the string "__GNUC__".
    """

    # XXX since this function also checks sys.version, it's not strictly a
    # "pyconfig.h" check -- should probably be renamed...

    from distutils import sysconfig

    # if sys.version contains GCC then python was compiled with GCC, and the
    # pyconfig.h file should be OK
    if "GCC" in sys.version:
        return CONFIG_H_OK, "sys.version mentions 'GCC'"

    # let's see if __GNUC__ is mentioned in python.h
    fn = sysconfig.get_config_h_filename()
    try:
        config_h = open(fn)
        try:
            if "__GNUC__" in config_h.read():
                return CONFIG_H_OK, "'%s' mentions '__GNUC__'" % fn
            else:
                return CONFIG_H_NOTOK, "'%s' does not mention '__GNUC__'" % fn
        finally:
            config_h.close()
    except OSError as exc:
        return (CONFIG_H_UNCERTAIN,
                "couldn't read '%s': %s" % (fn, exc.strerror))

RE_VERSION = re.compile(br'(\d+\.\d+(\.\d+)*)')

def _find_exe_version(cmd):
    """Find the version of an executable by running `cmd` in the shell.

    If the command is not found, or the output does not match
    `RE_VERSION`, returns None.
    """
    executable = cmd.split()[0]
    if find_executable(executable) is None:
        return None
    out = Popen(cmd, shell=True, stdout=PIPE).stdout
    try:
        out_string = out.read()
    finally:
        out.close()
    result = RE_VERSION.search(out_string)
    if result is None:
        return None
    # LooseVersion works with strings
    # so we need to decode our bytes
    return LooseVersion(result.group(1).decode())

def get_versions():
    """ Try to find out the versions of gcc, ld and dllwrap.

    If not possible it returns None for it.
    """
    commands = ['gcc -dumpversion', 'ld -v', 'dllwrap --version']
    return tuple([_find_exe_version(cmd) for cmd in commands])

def is_cygwingcc():
    '''Try to determine if the gcc that would be used is from cygwin.'''
    out_string = check_output(['gcc', '-dumpmachine'])
    return out_string.strip().endswith(b'cygwin')
PKU[�1�xExEfancy_getopt.pynu�[���"""distutils.fancy_getopt

Wrapper around the standard getopt module that provides the following
additional features:
  * short and long options are tied together
  * options have help strings, so fancy_getopt could potentially
    create a complete usage summary
  * options set attributes of a passed-in object
"""

import sys, string, re
import getopt
from distutils.errors import *

# Much like command_re in distutils.core, this is close to but not quite
# the same as a Python NAME -- except, in the spirit of most GNU
# utilities, we use '-' in place of '_'.  (The spirit of LISP lives on!)
# The similarities to NAME are again not a coincidence...
longopt_pat = r'[a-zA-Z](?:[a-zA-Z0-9-]*)'
longopt_re = re.compile(r'^%s$' % longopt_pat)

# For recognizing "negative alias" options, eg. "quiet=!verbose"
neg_alias_re = re.compile("^(%s)=!(%s)$" % (longopt_pat, longopt_pat))

# This is used to translate long options to legitimate Python identifiers
# (for use as attributes of some object).
longopt_xlate = str.maketrans('-', '_')

class FancyGetopt:
    """Wrapper around the standard 'getopt()' module that provides some
    handy extra functionality:
      * short and long options are tied together
      * options have help strings, and help text can be assembled
        from them
      * options set attributes of a passed-in object
      * boolean options can have "negative aliases" -- eg. if
        --quiet is the "negative alias" of --verbose, then "--quiet"
        on the command line sets 'verbose' to false
    """

    def __init__(self, option_table=None):
        # The option table is (currently) a list of tuples.  The
        # tuples may have 3 or four values:
        #   (long_option, short_option, help_string [, repeatable])
        # if an option takes an argument, its long_option should have '='
        # appended; short_option should just be a single character, no ':'
        # in any case.  If a long_option doesn't have a corresponding
        # short_option, short_option should be None.  All option tuples
        # must have long options.
        self.option_table = option_table

        # 'option_index' maps long option names to entries in the option
        # table (ie. those 3-tuples).
        self.option_index = {}
        if self.option_table:
            self._build_index()

        # 'alias' records (duh) alias options; {'foo': 'bar'} means
        # --foo is an alias for --bar
        self.alias = {}

        # 'negative_alias' keeps track of options that are the boolean
        # opposite of some other option
        self.negative_alias = {}

        # These keep track of the information in the option table.  We
        # don't actually populate these structures until we're ready to
        # parse the command-line, since the 'option_table' passed in here
        # isn't necessarily the final word.
        self.short_opts = []
        self.long_opts = []
        self.short2long = {}
        self.attr_name = {}
        self.takes_arg = {}

        # And 'option_order' is filled up in 'getopt()'; it records the
        # original order of options (and their values) on the command-line,
        # but expands short options, converts aliases, etc.
        self.option_order = []

    def _build_index(self):
        self.option_index.clear()
        for option in self.option_table:
            self.option_index[option[0]] = option

    def set_option_table(self, option_table):
        self.option_table = option_table
        self._build_index()

    def add_option(self, long_option, short_option=None, help_string=None):
        if long_option in self.option_index:
            raise DistutilsGetoptError(
                  "option conflict: already an option '%s'" % long_option)
        else:
            option = (long_option, short_option, help_string)
            self.option_table.append(option)
            self.option_index[long_option] = option

    def has_option(self, long_option):
        """Return true if the option table for this parser has an
        option with long name 'long_option'."""
        return long_option in self.option_index

    def get_attr_name(self, long_option):
        """Translate long option name 'long_option' to the form it
        has as an attribute of some object: ie., translate hyphens
        to underscores."""
        return long_option.translate(longopt_xlate)

    def _check_alias_dict(self, aliases, what):
        assert isinstance(aliases, dict)
        for (alias, opt) in aliases.items():
            if alias not in self.option_index:
                raise DistutilsGetoptError(("invalid %s '%s': "
                       "option '%s' not defined") % (what, alias, alias))
            if opt not in self.option_index:
                raise DistutilsGetoptError(("invalid %s '%s': "
                       "aliased option '%s' not defined") % (what, alias, opt))

    def set_aliases(self, alias):
        """Set the aliases for this option parser."""
        self._check_alias_dict(alias, "alias")
        self.alias = alias

    def set_negative_aliases(self, negative_alias):
        """Set the negative aliases for this option parser.
        'negative_alias' should be a dictionary mapping option names to
        option names, both the key and value must already be defined
        in the option table."""
        self._check_alias_dict(negative_alias, "negative alias")
        self.negative_alias = negative_alias

    def _grok_option_table(self):
        """Populate the various data structures that keep tabs on the
        option table.  Called by 'getopt()' before it can do anything
        worthwhile.
        """
        self.long_opts = []
        self.short_opts = []
        self.short2long.clear()
        self.repeat = {}

        for option in self.option_table:
            if len(option) == 3:
                long, short, help = option
                repeat = 0
            elif len(option) == 4:
                long, short, help, repeat = option
            else:
                # the option table is part of the code, so simply
                # assert that it is correct
                raise ValueError("invalid option tuple: %r" % (option,))

            # Type- and value-check the option names
            if not isinstance(long, str) or len(long) < 2:
                raise DistutilsGetoptError(("invalid long option '%s': "
                       "must be a string of length >= 2") % long)

            if (not ((short is None) or
                     (isinstance(short, str) and len(short) == 1))):
                raise DistutilsGetoptError("invalid short option '%s': "
                       "must a single character or None" % short)

            self.repeat[long] = repeat
            self.long_opts.append(long)

            if long[-1] == '=':             # option takes an argument?
                if short: short = short + ':'
                long = long[0:-1]
                self.takes_arg[long] = 1
            else:
                # Is option is a "negative alias" for some other option (eg.
                # "quiet" == "!verbose")?
                alias_to = self.negative_alias.get(long)
                if alias_to is not None:
                    if self.takes_arg[alias_to]:
                        raise DistutilsGetoptError(
                              "invalid negative alias '%s': "
                              "aliased option '%s' takes a value"
                              % (long, alias_to))

                    self.long_opts[-1] = long # XXX redundant?!
                self.takes_arg[long] = 0

            # If this is an alias option, make sure its "takes arg" flag is
            # the same as the option it's aliased to.
            alias_to = self.alias.get(long)
            if alias_to is not None:
                if self.takes_arg[long] != self.takes_arg[alias_to]:
                    raise DistutilsGetoptError(
                          "invalid alias '%s': inconsistent with "
                          "aliased option '%s' (one of them takes a value, "
                          "the other doesn't"
                          % (long, alias_to))

            # Now enforce some bondage on the long option name, so we can
            # later translate it to an attribute name on some object.  Have
            # to do this a bit late to make sure we've removed any trailing
            # '='.
            if not longopt_re.match(long):
                raise DistutilsGetoptError(
                       "invalid long option name '%s' "
                       "(must be letters, numbers, hyphens only" % long)

            self.attr_name[long] = self.get_attr_name(long)
            if short:
                self.short_opts.append(short)
                self.short2long[short[0]] = long

    def getopt(self, args=None, object=None):
        """Parse command-line options in args. Store as attributes on object.

        If 'args' is None or not supplied, uses 'sys.argv[1:]'.  If
        'object' is None or not supplied, creates a new OptionDummy
        object, stores option values there, and returns a tuple (args,
        object).  If 'object' is supplied, it is modified in place and
        'getopt()' just returns 'args'; in both cases, the returned
        'args' is a modified copy of the passed-in 'args' list, which
        is left untouched.
        """
        if args is None:
            args = sys.argv[1:]
        if object is None:
            object = OptionDummy()
            created_object = True
        else:
            created_object = False

        self._grok_option_table()

        short_opts = ' '.join(self.short_opts)
        try:
            opts, args = getopt.getopt(args, short_opts, self.long_opts)
        except getopt.error as msg:
            raise DistutilsArgError(msg)

        for opt, val in opts:
            if len(opt) == 2 and opt[0] == '-': # it's a short option
                opt = self.short2long[opt[1]]
            else:
                assert len(opt) > 2 and opt[:2] == '--'
                opt = opt[2:]

            alias = self.alias.get(opt)
            if alias:
                opt = alias

            if not self.takes_arg[opt]:     # boolean option?
                assert val == '', "boolean option can't have value"
                alias = self.negative_alias.get(opt)
                if alias:
                    opt = alias
                    val = 0
                else:
                    val = 1

            attr = self.attr_name[opt]
            # The only repeating option at the moment is 'verbose'.
            # It has a negative option -q quiet, which should set verbose = 0.
            if val and self.repeat.get(attr) is not None:
                val = getattr(object, attr, 0) + 1
            setattr(object, attr, val)
            self.option_order.append((opt, val))

        # for opts
        if created_object:
            return args, object
        else:
            return args

    def get_option_order(self):
        """Returns the list of (option, value) tuples processed by the
        previous run of 'getopt()'.  Raises RuntimeError if
        'getopt()' hasn't been called yet.
        """
        if self.option_order is None:
            raise RuntimeError("'getopt()' hasn't been called yet")
        else:
            return self.option_order

    def generate_help(self, header=None):
        """Generate help text (a list of strings, one per suggested line of
        output) from the option table for this FancyGetopt object.
        """
        # Blithely assume the option table is good: probably wouldn't call
        # 'generate_help()' unless you've already called 'getopt()'.

        # First pass: determine maximum length of long option names
        max_opt = 0
        for option in self.option_table:
            long = option[0]
            short = option[1]
            l = len(long)
            if long[-1] == '=':
                l = l - 1
            if short is not None:
                l = l + 5                   # " (-x)" where short == 'x'
            if l > max_opt:
                max_opt = l

        opt_width = max_opt + 2 + 2 + 2     # room for indent + dashes + gutter

        # Typical help block looks like this:
        #   --foo       controls foonabulation
        # Help block for longest option looks like this:
        #   --flimflam  set the flim-flam level
        # and with wrapped text:
        #   --flimflam  set the flim-flam level (must be between
        #               0 and 100, except on Tuesdays)
        # Options with short names will have the short name shown (but
        # it doesn't contribute to max_opt):
        #   --foo (-f)  controls foonabulation
        # If adding the short option would make the left column too wide,
        # we push the explanation off to the next line
        #   --flimflam (-l)
        #               set the flim-flam level
        # Important parameters:
        #   - 2 spaces before option block start lines
        #   - 2 dashes for each long option name
        #   - min. 2 spaces between option and explanation (gutter)
        #   - 5 characters (incl. space) for short option name

        # Now generate lines of help text.  (If 80 columns were good enough
        # for Jesus, then 78 columns are good enough for me!)
        line_width = 78
        text_width = line_width - opt_width
        big_indent = ' ' * opt_width
        if header:
            lines = [header]
        else:
            lines = ['Option summary:']

        for option in self.option_table:
            long, short, help = option[:3]
            text = wrap_text(help, text_width)
            if long[-1] == '=':
                long = long[0:-1]

            # Case 1: no short option at all (makes life easy)
            if short is None:
                if text:
                    lines.append("  --%-*s  %s" % (max_opt, long, text[0]))
                else:
                    lines.append("  --%-*s  " % (max_opt, long))

            # Case 2: we have a short option, so we have to include it
            # just after the long option
            else:
                opt_names = "%s (-%s)" % (long, short)
                if text:
                    lines.append("  --%-*s  %s" %
                                 (max_opt, opt_names, text[0]))
                else:
                    lines.append("  --%-*s" % opt_names)

            for l in text[1:]:
                lines.append(big_indent + l)
        return lines

    def print_help(self, header=None, file=None):
        if file is None:
            file = sys.stdout
        for line in self.generate_help(header):
            file.write(line + "\n")


def fancy_getopt(options, negative_opt, object, args):
    parser = FancyGetopt(options)
    parser.set_negative_aliases(negative_opt)
    return parser.getopt(args, object)


WS_TRANS = {ord(_wschar) : ' ' for _wschar in string.whitespace}

def wrap_text(text, width):
    """wrap_text(text : string, width : int) -> [string]

    Split 'text' into multiple lines of no more than 'width' characters
    each, and return the list of strings that results.
    """
    if text is None:
        return []
    if len(text) <= width:
        return [text]

    text = text.expandtabs()
    text = text.translate(WS_TRANS)
    chunks = re.split(r'( +|-+)', text)
    chunks = [ch for ch in chunks if ch] # ' - ' results in empty strings
    lines = []

    while chunks:
        cur_line = []                   # list of chunks (to-be-joined)
        cur_len = 0                     # length of current line

        while chunks:
            l = len(chunks[0])
            if cur_len + l <= width:    # can squeeze (at least) this chunk in
                cur_line.append(chunks[0])
                del chunks[0]
                cur_len = cur_len + l
            else:                       # this line is full
                # drop last chunk if all space
                if cur_line and cur_line[-1][0] == ' ':
                    del cur_line[-1]
                break

        if chunks:                      # any chunks left to process?
            # if the current line is still empty, then we had a single
            # chunk that's too big too fit on a line -- so we break
            # down and break it up at the line width
            if cur_len == 0:
                cur_line.append(chunks[0][0:width])
                chunks[0] = chunks[0][width:]

            # all-whitespace chunks at the end of a line can be discarded
            # (and we know from the re.split above that if a chunk has
            # *any* whitespace, it is *all* whitespace)
            if chunks[0][0] == ' ':
                del chunks[0]

        # and store this line in the list-of-all-lines -- as a single
        # string, of course!
        lines.append(''.join(cur_line))

    return lines


def translate_longopt(opt):
    """Convert a long option name to a valid Python identifier by
    changing "-" to "_".
    """
    return opt.translate(longopt_xlate)


class OptionDummy:
    """Dummy class just used as a place to hold command-line option
    values as instance attributes."""

    def __init__(self, options=[]):
        """Create a new OptionDummy instance.  The attributes listed in
        'options' will be initialized to None."""
        for opt in options:
            setattr(self, opt, None)


if __name__ == "__main__":
    text = """\
Tra-la-la, supercalifragilisticexpialidocious.
How *do* you spell that odd word, anyways?
(Someone ask Mary -- she'll know [or she'll
say, "How should I know?"].)"""

    for w in (10, 20, 30, 40):
        print("width: %d" % w)
        print("\n".join(wrap_text(text, w)))
        print()
PKU[�l�W:W:bcppcompiler.pynu�[���"""distutils.bcppcompiler

Contains BorlandCCompiler, an implementation of the abstract CCompiler class
for the Borland C++ compiler.
"""

# This implementation by Lyle Johnson, based on the original msvccompiler.py
# module and using the directions originally published by Gordon Williams.

# XXX looks like there's a LOT of overlap between these two classes:
# someone should sit down and factor out the common code as
# WindowsCCompiler!  --GPW


import os
from distutils.errors import \
     DistutilsExecError, DistutilsPlatformError, \
     CompileError, LibError, LinkError, UnknownFileError
from distutils.ccompiler import \
     CCompiler, gen_preprocess_options, gen_lib_options
from distutils.file_util import write_file
from distutils.dep_util import newer
from distutils import log

class BCPPCompiler(CCompiler) :
    """Concrete class that implements an interface to the Borland C/C++
    compiler, as defined by the CCompiler abstract class.
    """

    compiler_type = 'bcpp'

    # Just set this so CCompiler's constructor doesn't barf.  We currently
    # don't use the 'set_executables()' bureaucracy provided by CCompiler,
    # as it really isn't necessary for this sort of single-compiler class.
    # Would be nice to have a consistent interface with UnixCCompiler,
    # though, so it's worth thinking about.
    executables = {}

    # Private class data (need to distinguish C from C++ source for compiler)
    _c_extensions = ['.c']
    _cpp_extensions = ['.cc', '.cpp', '.cxx']

    # Needed for the filename generation methods provided by the
    # base class, CCompiler.
    src_extensions = _c_extensions + _cpp_extensions
    obj_extension = '.obj'
    static_lib_extension = '.lib'
    shared_lib_extension = '.dll'
    static_lib_format = shared_lib_format = '%s%s'
    exe_extension = '.exe'


    def __init__ (self,
                  verbose=0,
                  dry_run=0,
                  force=0):

        CCompiler.__init__ (self, verbose, dry_run, force)

        # These executables are assumed to all be in the path.
        # Borland doesn't seem to use any special registry settings to
        # indicate their installation locations.

        self.cc = "bcc32.exe"
        self.linker = "ilink32.exe"
        self.lib = "tlib.exe"

        self.preprocess_options = None
        self.compile_options = ['/tWM', '/O2', '/q', '/g0']
        self.compile_options_debug = ['/tWM', '/Od', '/q', '/g0']

        self.ldflags_shared = ['/Tpd', '/Gn', '/q', '/x']
        self.ldflags_shared_debug = ['/Tpd', '/Gn', '/q', '/x']
        self.ldflags_static = []
        self.ldflags_exe = ['/Gn', '/q', '/x']
        self.ldflags_exe_debug = ['/Gn', '/q', '/x','/r']


    # -- Worker methods ------------------------------------------------

    def compile(self, sources,
                output_dir=None, macros=None, include_dirs=None, debug=0,
                extra_preargs=None, extra_postargs=None, depends=None):

        macros, objects, extra_postargs, pp_opts, build = \
                self._setup_compile(output_dir, macros, include_dirs, sources,
                                    depends, extra_postargs)
        compile_opts = extra_preargs or []
        compile_opts.append ('-c')
        if debug:
            compile_opts.extend (self.compile_options_debug)
        else:
            compile_opts.extend (self.compile_options)

        for obj in objects:
            try:
                src, ext = build[obj]
            except KeyError:
                continue
            # XXX why do the normpath here?
            src = os.path.normpath(src)
            obj = os.path.normpath(obj)
            # XXX _setup_compile() did a mkpath() too but before the normpath.
            # Is it possible to skip the normpath?
            self.mkpath(os.path.dirname(obj))

            if ext == '.res':
                # This is already a binary file -- skip it.
                continue # the 'for' loop
            if ext == '.rc':
                # This needs to be compiled to a .res file -- do it now.
                try:
                    self.spawn (["brcc32", "-fo", obj, src])
                except DistutilsExecError as msg:
                    raise CompileError(msg)
                continue # the 'for' loop

            # The next two are both for the real compiler.
            if ext in self._c_extensions:
                input_opt = ""
            elif ext in self._cpp_extensions:
                input_opt = "-P"
            else:
                # Unknown file type -- no extra options.  The compiler
                # will probably fail, but let it just in case this is a
                # file the compiler recognizes even if we don't.
                input_opt = ""

            output_opt = "-o" + obj

            # Compiler command line syntax is: "bcc32 [options] file(s)".
            # Note that the source file names must appear at the end of
            # the command line.
            try:
                self.spawn ([self.cc] + compile_opts + pp_opts +
                            [input_opt, output_opt] +
                            extra_postargs + [src])
            except DistutilsExecError as msg:
                raise CompileError(msg)

        return objects

    # compile ()


    def create_static_lib (self,
                           objects,
                           output_libname,
                           output_dir=None,
                           debug=0,
                           target_lang=None):

        (objects, output_dir) = self._fix_object_args (objects, output_dir)
        output_filename = \
            self.library_filename (output_libname, output_dir=output_dir)

        if self._need_link (objects, output_filename):
            lib_args = [output_filename, '/u'] + objects
            if debug:
                pass                    # XXX what goes here?
            try:
                self.spawn ([self.lib] + lib_args)
            except DistutilsExecError as msg:
                raise LibError(msg)
        else:
            log.debug("skipping %s (up-to-date)", output_filename)

    # create_static_lib ()


    def link (self,
              target_desc,
              objects,
              output_filename,
              output_dir=None,
              libraries=None,
              library_dirs=None,
              runtime_library_dirs=None,
              export_symbols=None,
              debug=0,
              extra_preargs=None,
              extra_postargs=None,
              build_temp=None,
              target_lang=None):

        # XXX this ignores 'build_temp'!  should follow the lead of
        # msvccompiler.py

        (objects, output_dir) = self._fix_object_args (objects, output_dir)
        (libraries, library_dirs, runtime_library_dirs) = \
            self._fix_lib_args (libraries, library_dirs, runtime_library_dirs)

        if runtime_library_dirs:
            log.warn("I don't know what to do with 'runtime_library_dirs': %s",
                     str(runtime_library_dirs))

        if output_dir is not None:
            output_filename = os.path.join (output_dir, output_filename)

        if self._need_link (objects, output_filename):

            # Figure out linker args based on type of target.
            if target_desc == CCompiler.EXECUTABLE:
                startup_obj = 'c0w32'
                if debug:
                    ld_args = self.ldflags_exe_debug[:]
                else:
                    ld_args = self.ldflags_exe[:]
            else:
                startup_obj = 'c0d32'
                if debug:
                    ld_args = self.ldflags_shared_debug[:]
                else:
                    ld_args = self.ldflags_shared[:]


            # Create a temporary exports file for use by the linker
            if export_symbols is None:
                def_file = ''
            else:
                head, tail = os.path.split (output_filename)
                modname, ext = os.path.splitext (tail)
                temp_dir = os.path.dirname(objects[0]) # preserve tree structure
                def_file = os.path.join (temp_dir, '%s.def' % modname)
                contents = ['EXPORTS']
                for sym in (export_symbols or []):
                    contents.append('  %s=_%s' % (sym, sym))
                self.execute(write_file, (def_file, contents),
                             "writing %s" % def_file)

            # Borland C++ has problems with '/' in paths
            objects2 = map(os.path.normpath, objects)
            # split objects in .obj and .res files
            # Borland C++ needs them at different positions in the command line
            objects = [startup_obj]
            resources = []
            for file in objects2:
                (base, ext) = os.path.splitext(os.path.normcase(file))
                if ext == '.res':
                    resources.append(file)
                else:
                    objects.append(file)


            for l in library_dirs:
                ld_args.append("/L%s" % os.path.normpath(l))
            ld_args.append("/L.") # we sometimes use relative paths

            # list of object files
            ld_args.extend(objects)

            # XXX the command-line syntax for Borland C++ is a bit wonky;
            # certain filenames are jammed together in one big string, but
            # comma-delimited.  This doesn't mesh too well with the
            # Unix-centric attitude (with a DOS/Windows quoting hack) of
            # 'spawn()', so constructing the argument list is a bit
            # awkward.  Note that doing the obvious thing and jamming all
            # the filenames and commas into one argument would be wrong,
            # because 'spawn()' would quote any filenames with spaces in
            # them.  Arghghh!.  Apparently it works fine as coded...

            # name of dll/exe file
            ld_args.extend([',',output_filename])
            # no map file and start libraries
            ld_args.append(',,')

            for lib in libraries:
                # see if we find it and if there is a bcpp specific lib
                # (xxx_bcpp.lib)
                libfile = self.find_library_file(library_dirs, lib, debug)
                if libfile is None:
                    ld_args.append(lib)
                    # probably a BCPP internal library -- don't warn
                else:
                    # full name which prefers bcpp_xxx.lib over xxx.lib
                    ld_args.append(libfile)

            # some default libraries
            ld_args.append ('import32')
            ld_args.append ('cw32mt')

            # def file for export symbols
            ld_args.extend([',',def_file])
            # add resource files
            ld_args.append(',')
            ld_args.extend(resources)


            if extra_preargs:
                ld_args[:0] = extra_preargs
            if extra_postargs:
                ld_args.extend(extra_postargs)

            self.mkpath (os.path.dirname (output_filename))
            try:
                self.spawn ([self.linker] + ld_args)
            except DistutilsExecError as msg:
                raise LinkError(msg)

        else:
            log.debug("skipping %s (up-to-date)", output_filename)

    # link ()

    # -- Miscellaneous methods -----------------------------------------


    def find_library_file (self, dirs, lib, debug=0):
        # List of effective library names to try, in order of preference:
        # xxx_bcpp.lib is better than xxx.lib
        # and xxx_d.lib is better than xxx.lib if debug is set
        #
        # The "_bcpp" suffix is to handle a Python installation for people
        # with multiple compilers (primarily Distutils hackers, I suspect
        # ;-).  The idea is they'd have one static library for each
        # compiler they care about, since (almost?) every Windows compiler
        # seems to have a different format for static libraries.
        if debug:
            dlib = (lib + "_d")
            try_names = (dlib + "_bcpp", lib + "_bcpp", dlib, lib)
        else:
            try_names = (lib + "_bcpp", lib)

        for dir in dirs:
            for name in try_names:
                libfile = os.path.join(dir, self.library_filename(name))
                if os.path.exists(libfile):
                    return libfile
        else:
            # Oops, didn't find it in *any* of 'dirs'
            return None

    # overwrite the one from CCompiler to support rc and res-files
    def object_filenames (self,
                          source_filenames,
                          strip_dir=0,
                          output_dir=''):
        if output_dir is None: output_dir = ''
        obj_names = []
        for src_name in source_filenames:
            # use normcase to make sure '.rc' is really '.rc' and not '.RC'
            (base, ext) = os.path.splitext (os.path.normcase(src_name))
            if ext not in (self.src_extensions + ['.rc','.res']):
                raise UnknownFileError("unknown file type '%s' (from '%s')" % \
                      (ext, src_name))
            if strip_dir:
                base = os.path.basename (base)
            if ext == '.res':
                # these can go unchanged
                obj_names.append (os.path.join (output_dir, base + ext))
            elif ext == '.rc':
                # these need to be compiled to .res-files
                obj_names.append (os.path.join (output_dir, base + '.res'))
            else:
                obj_names.append (os.path.join (output_dir,
                                            base + self.obj_extension))
        return obj_names

    # object_filenames ()

    def preprocess (self,
                    source,
                    output_file=None,
                    macros=None,
                    include_dirs=None,
                    extra_preargs=None,
                    extra_postargs=None):

        (_, macros, include_dirs) = \
            self._fix_compile_args(None, macros, include_dirs)
        pp_opts = gen_preprocess_options(macros, include_dirs)
        pp_args = ['cpp32.exe'] + pp_opts
        if output_file is not None:
            pp_args.append('-o' + output_file)
        if extra_preargs:
            pp_args[:0] = extra_preargs
        if extra_postargs:
            pp_args.extend(extra_postargs)
        pp_args.append(source)

        # We need to preprocess: either we're being forced to, or the
        # source file is newer than the target (or the target doesn't
        # exist).
        if self.force or output_file is None or newer(source, output_file):
            if output_file:
                self.mkpath(os.path.dirname(output_file))
            try:
                self.spawn(pp_args)
            except DistutilsExecError as msg:
                print(msg)
                raise CompileError(msg)

    # preprocess()
PKU[[sl���spawn.pynu�[���"""distutils.spawn

Provides the 'spawn()' function, a front-end to various platform-
specific functions for launching another program in a sub-process.
Also provides the 'find_executable()' to search the path for a given
executable name.
"""

import sys
import os

from distutils.errors import DistutilsPlatformError, DistutilsExecError
from distutils.debug import DEBUG
from distutils import log

def spawn(cmd, search_path=1, verbose=0, dry_run=0):
    """Run another program, specified as a command list 'cmd', in a new process.

    'cmd' is just the argument list for the new process, ie.
    cmd[0] is the program to run and cmd[1:] are the rest of its arguments.
    There is no way to run a program with a name different from that of its
    executable.

    If 'search_path' is true (the default), the system's executable
    search path will be used to find the program; otherwise, cmd[0]
    must be the exact path to the executable.  If 'dry_run' is true,
    the command will not actually be run.

    Raise DistutilsExecError if running the program fails in any way; just
    return on success.
    """
    # cmd is documented as a list, but just in case some code passes a tuple
    # in, protect our %-formatting code against horrible death
    cmd = list(cmd)
    if os.name == 'posix':
        _spawn_posix(cmd, search_path, dry_run=dry_run)
    elif os.name == 'nt':
        _spawn_nt(cmd, search_path, dry_run=dry_run)
    else:
        raise DistutilsPlatformError(
              "don't know how to spawn programs on platform '%s'" % os.name)

def _nt_quote_args(args):
    """Quote command-line arguments for DOS/Windows conventions.

    Just wraps every argument which contains blanks in double quotes, and
    returns a new argument list.
    """
    # XXX this doesn't seem very robust to me -- but if the Windows guys
    # say it'll work, I guess I'll have to accept it.  (What if an arg
    # contains quotes?  What other magic characters, other than spaces,
    # have to be escaped?  Is there an escaping mechanism other than
    # quoting?)
    for i, arg in enumerate(args):
        if ' ' in arg:
            args[i] = '"%s"' % arg
    return args

def _spawn_nt(cmd, search_path=1, verbose=0, dry_run=0):
    executable = cmd[0]
    cmd = _nt_quote_args(cmd)
    if search_path:
        # either we find one or it stays the same
        executable = find_executable(executable) or executable
    log.info(' '.join([executable] + cmd[1:]))
    if not dry_run:
        # spawn for NT requires a full path to the .exe
        try:
            rc = os.spawnv(os.P_WAIT, executable, cmd)
        except OSError as exc:
            # this seems to happen when the command isn't found
            if not DEBUG:
                cmd = executable
            raise DistutilsExecError(
                  "command %r failed: %s" % (cmd, exc.args[-1]))
        if rc != 0:
            # and this reflects the command running but failing
            if not DEBUG:
                cmd = executable
            raise DistutilsExecError(
                  "command %r failed with exit status %d" % (cmd, rc))

if sys.platform == 'darwin':
    _cfg_target = None
    _cfg_target_split = None

def _spawn_posix(cmd, search_path=1, verbose=0, dry_run=0):
    log.info(' '.join(cmd))
    if dry_run:
        return
    executable = cmd[0]
    exec_fn = search_path and os.execvp or os.execv
    env = None
    if sys.platform == 'darwin':
        global _cfg_target, _cfg_target_split
        if _cfg_target is None:
            from distutils import sysconfig
            _cfg_target = sysconfig.get_config_var(
                                  'MACOSX_DEPLOYMENT_TARGET') or ''
            if _cfg_target:
                _cfg_target_split = [int(x) for x in _cfg_target.split('.')]
        if _cfg_target:
            # ensure that the deployment target of build process is not less
            # than that used when the interpreter was built. This ensures
            # extension modules are built with correct compatibility values
            cur_target = os.environ.get('MACOSX_DEPLOYMENT_TARGET', _cfg_target)
            if _cfg_target_split > [int(x) for x in cur_target.split('.')]:
                my_msg = ('$MACOSX_DEPLOYMENT_TARGET mismatch: '
                          'now "%s" but "%s" during configure'
                                % (cur_target, _cfg_target))
                raise DistutilsPlatformError(my_msg)
            env = dict(os.environ,
                       MACOSX_DEPLOYMENT_TARGET=cur_target)
            exec_fn = search_path and os.execvpe or os.execve
    pid = os.fork()
    if pid == 0: # in the child
        try:
            if env is None:
                exec_fn(executable, cmd)
            else:
                exec_fn(executable, cmd, env)
        except OSError as e:
            if not DEBUG:
                cmd = executable
            sys.stderr.write("unable to execute %r: %s\n"
                             % (cmd, e.strerror))
            os._exit(1)

        if not DEBUG:
            cmd = executable
        sys.stderr.write("unable to execute %r for unknown reasons" % cmd)
        os._exit(1)
    else: # in the parent
        # Loop until the child either exits or is terminated by a signal
        # (ie. keep waiting if it's merely stopped)
        while True:
            try:
                pid, status = os.waitpid(pid, 0)
            except OSError as exc:
                if not DEBUG:
                    cmd = executable
                raise DistutilsExecError(
                      "command %r failed: %s" % (cmd, exc.args[-1]))
            if os.WIFSIGNALED(status):
                if not DEBUG:
                    cmd = executable
                raise DistutilsExecError(
                      "command %r terminated by signal %d"
                      % (cmd, os.WTERMSIG(status)))
            elif os.WIFEXITED(status):
                exit_status = os.WEXITSTATUS(status)
                if exit_status == 0:
                    return   # hey, it succeeded!
                else:
                    if not DEBUG:
                        cmd = executable
                    raise DistutilsExecError(
                          "command %r failed with exit status %d"
                          % (cmd, exit_status))
            elif os.WIFSTOPPED(status):
                continue
            else:
                if not DEBUG:
                    cmd = executable
                raise DistutilsExecError(
                      "unknown error executing %r: termination status %d"
                      % (cmd, status))

def find_executable(executable, path=None):
    """Tries to find 'executable' in the directories listed in 'path'.

    A string listing directories separated by 'os.pathsep'; defaults to
    os.environ['PATH'].  Returns the complete filename or None if not found.
    """
    _, ext = os.path.splitext(executable)
    if (sys.platform == 'win32') and (ext != '.exe'):
        executable = executable + '.exe'

    if os.path.isfile(executable):
        return executable

    if path is None:
        path = os.environ.get('PATH', None)
        if path is None:
            try:
                path = os.confstr("CS_PATH")
            except (AttributeError, ValueError):
                # os.confstr() or CS_PATH is not available
                path = os.defpath
        # bpo-35755: Don't use os.defpath if the PATH environment variable is
        # set to an empty string

    # PATH='' doesn't match, whereas PATH=':' looks in the current directory
    if not path:
        return None

    paths = path.split(os.pathsep)
    for p in paths:
        f = os.path.join(p, executable)
        if os.path.isfile(f):
            # the file exists, we have a shot at spawn working
            return f
    return None
PKU[��=�/w/wmsvc9compiler.pynu�[���"""distutils.msvc9compiler

Contains MSVCCompiler, an implementation of the abstract CCompiler class
for the Microsoft Visual Studio 2008.

The module is compatible with VS 2005 and VS 2008. You can find legacy support
for older versions of VS in distutils.msvccompiler.
"""

# Written by Perry Stoll
# hacked by Robin Becker and Thomas Heller to do a better job of
#   finding DevStudio (through the registry)
# ported to VS2005 and VS 2008 by Christian Heimes

import os
import subprocess
import sys
import re

from distutils.errors import DistutilsExecError, DistutilsPlatformError, \
                             CompileError, LibError, LinkError
from distutils.ccompiler import CCompiler, gen_preprocess_options, \
                                gen_lib_options
from distutils import log
from distutils.util import get_platform

import winreg

RegOpenKeyEx = winreg.OpenKeyEx
RegEnumKey = winreg.EnumKey
RegEnumValue = winreg.EnumValue
RegError = winreg.error

HKEYS = (winreg.HKEY_USERS,
         winreg.HKEY_CURRENT_USER,
         winreg.HKEY_LOCAL_MACHINE,
         winreg.HKEY_CLASSES_ROOT)

NATIVE_WIN64 = (sys.platform == 'win32' and sys.maxsize > 2**32)
if NATIVE_WIN64:
    # Visual C++ is a 32-bit application, so we need to look in
    # the corresponding registry branch, if we're running a
    # 64-bit Python on Win64
    VS_BASE = r"Software\Wow6432Node\Microsoft\VisualStudio\%0.1f"
    WINSDK_BASE = r"Software\Wow6432Node\Microsoft\Microsoft SDKs\Windows"
    NET_BASE = r"Software\Wow6432Node\Microsoft\.NETFramework"
else:
    VS_BASE = r"Software\Microsoft\VisualStudio\%0.1f"
    WINSDK_BASE = r"Software\Microsoft\Microsoft SDKs\Windows"
    NET_BASE = r"Software\Microsoft\.NETFramework"

# A map keyed by get_platform() return values to values accepted by
# 'vcvarsall.bat'.  Note a cross-compile may combine these (eg, 'x86_amd64' is
# the param to cross-compile on x86 targeting amd64.)
PLAT_TO_VCVARS = {
    'win32' : 'x86',
    'win-amd64' : 'amd64',
}

class Reg:
    """Helper class to read values from the registry
    """

    def get_value(cls, path, key):
        for base in HKEYS:
            d = cls.read_values(base, path)
            if d and key in d:
                return d[key]
        raise KeyError(key)
    get_value = classmethod(get_value)

    def read_keys(cls, base, key):
        """Return list of registry keys."""
        try:
            handle = RegOpenKeyEx(base, key)
        except RegError:
            return None
        L = []
        i = 0
        while True:
            try:
                k = RegEnumKey(handle, i)
            except RegError:
                break
            L.append(k)
            i += 1
        return L
    read_keys = classmethod(read_keys)

    def read_values(cls, base, key):
        """Return dict of registry keys and values.

        All names are converted to lowercase.
        """
        try:
            handle = RegOpenKeyEx(base, key)
        except RegError:
            return None
        d = {}
        i = 0
        while True:
            try:
                name, value, type = RegEnumValue(handle, i)
            except RegError:
                break
            name = name.lower()
            d[cls.convert_mbcs(name)] = cls.convert_mbcs(value)
            i += 1
        return d
    read_values = classmethod(read_values)

    def convert_mbcs(s):
        dec = getattr(s, "decode", None)
        if dec is not None:
            try:
                s = dec("mbcs")
            except UnicodeError:
                pass
        return s
    convert_mbcs = staticmethod(convert_mbcs)

class MacroExpander:

    def __init__(self, version):
        self.macros = {}
        self.vsbase = VS_BASE % version
        self.load_macros(version)

    def set_macro(self, macro, path, key):
        self.macros["$(%s)" % macro] = Reg.get_value(path, key)

    def load_macros(self, version):
        self.set_macro("VCInstallDir", self.vsbase + r"\Setup\VC", "productdir")
        self.set_macro("VSInstallDir", self.vsbase + r"\Setup\VS", "productdir")
        self.set_macro("FrameworkDir", NET_BASE, "installroot")
        try:
            if version >= 8.0:
                self.set_macro("FrameworkSDKDir", NET_BASE,
                               "sdkinstallrootv2.0")
            else:
                raise KeyError("sdkinstallrootv2.0")
        except KeyError:
            raise DistutilsPlatformError(
            """Python was built with Visual Studio 2008;
extensions must be built with a compiler than can generate compatible binaries.
Visual Studio 2008 was not found on this system. If you have Cygwin installed,
you can try compiling with MingW32, by passing "-c mingw32" to setup.py.""")

        if version >= 9.0:
            self.set_macro("FrameworkVersion", self.vsbase, "clr version")
            self.set_macro("WindowsSdkDir", WINSDK_BASE, "currentinstallfolder")
        else:
            p = r"Software\Microsoft\NET Framework Setup\Product"
            for base in HKEYS:
                try:
                    h = RegOpenKeyEx(base, p)
                except RegError:
                    continue
                key = RegEnumKey(h, 0)
                d = Reg.get_value(base, r"%s\%s" % (p, key))
                self.macros["$(FrameworkVersion)"] = d["version"]

    def sub(self, s):
        for k, v in self.macros.items():
            s = s.replace(k, v)
        return s

def get_build_version():
    """Return the version of MSVC that was used to build Python.

    For Python 2.3 and up, the version number is included in
    sys.version.  For earlier versions, assume the compiler is MSVC 6.
    """
    prefix = "MSC v."
    i = sys.version.find(prefix)
    if i == -1:
        return 6
    i = i + len(prefix)
    s, rest = sys.version[i:].split(" ", 1)
    majorVersion = int(s[:-2]) - 6
    if majorVersion >= 13:
        # v13 was skipped and should be v14
        majorVersion += 1
    minorVersion = int(s[2:3]) / 10.0
    # I don't think paths are affected by minor version in version 6
    if majorVersion == 6:
        minorVersion = 0
    if majorVersion >= 6:
        return majorVersion + minorVersion
    # else we don't know what version of the compiler this is
    return None

def normalize_and_reduce_paths(paths):
    """Return a list of normalized paths with duplicates removed.

    The current order of paths is maintained.
    """
    # Paths are normalized so things like:  /a and /a/ aren't both preserved.
    reduced_paths = []
    for p in paths:
        np = os.path.normpath(p)
        # XXX(nnorwitz): O(n**2), if reduced_paths gets long perhaps use a set.
        if np not in reduced_paths:
            reduced_paths.append(np)
    return reduced_paths

def removeDuplicates(variable):
    """Remove duplicate values of an environment variable.
    """
    oldList = variable.split(os.pathsep)
    newList = []
    for i in oldList:
        if i not in newList:
            newList.append(i)
    newVariable = os.pathsep.join(newList)
    return newVariable

def find_vcvarsall(version):
    """Find the vcvarsall.bat file

    At first it tries to find the productdir of VS 2008 in the registry. If
    that fails it falls back to the VS90COMNTOOLS env var.
    """
    vsbase = VS_BASE % version
    try:
        productdir = Reg.get_value(r"%s\Setup\VC" % vsbase,
                                   "productdir")
    except KeyError:
        log.debug("Unable to find productdir in registry")
        productdir = None

    if not productdir or not os.path.isdir(productdir):
        toolskey = "VS%0.f0COMNTOOLS" % version
        toolsdir = os.environ.get(toolskey, None)

        if toolsdir and os.path.isdir(toolsdir):
            productdir = os.path.join(toolsdir, os.pardir, os.pardir, "VC")
            productdir = os.path.abspath(productdir)
            if not os.path.isdir(productdir):
                log.debug("%s is not a valid directory" % productdir)
                return None
        else:
            log.debug("Env var %s is not set or invalid" % toolskey)
    if not productdir:
        log.debug("No productdir found")
        return None
    vcvarsall = os.path.join(productdir, "vcvarsall.bat")
    if os.path.isfile(vcvarsall):
        return vcvarsall
    log.debug("Unable to find vcvarsall.bat")
    return None

def query_vcvarsall(version, arch="x86"):
    """Launch vcvarsall.bat and read the settings from its environment
    """
    vcvarsall = find_vcvarsall(version)
    interesting = {"include", "lib", "libpath", "path"}
    result = {}

    if vcvarsall is None:
        raise DistutilsPlatformError("Unable to find vcvarsall.bat")
    log.debug("Calling 'vcvarsall.bat %s' (version=%s)", arch, version)
    popen = subprocess.Popen('"%s" %s & set' % (vcvarsall, arch),
                             stdout=subprocess.PIPE,
                             stderr=subprocess.PIPE)
    try:
        stdout, stderr = popen.communicate()
        if popen.wait() != 0:
            raise DistutilsPlatformError(stderr.decode("mbcs"))

        stdout = stdout.decode("mbcs")
        for line in stdout.split("\n"):
            line = Reg.convert_mbcs(line)
            if '=' not in line:
                continue
            line = line.strip()
            key, value = line.split('=', 1)
            key = key.lower()
            if key in interesting:
                if value.endswith(os.pathsep):
                    value = value[:-1]
                result[key] = removeDuplicates(value)

    finally:
        popen.stdout.close()
        popen.stderr.close()

    if len(result) != len(interesting):
        raise ValueError(str(list(result.keys())))

    return result

# More globals
VERSION = get_build_version()
if VERSION < 8.0:
    raise DistutilsPlatformError("VC %0.1f is not supported by this module" % VERSION)
# MACROS = MacroExpander(VERSION)

class MSVCCompiler(CCompiler) :
    """Concrete class that implements an interface to Microsoft Visual C++,
       as defined by the CCompiler abstract class."""

    compiler_type = 'msvc'

    # Just set this so CCompiler's constructor doesn't barf.  We currently
    # don't use the 'set_executables()' bureaucracy provided by CCompiler,
    # as it really isn't necessary for this sort of single-compiler class.
    # Would be nice to have a consistent interface with UnixCCompiler,
    # though, so it's worth thinking about.
    executables = {}

    # Private class data (need to distinguish C from C++ source for compiler)
    _c_extensions = ['.c']
    _cpp_extensions = ['.cc', '.cpp', '.cxx']
    _rc_extensions = ['.rc']
    _mc_extensions = ['.mc']

    # Needed for the filename generation methods provided by the
    # base class, CCompiler.
    src_extensions = (_c_extensions + _cpp_extensions +
                      _rc_extensions + _mc_extensions)
    res_extension = '.res'
    obj_extension = '.obj'
    static_lib_extension = '.lib'
    shared_lib_extension = '.dll'
    static_lib_format = shared_lib_format = '%s%s'
    exe_extension = '.exe'

    def __init__(self, verbose=0, dry_run=0, force=0):
        CCompiler.__init__ (self, verbose, dry_run, force)
        self.__version = VERSION
        self.__root = r"Software\Microsoft\VisualStudio"
        # self.__macros = MACROS
        self.__paths = []
        # target platform (.plat_name is consistent with 'bdist')
        self.plat_name = None
        self.__arch = None # deprecated name
        self.initialized = False

    def initialize(self, plat_name=None):
        # multi-init means we would need to check platform same each time...
        assert not self.initialized, "don't init multiple times"
        if plat_name is None:
            plat_name = get_platform()
        # sanity check for platforms to prevent obscure errors later.
        ok_plats = 'win32', 'win-amd64'
        if plat_name not in ok_plats:
            raise DistutilsPlatformError("--plat-name must be one of %s" %
                                         (ok_plats,))

        if "DISTUTILS_USE_SDK" in os.environ and "MSSdk" in os.environ and self.find_exe("cl.exe"):
            # Assume that the SDK set up everything alright; don't try to be
            # smarter
            self.cc = "cl.exe"
            self.linker = "link.exe"
            self.lib = "lib.exe"
            self.rc = "rc.exe"
            self.mc = "mc.exe"
        else:
            # On x86, 'vcvars32.bat amd64' creates an env that doesn't work;
            # to cross compile, you use 'x86_amd64'.
            # On AMD64, 'vcvars32.bat amd64' is a native build env; to cross
            # compile use 'x86' (ie, it runs the x86 compiler directly)
            if plat_name == get_platform() or plat_name == 'win32':
                # native build or cross-compile to win32
                plat_spec = PLAT_TO_VCVARS[plat_name]
            else:
                # cross compile from win32 -> some 64bit
                plat_spec = PLAT_TO_VCVARS[get_platform()] + '_' + \
                            PLAT_TO_VCVARS[plat_name]

            vc_env = query_vcvarsall(VERSION, plat_spec)

            self.__paths = vc_env['path'].split(os.pathsep)
            os.environ['lib'] = vc_env['lib']
            os.environ['include'] = vc_env['include']

            if len(self.__paths) == 0:
                raise DistutilsPlatformError("Python was built with %s, "
                       "and extensions need to be built with the same "
                       "version of the compiler, but it isn't installed."
                       % self.__product)

            self.cc = self.find_exe("cl.exe")
            self.linker = self.find_exe("link.exe")
            self.lib = self.find_exe("lib.exe")
            self.rc = self.find_exe("rc.exe")   # resource compiler
            self.mc = self.find_exe("mc.exe")   # message compiler
            #self.set_path_env_var('lib')
            #self.set_path_env_var('include')

        # extend the MSVC path with the current path
        try:
            for p in os.environ['path'].split(';'):
                self.__paths.append(p)
        except KeyError:
            pass
        self.__paths = normalize_and_reduce_paths(self.__paths)
        os.environ['path'] = ";".join(self.__paths)

        self.preprocess_options = None
        if self.__arch == "x86":
            self.compile_options = [ '/nologo', '/Ox', '/MD', '/W3',
                                     '/DNDEBUG']
            self.compile_options_debug = ['/nologo', '/Od', '/MDd', '/W3',
                                          '/Z7', '/D_DEBUG']
        else:
            # Win64
            self.compile_options = [ '/nologo', '/Ox', '/MD', '/W3', '/GS-' ,
                                     '/DNDEBUG']
            self.compile_options_debug = ['/nologo', '/Od', '/MDd', '/W3', '/GS-',
                                          '/Z7', '/D_DEBUG']

        self.ldflags_shared = ['/DLL', '/nologo', '/INCREMENTAL:NO']
        if self.__version >= 7:
            self.ldflags_shared_debug = [
                '/DLL', '/nologo', '/INCREMENTAL:no', '/DEBUG'
                ]
        self.ldflags_static = [ '/nologo']

        self.initialized = True

    # -- Worker methods ------------------------------------------------

    def object_filenames(self,
                         source_filenames,
                         strip_dir=0,
                         output_dir=''):
        # Copied from ccompiler.py, extended to return .res as 'object'-file
        # for .rc input file
        if output_dir is None: output_dir = ''
        obj_names = []
        for src_name in source_filenames:
            (base, ext) = os.path.splitext (src_name)
            base = os.path.splitdrive(base)[1] # Chop off the drive
            base = base[os.path.isabs(base):]  # If abs, chop off leading /
            if ext not in self.src_extensions:
                # Better to raise an exception instead of silently continuing
                # and later complain about sources and targets having
                # different lengths
                raise CompileError ("Don't know how to compile %s" % src_name)
            if strip_dir:
                base = os.path.basename (base)
            if ext in self._rc_extensions:
                obj_names.append (os.path.join (output_dir,
                                                base + self.res_extension))
            elif ext in self._mc_extensions:
                obj_names.append (os.path.join (output_dir,
                                                base + self.res_extension))
            else:
                obj_names.append (os.path.join (output_dir,
                                                base + self.obj_extension))
        return obj_names


    def compile(self, sources,
                output_dir=None, macros=None, include_dirs=None, debug=0,
                extra_preargs=None, extra_postargs=None, depends=None):

        if not self.initialized:
            self.initialize()
        compile_info = self._setup_compile(output_dir, macros, include_dirs,
                                           sources, depends, extra_postargs)
        macros, objects, extra_postargs, pp_opts, build = compile_info

        compile_opts = extra_preargs or []
        compile_opts.append ('/c')
        if debug:
            compile_opts.extend(self.compile_options_debug)
        else:
            compile_opts.extend(self.compile_options)

        for obj in objects:
            try:
                src, ext = build[obj]
            except KeyError:
                continue
            if debug:
                # pass the full pathname to MSVC in debug mode,
                # this allows the debugger to find the source file
                # without asking the user to browse for it
                src = os.path.abspath(src)

            if ext in self._c_extensions:
                input_opt = "/Tc" + src
            elif ext in self._cpp_extensions:
                input_opt = "/Tp" + src
            elif ext in self._rc_extensions:
                # compile .RC to .RES file
                input_opt = src
                output_opt = "/fo" + obj
                try:
                    self.spawn([self.rc] + pp_opts +
                               [output_opt] + [input_opt])
                except DistutilsExecError as msg:
                    raise CompileError(msg)
                continue
            elif ext in self._mc_extensions:
                # Compile .MC to .RC file to .RES file.
                #   * '-h dir' specifies the directory for the
                #     generated include file
                #   * '-r dir' specifies the target directory of the
                #     generated RC file and the binary message resource
                #     it includes
                #
                # For now (since there are no options to change this),
                # we use the source-directory for the include file and
                # the build directory for the RC file and message
                # resources. This works at least for win32all.
                h_dir = os.path.dirname(src)
                rc_dir = os.path.dirname(obj)
                try:
                    # first compile .MC to .RC and .H file
                    self.spawn([self.mc] +
                               ['-h', h_dir, '-r', rc_dir] + [src])
                    base, _ = os.path.splitext (os.path.basename (src))
                    rc_file = os.path.join (rc_dir, base + '.rc')
                    # then compile .RC to .RES file
                    self.spawn([self.rc] +
                               ["/fo" + obj] + [rc_file])

                except DistutilsExecError as msg:
                    raise CompileError(msg)
                continue
            else:
                # how to handle this file?
                raise CompileError("Don't know how to compile %s to %s"
                                   % (src, obj))

            output_opt = "/Fo" + obj
            try:
                self.spawn([self.cc] + compile_opts + pp_opts +
                           [input_opt, output_opt] +
                           extra_postargs)
            except DistutilsExecError as msg:
                raise CompileError(msg)

        return objects


    def create_static_lib(self,
                          objects,
                          output_libname,
                          output_dir=None,
                          debug=0,
                          target_lang=None):

        if not self.initialized:
            self.initialize()
        (objects, output_dir) = self._fix_object_args(objects, output_dir)
        output_filename = self.library_filename(output_libname,
                                                output_dir=output_dir)

        if self._need_link(objects, output_filename):
            lib_args = objects + ['/OUT:' + output_filename]
            if debug:
                pass # XXX what goes here?
            try:
                self.spawn([self.lib] + lib_args)
            except DistutilsExecError as msg:
                raise LibError(msg)
        else:
            log.debug("skipping %s (up-to-date)", output_filename)


    def link(self,
             target_desc,
             objects,
             output_filename,
             output_dir=None,
             libraries=None,
             library_dirs=None,
             runtime_library_dirs=None,
             export_symbols=None,
             debug=0,
             extra_preargs=None,
             extra_postargs=None,
             build_temp=None,
             target_lang=None):

        if not self.initialized:
            self.initialize()
        (objects, output_dir) = self._fix_object_args(objects, output_dir)
        fixed_args = self._fix_lib_args(libraries, library_dirs,
                                        runtime_library_dirs)
        (libraries, library_dirs, runtime_library_dirs) = fixed_args

        if runtime_library_dirs:
            self.warn ("I don't know what to do with 'runtime_library_dirs': "
                       + str (runtime_library_dirs))

        lib_opts = gen_lib_options(self,
                                   library_dirs, runtime_library_dirs,
                                   libraries)
        if output_dir is not None:
            output_filename = os.path.join(output_dir, output_filename)

        if self._need_link(objects, output_filename):
            if target_desc == CCompiler.EXECUTABLE:
                if debug:
                    ldflags = self.ldflags_shared_debug[1:]
                else:
                    ldflags = self.ldflags_shared[1:]
            else:
                if debug:
                    ldflags = self.ldflags_shared_debug
                else:
                    ldflags = self.ldflags_shared

            export_opts = []
            for sym in (export_symbols or []):
                export_opts.append("/EXPORT:" + sym)

            ld_args = (ldflags + lib_opts + export_opts +
                       objects + ['/OUT:' + output_filename])

            # The MSVC linker generates .lib and .exp files, which cannot be
            # suppressed by any linker switches. The .lib files may even be
            # needed! Make sure they are generated in the temporary build
            # directory. Since they have different names for debug and release
            # builds, they can go into the same directory.
            build_temp = os.path.dirname(objects[0])
            if export_symbols is not None:
                (dll_name, dll_ext) = os.path.splitext(
                    os.path.basename(output_filename))
                implib_file = os.path.join(
                    build_temp,
                    self.library_filename(dll_name))
                ld_args.append ('/IMPLIB:' + implib_file)

            self.manifest_setup_ldargs(output_filename, build_temp, ld_args)

            if extra_preargs:
                ld_args[:0] = extra_preargs
            if extra_postargs:
                ld_args.extend(extra_postargs)

            self.mkpath(os.path.dirname(output_filename))
            try:
                self.spawn([self.linker] + ld_args)
            except DistutilsExecError as msg:
                raise LinkError(msg)

            # embed the manifest
            # XXX - this is somewhat fragile - if mt.exe fails, distutils
            # will still consider the DLL up-to-date, but it will not have a
            # manifest.  Maybe we should link to a temp file?  OTOH, that
            # implies a build environment error that shouldn't go undetected.
            mfinfo = self.manifest_get_embed_info(target_desc, ld_args)
            if mfinfo is not None:
                mffilename, mfid = mfinfo
                out_arg = '-outputresource:%s;%s' % (output_filename, mfid)
                try:
                    self.spawn(['mt.exe', '-nologo', '-manifest',
                                mffilename, out_arg])
                except DistutilsExecError as msg:
                    raise LinkError(msg)
        else:
            log.debug("skipping %s (up-to-date)", output_filename)

    def manifest_setup_ldargs(self, output_filename, build_temp, ld_args):
        # If we need a manifest at all, an embedded manifest is recommended.
        # See MSDN article titled
        # "How to: Embed a Manifest Inside a C/C++ Application"
        # (currently at http://msdn2.microsoft.com/en-us/library/ms235591(VS.80).aspx)
        # Ask the linker to generate the manifest in the temp dir, so
        # we can check it, and possibly embed it, later.
        temp_manifest = os.path.join(
                build_temp,
                os.path.basename(output_filename) + ".manifest")
        ld_args.append('/MANIFESTFILE:' + temp_manifest)

    def manifest_get_embed_info(self, target_desc, ld_args):
        # If a manifest should be embedded, return a tuple of
        # (manifest_filename, resource_id).  Returns None if no manifest
        # should be embedded.  See http://bugs.python.org/issue7833 for why
        # we want to avoid any manifest for extension modules if we can)
        for arg in ld_args:
            if arg.startswith("/MANIFESTFILE:"):
                temp_manifest = arg.split(":", 1)[1]
                break
        else:
            # no /MANIFESTFILE so nothing to do.
            return None
        if target_desc == CCompiler.EXECUTABLE:
            # by default, executables always get the manifest with the
            # CRT referenced.
            mfid = 1
        else:
            # Extension modules try and avoid any manifest if possible.
            mfid = 2
            temp_manifest = self._remove_visual_c_ref(temp_manifest)
        if temp_manifest is None:
            return None
        return temp_manifest, mfid

    def _remove_visual_c_ref(self, manifest_file):
        try:
            # Remove references to the Visual C runtime, so they will
            # fall through to the Visual C dependency of Python.exe.
            # This way, when installed for a restricted user (e.g.
            # runtimes are not in WinSxS folder, but in Python's own
            # folder), the runtimes do not need to be in every folder
            # with .pyd's.
            # Returns either the filename of the modified manifest or
            # None if no manifest should be embedded.
            manifest_f = open(manifest_file)
            try:
                manifest_buf = manifest_f.read()
            finally:
                manifest_f.close()
            pattern = re.compile(
                r"""<assemblyIdentity.*?name=("|')Microsoft\."""\
                r"""VC\d{2}\.CRT("|').*?(/>|</assemblyIdentity>)""",
                re.DOTALL)
            manifest_buf = re.sub(pattern, "", manifest_buf)
            pattern = r"<dependentAssembly>\s*</dependentAssembly>"
            manifest_buf = re.sub(pattern, "", manifest_buf)
            # Now see if any other assemblies are referenced - if not, we
            # don't want a manifest embedded.
            pattern = re.compile(
                r"""<assemblyIdentity.*?name=(?:"|')(.+?)(?:"|')"""
                r""".*?(?:/>|</assemblyIdentity>)""", re.DOTALL)
            if re.search(pattern, manifest_buf) is None:
                return None

            manifest_f = open(manifest_file, 'w')
            try:
                manifest_f.write(manifest_buf)
                return manifest_file
            finally:
                manifest_f.close()
        except OSError:
            pass

    # -- Miscellaneous methods -----------------------------------------
    # These are all used by the 'gen_lib_options() function, in
    # ccompiler.py.

    def library_dir_option(self, dir):
        return "/LIBPATH:" + dir

    def runtime_library_dir_option(self, dir):
        raise DistutilsPlatformError(
              "don't know how to set runtime library search path for MSVC++")

    def library_option(self, lib):
        return self.library_filename(lib)


    def find_library_file(self, dirs, lib, debug=0):
        # Prefer a debugging library if found (and requested), but deal
        # with it if we don't have one.
        if debug:
            try_names = [lib + "_d", lib]
        else:
            try_names = [lib]
        for dir in dirs:
            for name in try_names:
                libfile = os.path.join(dir, self.library_filename (name))
                if os.path.exists(libfile):
                    return libfile
        else:
            # Oops, didn't find it in *any* of 'dirs'
            return None

    # Helper methods for using the MSVC registry settings

    def find_exe(self, exe):
        """Return path to an MSVC executable program.

        Tries to find the program in several places: first, one of the
        MSVC program search paths from the registry; next, the directories
        in the PATH environment variable.  If any of those work, return an
        absolute path that is known to exist.  If none of them work, just
        return the original program name, 'exe'.
        """
        for p in self.__paths:
            fn = os.path.join(os.path.abspath(p), exe)
            if os.path.isfile(fn):
                return fn

        # didn't find it; try existing path
        for p in os.environ['Path'].split(';'):
            fn = os.path.join(os.path.abspath(p),exe)
            if os.path.isfile(fn):
                return fn

        return exe
PKU[�u�AI�I�ccompiler.pynu�[���"""distutils.ccompiler

Contains CCompiler, an abstract base class that defines the interface
for the Distutils compiler abstraction model."""

import sys, os, re
from distutils.errors import *
from distutils.spawn import spawn
from distutils.file_util import move_file
from distutils.dir_util import mkpath
from distutils.dep_util import newer_pairwise, newer_group
from distutils.util import split_quoted, execute
from distutils import log

class CCompiler:
    """Abstract base class to define the interface that must be implemented
    by real compiler classes.  Also has some utility methods used by
    several compiler classes.

    The basic idea behind a compiler abstraction class is that each
    instance can be used for all the compile/link steps in building a
    single project.  Thus, attributes common to all of those compile and
    link steps -- include directories, macros to define, libraries to link
    against, etc. -- are attributes of the compiler instance.  To allow for
    variability in how individual files are treated, most of those
    attributes may be varied on a per-compilation or per-link basis.
    """

    # 'compiler_type' is a class attribute that identifies this class.  It
    # keeps code that wants to know what kind of compiler it's dealing with
    # from having to import all possible compiler classes just to do an
    # 'isinstance'.  In concrete CCompiler subclasses, 'compiler_type'
    # should really, really be one of the keys of the 'compiler_class'
    # dictionary (see below -- used by the 'new_compiler()' factory
    # function) -- authors of new compiler interface classes are
    # responsible for updating 'compiler_class'!
    compiler_type = None

    # XXX things not handled by this compiler abstraction model:
    #   * client can't provide additional options for a compiler,
    #     e.g. warning, optimization, debugging flags.  Perhaps this
    #     should be the domain of concrete compiler abstraction classes
    #     (UnixCCompiler, MSVCCompiler, etc.) -- or perhaps the base
    #     class should have methods for the common ones.
    #   * can't completely override the include or library searchg
    #     path, ie. no "cc -I -Idir1 -Idir2" or "cc -L -Ldir1 -Ldir2".
    #     I'm not sure how widely supported this is even by Unix
    #     compilers, much less on other platforms.  And I'm even less
    #     sure how useful it is; maybe for cross-compiling, but
    #     support for that is a ways off.  (And anyways, cross
    #     compilers probably have a dedicated binary with the
    #     right paths compiled in.  I hope.)
    #   * can't do really freaky things with the library list/library
    #     dirs, e.g. "-Ldir1 -lfoo -Ldir2 -lfoo" to link against
    #     different versions of libfoo.a in different locations.  I
    #     think this is useless without the ability to null out the
    #     library search path anyways.


    # Subclasses that rely on the standard filename generation methods
    # implemented below should override these; see the comment near
    # those methods ('object_filenames()' et. al.) for details:
    src_extensions = None               # list of strings
    obj_extension = None                # string
    static_lib_extension = None
    shared_lib_extension = None         # string
    static_lib_format = None            # format string
    shared_lib_format = None            # prob. same as static_lib_format
    exe_extension = None                # string

    # Default language settings. language_map is used to detect a source
    # file or Extension target language, checking source filenames.
    # language_order is used to detect the language precedence, when deciding
    # what language to use when mixing source types. For example, if some
    # extension has two files with ".c" extension, and one with ".cpp", it
    # is still linked as c++.
    language_map = {".c"   : "c",
                    ".cc"  : "c++",
                    ".cpp" : "c++",
                    ".cxx" : "c++",
                    ".m"   : "objc",
                   }
    language_order = ["c++", "objc", "c"]

    def __init__(self, verbose=0, dry_run=0, force=0):
        self.dry_run = dry_run
        self.force = force
        self.verbose = verbose

        # 'output_dir': a common output directory for object, library,
        # shared object, and shared library files
        self.output_dir = None

        # 'macros': a list of macro definitions (or undefinitions).  A
        # macro definition is a 2-tuple (name, value), where the value is
        # either a string or None (no explicit value).  A macro
        # undefinition is a 1-tuple (name,).
        self.macros = []

        # 'include_dirs': a list of directories to search for include files
        self.include_dirs = []

        # 'libraries': a list of libraries to include in any link
        # (library names, not filenames: eg. "foo" not "libfoo.a")
        self.libraries = []

        # 'library_dirs': a list of directories to search for libraries
        self.library_dirs = []

        # 'runtime_library_dirs': a list of directories to search for
        # shared libraries/objects at runtime
        self.runtime_library_dirs = []

        # 'objects': a list of object files (or similar, such as explicitly
        # named library files) to include on any link
        self.objects = []

        for key in self.executables.keys():
            self.set_executable(key, self.executables[key])

    def set_executables(self, **kwargs):
        """Define the executables (and options for them) that will be run
        to perform the various stages of compilation.  The exact set of
        executables that may be specified here depends on the compiler
        class (via the 'executables' class attribute), but most will have:
          compiler      the C/C++ compiler
          linker_so     linker used to create shared objects and libraries
          linker_exe    linker used to create binary executables
          archiver      static library creator

        On platforms with a command-line (Unix, DOS/Windows), each of these
        is a string that will be split into executable name and (optional)
        list of arguments.  (Splitting the string is done similarly to how
        Unix shells operate: words are delimited by spaces, but quotes and
        backslashes can override this.  See
        'distutils.util.split_quoted()'.)
        """

        # Note that some CCompiler implementation classes will define class
        # attributes 'cpp', 'cc', etc. with hard-coded executable names;
        # this is appropriate when a compiler class is for exactly one
        # compiler/OS combination (eg. MSVCCompiler).  Other compiler
        # classes (UnixCCompiler, in particular) are driven by information
        # discovered at run-time, since there are many different ways to do
        # basically the same things with Unix C compilers.

        for key in kwargs:
            if key not in self.executables:
                raise ValueError("unknown executable '%s' for class %s" %
                      (key, self.__class__.__name__))
            self.set_executable(key, kwargs[key])

    def set_executable(self, key, value):
        if isinstance(value, str):
            setattr(self, key, split_quoted(value))
        else:
            setattr(self, key, value)

    def _find_macro(self, name):
        i = 0
        for defn in self.macros:
            if defn[0] == name:
                return i
            i += 1
        return None

    def _check_macro_definitions(self, definitions):
        """Ensures that every element of 'definitions' is a valid macro
        definition, ie. either (name,value) 2-tuple or a (name,) tuple.  Do
        nothing if all definitions are OK, raise TypeError otherwise.
        """
        for defn in definitions:
            if not (isinstance(defn, tuple) and
                    (len(defn) in (1, 2) and
                      (isinstance (defn[1], str) or defn[1] is None)) and
                    isinstance (defn[0], str)):
                raise TypeError(("invalid macro definition '%s': " % defn) + \
                      "must be tuple (string,), (string, string), or " + \
                      "(string, None)")


    # -- Bookkeeping methods -------------------------------------------

    def define_macro(self, name, value=None):
        """Define a preprocessor macro for all compilations driven by this
        compiler object.  The optional parameter 'value' should be a
        string; if it is not supplied, then the macro will be defined
        without an explicit value and the exact outcome depends on the
        compiler used (XXX true? does ANSI say anything about this?)
        """
        # Delete from the list of macro definitions/undefinitions if
        # already there (so that this one will take precedence).
        i = self._find_macro (name)
        if i is not None:
            del self.macros[i]

        self.macros.append((name, value))

    def undefine_macro(self, name):
        """Undefine a preprocessor macro for all compilations driven by
        this compiler object.  If the same macro is defined by
        'define_macro()' and undefined by 'undefine_macro()' the last call
        takes precedence (including multiple redefinitions or
        undefinitions).  If the macro is redefined/undefined on a
        per-compilation basis (ie. in the call to 'compile()'), then that
        takes precedence.
        """
        # Delete from the list of macro definitions/undefinitions if
        # already there (so that this one will take precedence).
        i = self._find_macro (name)
        if i is not None:
            del self.macros[i]

        undefn = (name,)
        self.macros.append(undefn)

    def add_include_dir(self, dir):
        """Add 'dir' to the list of directories that will be searched for
        header files.  The compiler is instructed to search directories in
        the order in which they are supplied by successive calls to
        'add_include_dir()'.
        """
        self.include_dirs.append(dir)

    def set_include_dirs(self, dirs):
        """Set the list of directories that will be searched to 'dirs' (a
        list of strings).  Overrides any preceding calls to
        'add_include_dir()'; subsequence calls to 'add_include_dir()' add
        to the list passed to 'set_include_dirs()'.  This does not affect
        any list of standard include directories that the compiler may
        search by default.
        """
        self.include_dirs = dirs[:]

    def add_library(self, libname):
        """Add 'libname' to the list of libraries that will be included in
        all links driven by this compiler object.  Note that 'libname'
        should *not* be the name of a file containing a library, but the
        name of the library itself: the actual filename will be inferred by
        the linker, the compiler, or the compiler class (depending on the
        platform).

        The linker will be instructed to link against libraries in the
        order they were supplied to 'add_library()' and/or
        'set_libraries()'.  It is perfectly valid to duplicate library
        names; the linker will be instructed to link against libraries as
        many times as they are mentioned.
        """
        self.libraries.append(libname)

    def set_libraries(self, libnames):
        """Set the list of libraries to be included in all links driven by
        this compiler object to 'libnames' (a list of strings).  This does
        not affect any standard system libraries that the linker may
        include by default.
        """
        self.libraries = libnames[:]

    def add_library_dir(self, dir):
        """Add 'dir' to the list of directories that will be searched for
        libraries specified to 'add_library()' and 'set_libraries()'.  The
        linker will be instructed to search for libraries in the order they
        are supplied to 'add_library_dir()' and/or 'set_library_dirs()'.
        """
        self.library_dirs.append(dir)

    def set_library_dirs(self, dirs):
        """Set the list of library search directories to 'dirs' (a list of
        strings).  This does not affect any standard library search path
        that the linker may search by default.
        """
        self.library_dirs = dirs[:]

    def add_runtime_library_dir(self, dir):
        """Add 'dir' to the list of directories that will be searched for
        shared libraries at runtime.
        """
        self.runtime_library_dirs.append(dir)

    def set_runtime_library_dirs(self, dirs):
        """Set the list of directories to search for shared libraries at
        runtime to 'dirs' (a list of strings).  This does not affect any
        standard search path that the runtime linker may search by
        default.
        """
        self.runtime_library_dirs = dirs[:]

    def add_link_object(self, object):
        """Add 'object' to the list of object files (or analogues, such as
        explicitly named library files or the output of "resource
        compilers") to be included in every link driven by this compiler
        object.
        """
        self.objects.append(object)

    def set_link_objects(self, objects):
        """Set the list of object files (or analogues) to be included in
        every link to 'objects'.  This does not affect any standard object
        files that the linker may include by default (such as system
        libraries).
        """
        self.objects = objects[:]


    # -- Private utility methods --------------------------------------
    # (here for the convenience of subclasses)

    # Helper method to prep compiler in subclass compile() methods

    def _setup_compile(self, outdir, macros, incdirs, sources, depends,
                       extra):
        """Process arguments and decide which source files to compile."""
        if outdir is None:
            outdir = self.output_dir
        elif not isinstance(outdir, str):
            raise TypeError("'output_dir' must be a string or None")

        if macros is None:
            macros = self.macros
        elif isinstance(macros, list):
            macros = macros + (self.macros or [])
        else:
            raise TypeError("'macros' (if supplied) must be a list of tuples")

        if incdirs is None:
            incdirs = self.include_dirs
        elif isinstance(incdirs, (list, tuple)):
            incdirs = list(incdirs) + (self.include_dirs or [])
        else:
            raise TypeError(
                  "'include_dirs' (if supplied) must be a list of strings")

        if extra is None:
            extra = []

        # Get the list of expected output (object) files
        objects = self.object_filenames(sources, strip_dir=0,
                                        output_dir=outdir)
        assert len(objects) == len(sources)

        pp_opts = gen_preprocess_options(macros, incdirs)

        build = {}
        for i in range(len(sources)):
            src = sources[i]
            obj = objects[i]
            ext = os.path.splitext(src)[1]
            self.mkpath(os.path.dirname(obj))
            build[obj] = (src, ext)

        return macros, objects, extra, pp_opts, build

    def _get_cc_args(self, pp_opts, debug, before):
        # works for unixccompiler, cygwinccompiler
        cc_args = pp_opts + ['-c']
        if debug:
            cc_args[:0] = ['-g']
        if before:
            cc_args[:0] = before
        return cc_args

    def _fix_compile_args(self, output_dir, macros, include_dirs):
        """Typecheck and fix-up some of the arguments to the 'compile()'
        method, and return fixed-up values.  Specifically: if 'output_dir'
        is None, replaces it with 'self.output_dir'; ensures that 'macros'
        is a list, and augments it with 'self.macros'; ensures that
        'include_dirs' is a list, and augments it with 'self.include_dirs'.
        Guarantees that the returned values are of the correct type,
        i.e. for 'output_dir' either string or None, and for 'macros' and
        'include_dirs' either list or None.
        """
        if output_dir is None:
            output_dir = self.output_dir
        elif not isinstance(output_dir, str):
            raise TypeError("'output_dir' must be a string or None")

        if macros is None:
            macros = self.macros
        elif isinstance(macros, list):
            macros = macros + (self.macros or [])
        else:
            raise TypeError("'macros' (if supplied) must be a list of tuples")

        if include_dirs is None:
            include_dirs = self.include_dirs
        elif isinstance(include_dirs, (list, tuple)):
            include_dirs = list(include_dirs) + (self.include_dirs or [])
        else:
            raise TypeError(
                  "'include_dirs' (if supplied) must be a list of strings")

        return output_dir, macros, include_dirs

    def _prep_compile(self, sources, output_dir, depends=None):
        """Decide which souce files must be recompiled.

        Determine the list of object files corresponding to 'sources',
        and figure out which ones really need to be recompiled.
        Return a list of all object files and a dictionary telling
        which source files can be skipped.
        """
        # Get the list of expected output (object) files
        objects = self.object_filenames(sources, output_dir=output_dir)
        assert len(objects) == len(sources)

        # Return an empty dict for the "which source files can be skipped"
        # return value to preserve API compatibility.
        return objects, {}

    def _fix_object_args(self, objects, output_dir):
        """Typecheck and fix up some arguments supplied to various methods.
        Specifically: ensure that 'objects' is a list; if output_dir is
        None, replace with self.output_dir.  Return fixed versions of
        'objects' and 'output_dir'.
        """
        if not isinstance(objects, (list, tuple)):
            raise TypeError("'objects' must be a list or tuple of strings")
        objects = list(objects)

        if output_dir is None:
            output_dir = self.output_dir
        elif not isinstance(output_dir, str):
            raise TypeError("'output_dir' must be a string or None")

        return (objects, output_dir)

    def _fix_lib_args(self, libraries, library_dirs, runtime_library_dirs):
        """Typecheck and fix up some of the arguments supplied to the
        'link_*' methods.  Specifically: ensure that all arguments are
        lists, and augment them with their permanent versions
        (eg. 'self.libraries' augments 'libraries').  Return a tuple with
        fixed versions of all arguments.
        """
        if libraries is None:
            libraries = self.libraries
        elif isinstance(libraries, (list, tuple)):
            libraries = list (libraries) + (self.libraries or [])
        else:
            raise TypeError(
                  "'libraries' (if supplied) must be a list of strings")

        if library_dirs is None:
            library_dirs = self.library_dirs
        elif isinstance(library_dirs, (list, tuple)):
            library_dirs = list (library_dirs) + (self.library_dirs or [])
        else:
            raise TypeError(
                  "'library_dirs' (if supplied) must be a list of strings")

        if runtime_library_dirs is None:
            runtime_library_dirs = self.runtime_library_dirs
        elif isinstance(runtime_library_dirs, (list, tuple)):
            runtime_library_dirs = (list(runtime_library_dirs) +
                                    (self.runtime_library_dirs or []))
        else:
            raise TypeError("'runtime_library_dirs' (if supplied) "
                            "must be a list of strings")

        return (libraries, library_dirs, runtime_library_dirs)

    def _need_link(self, objects, output_file):
        """Return true if we need to relink the files listed in 'objects'
        to recreate 'output_file'.
        """
        if self.force:
            return True
        else:
            if self.dry_run:
                newer = newer_group (objects, output_file, missing='newer')
            else:
                newer = newer_group (objects, output_file)
            return newer

    def detect_language(self, sources):
        """Detect the language of a given file, or list of files. Uses
        language_map, and language_order to do the job.
        """
        if not isinstance(sources, list):
            sources = [sources]
        lang = None
        index = len(self.language_order)
        for source in sources:
            base, ext = os.path.splitext(source)
            extlang = self.language_map.get(ext)
            try:
                extindex = self.language_order.index(extlang)
                if extindex < index:
                    lang = extlang
                    index = extindex
            except ValueError:
                pass
        return lang


    # -- Worker methods ------------------------------------------------
    # (must be implemented by subclasses)

    def preprocess(self, source, output_file=None, macros=None,
                   include_dirs=None, extra_preargs=None, extra_postargs=None):
        """Preprocess a single C/C++ source file, named in 'source'.
        Output will be written to file named 'output_file', or stdout if
        'output_file' not supplied.  'macros' is a list of macro
        definitions as for 'compile()', which will augment the macros set
        with 'define_macro()' and 'undefine_macro()'.  'include_dirs' is a
        list of directory names that will be added to the default list.

        Raises PreprocessError on failure.
        """
        pass

    def compile(self, sources, output_dir=None, macros=None,
                include_dirs=None, debug=0, extra_preargs=None,
                extra_postargs=None, depends=None):
        """Compile one or more source files.

        'sources' must be a list of filenames, most likely C/C++
        files, but in reality anything that can be handled by a
        particular compiler and compiler class (eg. MSVCCompiler can
        handle resource files in 'sources').  Return a list of object
        filenames, one per source filename in 'sources'.  Depending on
        the implementation, not all source files will necessarily be
        compiled, but all corresponding object filenames will be
        returned.

        If 'output_dir' is given, object files will be put under it, while
        retaining their original path component.  That is, "foo/bar.c"
        normally compiles to "foo/bar.o" (for a Unix implementation); if
        'output_dir' is "build", then it would compile to
        "build/foo/bar.o".

        'macros', if given, must be a list of macro definitions.  A macro
        definition is either a (name, value) 2-tuple or a (name,) 1-tuple.
        The former defines a macro; if the value is None, the macro is
        defined without an explicit value.  The 1-tuple case undefines a
        macro.  Later definitions/redefinitions/ undefinitions take
        precedence.

        'include_dirs', if given, must be a list of strings, the
        directories to add to the default include file search path for this
        compilation only.

        'debug' is a boolean; if true, the compiler will be instructed to
        output debug symbols in (or alongside) the object file(s).

        'extra_preargs' and 'extra_postargs' are implementation- dependent.
        On platforms that have the notion of a command-line (e.g. Unix,
        DOS/Windows), they are most likely lists of strings: extra
        command-line arguments to prepend/append to the compiler command
        line.  On other platforms, consult the implementation class
        documentation.  In any event, they are intended as an escape hatch
        for those occasions when the abstract compiler framework doesn't
        cut the mustard.

        'depends', if given, is a list of filenames that all targets
        depend on.  If a source file is older than any file in
        depends, then the source file will be recompiled.  This
        supports dependency tracking, but only at a coarse
        granularity.

        Raises CompileError on failure.
        """
        # A concrete compiler class can either override this method
        # entirely or implement _compile().
        macros, objects, extra_postargs, pp_opts, build = \
                self._setup_compile(output_dir, macros, include_dirs, sources,
                                    depends, extra_postargs)
        cc_args = self._get_cc_args(pp_opts, debug, extra_preargs)

        for obj in objects:
            try:
                src, ext = build[obj]
            except KeyError:
                continue
            self._compile(obj, src, ext, cc_args, extra_postargs, pp_opts)

        # Return *all* object filenames, not just the ones we just built.
        return objects

    def _compile(self, obj, src, ext, cc_args, extra_postargs, pp_opts):
        """Compile 'src' to product 'obj'."""
        # A concrete compiler class that does not override compile()
        # should implement _compile().
        pass

    def create_static_lib(self, objects, output_libname, output_dir=None,
                          debug=0, target_lang=None):
        """Link a bunch of stuff together to create a static library file.
        The "bunch of stuff" consists of the list of object files supplied
        as 'objects', the extra object files supplied to
        'add_link_object()' and/or 'set_link_objects()', the libraries
        supplied to 'add_library()' and/or 'set_libraries()', and the
        libraries supplied as 'libraries' (if any).

        'output_libname' should be a library name, not a filename; the
        filename will be inferred from the library name.  'output_dir' is
        the directory where the library file will be put.

        'debug' is a boolean; if true, debugging information will be
        included in the library (note that on most platforms, it is the
        compile step where this matters: the 'debug' flag is included here
        just for consistency).

        'target_lang' is the target language for which the given objects
        are being compiled. This allows specific linkage time treatment of
        certain languages.

        Raises LibError on failure.
        """
        pass


    # values for target_desc parameter in link()
    SHARED_OBJECT = "shared_object"
    SHARED_LIBRARY = "shared_library"
    EXECUTABLE = "executable"

    def link(self,
             target_desc,
             objects,
             output_filename,
             output_dir=None,
             libraries=None,
             library_dirs=None,
             runtime_library_dirs=None,
             export_symbols=None,
             debug=0,
             extra_preargs=None,
             extra_postargs=None,
             build_temp=None,
             target_lang=None):
        """Link a bunch of stuff together to create an executable or
        shared library file.

        The "bunch of stuff" consists of the list of object files supplied
        as 'objects'.  'output_filename' should be a filename.  If
        'output_dir' is supplied, 'output_filename' is relative to it
        (i.e. 'output_filename' can provide directory components if
        needed).

        'libraries' is a list of libraries to link against.  These are
        library names, not filenames, since they're translated into
        filenames in a platform-specific way (eg. "foo" becomes "libfoo.a"
        on Unix and "foo.lib" on DOS/Windows).  However, they can include a
        directory component, which means the linker will look in that
        specific directory rather than searching all the normal locations.

        'library_dirs', if supplied, should be a list of directories to
        search for libraries that were specified as bare library names
        (ie. no directory component).  These are on top of the system
        default and those supplied to 'add_library_dir()' and/or
        'set_library_dirs()'.  'runtime_library_dirs' is a list of
        directories that will be embedded into the shared library and used
        to search for other shared libraries that *it* depends on at
        run-time.  (This may only be relevant on Unix.)

        'export_symbols' is a list of symbols that the shared library will
        export.  (This appears to be relevant only on Windows.)

        'debug' is as for 'compile()' and 'create_static_lib()', with the
        slight distinction that it actually matters on most platforms (as
        opposed to 'create_static_lib()', which includes a 'debug' flag
        mostly for form's sake).

        'extra_preargs' and 'extra_postargs' are as for 'compile()' (except
        of course that they supply command-line arguments for the
        particular linker being used).

        'target_lang' is the target language for which the given objects
        are being compiled. This allows specific linkage time treatment of
        certain languages.

        Raises LinkError on failure.
        """
        raise NotImplementedError


    # Old 'link_*()' methods, rewritten to use the new 'link()' method.

    def link_shared_lib(self,
                        objects,
                        output_libname,
                        output_dir=None,
                        libraries=None,
                        library_dirs=None,
                        runtime_library_dirs=None,
                        export_symbols=None,
                        debug=0,
                        extra_preargs=None,
                        extra_postargs=None,
                        build_temp=None,
                        target_lang=None):
        self.link(CCompiler.SHARED_LIBRARY, objects,
                  self.library_filename(output_libname, lib_type='shared'),
                  output_dir,
                  libraries, library_dirs, runtime_library_dirs,
                  export_symbols, debug,
                  extra_preargs, extra_postargs, build_temp, target_lang)


    def link_shared_object(self,
                           objects,
                           output_filename,
                           output_dir=None,
                           libraries=None,
                           library_dirs=None,
                           runtime_library_dirs=None,
                           export_symbols=None,
                           debug=0,
                           extra_preargs=None,
                           extra_postargs=None,
                           build_temp=None,
                           target_lang=None):
        self.link(CCompiler.SHARED_OBJECT, objects,
                  output_filename, output_dir,
                  libraries, library_dirs, runtime_library_dirs,
                  export_symbols, debug,
                  extra_preargs, extra_postargs, build_temp, target_lang)


    def link_executable(self,
                        objects,
                        output_progname,
                        output_dir=None,
                        libraries=None,
                        library_dirs=None,
                        runtime_library_dirs=None,
                        debug=0,
                        extra_preargs=None,
                        extra_postargs=None,
                        target_lang=None):
        self.link(CCompiler.EXECUTABLE, objects,
                  self.executable_filename(output_progname), output_dir,
                  libraries, library_dirs, runtime_library_dirs, None,
                  debug, extra_preargs, extra_postargs, None, target_lang)


    # -- Miscellaneous methods -----------------------------------------
    # These are all used by the 'gen_lib_options() function; there is
    # no appropriate default implementation so subclasses should
    # implement all of these.

    def library_dir_option(self, dir):
        """Return the compiler option to add 'dir' to the list of
        directories searched for libraries.
        """
        raise NotImplementedError

    def runtime_library_dir_option(self, dir):
        """Return the compiler option to add 'dir' to the list of
        directories searched for runtime libraries.
        """
        raise NotImplementedError

    def library_option(self, lib):
        """Return the compiler option to add 'lib' to the list of libraries
        linked into the shared library or executable.
        """
        raise NotImplementedError

    def has_function(self, funcname, includes=None, include_dirs=None,
                     libraries=None, library_dirs=None):
        """Return a boolean indicating whether funcname is supported on
        the current platform.  The optional arguments can be used to
        augment the compilation environment.
        """
        # this can't be included at module scope because it tries to
        # import math which might not be available at that point - maybe
        # the necessary logic should just be inlined?
        import tempfile
        if includes is None:
            includes = []
        if include_dirs is None:
            include_dirs = []
        if libraries is None:
            libraries = []
        if library_dirs is None:
            library_dirs = []
        fd, fname = tempfile.mkstemp(".c", funcname, text=True)
        f = os.fdopen(fd, "w")
        try:
            for incl in includes:
                f.write("""#include "%s"\n""" % incl)
            f.write("""\
int main (int argc, char **argv) {
    %s();
    return 0;
}
""" % funcname)
        finally:
            f.close()
        try:
            objects = self.compile([fname], include_dirs=include_dirs)
        except CompileError:
            return False

        try:
            self.link_executable(objects, "a.out",
                                 libraries=libraries,
                                 library_dirs=library_dirs)
        except (LinkError, TypeError):
            return False
        return True

    def find_library_file (self, dirs, lib, debug=0):
        """Search the specified list of directories for a static or shared
        library file 'lib' and return the full path to that file.  If
        'debug' true, look for a debugging version (if that makes sense on
        the current platform).  Return None if 'lib' wasn't found in any of
        the specified directories.
        """
        raise NotImplementedError

    # -- Filename generation methods -----------------------------------

    # The default implementation of the filename generating methods are
    # prejudiced towards the Unix/DOS/Windows view of the world:
    #   * object files are named by replacing the source file extension
    #     (eg. .c/.cpp -> .o/.obj)
    #   * library files (shared or static) are named by plugging the
    #     library name and extension into a format string, eg.
    #     "lib%s.%s" % (lib_name, ".a") for Unix static libraries
    #   * executables are named by appending an extension (possibly
    #     empty) to the program name: eg. progname + ".exe" for
    #     Windows
    #
    # To reduce redundant code, these methods expect to find
    # several attributes in the current object (presumably defined
    # as class attributes):
    #   * src_extensions -
    #     list of C/C++ source file extensions, eg. ['.c', '.cpp']
    #   * obj_extension -
    #     object file extension, eg. '.o' or '.obj'
    #   * static_lib_extension -
    #     extension for static library files, eg. '.a' or '.lib'
    #   * shared_lib_extension -
    #     extension for shared library/object files, eg. '.so', '.dll'
    #   * static_lib_format -
    #     format string for generating static library filenames,
    #     eg. 'lib%s.%s' or '%s.%s'
    #   * shared_lib_format
    #     format string for generating shared library filenames
    #     (probably same as static_lib_format, since the extension
    #     is one of the intended parameters to the format string)
    #   * exe_extension -
    #     extension for executable files, eg. '' or '.exe'

    def object_filenames(self, source_filenames, strip_dir=0, output_dir=''):
        if output_dir is None:
            output_dir = ''
        obj_names = []
        for src_name in source_filenames:
            base, ext = os.path.splitext(src_name)
            base = os.path.splitdrive(base)[1] # Chop off the drive
            base = base[os.path.isabs(base):]  # If abs, chop off leading /
            if ext not in self.src_extensions:
                raise UnknownFileError(
                      "unknown file type '%s' (from '%s')" % (ext, src_name))
            if strip_dir:
                base = os.path.basename(base)
            obj_names.append(os.path.join(output_dir,
                                          base + self.obj_extension))
        return obj_names

    def shared_object_filename(self, basename, strip_dir=0, output_dir=''):
        assert output_dir is not None
        if strip_dir:
            basename = os.path.basename(basename)
        return os.path.join(output_dir, basename + self.shared_lib_extension)

    def executable_filename(self, basename, strip_dir=0, output_dir=''):
        assert output_dir is not None
        if strip_dir:
            basename = os.path.basename(basename)
        return os.path.join(output_dir, basename + (self.exe_extension or ''))

    def library_filename(self, libname, lib_type='static',     # or 'shared'
                         strip_dir=0, output_dir=''):
        assert output_dir is not None
        if lib_type not in ("static", "shared", "dylib", "xcode_stub"):
            raise ValueError(
                  "'lib_type' must be \"static\", \"shared\", \"dylib\", or \"xcode_stub\"")
        fmt = getattr(self, lib_type + "_lib_format")
        ext = getattr(self, lib_type + "_lib_extension")

        dir, base = os.path.split(libname)
        filename = fmt % (base, ext)
        if strip_dir:
            dir = ''

        return os.path.join(output_dir, dir, filename)


    # -- Utility methods -----------------------------------------------

    def announce(self, msg, level=1):
        log.debug(msg)

    def debug_print(self, msg):
        from distutils.debug import DEBUG
        if DEBUG:
            print(msg)

    def warn(self, msg):
        sys.stderr.write("warning: %s\n" % msg)

    def execute(self, func, args, msg=None, level=1):
        execute(func, args, msg, self.dry_run)

    def spawn(self, cmd):
        spawn(cmd, dry_run=self.dry_run)

    def move_file(self, src, dst):
        return move_file(src, dst, dry_run=self.dry_run)

    def mkpath (self, name, mode=0o777):
        mkpath(name, mode, dry_run=self.dry_run)


# Map a sys.platform/os.name ('posix', 'nt') to the default compiler
# type for that platform. Keys are interpreted as re match
# patterns. Order is important; platform mappings are preferred over
# OS names.
_default_compilers = (

    # Platform string mappings

    # on a cygwin built python we can use gcc like an ordinary UNIXish
    # compiler
    ('cygwin.*', 'unix'),

    # OS name mappings
    ('posix', 'unix'),
    ('nt', 'msvc'),

    )

def get_default_compiler(osname=None, platform=None):
    """Determine the default compiler to use for the given platform.

       osname should be one of the standard Python OS names (i.e. the
       ones returned by os.name) and platform the common value
       returned by sys.platform for the platform in question.

       The default values are os.name and sys.platform in case the
       parameters are not given.
    """
    if osname is None:
        osname = os.name
    if platform is None:
        platform = sys.platform
    for pattern, compiler in _default_compilers:
        if re.match(pattern, platform) is not None or \
           re.match(pattern, osname) is not None:
            return compiler
    # Default to Unix compiler
    return 'unix'

# Map compiler types to (module_name, class_name) pairs -- ie. where to
# find the code that implements an interface to this compiler.  (The module
# is assumed to be in the 'distutils' package.)
compiler_class = { 'unix':    ('unixccompiler', 'UnixCCompiler',
                               "standard UNIX-style compiler"),
                   'msvc':    ('_msvccompiler', 'MSVCCompiler',
                               "Microsoft Visual C++"),
                   'cygwin':  ('cygwinccompiler', 'CygwinCCompiler',
                               "Cygwin port of GNU C Compiler for Win32"),
                   'mingw32': ('cygwinccompiler', 'Mingw32CCompiler',
                               "Mingw32 port of GNU C Compiler for Win32"),
                   'bcpp':    ('bcppcompiler', 'BCPPCompiler',
                               "Borland C++ Compiler"),
                 }

def show_compilers():
    """Print list of available compilers (used by the "--help-compiler"
    options to "build", "build_ext", "build_clib").
    """
    # XXX this "knows" that the compiler option it's describing is
    # "--compiler", which just happens to be the case for the three
    # commands that use it.
    from distutils.fancy_getopt import FancyGetopt
    compilers = []
    for compiler in compiler_class.keys():
        compilers.append(("compiler="+compiler, None,
                          compiler_class[compiler][2]))
    compilers.sort()
    pretty_printer = FancyGetopt(compilers)
    pretty_printer.print_help("List of available compilers:")


def new_compiler(plat=None, compiler=None, verbose=0, dry_run=0, force=0):
    """Generate an instance of some CCompiler subclass for the supplied
    platform/compiler combination.  'plat' defaults to 'os.name'
    (eg. 'posix', 'nt'), and 'compiler' defaults to the default compiler
    for that platform.  Currently only 'posix' and 'nt' are supported, and
    the default compilers are "traditional Unix interface" (UnixCCompiler
    class) and Visual C++ (MSVCCompiler class).  Note that it's perfectly
    possible to ask for a Unix compiler object under Windows, and a
    Microsoft compiler object under Unix -- if you supply a value for
    'compiler', 'plat' is ignored.
    """
    if plat is None:
        plat = os.name

    try:
        if compiler is None:
            compiler = get_default_compiler(plat)

        (module_name, class_name, long_description) = compiler_class[compiler]
    except KeyError:
        msg = "don't know how to compile C/C++ code on platform '%s'" % plat
        if compiler is not None:
            msg = msg + " with '%s' compiler" % compiler
        raise DistutilsPlatformError(msg)

    try:
        module_name = "distutils." + module_name
        __import__ (module_name)
        module = sys.modules[module_name]
        klass = vars(module)[class_name]
    except ImportError:
        raise DistutilsModuleError(
              "can't compile C/C++ code: unable to load module '%s'" % \
              module_name)
    except KeyError:
        raise DistutilsModuleError(
               "can't compile C/C++ code: unable to find class '%s' "
               "in module '%s'" % (class_name, module_name))

    # XXX The None is necessary to preserve backwards compatibility
    # with classes that expect verbose to be the first positional
    # argument.
    return klass(None, dry_run, force)


def gen_preprocess_options(macros, include_dirs):
    """Generate C pre-processor options (-D, -U, -I) as used by at least
    two types of compilers: the typical Unix compiler and Visual C++.
    'macros' is the usual thing, a list of 1- or 2-tuples, where (name,)
    means undefine (-U) macro 'name', and (name,value) means define (-D)
    macro 'name' to 'value'.  'include_dirs' is just a list of directory
    names to be added to the header file search path (-I).  Returns a list
    of command-line options suitable for either Unix compilers or Visual
    C++.
    """
    # XXX it would be nice (mainly aesthetic, and so we don't generate
    # stupid-looking command lines) to go over 'macros' and eliminate
    # redundant definitions/undefinitions (ie. ensure that only the
    # latest mention of a particular macro winds up on the command
    # line).  I don't think it's essential, though, since most (all?)
    # Unix C compilers only pay attention to the latest -D or -U
    # mention of a macro on their command line.  Similar situation for
    # 'include_dirs'.  I'm punting on both for now.  Anyways, weeding out
    # redundancies like this should probably be the province of
    # CCompiler, since the data structures used are inherited from it
    # and therefore common to all CCompiler classes.
    pp_opts = []
    for macro in macros:
        if not (isinstance(macro, tuple) and 1 <= len(macro) <= 2):
            raise TypeError(
                  "bad macro definition '%s': "
                  "each element of 'macros' list must be a 1- or 2-tuple"
                  % macro)

        if len(macro) == 1:        # undefine this macro
            pp_opts.append("-U%s" % macro[0])
        elif len(macro) == 2:
            if macro[1] is None:    # define with no explicit value
                pp_opts.append("-D%s" % macro[0])
            else:
                # XXX *don't* need to be clever about quoting the
                # macro value here, because we're going to avoid the
                # shell at all costs when we spawn the command!
                pp_opts.append("-D%s=%s" % macro)

    for dir in include_dirs:
        pp_opts.append("-I%s" % dir)
    return pp_opts


def gen_lib_options (compiler, library_dirs, runtime_library_dirs, libraries):
    """Generate linker options for searching library directories and
    linking with specific libraries.  'libraries' and 'library_dirs' are,
    respectively, lists of library names (not filenames!) and search
    directories.  Returns a list of command-line options suitable for use
    with some compiler (depending on the two format strings passed in).
    """
    lib_opts = []

    for dir in library_dirs:
        lib_opts.append(compiler.library_dir_option(dir))

    for dir in runtime_library_dirs:
        opt = compiler.runtime_library_dir_option(dir)
        if isinstance(opt, list):
            lib_opts = lib_opts + opt
        else:
            lib_opts.append(opt)

    # XXX it's important that we *not* remove redundant library mentions!
    # sometimes you really do have to say "-lfoo -lbar -lfoo" in order to
    # resolve all symbols.  I just hope we never have to say "-lfoo obj.o
    # -lbar" to get things to work -- that's certainly a possibility, but a
    # pretty nasty way to arrange your C code.

    for lib in libraries:
        (lib_dir, lib_name) = os.path.split(lib)
        if lib_dir:
            lib_file = compiler.find_library_file([lib_dir], lib_name)
            if lib_file:
                lib_opts.append(lib_file)
            else:
                compiler.warn("no library file corresponding to "
                              "'%s' found (skipping)" % lib)
        else:
            lib_opts.append(compiler.library_option (lib))
    return lib_opts
PKU[$�Fq��	config.pynu�[���"""distutils.pypirc

Provides the PyPIRCCommand class, the base class for the command classes
that uses .pypirc in the distutils.command package.
"""
import os
from configparser import RawConfigParser

from distutils.cmd import Command

DEFAULT_PYPIRC = """\
[distutils]
index-servers =
    pypi

[pypi]
username:%s
password:%s
"""

class PyPIRCCommand(Command):
    """Base command that knows how to handle the .pypirc file
    """
    DEFAULT_REPOSITORY = 'https://upload.pypi.org/legacy/'
    DEFAULT_REALM = 'pypi'
    repository = None
    realm = None

    user_options = [
        ('repository=', 'r',
         "url of repository [default: %s]" % \
            DEFAULT_REPOSITORY),
        ('show-response', None,
         'display full response text from server')]

    boolean_options = ['show-response']

    def _get_rc_file(self):
        """Returns rc file path."""
        return os.path.join(os.path.expanduser('~'), '.pypirc')

    def _store_pypirc(self, username, password):
        """Creates a default .pypirc file."""
        rc = self._get_rc_file()
        with os.fdopen(os.open(rc, os.O_CREAT | os.O_WRONLY, 0o600), 'w') as f:
            f.write(DEFAULT_PYPIRC % (username, password))

    def _read_pypirc(self):
        """Reads the .pypirc file."""
        rc = self._get_rc_file()
        if os.path.exists(rc):
            self.announce('Using PyPI login from %s' % rc)
            repository = self.repository or self.DEFAULT_REPOSITORY

            config = RawConfigParser()
            config.read(rc)
            sections = config.sections()
            if 'distutils' in sections:
                # let's get the list of servers
                index_servers = config.get('distutils', 'index-servers')
                _servers = [server.strip() for server in
                            index_servers.split('\n')
                            if server.strip() != '']
                if _servers == []:
                    # nothing set, let's try to get the default pypi
                    if 'pypi' in sections:
                        _servers = ['pypi']
                    else:
                        # the file is not properly defined, returning
                        # an empty dict
                        return {}
                for server in _servers:
                    current = {'server': server}
                    current['username'] = config.get(server, 'username')

                    # optional params
                    for key, default in (('repository',
                                          self.DEFAULT_REPOSITORY),
                                         ('realm', self.DEFAULT_REALM),
                                         ('password', None)):
                        if config.has_option(server, key):
                            current[key] = config.get(server, key)
                        else:
                            current[key] = default

                    # work around people having "repository" for the "pypi"
                    # section of their config set to the HTTP (rather than
                    # HTTPS) URL
                    if (server == 'pypi' and
                        repository in (self.DEFAULT_REPOSITORY, 'pypi')):
                        current['repository'] = self.DEFAULT_REPOSITORY
                        return current

                    if (current['server'] == repository or
                        current['repository'] == repository):
                        return current
            elif 'server-login' in sections:
                # old format
                server = 'server-login'
                if config.has_option(server, 'repository'):
                    repository = config.get(server, 'repository')
                else:
                    repository = self.DEFAULT_REPOSITORY
                return {'username': config.get(server, 'username'),
                        'password': config.get(server, 'password'),
                        'repository': repository,
                        'server': server,
                        'realm': self.DEFAULT_REALM}

        return {}

    def _read_pypi_response(self, response):
        """Read and decode a PyPI HTTP response."""
        import cgi
        content_type = response.getheader('content-type', 'text/plain')
        encoding = cgi.parse_header(content_type)[1].get('charset', 'ascii')
        return response.read().decode(encoding)

    def initialize_options(self):
        """Initialize options."""
        self.repository = None
        self.realm = None
        self.show_response = 0

    def finalize_options(self):
        """Finalizes options."""
        if self.repository is None:
            self.repository = self.DEFAULT_REPOSITORY
        if self.realm is None:
            self.realm = self.DEFAULT_REALM
PKU[�U�ǜQ�Qutil.pynu�[���"""distutils.util

Miscellaneous utility functions -- anything that doesn't fit into
one of the other *util.py modules.
"""

import os
import re
import importlib.util
import string
import sys
from distutils.errors import DistutilsPlatformError
from distutils.dep_util import newer
from distutils.spawn import spawn
from distutils import log
from distutils.errors import DistutilsByteCompileError

def get_host_platform():
    """Return a string that identifies the current platform.  This is used mainly to
    distinguish platform-specific build directories and platform-specific built
    distributions.  Typically includes the OS name and version and the
    architecture (as supplied by 'os.uname()'), although the exact information
    included depends on the OS; eg. on Linux, the kernel version isn't
    particularly important.

    Examples of returned values:
       linux-i586
       linux-alpha (?)
       solaris-2.6-sun4u

    Windows will return one of:
       win-amd64 (64bit Windows on AMD64 (aka x86_64, Intel64, EM64T, etc)
       win32 (all others - specifically, sys.platform is returned)

    For other non-POSIX platforms, currently just returns 'sys.platform'.

    """
    if os.name == 'nt':
        if 'amd64' in sys.version.lower():
            return 'win-amd64'
        if '(arm)' in sys.version.lower():
            return 'win-arm32'
        if '(arm64)' in sys.version.lower():
            return 'win-arm64'
        return sys.platform

    # Set for cross builds explicitly
    if "_PYTHON_HOST_PLATFORM" in os.environ:
        return os.environ["_PYTHON_HOST_PLATFORM"]

    if os.name != "posix" or not hasattr(os, 'uname'):
        # XXX what about the architecture? NT is Intel or Alpha,
        # Mac OS is M68k or PPC, etc.
        return sys.platform

    # Try to distinguish various flavours of Unix

    (osname, host, release, version, machine) = os.uname()

    # Convert the OS name to lowercase, remove '/' characters, and translate
    # spaces (for "Power Macintosh")
    osname = osname.lower().replace('/', '')
    machine = machine.replace(' ', '_')
    machine = machine.replace('/', '-')

    if osname[:5] == "linux":
        # At least on Linux/Intel, 'machine' is the processor --
        # i386, etc.
        # XXX what about Alpha, SPARC, etc?
        return  "%s-%s" % (osname, machine)
    elif osname[:5] == "sunos":
        if release[0] >= "5":           # SunOS 5 == Solaris 2
            osname = "solaris"
            release = "%d.%s" % (int(release[0]) - 3, release[2:])
            # We can't use "platform.architecture()[0]" because a
            # bootstrap problem. We use a dict to get an error
            # if some suspicious happens.
            bitness = {2147483647:"32bit", 9223372036854775807:"64bit"}
            machine += ".%s" % bitness[sys.maxsize]
        # fall through to standard osname-release-machine representation
    elif osname[:3] == "aix":
        return "%s-%s.%s" % (osname, version, release)
    elif osname[:6] == "cygwin":
        osname = "cygwin"
        rel_re = re.compile (r'[\d.]+', re.ASCII)
        m = rel_re.match(release)
        if m:
            release = m.group()
    elif osname[:6] == "darwin":
        import _osx_support, distutils.sysconfig
        osname, release, machine = _osx_support.get_platform_osx(
                                        distutils.sysconfig.get_config_vars(),
                                        osname, release, machine)

    return "%s-%s-%s" % (osname, release, machine)

def get_platform():
    if os.name == 'nt':
        TARGET_TO_PLAT = {
            'x86' : 'win32',
            'x64' : 'win-amd64',
            'arm' : 'win-arm32',
        }
        return TARGET_TO_PLAT.get(os.environ.get('VSCMD_ARG_TGT_ARCH')) or get_host_platform()
    else:
        return get_host_platform()

def convert_path (pathname):
    """Return 'pathname' as a name that will work on the native filesystem,
    i.e. split it on '/' and put it back together again using the current
    directory separator.  Needed because filenames in the setup script are
    always supplied in Unix style, and have to be converted to the local
    convention before we can actually use them in the filesystem.  Raises
    ValueError on non-Unix-ish systems if 'pathname' either starts or
    ends with a slash.
    """
    if os.sep == '/':
        return pathname
    if not pathname:
        return pathname
    if pathname[0] == '/':
        raise ValueError("path '%s' cannot be absolute" % pathname)
    if pathname[-1] == '/':
        raise ValueError("path '%s' cannot end with '/'" % pathname)

    paths = pathname.split('/')
    while '.' in paths:
        paths.remove('.')
    if not paths:
        return os.curdir
    return os.path.join(*paths)

# convert_path ()


def change_root (new_root, pathname):
    """Return 'pathname' with 'new_root' prepended.  If 'pathname' is
    relative, this is equivalent to "os.path.join(new_root,pathname)".
    Otherwise, it requires making 'pathname' relative and then joining the
    two, which is tricky on DOS/Windows and Mac OS.
    """
    if os.name == 'posix':
        if not os.path.isabs(pathname):
            return os.path.join(new_root, pathname)
        else:
            return os.path.join(new_root, pathname[1:])

    elif os.name == 'nt':
        (drive, path) = os.path.splitdrive(pathname)
        if path[0] == '\\':
            path = path[1:]
        return os.path.join(new_root, path)

    else:
        raise DistutilsPlatformError("nothing known about platform '%s'" % os.name)


_environ_checked = 0
def check_environ ():
    """Ensure that 'os.environ' has all the environment variables we
    guarantee that users can use in config files, command-line options,
    etc.  Currently this includes:
      HOME - user's home directory (Unix only)
      PLAT - description of the current platform, including hardware
             and OS (see 'get_platform()')
    """
    global _environ_checked
    if _environ_checked:
        return

    if os.name == 'posix' and 'HOME' not in os.environ:
        try:
            import pwd
            os.environ['HOME'] = pwd.getpwuid(os.getuid())[5]
        except (ImportError, KeyError):
            # bpo-10496: if the current user identifier doesn't exist in the
            # password database, do nothing
            pass

    if 'PLAT' not in os.environ:
        os.environ['PLAT'] = get_platform()

    _environ_checked = 1


def subst_vars (s, local_vars):
    """Perform shell/Perl-style variable substitution on 'string'.  Every
    occurrence of '$' followed by a name is considered a variable, and
    variable is substituted by the value found in the 'local_vars'
    dictionary, or in 'os.environ' if it's not in 'local_vars'.
    'os.environ' is first checked/augmented to guarantee that it contains
    certain values: see 'check_environ()'.  Raise ValueError for any
    variables not found in either 'local_vars' or 'os.environ'.
    """
    check_environ()
    def _subst (match, local_vars=local_vars):
        var_name = match.group(1)
        if var_name in local_vars:
            return str(local_vars[var_name])
        else:
            return os.environ[var_name]

    try:
        return re.sub(r'\$([a-zA-Z_][a-zA-Z_0-9]*)', _subst, s)
    except KeyError as var:
        raise ValueError("invalid variable '$%s'" % var)

# subst_vars ()


def grok_environment_error (exc, prefix="error: "):
    # Function kept for backward compatibility.
    # Used to try clever things with EnvironmentErrors,
    # but nowadays str(exception) produces good messages.
    return prefix + str(exc)


# Needed by 'split_quoted()'
_wordchars_re = _squote_re = _dquote_re = None
def _init_regex():
    global _wordchars_re, _squote_re, _dquote_re
    _wordchars_re = re.compile(r'[^\\\'\"%s ]*' % string.whitespace)
    _squote_re = re.compile(r"'(?:[^'\\]|\\.)*'")
    _dquote_re = re.compile(r'"(?:[^"\\]|\\.)*"')

def split_quoted (s):
    """Split a string up according to Unix shell-like rules for quotes and
    backslashes.  In short: words are delimited by spaces, as long as those
    spaces are not escaped by a backslash, or inside a quoted string.
    Single and double quotes are equivalent, and the quote characters can
    be backslash-escaped.  The backslash is stripped from any two-character
    escape sequence, leaving only the escaped character.  The quote
    characters are stripped from any quoted string.  Returns a list of
    words.
    """

    # This is a nice algorithm for splitting up a single string, since it
    # doesn't require character-by-character examination.  It was a little
    # bit of a brain-bender to get it working right, though...
    if _wordchars_re is None: _init_regex()

    s = s.strip()
    words = []
    pos = 0

    while s:
        m = _wordchars_re.match(s, pos)
        end = m.end()
        if end == len(s):
            words.append(s[:end])
            break

        if s[end] in string.whitespace: # unescaped, unquoted whitespace: now
            words.append(s[:end])       # we definitely have a word delimiter
            s = s[end:].lstrip()
            pos = 0

        elif s[end] == '\\':            # preserve whatever is being escaped;
                                        # will become part of the current word
            s = s[:end] + s[end+1:]
            pos = end+1

        else:
            if s[end] == "'":           # slurp singly-quoted string
                m = _squote_re.match(s, end)
            elif s[end] == '"':         # slurp doubly-quoted string
                m = _dquote_re.match(s, end)
            else:
                raise RuntimeError("this can't happen (bad char '%c')" % s[end])

            if m is None:
                raise ValueError("bad string (mismatched %s quotes?)" % s[end])

            (beg, end) = m.span()
            s = s[:beg] + s[beg+1:end-1] + s[end:]
            pos = m.end() - 2

        if pos >= len(s):
            words.append(s)
            break

    return words

# split_quoted ()


def execute (func, args, msg=None, verbose=0, dry_run=0):
    """Perform some action that affects the outside world (eg.  by
    writing to the filesystem).  Such actions are special because they
    are disabled by the 'dry_run' flag.  This method takes care of all
    that bureaucracy for you; all you have to do is supply the
    function to call and an argument tuple for it (to embody the
    "external action" being performed), and an optional message to
    print.
    """
    if msg is None:
        msg = "%s%r" % (func.__name__, args)
        if msg[-2:] == ',)':        # correct for singleton tuple
            msg = msg[0:-2] + ')'

    log.info(msg)
    if not dry_run:
        func(*args)


def strtobool (val):
    """Convert a string representation of truth to true (1) or false (0).

    True values are 'y', 'yes', 't', 'true', 'on', and '1'; false values
    are 'n', 'no', 'f', 'false', 'off', and '0'.  Raises ValueError if
    'val' is anything else.
    """
    val = val.lower()
    if val in ('y', 'yes', 't', 'true', 'on', '1'):
        return 1
    elif val in ('n', 'no', 'f', 'false', 'off', '0'):
        return 0
    else:
        raise ValueError("invalid truth value %r" % (val,))


def byte_compile (py_files,
                  optimize=0, force=0,
                  prefix=None, base_dir=None,
                  verbose=1, dry_run=0,
                  direct=None):
    """Byte-compile a collection of Python source files to .pyc
    files in a __pycache__ subdirectory.  'py_files' is a list
    of files to compile; any files that don't end in ".py" are silently
    skipped.  'optimize' must be one of the following:
      0 - don't optimize
      1 - normal optimization (like "python -O")
      2 - extra optimization (like "python -OO")
    If 'force' is true, all files are recompiled regardless of
    timestamps.

    The source filename encoded in each bytecode file defaults to the
    filenames listed in 'py_files'; you can modify these with 'prefix' and
    'basedir'.  'prefix' is a string that will be stripped off of each
    source filename, and 'base_dir' is a directory name that will be
    prepended (after 'prefix' is stripped).  You can supply either or both
    (or neither) of 'prefix' and 'base_dir', as you wish.

    If 'dry_run' is true, doesn't actually do anything that would
    affect the filesystem.

    Byte-compilation is either done directly in this interpreter process
    with the standard py_compile module, or indirectly by writing a
    temporary script and executing it.  Normally, you should let
    'byte_compile()' figure out to use direct compilation or not (see
    the source for details).  The 'direct' flag is used by the script
    generated in indirect mode; unless you know what you're doing, leave
    it set to None.
    """

    # Late import to fix a bootstrap issue: _posixsubprocess is built by
    # setup.py, but setup.py uses distutils.
    import subprocess

    # nothing is done if sys.dont_write_bytecode is True
    if sys.dont_write_bytecode:
        raise DistutilsByteCompileError('byte-compiling is disabled.')

    # First, if the caller didn't force us into direct or indirect mode,
    # figure out which mode we should be in.  We take a conservative
    # approach: choose direct mode *only* if the current interpreter is
    # in debug mode and optimize is 0.  If we're not in debug mode (-O
    # or -OO), we don't know which level of optimization this
    # interpreter is running with, so we can't do direct
    # byte-compilation and be certain that it's the right thing.  Thus,
    # always compile indirectly if the current interpreter is in either
    # optimize mode, or if either optimization level was requested by
    # the caller.
    if direct is None:
        direct = (__debug__ and optimize == 0)

    # "Indirect" byte-compilation: write a temporary script and then
    # run it with the appropriate flags.
    if not direct:
        try:
            from tempfile import mkstemp
            (script_fd, script_name) = mkstemp(".py")
        except ImportError:
            from tempfile import mktemp
            (script_fd, script_name) = None, mktemp(".py")
        log.info("writing byte-compilation script '%s'", script_name)
        if not dry_run:
            if script_fd is not None:
                script = os.fdopen(script_fd, "w")
            else:
                script = open(script_name, "w")

            with script:
                script.write("""\
from distutils.util import byte_compile
files = [
""")

                # XXX would be nice to write absolute filenames, just for
                # safety's sake (script should be more robust in the face of
                # chdir'ing before running it).  But this requires abspath'ing
                # 'prefix' as well, and that breaks the hack in build_lib's
                # 'byte_compile()' method that carefully tacks on a trailing
                # slash (os.sep really) to make sure the prefix here is "just
                # right".  This whole prefix business is rather delicate -- the
                # problem is that it's really a directory, but I'm treating it
                # as a dumb string, so trailing slashes and so forth matter.

                #py_files = map(os.path.abspath, py_files)
                #if prefix:
                #    prefix = os.path.abspath(prefix)

                script.write(",\n".join(map(repr, py_files)) + "]\n")
                script.write("""
byte_compile(files, optimize=%r, force=%r,
             prefix=%r, base_dir=%r,
             verbose=%r, dry_run=0,
             direct=1)
""" % (optimize, force, prefix, base_dir, verbose))

        cmd = [sys.executable]
        cmd.extend(subprocess._optim_args_from_interpreter_flags())
        cmd.append(script_name)
        spawn(cmd, dry_run=dry_run)
        execute(os.remove, (script_name,), "removing %s" % script_name,
                dry_run=dry_run)

    # "Direct" byte-compilation: use the py_compile module to compile
    # right here, right now.  Note that the script generated in indirect
    # mode simply calls 'byte_compile()' in direct mode, a weird sort of
    # cross-process recursion.  Hey, it works!
    else:
        from py_compile import compile

        for file in py_files:
            if file[-3:] != ".py":
                # This lets us be lazy and not filter filenames in
                # the "install_lib" command.
                continue

            # Terminology from the py_compile module:
            #   cfile - byte-compiled file
            #   dfile - purported source filename (same as 'file' by default)
            if optimize >= 0:
                opt = '' if optimize == 0 else optimize
                cfile = importlib.util.cache_from_source(
                    file, optimization=opt)
            else:
                cfile = importlib.util.cache_from_source(file)
            dfile = file
            if prefix:
                if file[:len(prefix)] != prefix:
                    raise ValueError("invalid prefix: filename %r doesn't start with %r"
                           % (file, prefix))
                dfile = dfile[len(prefix):]
            if base_dir:
                dfile = os.path.join(base_dir, dfile)

            cfile_base = os.path.basename(cfile)
            if direct:
                if force or newer(file, cfile):
                    log.info("byte-compiling %s to %s", file, cfile_base)
                    if not dry_run:
                        compile(file, cfile, dfile)
                else:
                    log.debug("skipping byte-compilation of %s to %s",
                              file, cfile_base)

# byte_compile ()

def rfc822_escape (header):
    """Return a version of the string escaped for inclusion in an
    RFC-822 header, by ensuring there are 8 spaces space after each newline.
    """
    lines = header.split('\n')
    sep = '\n' + 8 * ' '
    return sep.join(lines)

# 2to3 support

def run_2to3(files, fixer_names=None, options=None, explicit=None):
    """Invoke 2to3 on a list of Python files.
    The files should all come from the build area, as the
    modification is done in-place. To reduce the build time,
    only files modified since the last invocation of this
    function should be passed in the files argument."""

    if not files:
        return

    # Make this class local, to delay import of 2to3
    from lib2to3.refactor import RefactoringTool, get_fixers_from_package
    class DistutilsRefactoringTool(RefactoringTool):
        def log_error(self, msg, *args, **kw):
            log.error(msg, *args)

        def log_message(self, msg, *args):
            log.info(msg, *args)

        def log_debug(self, msg, *args):
            log.debug(msg, *args)

    if fixer_names is None:
        fixer_names = get_fixers_from_package('lib2to3.fixes')
    r = DistutilsRefactoringTool(fixer_names, options=options)
    r.refactor(files, write=True)

def copydir_run_2to3(src, dest, template=None, fixer_names=None,
                     options=None, explicit=None):
    """Recursively copy a directory, only copying new and changed files,
    running run_2to3 over all newly copied Python modules afterward.

    If you give a template string, it's parsed like a MANIFEST.in.
    """
    from distutils.dir_util import mkpath
    from distutils.file_util import copy_file
    from distutils.filelist import FileList
    filelist = FileList()
    curdir = os.getcwd()
    os.chdir(src)
    try:
        filelist.findall()
    finally:
        os.chdir(curdir)
    filelist.files[:] = filelist.allfiles
    if template:
        for line in template.splitlines():
            line = line.strip()
            if not line: continue
            filelist.process_template_line(line)
    copied = []
    for filename in filelist.files:
        outname = os.path.join(dest, filename)
        mkpath(os.path.dirname(outname))
        res = copy_file(os.path.join(src, filename), outname, update=1)
        if res[1]: copied.append(outname)
    run_2to3([fn for fn in copied if fn.lower().endswith('.py')],
             fixer_names=fixer_names, options=options, explicit=explicit)
    return copied

class Mixin2to3:
    '''Mixin class for commands that run 2to3.
    To configure 2to3, setup scripts may either change
    the class variables, or inherit from individual commands
    to override how 2to3 is invoked.'''

    # provide list of fixers to run;
    # defaults to all from lib2to3.fixers
    fixer_names = None

    # options dictionary
    options = None

    # list of fixers to invoke even though they are marked as explicit
    explicit = None

    def run_2to3(self, files):
        return run_2to3(files, self.fixer_names, self.options, self.explicit)
PKU[2�

versionpredicate.pynu�[���"""Module for parsing and testing package version predicate strings.
"""
import re
import distutils.version
import operator


re_validPackage = re.compile(r"(?i)^\s*([a-z_]\w*(?:\.[a-z_]\w*)*)(.*)",
    re.ASCII)
# (package) (rest)

re_paren = re.compile(r"^\s*\((.*)\)\s*$") # (list) inside of parentheses
re_splitComparison = re.compile(r"^\s*(<=|>=|<|>|!=|==)\s*([^\s,]+)\s*$")
# (comp) (version)


def splitUp(pred):
    """Parse a single version comparison.

    Return (comparison string, StrictVersion)
    """
    res = re_splitComparison.match(pred)
    if not res:
        raise ValueError("bad package restriction syntax: %r" % pred)
    comp, verStr = res.groups()
    return (comp, distutils.version.StrictVersion(verStr))

compmap = {"<": operator.lt, "<=": operator.le, "==": operator.eq,
           ">": operator.gt, ">=": operator.ge, "!=": operator.ne}

class VersionPredicate:
    """Parse and test package version predicates.

    >>> v = VersionPredicate('pyepat.abc (>1.0, <3333.3a1, !=1555.1b3)')

    The `name` attribute provides the full dotted name that is given::

    >>> v.name
    'pyepat.abc'

    The str() of a `VersionPredicate` provides a normalized
    human-readable version of the expression::

    >>> print(v)
    pyepat.abc (> 1.0, < 3333.3a1, != 1555.1b3)

    The `satisfied_by()` method can be used to determine with a given
    version number is included in the set described by the version
    restrictions::

    >>> v.satisfied_by('1.1')
    True
    >>> v.satisfied_by('1.4')
    True
    >>> v.satisfied_by('1.0')
    False
    >>> v.satisfied_by('4444.4')
    False
    >>> v.satisfied_by('1555.1b3')
    False

    `VersionPredicate` is flexible in accepting extra whitespace::

    >>> v = VersionPredicate(' pat( ==  0.1  )  ')
    >>> v.name
    'pat'
    >>> v.satisfied_by('0.1')
    True
    >>> v.satisfied_by('0.2')
    False

    If any version numbers passed in do not conform to the
    restrictions of `StrictVersion`, a `ValueError` is raised::

    >>> v = VersionPredicate('p1.p2.p3.p4(>=1.0, <=1.3a1, !=1.2zb3)')
    Traceback (most recent call last):
      ...
    ValueError: invalid version number '1.2zb3'

    It the module or package name given does not conform to what's
    allowed as a legal module or package name, `ValueError` is
    raised::

    >>> v = VersionPredicate('foo-bar')
    Traceback (most recent call last):
      ...
    ValueError: expected parenthesized list: '-bar'

    >>> v = VersionPredicate('foo bar (12.21)')
    Traceback (most recent call last):
      ...
    ValueError: expected parenthesized list: 'bar (12.21)'

    """

    def __init__(self, versionPredicateStr):
        """Parse a version predicate string.
        """
        # Fields:
        #    name:  package name
        #    pred:  list of (comparison string, StrictVersion)

        versionPredicateStr = versionPredicateStr.strip()
        if not versionPredicateStr:
            raise ValueError("empty package restriction")
        match = re_validPackage.match(versionPredicateStr)
        if not match:
            raise ValueError("bad package name in %r" % versionPredicateStr)
        self.name, paren = match.groups()
        paren = paren.strip()
        if paren:
            match = re_paren.match(paren)
            if not match:
                raise ValueError("expected parenthesized list: %r" % paren)
            str = match.groups()[0]
            self.pred = [splitUp(aPred) for aPred in str.split(",")]
            if not self.pred:
                raise ValueError("empty parenthesized list in %r"
                                 % versionPredicateStr)
        else:
            self.pred = []

    def __str__(self):
        if self.pred:
            seq = [cond + " " + str(ver) for cond, ver in self.pred]
            return self.name + " (" + ", ".join(seq) + ")"
        else:
            return self.name

    def satisfied_by(self, version):
        """True if version is compatible with all the predicates in self.
        The parameter version must be acceptable to the StrictVersion
        constructor.  It may be either a string or StrictVersion.
        """
        for cond, ver in self.pred:
            if not compmap[cond](version, ver):
                return False
        return True


_provision_rx = None

def split_provision(value):
    """Return the name and optional version number of a provision.

    The version number, if given, will be returned as a `StrictVersion`
    instance, otherwise it will be `None`.

    >>> split_provision('mypkg')
    ('mypkg', None)
    >>> split_provision(' mypkg( 1.2 ) ')
    ('mypkg', StrictVersion ('1.2'))
    """
    global _provision_rx
    if _provision_rx is None:
        _provision_rx = re.compile(
            r"([a-zA-Z_]\w*(?:\.[a-zA-Z_]\w*)*)(?:\s*\(\s*([^)\s]+)\s*\))?$",
            re.ASCII)
    value = value.strip()
    m = _provision_rx.match(value)
    if not m:
        raise ValueError("illegal provides specification: %r" % value)
    ver = m.group(2) or None
    if ver:
        ver = distutils.version.StrictVersion(ver)
    return m.group(1), ver
PKU[]�4:))extension.pynu�[���"""distutils.extension

Provides the Extension class, used to describe C/C++ extension
modules in setup scripts."""

import os
import warnings

# This class is really only used by the "build_ext" command, so it might
# make sense to put it in distutils.command.build_ext.  However, that
# module is already big enough, and I want to make this class a bit more
# complex to simplify some common cases ("foo" module in "foo.c") and do
# better error-checking ("foo.c" actually exists).
#
# Also, putting this in build_ext.py means every setup script would have to
# import that large-ish module (indirectly, through distutils.core) in
# order to do anything.

class Extension:
    """Just a collection of attributes that describes an extension
    module and everything needed to build it (hopefully in a portable
    way, but there are hooks that let you be as unportable as you need).

    Instance attributes:
      name : string
        the full name of the extension, including any packages -- ie.
        *not* a filename or pathname, but Python dotted name
      sources : [string]
        list of source filenames, relative to the distribution root
        (where the setup script lives), in Unix form (slash-separated)
        for portability.  Source files may be C, C++, SWIG (.i),
        platform-specific resource files, or whatever else is recognized
        by the "build_ext" command as source for a Python extension.
      include_dirs : [string]
        list of directories to search for C/C++ header files (in Unix
        form for portability)
      define_macros : [(name : string, value : string|None)]
        list of macros to define; each macro is defined using a 2-tuple,
        where 'value' is either the string to define it to or None to
        define it without a particular value (equivalent of "#define
        FOO" in source or -DFOO on Unix C compiler command line)
      undef_macros : [string]
        list of macros to undefine explicitly
      library_dirs : [string]
        list of directories to search for C/C++ libraries at link time
      libraries : [string]
        list of library names (not filenames or paths) to link against
      runtime_library_dirs : [string]
        list of directories to search for C/C++ libraries at run time
        (for shared extensions, this is when the extension is loaded)
      extra_objects : [string]
        list of extra files to link with (eg. object files not implied
        by 'sources', static library that must be explicitly specified,
        binary resource files, etc.)
      extra_compile_args : [string]
        any extra platform- and compiler-specific information to use
        when compiling the source files in 'sources'.  For platforms and
        compilers where "command line" makes sense, this is typically a
        list of command-line arguments, but for other platforms it could
        be anything.
      extra_link_args : [string]
        any extra platform- and compiler-specific information to use
        when linking object files together to create the extension (or
        to create a new static Python interpreter).  Similar
        interpretation as for 'extra_compile_args'.
      export_symbols : [string]
        list of symbols to be exported from a shared extension.  Not
        used on all platforms, and not generally necessary for Python
        extensions, which typically export exactly one symbol: "init" +
        extension_name.
      swig_opts : [string]
        any extra options to pass to SWIG if a source file has the .i
        extension.
      depends : [string]
        list of files that the extension depends on
      language : string
        extension language (i.e. "c", "c++", "objc"). Will be detected
        from the source extensions if not provided.
      optional : boolean
        specifies that a build failure in the extension should not abort the
        build process, but simply not install the failing extension.
    """

    # When adding arguments to this constructor, be sure to update
    # setup_keywords in core.py.
    def __init__(self, name, sources,
                  include_dirs=None,
                  define_macros=None,
                  undef_macros=None,
                  library_dirs=None,
                  libraries=None,
                  runtime_library_dirs=None,
                  extra_objects=None,
                  extra_compile_args=None,
                  extra_link_args=None,
                  export_symbols=None,
                  swig_opts = None,
                  depends=None,
                  language=None,
                  optional=None,
                  **kw                      # To catch unknown keywords
                 ):
        if not isinstance(name, str):
            raise AssertionError("'name' must be a string")
        if not (isinstance(sources, list) and
                all(isinstance(v, str) for v in sources)):
            raise AssertionError("'sources' must be a list of strings")

        self.name = name
        self.sources = sources
        self.include_dirs = include_dirs or []
        self.define_macros = define_macros or []
        self.undef_macros = undef_macros or []
        self.library_dirs = library_dirs or []
        self.libraries = libraries or []
        self.runtime_library_dirs = runtime_library_dirs or []
        self.extra_objects = extra_objects or []
        self.extra_compile_args = extra_compile_args or []
        self.extra_link_args = extra_link_args or []
        self.export_symbols = export_symbols or []
        self.swig_opts = swig_opts or []
        self.depends = depends or []
        self.language = language
        self.optional = optional

        # If there are unknown keyword options, warn about them
        if len(kw) > 0:
            options = [repr(option) for option in kw]
            options = ', '.join(sorted(options))
            msg = "Unknown Extension options: %s" % options
            warnings.warn(msg)

    def __repr__(self):
        return '<%s.%s(%r) at %#x>' % (
            self.__class__.__module__,
            self.__class__.__qualname__,
            self.name,
            id(self))


def read_setup_file(filename):
    """Reads a Setup file and returns Extension instances."""
    from distutils.sysconfig import (parse_makefile, expand_makefile_vars,
                                     _variable_rx)

    from distutils.text_file import TextFile
    from distutils.util import split_quoted

    # First pass over the file to gather "VAR = VALUE" assignments.
    vars = parse_makefile(filename)

    # Second pass to gobble up the real content: lines of the form
    #   <module> ... [<sourcefile> ...] [<cpparg> ...] [<library> ...]
    file = TextFile(filename,
                    strip_comments=1, skip_blanks=1, join_lines=1,
                    lstrip_ws=1, rstrip_ws=1)
    try:
        extensions = []

        while True:
            line = file.readline()
            if line is None:                # eof
                break
            if _variable_rx.match(line):    # VAR=VALUE, handled in first pass
                continue

            if line[0] == line[-1] == "*":
                file.warn("'%s' lines not handled yet" % line)
                continue

            line = expand_makefile_vars(line, vars)
            words = split_quoted(line)

            # NB. this parses a slightly different syntax than the old
            # makesetup script: here, there must be exactly one extension per
            # line, and it must be the first word of the line.  I have no idea
            # why the old syntax supported multiple extensions per line, as
            # they all wind up being the same.

            module = words[0]
            ext = Extension(module, [])
            append_next_word = None

            for word in words[1:]:
                if append_next_word is not None:
                    append_next_word.append(word)
                    append_next_word = None
                    continue

                suffix = os.path.splitext(word)[1]
                switch = word[0:2] ; value = word[2:]

                if suffix in (".c", ".cc", ".cpp", ".cxx", ".c++", ".m", ".mm"):
                    # hmm, should we do something about C vs. C++ sources?
                    # or leave it up to the CCompiler implementation to
                    # worry about?
                    ext.sources.append(word)
                elif switch == "-I":
                    ext.include_dirs.append(value)
                elif switch == "-D":
                    equals = value.find("=")
                    if equals == -1:        # bare "-DFOO" -- no value
                        ext.define_macros.append((value, None))
                    else:                   # "-DFOO=blah"
                        ext.define_macros.append((value[0:equals],
                                                  value[equals+2:]))
                elif switch == "-U":
                    ext.undef_macros.append(value)
                elif switch == "-C":        # only here 'cause makesetup has it!
                    ext.extra_compile_args.append(word)
                elif switch == "-l":
                    ext.libraries.append(value)
                elif switch == "-L":
                    ext.library_dirs.append(value)
                elif switch == "-R":
                    ext.runtime_library_dirs.append(value)
                elif word == "-rpath":
                    append_next_word = ext.runtime_library_dirs
                elif word == "-Xlinker":
                    append_next_word = ext.extra_link_args
                elif word == "-Xcompiler":
                    append_next_word = ext.extra_compile_args
                elif switch == "-u":
                    ext.extra_link_args.append(word)
                    if not value:
                        append_next_word = ext.extra_link_args
                elif suffix in (".a", ".so", ".sl", ".o", ".dylib"):
                    # NB. a really faithful emulation of makesetup would
                    # append a .o file to extra_objects only if it
                    # had a slash in it; otherwise, it would s/.o/.c/
                    # and append it to sources.  Hmmmm.
                    ext.extra_objects.append(word)
                else:
                    file.warn("unrecognized argument '%s'" % word)

            extensions.append(ext)
    finally:
        file.close()

    return extensions
PKU[k"#��
�
dep_util.pynu�[���"""distutils.dep_util

Utility functions for simple, timestamp-based dependency of files
and groups of files; also, function based entirely on such
timestamp dependency analysis."""

import os
from distutils.errors import DistutilsFileError


def newer (source, target):
    """Return true if 'source' exists and is more recently modified than
    'target', or if 'source' exists and 'target' doesn't.  Return false if
    both exist and 'target' is the same age or younger than 'source'.
    Raise DistutilsFileError if 'source' does not exist.
    """
    if not os.path.exists(source):
        raise DistutilsFileError("file '%s' does not exist" %
                                 os.path.abspath(source))
    if not os.path.exists(target):
        return 1

    from stat import ST_MTIME
    mtime1 = os.stat(source)[ST_MTIME]
    mtime2 = os.stat(target)[ST_MTIME]

    return mtime1 > mtime2

# newer ()


def newer_pairwise (sources, targets):
    """Walk two filename lists in parallel, testing if each source is newer
    than its corresponding target.  Return a pair of lists (sources,
    targets) where source is newer than target, according to the semantics
    of 'newer()'.
    """
    if len(sources) != len(targets):
        raise ValueError("'sources' and 'targets' must be same length")

    # build a pair of lists (sources, targets) where  source is newer
    n_sources = []
    n_targets = []
    for i in range(len(sources)):
        if newer(sources[i], targets[i]):
            n_sources.append(sources[i])
            n_targets.append(targets[i])

    return (n_sources, n_targets)

# newer_pairwise ()


def newer_group (sources, target, missing='error'):
    """Return true if 'target' is out-of-date with respect to any file
    listed in 'sources'.  In other words, if 'target' exists and is newer
    than every file in 'sources', return false; otherwise return true.
    'missing' controls what we do when a source file is missing; the
    default ("error") is to blow up with an OSError from inside 'stat()';
    if it is "ignore", we silently drop any missing source files; if it is
    "newer", any missing source files make us assume that 'target' is
    out-of-date (this is handy in "dry-run" mode: it'll make you pretend to
    carry out commands that wouldn't work because inputs are missing, but
    that doesn't matter because you're not actually going to run the
    commands).
    """
    # If the target doesn't even exist, then it's definitely out-of-date.
    if not os.path.exists(target):
        return 1

    # Otherwise we have to find out the hard way: if *any* source file
    # is more recent than 'target', then 'target' is out-of-date and
    # we can immediately return true.  If we fall through to the end
    # of the loop, then 'target' is up-to-date and we return false.
    from stat import ST_MTIME
    target_mtime = os.stat(target)[ST_MTIME]
    for source in sources:
        if not os.path.exists(source):
            if missing == 'error':      # blow up when we stat() the file
                pass
            elif missing == 'ignore':   # missing source dropped from
                continue                #  target's dependency list
            elif missing == 'newer':    # missing source means target is
                return 1                #  out-of-date

        source_mtime = os.stat(source)[ST_MTIME]
        if source_mtime > target_mtime:
            return 1
    else:
        return 0

# newer_group ()
PKU[Q8���0�0text_file.pynu�[���"""text_file

provides the TextFile class, which gives an interface to text files
that (optionally) takes care of stripping comments, ignoring blank
lines, and joining lines with backslashes."""

import sys, io


class TextFile:
    """Provides a file-like object that takes care of all the things you
       commonly want to do when processing a text file that has some
       line-by-line syntax: strip comments (as long as "#" is your
       comment character), skip blank lines, join adjacent lines by
       escaping the newline (ie. backslash at end of line), strip
       leading and/or trailing whitespace.  All of these are optional
       and independently controllable.

       Provides a 'warn()' method so you can generate warning messages that
       report physical line number, even if the logical line in question
       spans multiple physical lines.  Also provides 'unreadline()' for
       implementing line-at-a-time lookahead.

       Constructor is called as:

           TextFile (filename=None, file=None, **options)

       It bombs (RuntimeError) if both 'filename' and 'file' are None;
       'filename' should be a string, and 'file' a file object (or
       something that provides 'readline()' and 'close()' methods).  It is
       recommended that you supply at least 'filename', so that TextFile
       can include it in warning messages.  If 'file' is not supplied,
       TextFile creates its own using 'io.open()'.

       The options are all boolean, and affect the value returned by
       'readline()':
         strip_comments [default: true]
           strip from "#" to end-of-line, as well as any whitespace
           leading up to the "#" -- unless it is escaped by a backslash
         lstrip_ws [default: false]
           strip leading whitespace from each line before returning it
         rstrip_ws [default: true]
           strip trailing whitespace (including line terminator!) from
           each line before returning it
         skip_blanks [default: true}
           skip lines that are empty *after* stripping comments and
           whitespace.  (If both lstrip_ws and rstrip_ws are false,
           then some lines may consist of solely whitespace: these will
           *not* be skipped, even if 'skip_blanks' is true.)
         join_lines [default: false]
           if a backslash is the last non-newline character on a line
           after stripping comments and whitespace, join the following line
           to it to form one "logical line"; if N consecutive lines end
           with a backslash, then N+1 physical lines will be joined to
           form one logical line.
         collapse_join [default: false]
           strip leading whitespace from lines that are joined to their
           predecessor; only matters if (join_lines and not lstrip_ws)
         errors [default: 'strict']
           error handler used to decode the file content

       Note that since 'rstrip_ws' can strip the trailing newline, the
       semantics of 'readline()' must differ from those of the builtin file
       object's 'readline()' method!  In particular, 'readline()' returns
       None for end-of-file: an empty string might just be a blank line (or
       an all-whitespace line), if 'rstrip_ws' is true but 'skip_blanks' is
       not."""

    default_options = { 'strip_comments': 1,
                        'skip_blanks':    1,
                        'lstrip_ws':      0,
                        'rstrip_ws':      1,
                        'join_lines':     0,
                        'collapse_join':  0,
                        'errors':         'strict',
                      }

    def __init__(self, filename=None, file=None, **options):
        """Construct a new TextFile object.  At least one of 'filename'
           (a string) and 'file' (a file-like object) must be supplied.
           They keyword argument options are described above and affect
           the values returned by 'readline()'."""
        if filename is None and file is None:
            raise RuntimeError("you must supply either or both of 'filename' and 'file'")

        # set values for all options -- either from client option hash
        # or fallback to default_options
        for opt in self.default_options.keys():
            if opt in options:
                setattr(self, opt, options[opt])
            else:
                setattr(self, opt, self.default_options[opt])

        # sanity check client option hash
        for opt in options.keys():
            if opt not in self.default_options:
                raise KeyError("invalid TextFile option '%s'" % opt)

        if file is None:
            self.open(filename)
        else:
            self.filename = filename
            self.file = file
            self.current_line = 0       # assuming that file is at BOF!

        # 'linebuf' is a stack of lines that will be emptied before we
        # actually read from the file; it's only populated by an
        # 'unreadline()' operation
        self.linebuf = []

    def open(self, filename):
        """Open a new file named 'filename'.  This overrides both the
           'filename' and 'file' arguments to the constructor."""
        self.filename = filename
        self.file = io.open(self.filename, 'r', errors=self.errors)
        self.current_line = 0

    def close(self):
        """Close the current file and forget everything we know about it
           (filename, current line number)."""
        file = self.file
        self.file = None
        self.filename = None
        self.current_line = None
        file.close()

    def gen_error(self, msg, line=None):
        outmsg = []
        if line is None:
            line = self.current_line
        outmsg.append(self.filename + ", ")
        if isinstance(line, (list, tuple)):
            outmsg.append("lines %d-%d: " % tuple(line))
        else:
            outmsg.append("line %d: " % line)
        outmsg.append(str(msg))
        return "".join(outmsg)

    def error(self, msg, line=None):
        raise ValueError("error: " + self.gen_error(msg, line))

    def warn(self, msg, line=None):
        """Print (to stderr) a warning message tied to the current logical
           line in the current file.  If the current logical line in the
           file spans multiple physical lines, the warning refers to the
           whole range, eg. "lines 3-5".  If 'line' supplied, it overrides
           the current line number; it may be a list or tuple to indicate a
           range of physical lines, or an integer for a single physical
           line."""
        sys.stderr.write("warning: " + self.gen_error(msg, line) + "\n")

    def readline(self):
        """Read and return a single logical line from the current file (or
           from an internal buffer if lines have previously been "unread"
           with 'unreadline()').  If the 'join_lines' option is true, this
           may involve reading multiple physical lines concatenated into a
           single string.  Updates the current line number, so calling
           'warn()' after 'readline()' emits a warning about the physical
           line(s) just read.  Returns None on end-of-file, since the empty
           string can occur if 'rstrip_ws' is true but 'strip_blanks' is
           not."""
        # If any "unread" lines waiting in 'linebuf', return the top
        # one.  (We don't actually buffer read-ahead data -- lines only
        # get put in 'linebuf' if the client explicitly does an
        # 'unreadline()'.
        if self.linebuf:
            line = self.linebuf[-1]
            del self.linebuf[-1]
            return line

        buildup_line = ''

        while True:
            # read the line, make it None if EOF
            line = self.file.readline()
            if line == '':
                line = None

            if self.strip_comments and line:

                # Look for the first "#" in the line.  If none, never
                # mind.  If we find one and it's the first character, or
                # is not preceded by "\", then it starts a comment --
                # strip the comment, strip whitespace before it, and
                # carry on.  Otherwise, it's just an escaped "#", so
                # unescape it (and any other escaped "#"'s that might be
                # lurking in there) and otherwise leave the line alone.

                pos = line.find("#")
                if pos == -1: # no "#" -- no comments
                    pass

                # It's definitely a comment -- either "#" is the first
                # character, or it's elsewhere and unescaped.
                elif pos == 0 or line[pos-1] != "\\":
                    # Have to preserve the trailing newline, because it's
                    # the job of a later step (rstrip_ws) to remove it --
                    # and if rstrip_ws is false, we'd better preserve it!
                    # (NB. this means that if the final line is all comment
                    # and has no trailing newline, we will think that it's
                    # EOF; I think that's OK.)
                    eol = (line[-1] == '\n') and '\n' or ''
                    line = line[0:pos] + eol

                    # If all that's left is whitespace, then skip line
                    # *now*, before we try to join it to 'buildup_line' --
                    # that way constructs like
                    #   hello \\
                    #   # comment that should be ignored
                    #   there
                    # result in "hello there".
                    if line.strip() == "":
                        continue
                else: # it's an escaped "#"
                    line = line.replace("\\#", "#")

            # did previous line end with a backslash? then accumulate
            if self.join_lines and buildup_line:
                # oops: end of file
                if line is None:
                    self.warn("continuation line immediately precedes "
                              "end-of-file")
                    return buildup_line

                if self.collapse_join:
                    line = line.lstrip()
                line = buildup_line + line

                # careful: pay attention to line number when incrementing it
                if isinstance(self.current_line, list):
                    self.current_line[1] = self.current_line[1] + 1
                else:
                    self.current_line = [self.current_line,
                                         self.current_line + 1]
            # just an ordinary line, read it as usual
            else:
                if line is None: # eof
                    return None

                # still have to be careful about incrementing the line number!
                if isinstance(self.current_line, list):
                    self.current_line = self.current_line[1] + 1
                else:
                    self.current_line = self.current_line + 1

            # strip whitespace however the client wants (leading and
            # trailing, or one or the other, or neither)
            if self.lstrip_ws and self.rstrip_ws:
                line = line.strip()
            elif self.lstrip_ws:
                line = line.lstrip()
            elif self.rstrip_ws:
                line = line.rstrip()

            # blank line (whether we rstrip'ed or not)? skip to next line
            # if appropriate
            if (line == '' or line == '\n') and self.skip_blanks:
                continue

            if self.join_lines:
                if line[-1] == '\\':
                    buildup_line = line[:-1]
                    continue

                if line[-2:] == '\\\n':
                    buildup_line = line[0:-2] + '\n'
                    continue

            # well, I guess there's some actual content there: return it
            return line

    def readlines(self):
        """Read and return the list of all logical lines remaining in the
           current file."""
        lines = []
        while True:
            line = self.readline()
            if line is None:
                return lines
            lines.append(line)

    def unreadline(self, line):
        """Push 'line' (a string) onto an internal buffer that will be
           checked by future 'readline()' calls.  Handy for implementing
           a parser with line-at-a-time lookahead."""
        self.linebuf.append(line)
PKU[��5|!|!archive_util.pynu�[���"""distutils.archive_util

Utility functions for creating archive files (tarballs, zip files,
that sort of thing)."""

import os
from warnings import warn
import sys

try:
    import zipfile
except ImportError:
    zipfile = None


from distutils.errors import DistutilsExecError
from distutils.spawn import spawn
from distutils.dir_util import mkpath
from distutils import log

try:
    from pwd import getpwnam
except ImportError:
    getpwnam = None

try:
    from grp import getgrnam
except ImportError:
    getgrnam = None

def _get_gid(name):
    """Returns a gid, given a group name."""
    if getgrnam is None or name is None:
        return None
    try:
        result = getgrnam(name)
    except KeyError:
        result = None
    if result is not None:
        return result[2]
    return None

def _get_uid(name):
    """Returns an uid, given a user name."""
    if getpwnam is None or name is None:
        return None
    try:
        result = getpwnam(name)
    except KeyError:
        result = None
    if result is not None:
        return result[2]
    return None

def make_tarball(base_name, base_dir, compress="gzip", verbose=0, dry_run=0,
                 owner=None, group=None):
    """Create a (possibly compressed) tar file from all the files under
    'base_dir'.

    'compress' must be "gzip" (the default), "bzip2", "xz", "compress", or
    None.  ("compress" will be deprecated in Python 3.2)

    'owner' and 'group' can be used to define an owner and a group for the
    archive that is being built. If not provided, the current owner and group
    will be used.

    The output tar file will be named 'base_dir' +  ".tar", possibly plus
    the appropriate compression extension (".gz", ".bz2", ".xz" or ".Z").

    Returns the output filename.
    """
    tar_compression = {'gzip': 'gz', 'bzip2': 'bz2', 'xz': 'xz', None: '',
                       'compress': ''}
    compress_ext = {'gzip': '.gz', 'bzip2': '.bz2', 'xz': '.xz',
                    'compress': '.Z'}

    # flags for compression program, each element of list will be an argument
    if compress is not None and compress not in compress_ext.keys():
        raise ValueError(
              "bad value for 'compress': must be None, 'gzip', 'bzip2', "
              "'xz' or 'compress'")

    archive_name = base_name + '.tar'
    if compress != 'compress':
        archive_name += compress_ext.get(compress, '')

    mkpath(os.path.dirname(archive_name), dry_run=dry_run)

    # creating the tarball
    import tarfile  # late import so Python build itself doesn't break

    log.info('Creating tar archive')

    uid = _get_uid(owner)
    gid = _get_gid(group)

    def _set_uid_gid(tarinfo):
        if gid is not None:
            tarinfo.gid = gid
            tarinfo.gname = group
        if uid is not None:
            tarinfo.uid = uid
            tarinfo.uname = owner
        return tarinfo

    if not dry_run:
        tar = tarfile.open(archive_name, 'w|%s' % tar_compression[compress])
        try:
            tar.add(base_dir, filter=_set_uid_gid)
        finally:
            tar.close()

    # compression using `compress`
    if compress == 'compress':
        warn("'compress' will be deprecated.", PendingDeprecationWarning)
        # the option varies depending on the platform
        compressed_name = archive_name + compress_ext[compress]
        if sys.platform == 'win32':
            cmd = [compress, archive_name, compressed_name]
        else:
            cmd = [compress, '-f', archive_name]
        spawn(cmd, dry_run=dry_run)
        return compressed_name

    return archive_name

def make_zipfile(base_name, base_dir, verbose=0, dry_run=0):
    """Create a zip file from all the files under 'base_dir'.

    The output zip file will be named 'base_name' + ".zip".  Uses either the
    "zipfile" Python module (if available) or the InfoZIP "zip" utility
    (if installed and found on the default search path).  If neither tool is
    available, raises DistutilsExecError.  Returns the name of the output zip
    file.
    """
    zip_filename = base_name + ".zip"
    mkpath(os.path.dirname(zip_filename), dry_run=dry_run)

    # If zipfile module is not available, try spawning an external
    # 'zip' command.
    if zipfile is None:
        if verbose:
            zipoptions = "-r"
        else:
            zipoptions = "-rq"

        try:
            spawn(["zip", zipoptions, zip_filename, base_dir],
                  dry_run=dry_run)
        except DistutilsExecError:
            # XXX really should distinguish between "couldn't find
            # external 'zip' command" and "zip failed".
            raise DistutilsExecError(("unable to create zip file '%s': "
                   "could neither import the 'zipfile' module nor "
                   "find a standalone zip utility") % zip_filename)

    else:
        log.info("creating '%s' and adding '%s' to it",
                 zip_filename, base_dir)

        if not dry_run:
            try:
                zip = zipfile.ZipFile(zip_filename, "w",
                                      compression=zipfile.ZIP_DEFLATED)
            except RuntimeError:
                zip = zipfile.ZipFile(zip_filename, "w",
                                      compression=zipfile.ZIP_STORED)

            with zip:
                if base_dir != os.curdir:
                    path = os.path.normpath(os.path.join(base_dir, ''))
                    zip.write(path, path)
                    log.info("adding '%s'", path)
                for dirpath, dirnames, filenames in os.walk(base_dir):
                    for name in dirnames:
                        path = os.path.normpath(os.path.join(dirpath, name, ''))
                        zip.write(path, path)
                        log.info("adding '%s'", path)
                    for name in filenames:
                        path = os.path.normpath(os.path.join(dirpath, name))
                        if os.path.isfile(path):
                            zip.write(path, path)
                            log.info("adding '%s'", path)

    return zip_filename

ARCHIVE_FORMATS = {
    'gztar': (make_tarball, [('compress', 'gzip')], "gzip'ed tar-file"),
    'bztar': (make_tarball, [('compress', 'bzip2')], "bzip2'ed tar-file"),
    'xztar': (make_tarball, [('compress', 'xz')], "xz'ed tar-file"),
    'ztar':  (make_tarball, [('compress', 'compress')], "compressed tar file"),
    'tar':   (make_tarball, [('compress', None)], "uncompressed tar file"),
    'zip':   (make_zipfile, [],"ZIP file")
    }

def check_archive_formats(formats):
    """Returns the first format from the 'format' list that is unknown.

    If all formats are known, returns None
    """
    for format in formats:
        if format not in ARCHIVE_FORMATS:
            return format
    return None

def make_archive(base_name, format, root_dir=None, base_dir=None, verbose=0,
                 dry_run=0, owner=None, group=None):
    """Create an archive file (eg. zip or tar).

    'base_name' is the name of the file to create, minus any format-specific
    extension; 'format' is the archive format: one of "zip", "tar", "gztar",
    "bztar", "xztar", or "ztar".

    'root_dir' is a directory that will be the root directory of the
    archive; ie. we typically chdir into 'root_dir' before creating the
    archive.  'base_dir' is the directory where we start archiving from;
    ie. 'base_dir' will be the common prefix of all files and
    directories in the archive.  'root_dir' and 'base_dir' both default
    to the current directory.  Returns the name of the archive file.

    'owner' and 'group' are used when creating a tar archive. By default,
    uses the current owner and group.
    """
    save_cwd = os.getcwd()
    if root_dir is not None:
        log.debug("changing into '%s'", root_dir)
        base_name = os.path.abspath(base_name)
        if not dry_run:
            os.chdir(root_dir)

    if base_dir is None:
        base_dir = os.curdir

    kwargs = {'dry_run': dry_run}

    try:
        format_info = ARCHIVE_FORMATS[format]
    except KeyError:
        raise ValueError("unknown archive format '%s'" % format)

    func = format_info[0]
    for arg, val in format_info[1]:
        kwargs[arg] = val

    if format != 'zip':
        kwargs['owner'] = owner
        kwargs['group'] = group

    try:
        filename = func(base_name, base_dir, **kwargs)
    finally:
        if root_dir is not None:
            log.debug("changing back to '%s'", save_cwd)
            os.chdir(save_cwd)

    return filename
PKU[�n���
�
	errors.pynu�[���"""distutils.errors

Provides exceptions used by the Distutils modules.  Note that Distutils
modules may raise standard exceptions; in particular, SystemExit is
usually raised for errors that are obviously the end-user's fault
(eg. bad command-line arguments).

This module is safe to use in "from ... import *" mode; it only exports
symbols whose names start with "Distutils" and end with "Error"."""

class DistutilsError (Exception):
    """The root of all Distutils evil."""
    pass

class DistutilsModuleError (DistutilsError):
    """Unable to load an expected module, or to find an expected class
    within some module (in particular, command modules and classes)."""
    pass

class DistutilsClassError (DistutilsError):
    """Some command class (or possibly distribution class, if anyone
    feels a need to subclass Distribution) is found not to be holding
    up its end of the bargain, ie. implementing some part of the
    "command "interface."""
    pass

class DistutilsGetoptError (DistutilsError):
    """The option table provided to 'fancy_getopt()' is bogus."""
    pass

class DistutilsArgError (DistutilsError):
    """Raised by fancy_getopt in response to getopt.error -- ie. an
    error in the command line usage."""
    pass

class DistutilsFileError (DistutilsError):
    """Any problems in the filesystem: expected file not found, etc.
    Typically this is for problems that we detect before OSError
    could be raised."""
    pass

class DistutilsOptionError (DistutilsError):
    """Syntactic/semantic errors in command options, such as use of
    mutually conflicting options, or inconsistent options,
    badly-spelled values, etc.  No distinction is made between option
    values originating in the setup script, the command line, config
    files, or what-have-you -- but if we *know* something originated in
    the setup script, we'll raise DistutilsSetupError instead."""
    pass

class DistutilsSetupError (DistutilsError):
    """For errors that can be definitely blamed on the setup script,
    such as invalid keyword arguments to 'setup()'."""
    pass

class DistutilsPlatformError (DistutilsError):
    """We don't know how to do something on the current platform (but
    we do know how to do it on some platform) -- eg. trying to compile
    C files on a platform not supported by a CCompiler subclass."""
    pass

class DistutilsExecError (DistutilsError):
    """Any problems executing an external program (such as the C
    compiler, when compiling C files)."""
    pass

class DistutilsInternalError (DistutilsError):
    """Internal inconsistencies or impossibilities (obviously, this
    should never be seen if the code is working!)."""
    pass

class DistutilsTemplateError (DistutilsError):
    """Syntax error in a file list template."""

class DistutilsByteCompileError(DistutilsError):
    """Byte compile error."""

# Exception classes used by the CCompiler implementation classes
class CCompilerError (Exception):
    """Some compile/link operation failed."""

class PreprocessError (CCompilerError):
    """Failure to preprocess one or more C/C++ files."""

class CompileError (CCompilerError):
    """Failure to compile one or more C/C++ source files."""

class LibError (CCompilerError):
    """Failure to create a static library from one or more C/C++ object
    files."""

class LinkError (CCompilerError):
    """Failure to link one or more C/C++ object files into an executable
    or shared library file."""

class UnknownFileError (CCompilerError):
    """Attempt to process an unknown file type."""
PKU[�0G>����dist.pynu�[���"""distutils.dist

Provides the Distribution class, which represents the module distribution
being built/installed/distributed.
"""

import sys
import os
import re
from email import message_from_file

try:
    import warnings
except ImportError:
    warnings = None

from distutils.errors import *
from distutils.fancy_getopt import FancyGetopt, translate_longopt
from distutils.util import check_environ, strtobool, rfc822_escape
from distutils import log
from distutils.debug import DEBUG

# Regex to define acceptable Distutils command names.  This is not *quite*
# the same as a Python NAME -- I don't allow leading underscores.  The fact
# that they're very similar is no coincidence; the default naming scheme is
# to look for a Python module named after the command.
command_re = re.compile(r'^[a-zA-Z]([a-zA-Z0-9_]*)$')


def _ensure_list(value, fieldname):
    if isinstance(value, str):
        # a string containing comma separated values is okay.  It will
        # be converted to a list by Distribution.finalize_options().
        pass
    elif not isinstance(value, list):
        # passing a tuple or an iterator perhaps, warn and convert
        typename = type(value).__name__
        msg = f"Warning: '{fieldname}' should be a list, got type '{typename}'"
        log.log(log.WARN, msg)
        value = list(value)
    return value


class Distribution:
    """The core of the Distutils.  Most of the work hiding behind 'setup'
    is really done within a Distribution instance, which farms the work out
    to the Distutils commands specified on the command line.

    Setup scripts will almost never instantiate Distribution directly,
    unless the 'setup()' function is totally inadequate to their needs.
    However, it is conceivable that a setup script might wish to subclass
    Distribution for some specialized purpose, and then pass the subclass
    to 'setup()' as the 'distclass' keyword argument.  If so, it is
    necessary to respect the expectations that 'setup' has of Distribution.
    See the code for 'setup()', in core.py, for details.
    """

    # 'global_options' describes the command-line options that may be
    # supplied to the setup script prior to any actual commands.
    # Eg. "./setup.py -n" or "./setup.py --quiet" both take advantage of
    # these global options.  This list should be kept to a bare minimum,
    # since every global option is also valid as a command option -- and we
    # don't want to pollute the commands with too many options that they
    # have minimal control over.
    # The fourth entry for verbose means that it can be repeated.
    global_options = [
        ('verbose', 'v', "run verbosely (default)", 1),
        ('quiet', 'q', "run quietly (turns verbosity off)"),
        ('dry-run', 'n', "don't actually do anything"),
        ('help', 'h', "show detailed help message"),
        ('no-user-cfg', None,
            'ignore pydistutils.cfg in your home directory'),
    ]

    # 'common_usage' is a short (2-3 line) string describing the common
    # usage of the setup script.
    common_usage = """\
Common commands: (see '--help-commands' for more)

  setup.py build      will build the package underneath 'build/'
  setup.py install    will install the package
"""

    # options that are not propagated to the commands
    display_options = [
        ('help-commands', None,
         "list all available commands"),
        ('name', None,
         "print package name"),
        ('version', 'V',
         "print package version"),
        ('fullname', None,
         "print <package name>-<version>"),
        ('author', None,
         "print the author's name"),
        ('author-email', None,
         "print the author's email address"),
        ('maintainer', None,
         "print the maintainer's name"),
        ('maintainer-email', None,
         "print the maintainer's email address"),
        ('contact', None,
         "print the maintainer's name if known, else the author's"),
        ('contact-email', None,
         "print the maintainer's email address if known, else the author's"),
        ('url', None,
         "print the URL for this package"),
        ('license', None,
         "print the license of the package"),
        ('licence', None,
         "alias for --license"),
        ('description', None,
         "print the package description"),
        ('long-description', None,
         "print the long package description"),
        ('platforms', None,
         "print the list of platforms"),
        ('classifiers', None,
         "print the list of classifiers"),
        ('keywords', None,
         "print the list of keywords"),
        ('provides', None,
         "print the list of packages/modules provided"),
        ('requires', None,
         "print the list of packages/modules required"),
        ('obsoletes', None,
         "print the list of packages/modules made obsolete")
        ]
    display_option_names = [translate_longopt(x[0]) for x in display_options]

    # negative options are options that exclude other options
    negative_opt = {'quiet': 'verbose'}

    # -- Creation/initialization methods -------------------------------

    def __init__(self, attrs=None):
        """Construct a new Distribution instance: initialize all the
        attributes of a Distribution, and then use 'attrs' (a dictionary
        mapping attribute names to values) to assign some of those
        attributes their "real" values.  (Any attributes not mentioned in
        'attrs' will be assigned to some null value: 0, None, an empty list
        or dictionary, etc.)  Most importantly, initialize the
        'command_obj' attribute to the empty dictionary; this will be
        filled in with real command objects by 'parse_command_line()'.
        """

        # Default values for our command-line options
        self.verbose = 1
        self.dry_run = 0
        self.help = 0
        for attr in self.display_option_names:
            setattr(self, attr, 0)

        # Store the distribution meta-data (name, version, author, and so
        # forth) in a separate object -- we're getting to have enough
        # information here (and enough command-line options) that it's
        # worth it.  Also delegate 'get_XXX()' methods to the 'metadata'
        # object in a sneaky and underhanded (but efficient!) way.
        self.metadata = DistributionMetadata()
        for basename in self.metadata._METHOD_BASENAMES:
            method_name = "get_" + basename
            setattr(self, method_name, getattr(self.metadata, method_name))

        # 'cmdclass' maps command names to class objects, so we
        # can 1) quickly figure out which class to instantiate when
        # we need to create a new command object, and 2) have a way
        # for the setup script to override command classes
        self.cmdclass = {}

        # 'command_packages' is a list of packages in which commands
        # are searched for.  The factory for command 'foo' is expected
        # to be named 'foo' in the module 'foo' in one of the packages
        # named here.  This list is searched from the left; an error
        # is raised if no named package provides the command being
        # searched for.  (Always access using get_command_packages().)
        self.command_packages = None

        # 'script_name' and 'script_args' are usually set to sys.argv[0]
        # and sys.argv[1:], but they can be overridden when the caller is
        # not necessarily a setup script run from the command-line.
        self.script_name = None
        self.script_args = None

        # 'command_options' is where we store command options between
        # parsing them (from config files, the command-line, etc.) and when
        # they are actually needed -- ie. when the command in question is
        # instantiated.  It is a dictionary of dictionaries of 2-tuples:
        #   command_options = { command_name : { option : (source, value) } }
        self.command_options = {}

        # 'dist_files' is the list of (command, pyversion, file) that
        # have been created by any dist commands run so far. This is
        # filled regardless of whether the run is dry or not. pyversion
        # gives sysconfig.get_python_version() if the dist file is
        # specific to a Python version, 'any' if it is good for all
        # Python versions on the target platform, and '' for a source
        # file. pyversion should not be used to specify minimum or
        # maximum required Python versions; use the metainfo for that
        # instead.
        self.dist_files = []

        # These options are really the business of various commands, rather
        # than of the Distribution itself.  We provide aliases for them in
        # Distribution as a convenience to the developer.
        self.packages = None
        self.package_data = {}
        self.package_dir = None
        self.py_modules = None
        self.libraries = None
        self.headers = None
        self.ext_modules = None
        self.ext_package = None
        self.include_dirs = None
        self.extra_path = None
        self.scripts = None
        self.data_files = None
        self.password = ''

        # And now initialize bookkeeping stuff that can't be supplied by
        # the caller at all.  'command_obj' maps command names to
        # Command instances -- that's how we enforce that every command
        # class is a singleton.
        self.command_obj = {}

        # 'have_run' maps command names to boolean values; it keeps track
        # of whether we have actually run a particular command, to make it
        # cheap to "run" a command whenever we think we might need to -- if
        # it's already been done, no need for expensive filesystem
        # operations, we just check the 'have_run' dictionary and carry on.
        # It's only safe to query 'have_run' for a command class that has
        # been instantiated -- a false value will be inserted when the
        # command object is created, and replaced with a true value when
        # the command is successfully run.  Thus it's probably best to use
        # '.get()' rather than a straight lookup.
        self.have_run = {}

        # Now we'll use the attrs dictionary (ultimately, keyword args from
        # the setup script) to possibly override any or all of these
        # distribution options.

        if attrs:
            # Pull out the set of command options and work on them
            # specifically.  Note that this order guarantees that aliased
            # command options will override any supplied redundantly
            # through the general options dictionary.
            options = attrs.get('options')
            if options is not None:
                del attrs['options']
                for (command, cmd_options) in options.items():
                    opt_dict = self.get_option_dict(command)
                    for (opt, val) in cmd_options.items():
                        opt_dict[opt] = ("setup script", val)

            if 'licence' in attrs:
                attrs['license'] = attrs['licence']
                del attrs['licence']
                msg = "'licence' distribution option is deprecated; use 'license'"
                if warnings is not None:
                    warnings.warn(msg)
                else:
                    sys.stderr.write(msg + "\n")

            # Now work on the rest of the attributes.  Any attribute that's
            # not already defined is invalid!
            for (key, val) in attrs.items():
                if hasattr(self.metadata, "set_" + key):
                    getattr(self.metadata, "set_" + key)(val)
                elif hasattr(self.metadata, key):
                    setattr(self.metadata, key, val)
                elif hasattr(self, key):
                    setattr(self, key, val)
                else:
                    msg = "Unknown distribution option: %s" % repr(key)
                    warnings.warn(msg)

        # no-user-cfg is handled before other command line args
        # because other args override the config files, and this
        # one is needed before we can load the config files.
        # If attrs['script_args'] wasn't passed, assume false.
        #
        # This also make sure we just look at the global options
        self.want_user_cfg = True

        if self.script_args is not None:
            for arg in self.script_args:
                if not arg.startswith('-'):
                    break
                if arg == '--no-user-cfg':
                    self.want_user_cfg = False
                    break

        self.finalize_options()

    def get_option_dict(self, command):
        """Get the option dictionary for a given command.  If that
        command's option dictionary hasn't been created yet, then create it
        and return the new dictionary; otherwise, return the existing
        option dictionary.
        """
        dict = self.command_options.get(command)
        if dict is None:
            dict = self.command_options[command] = {}
        return dict

    def dump_option_dicts(self, header=None, commands=None, indent=""):
        from pprint import pformat

        if commands is None:             # dump all command option dicts
            commands = sorted(self.command_options.keys())

        if header is not None:
            self.announce(indent + header)
            indent = indent + "  "

        if not commands:
            self.announce(indent + "no commands known yet")
            return

        for cmd_name in commands:
            opt_dict = self.command_options.get(cmd_name)
            if opt_dict is None:
                self.announce(indent +
                              "no option dict for '%s' command" % cmd_name)
            else:
                self.announce(indent +
                              "option dict for '%s' command:" % cmd_name)
                out = pformat(opt_dict)
                for line in out.split('\n'):
                    self.announce(indent + "  " + line)

    # -- Config file finding/parsing methods ---------------------------

    def find_config_files(self):
        """Find as many configuration files as should be processed for this
        platform, and return a list of filenames in the order in which they
        should be parsed.  The filenames returned are guaranteed to exist
        (modulo nasty race conditions).

        There are three possible config files: distutils.cfg in the
        Distutils installation directory (ie. where the top-level
        Distutils __inst__.py file lives), a file in the user's home
        directory named .pydistutils.cfg on Unix and pydistutils.cfg
        on Windows/Mac; and setup.cfg in the current directory.

        The file in the user's home directory can be disabled with the
        --no-user-cfg option.
        """
        files = []
        check_environ()

        # Where to look for the system-wide Distutils config file
        sys_dir = os.path.dirname(sys.modules['distutils'].__file__)

        # Look for the system config file
        sys_file = os.path.join(sys_dir, "distutils.cfg")
        if os.path.isfile(sys_file):
            files.append(sys_file)

        # What to call the per-user config file
        if os.name == 'posix':
            user_filename = ".pydistutils.cfg"
        else:
            user_filename = "pydistutils.cfg"

        # And look for the user config file
        if self.want_user_cfg:
            user_file = os.path.join(os.path.expanduser('~'), user_filename)
            if os.path.isfile(user_file):
                files.append(user_file)

        # All platforms support local setup.cfg
        local_file = "setup.cfg"
        if os.path.isfile(local_file):
            files.append(local_file)

        if DEBUG:
            self.announce("using config files: %s" % ', '.join(files))

        return files

    def parse_config_files(self, filenames=None):
        from configparser import ConfigParser

        # Ignore install directory options if we have a venv
        if sys.prefix != sys.base_prefix:
            ignore_options = [
                'install-base', 'install-platbase', 'install-lib',
                'install-platlib', 'install-purelib', 'install-headers',
                'install-scripts', 'install-data', 'prefix', 'exec-prefix',
                'home', 'user', 'root']
        else:
            ignore_options = []

        ignore_options = frozenset(ignore_options)

        if filenames is None:
            filenames = self.find_config_files()

        if DEBUG:
            self.announce("Distribution.parse_config_files():")

        parser = ConfigParser()
        for filename in filenames:
            if DEBUG:
                self.announce("  reading %s" % filename)
            parser.read(filename)
            for section in parser.sections():
                options = parser.options(section)
                opt_dict = self.get_option_dict(section)

                for opt in options:
                    if opt != '__name__' and opt not in ignore_options:
                        val = parser.get(section,opt)
                        opt = opt.replace('-', '_')
                        opt_dict[opt] = (filename, val)

            # Make the ConfigParser forget everything (so we retain
            # the original filenames that options come from)
            parser.__init__()

        # If there was a "global" section in the config file, use it
        # to set Distribution options.

        if 'global' in self.command_options:
            for (opt, (src, val)) in self.command_options['global'].items():
                alias = self.negative_opt.get(opt)
                try:
                    if alias:
                        setattr(self, alias, not strtobool(val))
                    elif opt in ('verbose', 'dry_run'): # ugh!
                        setattr(self, opt, strtobool(val))
                    else:
                        setattr(self, opt, val)
                except ValueError as msg:
                    raise DistutilsOptionError(msg)

    # -- Command-line parsing methods ----------------------------------

    def parse_command_line(self):
        """Parse the setup script's command line, taken from the
        'script_args' instance attribute (which defaults to 'sys.argv[1:]'
        -- see 'setup()' in core.py).  This list is first processed for
        "global options" -- options that set attributes of the Distribution
        instance.  Then, it is alternately scanned for Distutils commands
        and options for that command.  Each new command terminates the
        options for the previous command.  The allowed options for a
        command are determined by the 'user_options' attribute of the
        command class -- thus, we have to be able to load command classes
        in order to parse the command line.  Any error in that 'options'
        attribute raises DistutilsGetoptError; any error on the
        command-line raises DistutilsArgError.  If no Distutils commands
        were found on the command line, raises DistutilsArgError.  Return
        true if command-line was successfully parsed and we should carry
        on with executing commands; false if no errors but we shouldn't
        execute commands (currently, this only happens if user asks for
        help).
        """
        #
        # We now have enough information to show the Macintosh dialog
        # that allows the user to interactively specify the "command line".
        #
        toplevel_options = self._get_toplevel_options()

        # We have to parse the command line a bit at a time -- global
        # options, then the first command, then its options, and so on --
        # because each command will be handled by a different class, and
        # the options that are valid for a particular class aren't known
        # until we have loaded the command class, which doesn't happen
        # until we know what the command is.

        self.commands = []
        parser = FancyGetopt(toplevel_options + self.display_options)
        parser.set_negative_aliases(self.negative_opt)
        parser.set_aliases({'licence': 'license'})
        args = parser.getopt(args=self.script_args, object=self)
        option_order = parser.get_option_order()
        log.set_verbosity(self.verbose)

        # for display options we return immediately
        if self.handle_display_options(option_order):
            return
        while args:
            args = self._parse_command_opts(parser, args)
            if args is None:            # user asked for help (and got it)
                return

        # Handle the cases of --help as a "global" option, ie.
        # "setup.py --help" and "setup.py --help command ...".  For the
        # former, we show global options (--verbose, --dry-run, etc.)
        # and display-only options (--name, --version, etc.); for the
        # latter, we omit the display-only options and show help for
        # each command listed on the command line.
        if self.help:
            self._show_help(parser,
                            display_options=len(self.commands) == 0,
                            commands=self.commands)
            return

        # Oops, no commands found -- an end-user error
        if not self.commands:
            raise DistutilsArgError("no commands supplied")

        # All is well: return true
        return True

    def _get_toplevel_options(self):
        """Return the non-display options recognized at the top level.

        This includes options that are recognized *only* at the top
        level as well as options recognized for commands.
        """
        return self.global_options + [
            ("command-packages=", None,
             "list of packages that provide distutils commands"),
            ]

    def _parse_command_opts(self, parser, args):
        """Parse the command-line options for a single command.
        'parser' must be a FancyGetopt instance; 'args' must be the list
        of arguments, starting with the current command (whose options
        we are about to parse).  Returns a new version of 'args' with
        the next command at the front of the list; will be the empty
        list if there are no more commands on the command line.  Returns
        None if the user asked for help on this command.
        """
        # late import because of mutual dependence between these modules
        from distutils.cmd import Command

        # Pull the current command from the head of the command line
        command = args[0]
        if not command_re.match(command):
            raise SystemExit("invalid command name '%s'" % command)
        self.commands.append(command)

        # Dig up the command class that implements this command, so we
        # 1) know that it's a valid command, and 2) know which options
        # it takes.
        try:
            cmd_class = self.get_command_class(command)
        except DistutilsModuleError as msg:
            raise DistutilsArgError(msg)

        # Require that the command class be derived from Command -- want
        # to be sure that the basic "command" interface is implemented.
        if not issubclass(cmd_class, Command):
            raise DistutilsClassError(
                "command class %s must subclass Command" % cmd_class)

        # Also make sure that the command object provides a list of its
        # known options.
        if not (hasattr(cmd_class, 'user_options') and
                isinstance(cmd_class.user_options, list)):
            msg = ("command class %s must provide "
                "'user_options' attribute (a list of tuples)")
            raise DistutilsClassError(msg % cmd_class)

        # If the command class has a list of negative alias options,
        # merge it in with the global negative aliases.
        negative_opt = self.negative_opt
        if hasattr(cmd_class, 'negative_opt'):
            negative_opt = negative_opt.copy()
            negative_opt.update(cmd_class.negative_opt)

        # Check for help_options in command class.  They have a different
        # format (tuple of four) so we need to preprocess them here.
        if (hasattr(cmd_class, 'help_options') and
                isinstance(cmd_class.help_options, list)):
            help_options = fix_help_options(cmd_class.help_options)
        else:
            help_options = []

        # All commands support the global options too, just by adding
        # in 'global_options'.
        parser.set_option_table(self.global_options +
                                cmd_class.user_options +
                                help_options)
        parser.set_negative_aliases(negative_opt)
        (args, opts) = parser.getopt(args[1:])
        if hasattr(opts, 'help') and opts.help:
            self._show_help(parser, display_options=0, commands=[cmd_class])
            return

        if (hasattr(cmd_class, 'help_options') and
                isinstance(cmd_class.help_options, list)):
            help_option_found=0
            for (help_option, short, desc, func) in cmd_class.help_options:
                if hasattr(opts, parser.get_attr_name(help_option)):
                    help_option_found=1
                    if callable(func):
                        func()
                    else:
                        raise DistutilsClassError(
                            "invalid help function %r for help option '%s': "
                            "must be a callable object (function, etc.)"
                            % (func, help_option))

            if help_option_found:
                return

        # Put the options from the command-line into their official
        # holding pen, the 'command_options' dictionary.
        opt_dict = self.get_option_dict(command)
        for (name, value) in vars(opts).items():
            opt_dict[name] = ("command line", value)

        return args

    def finalize_options(self):
        """Set final values for all the options on the Distribution
        instance, analogous to the .finalize_options() method of Command
        objects.
        """
        for attr in ('keywords', 'platforms'):
            value = getattr(self.metadata, attr)
            if value is None:
                continue
            if isinstance(value, str):
                value = [elm.strip() for elm in value.split(',')]
                setattr(self.metadata, attr, value)

    def _show_help(self, parser, global_options=1, display_options=1,
                   commands=[]):
        """Show help for the setup script command-line in the form of
        several lists of command-line options.  'parser' should be a
        FancyGetopt instance; do not expect it to be returned in the
        same state, as its option table will be reset to make it
        generate the correct help text.

        If 'global_options' is true, lists the global options:
        --verbose, --dry-run, etc.  If 'display_options' is true, lists
        the "display-only" options: --name, --version, etc.  Finally,
        lists per-command help for every command name or command class
        in 'commands'.
        """
        # late import because of mutual dependence between these modules
        from distutils.core import gen_usage
        from distutils.cmd import Command

        if global_options:
            if display_options:
                options = self._get_toplevel_options()
            else:
                options = self.global_options
            parser.set_option_table(options)
            parser.print_help(self.common_usage + "\nGlobal options:")
            print('')

        if display_options:
            parser.set_option_table(self.display_options)
            parser.print_help(
                "Information display options (just display " +
                "information, ignore any commands)")
            print('')

        for command in self.commands:
            if isinstance(command, type) and issubclass(command, Command):
                klass = command
            else:
                klass = self.get_command_class(command)
            if (hasattr(klass, 'help_options') and
                    isinstance(klass.help_options, list)):
                parser.set_option_table(klass.user_options +
                                        fix_help_options(klass.help_options))
            else:
                parser.set_option_table(klass.user_options)
            parser.print_help("Options for '%s' command:" % klass.__name__)
            print('')

        print(gen_usage(self.script_name))

    def handle_display_options(self, option_order):
        """If there were any non-global "display-only" options
        (--help-commands or the metadata display options) on the command
        line, display the requested info and return true; else return
        false.
        """
        from distutils.core import gen_usage

        # User just wants a list of commands -- we'll print it out and stop
        # processing now (ie. if they ran "setup --help-commands foo bar",
        # we ignore "foo bar").
        if self.help_commands:
            self.print_commands()
            print('')
            print(gen_usage(self.script_name))
            return 1

        # If user supplied any of the "display metadata" options, then
        # display that metadata in the order in which the user supplied the
        # metadata options.
        any_display_options = 0
        is_display_option = {}
        for option in self.display_options:
            is_display_option[option[0]] = 1

        for (opt, val) in option_order:
            if val and is_display_option.get(opt):
                opt = translate_longopt(opt)
                value = getattr(self.metadata, "get_"+opt)()
                if opt in ['keywords', 'platforms']:
                    print(','.join(value))
                elif opt in ('classifiers', 'provides', 'requires',
                             'obsoletes'):
                    print('\n'.join(value))
                else:
                    print(value)
                any_display_options = 1

        return any_display_options

    def print_command_list(self, commands, header, max_length):
        """Print a subset of the list of all commands -- used by
        'print_commands()'.
        """
        print(header + ":")

        for cmd in commands:
            klass = self.cmdclass.get(cmd)
            if not klass:
                klass = self.get_command_class(cmd)
            try:
                description = klass.description
            except AttributeError:
                description = "(no description available)"

            print("  %-*s  %s" % (max_length, cmd, description))

    def print_commands(self):
        """Print out a help message listing all available commands with a
        description of each.  The list is divided into "standard commands"
        (listed in distutils.command.__all__) and "extra commands"
        (mentioned in self.cmdclass, but not a standard command).  The
        descriptions come from the command class attribute
        'description'.
        """
        import distutils.command
        std_commands = distutils.command.__all__
        is_std = {}
        for cmd in std_commands:
            is_std[cmd] = 1

        extra_commands = []
        for cmd in self.cmdclass.keys():
            if not is_std.get(cmd):
                extra_commands.append(cmd)

        max_length = 0
        for cmd in (std_commands + extra_commands):
            if len(cmd) > max_length:
                max_length = len(cmd)

        self.print_command_list(std_commands,
                                "Standard commands",
                                max_length)
        if extra_commands:
            print()
            self.print_command_list(extra_commands,
                                    "Extra commands",
                                    max_length)

    def get_command_list(self):
        """Get a list of (command, description) tuples.
        The list is divided into "standard commands" (listed in
        distutils.command.__all__) and "extra commands" (mentioned in
        self.cmdclass, but not a standard command).  The descriptions come
        from the command class attribute 'description'.
        """
        # Currently this is only used on Mac OS, for the Mac-only GUI
        # Distutils interface (by Jack Jansen)
        import distutils.command
        std_commands = distutils.command.__all__
        is_std = {}
        for cmd in std_commands:
            is_std[cmd] = 1

        extra_commands = []
        for cmd in self.cmdclass.keys():
            if not is_std.get(cmd):
                extra_commands.append(cmd)

        rv = []
        for cmd in (std_commands + extra_commands):
            klass = self.cmdclass.get(cmd)
            if not klass:
                klass = self.get_command_class(cmd)
            try:
                description = klass.description
            except AttributeError:
                description = "(no description available)"
            rv.append((cmd, description))
        return rv

    # -- Command class/object methods ----------------------------------

    def get_command_packages(self):
        """Return a list of packages from which commands are loaded."""
        pkgs = self.command_packages
        if not isinstance(pkgs, list):
            if pkgs is None:
                pkgs = ''
            pkgs = [pkg.strip() for pkg in pkgs.split(',') if pkg != '']
            if "distutils.command" not in pkgs:
                pkgs.insert(0, "distutils.command")
            self.command_packages = pkgs
        return pkgs

    def get_command_class(self, command):
        """Return the class that implements the Distutils command named by
        'command'.  First we check the 'cmdclass' dictionary; if the
        command is mentioned there, we fetch the class object from the
        dictionary and return it.  Otherwise we load the command module
        ("distutils.command." + command) and fetch the command class from
        the module.  The loaded class is also stored in 'cmdclass'
        to speed future calls to 'get_command_class()'.

        Raises DistutilsModuleError if the expected module could not be
        found, or if that module does not define the expected class.
        """
        klass = self.cmdclass.get(command)
        if klass:
            return klass

        for pkgname in self.get_command_packages():
            module_name = "%s.%s" % (pkgname, command)
            klass_name = command

            try:
                __import__(module_name)
                module = sys.modules[module_name]
            except ImportError:
                continue

            try:
                klass = getattr(module, klass_name)
            except AttributeError:
                raise DistutilsModuleError(
                    "invalid command '%s' (no class '%s' in module '%s')"
                    % (command, klass_name, module_name))

            self.cmdclass[command] = klass
            return klass

        raise DistutilsModuleError("invalid command '%s'" % command)

    def get_command_obj(self, command, create=1):
        """Return the command object for 'command'.  Normally this object
        is cached on a previous call to 'get_command_obj()'; if no command
        object for 'command' is in the cache, then we either create and
        return it (if 'create' is true) or return None.
        """
        cmd_obj = self.command_obj.get(command)
        if not cmd_obj and create:
            if DEBUG:
                self.announce("Distribution.get_command_obj(): "
                              "creating '%s' command object" % command)

            klass = self.get_command_class(command)
            cmd_obj = self.command_obj[command] = klass(self)
            self.have_run[command] = 0

            # Set any options that were supplied in config files
            # or on the command line.  (NB. support for error
            # reporting is lame here: any errors aren't reported
            # until 'finalize_options()' is called, which means
            # we won't report the source of the error.)
            options = self.command_options.get(command)
            if options:
                self._set_command_options(cmd_obj, options)

        return cmd_obj

    def _set_command_options(self, command_obj, option_dict=None):
        """Set the options for 'command_obj' from 'option_dict'.  Basically
        this means copying elements of a dictionary ('option_dict') to
        attributes of an instance ('command').

        'command_obj' must be a Command instance.  If 'option_dict' is not
        supplied, uses the standard option dictionary for this command
        (from 'self.command_options').
        """
        command_name = command_obj.get_command_name()
        if option_dict is None:
            option_dict = self.get_option_dict(command_name)

        if DEBUG:
            self.announce("  setting options for '%s' command:" % command_name)
        for (option, (source, value)) in option_dict.items():
            if DEBUG:
                self.announce("    %s = %s (from %s)" % (option, value,
                                                         source))
            try:
                bool_opts = [translate_longopt(o)
                             for o in command_obj.boolean_options]
            except AttributeError:
                bool_opts = []
            try:
                neg_opt = command_obj.negative_opt
            except AttributeError:
                neg_opt = {}

            try:
                is_string = isinstance(value, str)
                if option in neg_opt and is_string:
                    setattr(command_obj, neg_opt[option], not strtobool(value))
                elif option in bool_opts and is_string:
                    setattr(command_obj, option, strtobool(value))
                elif hasattr(command_obj, option):
                    setattr(command_obj, option, value)
                else:
                    raise DistutilsOptionError(
                        "error in %s: command '%s' has no such option '%s'"
                        % (source, command_name, option))
            except ValueError as msg:
                raise DistutilsOptionError(msg)

    def reinitialize_command(self, command, reinit_subcommands=0):
        """Reinitializes a command to the state it was in when first
        returned by 'get_command_obj()': ie., initialized but not yet
        finalized.  This provides the opportunity to sneak option
        values in programmatically, overriding or supplementing
        user-supplied values from the config files and command line.
        You'll have to re-finalize the command object (by calling
        'finalize_options()' or 'ensure_finalized()') before using it for
        real.

        'command' should be a command name (string) or command object.  If
        'reinit_subcommands' is true, also reinitializes the command's
        sub-commands, as declared by the 'sub_commands' class attribute (if
        it has one).  See the "install" command for an example.  Only
        reinitializes the sub-commands that actually matter, ie. those
        whose test predicates return true.

        Returns the reinitialized command object.
        """
        from distutils.cmd import Command
        if not isinstance(command, Command):
            command_name = command
            command = self.get_command_obj(command_name)
        else:
            command_name = command.get_command_name()

        if not command.finalized:
            return command
        command.initialize_options()
        command.finalized = 0
        self.have_run[command_name] = 0
        self._set_command_options(command)

        if reinit_subcommands:
            for sub in command.get_sub_commands():
                self.reinitialize_command(sub, reinit_subcommands)

        return command

    # -- Methods that operate on the Distribution ----------------------

    def announce(self, msg, level=log.INFO):
        log.log(level, msg)

    def run_commands(self):
        """Run each command that was seen on the setup script command line.
        Uses the list of commands found and cache of command objects
        created by 'get_command_obj()'.
        """
        for cmd in self.commands:
            self.run_command(cmd)

    # -- Methods that operate on its Commands --------------------------

    def run_command(self, command):
        """Do whatever it takes to run a command (including nothing at all,
        if the command has already been run).  Specifically: if we have
        already created and run the command named by 'command', return
        silently without doing anything.  If the command named by 'command'
        doesn't even have a command object yet, create one.  Then invoke
        'run()' on that command object (or an existing one).
        """
        # Already been here, done that? then return silently.
        if self.have_run.get(command):
            return

        log.info("running %s", command)
        cmd_obj = self.get_command_obj(command)
        cmd_obj.ensure_finalized()
        cmd_obj.run()
        self.have_run[command] = 1

    # -- Distribution query methods ------------------------------------

    def has_pure_modules(self):
        return len(self.packages or self.py_modules or []) > 0

    def has_ext_modules(self):
        return self.ext_modules and len(self.ext_modules) > 0

    def has_c_libraries(self):
        return self.libraries and len(self.libraries) > 0

    def has_modules(self):
        return self.has_pure_modules() or self.has_ext_modules()

    def has_headers(self):
        return self.headers and len(self.headers) > 0

    def has_scripts(self):
        return self.scripts and len(self.scripts) > 0

    def has_data_files(self):
        return self.data_files and len(self.data_files) > 0

    def is_pure(self):
        return (self.has_pure_modules() and
                not self.has_ext_modules() and
                not self.has_c_libraries())

    # -- Metadata query methods ----------------------------------------

    # If you're looking for 'get_name()', 'get_version()', and so forth,
    # they are defined in a sneaky way: the constructor binds self.get_XXX
    # to self.metadata.get_XXX.  The actual code is in the
    # DistributionMetadata class, below.

class DistributionMetadata:
    """Dummy class to hold the distribution meta-data: name, version,
    author, and so forth.
    """

    _METHOD_BASENAMES = ("name", "version", "author", "author_email",
                         "maintainer", "maintainer_email", "url",
                         "license", "description", "long_description",
                         "keywords", "platforms", "fullname", "contact",
                         "contact_email", "classifiers", "download_url",
                         # PEP 314
                         "provides", "requires", "obsoletes",
                         )

    def __init__(self, path=None):
        if path is not None:
            self.read_pkg_file(open(path))
        else:
            self.name = None
            self.version = None
            self.author = None
            self.author_email = None
            self.maintainer = None
            self.maintainer_email = None
            self.url = None
            self.license = None
            self.description = None
            self.long_description = None
            self.keywords = None
            self.platforms = None
            self.classifiers = None
            self.download_url = None
            # PEP 314
            self.provides = None
            self.requires = None
            self.obsoletes = None

    def read_pkg_file(self, file):
        """Reads the metadata values from a file object."""
        msg = message_from_file(file)

        def _read_field(name):
            value = msg[name]
            if value == 'UNKNOWN':
                return None
            return value

        def _read_list(name):
            values = msg.get_all(name, None)
            if values == []:
                return None
            return values

        metadata_version = msg['metadata-version']
        self.name = _read_field('name')
        self.version = _read_field('version')
        self.description = _read_field('summary')
        # we are filling author only.
        self.author = _read_field('author')
        self.maintainer = None
        self.author_email = _read_field('author-email')
        self.maintainer_email = None
        self.url = _read_field('home-page')
        self.license = _read_field('license')

        if 'download-url' in msg:
            self.download_url = _read_field('download-url')
        else:
            self.download_url = None

        self.long_description = _read_field('description')
        self.description = _read_field('summary')

        if 'keywords' in msg:
            self.keywords = _read_field('keywords').split(',')

        self.platforms = _read_list('platform')
        self.classifiers = _read_list('classifier')

        # PEP 314 - these fields only exist in 1.1
        if metadata_version == '1.1':
            self.requires = _read_list('requires')
            self.provides = _read_list('provides')
            self.obsoletes = _read_list('obsoletes')
        else:
            self.requires = None
            self.provides = None
            self.obsoletes = None

    def write_pkg_info(self, base_dir):
        """Write the PKG-INFO file into the release tree.
        """
        with open(os.path.join(base_dir, 'PKG-INFO'), 'w',
                  encoding='UTF-8') as pkg_info:
            self.write_pkg_file(pkg_info)

    def write_pkg_file(self, file):
        """Write the PKG-INFO format data to a file object.
        """
        version = '1.0'
        if (self.provides or self.requires or self.obsoletes or
                self.classifiers or self.download_url):
            version = '1.1'

        file.write('Metadata-Version: %s\n' % version)
        file.write('Name: %s\n' % self.get_name())
        file.write('Version: %s\n' % self.get_version())
        file.write('Summary: %s\n' % self.get_description())
        file.write('Home-page: %s\n' % self.get_url())
        file.write('Author: %s\n' % self.get_contact())
        file.write('Author-email: %s\n' % self.get_contact_email())
        file.write('License: %s\n' % self.get_license())
        if self.download_url:
            file.write('Download-URL: %s\n' % self.download_url)

        long_desc = rfc822_escape(self.get_long_description())
        file.write('Description: %s\n' % long_desc)

        keywords = ','.join(self.get_keywords())
        if keywords:
            file.write('Keywords: %s\n' % keywords)

        self._write_list(file, 'Platform', self.get_platforms())
        self._write_list(file, 'Classifier', self.get_classifiers())

        # PEP 314
        self._write_list(file, 'Requires', self.get_requires())
        self._write_list(file, 'Provides', self.get_provides())
        self._write_list(file, 'Obsoletes', self.get_obsoletes())

    def _write_list(self, file, name, values):
        for value in values:
            file.write('%s: %s\n' % (name, value))

    # -- Metadata query methods ----------------------------------------

    def get_name(self):
        return self.name or "UNKNOWN"

    def get_version(self):
        return self.version or "0.0.0"

    def get_fullname(self):
        return "%s-%s" % (self.get_name(), self.get_version())

    def get_author(self):
        return self.author or "UNKNOWN"

    def get_author_email(self):
        return self.author_email or "UNKNOWN"

    def get_maintainer(self):
        return self.maintainer or "UNKNOWN"

    def get_maintainer_email(self):
        return self.maintainer_email or "UNKNOWN"

    def get_contact(self):
        return self.maintainer or self.author or "UNKNOWN"

    def get_contact_email(self):
        return self.maintainer_email or self.author_email or "UNKNOWN"

    def get_url(self):
        return self.url or "UNKNOWN"

    def get_license(self):
        return self.license or "UNKNOWN"
    get_licence = get_license

    def get_description(self):
        return self.description or "UNKNOWN"

    def get_long_description(self):
        return self.long_description or "UNKNOWN"

    def get_keywords(self):
        return self.keywords or []

    def set_keywords(self, value):
        self.keywords = _ensure_list(value, 'keywords')

    def get_platforms(self):
        return self.platforms or ["UNKNOWN"]

    def set_platforms(self, value):
        self.platforms = _ensure_list(value, 'platforms')

    def get_classifiers(self):
        return self.classifiers or []

    def set_classifiers(self, value):
        self.classifiers = _ensure_list(value, 'classifiers')

    def get_download_url(self):
        return self.download_url or "UNKNOWN"

    # PEP 314
    def get_requires(self):
        return self.requires or []

    def set_requires(self, value):
        import distutils.versionpredicate
        for v in value:
            distutils.versionpredicate.VersionPredicate(v)
        self.requires = list(value)

    def get_provides(self):
        return self.provides or []

    def set_provides(self, value):
        value = [v.strip() for v in value]
        for v in value:
            import distutils.versionpredicate
            distutils.versionpredicate.split_provision(v)
        self.provides = value

    def get_obsoletes(self):
        return self.obsoletes or []

    def set_obsoletes(self, value):
        import distutils.versionpredicate
        for v in value:
            distutils.versionpredicate.VersionPredicate(v)
        self.obsoletes = list(value)

def fix_help_options(options):
    """Convert a 4-tuple 'help_options' list as found in various command
    classes to the 3-tuple form required by FancyGetopt.
    """
    new_options = []
    for help_tuple in options:
        new_options.append(help_tuple[0:3])
    return new_options
PKU[����file_util.pynu�[���"""distutils.file_util

Utility functions for operating on single files.
"""

import os
from distutils.errors import DistutilsFileError
from distutils import log

# for generating verbose output in 'copy_file()'
_copy_action = { None:   'copying',
                 'hard': 'hard linking',
                 'sym':  'symbolically linking' }


def _copy_file_contents(src, dst, buffer_size=16*1024):
    """Copy the file 'src' to 'dst'; both must be filenames.  Any error
    opening either file, reading from 'src', or writing to 'dst', raises
    DistutilsFileError.  Data is read/written in chunks of 'buffer_size'
    bytes (default 16k).  No attempt is made to handle anything apart from
    regular files.
    """
    # Stolen from shutil module in the standard library, but with
    # custom error-handling added.
    fsrc = None
    fdst = None
    try:
        try:
            fsrc = open(src, 'rb')
        except OSError as e:
            raise DistutilsFileError("could not open '%s': %s" % (src, e.strerror))

        if os.path.exists(dst):
            try:
                os.unlink(dst)
            except OSError as e:
                raise DistutilsFileError(
                      "could not delete '%s': %s" % (dst, e.strerror))

        try:
            fdst = open(dst, 'wb')
        except OSError as e:
            raise DistutilsFileError(
                  "could not create '%s': %s" % (dst, e.strerror))

        while True:
            try:
                buf = fsrc.read(buffer_size)
            except OSError as e:
                raise DistutilsFileError(
                      "could not read from '%s': %s" % (src, e.strerror))

            if not buf:
                break

            try:
                fdst.write(buf)
            except OSError as e:
                raise DistutilsFileError(
                      "could not write to '%s': %s" % (dst, e.strerror))
    finally:
        if fdst:
            fdst.close()
        if fsrc:
            fsrc.close()

def copy_file(src, dst, preserve_mode=1, preserve_times=1, update=0,
              link=None, verbose=1, dry_run=0):
    """Copy a file 'src' to 'dst'.  If 'dst' is a directory, then 'src' is
    copied there with the same name; otherwise, it must be a filename.  (If
    the file exists, it will be ruthlessly clobbered.)  If 'preserve_mode'
    is true (the default), the file's mode (type and permission bits, or
    whatever is analogous on the current platform) is copied.  If
    'preserve_times' is true (the default), the last-modified and
    last-access times are copied as well.  If 'update' is true, 'src' will
    only be copied if 'dst' does not exist, or if 'dst' does exist but is
    older than 'src'.

    'link' allows you to make hard links (os.link) or symbolic links
    (os.symlink) instead of copying: set it to "hard" or "sym"; if it is
    None (the default), files are copied.  Don't set 'link' on systems that
    don't support it: 'copy_file()' doesn't check if hard or symbolic
    linking is available. If hardlink fails, falls back to
    _copy_file_contents().

    Under Mac OS, uses the native file copy function in macostools; on
    other systems, uses '_copy_file_contents()' to copy file contents.

    Return a tuple (dest_name, copied): 'dest_name' is the actual name of
    the output file, and 'copied' is true if the file was copied (or would
    have been copied, if 'dry_run' true).
    """
    # XXX if the destination file already exists, we clobber it if
    # copying, but blow up if linking.  Hmmm.  And I don't know what
    # macostools.copyfile() does.  Should definitely be consistent, and
    # should probably blow up if destination exists and we would be
    # changing it (ie. it's not already a hard/soft link to src OR
    # (not update) and (src newer than dst).

    from distutils.dep_util import newer
    from stat import ST_ATIME, ST_MTIME, ST_MODE, S_IMODE

    if not os.path.isfile(src):
        raise DistutilsFileError(
              "can't copy '%s': doesn't exist or not a regular file" % src)

    if os.path.isdir(dst):
        dir = dst
        dst = os.path.join(dst, os.path.basename(src))
    else:
        dir = os.path.dirname(dst)

    if update and not newer(src, dst):
        if verbose >= 1:
            log.debug("not copying %s (output up-to-date)", src)
        return (dst, 0)

    try:
        action = _copy_action[link]
    except KeyError:
        raise ValueError("invalid value '%s' for 'link' argument" % link)

    if verbose >= 1:
        if os.path.basename(dst) == os.path.basename(src):
            log.info("%s %s -> %s", action, src, dir)
        else:
            log.info("%s %s -> %s", action, src, dst)

    if dry_run:
        return (dst, 1)

    # If linking (hard or symbolic), use the appropriate system call
    # (Unix only, of course, but that's the caller's responsibility)
    elif link == 'hard':
        if not (os.path.exists(dst) and os.path.samefile(src, dst)):
            try:
                os.link(src, dst)
                return (dst, 1)
            except OSError:
                # If hard linking fails, fall back on copying file
                # (some special filesystems don't support hard linking
                #  even under Unix, see issue #8876).
                pass
    elif link == 'sym':
        if not (os.path.exists(dst) and os.path.samefile(src, dst)):
            os.symlink(src, dst)
            return (dst, 1)

    # Otherwise (non-Mac, not linking), copy the file contents and
    # (optionally) copy the times and mode.
    _copy_file_contents(src, dst)
    if preserve_mode or preserve_times:
        st = os.stat(src)

        # According to David Ascher <da@ski.org>, utime() should be done
        # before chmod() (at least under NT).
        if preserve_times:
            os.utime(dst, (st[ST_ATIME], st[ST_MTIME]))
        if preserve_mode:
            os.chmod(dst, S_IMODE(st[ST_MODE]))

    return (dst, 1)


# XXX I suspect this is Unix-specific -- need porting help!
def move_file (src, dst,
               verbose=1,
               dry_run=0):

    """Move a file 'src' to 'dst'.  If 'dst' is a directory, the file will
    be moved into it with the same name; otherwise, 'src' is just renamed
    to 'dst'.  Return the new full name of the file.

    Handles cross-device moves on Unix using 'copy_file()'.  What about
    other systems???
    """
    from os.path import exists, isfile, isdir, basename, dirname
    import errno

    if verbose >= 1:
        log.info("moving %s -> %s", src, dst)

    if dry_run:
        return dst

    if not isfile(src):
        raise DistutilsFileError("can't move '%s': not a regular file" % src)

    if isdir(dst):
        dst = os.path.join(dst, basename(src))
    elif exists(dst):
        raise DistutilsFileError(
              "can't move '%s': destination '%s' already exists" %
              (src, dst))

    if not isdir(dirname(dst)):
        raise DistutilsFileError(
              "can't move '%s': destination '%s' not a valid path" %
              (src, dst))

    copy_it = False
    try:
        os.rename(src, dst)
    except OSError as e:
        (num, msg) = e.args
        if num == errno.EXDEV:
            copy_it = True
        else:
            raise DistutilsFileError(
                  "couldn't move '%s' to '%s': %s" % (src, dst, msg))

    if copy_it:
        copy_file(src, dst, verbose=verbose)
        try:
            os.unlink(src)
        except OSError as e:
            (num, msg) = e.args
            try:
                os.unlink(dst)
            except OSError:
                pass
            raise DistutilsFileError(
                  "couldn't move '%s' to '%s' by copy/delete: "
                  "delete '%s' failed: %s"
                  % (src, dst, src, msg))
    return dst


def write_file (filename, contents):
    """Create a file with the specified name and write 'contents' (a
    sequence of strings without line terminators) to it.
    """
    f = open(filename, "w")
    try:
        for line in contents:
            f.write(line + "\n")
    finally:
        f.close()
PKU[O�}�;�;unixccompiler.pynu�[���"""distutils.unixccompiler

Contains the UnixCCompiler class, a subclass of CCompiler that handles
the "typical" Unix-style command-line C compiler:
  * macros defined with -Dname[=value]
  * macros undefined with -Uname
  * include search directories specified with -Idir
  * libraries specified with -lllib
  * library search directories specified with -Ldir
  * compile handled by 'cc' (or similar) executable with -c option:
    compiles .c to .o
  * link static library handled by 'ar' command (possibly with 'ranlib')
  * link shared library handled by 'cc -shared'
"""

import os, sys, re

from distutils import sysconfig
from distutils.dep_util import newer
from distutils.ccompiler import \
     CCompiler, gen_preprocess_options, gen_lib_options
from distutils.errors import \
     DistutilsExecError, CompileError, LibError, LinkError
from distutils import log

if sys.platform == 'darwin':
    import _osx_support

# XXX Things not currently handled:
#   * optimization/debug/warning flags; we just use whatever's in Python's
#     Makefile and live with it.  Is this adequate?  If not, we might
#     have to have a bunch of subclasses GNUCCompiler, SGICCompiler,
#     SunCCompiler, and I suspect down that road lies madness.
#   * even if we don't know a warning flag from an optimization flag,
#     we need some way for outsiders to feed preprocessor/compiler/linker
#     flags in to us -- eg. a sysadmin might want to mandate certain flags
#     via a site config file, or a user might want to set something for
#     compiling this module distribution only via the setup.py command
#     line, whatever.  As long as these options come from something on the
#     current system, they can be as system-dependent as they like, and we
#     should just happily stuff them into the preprocessor/compiler/linker
#     options and carry on.


class UnixCCompiler(CCompiler):

    compiler_type = 'unix'

    # These are used by CCompiler in two places: the constructor sets
    # instance attributes 'preprocessor', 'compiler', etc. from them, and
    # 'set_executable()' allows any of these to be set.  The defaults here
    # are pretty generic; they will probably have to be set by an outsider
    # (eg. using information discovered by the sysconfig about building
    # Python extensions).
    executables = {'preprocessor' : None,
                   'compiler'     : ["cc"],
                   'compiler_so'  : ["cc"],
                   'compiler_cxx' : ["cc"],
                   'linker_so'    : ["cc", "-shared"],
                   'linker_exe'   : ["cc"],
                   'archiver'     : ["ar", "-cr"],
                   'ranlib'       : None,
                  }

    if sys.platform[:6] == "darwin":
        executables['ranlib'] = ["ranlib"]

    # Needed for the filename generation methods provided by the base
    # class, CCompiler.  NB. whoever instantiates/uses a particular
    # UnixCCompiler instance should set 'shared_lib_ext' -- we set a
    # reasonable common default here, but it's not necessarily used on all
    # Unices!

    src_extensions = [".c",".C",".cc",".cxx",".cpp",".m"]
    obj_extension = ".o"
    static_lib_extension = ".a"
    shared_lib_extension = ".so"
    dylib_lib_extension = ".dylib"
    xcode_stub_lib_extension = ".tbd"
    static_lib_format = shared_lib_format = dylib_lib_format = "lib%s%s"
    xcode_stub_lib_format = dylib_lib_format
    if sys.platform == "cygwin":
        exe_extension = ".exe"

    def _fix_lib_args(self, libraries, library_dirs, runtime_library_dirs):
        """Remove standard library path from rpath"""
        libraries, library_dirs, runtime_library_dirs = super()._fix_lib_args(
            libraries, library_dirs, runtime_library_dirs)
        libdir = sysconfig.get_config_var('LIBDIR')
        if runtime_library_dirs and (libdir in runtime_library_dirs):
            runtime_library_dirs.remove(libdir)
        return libraries, library_dirs, runtime_library_dirs

    def preprocess(self, source, output_file=None, macros=None,
                   include_dirs=None, extra_preargs=None, extra_postargs=None):
        fixed_args = self._fix_compile_args(None, macros, include_dirs)
        ignore, macros, include_dirs = fixed_args
        pp_opts = gen_preprocess_options(macros, include_dirs)
        pp_args = self.preprocessor + pp_opts
        if output_file:
            pp_args.extend(['-o', output_file])
        if extra_preargs:
            pp_args[:0] = extra_preargs
        if extra_postargs:
            pp_args.extend(extra_postargs)
        pp_args.append(source)

        # We need to preprocess: either we're being forced to, or we're
        # generating output to stdout, or there's a target output file and
        # the source file is newer than the target (or the target doesn't
        # exist).
        if self.force or output_file is None or newer(source, output_file):
            if output_file:
                self.mkpath(os.path.dirname(output_file))
            try:
                self.spawn(pp_args)
            except DistutilsExecError as msg:
                raise CompileError(msg)

    def _compile(self, obj, src, ext, cc_args, extra_postargs, pp_opts):
        compiler_so = self.compiler_so
        if sys.platform == 'darwin':
            compiler_so = _osx_support.compiler_fixup(compiler_so,
                                                    cc_args + extra_postargs)
        try:
            self.spawn(compiler_so + cc_args + [src, '-o', obj] +
                       extra_postargs)
        except DistutilsExecError as msg:
            raise CompileError(msg)

    def create_static_lib(self, objects, output_libname,
                          output_dir=None, debug=0, target_lang=None):
        objects, output_dir = self._fix_object_args(objects, output_dir)

        output_filename = \
            self.library_filename(output_libname, output_dir=output_dir)

        if self._need_link(objects, output_filename):
            self.mkpath(os.path.dirname(output_filename))
            self.spawn(self.archiver +
                       [output_filename] +
                       objects + self.objects)

            # Not many Unices required ranlib anymore -- SunOS 4.x is, I
            # think the only major Unix that does.  Maybe we need some
            # platform intelligence here to skip ranlib if it's not
            # needed -- or maybe Python's configure script took care of
            # it for us, hence the check for leading colon.
            if self.ranlib:
                try:
                    self.spawn(self.ranlib + [output_filename])
                except DistutilsExecError as msg:
                    raise LibError(msg)
        else:
            log.debug("skipping %s (up-to-date)", output_filename)

    def link(self, target_desc, objects,
             output_filename, output_dir=None, libraries=None,
             library_dirs=None, runtime_library_dirs=None,
             export_symbols=None, debug=0, extra_preargs=None,
             extra_postargs=None, build_temp=None, target_lang=None):
        objects, output_dir = self._fix_object_args(objects, output_dir)
        fixed_args = self._fix_lib_args(libraries, library_dirs,
                                        runtime_library_dirs)
        libraries, library_dirs, runtime_library_dirs = fixed_args

        lib_opts = gen_lib_options(self, library_dirs, runtime_library_dirs,
                                   libraries)
        if not isinstance(output_dir, (str, type(None))):
            raise TypeError("'output_dir' must be a string or None")
        if output_dir is not None:
            output_filename = os.path.join(output_dir, output_filename)

        if self._need_link(objects, output_filename):
            ld_args = (objects + self.objects +
                       lib_opts + ['-o', output_filename])
            if debug:
                ld_args[:0] = ['-g']
            if extra_preargs:
                ld_args[:0] = extra_preargs
            if extra_postargs:
                ld_args.extend(extra_postargs)
            self.mkpath(os.path.dirname(output_filename))
            try:
                if target_desc == CCompiler.EXECUTABLE:
                    linker = self.linker_exe[:]
                else:
                    linker = self.linker_so[:]
                if target_lang == "c++" and self.compiler_cxx:
                    # skip over environment variable settings if /usr/bin/env
                    # is used to set up the linker's environment.
                    # This is needed on OSX. Note: this assumes that the
                    # normal and C++ compiler have the same environment
                    # settings.
                    i = 0
                    if os.path.basename(linker[0]) == "env":
                        i = 1
                        while '=' in linker[i]:
                            i += 1

                    if os.path.basename(linker[i]) == 'ld_so_aix':
                        # AIX platforms prefix the compiler with the ld_so_aix
                        # script, so we need to adjust our linker index
                        offset = 1
                    else:
                        offset = 0

                    linker[i+offset] = self.compiler_cxx[i]

                if sys.platform == 'darwin':
                    linker = _osx_support.compiler_fixup(linker, ld_args)

                self.spawn(linker + ld_args)
            except DistutilsExecError as msg:
                raise LinkError(msg)
        else:
            log.debug("skipping %s (up-to-date)", output_filename)

    # -- Miscellaneous methods -----------------------------------------
    # These are all used by the 'gen_lib_options() function, in
    # ccompiler.py.

    def library_dir_option(self, dir):
        return "-L" + dir

    def _is_gcc(self, compiler_name):
        return "gcc" in compiler_name or "g++" in compiler_name

    def runtime_library_dir_option(self, dir):
        # XXX Hackish, at the very least.  See Python bug #445902:
        # http://sourceforge.net/tracker/index.php
        #   ?func=detail&aid=445902&group_id=5470&atid=105470
        # Linkers on different platforms need different options to
        # specify that directories need to be added to the list of
        # directories searched for dependencies when a dynamic library
        # is sought.  GCC on GNU systems (Linux, FreeBSD, ...) has to
        # be told to pass the -R option through to the linker, whereas
        # other compilers and gcc on other systems just know this.
        # Other compilers may need something slightly different.  At
        # this time, there's no way to determine this information from
        # the configuration data stored in the Python installation, so
        # we use this hack.
        compiler = os.path.basename(sysconfig.get_config_var("CC"))
        if sys.platform[:6] == "darwin":
            # MacOSX's linker doesn't understand the -R flag at all
            return "-L" + dir
        elif sys.platform[:7] == "freebsd":
            return "-Wl,-rpath=" + dir
        elif sys.platform[:5] == "hp-ux":
            if self._is_gcc(compiler):
                return ["-Wl,+s", "-L" + dir]
            return ["+s", "-L" + dir]
        else:
            if self._is_gcc(compiler):
                # gcc on non-GNU systems does not need -Wl, but can
                # use it anyway.  Since distutils has always passed in
                # -Wl whenever gcc was used in the past it is probably
                # safest to keep doing so.
                if sysconfig.get_config_var("GNULD") == "yes":
                    # GNU ld needs an extra option to get a RUNPATH
                    # instead of just an RPATH.
                    return "-Wl,--enable-new-dtags,-R" + dir
                else:
                    return "-Wl,-R" + dir
            else:
                # No idea how --enable-new-dtags would be passed on to
                # ld if this system was using GNU ld.  Don't know if a
                # system like this even exists.
                return "-R" + dir

    def library_option(self, lib):
        return "-l" + lib

    def find_library_file(self, dirs, lib, debug=0):
        shared_f = self.library_filename(lib, lib_type='shared')
        dylib_f = self.library_filename(lib, lib_type='dylib')
        xcode_stub_f = self.library_filename(lib, lib_type='xcode_stub')
        static_f = self.library_filename(lib, lib_type='static')

        if sys.platform == 'darwin':
            # On OSX users can specify an alternate SDK using
            # '-isysroot', calculate the SDK root if it is specified
            # (and use it further on)
            #
            # Note that, as of Xcode 7, Apple SDKs may contain textual stub
            # libraries with .tbd extensions rather than the normal .dylib
            # shared libraries installed in /.  The Apple compiler tool
            # chain handles this transparently but it can cause problems
            # for programs that are being built with an SDK and searching
            # for specific libraries.  Callers of find_library_file need to
            # keep in mind that the base filename of the returned SDK library
            # file might have a different extension from that of the library
            # file installed on the running system, for example:
            #   /Applications/Xcode.app/Contents/Developer/Platforms/
            #       MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk/
            #       usr/lib/libedit.tbd
            # vs
            #   /usr/lib/libedit.dylib
            cflags = sysconfig.get_config_var('CFLAGS')
            m = re.search(r'-isysroot\s*(\S+)', cflags)
            if m is None:
                sysroot = _osx_support._default_sysroot(sysconfig.get_config_var('CC'))
            else:
                sysroot = m.group(1)



        for dir in dirs:
            shared = os.path.join(dir, shared_f)
            dylib = os.path.join(dir, dylib_f)
            static = os.path.join(dir, static_f)
            xcode_stub = os.path.join(dir, xcode_stub_f)

            if sys.platform == 'darwin' and (
                dir.startswith('/System/') or (
                dir.startswith('/usr/') and not dir.startswith('/usr/local/'))):

                shared = os.path.join(sysroot, dir[1:], shared_f)
                dylib = os.path.join(sysroot, dir[1:], dylib_f)
                static = os.path.join(sysroot, dir[1:], static_f)
                xcode_stub = os.path.join(sysroot, dir[1:], xcode_stub_f)

            # We're second-guessing the linker here, with not much hard
            # data to go on: GCC seems to prefer the shared library, so I'm
            # assuming that *all* Unix C compilers do.  And of course I'm
            # ignoring even GCC's "-static" option.  So sue me.
            if os.path.exists(dylib):
                return dylib
            elif os.path.exists(xcode_stub):
                return xcode_stub
            elif os.path.exists(shared):
                return shared
            elif os.path.exists(static):
                return static

        # Oops, didn't find it in *any* of 'dirs'
        return None
PKU[D/oPPsysconfig.pynu�[���"""Provide access to Python's configuration information.  The specific
configuration variables available depend heavily on the platform and
configuration.  The values may be retrieved using
get_config_var(name), and the list of variables is available via
get_config_vars().keys().  Additional convenience functions are also
available.

Written by:   Fred L. Drake, Jr.
Email:        <fdrake@acm.org>
"""

import _imp
import os
import re
import sys

from .errors import DistutilsPlatformError
from .util import get_platform, get_host_platform

# These are needed in a couple of spots, so just compute them once.
PREFIX = os.path.normpath(sys.prefix)
EXEC_PREFIX = os.path.normpath(sys.exec_prefix)
BASE_PREFIX = os.path.normpath(sys.base_prefix)
BASE_EXEC_PREFIX = os.path.normpath(sys.base_exec_prefix)

# Path to the base directory of the project. On Windows the binary may
# live in project/PCbuild/win32 or project/PCbuild/amd64.
# set for cross builds
if "_PYTHON_PROJECT_BASE" in os.environ:
    project_base = os.path.abspath(os.environ["_PYTHON_PROJECT_BASE"])
else:
    if sys.executable:
        project_base = os.path.dirname(os.path.abspath(sys.executable))
    else:
        # sys.executable can be empty if argv[0] has been changed and Python is
        # unable to retrieve the real program name
        project_base = os.getcwd()


# python_build: (Boolean) if true, we're either building Python or
# building an extension with an un-installed Python, so we use
# different (hard-wired) directories.
def _is_python_source_dir(d):
    for fn in ("Setup", "Setup.local"):
        if os.path.isfile(os.path.join(d, "Modules", fn)):
            return True
    return False

_sys_home = getattr(sys, '_home', None)

if os.name == 'nt':
    def _fix_pcbuild(d):
        if d and os.path.normcase(d).startswith(
                os.path.normcase(os.path.join(PREFIX, "PCbuild"))):
            return PREFIX
        return d
    project_base = _fix_pcbuild(project_base)
    _sys_home = _fix_pcbuild(_sys_home)

def _python_build():
    if _sys_home:
        return _is_python_source_dir(_sys_home)
    return _is_python_source_dir(project_base)

python_build = _python_build()


# Calculate the build qualifier flags if they are defined.  Adding the flags
# to the include and lib directories only makes sense for an installation, not
# an in-source build.
build_flags = ''
try:
    if not python_build:
        build_flags = sys.abiflags
except AttributeError:
    # It's not a configure-based build, so the sys module doesn't have
    # this attribute, which is fine.
    pass

def get_python_version():
    """Return a string containing the major and minor Python version,
    leaving off the patchlevel.  Sample return values could be '1.5'
    or '2.2'.
    """
    return '%d.%d' % sys.version_info[:2]


def get_python_inc(plat_specific=0, prefix=None):
    """Return the directory containing installed Python header files.

    If 'plat_specific' is false (the default), this is the path to the
    non-platform-specific header files, i.e. Python.h and so on;
    otherwise, this is the path to platform-specific header files
    (namely pyconfig.h).

    If 'prefix' is supplied, use it instead of sys.base_prefix or
    sys.base_exec_prefix -- i.e., ignore 'plat_specific'.
    """
    if prefix is None:
        prefix = plat_specific and BASE_EXEC_PREFIX or BASE_PREFIX
    if os.name == "posix":
        if python_build:
            # Assume the executable is in the build directory.  The
            # pyconfig.h file should be in the same directory.  Since
            # the build directory may not be the source directory, we
            # must use "srcdir" from the makefile to find the "Include"
            # directory.
            if plat_specific:
                return _sys_home or project_base
            else:
                incdir = os.path.join(get_config_var('srcdir'), 'Include')
                return os.path.normpath(incdir)
        python_dir = 'python' + get_python_version() + build_flags
        return os.path.join(prefix, "include", python_dir)
    elif os.name == "nt":
        if python_build:
            # Include both the include and PC dir to ensure we can find
            # pyconfig.h
            return (os.path.join(prefix, "include") + os.path.pathsep +
                    os.path.join(prefix, "PC"))
        return os.path.join(prefix, "include")
    else:
        raise DistutilsPlatformError(
            "I don't know where Python installs its C header files "
            "on platform '%s'" % os.name)


def get_python_lib(plat_specific=0, standard_lib=0, prefix=None):
    """Return the directory containing the Python library (standard or
    site additions).

    If 'plat_specific' is true, return the directory containing
    platform-specific modules, i.e. any module from a non-pure-Python
    module distribution; otherwise, return the platform-shared library
    directory.  If 'standard_lib' is true, return the directory
    containing standard Python library modules; otherwise, return the
    directory for site-specific modules.

    If 'prefix' is supplied, use it instead of sys.base_prefix or
    sys.base_exec_prefix -- i.e., ignore 'plat_specific'.
    """
    if prefix is None:
        if standard_lib:
            prefix = plat_specific and BASE_EXEC_PREFIX or BASE_PREFIX
        else:
            prefix = plat_specific and EXEC_PREFIX or PREFIX

    if os.name == "posix":
        if plat_specific or standard_lib:
            lib = "lib64"
        else:
            lib = "lib"
        libpython = os.path.join(prefix,
                                 lib, "python" + get_python_version())
        if standard_lib:
            return libpython
        else:
            return os.path.join(libpython, "site-packages")
    elif os.name == "nt":
        if standard_lib:
            return os.path.join(prefix, "Lib")
        else:
            return os.path.join(prefix, "Lib", "site-packages")
    else:
        raise DistutilsPlatformError(
            "I don't know where Python installs its library "
            "on platform '%s'" % os.name)



def customize_compiler(compiler):
    """Do any platform-specific customization of a CCompiler instance.

    Mainly needed on Unix, so we can plug in the information that
    varies across Unices and is stored in Python's Makefile.
    """
    if compiler.compiler_type == "unix":
        if sys.platform == "darwin":
            # Perform first-time customization of compiler-related
            # config vars on OS X now that we know we need a compiler.
            # This is primarily to support Pythons from binary
            # installers.  The kind and paths to build tools on
            # the user system may vary significantly from the system
            # that Python itself was built on.  Also the user OS
            # version and build tools may not support the same set
            # of CPU architectures for universal builds.
            global _config_vars
            # Use get_config_var() to ensure _config_vars is initialized.
            if not get_config_var('CUSTOMIZED_OSX_COMPILER'):
                import _osx_support
                _osx_support.customize_compiler(_config_vars)
                _config_vars['CUSTOMIZED_OSX_COMPILER'] = 'True'

        (cc, cxx, cflags, ccshared, ldshared, shlib_suffix, ar, ar_flags) = \
            get_config_vars('CC', 'CXX', 'CFLAGS',
                            'CCSHARED', 'LDSHARED', 'SHLIB_SUFFIX', 'AR', 'ARFLAGS')

        if 'CC' in os.environ:
            newcc = os.environ['CC']
            if (sys.platform == 'darwin'
                    and 'LDSHARED' not in os.environ
                    and ldshared.startswith(cc)):
                # On OS X, if CC is overridden, use that as the default
                #       command for LDSHARED as well
                ldshared = newcc + ldshared[len(cc):]
            cc = newcc
        if 'CXX' in os.environ:
            cxx = os.environ['CXX']
        if 'LDSHARED' in os.environ:
            ldshared = os.environ['LDSHARED']
        if 'CPP' in os.environ:
            cpp = os.environ['CPP']
        else:
            cpp = cc + " -E"           # not always
        if 'LDFLAGS' in os.environ:
            ldshared = ldshared + ' ' + os.environ['LDFLAGS']
        if 'CFLAGS' in os.environ:
            cflags = cflags + ' ' + os.environ['CFLAGS']
            ldshared = ldshared + ' ' + os.environ['CFLAGS']
        if 'CPPFLAGS' in os.environ:
            cpp = cpp + ' ' + os.environ['CPPFLAGS']
            cflags = cflags + ' ' + os.environ['CPPFLAGS']
            ldshared = ldshared + ' ' + os.environ['CPPFLAGS']
        if 'AR' in os.environ:
            ar = os.environ['AR']
        if 'ARFLAGS' in os.environ:
            archiver = ar + ' ' + os.environ['ARFLAGS']
        else:
            archiver = ar + ' ' + ar_flags

        cc_cmd = cc + ' ' + cflags
        compiler.set_executables(
            preprocessor=cpp,
            compiler=cc_cmd,
            compiler_so=cc_cmd + ' ' + ccshared,
            compiler_cxx=cxx,
            linker_so=ldshared,
            linker_exe=cc,
            archiver=archiver)

        compiler.shared_lib_extension = shlib_suffix


def get_config_h_filename():
    """Return full pathname of installed pyconfig.h file."""
    if python_build:
        if os.name == "nt":
            inc_dir = os.path.join(_sys_home or project_base, "PC")
        else:
            inc_dir = _sys_home or project_base
    else:
        inc_dir = get_python_inc(plat_specific=1)

    return os.path.join(inc_dir, 'pyconfig-64.h')


def get_makefile_filename():
    """Return full pathname of installed Makefile from the Python build."""
    if python_build:
        return os.path.join(_sys_home or project_base, "Makefile")
    lib_dir = get_python_lib(plat_specific=0, standard_lib=1)
    config_file = 'config-{}{}'.format(get_python_version(), build_flags)
    if hasattr(sys.implementation, '_multiarch'):
        config_file += '-%s' % sys.implementation._multiarch
    return os.path.join(lib_dir, config_file, 'Makefile')


def parse_config_h(fp, g=None):
    """Parse a config.h-style file.

    A dictionary containing name/value pairs is returned.  If an
    optional dictionary is passed in as the second argument, it is
    used instead of a new dictionary.
    """
    if g is None:
        g = {}
    define_rx = re.compile("#define ([A-Z][A-Za-z0-9_]+) (.*)\n")
    undef_rx = re.compile("/[*] #undef ([A-Z][A-Za-z0-9_]+) [*]/\n")
    #
    while True:
        line = fp.readline()
        if not line:
            break
        m = define_rx.match(line)
        if m:
            n, v = m.group(1, 2)
            try: v = int(v)
            except ValueError: pass
            g[n] = v
        else:
            m = undef_rx.match(line)
            if m:
                g[m.group(1)] = 0
    return g


# Regexes needed for parsing Makefile (and similar syntaxes,
# like old-style Setup files).
_variable_rx = re.compile(r"([a-zA-Z][a-zA-Z0-9_]+)\s*=\s*(.*)")
_findvar1_rx = re.compile(r"\$\(([A-Za-z][A-Za-z0-9_]*)\)")
_findvar2_rx = re.compile(r"\${([A-Za-z][A-Za-z0-9_]*)}")

def parse_makefile(fn, g=None):
    """Parse a Makefile-style file.

    A dictionary containing name/value pairs is returned.  If an
    optional dictionary is passed in as the second argument, it is
    used instead of a new dictionary.
    """
    from distutils.text_file import TextFile
    fp = TextFile(fn, strip_comments=1, skip_blanks=1, join_lines=1, errors="surrogateescape")

    if g is None:
        g = {}
    done = {}
    notdone = {}

    while True:
        line = fp.readline()
        if line is None: # eof
            break
        m = _variable_rx.match(line)
        if m:
            n, v = m.group(1, 2)
            v = v.strip()
            # `$$' is a literal `$' in make
            tmpv = v.replace('$$', '')

            if "$" in tmpv:
                notdone[n] = v
            else:
                try:
                    v = int(v)
                except ValueError:
                    # insert literal `$'
                    done[n] = v.replace('$$', '$')
                else:
                    done[n] = v

    # Variables with a 'PY_' prefix in the makefile. These need to
    # be made available without that prefix through sysconfig.
    # Special care is needed to ensure that variable expansion works, even
    # if the expansion uses the name without a prefix.
    renamed_variables = ('CFLAGS', 'LDFLAGS', 'CPPFLAGS')

    # do variable interpolation here
    while notdone:
        for name in list(notdone):
            value = notdone[name]
            m = _findvar1_rx.search(value) or _findvar2_rx.search(value)
            if m:
                n = m.group(1)
                found = True
                if n in done:
                    item = str(done[n])
                elif n in notdone:
                    # get it on a subsequent round
                    found = False
                elif n in os.environ:
                    # do it like make: fall back to environment
                    item = os.environ[n]

                elif n in renamed_variables:
                    if name.startswith('PY_') and name[3:] in renamed_variables:
                        item = ""

                    elif 'PY_' + n in notdone:
                        found = False

                    else:
                        item = str(done['PY_' + n])
                else:
                    done[n] = item = ""
                if found:
                    after = value[m.end():]
                    value = value[:m.start()] + item + after
                    if "$" in after:
                        notdone[name] = value
                    else:
                        try: value = int(value)
                        except ValueError:
                            done[name] = value.strip()
                        else:
                            done[name] = value
                        del notdone[name]

                        if name.startswith('PY_') \
                            and name[3:] in renamed_variables:

                            name = name[3:]
                            if name not in done:
                                done[name] = value
            else:
                # bogus variable reference; just drop it since we can't deal
                del notdone[name]

    fp.close()

    # strip spurious spaces
    for k, v in done.items():
        if isinstance(v, str):
            done[k] = v.strip()

    # save the results in the global dictionary
    g.update(done)
    return g


def expand_makefile_vars(s, vars):
    """Expand Makefile-style variables -- "${foo}" or "$(foo)" -- in
    'string' according to 'vars' (a dictionary mapping variable names to
    values).  Variables not present in 'vars' are silently expanded to the
    empty string.  The variable values in 'vars' should not contain further
    variable expansions; if 'vars' is the output of 'parse_makefile()',
    you're fine.  Returns a variable-expanded version of 's'.
    """

    # This algorithm does multiple expansion, so if vars['foo'] contains
    # "${bar}", it will expand ${foo} to ${bar}, and then expand
    # ${bar}... and so forth.  This is fine as long as 'vars' comes from
    # 'parse_makefile()', which takes care of such expansions eagerly,
    # according to make's variable expansion semantics.

    while True:
        m = _findvar1_rx.search(s) or _findvar2_rx.search(s)
        if m:
            (beg, end) = m.span()
            s = s[0:beg] + vars.get(m.group(1)) + s[end:]
        else:
            break
    return s


_config_vars = None

def _init_posix():
    """Initialize the module as appropriate for POSIX systems."""
    # _sysconfigdata is generated at build time, see the sysconfig module
    name = os.environ.get('_PYTHON_SYSCONFIGDATA_NAME',
        '_sysconfigdata_{abi}_{platform}_{multiarch}'.format(
        abi=sys.abiflags,
        platform=sys.platform,
        multiarch=getattr(sys.implementation, '_multiarch', ''),
    ))
    _temp = __import__(name, globals(), locals(), ['build_time_vars'], 0)
    build_time_vars = _temp.build_time_vars
    global _config_vars
    _config_vars = {}
    _config_vars.update(build_time_vars)


def _init_nt():
    """Initialize the module as appropriate for NT"""
    g = {}
    # set basic install directories
    g['LIBDEST'] = get_python_lib(plat_specific=0, standard_lib=1)
    g['BINLIBDEST'] = get_python_lib(plat_specific=1, standard_lib=1)

    # XXX hmmm.. a normal install puts include files here
    g['INCLUDEPY'] = get_python_inc(plat_specific=0)

    g['EXT_SUFFIX'] = _imp.extension_suffixes()[0]
    g['EXE'] = ".exe"
    g['VERSION'] = get_python_version().replace(".", "")
    g['BINDIR'] = os.path.dirname(os.path.abspath(sys.executable))

    global _config_vars
    _config_vars = g


def get_config_vars(*args):
    """With no arguments, return a dictionary of all configuration
    variables relevant for the current platform.  Generally this includes
    everything needed to build extensions and install both pure modules and
    extensions.  On Unix, this means every variable defined in Python's
    installed Makefile; on Windows it's a much smaller set.

    With arguments, return a list of values that result from looking up
    each argument in the configuration variable dictionary.
    """
    global _config_vars
    if _config_vars is None:
        func = globals().get("_init_" + os.name)
        if func:
            func()
        else:
            _config_vars = {}

        # Normalized versions of prefix and exec_prefix are handy to have;
        # in fact, these are the standard versions used most places in the
        # Distutils.
        _config_vars['prefix'] = PREFIX
        _config_vars['exec_prefix'] = EXEC_PREFIX

        # For backward compatibility, see issue19555
        SO = _config_vars.get('EXT_SUFFIX')
        if SO is not None:
            _config_vars['SO'] = SO

        # Always convert srcdir to an absolute path
        srcdir = _config_vars.get('srcdir', project_base)
        if os.name == 'posix':
            if python_build:
                # If srcdir is a relative path (typically '.' or '..')
                # then it should be interpreted relative to the directory
                # containing Makefile.
                base = os.path.dirname(get_makefile_filename())
                srcdir = os.path.join(base, srcdir)
            else:
                # srcdir is not meaningful since the installation is
                # spread about the filesystem.  We choose the
                # directory containing the Makefile since we know it
                # exists.
                srcdir = os.path.dirname(get_makefile_filename())
        _config_vars['srcdir'] = os.path.abspath(os.path.normpath(srcdir))

        # Convert srcdir into an absolute path if it appears necessary.
        # Normally it is relative to the build directory.  However, during
        # testing, for example, we might be running a non-installed python
        # from a different directory.
        if python_build and os.name == "posix":
            base = project_base
            if (not os.path.isabs(_config_vars['srcdir']) and
                base != os.getcwd()):
                # srcdir is relative and we are not in the same directory
                # as the executable. Assume executable is in the build
                # directory and make srcdir absolute.
                srcdir = os.path.join(base, _config_vars['srcdir'])
                _config_vars['srcdir'] = os.path.normpath(srcdir)

        # OS X platforms require special customization to handle
        # multi-architecture, multi-os-version installers
        if sys.platform == 'darwin':
            import _osx_support
            _osx_support.customize_config_vars(_config_vars)

    if args:
        vals = []
        for name in args:
            vals.append(_config_vars.get(name))
        return vals
    else:
        return _config_vars

def get_config_var(name):
    """Return the value of a single variable using the dictionary
    returned by 'get_config_vars()'.  Equivalent to
    get_config_vars().get(name)
    """
    if name == 'SO':
        import warnings
        warnings.warn('SO is deprecated, use EXT_SUFFIX', DeprecationWarning, 2)
    return get_config_vars().get(name)
PKU[6��bb!__pycache__/errors.cpython-36.pycnu�[���3


 \�
�@s8dZGdd�de�ZGdd�de�ZGdd�de�ZGdd�de�ZGd	d
�d
e�ZGdd�de�ZGd
d�de�ZGdd�de�Z	Gdd�de�Z
Gdd�de�ZGdd�de�ZGdd�de�Z
Gdd�de�ZGdd�de�ZGdd�de�ZGdd �d e�ZGd!d"�d"e�ZGd#d$�d$e�ZGd%d&�d&e�Zd'S)(a�distutils.errors

Provides exceptions used by the Distutils modules.  Note that Distutils
modules may raise standard exceptions; in particular, SystemExit is
usually raised for errors that are obviously the end-user's fault
(eg. bad command-line arguments).

This module is safe to use in "from ... import *" mode; it only exports
symbols whose names start with "Distutils" and end with "Error".c@seZdZdZdS)�DistutilsErrorzThe root of all Distutils evil.N)�__name__�
__module__�__qualname__�__doc__�rr�(/usr/lib64/python3.6/distutils/errors.pyrsrc@seZdZdZdS)�DistutilsModuleErrorz�Unable to load an expected module, or to find an expected class
    within some module (in particular, command modules and classes).N)rrrrrrrrrsrc@seZdZdZdS)�DistutilsClassErrorz�Some command class (or possibly distribution class, if anyone
    feels a need to subclass Distribution) is found not to be holding
    up its end of the bargain, ie. implementing some part of the
    "command "interface.N)rrrrrrrrr	sr	c@seZdZdZdS)�DistutilsGetoptErrorz7The option table provided to 'fancy_getopt()' is bogus.N)rrrrrrrrr
sr
c@seZdZdZdS)�DistutilsArgErrorzaRaised by fancy_getopt in response to getopt.error -- ie. an
    error in the command line usage.N)rrrrrrrrrsrc@seZdZdZdS)�DistutilsFileErrorz�Any problems in the filesystem: expected file not found, etc.
    Typically this is for problems that we detect before OSError
    could be raised.N)rrrrrrrrr$src@seZdZdZdS)�DistutilsOptionErrora�Syntactic/semantic errors in command options, such as use of
    mutually conflicting options, or inconsistent options,
    badly-spelled values, etc.  No distinction is made between option
    values originating in the setup script, the command line, config
    files, or what-have-you -- but if we *know* something originated in
    the setup script, we'll raise DistutilsSetupError instead.N)rrrrrrrrr
*sr
c@seZdZdZdS)�DistutilsSetupErrorzqFor errors that can be definitely blamed on the setup script,
    such as invalid keyword arguments to 'setup()'.N)rrrrrrrrr3src@seZdZdZdS)�DistutilsPlatformErrorz�We don't know how to do something on the current platform (but
    we do know how to do it on some platform) -- eg. trying to compile
    C files on a platform not supported by a CCompiler subclass.N)rrrrrrrrr8src@seZdZdZdS)�DistutilsExecErrorz`Any problems executing an external program (such as the C
    compiler, when compiling C files).N)rrrrrrrrr>src@seZdZdZdS)�DistutilsInternalErrorzoInternal inconsistencies or impossibilities (obviously, this
    should never be seen if the code is working!).N)rrrrrrrrrCsrc@seZdZdZdS)�DistutilsTemplateErrorz%Syntax error in a file list template.N)rrrrrrrrrHsrc@seZdZdZdS)�DistutilsByteCompileErrorzByte compile error.N)rrrrrrrrrKsrc@seZdZdZdS)�CCompilerErrorz#Some compile/link operation failed.N)rrrrrrrrrOsrc@seZdZdZdS)�PreprocessErrorz.Failure to preprocess one or more C/C++ files.N)rrrrrrrrrRsrc@seZdZdZdS)�CompileErrorz2Failure to compile one or more C/C++ source files.N)rrrrrrrrrUsrc@seZdZdZdS)�LibErrorzKFailure to create a static library from one or more C/C++ object
    files.N)rrrrrrrrrXsrc@seZdZdZdS)�	LinkErrorz]Failure to link one or more C/C++ object files into an executable
    or shared library file.N)rrrrrrrrr\src@seZdZdZdS)�UnknownFileErrorz(Attempt to process an unknown file type.N)rrrrrrrrr`srN)r�	Exceptionrrr	r
rrr
rrrrrrrrrrrrrrrr�<module>	s&	PKU[^��zz)__pycache__/__init__.cpython-36.opt-1.pycnu�[���3


 \��@s&dZddlZejdejjd��ZdS)z�distutils

The main package for the Python Module Distribution Utilities.  Normally
used from a setup script as

   from distutils.core import setup

   setup (...)
�N� )�__doc__�sys�version�index�__version__�rr�*/usr/lib64/python3.6/distutils/__init__.py�<module>	sPKU[�_�))-__pycache__/fancy_getopt.cpython-36.opt-1.pycnu�[���3


 \xE�@s�dZddlZddlZddlZddlZddlTdZejde�Zejdeef�Z	e
jdd�ZGd	d
�d
�Z
dd�Zd
d�ejD�Zdd�Zdd�ZGdd�d�Zedkr�dZx2dD]*Zede�edjeee���e�q�WdS)a6distutils.fancy_getopt

Wrapper around the standard getopt module that provides the following
additional features:
  * short and long options are tied together
  * options have help strings, so fancy_getopt could potentially
    create a complete usage summary
  * options set attributes of a passed-in object
�N)�*z[a-zA-Z](?:[a-zA-Z0-9-]*)z^%s$z^(%s)=!(%s)$�-�_c@s�eZdZdZddd�Zdd�Zdd�Zd d	d
�Zdd�Zd
d�Z	dd�Z
dd�Zdd�Zdd�Z
d!dd�Zdd�Zd"dd�Zd#dd�ZdS)$�FancyGetopta�Wrapper around the standard 'getopt()' module that provides some
    handy extra functionality:
      * short and long options are tied together
      * options have help strings, and help text can be assembled
        from them
      * options set attributes of a passed-in object
      * boolean options can have "negative aliases" -- eg. if
        --quiet is the "negative alias" of --verbose, then "--quiet"
        on the command line sets 'verbose' to false
    NcCsN||_i|_|jr|j�i|_i|_g|_g|_i|_i|_i|_	g|_
dS)N)�option_table�option_index�_build_index�alias�negative_alias�
short_opts�	long_opts�
short2long�	attr_name�	takes_arg�option_order)�selfr�r�./usr/lib64/python3.6/distutils/fancy_getopt.py�__init__)s	zFancyGetopt.__init__cCs,|jj�x|jD]}||j|d<qWdS)Nr)r�clearr)r�optionrrrrQs
zFancyGetopt._build_indexcCs||_|j�dS)N)rr)rrrrr�set_option_tableVszFancyGetopt.set_option_tablecCs<||jkrtd|��n |||f}|jj|�||j|<dS)Nz'option conflict: already an option '%s')r�DistutilsGetoptErrorr�append)r�long_optionZshort_optionZhelp_stringrrrr�
add_optionZs

zFancyGetopt.add_optioncCs
||jkS)zcReturn true if the option table for this parser has an
        option with long name 'long_option'.)r)rrrrr�
has_optioncszFancyGetopt.has_optioncCs
|jt�S)z�Translate long option name 'long_option' to the form it
        has as an attribute of some object: ie., translate hyphens
        to underscores.)�	translate�
longopt_xlate)rrrrr�
get_attr_namehszFancyGetopt.get_attr_namecCsRxL|j�D]@\}}||jkr.td|||f��||jkr
td|||f��q
WdS)Nz(invalid %s '%s': option '%s' not definedz0invalid %s '%s': aliased option '%s' not defined)�itemsrr)r�aliasesZwhatr	�optrrr�_check_alias_dictns

zFancyGetopt._check_alias_dictcCs|j|d�||_dS)z'Set the aliases for this option parser.r	N)r#r	)rr	rrr�set_aliasesxszFancyGetopt.set_aliasescCs|j|d�||_dS)z�Set the negative aliases for this option parser.
        'negative_alias' should be a dictionary mapping option names to
        option names, both the key and value must already be defined
        in the option table.znegative aliasN)r#r
)rr
rrr�set_negative_aliases}sz FancyGetopt.set_negative_aliasescCs�g|_g|_|jj�i|_�x�|jD�]�}t|�dkrH|\}}}d}n(t|�dkrb|\}}}}ntd|f��t|t	�s�t|�dkr�t
d|��|dkp�t|t	�o�t|�dks�t
d	|��||j|<|jj|�|dd
k�r|r�|d}|dd�}d|j|<nF|j
j|�}|dk	�rB|j|�r8t
d||f��||jd<d|j|<|jj|�}|dk	�r�|j||j|k�r�t
d
||f��tj|��s�t
d|��|j|�|j|<|r&|jj|�||j|d<q&WdS)z�Populate the various data structures that keep tabs on the
        option table.  Called by 'getopt()' before it can do anything
        worthwhile.
        �r�zinvalid option tuple: %r�z9invalid long option '%s': must be a string of length >= 2N�z:invalid short option '%s': must a single character or None�=�:z>invalid negative alias '%s': aliased option '%s' takes a valuezginvalid alias '%s': inconsistent with aliased option '%s' (one of them takes a value, the other doesn'tzEinvalid long option name '%s' (must be letters, numbers, hyphens only���r,r,)rrr
r�repeatr�len�
ValueError�
isinstance�strrrrr
�getr	�
longopt_re�matchrr)rr�long�short�helpr-Zalias_torrr�_grok_option_table�s^






zFancyGetopt._grok_option_tablecCsr|dkrtjdd�}|dkr*t�}d}nd}|j�dj|j�}ytj|||j�\}}Wn,tjk
r�}zt	|��WYdd}~XnXx�|D]�\}}t
|�dkr�|ddkr�|j|d}n|dd�}|jj
|�}	|	r�|	}|j|�s
|jj
|�}	|	�r|	}d}nd}|j|}
|�r<|jj
|
�dk	�r<t||
d�d}t||
|�|jj||f�q�W|�rj||fS|SdS)	aParse command-line options in args. Store as attributes on object.

        If 'args' is None or not supplied, uses 'sys.argv[1:]'.  If
        'object' is None or not supplied, creates a new OptionDummy
        object, stores option values there, and returns a tuple (args,
        object).  If 'object' is supplied, it is modified in place and
        'getopt()' just returns 'args'; in both cases, the returned
        'args' is a modified copy of the passed-in 'args' list, which
        is left untouched.
        Nr)TF� r(rr)�sys�argv�OptionDummyr8�joinr�getoptr�errorZDistutilsArgErrorr.r
r	r2rr
rr-�getattr�setattrrr)r�args�objectZcreated_objectrZopts�msgr"�valr	�attrrrrr>�sB
zFancyGetopt.getoptcCs|jdkrtd��n|jSdS)z�Returns the list of (option, value) tuples processed by the
        previous run of 'getopt()'.  Raises RuntimeError if
        'getopt()' hasn't been called yet.
        Nz!'getopt()' hasn't been called yet)r�RuntimeError)rrrr�get_option_orders

zFancyGetopt.get_option_ordercCsxd}xV|jD]L}|d}|d}t|�}|ddkr<|d}|dk	rL|d}||kr|}qW|ddd}d}||}	d|}
|r�|g}nd	g}x�|jD]�}|dd
�\}}}t||	�}
|ddkr�|dd�}|dk�r|
�r�|jd|||
df�n|jd||f�n:d
||f}|
�r<|jd|||
df�n|jd|�x$|
dd�D]}|j|
|��qXWq�W|S)z�Generate help text (a list of strings, one per suggested line of
        output) from the option table for this FancyGetopt object.
        rr)r*N�r(�Nr9zOption summary:r&z  --%-*s  %sz
  --%-*s  z%s (-%s)z  --%-*sr,r,r,)rr.�	wrap_textr)r�headerZmax_optrr5r6�lZ	opt_widthZ
line_widthZ
text_widthZ
big_indent�linesr7�textZ	opt_namesrrr�
generate_helpsF

zFancyGetopt.generate_helpcCs4|dkrtj}x |j|�D]}|j|d�qWdS)N�
)r:�stdoutrP�write)rrL�file�linerrr�
print_helphszFancyGetopt.print_help)N)NN)NN)N)NN)�__name__�
__module__�__qualname__�__doc__rrrrrrr#r$r%r8r>rHrPrVrrrrrs

(
	
M
=

OrcCst|�}|j|�|j||�S)N)rr%r>)�optionsZnegative_optrCrB�parserrrr�fancy_getoptos
r]cCsi|]}dt|��qS)r9)�ord)�.0Z_wscharrrr�
<dictcomp>usr`cCs"|dkrgSt|�|kr|gS|j�}|jt�}tjd|�}dd�|D�}g}x�|�rg}d}xZ|r�t|d�}|||kr�|j|d�|d=||}q`|r�|d	ddkr�|d
=Pq`W|�r
|dkr�|j|dd|��|d|d�|d<|dddk�r
|d=|jdj|��qPW|S)z�wrap_text(text : string, width : int) -> [string]

    Split 'text' into multiple lines of no more than 'width' characters
    each, and return the list of strings that results.
    Nz( +|-+)cSsg|]}|r|�qSrr)r_Zchrrr�
<listcomp>�szwrap_text.<locals>.<listcomp>rr)r9�r,r,)r.�
expandtabsr�WS_TRANS�re�splitrr=)rO�widthZchunksrNZcur_lineZcur_lenrMrrrrKws:

rKcCs
|jt�S)zXConvert a long option name to a valid Python identifier by
    changing "-" to "_".
    )rr)r"rrr�translate_longopt�srhc@seZdZdZgfdd�ZdS)r<z_Dummy class just used as a place to hold command-line option
    values as instance attributes.cCsx|D]}t||d�qWdS)zkCreate a new OptionDummy instance.  The attributes listed in
        'options' will be initialized to None.N)rA)rr[r"rrrr�s
zOptionDummy.__init__N)rWrXrYrZrrrrrr<�sr<�__main__z�Tra-la-la, supercalifragilisticexpialidocious.
How *do* you spell that odd word, anyways?
(Someone ask Mary -- she'll know [or she'll
say, "How should I know?"].)�
���(z	width: %drQ)rjrkrlrm)rZr:�stringrer>Zdistutils.errorsZlongopt_pat�compiler3Zneg_alias_rer1�	maketransrrr]Z
whitespacerdrKrhr<rWrO�w�printr=rrrr�<module>	s*T6
PKU[Vf���%__pycache__/core.cpython-36.opt-1.pycnu�[���3


 \�"�@s�dZddlZddlZddlmZddlTddlmZddlm	Z	ddl
mZddlm
Z
d	Zd
d�Zdadad4Zd5Zd/d0�Zd6d2d3�ZdS)7a#distutils.core

The only module that needs to be imported to use the Distutils; provides
the 'setup' function (which is to be called from the setup script).  Also
indirectly provides the Distribution and Command classes, although they are
really defined in distutils.dist and distutils.cmd.
�N)�DEBUG)�*)�Distribution)�Command)�
PyPIRCCommand)�	Extensionz�usage: %(script)s [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]
   or: %(script)s --help [cmd1 cmd2 ...]
   or: %(script)s --help-commands
   or: %(script)s cmd --help
cCstjj|�}tt�S)N)�os�path�basename�USAGE�vars)�script_nameZscript�r�&/usr/lib64/python3.6/distutils/core.py�	gen_usage sr�	distclassr
�script_args�options�name�version�author�author_email�
maintainer�maintainer_email�url�license�description�long_description�keywords�	platforms�classifiers�download_url�requires�provides�	obsoletes�sources�include_dirs�
define_macros�undef_macros�library_dirs�	libraries�runtime_library_dirs�
extra_objects�extra_compile_args�extra_link_args�	swig_opts�export_symbols�depends�languagec,Ks|jd�}|r|d=nt}d|kr8tjjtjd�|d<d|krRtjdd�|d<y||�a}WnLtk
r�}z0d|kr�t	d|��nt	d	|d|f��WYdd}~XnXt
d
kr�|S|j�tr�t
d�|j�t
dkr�|Sy|j�}Wn:tk
�r*}zt	t|j�d
|��WYdd}~XnXt�rBt
d�|j�t
dk�rP|S|�ry|j�Wn�tk
�r�t	d��Yn�tk
�r�}z0t�r�tjjd|f��nt	d|f��WYdd}~XnBttfk
�r}z t�r�nt	dt|���WYdd}~XnX|S)a�The gateway to the Distutils: do everything your setup script needs
    to do, in a highly flexible and user-driven way.  Briefly: create a
    Distribution instance; find and parse config files; parse the command
    line; run each Distutils command found there, customized by the options
    supplied to 'setup()' (as keyword arguments), in config files, and on
    the command line.

    The Distribution instance might be an instance of a class supplied via
    the 'distclass' keyword argument to 'setup'; if no such class is
    supplied, then the Distribution class (in dist.py) is instantiated.
    All other arguments to 'setup' (except for 'cmdclass') are used to set
    attributes of the Distribution instance.

    The 'cmdclass' argument, if supplied, is a dictionary mapping command
    names to command classes.  Each command encountered on the command line
    will be turned into a command class, which is in turn instantiated; any
    class found in 'cmdclass' is used in place of the default, which is
    (for command 'foo_bar') class 'foo_bar' in module
    'distutils.command.foo_bar'.  The command class must provide a
    'user_options' attribute which is a list of option specifiers for
    'distutils.fancy_getopt'.  Any command-line options between the current
    and the next command are used to set attributes of the current command
    object.

    When the entire command-line has been successfully parsed, calls the
    'run()' method on each command object in turn.  This method will be
    driven entirely by the Distribution object (which each command object
    has a reference to, thanks to its constructor), and the
    command-specific options that became attributes of each command
    object.
    rr
rr�Nrzerror in setup command: %szerror in %s setup command: %s�initz%options (after parsing config files):�configz

error: %sz%options (after parsing command line):�commandlineZinterruptedz
error: %s
z	error: %szerror: )�getrrr	r
�sys�argv�_setup_distributionZDistutilsSetupError�
SystemExit�_setup_stop_afterZparse_config_filesr�printZdump_option_dictsZparse_command_lineZDistutilsArgErrorrr
Zrun_commands�KeyboardInterrupt�OSError�stderr�writeZDistutilsErrorZCCompilerError�str)Zattrs�klassZdist�msg�ok�excrrr�setup9s`%
"(
"rG�runcCs�|dkrtd|f��|atjj�}d|i}yZzH|tjd<|dk	rP|tjd	d�<t|d
��}t|j�|�WdQRXWd|t_daXWntk
r�YnXt	dkr�t
d|��t	S)
a.Run a setup script in a somewhat controlled environment, and
    return the Distribution instance that drives things.  This is useful
    if you need to find out the distribution meta-data (passed as
    keyword args from 'script' to 'setup()', or the contents of the
    config files or command-line.

    'script_name' is a file that will be read and run with 'exec()';
    'sys.argv[0]' will be replaced with 'script' for the duration of the
    call.  'script_args' is a list of strings; if supplied,
    'sys.argv[1:]' will be replaced by 'script_args' for the duration of
    the call.

    'stop_after' tells 'setup()' when to stop processing; possible
    values:
      init
        stop after the Distribution instance has been created and
        populated with the keyword arguments to 'setup()'
      config
        stop after config files have been parsed (and their data
        stored in the Distribution instance)
      commandline
        stop after the command-line ('sys.argv[1:]' or 'script_args')
        have been parsed (and the data stored in the Distribution)
      run [default]
        stop after all commands have been run (the same as if 'setup()'
        had been called in the usual way

    Returns the Distribution instance, which provides all information
    used to drive the Distutils.
    r4r5r6rHz"invalid value for 'stop_after': %r�__file__rNr3�rbzZ'distutils.core.setup()' was never called -- perhaps '%s' is not a Distutils setup script?)r4r5r6rH)�
ValueErrorr<r8r9�copy�open�exec�readr;r:�RuntimeError)r
rZ
stop_afterZ	save_argv�g�frrr�	run_setup�s(


rS)rr
rrrrrrrrrrrrrrr r!r"r#r$)rr%r&r'r(r)r*r+r,r-r.r/r0r1r2)NrH)�__doc__rr8Zdistutils.debugrZdistutils.errorsZdistutils.distrZ
distutils.cmdrZdistutils.configrZdistutils.extensionrrrr<r:Zsetup_keywordsZextension_keywordsrGrSrrrr�<module>s2qPKU[S�۬�#__pycache__/dir_util.cpython-36.pycnu�[���3


 \b�@spdZddlZddlZddlmZmZddlmZiaddd�Z	dd	d
�Z
ddd�Zd
d�Zddd�Z
dd�ZdS)zWdistutils.dir_util

Utility functions for manipulating directories and directory trees.�N)�DistutilsFileError�DistutilsInternalError)�log��cCspt|t�std|f��tjj|�}g}tjj|�s<|dkr@|Stjtjj	|��rV|Stjj
|�\}}|g}x6|r�|r�tjj|�r�tjj
|�\}}|jd|�qnWx�|D]�}tjj||�}tjj	|�}	tj|	�r�q�|dkr�t
jd|�|�s`ytj||�WnVtk
�rT}
z8|
jtjk�o*tjj|��sDtd||
jdf��WYdd}
~
XnX|j|�dt|	<q�W|S)	a�Create a directory and any missing ancestor directories.

    If the directory already exists (or if 'name' is the empty string, which
    means the current directory, which of course exists), then do nothing.
    Raise DistutilsFileError if unable to create some directory along the way
    (eg. some sub-path exists, but is a file rather than a directory).
    If 'verbose' is true, print a one-line summary of each mkdir to stdout.
    Return the list of directories actually created.
    z(mkpath: 'name' must be a string (got %r)�rrzcreating %szcould not create '%s': %sN���)�
isinstance�strr�os�path�normpath�isdir�
_path_created�get�abspath�split�insert�joinr�info�mkdir�OSError�errnoZEEXISTr�args�append)�name�mode�verbose�dry_runZcreated_dirs�head�tailZtails�dZabs_head�exc�r#�*/usr/lib64/python3.6/distutils/dir_util.py�mkpaths>


&
r%cCsVt�}x(|D] }|jtjj|tjj|���qWx t|�D]}t||||d�q:WdS)a�Create all the empty directories under 'base_dir' needed to put 'files'
    there.

    'base_dir' is just the name of a directory which doesn't necessarily
    exist yet; 'files' is a list of filenames to be interpreted relative to
    'base_dir'.  'base_dir' + the directory portion of every file in 'files'
    will be created if it doesn't already exist.  'mode', 'verbose' and
    'dry_run' flags are as for 'mkpath()'.
    )rrN)�set�addrrr�dirname�sortedr%)Zbase_dir�filesrrrZneed_dir�file�dirr#r#r$�create_treePs

 r-cCsfddlm}|r,tjj|�r,td|��ytj|�}	Wn>tk
rx}
z"|rVg}	ntd||
jf��WYdd}
~
XnX|s�t	||d�g}x�|	D]�}tjj
||�}
tjj
||�}|jd�r�q�|o�tjj|
��rtj
|
�}|dkr�tjd	||�|�stj||�|j|�q�tjj|
��r>|jt|
|||||||d
��q�||
||||||d
�|j|�q�W|S)aCopy an entire directory tree 'src' to a new location 'dst'.

    Both 'src' and 'dst' must be directory names.  If 'src' is not a
    directory, raise DistutilsFileError.  If 'dst' does not exist, it is
    created with 'mkpath()'.  The end result of the copy is that every
    file in 'src' is copied to 'dst', and directories under 'src' are
    recursively copied to 'dst'.  Return the list of files that were
    copied or might have been copied, using their output name.  The
    return value is unaffected by 'update' or 'dry_run': it is simply
    the list of all files under 'src', with the names changed to be
    under 'dst'.

    'preserve_mode' and 'preserve_times' are the same as for
    'copy_file'; note that they only apply to regular files, not to
    directories.  If 'preserve_symlinks' is true, symlinks will be
    copied as symlinks (on platforms that support them!); otherwise
    (the default), the destination of the symlink will be copied.
    'update' and 'verbose' are the same as for 'copy_file'.
    r)�	copy_filez&cannot copy tree '%s': not a directoryzerror listing files in '%s': %sN)rz.nfsrzlinking %s -> %s)rr)Zdistutils.file_utilr.rrrr�listdirr�strerrorr%r�
startswith�islink�readlinkrr�symlinkr�extend�	copy_tree)�src�dstZ
preserve_modeZpreserve_timesZpreserve_symlinks�updaterrr.�names�eZoutputs�nZsrc_nameZdst_nameZ	link_destr#r#r$r6csH
"


r6cCslxVtj|�D]H}tjj||�}tjj|�rDtjj|�rDt||�q|jtj|f�qW|jtj	|f�dS)zHelper for remove_tree().N)
rr/rrrr2�_build_cmdtupler�remove�rmdir)r�	cmdtuples�fZreal_fr#r#r$r=�sr=cCs�|dkrtjd|�|rdSg}t||�xp|D]h}y2|d|d�tjj|d�}|tkrdt|=Wq0tk
r�}ztjd||�WYdd}~Xq0Xq0WdS)z�Recursively remove an entire directory tree.

    Any errors are ignored (apart from being reported to stdout if 'verbose'
    is true).
    rz'removing '%s' (and everything under it)Nrzerror removing %s: %s)	rrr=rrrrr�warn)Z	directoryrrr@�cmdrr"r#r#r$�remove_tree�s


rDcCs6tjj|�\}}|dd�tjkr2||dd�}|S)z�Take the full path 'path', and make it a relative path.

    This is useful to make 'path' the second argument to os.path.join().
    rrN)rr�
splitdrive�sep)rZdriver#r#r$�ensure_relative�srG)rrr)rrr)rrrrrr)rr)�__doc__rrZdistutils.errorsrrZ	distutilsrrr%r-r6r=rDrGr#r#r#r$�<module>s
?

D

PKU[�(�ߟ
�
'__pycache__/config.cpython-36.opt-1.pycnu�[���3


 \�@s<dZddlZddlmZddlmZdZGdd�de�ZdS)z�distutils.pypirc

Provides the PyPIRCCommand class, the base class for the command classes
that uses .pypirc in the distutils.command package.
�N)�RawConfigParser)�CommandzE[distutils]
index-servers =
    pypi

[pypi]
username:%s
password:%s
c@sheZdZdZdZdZdZdZdddefdgZdgZ	d
d�Z
dd
�Zdd�Zdd�Z
dd�Zdd�ZdS)�
PyPIRCCommandz;Base command that knows how to handle the .pypirc file
    zhttps://upload.pypi.org/legacy/�pypiNzrepository=�rzurl of repository [default: %s]�
show-response�&display full response text from servercCstjjtjjd�d�S)zReturns rc file path.�~z.pypirc)�os�path�join�
expanduser)�self�r�(/usr/lib64/python3.6/distutils/config.py�_get_rc_file&szPyPIRCCommand._get_rc_filecCsH|j�}tjtj|tjtjBd�d��}|jt||f�WdQRXdS)zCreates a default .pypirc file.i��wN)rr
�fdopen�open�O_CREAT�O_WRONLY�write�DEFAULT_PYPIRC)r�username�password�rc�frrr�
_store_pypirc*s zPyPIRCCommand._store_pypirccCs�|j�}tjj|��r�|jd|�|jp.|j}|jp:|j}t	�}|j
|�|j�}d|k�rR|jdd�}dd�|j
d�D�}|gkr�d|kr�dg}niSx�|D]�}d|i}	|j|d	�|	d	<xHd
|jfd|jfdfD].\}
}|j||
�r�|j||
�|	|
<q�||	|
<q�W|dk�r.||jdfk�r.|j|	d
<|	S|	d|k�sH|	d
|kr�|	Sq�WnRd|k�r�d}|j|d
��r||j|d
�}n|j}|j|d	�|j|d�|||jd�SiS)zReads the .pypirc file.zUsing PyPI login from %sZ	distutilsz
index-serverscSs g|]}|j�dkr|j��qS)�)�strip)�.0�serverrrr�
<listcomp>>sz.PyPIRCCommand._read_pypirc.<locals>.<listcomp>�
rr!r�
repository�realmrNzserver-login)rrr$r!r%)rN)rr
r�existsZannouncer$�DEFAULT_REPOSITORYr%�
DEFAULT_REALMr�read�sections�get�splitZ
has_option)rrr$r%�configr*Z
index_serversZ_serversr!Zcurrent�key�defaultrrr�_read_pypirc0sX









zPyPIRCCommand._read_pypirccCs8ddl}|jdd�}|j|�djdd�}|j�j|�S)z%Read and decode a PyPI HTTP response.rNzcontent-typez
text/plain��charset�ascii)�cgiZ	getheaderZparse_headerr+r)�decode)rZresponser4Zcontent_type�encodingrrr�_read_pypi_responseqsz!PyPIRCCommand._read_pypi_responsecCsd|_d|_d|_dS)zInitialize options.Nr)r$r%Z
show_response)rrrr�initialize_optionsxsz PyPIRCCommand.initialize_optionscCs(|jdkr|j|_|jdkr$|j|_dS)zFinalizes options.N)r$r'r%r()rrrr�finalize_options~s

zPyPIRCCommand.finalize_options)rNr)�__name__�
__module__�__qualname__�__doc__r'r(r$r%Zuser_optionsZboolean_optionsrrr0r7r8r9rrrrrs"Ar)r=r
ZconfigparserrZ
distutils.cmdrrrrrrr�<module>s

PKU[�D�A�8�8-__pycache__/msvccompiler.cpython-36.opt-1.pycnu�[���3


 \\�@s�dZddlZddlZddlmZmZmZmZmZddl	m
Z
mZmZddl
mZdZy,ddlZdZeZejZejZejZejZWnhek
r�y4ddlZddlZdZeZejZejZejZejZWnek
r�ejd�YnXYnXe�rejejej ej!fZ"d	d
�Z#dd�Z$d
d�Z%Gdd�d�Z&dd�Z'dd�Z(dd�Z)Gdd�de
�Z*e'�dk�r�ej+d�e*Z,ddl-m*Z*ddl-m&Z&dS)z�distutils.msvccompiler

Contains MSVCCompiler, an implementation of the abstract CCompiler class
for the Microsoft Visual Studio.
�N)�DistutilsExecError�DistutilsPlatformError�CompileError�LibError�	LinkError)�	CCompiler�gen_preprocess_options�gen_lib_options)�logFTz�Warning: Can't read registry to find the necessary compiler setting
Make sure that Python modules winreg, win32api or win32con are installed.cCsnyt||�}Wntk
r"dSXg}d}x<yt||�}Wntk
rRPYnX|j|�|d7}q.W|S)zReturn list of registry keys.Nr�)�RegOpenKeyEx�RegError�
RegEnumKey�append)�base�key�handle�L�i�k�r�./usr/lib64/python3.6/distutils/msvccompiler.py�	read_keys7s
rcCs�yt||�}Wntk
r"dSXi}d}xPyt||�\}}}Wntk
rXPYnX|j�}t|�|t|�<|d7}q.W|S)zXReturn dict of registry keys and values.

    All names are converted to lowercase.
    Nrr)rr
�RegEnumValue�lower�convert_mbcs)rrr�dr�name�value�typerrr�read_valuesHsr cCs:t|dd�}|dk	r6y|d�}Wntk
r4YnX|S)N�decode�mbcs)�getattr�UnicodeError)�sZdecrrrr]src@s,eZdZdd�Zdd�Zdd�Zdd�Zd	S)
�
MacroExpandercCsi|_|j|�dS)N)�macros�load_macros)�self�versionrrr�__init__gszMacroExpander.__init__cCs4x.tD]&}t||�}|r|||jd|<PqWdS)Nz$(%s))�HKEYSr r')r)Zmacro�pathrrrrrr�	set_macroks


zMacroExpander.set_macroc
Cs�d|}|jd|dd�|jd|dd�d}|jd|d	�y*|d
krX|jd|d�n|jd|d
�Wn*tk
r�}ztd��WYdd}~XnXd}x\tD]T}yt||�}Wntk
r�w�YnXt|d�}t|d||f�}	|	d|jd<q�WdS)Nz%Software\Microsoft\VisualStudio\%0.1fZVCInstallDirz	\Setup\VCZ
productdirZVSInstallDirz	\Setup\VSz Software\Microsoft\.NETFrameworkZFrameworkDirZinstallrootg@ZFrameworkSDKDirzsdkinstallrootv1.1ZsdkinstallrootaPython was built with Visual Studio 2003;
extensions must be built with a compiler than can generate compatible binaries.
Visual Studio 2003 was not found on this system. If you have Cygwin installed,
you can try compiling with MingW32, by passing "-c mingw32" to setup.py.z.Software\Microsoft\NET Framework Setup\Productrz%s\%sr*z$(FrameworkVersion))	r.�KeyErrorrr,rr
rr r')
r)r*ZvsbaseZnet�exc�pr�hrrrrrr(rs*

zMacroExpander.load_macroscCs(x"|jj�D]\}}|j||�}qW|S)N)r'�items�replace)r)r%r�vrrr�sub�szMacroExpander.subN)�__name__�
__module__�__qualname__r+r.r(r6rrrrr&fsr&cCs�d}tjj|�}|dkrdS|t|�}tj|d�jdd�\}}t|dd��d}|dkrf|d7}t|dd��d	}|dkr�d
}|dkr�||SdS)
z�Return the version of MSVC that was used to build Python.

    For Python 2.3 and up, the version number is included in
    sys.version.  For earlier versions, assume the compiler is MSVC 6.
    zMSC v.r�N� ��
�g$@r������)�sysr*�find�len�split�int)�prefixrr%�restZmajorVersionZminorVersionrrr�get_build_version�srHcCs@d}tjj|�}|dkrdStjjd|�}tj|t|�|�S)zaReturn the processor architecture.

    Possible results are "Intel", "Itanium", or "AMD64".
    z bit (r�Intel�)r?)rAr*rBrC)rFr�jrrr�get_build_architecture�srLcCs4g}x*|D]"}tjj|�}||kr
|j|�q
W|S)znReturn a list of normalized paths with duplicates removed.

    The current order of paths is maintained.
    )�osr-�normpathr)�pathsZ
reduced_pathsr1Znprrr�normalize_and_reduce_paths�s
rPc
@s�eZdZdZdZiZdgZdddgZdgZdgZ	eeee	Z
d	Zd
ZdZ
dZd
ZZdZd-dd�Zdd�Zd.dd�Zd/dd�Zd0dd�Zd1dd�Zdd�Zd d!�Zd"d#�Zd2d$d%�Zd&d'�Zd3d)d*�Zd+d,�ZdS)4�MSVCCompilerzwConcrete class that implements an interface to Microsoft Visual C++,
       as defined by the CCompiler abstract class.Zmsvcz.cz.ccz.cppz.cxxz.rcz.mcz.resz.objz.libz.dllz%s%sz.exercCsvtj||||�t�|_t�|_|jdkr\|jdkrHd|_t|j�|_nd|_d|j|_	nd|jd|_	d|_
dS)	NrI�zSoftware\Microsoft\VisualStudiozSoftware\Microsoft\DevstudiozVisual Studio version %szMicrosoft SDK compiler %sr:F)rr+rH�_MSVCCompiler__versionrL�_MSVCCompiler__arch�_MSVCCompiler__rootr&�_MSVCCompiler__macros�_MSVCCompiler__product�initialized)r)�verboseZdry_runZforcerrrr+�s

zMSVCCompiler.__init__cCs�g|_dtjkrDdtjkrD|jd�rDd|_d|_d|_d|_d|_nx|j	d�|_t
|j�d	krltd
|j��|jd�|_|jd�|_|jd�|_|jd�|_|jd�|_|j
d�|j
d�y*x$tjdjd
�D]}|jj|�q�WWntk
r�YnXt|j�|_d
j|j�tjd<d|_|jdk�rTddddddg|_dddddddg|_n&ddddddg|_dddddddg|_dddg|_|jdk�r�ddddg|_ndddddg|_dg|_d |_dS)!NZDISTUTILS_USE_SDKZMSSdkzcl.exezlink.exezlib.exezrc.exezmc.exer-rzxPython was built with %s, and extensions need to be built with the same version of the compiler, but it isn't installed.�lib�include�;rIz/nologoz/Oxz/MDz/W3z/GXz/DNDEBUGz/Odz/MDdz/Z7z/D_DEBUGz/GS-z/DLLz/INCREMENTAL:NOrRz/INCREMENTAL:noz/DEBUGz	/pdb:NoneT)�_MSVCCompiler__pathsrM�environ�find_exe�cc�linkerrZ�rc�mc�get_msvc_pathsrCrrW�set_path_env_varrDrr/rP�joinZpreprocess_optionsrT�compile_options�compile_options_debug�ldflags_sharedrS�ldflags_shared_debugZldflags_staticrX)r)r1rrr�
initialize�sR







zMSVCCompiler.initialize�cCs�|dkrd}g}x�|D]�}tjj|�\}}tjj|�d}|tjj|�d�}||jkrdtd|��|rttjj|�}||jkr�|j	tjj
|||j��q||jkr�|j	tjj
|||j��q|j	tjj
|||j
��qW|S)NrlrzDon't know how to compile %s)rMr-�splitext�
splitdrive�isabs�src_extensionsr�basename�_rc_extensionsrrf�
res_extension�_mc_extensions�
obj_extension)r)Zsource_filenamesZ	strip_dir�
output_dirZ	obj_namesZsrc_namer�extrrr�object_filenames8s(



zMSVCCompiler.object_filenamesNc	Cst|js|j�|j||||||�}	|	\}}
}}}|p6g}
|
jd�|rT|
j|j�n|
j|j��x|
D�]}y||\}}Wntk
r�whYnX|r�tj	j
|�}||jkr�d|}�nT||jkr�d|}�n>||j
k�r>|}d|}y"|j|jg||g|g�Wqhtk
�r8}zt|��WYdd}~XqhXqhn�||jk�rtj	j|�}tj	j|�}yl|j|jgd|d|g|g�tj	jtj	j|��\}}tj	j||d�}|j|jgd|g|g�Wqhtk
�r�}zt|��WYdd}~XqhXqhntd||f��d	|}y&|j|jg|
|||g|�Wqhtk
�rj}zt|��WYdd}~XqhXqhW|
S)
Nz/cz/Tcz/Tpz/foz-hz-rz.rcz"Don't know how to compile %s to %sz/Fo)rXrkZ_setup_compiler�extendrhrgr/rMr-�abspath�
_c_extensions�_cpp_extensionsrr�spawnrbrrrt�dirnamercrmrqrfr`)r)Zsourcesrvr'Zinclude_dirs�debug�
extra_preargs�extra_postargsZdependsZcompile_info�objectsZpp_optsZbuildZcompile_opts�obj�srcrwZ	input_optZ
output_opt�msgZh_dirZrc_dirr�_Zrc_filerrr�compileWsj




zMSVCCompiler.compilec	Cs�|js|j�|j||�\}}|j||d�}|j||�r�|d|g}|rJy|j|jg|�Wq�tk
r�}zt|��WYdd}~Xq�Xnt	j
d|�dS)N)rvz/OUT:zskipping %s (up-to-date))rXrk�_fix_object_args�library_filename�
_need_linkr}rZrrr
r)	r)r�Zoutput_libnamervr�target_lang�output_filenameZlib_argsr�rrr�create_static_lib�szMSVCCompiler.create_static_libcCs�|js|j�|j||�\}}|j|||�}|\}}}|rL|jdt|��t||||�}|dk	rptjj	||�}|j
||��r�|tjkr�|	r�|j
dd�}q�|jdd�}n|	r�|j
}n|j}g}x|p�gD]}|jd|�q�W||||d|g}|dk	�rLtjjtjj|��\}}tjj	tjj|d�|j|��}|jd|�|
�r^|
|dd�<|�rn|j|�|jtjj|��y|j|jg|�Wn,tk
�r�}zt|��WYdd}~XnXntjd|�dS)Nz5I don't know what to do with 'runtime_library_dirs': rz/EXPORT:z/OUT:rz/IMPLIB:zskipping %s (up-to-date))rXrkr�Z
_fix_lib_args�warn�strr	rMr-rfr�rZ
EXECUTABLErjrirrmrqr~r�ryZmkpathr}rarrr
r)r)Ztarget_descr�r�rvZ	librariesZlibrary_dirsZruntime_library_dirsZexport_symbolsrr�r�Z
build_tempr�Z
fixed_argsZlib_optsZldflagsZexport_optsZsymZld_argsZdll_nameZdll_extZimplib_filer�rrr�link�sV



zMSVCCompiler.linkcCsd|S)Nz	/LIBPATH:r)r)�dirrrr�library_dir_optionszMSVCCompiler.library_dir_optioncCstd��dS)Nz<don't know how to set runtime library search path for MSVC++)r)r)r�rrr�runtime_library_dir_optionsz'MSVCCompiler.runtime_library_dir_optioncCs
|j|�S)N)r�)r)rZrrr�library_optionszMSVCCompiler.library_optioncCs`|r|d|g}n|g}xB|D]6}x0|D](}tjj||j|��}tjj|�r(|Sq(WqWdSdS)NZ_d)rMr-rfr��exists)r)�dirsrZrZ	try_namesr�rZlibfilerrr�find_library_file#s

zMSVCCompiler.find_library_filecCszx4|jD]*}tjjtjj|�|�}tjj|�r|SqWx>tjdjd�D]*}tjjtjj|�|�}tjj|�rH|SqHW|S)a�Return path to an MSVC executable program.

        Tries to find the program in several places: first, one of the
        MSVC program search paths from the registry; next, the directories
        in the PATH environment variable.  If any of those work, return an
        absolute path that is known to exist.  If none of them work, just
        return the original program name, 'exe'.
        ZPathr\)r]rMr-rfrz�isfiler^rD)r)Zexer1�fnrrrr_5s	zMSVCCompiler.find_exe�x86cCs�tsgS|d}|jdkr,d|j|jf}nd|j|f}xHtD]@}t||�}|r@|jdkrr|jj||�jd�S||jd�Sq@W|jdkr�x,tD]$}t|d|j�dk	r�|jd	�Pq�WgS)
z�Get a list of devstudio directories (include, lib or path).

        Return a list of strings.  The list will be empty if unable to
        access the registry or appropriate registry keys not found.
        z dirsrRz6%s\%0.1f\VC\VC_OBJECTS_PLATFORM_INFO\Win32\Directoriesz?%s\6.0\Build System\Components\Platforms\Win32 (%s)\Directoriesr\r:z%s\6.0Nz�It seems you have Visual Studio 6 installed, but the expected registry settings are not present.
You must at least run the Visual Studio GUI once so that these entries are created.)	�
_can_read_regrSrUr,r rVr6rDr�)r)r-�platformrrrrrrrdKs(






zMSVCCompiler.get_msvc_pathscCs6|dkr|jd�}n
|j|�}|r2dj|�tj|<dS)z�Set environment variable 'name' to an MSVC path type value.

        This is equivalent to a SET command prior to execution of spawned
        commands.
        rZZlibraryr\N)rdrfrMr^)r)rr1rrrreos

zMSVCCompiler.set_path_env_var)rrr)rrl)NNNrNNN)NrN)
NNNNNrNNNN)r)r�)r7r8r9�__doc__Z
compiler_typeZexecutablesr{r|rrrtrprsruZstatic_lib_extensionZshared_lib_extensionZstatic_lib_formatZshared_lib_formatZ
exe_extensionr+rkrxr�r�r�r�r�r�r�r_rdrerrrrrQ�sP

B

V

F

$rQg @z3Importing new compiler from distutils.msvc9compiler)rQ)r&).r�rArMZdistutils.errorsrrrrrZdistutils.ccompilerrrr	Z	distutilsr
r��winregZhkey_modZ	OpenKeyExrZEnumKeyrZ	EnumValuer�errorr
�ImportErrorZwin32apiZwin32con�infoZ
HKEY_USERS�HKEY_CURRENT_USER�HKEY_LOCAL_MACHINEZHKEY_CLASSES_ROOTr,rr rr&rHrLrPrQrZOldMSVCCompilerZdistutils.msvc9compilerrrrr�<module>s^


	-
9
PKU[���E�C�C.__pycache__/msvc9compiler.cpython-36.opt-1.pycnu�[���3


 \�w�@sTdZddlZddlZddlZddlZddlmZmZmZm	Z	m
Z
ddlmZm
Z
mZddlmZddlmZddlZejZejZejZejZejejejejfZ ej!dko�ej"d&kZ#e#r�d
Z$dZ%dZ&nd
Z$dZ%dZ&dddd�Z'Gdd�d�Z(Gdd�d�Z)dd�Z*dd�Z+dd�Z,dd�Z-d'd d!�Z.e*�Z/e/d"k�r@ed#e/��Gd$d%�d%e�Z0dS)(adistutils.msvc9compiler

Contains MSVCCompiler, an implementation of the abstract CCompiler class
for the Microsoft Visual Studio 2008.

The module is compatible with VS 2005 and VS 2008. You can find legacy support
for older versions of VS in distutils.msvccompiler.
�N)�DistutilsExecError�DistutilsPlatformError�CompileError�LibError�	LinkError)�	CCompiler�gen_preprocess_options�gen_lib_options)�log)�get_platform�win32�� z1Software\Wow6432Node\Microsoft\VisualStudio\%0.1fz5Software\Wow6432Node\Microsoft\Microsoft SDKs\Windowsz,Software\Wow6432Node\Microsoft\.NETFrameworkz%Software\Microsoft\VisualStudio\%0.1fz)Software\Microsoft\Microsoft SDKs\Windowsz Software\Microsoft\.NETFramework�x86�amd64Zia64)rz	win-amd64zwin-ia64c@sPeZdZdZdd�Zee�Zdd�Zee�Zdd�Zee�Zdd	�Ze	e�Zd
S)�Regz2Helper class to read values from the registry
    cCs:x,tD]$}|j||�}|r||kr||SqWt|��dS)N)�HKEYS�read_values�KeyError)�cls�path�key�base�d�r�//usr/lib64/python3.6/distutils/msvc9compiler.py�	get_valueAs

z
Reg.get_valuecCsnyt||�}Wntk
r"dSXg}d}x<yt||�}Wntk
rRPYnX|j|�|d7}q.W|S)zReturn list of registry keys.Nr�)�RegOpenKeyEx�RegError�
RegEnumKey�append)rrr�handle�L�i�krrr�	read_keysIs
z
Reg.read_keysc	Cs�yt||�}Wntk
r"dSXi}d}xTyt||�\}}}Wntk
rXPYnX|j�}|j|�||j|�<|d7}q.W|S)z`Return dict of registry keys and values.

        All names are converted to lowercase.
        Nrr)rr�RegEnumValue�lower�convert_mbcs)	rrrr"rr$�name�value�typerrrr[szReg.read_valuescCs:t|dd�}|dk	r6y|d�}Wntk
r4YnX|S)N�decode�mbcs)�getattr�UnicodeError)�sZdecrrrr)qszReg.convert_mbcsN)
�__name__�
__module__�__qualname__�__doc__r�classmethodr&rr)�staticmethodrrrrr=src@s,eZdZdd�Zdd�Zdd�Zdd�Zd	S)
�
MacroExpandercCsi|_t||_|j|�dS)N)�macros�VS_BASE�vsbase�load_macros)�self�versionrrr�__init__}s
zMacroExpander.__init__cCstj||�|jd|<dS)Nz$(%s))rrr9)r=Zmacrorrrrr�	set_macro�szMacroExpander.set_macrocCs|jd|jdd�|jd|jdd�|jdtd�y$|dkrP|jd	td
�ntd
��Wntk
rvtd��YnX|dkr�|jd
|jd�|jdtd�ndd}x^tD]V}yt||�}Wntk
r�w�YnXt	|d�}t
j|d||f�}|d|jd<q�WdS)NZVCInstallDirz	\Setup\VC�
productdirZVSInstallDirz	\Setup\VSZFrameworkDirZinstallrootg @ZFrameworkSDKDirzsdkinstallrootv2.0aPython was built with Visual Studio 2008;
extensions must be built with a compiler than can generate compatible binaries.
Visual Studio 2008 was not found on this system. If you have Cygwin installed,
you can try compiling with MingW32, by passing "-c mingw32" to setup.py.g"@ZFrameworkVersionzclr versionZ
WindowsSdkDirZcurrentinstallfolderz.Software\Microsoft\NET Framework Setup\Productrz%s\%sr>z$(FrameworkVersion))
r@r;�NET_BASErr�WINSDK_BASErrrr rrr9)r=r>�pr�hrrrrrr<�s.

zMacroExpander.load_macroscCs(x"|jj�D]\}}|j||�}qW|S)N)r9�items�replace)r=r1r%�vrrr�sub�szMacroExpander.subN)r2r3r4r?r@r<rIrrrrr8{sr8cCs�d}tjj|�}|dkrdS|t|�}tj|d�jdd�\}}t|dd��d}|dkrf|d7}t|dd��d	}|dkr�d
}|dkr�||SdS)
z�Return the version of MSVC that was used to build Python.

    For Python 2.3 and up, the version number is included in
    sys.version.  For earlier versions, assume the compiler is MSVC 6.
    zMSC v.r�N� r
�
�g$@r������)�sysr>�find�len�split�int)�prefixr$r1�restZmajorVersionZminorVersionrrr�get_build_version�srWcCs4g}x*|D]"}tjj|�}||kr
|j|�q
W|S)znReturn a list of normalized paths with duplicates removed.

    The current order of paths is maintained.
    )�osr�normpathr!)�pathsZ
reduced_pathsrDZnprrr�normalize_and_reduce_paths�s
r[cCs@|jtj�}g}x|D]}||kr|j|�qWtjj|�}|S)z8Remove duplicate values of an environment variable.
    )rSrX�pathsepr!�join)ZvariableZoldListZnewListr$ZnewVariablerrr�removeDuplicates�s
r^c
Cst|}ytjd|d�}Wn"tk
r>tjd�d}YnX|sTtjj|�r�d|}tj	j
|d�}|r�tjj|�r�tjj|tjtjd�}tjj
|�}tjj|�s�tjd|�dSntjd|�|s�tjd	�dStjj|d
�}tjj|�r�|Stjd�dS)z�Find the vcvarsall.bat file

    At first it tries to find the productdir of VS 2008 in the registry. If
    that fails it falls back to the VS90COMNTOOLS env var.
    z%s\Setup\VCrAz%Unable to find productdir in registryNzVS%0.f0COMNTOOLSZVCz%s is not a valid directoryz Env var %s is not set or invalidzNo productdir foundz
vcvarsall.batzUnable to find vcvarsall.bat)r:rrrr
�debugrXr�isdir�environ�getr]�pardir�abspath�isfile)r>r;rAZtoolskeyZtoolsdir�	vcvarsallrrr�find_vcvarsall�s2





rgcCs8t|�}td�}i}|dkr$td��tjd||�tjd||ftjtjd	�}z�|j�\}}|j	�d
krvt|j
d���|j
d�}xr|jd�D]d}tj
|�}d
|kr�q�|j�}|jd
d�\}	}
|	j�}	|	|kr�|
jtj�r�|
dd�}
t|
�||	<q�WWd|jj�|jj�Xt|�t|�k�r4ttt|j�����|S)zDLaunch vcvarsall.bat and read the settings from its environment
    �include�lib�libpathrNzUnable to find vcvarsall.batz'Calling 'vcvarsall.bat %s' (version=%s)z
"%s" %s & set)�stdout�stderrrr.�
�=r)rhrirjrrN)rg�setrr
r_�
subprocess�Popen�PIPEZcommunicate�waitr-rSrr)�stripr(�endswithrXr\r^rk�closerlrR�
ValueError�str�list�keys)r>ZarchrfZinteresting�result�popenrkrl�linerr+rrr�query_vcvarsall�s<



r~g @z(VC %0.1f is not supported by this modulec
@s�eZdZdZdZiZdgZdddgZdgZdgZ	eeee	Z
d	Zd
ZdZ
dZd
ZZdZd.dd�Zd/dd�Zd0dd�Zd1dd�Zd2dd�Zd3dd�Zdd�Zd d!�Zd"d#�Zd$d%�Zd&d'�Zd(d)�Zd4d*d+�Zd,d-�ZdS)5�MSVCCompilerzwConcrete class that implements an interface to Microsoft Visual C++,
       as defined by the CCompiler abstract class.Zmsvcz.cz.ccz.cppz.cxxz.rcz.mcz.resz.objz.libz.dllz%s%sz.exercCs8tj||||�t|_d|_g|_d|_d|_d|_dS)NzSoftware\Microsoft\VisualStudioF)	rr?�VERSION�_MSVCCompiler__versionZ_MSVCCompiler__root�_MSVCCompiler__paths�	plat_name�_MSVCCompiler__arch�initialized)r=�verboseZdry_runZforcerrrr?JszMSVCCompiler.__init__NcCs|dkrt�}d$}||kr(td|f��dtjkrfdtjkrf|jd�rfd|_d|_d	|_d
|_d|_	n�|t�ksx|dkr�t
|}nt
t�dt
|}tt|�}|d
j
tj�|_|dtjd<|dtjd<t|j�dkr�td|j��|jd�|_|jd�|_|jd	�|_|jd
�|_|jd�|_	y,x&tjd
j
d�D]}|jj|��q<WWntk
�rjYnXt|j�|_dj|j�tjd
<d|_|jdk�r�dddddg|_ddddddg|_n&ddddddg|_dddddddg|_dddg|_|jd k�rddd!d"g|_dg|_d#|_dS)%Nr�	win-amd64�win-ia64z--plat-name must be one of %sZDISTUTILS_USE_SDKZMSSdkzcl.exezlink.exezlib.exezrc.exezmc.exe�_rrirhrzxPython was built with %s, and extensions need to be built with the same version of the compiler, but it isn't installed.�;rz/nologoz/Oxz/MDz/W3z/DNDEBUGz/Odz/MDdz/Z7z/D_DEBUGz/GS-z/DLLz/INCREMENTAL:NO�z/INCREMENTAL:noz/DEBUGT)rr�r�)rrrXra�find_exe�cc�linkerri�rc�mc�PLAT_TO_VCVARSr~r�rSr\r�rRZ_MSVCCompiler__productr!rr[r]Zpreprocess_optionsr��compile_options�compile_options_debug�ldflags_sharedr��ldflags_shared_debugZldflags_staticr�)r=r�Zok_platsZ	plat_specZvc_envrDrrr�
initializeUsd







zMSVCCompiler.initialize�cCs�|dkrd}g}x�|D]�}tjj|�\}}tjj|�d}|tjj|�d�}||jkrdtd|��|rttjj|�}||jkr�|j	tjj
|||j��q||jkr�|j	tjj
|||j��q|j	tjj
|||j
��qW|S)Nr�rzDon't know how to compile %s)rXr�splitext�
splitdrive�isabs�src_extensionsr�basename�_rc_extensionsr!r]�
res_extension�_mc_extensions�
obj_extension)r=Zsource_filenamesZ	strip_dir�
output_dirZ	obj_namesZsrc_namer�extrrr�object_filenames�s(



zMSVCCompiler.object_filenamesc	Cst|js|j�|j||||||�}	|	\}}
}}}|p6g}
|
jd�|rT|
j|j�n|
j|j��x|
D�]}y||\}}Wntk
r�whYnX|r�tj	j
|�}||jkr�d|}�nT||jkr�d|}�n>||j
k�r>|}d|}y"|j|jg||g|g�Wqhtk
�r8}zt|��WYdd}~XqhXqhn�||jk�rtj	j|�}tj	j|�}yl|j|jgd|d|g|g�tj	jtj	j|��\}}tj	j||d�}|j|jgd|g|g�Wqhtk
�r�}zt|��WYdd}~XqhXqhntd||f��d	|}y&|j|jg|
|||g|�Wqhtk
�rj}zt|��WYdd}~XqhXqhW|
S)
Nz/cz/Tcz/Tpz/foz-hz-rz.rcz"Don't know how to compile %s to %sz/Fo)r�r�Z_setup_compiler!�extendr�r�rrXrrd�
_c_extensions�_cpp_extensionsr��spawnr�rrr��dirnamer�r�r�r]r�)r=Zsourcesr�r9Zinclude_dirsr_�
extra_preargs�extra_postargsZdependsZcompile_info�objectsZpp_optsZbuildZcompile_opts�obj�srcr�Z	input_optZ
output_opt�msgZh_dirZrc_dirrr�Zrc_filerrr�compile�sj




zMSVCCompiler.compilec	Cs�|js|j�|j||�\}}|j||d�}|j||�r�|d|g}|rJy|j|jg|�Wq�tk
r�}zt|��WYdd}~Xq�Xnt	j
d|�dS)N)r�z/OUT:zskipping %s (up-to-date))r�r��_fix_object_args�library_filename�
_need_linkr�rirrr
r_)	r=r�Zoutput_libnamer�r_�target_lang�output_filenameZlib_argsr�rrr�create_static_libszMSVCCompiler.create_static_libcCsX|js|j�|j||�\}}|j|||�}|\}}}|rL|jdt|��t||||�}|dk	rptjj	||�}|j
||��rH|tjkr�|	r�|j
dd�}q�|jdd�}n|	r�|j
}n|j}g}x|p�gD]}|jd|�q�W||||d|g}tjj|d�}|dk	�rPtjjtjj|��\}}tjj	||j|��}|jd|�|j|||�|
�rp|
|dd�<|�r�|j|�|jtjj|��y|j|jg|�Wn,tk
�r�}zt|��WYdd}~XnX|j||�}|dk	�rT|\}}d||f}y|jdd	d
||g�Wn,tk
�rD}zt|��WYdd}~XnXntjd|�dS)Nz5I don't know what to do with 'runtime_library_dirs': rz/EXPORT:z/OUT:rz/IMPLIB:z-outputresource:%s;%szmt.exez-nologoz	-manifestzskipping %s (up-to-date))r�r�r�Z
_fix_lib_args�warnrxr	rXrr]r�r�
EXECUTABLEr�r�r!r�r�r�r��manifest_setup_ldargsr�Zmkpathr�r�rr�manifest_get_embed_infor
r_)r=�target_descr�r�r�Z	librariesZlibrary_dirsZruntime_library_dirsZexport_symbolsr_r�r��
build_tempr�Z
fixed_argsZlib_optsZldflagsZexport_optsZsym�ld_argsZdll_nameZdll_extZimplib_filer�ZmfinfoZ
mffilename�mfidZout_argrrr�link8sl





zMSVCCompiler.linkcCs,tjj|tjj|�d�}|jd|�dS)Nz	.manifestz/MANIFESTFILE:)rXrr]r�r!)r=r�r�r��
temp_manifestrrrr��sz"MSVCCompiler.manifest_setup_ldargscCs`x,|D] }|jd�r|jdd�d}PqWdS|tjkr>d}nd}|j|�}|dkrXdS||fS)Nz/MANIFESTFILE:�:rr
)�
startswithrSrr��_remove_visual_c_ref)r=r�r��argr�r�rrrr��s



z$MSVCCompiler.manifest_get_embed_infocCs�y�t|�}z|j�}Wd|j�Xtjdtj�}tj|d|�}d}tj|d|�}tjdtj�}tj||�dkrrdSt|d�}z|j|�|S|j�XWnt	k
r�YnXdS)NzU<assemblyIdentity.*?name=("|')Microsoft\.VC\d{2}\.CRT("|').*?(/>|</assemblyIdentity>)r�z*<dependentAssembly>\s*</dependentAssembly>zI<assemblyIdentity.*?name=(?:"|')(.+?)(?:"|').*?(?:/>|</assemblyIdentity>)�w)
�open�readrv�rer��DOTALLrI�search�write�OSError)r=Z
manifest_fileZ
manifest_fZmanifest_buf�patternrrrr��s.	


z!MSVCCompiler._remove_visual_c_refcCsd|S)Nz	/LIBPATH:r)r=�dirrrr�library_dir_option�szMSVCCompiler.library_dir_optioncCstd��dS)Nz<don't know how to set runtime library search path for MSVC++)r)r=r�rrr�runtime_library_dir_option�sz'MSVCCompiler.runtime_library_dir_optioncCs
|j|�S)N)r�)r=rirrr�library_option�szMSVCCompiler.library_optioncCs`|r|d|g}n|g}xB|D]6}x0|D](}tjj||j|��}tjj|�r(|Sq(WqWdSdS)NZ_d)rXrr]r��exists)r=�dirsrir_Z	try_namesr�r*Zlibfilerrr�find_library_file�s

zMSVCCompiler.find_library_filecCszx4|jD]*}tjjtjj|�|�}tjj|�r|SqWx>tjdjd�D]*}tjjtjj|�|�}tjj|�rH|SqHW|S)a�Return path to an MSVC executable program.

        Tries to find the program in several places: first, one of the
        MSVC program search paths from the registry; next, the directories
        in the PATH environment variable.  If any of those work, return an
        absolute path that is known to exist.  If none of them work, just
        return the original program name, 'exe'.
        ZPathr�)r�rXrr]rdrerarS)r=ZexerD�fnrrrr�s	zMSVCCompiler.find_exe)rrr)N)rr�)NNNrNNN)NrN)
NNNNNrNNNN)r) r2r3r4r5Z
compiler_typeZexecutablesr�r�r�r�r�r�r�Zstatic_lib_extensionZshared_lib_extensionZstatic_lib_formatZshared_lib_formatZ
exe_extensionr?r�r�r�r�r�r�r�r�r�r�r�r�r�rrrrr,sR


X

V

R+
rl)r)1r5rXrprPr�Zdistutils.errorsrrrrrZdistutils.ccompilerrrr	Z	distutilsr
Zdistutils.utilr�winregZ	OpenKeyExrZEnumKeyr Z	EnumValuer'�errorrZ
HKEY_USERS�HKEY_CURRENT_USER�HKEY_LOCAL_MACHINEZHKEY_CLASSES_ROOTr�platform�maxsizeZNATIVE_WIN64r:rCrBr�rr8rWr[r^rgr~r�rrrrr�<module>sN>.#
)
PKV[�eo'__pycache__/config.cpython-36.opt-2.pycnu�[���3


 \�@s8ddlZddlmZddlmZdZGdd�de�ZdS)�N)�RawConfigParser)�CommandzE[distutils]
index-servers =
    pypi

[pypi]
username:%s
password:%s
c@sdeZdZdZdZdZdZdddefdgZdgZd	d
�Z	dd�Z
d
d�Zdd�Zdd�Z
dd�ZdS)�
PyPIRCCommandzhttps://upload.pypi.org/legacy/�pypiNzrepository=�rzurl of repository [default: %s]�
show-response�&display full response text from servercCstjjtjjd�d�S)N�~z.pypirc)�os�path�join�
expanduser)�self�r�(/usr/lib64/python3.6/distutils/config.py�_get_rc_file&szPyPIRCCommand._get_rc_filecCsH|j�}tjtj|tjtjBd�d��}|jt||f�WdQRXdS)Ni��w)rr
�fdopen�open�O_CREAT�O_WRONLY�write�DEFAULT_PYPIRC)r�username�password�rc�frrr�
_store_pypirc*s zPyPIRCCommand._store_pypirccCs�|j�}tjj|��r�|jd|�|jp.|j}|jp:|j}t	�}|j
|�|j�}d|k�rR|jdd�}dd�|j
d�D�}|gkr�d|kr�dg}niSx�|D]�}d|i}	|j|d	�|	d	<xHd
|jfd|jfdfD].\}
}|j||
�r�|j||
�|	|
<q�||	|
<q�W|dk�r.||jdfk�r.|j|	d
<|	S|	d|k�sH|	d
|kr�|	Sq�WnRd
|k�r�d
}|j|d
��r||j|d
�}n|j}|j|d	�|j|d�|||jd�SiS)NzUsing PyPI login from %sZ	distutilsz
index-serverscSs g|]}|j�dkr|j��qS)�)�strip)�.0�serverrrr�
<listcomp>>sz.PyPIRCCommand._read_pypirc.<locals>.<listcomp>�
rr!r�
repository�realmrzserver-login)rrr$r!r%)rN)rr
r�existsZannouncer$�DEFAULT_REPOSITORYr%�
DEFAULT_REALMr�read�sections�get�splitZ
has_option)rrr$r%�configr*Z
index_serversZ_serversr!Zcurrent�key�defaultrrr�_read_pypirc0sX









zPyPIRCCommand._read_pypirccCs8ddl}|jdd�}|j|�djdd�}|j�j|�S)Nrzcontent-typez
text/plain��charset�ascii)�cgiZ	getheaderZparse_headerr+r)�decode)rZresponser4Zcontent_type�encodingrrr�_read_pypi_responseqsz!PyPIRCCommand._read_pypi_responsecCsd|_d|_d|_dS)Nr)r$r%Z
show_response)rrrr�initialize_optionsxsz PyPIRCCommand.initialize_optionscCs(|jdkr|j|_|jdkr$|j|_dS)N)r$r'r%r()rrrr�finalize_options~s

zPyPIRCCommand.finalize_options)rNr)�__name__�
__module__�__qualname__r'r(r$r%Zuser_optionsZboolean_optionsrrr0r7r8r9rrrrrs Ar)r
ZconfigparserrZ
distutils.cmdrrrrrrr�<module>s
PKV[�=�&�&#__pycache__/filelist.cpython-36.pycnu�[���3


 \ 2�@s�dZddlZddlZddlZddlZddlmZddlmZm	Z	ddl
mZGdd�d�Zdd	�Z
ejfd
d�Zdd
�Zddd�ZdS)zsdistutils.filelist

Provides the FileList class, used for poking about the filesystem
and building lists of files.
�N)�convert_path)�DistutilsTemplateError�DistutilsInternalError)�logc@s|eZdZdZddd�Zdd�Zejfdd�Zd	d
�Z	dd�Z
d
d�Zdd�Zdd�Z
dd�Zdd�Zddd�Zddd�ZdS) �FileLista�A list of files built by on exploring the filesystem and filtered by
    applying various patterns to what we find there.

    Instance attributes:
      dir
        directory from which files will be taken -- only used if
        'allfiles' not supplied to constructor
      files
        list of filenames currently being built/filtered/manipulated
      allfiles
        complete list of files under consideration (ie. without any
        filtering applied)
    NcCsd|_g|_dS)N)�allfiles�files)�self�warn�debug_print�r�*/usr/lib64/python3.6/distutils/filelist.py�__init__szFileList.__init__cCs
||_dS)N)r)r	rrrr
�set_allfiles#szFileList.set_allfilescCst|�|_dS)N)�findallr)r	�dirrrr
r&szFileList.findallcCsddlm}|rt|�dS)z~Print 'msg' to stdout if the global DEBUG (taken from the
        DISTUTILS_DEBUG environment variable) flag is true.
        r)�DEBUGN)Zdistutils.debugr�print)r	�msgrrrr
r)szFileList.debug_printcCs|jj|�dS)N)r�append)r	�itemrrr
r3szFileList.appendcCs|jj|�dS)N)r�extend)r	�itemsrrr
r6szFileList.extendcCs@tttjj|j��}g|_x |D]}|jjtjj|��q WdS)N)�sorted�map�os�path�splitrr�join)r	Zsortable_filesZ
sort_tuplerrr
�sort9s
z
FileList.sortcCsDx>tt|j�ddd�D]$}|j||j|dkr|j|=qWdS)N�r���)�range�lenr)r	�irrr
�remove_duplicatesCszFileList.remove_duplicatescCs�|j�}|d}d}}}|dkrTt|�dkr<td|��dd	�|d
d�D�}n~|dkr�t|�d
krttd|��t|d
�}dd	�|dd�D�}n:|dkr�t|�dkr�td|��t|d
�}ntd|��||||fS)Nr�include�exclude�global-include�global-exclude�z&'%s' expects <pattern1> <pattern2> ...cSsg|]}t|��qSr)r)�.0�wrrr
�
<listcomp>Wsz1FileList._parse_template_line.<locals>.<listcomp>r �recursive-include�recursive-exclude�z,'%s' expects <dir> <pattern1> <pattern2> ...cSsg|]}t|��qSr)r)r+r,rrr
r-]s�graft�prunez#'%s' expects a single <dir_pattern>zunknown action '%s')r&r'r(r))r.r/)r1r2)rr#rr)r	�lineZwords�action�patternsr�dir_patternrrr
�_parse_template_lineLs,


zFileList._parse_template_linecCsX|j|�\}}}}|dkrZ|jddj|��x&|D]}|j|dd�s4tjd|�q4W�n�|dkr�|jddj|��x&|D]}|j|dd�s|tjd	|�q|W�n�|d
kr�|jddj|��x&|D]}|j|dd�s�tjd
|�q�W�nj|dk�r8|jddj|��x*|D]"}|j|dd��stjd|��qW�n|dk�r�|jd|dj|�f�x,|D]$}|j||d��s`tjd||��q`Wn�|dk�r�|jd|dj|�f�x�|D]$}|j||d��s�tjd||��q�Wnx|dk�r|jd|�|jd|d��sTtjd|�nB|dk�rH|jd|�|jd|d��sTtjd|�ntd|��dS)Nr&zinclude � r )�anchorz%warning: no files found matching '%s'r'zexclude z9warning: no previously-included files found matching '%s'zglobal-includezglobal-include rz>warning: no files found matching '%s' anywhere in distributionzglobal-excludezglobal-exclude zRwarning: no previously-included files matching '%s' found anywhere in distributionzrecursive-includezrecursive-include %s %s)�prefixz:warning: no files found matching '%s' under directory '%s'zrecursive-excludezrecursive-exclude %s %szNwarning: no previously-included files matching '%s' found under directory '%s'r1zgraft z+warning: no directories found matching '%s'r2zprune z6no previously-included directories found matching '%s'z'this cannot happen: invalid action '%s')r7rr�include_patternrr
�exclude_patternr)r	r3r4r5rr6�patternrrr
�process_template_linehsf










zFileList.process_template_liner rcCspd}t||||�}|jd|j�|jdkr4|j�x6|jD],}|j|�r<|jd|�|jj|�d}q<W|S)a�Select strings (presumably filenames) from 'self.files' that
        match 'pattern', a Unix-style wildcard (glob) pattern.  Patterns
        are not quite the same as implemented by the 'fnmatch' module: '*'
        and '?'  match non-special characters, where "special" is platform-
        dependent: slash on Unix; colon, slash, and backslash on
        DOS/Windows; and colon on Mac OS.

        If 'anchor' is true (the default), then the pattern match is more
        stringent: "*.py" will match "foo.py" but not "foo/bar.py".  If
        'anchor' is false, both of these will match.

        If 'prefix' is supplied, then only filenames starting with 'prefix'
        (itself a pattern) and ending with 'pattern', with anything in between
        them, will match.  'anchor' is ignored in this case.

        If 'is_regex' is true, 'anchor' and 'prefix' are ignored, and
        'pattern' is assumed to be either a string containing a regex or a
        regex object -- no translation is done, the regex is just compiled
        and used as-is.

        Selected strings will be added to self.files.

        Return True if files are found, False otherwise.
        Fz%include_pattern: applying regex r'%s'Nz adding T)�translate_patternrr=rr�searchrr)r	r=r9r:�is_regex�files_found�
pattern_re�namerrr
r;�s


zFileList.include_patterncCsvd}t||||�}|jd|j�xNtt|j�ddd�D]4}|j|j|�r:|jd|j|�|j|=d}q:W|S)aRemove strings (presumably filenames) from 'files' that match
        'pattern'.  Other parameters are the same as for
        'include_pattern()', above.
        The list 'self.files' is modified in place.
        Return True if files are found, False otherwise.
        Fz%exclude_pattern: applying regex r'%s'r z
 removing Tr!r!)r?rr=r"r#rr@)r	r=r9r:rArBrCr$rrr
r<�s
zFileList.exclude_pattern)NN)r Nr)r Nr)�__name__�
__module__�__qualname__�__doc__rrr�curdirrrrrrr%r7r>r;r<rrrr
rs



	L
,rcCs&dd�tj|dd�D�}ttjj|�S)z%
    Find all files under 'path'
    css,|]$\}}}|D]}tjj||�VqqdS)N)rrr)r+�base�dirsr�filerrr
�	<genexpr>�sz#_find_all_simple.<locals>.<genexpr>T)�followlinks)r�walk�filterr�isfile)rZresultsrrr
�_find_all_simple�srRcCs6t|�}|tjkr.tjtjj|d�}t||�}t|�S)z�
    Find all files under 'dir' and return the list of full filenames.
    Unless dir is '.', return full filenames with dir prepended.
    )�start)	rRrrI�	functools�partialr�relpathr�list)rrZmake_relrrr
rs


rcCs8tj|�}tj}tjdkrd}d|}tjd||�}|S)z�Translate a shell-like glob pattern to a regular expression; return
    a string containing the regex.  Differs from 'fnmatch.translate()' in
    that '*' does not match "special characters" (which are
    platform-specific).
    �\z\\\\z\1[^%s]z((?<!\\)(\\\\)*)\.)�fnmatch�	translater�sep�re�sub)r=rCr[Zescapedrrr
�
glob_to_res

r^r c
Cs
|rt|t�rtj|�S|Std�jd�\}}}|rVt|�}|j|�rP|j|�sZt�nd}|dk	r�t|�}|j|�r~|j|�s�t�|t	|�t	|�t	|��}t
j}	t
jdkr�d}	|t	|�t	|�t	|��}d|||	||f}n|�rd||t	|�d�f}tj|�S)aTranslate a shell-like wildcard pattern to a compiled regular
    expression.  Return the compiled regex.  If 'is_regex' true,
    then 'pattern' is directly compiled to a regex (if it's a string)
    or just returned as-is (assumes it's a regex object).
    �_�NrXz\\z%s\A%s%s.*%s%sz%s\A%s)�
isinstance�strr\�compiler^�	partition�
startswith�endswith�AssertionErrorr#rr[)
r=r9r:rArSr_�endrCZ	prefix_rer[rrr
r?%s*


r?)r Nr)rHrr\rYrTZdistutils.utilrZdistutils.errorsrrZ	distutilsrrrRrIrr^r?rrrr
�<module>siPKV[����<�<%__pycache__/util.cpython-36.opt-1.pycnu�[���3


 \5Q�@sdZddlZddlZddlZddlZddlZddlmZddl	m
Z
ddlmZddl
mZddlmZdd	�Zd
d�Zdd
�Zdadd�Zdd�Zd(dd�Zdaaadd�Zdd�Zd)dd�Zdd�Zd*dd�Zd d!�Zd+d"d#�Z d,d$d%�Z!Gd&d'�d'�Z"dS)-zudistutils.util

Miscellaneous utility functions -- anything that doesn't fit into
one of the other *util.py modules.
�N)�DistutilsPlatformError)�newer)�spawn)�log)�DistutilsByteCompileErrorcCstjdkrnd}tjj|�}|d)kr(tjStjjd|�}tj|t|�|�j�}|dkr\dS|dkrhdStjSd	tjkr�tjd	Stjd
ks�t	td�r�tjStj
�\}}}}}|j�jdd
�}|jdd�}|jdd�}|dd�dkr�d||fS|dd�dk�rV|ddk�rd}dt|d�d|dd�f}ddd�}	|d|	tj
7}n�|dd �d!k�rtd||fS|dd�d"k�r�d#|||fS|dd$�d%k�r�d%}tjd&tj�}
|
j|�}|�r|j�}n>|dd$�d'k�rddl}ddl}
|j|
jj�|||�\}}}d(|||fS)*a�Return a string that identifies the current platform.  This is used
    mainly to distinguish platform-specific build directories and
    platform-specific built distributions.  Typically includes the OS name
    and version and the architecture (as supplied by 'os.uname()'),
    although the exact information included depends on the OS; eg. for IRIX
    the architecture isn't particularly important (IRIX only runs on SGI
    hardware), but for Linux the kernel version isn't particularly
    important.

    Examples of returned values:
       linux-i586
       linux-alpha (?)
       solaris-2.6-sun4u
       irix-5.3
       irix64-6.2

    Windows will return one of:
       win-amd64 (64bit Windows on AMD64 (aka x86_64, Intel64, EM64T, etc)
       win-ia64 (64bit Windows on Itanium)
       win32 (all others - specifically, sys.platform is returned)

    For other non-POSIX platforms, currently just returns 'sys.platform'.
    �ntz bit (��)�amd64z	win-amd64�itaniumzwin-ia64�_PYTHON_HOST_PLATFORM�posix�uname�/�� �_�-N��linuxz%s-%s�sunosr�5�solarisz%d.%s���32bit�64bit)i���l����z.%s��irix�aixz%s-%s.%s��cygwinz[\d.]+�darwinz%s-%s-%s���)�os�name�sys�version�find�platform�len�lower�environ�hasattrr�replace�int�maxsize�re�compile�ASCII�match�group�_osx_supportZdistutils.sysconfig�get_platform_osx�	sysconfig�get_config_vars)�prefix�i�j�look�osname�host�releaser'�machine�bitness�rel_re�mr6�	distutils�rF�&/usr/lib64/python3.6/distutils/util.py�get_platformsX


 


rHcCs~tjdkr|S|s|S|ddkr.td|��|ddkrFtd|��|jd�}xd|krf|jd�qRW|srtjStjj|�S)a�Return 'pathname' as a name that will work on the native filesystem,
    i.e. split it on '/' and put it back together again using the current
    directory separator.  Needed because filenames in the setup script are
    always supplied in Unix style, and have to be converted to the local
    convention before we can actually use them in the filesystem.  Raises
    ValueError on non-Unix-ish systems if 'pathname' either starts or
    ends with a slash.
    rrzpath '%s' cannot be absoluterzpath '%s' cannot end with '/'�.r#)r$�sep�
ValueError�split�remove�curdir�path�join)�pathname�pathsrFrFrG�convert_pathos	


rScCs�tjdkr<tjj|�s$tjj||�Stjj||dd��SnNtjdkr|tjj|�\}}|ddkrn|dd�}tjj||�Stdtj��dS)a	Return 'pathname' with 'new_root' prepended.  If 'pathname' is
    relative, this is equivalent to "os.path.join(new_root,pathname)".
    Otherwise, it requires making 'pathname' relative and then joining the
    two, which is tricky on DOS/Windows and Mac OS.
    r
rNrr�\z!nothing known about platform '%s')r$r%rO�isabsrP�
splitdriver)Znew_rootrQZdriverOrFrFrG�change_root�s

rWcCsZtrdStjdkr<dtjkr<ddl}|jtj��dtjd<dtjkrRt�tjd<dadS)aLEnsure that 'os.environ' has all the environment variables we
    guarantee that users can use in config files, command-line options,
    etc.  Currently this includes:
      HOME - user's home directory (Unix only)
      PLAT - description of the current platform, including hardware
             and OS (see 'get_platform()')
    Nr
�HOMErrZPLATr)�_environ_checkedr$r%r,�pwd�getpwuid�getuidrH)rZrFrFrG�
check_environ�s	
r]cCsTt�|fdd�}ytjd||�Stk
rN}ztd|��WYdd}~XnXdS)a�Perform shell/Perl-style variable substitution on 'string'.  Every
    occurrence of '$' followed by a name is considered a variable, and
    variable is substituted by the value found in the 'local_vars'
    dictionary, or in 'os.environ' if it's not in 'local_vars'.
    'os.environ' is first checked/augmented to guarantee that it contains
    certain values: see 'check_environ()'.  Raise ValueError for any
    variables not found in either 'local_vars' or 'os.environ'.
    cSs,|jd�}||krt||�Stj|SdS)Nr)r5�strr$r,)r4�
local_varsZvar_namerFrFrG�_subst�s
zsubst_vars.<locals>._substz\$([a-zA-Z_][a-zA-Z_0-9]*)zinvalid variable '$%s'N)r]r1�sub�KeyErrorrK)�sr_r`�varrFrFrG�
subst_vars�s	re�error: cCs|t|�S)N)r^)�excr:rFrFrG�grok_environment_error�srhcCs(tjdtj�atjd�atjd�adS)Nz
[^\\\'\"%s ]*z'(?:[^'\\]|\\.)*'z"(?:[^"\\]|\\.)*")r1r2�string�
whitespace�
_wordchars_re�
_squote_re�
_dquote_rerFrFrFrG�_init_regex�s
rncCs�tdkrt�|j�}g}d}�x`|�r�tj||�}|j�}|t|�kr\|j|d|��P||tjkr�|j|d|��||d�j	�}d}n�||dkr�|d|�||dd�}|d}n�||dkr�t
j||�}n*||dkr�tj||�}ntd||��|dk�r"t
d||��|j�\}}|d|�||d|d�||d�}|j�d	}|t|�kr"|j|�Pq"W|S)
aSplit a string up according to Unix shell-like rules for quotes and
    backslashes.  In short: words are delimited by spaces, as long as those
    spaces are not escaped by a backslash, or inside a quoted string.
    Single and double quotes are equivalent, and the quote characters can
    be backslash-escaped.  The backslash is stripped from any two-character
    escape sequence, leaving only the escaped character.  The quote
    characters are stripped from any quoted string.  Returns a list of
    words.
    NrrTr�'�"z!this can't happen (bad char '%c')z"bad string (mismatched %s quotes?)r)rkrn�stripr4�endr*�appendrirj�lstriprlrm�RuntimeErrorrK�span)rcZwords�posrDrrZbegrFrFrG�split_quoted�s@


,
rxcCsP|dkr6d|j|f}|dd�dkr6|dd�d}tj|�|sL||�dS)	a�Perform some action that affects the outside world (eg.  by
    writing to the filesystem).  Such actions are special because they
    are disabled by the 'dry_run' flag.  This method takes care of all
    that bureaucracy for you; all you have to do is supply the
    function to call and an argument tuple for it (to embody the
    "external action" being performed), and an optional message to
    print.
    Nz%s%rrz,)rr	���ry)�__name__r�info)�func�args�msg�verbose�dry_runrFrFrG�executes	
r�cCs2|j�}|dkrdS|dkr dStd|f��dS)z�Convert a string representation of truth to true (1) or false (0).

    True values are 'y', 'yes', 't', 'true', 'on', and '1'; false values
    are 'n', 'no', 'f', 'false', 'off', and '0'.  Raises ValueError if
    'val' is anything else.
    �y�yes�t�true�on�1r�n�no�f�false�off�0rzinvalid truth value %rN)r�r�r�r�r�r�)r�r�r�r�r�r�)r+rK)�valrFrFrG�	strtobool0sr�rcCsTddl}tjrtd��|dkr*do(|dk}|�s8yddlm}	|	d�\}
}Wn.tk
rzddlm}d|d�}
}YnXtj	d|�|s�|
dk	r�t
j|
d	�}
n
t|d	�}
|
j
d
�|
j
djtt|��d�|
j
d
|||||f�|
j�tjg}|j|j��|j|�t||d�tt
j|fd||d��nddlm}�x|D�]�}|dd�dk�rh�qL|dk�r�|dk�r�dn|}tjj||d�}ntjj|�}|}|�r�|dt|��|k�r�td||f��|t|�d�}|�r�t
j j||�}t
j j!|�}|�rL|�st"||��r<tj	d||�|�sJ||||�ntj#d||��qLWdS)a~Byte-compile a collection of Python source files to .pyc
    files in a __pycache__ subdirectory.  'py_files' is a list
    of files to compile; any files that don't end in ".py" are silently
    skipped.  'optimize' must be one of the following:
      0 - don't optimize
      1 - normal optimization (like "python -O")
      2 - extra optimization (like "python -OO")
    If 'force' is true, all files are recompiled regardless of
    timestamps.

    The source filename encoded in each bytecode file defaults to the
    filenames listed in 'py_files'; you can modify these with 'prefix' and
    'basedir'.  'prefix' is a string that will be stripped off of each
    source filename, and 'base_dir' is a directory name that will be
    prepended (after 'prefix' is stripped).  You can supply either or both
    (or neither) of 'prefix' and 'base_dir', as you wish.

    If 'dry_run' is true, doesn't actually do anything that would
    affect the filesystem.

    Byte-compilation is either done directly in this interpreter process
    with the standard py_compile module, or indirectly by writing a
    temporary script and executing it.  Normally, you should let
    'byte_compile()' figure out to use direct compilation or not (see
    the source for details).  The 'direct' flag is used by the script
    generated in indirect mode; unless you know what you're doing, leave
    it set to None.
    rNzbyte-compiling is disabled.F)�mkstempz.py)�mktempz$writing byte-compilation script '%s'�wz2from distutils.util import byte_compile
files = [
z,
z]
z�
byte_compile(files, optimize=%r, force=%r,
             prefix=%r, base_dir=%r,
             verbose=%r, dry_run=0,
             direct=1)
)r�zremoving %s)r2rr)�optimizationz1invalid prefix: filename %r doesn't start with %rzbyte-compiling %s to %sz%skipping byte-compilation of %s to %s���)$�
subprocessr&�dont_write_bytecoderZtempfiler��ImportErrorr�rr{r$�fdopen�open�writerP�map�repr�close�
executable�extendZ"_optim_args_from_interpreter_flagsrsrr�rM�
py_compiler2�	importlib�util�cache_from_sourcer*rKrO�basenamer�debug)Zpy_files�optimizeZforcer:Zbase_dirrr�Zdirectr�r�Z	script_fdZscript_namer�Zscript�cmdr2�file�opt�cfile�dfileZ
cfile_baserFrFrG�byte_compile@sl$


r�cCs|jd�}d}|j|�S)z�Return a version of the string escaped for inclusion in an
    RFC-822 header, by ensuring there are 8 spaces space after each newline.
    �
�rz        z	
        )rLrP)�header�linesrJrFrFrG�
rfc822_escape�s
r�cCsV|sdSddlm}m}Gdd�d|�}|dkr8|d�}|||d�}|j|dd	�dS)
aInvoke 2to3 on a list of Python files.
    The files should all come from the build area, as the
    modification is done in-place. To reduce the build time,
    only files modified since the last invocation of this
    function should be passed in the files argument.Nr)�RefactoringTool�get_fixers_from_packagec@s$eZdZdd�Zdd�Zdd�ZdS)z*run_2to3.<locals>.DistutilsRefactoringToolc_stj|f|��dS)N)r�error)�selfr~r}�kwrFrFrG�	log_error�sz4run_2to3.<locals>.DistutilsRefactoringTool.log_errorcWstj|f|��dS)N)rr{)r�r~r}rFrFrG�log_message�sz6run_2to3.<locals>.DistutilsRefactoringTool.log_messagecWstj|f|��dS)N)rr�)r�r~r}rFrFrG�	log_debug�sz4run_2to3.<locals>.DistutilsRefactoringTool.log_debugN)rz�
__module__�__qualname__r�r�r�rFrFrFrG�DistutilsRefactoringTool�sr�z
lib2to3.fixes)�optionsT)r�)Zlib2to3.refactorr�r�Zrefactor)�files�fixer_namesr��explicitr�r�r��rrFrFrG�run_2to3�s
r�cCsddlm}ddlm}ddlm}|�}	tj�}
tj|�z|	j	�Wdtj|
�X|	j
|	jdd�<|r�x(|j�D]}|j
�}|s�qt|	j|�qtWg}xV|	jD]L}
tjj||
�}|tjj|��|tjj||
�|dd�}|dr�|j|�q�Wtdd	�|D�|||d
�|S)z�Recursively copy a directory, only copying new and changed files,
    running run_2to3 over all newly copied Python modules afterward.

    If you give a template string, it's parsed like a MANIFEST.in.
    r)�mkpath)�	copy_file)�FileListNr)�updatecSsg|]}|j�jd�r|�qS)z.py)r+�endswith)�.0�fnrFrFrG�
<listcomp>sz$copydir_run_2to3.<locals>.<listcomp>)r�r�r�)Zdistutils.dir_utilr�Zdistutils.file_utilr�Zdistutils.filelistr�r$�getcwd�chdir�findallZallfilesr��
splitlinesrqZprocess_template_linerOrP�dirnamersr�)�src�dest�templater�r�r�r�r�r�ZfilelistrN�lineZcopied�filenameZoutname�resrFrFrG�copydir_run_2to3�s4
r�c@s$eZdZdZdZdZdZdd�ZdS)�	Mixin2to3z�Mixin class for commands that run 2to3.
    To configure 2to3, setup scripts may either change
    the class variables, or inherit from individual commands
    to override how 2to3 is invoked.NcCst||j|j|j�S)N)r�r�r�r�)r�r�rFrFrGr�,szMixin2to3.run_2to3)rzr�r��__doc__r�r�r�r�rFrFrFrGr�s
r�)rf)Nrr)rrNNrrN)NNN)NNNN)#r�r$r1�importlib.utilr�rir&Zdistutils.errorsrZdistutils.dep_utilrZdistutils.spawnrrErrrHrSrWrYr]rerhrkrlrmrnrxr�r�r�r�r�r�r�rFrFrFrG�<module>s@]
=




 PKV[?�NN.__pycache__/unixccompiler.cpython-36.opt-2.pycnu�[���3

�\dh�:�@s�ddlZddlZddlZddlmZddlmZddlmZm	Z	m
Z
ddlmZm
Z
mZmZddlmZejdkrzddlZGdd	�d	e�ZdS)
�N)�	sysconfig)�newer)�	CCompiler�gen_preprocess_options�gen_lib_options)�DistutilsExecError�CompileError�LibError�	LinkError)�log�darwinc
s�eZdZdZddgdgdgddgdgddgdd�Zejdd�d	krNd
ged
<ddd
dddgZdZdZ	dZ
dZdZdZ
ZZeZejdkr�dZ�fdd�Zd.dd�Zdd�Zd/d d!�Zd0d"d#�Zd$d%�Zd&d'�Zd(d)�Zd*d+�Zd1d,d-�Z�ZS)2�
UnixCCompilerZunixNZccz-shared�arz-cr)�preprocessor�compiler�compiler_so�compiler_cxx�	linker_so�
linker_exe�archiver�ranlib�rrz.cz.Cz.ccz.cxxz.cppz.mz.oz.az.soz.dylibz.tbdzlib%s%s�cygwinz.execs@t�j|||�\}}}tjd�}|r6||kr6|j|�|||fS)N�LIBDIR)�super�
_fix_lib_argsr�get_config_var�remove)�self�	libraries�library_dirs�runtime_library_dirsZlibdir)�	__class__��//usr/lib64/python3.6/distutils/unixccompiler.pyrUs

zUnixCCompiler._fix_lib_argscCs�|jd||�}|\}}}t||�}	|j|	}
|r>|
jd|g�|rN||
dd�<|r\|
j|�|
j|�|js~|dks~t||�r�|r�|jtj	j
|��y|j|
�Wn*tk
r�}zt
|��WYdd}~XnXdS)Nz-or)Z_fix_compile_argsrr�extend�appendZforcer�mkpath�os�path�dirname�spawnrr)r�sourceZoutput_fileZmacrosZinclude_dirs�
extra_preargs�extra_postargs�
fixed_args�ignore�pp_optsZpp_args�msgr#r#r$�
preprocess^s$




zUnixCCompiler.preprocessc	Csp|j}tjdkr tj|||�}y |j|||d|g|�Wn*tk
rj}zt|��WYdd}~XnXdS)Nrz-o)r�sys�platform�_osx_support�compiler_fixupr+rr)	r�obj�srcZextZcc_argsr.r1rr2r#r#r$�_compilexs

zUnixCCompiler._compilercCs�|j||�\}}|j||d�}|j||�r�|jtjj|��|j|j|g||j	�|j
r�y|j|j
|g�Wq�tk
r�}zt|��WYdd}~Xq�Xnt
jd|�dS)N)�
output_dirzskipping %s (up-to-date))�_fix_object_args�library_filename�
_need_linkr'r(r)r*r+r�objectsrrr	r�debug)rr?Zoutput_libnamer;r@�target_lang�output_filenamer2r#r#r$�create_static_lib�szUnixCCompiler.create_static_libcCs�|j||�\}}|j|||�}|\}}}t||||�}t|ttd�f�sPtd��|dk	rftjj	||�}|j
||��r�||j|d|g}|	r�dg|dd�<|
r�|
|dd�<|r�|j|�|j
tjj|��y�|tjkr�|jdd�}n|jdd�}|
dk�rR|j�rRd}tjj|d�dk�rDd}xd||k�rB|d7}�q(W|j|||<tjd	k�rjtj||�}|j||�Wn,tk
�r�}zt|��WYdd}~XnXntjd
|�dS)Nz%'output_dir' must be a string or Nonez-oz-grzc++�env��=rzskipping %s (up-to-date))r<rr�
isinstance�str�type�	TypeErrorr(r)�joinr>r?r%r'r*rZ
EXECUTABLErrr�basenamer4r5r6r7r+rr
rr@)rZtarget_descr?rBr;rr r!Zexport_symbolsr@r-r.Z
build_temprAr/Zlib_optsZld_argsZlinker�ir2r#r#r$�link�sH


zUnixCCompiler.linkcCsd|S)Nz-Lr#)r�dirr#r#r$�library_dir_option�sz UnixCCompiler.library_dir_optioncCsd|kpd|kS)N�gcczg++r#)rZ
compiler_namer#r#r$�_is_gcc�szUnixCCompiler._is_gcccCs�tjjtjd��}tjdd�dkr,d|Stjdd�dkrFd|Stjdd�d	krz|j|�rnd
d|gSdd|gStjdd�dks�tjdd�d
kr�d|gS|j|�r�tjd�dkr�d|Sd|Snd|SdS)N�CCrrz-L�Zfreebsdz-Wl,-rpath=�zhp-uxz-Wl,+sz+sZirix646Zosf1V5z-rpath�GNULD�yesz-Wl,--enable-new-dtags,-Rz-Wl,-Rz-R)r(r)rLrrr4r5rR)rrOrr#r#r$�runtime_library_dir_option�s 
$

z(UnixCCompiler.runtime_library_dir_optioncCsd|S)Nz-lr#)r�libr#r#r$�library_option	szUnixCCompiler.library_optioncCs�|j|dd�}|j|dd�}|j|dd�}|j|dd�}tjdkrptjd�}tjd|�}	|	dkrfd	}
n
|	jd
�}
�x|D�]}tj	j
||�}tj	j
||�}
tj	j
||�}tj	j
||�}tjdko�|jd�s�|jd�o�|jd
��rBtj	j
|
|d
d�|�}tj	j
|
|d
d�|�}
tj	j
|
|d
d�|�}tj	j
|
|d
d�|�}tj	j|
��rT|
Stj	j|��rf|Stj	j|��rx|Stj	j|�rx|SqxWdS)N�shared)Zlib_type�dylib�
xcode_stub�staticr�CFLAGSz-isysroot\s+(\S+)�/rEz/System/z/usr/z/usr/local/)
r=r4r5rr�re�search�groupr(r)rK�
startswith�exists)r�dirsrYr@Zshared_fZdylib_fZxcode_stub_fZstatic_fZcflags�mZsysrootrOr[r\r^r]r#r#r$�find_library_files>




zUnixCCompiler.find_library_file)NNNNN)NrN)
NNNNNrNNNN)r)�__name__�
__module__�__qualname__Z
compiler_typeZexecutablesr4r5Zsrc_extensionsZ
obj_extensionZstatic_lib_extensionZshared_lib_extensionZdylib_lib_extensionZxcode_stub_lib_extensionZstatic_lib_formatZshared_lib_formatZdylib_lib_formatZxcode_stub_lib_formatZ
exe_extensionrr3r:rCrNrPrRrXrZrh�
__classcell__r#r#)r"r$r
-sF

	


6,r
)r(r4raZ	distutilsrZdistutils.dep_utilrZdistutils.ccompilerrrrZdistutils.errorsrrr	r
rr5r6r
r#r#r#r$�<module>s
PKV[�^9b
b
)__pycache__/dir_util.cpython-36.opt-2.pycnu�[���3


 \b�@slddlZddlZddlmZmZddlmZiaddd�Zddd	�Z	dd
d�Z
dd
�Zddd�Zdd�Z
dS)�N)�DistutilsFileError�DistutilsInternalError)�log��cCspt|t�std|f��tjj|�}g}tjj|�s<|dkr@|Stjtjj	|��rV|Stjj
|�\}}|g}x6|r�|r�tjj|�r�tjj
|�\}}|jd|�qnWx�|D]�}tjj||�}tjj	|�}	tj|	�r�q�|dkr�t
jd|�|�s`ytj||�WnVtk
�rT}
z8|
jtjk�o*tjj|��sDtd||
jdf��WYdd}
~
XnX|j|�dt|	<q�W|S)Nz(mkpath: 'name' must be a string (got %r)�rrzcreating %szcould not create '%s': %s���)�
isinstance�strr�os�path�normpath�isdir�
_path_created�get�abspath�split�insert�joinr�info�mkdir�OSError�errnoZEEXISTr�args�append)�name�mode�verbose�dry_runZcreated_dirs�head�tailZtails�dZabs_head�exc�r#�*/usr/lib64/python3.6/distutils/dir_util.py�mkpaths>


&
r%cCsVt�}x(|D] }|jtjj|tjj|���qWx t|�D]}t||||d�q:WdS)N)rr)�set�addrrr�dirname�sortedr%)Zbase_dir�filesrrrZneed_dir�file�dirr#r#r$�create_treePs

 r-cCsfddlm}|r,tjj|�r,td|��ytj|�}	Wn>tk
rx}
z"|rVg}	ntd||
jf��WYdd}
~
XnX|s�t	||d�g}x�|	D]�}tjj
||�}
tjj
||�}|jd�r�q�|o�tjj|
��rtj
|
�}|dkr�tjd||�|�stj||�|j|�q�tjj|
��r>|jt|
|||||||d	��q�||
||||||d	�|j|�q�W|S)
Nr)�	copy_filez&cannot copy tree '%s': not a directoryzerror listing files in '%s': %s)rz.nfsrzlinking %s -> %s)rr)Zdistutils.file_utilr.rrrr�listdirr�strerrorr%r�
startswith�islink�readlinkrr�symlinkr�extend�	copy_tree)�src�dstZ
preserve_modeZpreserve_timesZpreserve_symlinks�updaterrr.�names�eZoutputs�nZsrc_nameZdst_nameZ	link_destr#r#r$r6csH
"


r6cCslxVtj|�D]H}tjj||�}tjj|�rDtjj|�rDt||�q|jtj|f�qW|jtj	|f�dS)N)
rr/rrrr2�_build_cmdtupler�remove�rmdir)r�	cmdtuples�fZreal_fr#r#r$r=�sr=cCs�|dkrtjd|�|rdSg}t||�xp|D]h}y2|d|d�tjj|d�}|tkrdt|=Wq0tk
r�}ztjd||�WYdd}~Xq0Xq0WdS)Nrz'removing '%s' (and everything under it)rzerror removing %s: %s)	rrr=rrrrr�warn)Z	directoryrrr@�cmdrr"r#r#r$�remove_tree�s


rDcCs6tjj|�\}}|dd�tjkr2||dd�}|S)Nrr)rr�
splitdrive�sep)rZdriver#r#r$�ensure_relative�srG)rrr)rrr)rrrrrr)rr)rrZdistutils.errorsrrZ	distutilsrrr%r-r6r=rDrGr#r#r#r$�<module>s
?

D

PKV[�G�PX
X
%__pycache__/core.cpython-36.opt-2.pycnu�[���3


 \�"�@s�ddlZddlZddlmZddlTddlmZddlmZddl	m
Z
ddlmZdZ
d	d
�Zdadad3Zd4Zd.d/�Zd5d1d2�ZdS)6�N)�DEBUG)�*)�Distribution)�Command)�
PyPIRCCommand)�	Extensionz�usage: %(script)s [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]
   or: %(script)s --help [cmd1 cmd2 ...]
   or: %(script)s --help-commands
   or: %(script)s cmd --help
cCstjj|�}tt�S)N)�os�path�basename�USAGE�vars)�script_nameZscript�r�&/usr/lib64/python3.6/distutils/core.py�	gen_usage sr�	distclassr
�script_args�options�name�version�author�author_email�
maintainer�maintainer_email�url�license�description�long_description�keywords�	platforms�classifiers�download_url�requires�provides�	obsoletes�sources�include_dirs�
define_macros�undef_macros�library_dirs�	libraries�runtime_library_dirs�
extra_objects�extra_compile_args�extra_link_args�	swig_opts�export_symbols�depends�languagec,Ks|jd�}|r|d=nt}d|kr8tjjtjd�|d<d|krRtjdd�|d<y||�a}WnLtk
r�}z0d|kr�t	d|��nt	d|d|f��WYdd}~XnXt
d	kr�|S|j�tr�t
d
�|j�t
dkr�|Sy|j�}Wn:tk
�r*}zt	t|j�d|��WYdd}~XnXt�rBt
d
�|j�t
dk�rP|S|�ry|j�Wn�tk
�r�t	d��Yn�tk
�r�}z0t�r�tjjd|f��nt	d|f��WYdd}~XnBttfk
�r}z t�r�nt	dt|���WYdd}~XnX|S)Nrr
rr�rzerror in setup command: %szerror in %s setup command: %s�initz%options (after parsing config files):�configz

error: %sz%options (after parsing command line):�commandlineZinterruptedz
error: %s
z	error: %szerror: )�getrrr	r
�sys�argv�_setup_distributionZDistutilsSetupError�
SystemExit�_setup_stop_afterZparse_config_filesr�printZdump_option_dictsZparse_command_lineZDistutilsArgErrorrr
Zrun_commands�KeyboardInterrupt�OSError�stderr�writeZDistutilsErrorZCCompilerError�str)Zattrs�klassZdist�msg�ok�excrrr�setup9s`%
"(
"rG�runcCs�|dkrtd|f��|atjj�}d|i}yZzH|tjd<|dk	rP|tjdd�<t|d	��}t|j�|�WdQRXWd|t_daXWntk
r�YnXt	dkr�t
d
|��t	S)Nr4r5r6rHz"invalid value for 'stop_after': %r�__file__rr3�rbzZ'distutils.core.setup()' was never called -- perhaps '%s' is not a Distutils setup script?)r4r5r6rH)�
ValueErrorr<r8r9�copy�open�exec�readr;r:�RuntimeError)r
rZ
stop_afterZ	save_argv�g�frrr�	run_setup�s(


rS)rr
rrrrrrrrrrrrrrr r!r"r#r$)rr%r&r'r(r)r*r+r,r-r.r/r0r1r2)NrH)rr8Zdistutils.debugrZdistutils.errorsZdistutils.distrZ
distutils.cmdrZdistutils.configrZdistutils.extensionrrrr<r:Zsetup_keywordsZextension_keywordsrGrSrrrr�<module>	s0qPKV[f�Y
&&*__pycache__/extension.cpython-36.opt-1.pycnu�[���3


 \)�@s.dZddlZddlZGdd�d�Zdd�ZdS)zmdistutils.extension

Provides the Extension class, used to describe C/C++ extension
modules in setup scripts.�Nc@s"eZdZdZddd�Zdd�ZdS)�	Extensiona�Just a collection of attributes that describes an extension
    module and everything needed to build it (hopefully in a portable
    way, but there are hooks that let you be as unportable as you need).

    Instance attributes:
      name : string
        the full name of the extension, including any packages -- ie.
        *not* a filename or pathname, but Python dotted name
      sources : [string]
        list of source filenames, relative to the distribution root
        (where the setup script lives), in Unix form (slash-separated)
        for portability.  Source files may be C, C++, SWIG (.i),
        platform-specific resource files, or whatever else is recognized
        by the "build_ext" command as source for a Python extension.
      include_dirs : [string]
        list of directories to search for C/C++ header files (in Unix
        form for portability)
      define_macros : [(name : string, value : string|None)]
        list of macros to define; each macro is defined using a 2-tuple,
        where 'value' is either the string to define it to or None to
        define it without a particular value (equivalent of "#define
        FOO" in source or -DFOO on Unix C compiler command line)
      undef_macros : [string]
        list of macros to undefine explicitly
      library_dirs : [string]
        list of directories to search for C/C++ libraries at link time
      libraries : [string]
        list of library names (not filenames or paths) to link against
      runtime_library_dirs : [string]
        list of directories to search for C/C++ libraries at run time
        (for shared extensions, this is when the extension is loaded)
      extra_objects : [string]
        list of extra files to link with (eg. object files not implied
        by 'sources', static library that must be explicitly specified,
        binary resource files, etc.)
      extra_compile_args : [string]
        any extra platform- and compiler-specific information to use
        when compiling the source files in 'sources'.  For platforms and
        compilers where "command line" makes sense, this is typically a
        list of command-line arguments, but for other platforms it could
        be anything.
      extra_link_args : [string]
        any extra platform- and compiler-specific information to use
        when linking object files together to create the extension (or
        to create a new static Python interpreter).  Similar
        interpretation as for 'extra_compile_args'.
      export_symbols : [string]
        list of symbols to be exported from a shared extension.  Not
        used on all platforms, and not generally necessary for Python
        extensions, which typically export exactly one symbol: "init" +
        extension_name.
      swig_opts : [string]
        any extra options to pass to SWIG if a source file has the .i
        extension.
      depends : [string]
        list of files that the extension depends on
      language : string
        extension language (i.e. "c", "c++", "objc"). Will be detected
        from the source extensions if not provided.
      optional : boolean
        specifies that a build failure in the extension should not abort the
        build process, but simply not install the failing extension.
    NcKst|t�std��t|t�o,tdd�|D��s6td��||_||_|pHg|_|pRg|_|p\g|_	|pfg|_
|ppg|_|pzg|_|	p�g|_
|
p�g|_|p�g|_|p�g|_|
p�g|_|p�g|_||_||_t|�dk�rdd�|D�}djt|��}d	|}tj|�dS)
Nz'name' must be a stringcss|]}t|t�VqdS)N)�
isinstance�str)�.0�v�r�+/usr/lib64/python3.6/distutils/extension.py�	<genexpr>jsz%Extension.__init__.<locals>.<genexpr>z#'sources' must be a list of stringsrcSsg|]}t|��qSr)�repr)rZoptionrrr�
<listcomp>�sz&Extension.__init__.<locals>.<listcomp>z, zUnknown Extension options: %s)rr�AssertionError�list�all�name�sources�include_dirs�
define_macros�undef_macros�library_dirs�	libraries�runtime_library_dirs�
extra_objects�extra_compile_args�extra_link_args�export_symbols�	swig_opts�depends�language�optional�len�join�sorted�warnings�warn)�selfrrrrrrrrrrrrrrrr�kwZoptions�msgrrr�__init__Vs4













zExtension.__init__cCsd|jj|jj|jt|�fS)Nz<%s.%s(%r) at %#x>)�	__class__�
__module__�__qualname__r�id)r$rrr�__repr__�s
zExtension.__repr__)NNNNNNNNNNNNNN)�__name__r)r*�__doc__r'r,rrrrrs ?
!rcCs�ddlm}m}m}ddlm}ddlm}||�}||dddddd�}�zhg}�x\|j�}	|	dkrfP|j	|	�rrqT|	d|	d$ko�dknr�|j
d	|	�qT||	|�}	||	�}
|
d}t|g�}d}
�x�|
dd�D�]�}|
dk	r�|
j|�d}
q�t
jj|�d}|dd
�}|d
d�}|d%k�r8|jj|�q�|dk�rP|jj|�q�|dk�r�|jd�}|d&k�r�|jj|df�n$|jj|d|�||d
d�f�q�|dk�r�|jj|�q�|dk�r�|jj|�q�|dk�r�|jj|�q�|dk�r|jj|�q�|dk�r|jj|�q�|dk�r0|j}
q�|dk�rB|j}
q�|dk�rT|j}
q�|dk�rx|jj|�|�s�|j}
q�|d'k�r�|jj|�q�|j
d#|�q�W|j|�qTWWd|j�X|S)(z3Reads a Setup file and returns Extension instances.r)�parse_makefile�expand_makefile_vars�_variable_rx)�TextFile)�split_quoted�)Zstrip_commentsZskip_blanksZ
join_linesZ	lstrip_wsZ	rstrip_wsN�*z'%s' lines not handled yet��.c�.cc�.cpp�.cxx�.c++�.m�.mmz-Iz-D�=z-Uz-Cz-lz-Lz-Rz-rpathz-Xlinkerz
-Xcompilerz-u�.a�.so�.sl�.o�.dylibzunrecognized argument '%s'���)r7r8r9r:r;r<r=rD)r?r@rArBrC)Zdistutils.sysconfigr/r0r1Zdistutils.text_filer2Zdistutils.utilr3�readline�matchr#r�append�os�path�splitextrr�findrrrrrrrr�close)�filenamer/r0r1r2r3�vars�file�
extensions�lineZwords�moduleZextZappend_next_wordZword�suffixZswitch�valueZequalsrrr�read_setup_file�s�

 


















rU)r.rHr"rrUrrrr�<module>szPKV[u>�UaUa%__pycache__/dist.cpython-36.opt-2.pycnu�[���3


 \��@s�ddlZddlZddlZddlmZyddlZWnek
rHdZYnXddlTddlm	Z	m
Z
ddlmZm
Z
mZddlmZddlmZejd�ZGd	d
�d
�ZGdd�d�Zd
d�ZdS)�N)�message_from_file)�*)�FancyGetopt�translate_longopt)�
check_environ�	strtobool�
rfc822_escape)�log)�DEBUGz^[a-zA-Z]([a-zA-Z0-9_]*)$c@sleZdZd}d~dd�d�gZdZd�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�gZd=d>�eD�ZddiZd�d?d@�ZdAdB�Z	d�dDdE�Z
dFdG�Zd�dHdI�ZdJdK�Z
dLdM�ZdNdO�ZdPdQ�ZddgfdRdS�ZdTdU�ZdVdW�ZdXdY�ZdZd[�Zd\d]�Zd^d_�Zd�d`da�Zd�dbdc�Zd�dedf�Zejfdgdh�Zdidj�Zdkdl�Zdmdn�Z dodp�Z!dqdr�Z"dsdt�Z#dudv�Z$dwdx�Z%dydz�Z&d{d|�Z'dS)��Distribution�verbose�v�run verbosely (default)��quiet�q�!run quietly (turns verbosity off)�dry-run�n�don't actually do anything�help�h�show detailed help message�no-user-cfgN�-ignore pydistutils.cfg in your home directoryz�Common commands: (see '--help-commands' for more)

  setup.py build      will build the package underneath 'build/'
  setup.py install    will install the package
�
help-commands�list all available commands�name�print package name�version�V�print package version�fullname�print <package name>-<version>�author�print the author's name�author-email� print the author's email address�
maintainer�print the maintainer's name�maintainer-email�$print the maintainer's email address�contact�7print the maintainer's name if known, else the author's�
contact-email�@print the maintainer's email address if known, else the author's�url�print the URL for this package�license� print the license of the package�licence�alias for --license�description�print the package description�long-description�"print the long package description�	platforms�print the list of platforms�classifiers�print the list of classifiers�keywords�print the list of keywords�provides�+print the list of packages/modules provided�requires�+print the list of packages/modules required�	obsoletes�0print the list of packages/modules made obsoletecCsg|]}t|d��qS)r)r)�.0�x�rH�&/usr/lib64/python3.6/distutils/dist.py�
<listcomp>sszDistribution.<listcomp>cCs�d|_d|_d|_x|jD]}t||d�qWt�|_x,|jjD] }d|}t||t|j|��q@Wi|_	d|_
d|_d|_i|_
g|_d|_i|_d|_d|_d|_d|_d|_d|_d|_d|_d|_d|_d|_i|_i|_|�r8|jd�}|dk	�rH|d=xD|j�D]8\}}|j |�}x"|j�D]\}	}
d|
f||	<�q(W�qWd|k�r�|d|d<|d=d	}t!dk	�r~t!j"|�nt#j$j%|d
�x�|j�D]�\}}
t&|jd|��r�t|jd|�|
�njt&|j|��r�t|j||
�nLt&||��rt|||
�n2dt'|�}t!dk	�r"t!j"|�nt#j$j%|d
��q�Wd
|_(|jdk	�r|x0|jD]&}
|
j)d��sdP|
dk�rRd|_(P�qRW|j*�dS)Nrr�get_��optionszsetup scriptr4r2z:'licence' distribution option is deprecated; use 'license'�
Zset_zUnknown distribution option: %sT�-z
--no-user-cfgF)+r�dry_runr�display_option_names�setattr�DistributionMetadata�metadata�_METHOD_BASENAMES�getattr�cmdclass�command_packages�script_name�script_args�command_optionsZ
dist_files�packagesZpackage_dataZpackage_dir�
py_modules�	libraries�headers�ext_modulesZext_packageZinclude_dirsZ
extra_path�scripts�
data_filesZpassword�command_obj�have_run�get�items�get_option_dict�warnings�warn�sys�stderr�write�hasattr�repr�
want_user_cfg�
startswith�finalize_options)�selfZattrs�attr�basenameZmethod_namerM�commandZcmd_options�opt_dict�opt�val�msg�key�argrHrHrI�__init__zs�






zDistribution.__init__cCs&|jj|�}|dkr"i}|j|<|S)N)r[re)rrru�dictrHrHrIrgszDistribution.get_option_dictrLc	Cs�ddlm}|dkr"t|jj��}|dk	r@|j||�|d}|sV|j|d�dSxt|D]l}|jj|�}|dkr�|j|d|�q\|j|d|�||�}x$|jd�D]}|j|d|�q�Wq\WdS)Nr)�pformatz  zno commands known yetzno option dict for '%s' commandzoption dict for '%s' command:rN)�pprintr~�sortedr[�keys�announcere�split)	rr�header�commands�indentr~Zcmd_namerv�out�linerHrHrI�dump_option_dicts&s&
zDistribution.dump_option_dictscCs�g}t�tjjtjdj�}tjj|d�}tjj|�rB|j	|�tj
dkrRd}nd}|jr�tjjtjjd�|�}tjj|�r�|j	|�d}tjj|�r�|j	|�t
r�|jdd	j|��|S)
N�	distutilsz
distutils.cfg�posixz.pydistutils.cfgzpydistutils.cfg�~z	setup.cfgzusing config files: %sz, )r�os�path�dirnamerj�modules�__file__�join�isfile�appendrro�
expanduserr
r�)rr�filesZsys_dirZsys_fileZ
user_filenameZ	user_fileZ
local_filerHrHrI�find_config_filesBs&



zDistribution.find_config_filescCs�ddlm}tjtjkr8ddddddd	d
ddd
ddg
}ng}t|�}|dkrT|j�}trb|jd�|�}x�|D]�}tr�|jd|�|j	|�xf|j
�D]Z}|j|�}|j|�}x@|D]8}	|	dkr�|	|kr�|j
||	�}
|	jdd�}	||
f||	<q�Wq�W|j�qnWd|jk�r�x�|jdj�D]�\}	\}}
|jj
|	�}yF|�rRt||t|
��n(|	dk�rnt||	t|
��nt||	|
�Wn,tk
�r�}
zt|
��WYdd}
~
XnX�qWdS)Nr)�ConfigParserzinstall-basezinstall-platbasezinstall-libzinstall-platlibzinstall-purelibzinstall-headerszinstall-scriptszinstall-data�prefixzexec-prefix�home�user�rootz"Distribution.parse_config_files():z  reading %s�__name__rO�_�globalrrP)rrP)Zconfigparserr�rjr��base_prefix�	frozensetr�r
r��readZsectionsrMrgre�replacer|r[rf�negative_optrRr�
ValueError�DistutilsOptionError)rr�	filenamesr�Zignore_options�parser�filenameZsectionrMrvrwrx�src�aliasryrHrHrI�parse_config_filesrsJ






zDistribution.parse_config_filescCs�|j�}g|_t||j�}|j|j�|jddi�|j|j|d�}|j	�}t
j|j�|j
|�rhdSx |r�|j||�}|dkrjdSqjW|jr�|j|t|j�dk|jd�dS|js�td��dS)Nr4r2)�args�objectr)�display_optionsr�zno commands suppliedT)�_get_toplevel_optionsr�rr��set_negative_aliasesr�Zset_aliases�getoptrZZget_option_orderr	Z
set_verbosityr�handle_display_options�_parse_command_optsr�
_show_help�len�DistutilsArgError)rrZtoplevel_optionsr�r��option_orderrHrHrI�parse_command_line�s,	

zDistribution.parse_command_linecCs|jdgS)N�command-packages=�0list of packages that provide distutils commands)r�Nr�)�global_options)rrrHrHrIr��sz"Distribution._get_toplevel_optionscCsddlm}|d}tj|�s*td|��|jj|�y|j|�}Wn*tk
rn}zt	|��WYdd}~XnXt
||�s�td|��t|d�o�t
|jt�s�d}t||��|j}t|d�r�|j�}|j|j�t|d�r�t
|jt�r�t|j�}ng}|j|j|j|�|j|�|j|d	d��\}}	t|	d
��rV|	j�rV|j|d|gd�dSt|d��r�t
|jt��r�d}
xP|jD]F\}}}
}t|	|j|���r|d	}
t|��r�|�ntd||f���q|W|
�r�dS|j|�}x&t|	�j�D]\}}d
|f||<�q�W|S)Nr)�Commandzinvalid command name '%s'z&command class %s must subclass Command�user_optionszIcommand class %s must provide 'user_options' attribute (a list of tuples)r��help_optionsrr)r�r�zYinvalid help function %r for help option '%s': must be a callable object (function, etc.)zcommand line) �
distutils.cmdr��
command_re�match�
SystemExitr�r��get_command_class�DistutilsModuleErrorr��
issubclassZDistutilsClassErrorrm�
isinstancer��listr��copy�updater��fix_help_options�set_option_tabler�r�r�rr�Z
get_attr_name�callablerg�varsrf)rrr�r�r�ruZ	cmd_classryr�r�ZoptsZhelp_option_foundZhelp_optionZshortZdesc�funcrvr�valuerHrHrIr��sb










z Distribution._parse_command_optscCsTxNdD]F}t|j|�}|dkr qt|t�rdd�|jd�D�}t|j||�qWdS)Nr>r:cSsg|]}|j��qSrH)�strip)rFZelmrHrHrIrJ_sz1Distribution.finalize_options.<locals>.<listcomp>�,)r>r:)rVrTr��strr�rR)rrrsr�rHrHrIrqUs

zDistribution.finalize_optionsc
Csddlm}ddlm}|rR|r*|j�}n|j}|j|�|j|jd�t	d�|rt|j|j
�|jd
�t	d�x�|jD]z}t|t
�r�t||�r�|}	n
|j|�}	t|	d�r�t|	jt�r�|j|	jt|	j��n|j|	j�|jd	|	j�t	d�q|Wt	||j��dS)Nr)�	gen_usage)r�z
Global options:rLz*Information display options (just display z!information, ignore any commands)r�zOptions for '%s' command:zKInformation display options (just display information, ignore any commands))�distutils.corer�r�r�r�r�r�Z
print_help�common_usage�printr�r�r��typer�r�rmr�r�r�r�r�rY)
rrr�r�r�r�r�r�rMru�klassrHrHrIr�bs6



zDistribution._show_helpc	Cs�ddlm}|jr4|j�td�t||j��dSd}i}x|jD]}d||d<qDWxt|D]l\}}|r^|j|�r^t|�}t	|j
d|��}|dkr�tdj|��n |dkr�td
j|��nt|�d}q^W|S)Nr)r�rLrrKr>r:r�r<r@rBrDrN)r>r:)r<r@rBrD)r�r�Z
help_commands�print_commandsr�rYr�rerrVrTr�)	rrr�r�Zany_display_optionsZis_display_option�optionrwrxr�rHrHrIr��s,z#Distribution.handle_display_optionscCsnt|d�x\|D]T}|jj|�}|s0|j|�}y
|j}Wntk
rRd}YnXtd|||f�qWdS)N�:z(no description available)z
  %-*s  %s)r�rWrer�r6�AttributeError)rrr�r��
max_length�cmdr�r6rHrHrI�print_command_list�s



zDistribution.print_command_listcCs�ddl}|jj}i}x|D]}d||<qWg}x&|jj�D]}|j|�s:|j|�q:Wd}x$||D]}t|�|krdt|�}qdW|j|d|�|r�t	�|j|d|�dS)NrrzStandard commandszExtra commands)
�distutils.commandru�__all__rWr�rer�r�r�r�)rrr��std_commands�is_stdr��extra_commandsr�rHrHrIr��s*

zDistribution.print_commandsc	Cs�ddl}|jj}i}x|D]}d||<qWg}x&|jj�D]}|j|�s:|j|�q:Wg}x\||D]P}|jj|�}|s�|j|�}y
|j}Wnt	k
r�d}YnX|j||f�qdW|S)Nrrz(no description available))
r�rur�rWr�rer�r�r6r�)	rrr�r�r�r�r��rvr�r6rHrHrI�get_command_list�s(	




zDistribution.get_command_listcCsN|j}t|t�sJ|dkrd}dd�|jd�D�}d|krD|jdd�||_|S)NrLcSsg|]}|dkr|j��qS)rL)r�)rFZpkgrHrHrIrJsz5Distribution.get_command_packages.<locals>.<listcomp>r�zdistutils.commandr)rXr�r�r��insert)rrZpkgsrHrHrI�get_command_packagess
z!Distribution.get_command_packagescCs�|jj|�}|r|Sx�|j�D]�}d||f}|}yt|�tj|}Wntk
r^wYnXyt||�}Wn&tk
r�t	d|||f��YnX||j|<|SWt	d|��dS)Nz%s.%sz3invalid command '%s' (no class '%s' in module '%s')zinvalid command '%s')
rWrer��
__import__rjr��ImportErrorrVr�r�)rrrur�ZpkgnameZmodule_nameZ
klass_name�modulerHrHrIr�s(
zDistribution.get_command_classcCsn|jj|�}|rj|rjtr(|jd|�|j|�}||�}|j|<d|j|<|jj|�}|rj|j||�|S)Nz<Distribution.get_command_obj(): creating '%s' command objectr)rcrer
r�r�rdr[�_set_command_options)rrruZcreate�cmd_objr�rMrHrHrI�get_command_objBs


zDistribution.get_command_objc!Csb|j�}|dkr|j|�}tr,|jd|��x.|j�D�] \}\}}tr^|jd|||f�ydd�|jD�}Wntk
r�g}YnXy
|j}Wntk
r�i}YnXy|t|t	�}	||kr�|	r�t
|||t|��nJ||kr�|	r�t
||t|��n,t||��rt
|||�nt
d|||f��Wq8tk
�rX}
zt
|
��WYdd}
~
Xq8Xq8WdS)Nz#  setting options for '%s' command:z    %s = %s (from %s)cSsg|]}t|��qSrH)r)rF�orHrHrIrJqsz5Distribution._set_command_options.<locals>.<listcomp>z1error in %s: command '%s' has no such option '%s')�get_command_namergr
r�rfZboolean_optionsr�r�r�r�rRrrmr�r�)rrrcZoption_dict�command_namer��sourcer�Z	bool_optsZneg_optZ	is_stringryrHrHrIr�]s>	






z!Distribution._set_command_optionsrcCs�ddlm}t||�s&|}|j|�}n|j�}|js8|S|j�d|_d|j|<|j|�|r|x|j	�D]}|j
||�qhW|S)Nr)r�)r�r�r�r�r�Z	finalizedZinitialize_optionsrdr�Zget_sub_commands�reinitialize_command)rrruZreinit_subcommandsr�r��subrHrHrIr��s


z!Distribution.reinitialize_commandcCstj||�dS)N)r	)rrry�levelrHrHrIr��szDistribution.announcecCsx|jD]}|j|�qWdS)N)r��run_command)rrr�rHrHrI�run_commands�szDistribution.run_commandscCsD|jj|�rdStjd|�|j|�}|j�|j�d|j|<dS)Nz
running %sr)rdrer	�infor�Zensure_finalizedZrun)rrrur�rHrHrIr��s	
zDistribution.run_commandcCst|jp|jpg�dkS)Nr)r�r\r])rrrHrHrI�has_pure_modules�szDistribution.has_pure_modulescCs|jot|j�dkS)Nr)r`r�)rrrHrHrI�has_ext_modules�szDistribution.has_ext_modulescCs|jot|j�dkS)Nr)r^r�)rrrHrHrI�has_c_libraries�szDistribution.has_c_librariescCs|j�p|j�S)N)r�r�)rrrHrHrI�has_modules�szDistribution.has_modulescCs|jot|j�dkS)Nr)r_r�)rrrHrHrI�has_headers�szDistribution.has_headerscCs|jot|j�dkS)Nr)rar�)rrrHrHrI�has_scripts�szDistribution.has_scriptscCs|jot|j�dkS)Nr)rbr�)rrrHrHrI�has_data_files�szDistribution.has_data_filescCs|j�o|j�o|j�S)N)r�r�r�)rrrHrHrI�is_pure�s
zDistribution.is_pure)rr
rr)rrr)rrr)rrr)rNr)rNr)rNr)rr r!)r"Nr#)r$Nr%)r&Nr')r(Nr))r*Nr+)r,Nr-)r.Nr/)r0Nr1)r2Nr3)r4Nr5)r6Nr7)r8Nr9)r:Nr;)r<Nr=)r>Nr?)r@NrA)rBNrC)rDNrE)N)NNrL)N)r)N)r)(r��
__module__�__qualname__r�r�r�rQr�r|rgr�r�r�r�r�r�rqr�r�r�r�r�r�r�r�r�r�r	�INFOr�r�r�r�r�r�r�r�r�rrrHrHrHrIrs�

"
0
:C[
1(!"&

,
)
rc@s�eZdZdNZdOdd�Zdd�Zdd�Zdd�Zdd�Zd d!�Z	d"d#�Z
d$d%�Zd&d'�Zd(d)�Z
d*d+�Zd,d-�Zd.d/�Zd0d1�Zd2d3�Zd4d5�ZeZd6d7�Zd8d9�Zd:d;�Zd<d=�Zd>d?�Zd@dA�ZdBdC�ZdDdE�ZdFdG�ZdHdI�ZdJdK�ZdLdM�Z dS)PrSrrr$�author_emailr(�maintainer_emailr0r2r6�long_descriptionr>r:r"r,�
contact_emailr<�download_urlr@rBrDNcCs�|dk	r|jt|��nfd|_d|_d|_d|_d|_d|_d|_d|_	d|_
d|_d|_d|_
d|_d|_d|_d|_d|_dS)N)�
read_pkg_file�openrrr$rr(rr0r2r6rr>r:r<r	r@rBrD)rrr�rHrHrIr|s&zDistributionMetadata.__init__cst|���fdd�}�fdd�}�d}|d�|_|d�|_|d�|_|d	�|_d|_|d
�|_d|_|d�|_|d�|_	d
�kr�|d
�|_
nd|_
|d�|_|d�|_d�kr�|d�jd�|_
|d�|_|d�|_|dkr�|d�|_|d�|_|d�|_nd|_d|_d|_dS)Ncs�|}|dkrdS|S)N�UNKNOWNrH)rr�)ryrHrI�_read_fieldsz7DistributionMetadata.read_pkg_file.<locals>._read_fieldcs�j|d�}|gkrdS|S)N)Zget_all)r�values)ryrHrI�
_read_list#sz6DistributionMetadata.read_pkg_file.<locals>._read_listzmetadata-versionrrZsummaryr$zauthor-emailz	home-pager2zdownload-urlr6r>r��platformZ
classifierz1.1rBr@rD)rrrr6r$r(rrr0r2r	rr�r>r:r<rBr@rD)rr�filer
rZmetadata_versionrH)ryrIr
s:












z"DistributionMetadata.read_pkg_filec	Cs2ttjj|d�ddd��}|j|�WdQRXdS)NzPKG-INFO�wzUTF-8)�encoding)rr�r�r��write_pkg_file)rrZbase_dirZpkg_inforHrHrI�write_pkg_infoMs
z#DistributionMetadata.write_pkg_infocCsbd}|js"|js"|js"|js"|jr&d}|jd|�|jd|j��|jd|j��|jd|j��|jd|j	��|jd|j
��|jd	|j��|jd
|j��|jr�|jd|j�t
|j��}|jd|�d
j|j��}|�r|jd|�|j|d|j��|j|d|j��|j|d|j��|j|d|j��|j|d|j��dS)Nz1.0z1.1zMetadata-Version: %s
z	Name: %s
zVersion: %s
zSummary: %s
zHome-page: %s
zAuthor: %s
zAuthor-email: %s
zLicense: %s
zDownload-URL: %s
zDescription: %s
r�z
Keywords: %s
ZPlatformZ
ClassifierZRequiresZProvidesZ	Obsoletes)r@rBrDr<r	rl�get_name�get_version�get_description�get_url�get_contact�get_contact_email�get_licenser�get_long_descriptionr��get_keywords�_write_list�
get_platforms�get_classifiers�get_requires�get_provides�
get_obsoletes)rrrrZ	long_descr>rHrHrIrTs0z#DistributionMetadata.write_pkg_filecCs$x|D]}|jd||f�qWdS)Nz%s: %s
)rl)rrrrrr�rHrHrIrvs
z DistributionMetadata._write_listcCs
|jpdS)Nr)r)rrrHrHrIr|szDistributionMetadata.get_namecCs
|jpdS)Nz0.0.0)r)rrrHrHrIrsz DistributionMetadata.get_versioncCsd|j�|j�fS)Nz%s-%s)rr)rrrHrHrI�get_fullname�sz!DistributionMetadata.get_fullnamecCs
|jpdS)Nr)r$)rrrHrHrI�
get_author�szDistributionMetadata.get_authorcCs
|jpdS)Nr)r)rrrHrHrI�get_author_email�sz%DistributionMetadata.get_author_emailcCs
|jpdS)Nr)r()rrrHrHrI�get_maintainer�sz#DistributionMetadata.get_maintainercCs
|jpdS)Nr)r)rrrHrHrI�get_maintainer_email�sz)DistributionMetadata.get_maintainer_emailcCs|jp|jpdS)Nr)r(r$)rrrHrHrIr�sz DistributionMetadata.get_contactcCs|jp|jpdS)Nr)rr)rrrHrHrIr�sz&DistributionMetadata.get_contact_emailcCs
|jpdS)Nr)r0)rrrHrHrIr�szDistributionMetadata.get_urlcCs
|jpdS)Nr)r2)rrrHrHrIr�sz DistributionMetadata.get_licensecCs
|jpdS)Nr)r6)rrrHrHrIr�sz$DistributionMetadata.get_descriptioncCs
|jpdS)Nr)r)rrrHrHrIr�sz)DistributionMetadata.get_long_descriptioncCs
|jpgS)N)r>)rrrHrHrIr�sz!DistributionMetadata.get_keywordscCs|jp
dgS)Nr)r:)rrrHrHrIr �sz"DistributionMetadata.get_platformscCs
|jpgS)N)r<)rrrHrHrIr!�sz$DistributionMetadata.get_classifierscCs
|jpdS)Nr)r	)rrrHrHrI�get_download_url�sz%DistributionMetadata.get_download_urlcCs
|jpgS)N)rB)rrrHrHrIr"�sz!DistributionMetadata.get_requirescCs,ddl}x|D]}|jj|�qW||_dS)Nr)�distutils.versionpredicate�versionpredicate�VersionPredicaterB)rrr�r�r
rHrHrI�set_requires�s
z!DistributionMetadata.set_requirescCs
|jpgS)N)r@)rrrHrHrIr#�sz!DistributionMetadata.get_providescCs:dd�|D�}x |D]}ddl}|jj|�qW||_dS)NcSsg|]}|j��qSrH)r�)rFr
rHrHrIrJ�sz5DistributionMetadata.set_provides.<locals>.<listcomp>r)r+r,Zsplit_provisionr@)rrr�r
r�rHrHrI�set_provides�s

z!DistributionMetadata.set_providescCs
|jpgS)N)rD)rrrHrHrIr$�sz"DistributionMetadata.get_obsoletescCs,ddl}x|D]}|jj|�qW||_dS)Nr)r+r,r-rD)rrr�r�r
rHrHrI�
set_obsoletes�s
z"DistributionMetadata.set_obsoletes)rrr$rr(rr0r2r6rr>r:r"r,rr<r	r@rBrD)N)!r�rrrUr|r
rrrrrr%r&r'r(r)rrrrZget_licencerrrr r!r*r"r.r#r/r$r0rHrHrHrIrS�sF
4"rScCs(g}x|D]}|j|dd��q
W|S)Nr�)r�)rMZnew_optionsZ
help_tuplerHrHrIr��s
r�)rjr��reZemailrrhr�Zdistutils.errorsZdistutils.fancy_getoptrrZdistutils.utilrrrr�r	Zdistutils.debugr
�compiler�rrSr�rHrHrHrI�<module>s0

]ZPKV[��B��:�:$__pycache__/cmd.cpython-36.opt-1.pycnu�[���3


 \�J�@srdZddlZddlZddlZddlmZddlmZmZm	Z	m
Z
mZddlmZGdd�d�Z
Gdd	�d	e
�ZdS)
ztdistutils.cmd

Provides the Command class, the base class for the command classes
in the distutils.command package.
�N)�DistutilsOptionError)�util�dir_util�	file_util�archive_util�dep_util)�logc@s"eZdZdZgZdd�Zdd�Zdd�Zdd	�Zd
d�Z	dCdd�Z
dd�ZdDdd�Zdd�Z
dEdd�ZdFdd�Zdd�ZdGdd�Zdd �Zd!d"�Zd#d$�Zd%d&�ZdHd'd(�ZdId*d+�Zd,d-�Zd.d/�Zd0d1�ZdJd2d3�ZdKd5d6�ZdLd7d8�ZdMd9d:�ZdNd;d<�ZdOd=d>�Z dPd?d@�Z!dQdAdB�Z"dS)R�Commanda}Abstract base class for defining command classes, the "worker bees"
    of the Distutils.  A useful analogy for command classes is to think of
    them as subroutines with local variables called "options".  The options
    are "declared" in 'initialize_options()' and "defined" (given their
    final values, aka "finalized") in 'finalize_options()', both of which
    must be defined by every command class.  The distinction between the
    two is necessary because option values might come from the outside
    world (command line, config file, ...), and any options dependent on
    other options must be computed *after* these outside influences have
    been processed -- hence 'finalize_options()'.  The "body" of the
    subroutine, where it does all its work based on the values of its
    options, is the 'run()' method, which must also be implemented by every
    command class.
    cCsbddlm}t||�std��|jtkr0td��||_|j�d|_	|j
|_
d|_d|_d|_
dS)z�Create and initialize a new Command object.  Most importantly,
        invokes the 'initialize_options()' method, which is the real
        initializer and depends on the actual command being
        instantiated.
        r)�Distributionz$dist must be a Distribution instancezCommand is an abstract classN)Zdistutils.distr
�
isinstance�	TypeError�	__class__r	�RuntimeError�distribution�initialize_optionsZ_dry_run�verbose�force�help�	finalized)�selfZdistr
�r�%/usr/lib64/python3.6/distutils/cmd.py�__init__/s


zCommand.__init__cCs<|dkr0t|d|�}|dkr*t|j|�S|Snt|��dS)N�dry_run�_)�getattrr�AttributeError)r�attrZmyvalrrr�__getattr___szCommand.__getattr__cCs|js|j�d|_dS)N�)r�finalize_options)rrrr�ensure_finalizediszCommand.ensure_finalizedcCstd|j��dS)a�Set default values for all the options that this command
        supports.  Note that these defaults may be overridden by other
        commands, by the setup script, by config files, or by the
        command-line.  Thus, this is not the place to code dependencies
        between options; generally, 'initialize_options()' implementations
        are just a bunch of "self.foo = None" assignments.

        This method must be implemented by all command classes.
        z,abstract method -- subclass %s must overrideN)rr
)rrrrr{s
zCommand.initialize_optionscCstd|j��dS)aSet final values for all the options that this command supports.
        This is always called as late as possible, ie.  after any option
        assignments from the command-line or from other commands have been
        done.  Thus, this is the place to code option dependencies: if
        'foo' depends on 'bar', then it is safe to set 'foo' from 'bar' as
        long as 'foo' still has the same value it was assigned in
        'initialize_options()'.

        This method must be implemented by all command classes.
        z,abstract method -- subclass %s must overrideN)rr
)rrrrr �szCommand.finalize_optionsN�cCs�ddlm}|dkr d|j�}|j||tjd�|d}x\|jD]R\}}}|j|�}|d	dkrp|dd
�}t||�}|j|d||ftjd�qDWdS)Nr)�
longopt_xlatezcommand options for '%s':)�levelz  r�=z%s = %s���r&)	Zdistutils.fancy_getoptr#�get_command_name�announcer�INFO�user_options�	translater)r�header�indentr#�optionr�valuerrr�dump_options�s

zCommand.dump_optionscCstd|j��dS)a�A command's raison d'etre: carry out the action it exists to
        perform, controlled by the options initialized in
        'initialize_options()', customized by other commands, the setup
        script, the command-line, and config files, and finalized in
        'finalize_options()'.  All terminal output and filesystem
        interaction should be done by 'run()'.

        This method must be implemented by all command classes.
        z,abstract method -- subclass %s must overrideN)rr
)rrrr�run�s
zCommand.runrcCstj||�dS)zmIf the current verbosity level is of greater than or equal to
        'level' print 'msg' to stdout.
        N)r)r�msgr$rrrr(�szCommand.announcecCs&ddlm}|r"t|�tjj�dS)z~Print 'msg' to stdout if the global DEBUG (taken from the
        DISTUTILS_DEBUG environment variable) flag is true.
        r)�DEBUGN)Zdistutils.debugr3�print�sys�stdout�flush)rr2r3rrr�debug_print�szCommand.debug_printcCsBt||�}|dkr"t|||�|St|t�s>td|||f��|S)Nz'%s' must be a %s (got `%s`))r�setattrr�strr)rr.�what�default�valrrr�_ensure_stringlike�s

zCommand._ensure_stringlikecCs|j|d|�dS)zWEnsure that 'option' is a string; if not defined, set it to
        'default'.
        �stringN)r>)rr.r<rrr�
ensure_string�szCommand.ensure_stringcCspt||�}|dkrdSt|t�r6t||tjd|��n6t|t�rTtdd�|D��}nd}|sltd||f��dS)z�Ensure that 'option' is a list of strings.  If 'option' is
        currently a string, we split it either on /,\s*/ or /\s+/, so
        "foo bar baz", "foo,bar,baz", and "foo,   bar baz" all become
        ["foo", "bar", "baz"].
        Nz,\s*|\s+css|]}t|t�VqdS)N)rr:)�.0�vrrr�	<genexpr>�sz-Command.ensure_string_list.<locals>.<genexpr>Fz''%s' must be a list of strings (got %r))	rrr:r9�re�split�list�allr)rr.r=�okrrr�ensure_string_list�s


zCommand.ensure_string_listcCs8|j|||�}|dk	r4||�r4td|||f��dS)Nzerror in '%s' option: )r>r)rr.Ztesterr;Z	error_fmtr<r=rrr�_ensure_tested_string�szCommand._ensure_tested_stringcCs|j|tjjdd�dS)z5Ensure that 'option' is the name of an existing file.�filenamez$'%s' does not exist or is not a fileN)rJ�os�path�isfile)rr.rrr�ensure_filename�szCommand.ensure_filenamecCs|j|tjjdd�dS)Nzdirectory namez)'%s' does not exist or is not a directory)rJrLrM�isdir)rr.rrr�ensure_dirnameszCommand.ensure_dirnamecCst|d�r|jS|jjSdS)N�command_name)�hasattrrRr
�__name__)rrrrr'	s
zCommand.get_command_namecGsJ|jj|�}|j�x0|D](\}}t||�dkrt||t||��qWdS)a>Set the values of any "undefined" options from corresponding
        option values in some other command object.  "Undefined" here means
        "is None", which is the convention used to indicate that an option
        has not been changed between 'initialize_options()' and
        'finalize_options()'.  Usually called from 'finalize_options()' for
        options that depend on some other command rather than another
        option of the same command.  'src_cmd' is the other command from
        which option values will be taken (a command object will be created
        for it if necessary); the remaining arguments are
        '(src_option,dst_option)' tuples which mean "take the value of
        'src_option' in the 'src_cmd' command object, and copy it to
        'dst_option' in the current command object".
        N)r�get_command_objr!rr9)rZsrc_cmdZoption_pairsZsrc_cmd_objZ
src_optionZ
dst_optionrrr�set_undefined_optionss
zCommand.set_undefined_optionscCs|jj||�}|j�|S)z�Wrapper around Distribution's 'get_command_obj()' method: find
        (create if necessary and 'create' is true) the command object for
        'command', call its 'ensure_finalized()' method, and return the
        finalized command object.
        )rrUr!)r�commandZcreateZcmd_objrrr�get_finalized_command$szCommand.get_finalized_commandrcCs|jj||�S)N)r�reinitialize_command)rrWZreinit_subcommandsrrrrY0szCommand.reinitialize_commandcCs|jj|�dS)z�Run some other command: uses the 'run_command()' method of
        Distribution, which creates and finalizes the command object if
        necessary and then invokes its 'run()' method.
        N)r�run_command)rrWrrrrZ4szCommand.run_commandcCs6g}x,|jD]"\}}|dks$||�r|j|�qW|S)akDetermine the sub-commands that are relevant in the current
        distribution (ie., that need to be run).  This is based on the
        'sub_commands' class attribute: each tuple in that list may include
        a method that we call to determine if the subcommand needs to be
        run for the current distribution.  Return a list of command names.
        N)�sub_commands�append)rZcommandsZcmd_name�methodrrr�get_sub_commands;s
zCommand.get_sub_commandscCstjd|j�|�dS)Nzwarning: %s: %s
)r�warnr')rr2rrrr_KszCommand.warncCstj||||jd�dS)N)r)r�executer)r�func�argsr2r$rrrr`NszCommand.execute�cCstj|||jd�dS)N)r)r�mkpathr)r�name�moderrrrdQszCommand.mkpathc	Cstj|||||j||jd�S)z�Copy a file respecting verbose, dry-run and force flags.  (The
        former two default to whatever is in the Distribution object, and
        the latter defaults to false for commands that don't define it.))r)r�	copy_filerr)r�infile�outfile�
preserve_mode�preserve_times�linkr$rrrrgTs

zCommand.copy_filec	Cstj||||||j|jd�S)z\Copy an entire directory tree respecting verbose, dry-run,
        and force flags.
        )r)r�	copy_treerr)rrhrirjrkZpreserve_symlinksr$rrrrm]s
zCommand.copy_treecCstj|||jd�S)z$Move a file respecting dry-run flag.)r)r�	move_filer)r�src�dstr$rrrrnfszCommand.move_filecCs ddlm}||||jd�dS)z2Spawn an external command respecting dry-run flag.r)�spawn)rN)Zdistutils.spawnrqr)r�cmdZsearch_pathr$rqrrrrqjsz
Command.spawnc	Cstj|||||j||d�S)N)r�owner�group)r�make_archiver)rZ	base_name�formatZroot_dirZbase_dirrsrtrrrruoszCommand.make_archivecCs�|dkrd|}t|t�r"|f}nt|ttf�s8td��|dkrRd|dj|�f}|jsdtj||�rv|j	||||�n
t
j|�dS)a�Special case of 'execute()' for operations that process one or
        more input files and generate one output file.  Works just like
        'execute()', except the operation is skipped and a different
        message printed if 'outfile' already exists and is newer than all
        files listed in 'infiles'.  If the command defined 'self.force',
        and it is true, then the command is unconditionally run -- does no
        timestamp checks.
        Nzskipping %s (inputs unchanged)z9'infiles' must be a string, or a list or tuple of stringszgenerating %s from %sz, )rr:rF�tupler�joinrrZnewer_groupr`r�debug)rZinfilesrirarbZexec_msgZskip_msgr$rrr�	make_fileus

zCommand.make_file)Nr")r)N)N)N)r)r)Nr)rc)rrNr)rrrr)r)rr)NNNN)NNr)#rT�
__module__�__qualname__�__doc__r[rrr!rr r0r1r(r8r>r@rIrJrOrQr'rVrXrYrZr^r_r`rdrgrmrnrqrurzrrrrr	sF0
















r	c@s6eZdZdZdgZdd�Zdd�Zd	d
�Zdd�Zd
S)�install_miscz{Common base class for installing some files in a subdirectory.
    Currently used by install_data and install_scripts.
    �install-dir=�d�!directory to install the files tocCsd|_g|_dS)N)�install_dir�outfiles)rrrrr�szinstall_misc.initialize_optionscCs|jd|df�dS)NZinstallr�)rV)r�dirnamerrr�_install_dir_from�szinstall_misc._install_dir_fromcCsRg|_|sdS|j|j�x2|D]*}|j||j�|jjtjj|j|��q WdS)N)r�rdr�rgr\rLrMrx)rZfilelist�frrr�_copy_files�s
zinstall_misc._copy_filescCs|jS)N)r�)rrrr�get_outputs�szinstall_misc.get_outputsN)rr�r�)	rTr{r|r}r*rr�r�r�rrrrr~�s	r~)r}r5rLrDZdistutils.errorsrZ	distutilsrrrrrrr	r~rrrr�<module>sPKV[W6�=��$__pycache__/log.cpython-36.opt-1.pycnu�[���3


 \��@sldZdZdZdZdZdZddlZGdd	�d	�Ze�Zej	Z	ej
Z
ejZejZej
Z
ejZd
d�Zdd
�ZdS)z,A simple log mechanism styled after PEP 282.������Nc@sPeZdZefdd�Zdd�Zdd�Zdd�Zd	d
�Zdd�Z	d
d�Z
dd�ZdS)�LogcCs
||_dS)N)�	threshold)�selfr�r
�%/usr/lib64/python3.6/distutils/log.py�__init__szLog.__init__cCs�|tttttfkr"tdt|���||jkr�|r8||}|tttfkrNtj	}ntj
}y|jd|�Wn:tk
r�|j
}|j|d�j|�}|jd|�YnX|j�dS)Nz%s wrong log levelz%s
�backslashreplace)�DEBUG�INFO�WARN�ERROR�FATAL�
ValueError�strr�sys�stderr�stdout�write�UnicodeEncodeError�encoding�encode�decode�flush)r	�level�msg�args�streamrr
r
r�_logs
zLog._logcGs|j|||�dS)N)r")r	rrr r
r
r�log'szLog.logcGs|jt||�dS)N)r"r)r	rr r
r
r�debug*sz	Log.debugcGs|jt||�dS)N)r"r)r	rr r
r
r�info-szLog.infocGs|jt||�dS)N)r"r)r	rr r
r
r�warn0szLog.warncGs|jt||�dS)N)r"r)r	rr r
r
r�error3sz	Log.errorcGs|jt||�dS)N)r"r)r	rr r
r
r�fatal6sz	Log.fatalN)�__name__�
__module__�__qualname__rrr"r#r$r%r&r'r(r
r
r
rrsrcCstj}|t_|S)N)�_global_logr)r�oldr
r
r�
set_thresholdAsr.cCs8|dkrtt�n"|dkr$tt�n|dkr4tt�dS)Nrrr)r.rrr)�vr
r
r�
set_verbosityGs

r0)�__doc__rrrrrrrr,r#r$r%r&r'r(r.r0r
r
r
r�<module>s +PKV[�͢����%__pycache__/dist.cpython-36.opt-1.pycnu�[���3


 \��@s�dZddlZddlZddlZddlmZyddlZWnek
rLdZYnXddlTddl	m
Z
mZddlm
Z
mZmZddlmZddlmZejd	�ZGd
d�d�ZGdd
�d
�Zdd�ZdS)z}distutils.dist

Provides the Distribution class, which represents the module distribution
being built/installed/distributed.
�N)�message_from_file)�*)�FancyGetopt�translate_longopt)�
check_environ�	strtobool�
rfc822_escape)�log)�DEBUGz^[a-zA-Z]([a-zA-Z0-9_]*)$c@speZdZdZd~dd�d�d�gZdZd�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�gZd>d?�eD�ZddiZd�d@dA�Z	dBdC�Z
d�dEdF�ZdGdH�Zd�dIdJ�Z
dKdL�ZdMdN�ZdOdP�ZdQdR�ZddgfdSdT�ZdUdV�ZdWdX�ZdYdZ�Zd[d\�Zd]d^�Zd_d`�Zd�dadb�Zd�dcdd�Zd�dfdg�Zejfdhdi�Zdjdk�Zdldm�Z dndo�Z!dpdq�Z"drds�Z#dtdu�Z$dvdw�Z%dxdy�Z&dzd{�Z'd|d}�Z(dS)��Distributiona�The core of the Distutils.  Most of the work hiding behind 'setup'
    is really done within a Distribution instance, which farms the work out
    to the Distutils commands specified on the command line.

    Setup scripts will almost never instantiate Distribution directly,
    unless the 'setup()' function is totally inadequate to their needs.
    However, it is conceivable that a setup script might wish to subclass
    Distribution for some specialized purpose, and then pass the subclass
    to 'setup()' as the 'distclass' keyword argument.  If so, it is
    necessary to respect the expectations that 'setup' has of Distribution.
    See the code for 'setup()', in core.py, for details.
    �verbose�v�run verbosely (default)��quiet�q�!run quietly (turns verbosity off)�dry-run�n�don't actually do anything�help�h�show detailed help message�no-user-cfgN�-ignore pydistutils.cfg in your home directoryz�Common commands: (see '--help-commands' for more)

  setup.py build      will build the package underneath 'build/'
  setup.py install    will install the package
�
help-commands�list all available commands�name�print package name�version�V�print package version�fullname�print <package name>-<version>�author�print the author's name�author-email� print the author's email address�
maintainer�print the maintainer's name�maintainer-email�$print the maintainer's email address�contact�7print the maintainer's name if known, else the author's�
contact-email�@print the maintainer's email address if known, else the author's�url�print the URL for this package�license� print the license of the package�licence�alias for --license�description�print the package description�long-description�"print the long package description�	platforms�print the list of platforms�classifiers�print the list of classifiers�keywords�print the list of keywords�provides�+print the list of packages/modules provided�requires�+print the list of packages/modules required�	obsoletes�0print the list of packages/modules made obsoletecCsg|]}t|d��qS)r)r)�.0�x�rH�&/usr/lib64/python3.6/distutils/dist.py�
<listcomp>sszDistribution.<listcomp>cCs�d|_d|_d|_x|jD]}t||d�qWt�|_x,|jjD] }d|}t||t|j|��q@Wi|_	d|_
d|_d|_i|_
g|_d|_i|_d|_d|_d|_d|_d|_d|_d|_d|_d|_d|_d|_i|_i|_|�r8|jd�}|dk	�rH|d=xD|j�D]8\}}|j |�}x"|j�D]\}	}
d|
f||	<�q(W�qWd|k�r�|d|d	<|d=d
}t!dk	�r~t!j"|�nt#j$j%|d�x�|j�D]�\}}
t&|jd|��r�t|jd|�|
�njt&|j|��r�t|j||
�nLt&||��rt|||
�n2d
t'|�}t!dk	�r"t!j"|�nt#j$j%|d��q�Wd|_(|jdk	�r|x0|jD]&}
|
j)d��sdP|
dk�rRd|_(P�qRW|j*�dS)a0Construct a new Distribution instance: initialize all the
        attributes of a Distribution, and then use 'attrs' (a dictionary
        mapping attribute names to values) to assign some of those
        attributes their "real" values.  (Any attributes not mentioned in
        'attrs' will be assigned to some null value: 0, None, an empty list
        or dictionary, etc.)  Most importantly, initialize the
        'command_obj' attribute to the empty dictionary; this will be
        filled in with real command objects by 'parse_command_line()'.
        rr�get_N��optionszsetup scriptr4r2z:'licence' distribution option is deprecated; use 'license'�
Zset_zUnknown distribution option: %sT�-z
--no-user-cfgF)+r�dry_runr�display_option_names�setattr�DistributionMetadata�metadata�_METHOD_BASENAMES�getattr�cmdclass�command_packages�script_name�script_args�command_optionsZ
dist_files�packagesZpackage_dataZpackage_dir�
py_modules�	libraries�headers�ext_modulesZext_packageZinclude_dirsZ
extra_path�scripts�
data_filesZpassword�command_obj�have_run�get�items�get_option_dict�warnings�warn�sys�stderr�write�hasattr�repr�
want_user_cfg�
startswith�finalize_options)�selfZattrs�attr�basenameZmethod_namerM�commandZcmd_options�opt_dict�opt�val�msg�key�argrHrHrI�__init__zs�






zDistribution.__init__cCs&|jj|�}|dkr"i}|j|<|S)z�Get the option dictionary for a given command.  If that
        command's option dictionary hasn't been created yet, then create it
        and return the new dictionary; otherwise, return the existing
        option dictionary.
        N)r[re)rrru�dictrHrHrIrgszDistribution.get_option_dictrLc	Cs�ddlm}|dkr"t|jj��}|dk	r@|j||�|d}|sV|j|d�dSxt|D]l}|jj|�}|dkr�|j|d|�q\|j|d|�||�}x$|jd�D]}|j|d|�q�Wq\WdS)Nr)�pformatz  zno commands known yetzno option dict for '%s' commandzoption dict for '%s' command:rN)�pprintr~�sortedr[�keys�announcere�split)	rr�header�commands�indentr~Zcmd_namerv�out�linerHrHrI�dump_option_dicts&s&
zDistribution.dump_option_dictscCs�g}t�tjjtjdj�}tjj|d�}tjj|�rB|j	|�tj
dkrRd}nd}|jr�tjjtjjd�|�}tjj|�r�|j	|�d}tjj|�r�|j	|�t
r�|jdd	j|��|S)
a�Find as many configuration files as should be processed for this
        platform, and return a list of filenames in the order in which they
        should be parsed.  The filenames returned are guaranteed to exist
        (modulo nasty race conditions).

        There are three possible config files: distutils.cfg in the
        Distutils installation directory (ie. where the top-level
        Distutils __inst__.py file lives), a file in the user's home
        directory named .pydistutils.cfg on Unix and pydistutils.cfg
        on Windows/Mac; and setup.cfg in the current directory.

        The file in the user's home directory can be disabled with the
        --no-user-cfg option.
        �	distutilsz
distutils.cfg�posixz.pydistutils.cfgzpydistutils.cfg�~z	setup.cfgzusing config files: %sz, )r�os�path�dirnamerj�modules�__file__�join�isfile�appendrro�
expanduserr
r�)rr�filesZsys_dirZsys_fileZ
user_filenameZ	user_fileZ
local_filerHrHrI�find_config_filesBs&



zDistribution.find_config_filescCs�ddlm}tjtjkr8ddddddd	d
ddd
ddg
}ng}t|�}|dkrT|j�}trb|jd�|�}x�|D]�}tr�|jd|�|j	|�xf|j
�D]Z}|j|�}|j|�}x@|D]8}	|	dkr�|	|kr�|j
||	�}
|	jdd�}	||
f||	<q�Wq�W|j�qnWd|jk�r�x�|jdj�D]�\}	\}}
|jj
|	�}yF|�rRt||t|
��n(|	dk�rnt||	t|
��nt||	|
�Wn,tk
�r�}
zt|
��WYdd}
~
XnX�qWdS)Nr)�ConfigParserzinstall-basezinstall-platbasezinstall-libzinstall-platlibzinstall-purelibzinstall-headerszinstall-scriptszinstall-data�prefixzexec-prefix�home�user�rootz"Distribution.parse_config_files():z  reading %s�__name__rO�_�globalrrP)rrP)Zconfigparserr�rjr��base_prefix�	frozensetr�r
r��readZsectionsrMrgre�replacer|r[rf�negative_optrRr�
ValueError�DistutilsOptionError)rr�	filenamesr�Zignore_options�parser�filenameZsectionrMrvrwrx�src�aliasryrHrHrI�parse_config_filesrsJ






zDistribution.parse_config_filescCs�|j�}g|_t||j�}|j|j�|jddi�|j|j|d�}|j	�}t
j|j�|j
|�rhdSx |r�|j||�}|dkrjdSqjW|jr�|j|t|j�dk|jd�dS|js�td��dS)	a�Parse the setup script's command line, taken from the
        'script_args' instance attribute (which defaults to 'sys.argv[1:]'
        -- see 'setup()' in core.py).  This list is first processed for
        "global options" -- options that set attributes of the Distribution
        instance.  Then, it is alternately scanned for Distutils commands
        and options for that command.  Each new command terminates the
        options for the previous command.  The allowed options for a
        command are determined by the 'user_options' attribute of the
        command class -- thus, we have to be able to load command classes
        in order to parse the command line.  Any error in that 'options'
        attribute raises DistutilsGetoptError; any error on the
        command-line raises DistutilsArgError.  If no Distutils commands
        were found on the command line, raises DistutilsArgError.  Return
        true if command-line was successfully parsed and we should carry
        on with executing commands; false if no errors but we shouldn't
        execute commands (currently, this only happens if user asks for
        help).
        r4r2)�args�objectNr)�display_optionsr�zno commands suppliedT)�_get_toplevel_optionsr�rr��set_negative_aliasesr�Zset_aliases�getoptrZZget_option_orderr	Z
set_verbosityr�handle_display_options�_parse_command_optsr�
_show_help�len�DistutilsArgError)rrZtoplevel_optionsr�r��option_orderrHrHrI�parse_command_line�s,	

zDistribution.parse_command_linecCs|jdgS)z�Return the non-display options recognized at the top level.

        This includes options that are recognized *only* at the top
        level as well as options recognized for commands.
        �command-packages=N�0list of packages that provide distutils commands)r�Nr�)�global_options)rrrHrHrIr��sz"Distribution._get_toplevel_optionscCsddlm}|d}tj|�s*td|��|jj|�y|j|�}Wn*tk
rn}zt	|��WYdd}~XnXt
||�s�td|��t|d�o�t
|jt�s�d}t||��|j}t|d�r�|j�}|j|j�t|d	�r�t
|jt�r�t|j�}ng}|j|j|j|�|j|�|j|d
d��\}}	t|	d��rV|	j�rV|j|d|gd�dSt|d	��r�t
|jt��r�d}
xP|jD]F\}}}
}t|	|j|���r|d
}
t|��r�|�ntd
||f���q|W|
�r�dS|j|�}x&t|	�j�D]\}}d|f||<�q�W|S)a�Parse the command-line options for a single command.
        'parser' must be a FancyGetopt instance; 'args' must be the list
        of arguments, starting with the current command (whose options
        we are about to parse).  Returns a new version of 'args' with
        the next command at the front of the list; will be the empty
        list if there are no more commands on the command line.  Returns
        None if the user asked for help on this command.
        r)�Commandzinvalid command name '%s'Nz&command class %s must subclass Command�user_optionszIcommand class %s must provide 'user_options' attribute (a list of tuples)r��help_optionsrr)r�r�zYinvalid help function %r for help option '%s': must be a callable object (function, etc.)zcommand line) �
distutils.cmdr��
command_re�match�
SystemExitr�r��get_command_class�DistutilsModuleErrorr��
issubclassZDistutilsClassErrorrm�
isinstancer��listr��copy�updater��fix_help_options�set_option_tabler�r�r�rr�Z
get_attr_name�callablerg�varsrf)rrr�r�r�ruZ	cmd_classryr�r�ZoptsZhelp_option_foundZhelp_optionZshortZdesc�funcrvr�valuerHrHrIr��sb










z Distribution._parse_command_optscCsTxNdD]F}t|j|�}|dkr qt|t�rdd�|jd�D�}t|j||�qWdS)z�Set final values for all the options on the Distribution
        instance, analogous to the .finalize_options() method of Command
        objects.
        r>r:NcSsg|]}|j��qSrH)�strip)rFZelmrHrHrIrJ_sz1Distribution.finalize_options.<locals>.<listcomp>�,)r>r:)rVrTr��strr�rR)rrrsr�rHrHrIrqUs

zDistribution.finalize_optionsc
Csddlm}ddlm}|rR|r*|j�}n|j}|j|�|j|jd�t	d�|rt|j|j
�|jd�t	d�x�|jD]z}t|t
�r�t||�r�|}	n
|j|�}	t|	d�r�t|	jt�r�|j|	jt|	j��n|j|	j�|jd	|	j�t	d�q|Wt	||j��d
S)abShow help for the setup script command-line in the form of
        several lists of command-line options.  'parser' should be a
        FancyGetopt instance; do not expect it to be returned in the
        same state, as its option table will be reset to make it
        generate the correct help text.

        If 'global_options' is true, lists the global options:
        --verbose, --dry-run, etc.  If 'display_options' is true, lists
        the "display-only" options: --name, --version, etc.  Finally,
        lists per-command help for every command name or command class
        in 'commands'.
        r)�	gen_usage)r�z
Global options:rLz*Information display options (just display z!information, ignore any commands)r�zOptions for '%s' command:NzKInformation display options (just display information, ignore any commands))�distutils.corer�r�r�r�r�r�Z
print_help�common_usage�printr�r�r��typer�r�rmr�r�r�r�r�rY)
rrr�r�r�r�r�r�rMru�klassrHrHrIr�bs6



zDistribution._show_helpc	Cs�ddlm}|jr4|j�td�t||j��dSd}i}x|jD]}d||d<qDWxt|D]l\}}|r^|j|�r^t|�}t	|j
d|��}|dkr�tdj|��n |dkr�td
j|��nt|�d}q^W|S)z�If there were any non-global "display-only" options
        (--help-commands or the metadata display options) on the command
        line, display the requested info and return true; else return
        false.
        r)r�rLrrKr>r:r�r<r@rBrDrN)r>r:)r<r@rBrD)r�r�Z
help_commands�print_commandsr�rYr�rerrVrTr�)	rrr�r�Zany_display_optionsZis_display_option�optionrwrxr�rHrHrIr��s,z#Distribution.handle_display_optionscCsnt|d�x\|D]T}|jj|�}|s0|j|�}y
|j}Wntk
rRd}YnXtd|||f�qWdS)zZPrint a subset of the list of all commands -- used by
        'print_commands()'.
        �:z(no description available)z
  %-*s  %sN)r�rWrer�r6�AttributeError)rrr�r��
max_length�cmdr�r6rHrHrI�print_command_list�s



zDistribution.print_command_listcCs�ddl}|jj}i}x|D]}d||<qWg}x&|jj�D]}|j|�s:|j|�q:Wd}x$||D]}t|�|krdt|�}qdW|j|d|�|r�t	�|j|d|�dS)anPrint out a help message listing all available commands with a
        description of each.  The list is divided into "standard commands"
        (listed in distutils.command.__all__) and "extra commands"
        (mentioned in self.cmdclass, but not a standard command).  The
        descriptions come from the command class attribute
        'description'.
        rNrzStandard commandszExtra commands)
�distutils.commandru�__all__rWr�rer�r�r�r�)rrr��std_commands�is_stdr��extra_commandsr�rHrHrIr��s*

zDistribution.print_commandsc	Cs�ddl}|jj}i}x|D]}d||<qWg}x&|jj�D]}|j|�s:|j|�q:Wg}x\||D]P}|jj|�}|s�|j|�}y
|j}Wnt	k
r�d}YnX|j||f�qdW|S)a>Get a list of (command, description) tuples.
        The list is divided into "standard commands" (listed in
        distutils.command.__all__) and "extra commands" (mentioned in
        self.cmdclass, but not a standard command).  The descriptions come
        from the command class attribute 'description'.
        rNrz(no description available))
r�rur�rWr�rer�r�r6r�)	rrr�r�r�r�r��rvr�r6rHrHrI�get_command_list�s(	




zDistribution.get_command_listcCsN|j}t|t�sJ|dkrd}dd�|jd�D�}d|krD|jdd�||_|S)z9Return a list of packages from which commands are loaded.NrLcSsg|]}|dkr|j��qS)rL)r�)rFZpkgrHrHrIrJsz5Distribution.get_command_packages.<locals>.<listcomp>r�zdistutils.commandr)rXr�r�r��insert)rrZpkgsrHrHrI�get_command_packagess
z!Distribution.get_command_packagescCs�|jj|�}|r|Sx�|j�D]�}d||f}|}yt|�tj|}Wntk
r^wYnXyt||�}Wn&tk
r�t	d|||f��YnX||j|<|SWt	d|��dS)aoReturn the class that implements the Distutils command named by
        'command'.  First we check the 'cmdclass' dictionary; if the
        command is mentioned there, we fetch the class object from the
        dictionary and return it.  Otherwise we load the command module
        ("distutils.command." + command) and fetch the command class from
        the module.  The loaded class is also stored in 'cmdclass'
        to speed future calls to 'get_command_class()'.

        Raises DistutilsModuleError if the expected module could not be
        found, or if that module does not define the expected class.
        z%s.%sz3invalid command '%s' (no class '%s' in module '%s')zinvalid command '%s'N)
rWrer��
__import__rjr��ImportErrorrVr�r�)rrrur�ZpkgnameZmodule_nameZ
klass_name�modulerHrHrIr�s(
zDistribution.get_command_classcCsn|jj|�}|rj|rjtr(|jd|�|j|�}||�}|j|<d|j|<|jj|�}|rj|j||�|S)aReturn the command object for 'command'.  Normally this object
        is cached on a previous call to 'get_command_obj()'; if no command
        object for 'command' is in the cache, then we either create and
        return it (if 'create' is true) or return None.
        z<Distribution.get_command_obj(): creating '%s' command objectr)rcrer
r�r�rdr[�_set_command_options)rrruZcreate�cmd_objr�rMrHrHrI�get_command_objBs


zDistribution.get_command_objc!Csb|j�}|dkr|j|�}tr,|jd|��x.|j�D�] \}\}}tr^|jd|||f�ydd�|jD�}Wntk
r�g}YnXy
|j}Wntk
r�i}YnXy|t|t	�}	||kr�|	r�t
|||t|��nJ||kr�|	r�t
||t|��n,t||��rt
|||�nt
d|||f��Wq8tk
�rX}
zt
|
��WYdd}
~
Xq8Xq8WdS)aySet the options for 'command_obj' from 'option_dict'.  Basically
        this means copying elements of a dictionary ('option_dict') to
        attributes of an instance ('command').

        'command_obj' must be a Command instance.  If 'option_dict' is not
        supplied, uses the standard option dictionary for this command
        (from 'self.command_options').
        Nz#  setting options for '%s' command:z    %s = %s (from %s)cSsg|]}t|��qSrH)r)rF�orHrHrIrJqsz5Distribution._set_command_options.<locals>.<listcomp>z1error in %s: command '%s' has no such option '%s')�get_command_namergr
r�rfZboolean_optionsr�r�r�r�rRrrmr�r�)rrrcZoption_dict�command_namer��sourcer�Z	bool_optsZneg_optZ	is_stringryrHrHrIr�]s>	






z!Distribution._set_command_optionsrcCs�ddlm}t||�s&|}|j|�}n|j�}|js8|S|j�d|_d|j|<|j|�|r|x|j	�D]}|j
||�qhW|S)a�Reinitializes a command to the state it was in when first
        returned by 'get_command_obj()': ie., initialized but not yet
        finalized.  This provides the opportunity to sneak option
        values in programmatically, overriding or supplementing
        user-supplied values from the config files and command line.
        You'll have to re-finalize the command object (by calling
        'finalize_options()' or 'ensure_finalized()') before using it for
        real.

        'command' should be a command name (string) or command object.  If
        'reinit_subcommands' is true, also reinitializes the command's
        sub-commands, as declared by the 'sub_commands' class attribute (if
        it has one).  See the "install" command for an example.  Only
        reinitializes the sub-commands that actually matter, ie. those
        whose test predicates return true.

        Returns the reinitialized command object.
        r)r�)r�r�r�r�r�Z	finalizedZinitialize_optionsrdr�Zget_sub_commands�reinitialize_command)rrruZreinit_subcommandsr�r��subrHrHrIr��s


z!Distribution.reinitialize_commandcCstj||�dS)N)r	)rrry�levelrHrHrIr��szDistribution.announcecCsx|jD]}|j|�qWdS)z�Run each command that was seen on the setup script command line.
        Uses the list of commands found and cache of command objects
        created by 'get_command_obj()'.
        N)r��run_command)rrr�rHrHrI�run_commands�szDistribution.run_commandscCsD|jj|�rdStjd|�|j|�}|j�|j�d|j|<dS)a�Do whatever it takes to run a command (including nothing at all,
        if the command has already been run).  Specifically: if we have
        already created and run the command named by 'command', return
        silently without doing anything.  If the command named by 'command'
        doesn't even have a command object yet, create one.  Then invoke
        'run()' on that command object (or an existing one).
        Nz
running %sr)rdrer	�infor�Zensure_finalizedZrun)rrrur�rHrHrIr��s	
zDistribution.run_commandcCst|jp|jpg�dkS)Nr)r�r\r])rrrHrHrI�has_pure_modules�szDistribution.has_pure_modulescCs|jot|j�dkS)Nr)r`r�)rrrHrHrI�has_ext_modules�szDistribution.has_ext_modulescCs|jot|j�dkS)Nr)r^r�)rrrHrHrI�has_c_libraries�szDistribution.has_c_librariescCs|j�p|j�S)N)r�r�)rrrHrHrI�has_modules�szDistribution.has_modulescCs|jot|j�dkS)Nr)r_r�)rrrHrHrI�has_headers�szDistribution.has_headerscCs|jot|j�dkS)Nr)rar�)rrrHrHrI�has_scripts�szDistribution.has_scriptscCs|jot|j�dkS)Nr)rbr�)rrrHrHrI�has_data_files�szDistribution.has_data_filescCs|j�o|j�o|j�S)N)r�r�r�)rrrHrHrI�is_pure�s
zDistribution.is_pure)rr
rr)rrr)rrr)rrr)rNr)rNr)rNr)rr r!)r"Nr#)r$Nr%)r&Nr')r(Nr))r*Nr+)r,Nr-)r.Nr/)r0Nr1)r2Nr3)r4Nr5)r6Nr7)r8Nr9)r:Nr;)r<Nr=)r>Nr?)r@NrA)rBNrC)rDNrE)N)NNrL)N)r)N)r))r��
__module__�__qualname__�__doc__r�r�r�rQr�r|rgr�r�r�r�r�r�rqr�r�r�r�r�r�r�r�r�r�r	�INFOr�r�r�r�r�r�r�r�r�rrrHrHrHrIrs�

"
0
:C[
1(!"&

,
)
rc@s�eZdZdZdOZdPdd�Zdd�Zdd�Zdd�Zdd �Z	d!d"�Z
d#d$�Zd%d&�Zd'd(�Z
d)d*�Zd+d,�Zd-d.�Zd/d0�Zd1d2�Zd3d4�Zd5d6�ZeZd7d8�Zd9d:�Zd;d<�Zd=d>�Zd?d@�ZdAdB�ZdCdD�ZdEdF�ZdGdH�ZdIdJ�ZdKdL�Z dMdN�Z!dS)QrSz]Dummy class to hold the distribution meta-data: name, version,
    author, and so forth.
    rrr$�author_emailr(�maintainer_emailr0r2r6�long_descriptionr>r:r"r,�
contact_emailr<�download_urlr@rBrDNcCs�|dk	r|jt|��nfd|_d|_d|_d|_d|_d|_d|_d|_	d|_
d|_d|_d|_
d|_d|_d|_d|_d|_dS)N)�
read_pkg_file�openrrr$rr(rr0r2r6rr>r:r<r
r@rBrD)rrr�rHrHrIr|s&zDistributionMetadata.__init__cst|���fdd�}�fdd�}�d}|d�|_|d�|_|d�|_|d	�|_d
|_|d�|_d
|_|d�|_|d
�|_	d�kr�|d�|_
nd
|_
|d�|_|d�|_d�kr�|d�jd�|_
|d�|_|d�|_|dkr�|d�|_|d�|_|d�|_nd
|_d
|_d
|_d
S)z-Reads the metadata values from a file object.cs�|}|dkrdS|S)N�UNKNOWNrH)rr�)ryrHrI�_read_fieldsz7DistributionMetadata.read_pkg_file.<locals>._read_fieldcs�j|d�}|gkrdS|S)N)Zget_all)r�values)ryrHrI�
_read_list#sz6DistributionMetadata.read_pkg_file.<locals>._read_listzmetadata-versionrrZsummaryr$Nzauthor-emailz	home-pager2zdownload-urlr6r>r��platformZ
classifierz1.1rBr@rD)rrrr6r$r(rrr0r2r
rr�r>r:r<rBr@rD)rr�filerrZmetadata_versionrH)ryrIrs:












z"DistributionMetadata.read_pkg_filec	Cs2ttjj|d�ddd��}|j|�WdQRXdS)z7Write the PKG-INFO file into the release tree.
        zPKG-INFO�wzUTF-8)�encodingN)rr�r�r��write_pkg_file)rrZbase_dirZpkg_inforHrHrI�write_pkg_infoMs
z#DistributionMetadata.write_pkg_infocCsbd}|js"|js"|js"|js"|jr&d}|jd|�|jd|j��|jd|j��|jd|j��|jd|j	��|jd|j
��|jd	|j��|jd
|j��|jr�|jd|j�t
|j��}|jd|�d
j|j��}|�r|jd|�|j|d|j��|j|d|j��|j|d|j��|j|d|j��|j|d|j��dS)z9Write the PKG-INFO format data to a file object.
        z1.0z1.1zMetadata-Version: %s
z	Name: %s
zVersion: %s
zSummary: %s
zHome-page: %s
zAuthor: %s
zAuthor-email: %s
zLicense: %s
zDownload-URL: %s
zDescription: %s
r�z
Keywords: %s
ZPlatformZ
ClassifierZRequiresZProvidesZ	ObsoletesN)r@rBrDr<r
rl�get_name�get_version�get_description�get_url�get_contact�get_contact_email�get_licenser�get_long_descriptionr��get_keywords�_write_list�
get_platforms�get_classifiers�get_requires�get_provides�
get_obsoletes)rrrrZ	long_descr>rHrHrIrTs0z#DistributionMetadata.write_pkg_filecCs$x|D]}|jd||f�qWdS)Nz%s: %s
)rl)rrrrrr�rHrHrIr vs
z DistributionMetadata._write_listcCs
|jpdS)Nr
)r)rrrHrHrIr|szDistributionMetadata.get_namecCs
|jpdS)Nz0.0.0)r)rrrHrHrIrsz DistributionMetadata.get_versioncCsd|j�|j�fS)Nz%s-%s)rr)rrrHrHrI�get_fullname�sz!DistributionMetadata.get_fullnamecCs
|jpdS)Nr
)r$)rrrHrHrI�
get_author�szDistributionMetadata.get_authorcCs
|jpdS)Nr
)r)rrrHrHrI�get_author_email�sz%DistributionMetadata.get_author_emailcCs
|jpdS)Nr
)r()rrrHrHrI�get_maintainer�sz#DistributionMetadata.get_maintainercCs
|jpdS)Nr
)r)rrrHrHrI�get_maintainer_email�sz)DistributionMetadata.get_maintainer_emailcCs|jp|jpdS)Nr
)r(r$)rrrHrHrIr�sz DistributionMetadata.get_contactcCs|jp|jpdS)Nr
)rr)rrrHrHrIr�sz&DistributionMetadata.get_contact_emailcCs
|jpdS)Nr
)r0)rrrHrHrIr�szDistributionMetadata.get_urlcCs
|jpdS)Nr
)r2)rrrHrHrIr�sz DistributionMetadata.get_licensecCs
|jpdS)Nr
)r6)rrrHrHrIr�sz$DistributionMetadata.get_descriptioncCs
|jpdS)Nr
)r)rrrHrHrIr�sz)DistributionMetadata.get_long_descriptioncCs
|jpgS)N)r>)rrrHrHrIr�sz!DistributionMetadata.get_keywordscCs|jp
dgS)Nr
)r:)rrrHrHrIr!�sz"DistributionMetadata.get_platformscCs
|jpgS)N)r<)rrrHrHrIr"�sz$DistributionMetadata.get_classifierscCs
|jpdS)Nr
)r
)rrrHrHrI�get_download_url�sz%DistributionMetadata.get_download_urlcCs
|jpgS)N)rB)rrrHrHrIr#�sz!DistributionMetadata.get_requirescCs,ddl}x|D]}|jj|�qW||_dS)Nr)�distutils.versionpredicate�versionpredicate�VersionPredicaterB)rrr�r�r
rHrHrI�set_requires�s
z!DistributionMetadata.set_requirescCs
|jpgS)N)r@)rrrHrHrIr$�sz!DistributionMetadata.get_providescCs:dd�|D�}x |D]}ddl}|jj|�qW||_dS)NcSsg|]}|j��qSrH)r�)rFr
rHrHrIrJ�sz5DistributionMetadata.set_provides.<locals>.<listcomp>r)r,r-Zsplit_provisionr@)rrr�r
r�rHrHrI�set_provides�s

z!DistributionMetadata.set_providescCs
|jpgS)N)rD)rrrHrHrIr%�sz"DistributionMetadata.get_obsoletescCs,ddl}x|D]}|jj|�qW||_dS)Nr)r,r-r.rD)rrr�r�r
rHrHrI�
set_obsoletes�s
z"DistributionMetadata.set_obsoletes)rrr$rr(rr0r2r6rr>r:r"r,r	r<r
r@rBrD)N)"r�rrrrUr|rrrr rrr&r'r(r)r*rrrrZget_licencerrrr!r"r+r#r/r$r0r%r1rHrHrHrIrS�sH
4"rScCs(g}x|D]}|j|dd��q
W|S)zConvert a 4-tuple 'help_options' list as found in various command
    classes to the 3-tuple form required by FancyGetopt.
    r�)r�)rMZnew_optionsZ
help_tuplerHrHrIr��s
r�)rrjr��reZemailrrhr�Zdistutils.errorsZdistutils.fancy_getoptrrZdistutils.utilrrrr�r	Zdistutils.debugr
�compiler�rrSr�rHrHrHrI�<module>s2

]ZPKV[�*&��(__pycache__/version.cpython-36.opt-1.pycnu�[���3


 \90�@s>dZddlZGdd�d�ZGdd�de�ZGdd�de�ZdS)	a�Provides classes to represent module version numbers (one class for
each style of version numbering).  There are currently two such classes
implemented: StrictVersion and LooseVersion.

Every version number class implements the following interface:
  * the 'parse' method takes a string and parses it to some internal
    representation; if the string is an invalid version number,
    'parse' raises a ValueError exception
  * the class constructor takes an optional string argument which,
    if supplied, is passed to 'parse'
  * __str__ reconstructs the string that was passed to 'parse' (or
    an equivalent string -- ie. one that will generate an equivalent
    version number instance)
  * __repr__ generates Python code to recreate the version number instance
  * _cmp compares the current instance with either another instance
    of the same class or a string (which will be parsed to an instance
    of the same class, thus must follow the same rules)
�Nc@sJeZdZdZddd�Zdd�Zdd�Zd	d
�Zdd�Zd
d�Z	dd�Z
dS)�Versionz�Abstract base class for version numbering classes.  Just provides
    constructor (__init__) and reproducer (__repr__), because those
    seem to be the same for all version numbering classes; and route
    rich comparisons to _cmp.
    NcCs|r|j|�dS)N)�parse)�self�vstring�r�)/usr/lib64/python3.6/distutils/version.py�__init__&szVersion.__init__cCsd|jjt|�fS)Nz	%s ('%s'))�	__class__�__name__�str)rrrr�__repr__*szVersion.__repr__cCs|j|�}|tkr|S|dkS)Nr)�_cmp�NotImplemented)r�other�crrr�__eq__-s
zVersion.__eq__cCs|j|�}|tkr|S|dkS)Nr)r
r)rrrrrr�__lt__3s
zVersion.__lt__cCs|j|�}|tkr|S|dkS)Nr)r
r)rrrrrr�__le__9s
zVersion.__le__cCs|j|�}|tkr|S|dkS)Nr)r
r)rrrrrr�__gt__?s
zVersion.__gt__cCs|j|�}|tkr|S|dkS)Nr)r
r)rrrrrr�__ge__Es
zVersion.__ge__)N)r
�
__module__�__qualname__�__doc__rrrrrrrrrrrrs
rc@s<eZdZdZejdejejB�Zdd�Z	dd�Z
dd�Zd	S)
�
StrictVersiona?Version numbering for anal retentives and software idealists.
    Implements the standard interface for version number classes as
    described above.  A version number consists of two or three
    dot-separated numeric components, with an optional "pre-release" tag
    on the end.  The pre-release tag consists of the letter 'a' or 'b'
    followed by a number.  If the numeric components of two version
    numbers are equal, then one with a pre-release tag will always
    be deemed earlier (lesser) than one without.

    The following are valid version numbers (shown in the order that
    would be obtained by sorting according to the supplied cmp function):

        0.4       0.4.0  (these two are equivalent)
        0.4.1
        0.5a1
        0.5b3
        0.5
        0.9.6
        1.0
        1.0.4a3
        1.0.4b1
        1.0.4

    The following are examples of invalid version numbers:

        1
        2.7.2.2
        1.3.a4
        1.3pl1
        1.3c4

    The rationale for this version numbering system will be explained
    in the distutils documentation.
    z)^(\d+) \. (\d+) (\. (\d+))? ([ab](\d+))?$cCs�|jj|�}|std|��|jddddd�\}}}}}|rTttt|||g��|_nttt||g��d|_|r�|dt|�f|_nd|_dS)	Nzinvalid version number '%s'�����r)r)	�
version_re�match�
ValueError�group�tuple�map�int�version�
prerelease)rrr �major�minorZpatchr'Zprerelease_numrrrr�szStrictVersion.parsecCsb|jddkr*djtt|jdd���}ndjtt|j��}|jr^||jdt|jd�}|S)Nrr�.r)r&�joinr$rr')rrrrr�__str__�szStrictVersion.__str__cCs�t|t�rt|�}|j|jkr2|j|jkr.dSdS|jrF|jrFdS|jrX|jrXdS|jrj|jrjdS|jr�|jr�|j|jkr�dS|j|jkr�dSdSndS)Nrr���r-r-)�
isinstancerrr&r')rrrrrr
�s&
zStrictVersion._cmpN)r
rrr�re�compile�VERBOSE�ASCIIrrr,r
rrrrr]s#
rc@sHeZdZdZejdej�Zddd�Zdd�Z	dd	�Z
d
d�Zdd
�ZdS)�LooseVersiona�Version numbering for anarchists and software realists.
    Implements the standard interface for version number classes as
    described above.  A version number consists of a series of numbers,
    separated by either periods or strings of letters.  When comparing
    version numbers, the numeric components will be compared
    numerically, and the alphabetic components lexically.  The following
    are all valid version numbers, in no particular order:

        1.5.1
        1.5.2b2
        161
        3.10a
        8.02
        3.4j
        1996.07.12
        3.2.pl0
        3.1.1.6
        2g6
        11g
        0.960923
        2.2beta29
        1.13++
        5.5.kw
        2.0b1pl0

    In fact, there is no such thing as an invalid version number under
    this scheme; the rules for comparison are simple and predictable,
    but may not always give the results you want (for some definition
    of "want").
    z(\d+ | [a-z]+ | \.)NcCs|r|j|�dS)N)r)rrrrrr.szLooseVersion.__init__cCsb||_dd�|jj|�D�}x:t|�D].\}}yt|�||<Wq&tk
rRYq&Xq&W||_dS)NcSsg|]}|r|dkr|�qS)r*r)�.0�xrrr�
<listcomp>8sz&LooseVersion.parse.<locals>.<listcomp>)r�component_re�split�	enumerater%r!r&)rrZ
components�i�objrrrr3s
zLooseVersion.parsecCs|jS)N)r)rrrrr,CszLooseVersion.__str__cCsdt|�S)NzLooseVersion ('%s'))r)rrrrrGszLooseVersion.__repr__cCsFt|t�rt|�}|j|jkr"dS|j|jkr2dS|j|jkrBdSdS)Nrrr-)r.rr3r&)rrrrrr
Ks
zLooseVersion._cmp)N)
r
rrrr/r0r1r7rrr,rr
rrrrr3s
r3)rr/rrr3rrrr�<module>s
>/PKV[�(�ߟ
�
!__pycache__/config.cpython-36.pycnu�[���3


 \�@s<dZddlZddlmZddlmZdZGdd�de�ZdS)z�distutils.pypirc

Provides the PyPIRCCommand class, the base class for the command classes
that uses .pypirc in the distutils.command package.
�N)�RawConfigParser)�CommandzE[distutils]
index-servers =
    pypi

[pypi]
username:%s
password:%s
c@sheZdZdZdZdZdZdZdddefdgZdgZ	d
d�Z
dd
�Zdd�Zdd�Z
dd�Zdd�ZdS)�
PyPIRCCommandz;Base command that knows how to handle the .pypirc file
    zhttps://upload.pypi.org/legacy/�pypiNzrepository=�rzurl of repository [default: %s]�
show-response�&display full response text from servercCstjjtjjd�d�S)zReturns rc file path.�~z.pypirc)�os�path�join�
expanduser)�self�r�(/usr/lib64/python3.6/distutils/config.py�_get_rc_file&szPyPIRCCommand._get_rc_filecCsH|j�}tjtj|tjtjBd�d��}|jt||f�WdQRXdS)zCreates a default .pypirc file.i��wN)rr
�fdopen�open�O_CREAT�O_WRONLY�write�DEFAULT_PYPIRC)r�username�password�rc�frrr�
_store_pypirc*s zPyPIRCCommand._store_pypirccCs�|j�}tjj|��r�|jd|�|jp.|j}|jp:|j}t	�}|j
|�|j�}d|k�rR|jdd�}dd�|j
d�D�}|gkr�d|kr�dg}niSx�|D]�}d|i}	|j|d	�|	d	<xHd
|jfd|jfdfD].\}
}|j||
�r�|j||
�|	|
<q�||	|
<q�W|dk�r.||jdfk�r.|j|	d
<|	S|	d|k�sH|	d
|kr�|	Sq�WnRd|k�r�d}|j|d
��r||j|d
�}n|j}|j|d	�|j|d�|||jd�SiS)zReads the .pypirc file.zUsing PyPI login from %sZ	distutilsz
index-serverscSs g|]}|j�dkr|j��qS)�)�strip)�.0�serverrrr�
<listcomp>>sz.PyPIRCCommand._read_pypirc.<locals>.<listcomp>�
rr!r�
repository�realmrNzserver-login)rrr$r!r%)rN)rr
r�existsZannouncer$�DEFAULT_REPOSITORYr%�
DEFAULT_REALMr�read�sections�get�splitZ
has_option)rrr$r%�configr*Z
index_serversZ_serversr!Zcurrent�key�defaultrrr�_read_pypirc0sX









zPyPIRCCommand._read_pypirccCs8ddl}|jdd�}|j|�djdd�}|j�j|�S)z%Read and decode a PyPI HTTP response.rNzcontent-typez
text/plain��charset�ascii)�cgiZ	getheaderZparse_headerr+r)�decode)rZresponser4Zcontent_type�encodingrrr�_read_pypi_responseqsz!PyPIRCCommand._read_pypi_responsecCsd|_d|_d|_dS)zInitialize options.Nr)r$r%Z
show_response)rrrr�initialize_optionsxsz PyPIRCCommand.initialize_optionscCs(|jdkr|j|_|jdkr$|j|_dS)zFinalizes options.N)r$r'r%r()rrrr�finalize_options~s

zPyPIRCCommand.finalize_options)rNr)�__name__�
__module__�__qualname__�__doc__r'r(r$r%Zuser_optionsZboolean_optionsrrr0r7r8r9rrrrrs"Ar)r=r
ZconfigparserrZ
distutils.cmdrrrrrrr�<module>s

PKV[�y����1__pycache__/versionpredicate.cpython-36.opt-1.pycnu�[���3


 \
�@s�dZddlZddlZddlZejdej�Zejd�Zejd�Z	dd�Z
ejejej
ejejejd�ZGd	d
�d
�Zdadd�ZdS)
zBModule for parsing and testing package version predicate strings.
�Nz'(?i)^\s*([a-z_]\w*(?:\.[a-z_]\w*)*)(.*)z^\s*\((.*)\)\s*$z%^\s*(<=|>=|<|>|!=|==)\s*([^\s,]+)\s*$cCs6tj|�}|std|��|j�\}}|tjj|�fS)zVParse a single version comparison.

    Return (comparison string, StrictVersion)
    z"bad package restriction syntax: %r)�re_splitComparison�match�
ValueError�groups�	distutils�version�
StrictVersion)�pred�res�compZverStr�r�2/usr/lib64/python3.6/distutils/versionpredicate.py�splitUps

r)�<z<=z==�>z>=z!=c@s(eZdZdZdd�Zdd�Zdd�ZdS)	�VersionPredicatea�Parse and test package version predicates.

    >>> v = VersionPredicate('pyepat.abc (>1.0, <3333.3a1, !=1555.1b3)')

    The `name` attribute provides the full dotted name that is given::

    >>> v.name
    'pyepat.abc'

    The str() of a `VersionPredicate` provides a normalized
    human-readable version of the expression::

    >>> print(v)
    pyepat.abc (> 1.0, < 3333.3a1, != 1555.1b3)

    The `satisfied_by()` method can be used to determine with a given
    version number is included in the set described by the version
    restrictions::

    >>> v.satisfied_by('1.1')
    True
    >>> v.satisfied_by('1.4')
    True
    >>> v.satisfied_by('1.0')
    False
    >>> v.satisfied_by('4444.4')
    False
    >>> v.satisfied_by('1555.1b3')
    False

    `VersionPredicate` is flexible in accepting extra whitespace::

    >>> v = VersionPredicate(' pat( ==  0.1  )  ')
    >>> v.name
    'pat'
    >>> v.satisfied_by('0.1')
    True
    >>> v.satisfied_by('0.2')
    False

    If any version numbers passed in do not conform to the
    restrictions of `StrictVersion`, a `ValueError` is raised::

    >>> v = VersionPredicate('p1.p2.p3.p4(>=1.0, <=1.3a1, !=1.2zb3)')
    Traceback (most recent call last):
      ...
    ValueError: invalid version number '1.2zb3'

    It the module or package name given does not conform to what's
    allowed as a legal module or package name, `ValueError` is
    raised::

    >>> v = VersionPredicate('foo-bar')
    Traceback (most recent call last):
      ...
    ValueError: expected parenthesized list: '-bar'

    >>> v = VersionPredicate('foo bar (12.21)')
    Traceback (most recent call last):
      ...
    ValueError: expected parenthesized list: 'bar (12.21)'

    cCs�|j�}|std��tj|�}|s.td|��|j�\|_}|j�}|r�tj|�}|sbtd|��|j�d}dd�|jd�D�|_|js�td|��ng|_d	S)
z*Parse a version predicate string.
        zempty package restrictionzbad package name in %rzexpected parenthesized list: %rrcSsg|]}t|��qSr)r)�.0ZaPredrrr
�
<listcomp>tsz-VersionPredicate.__init__.<locals>.<listcomp>�,zempty parenthesized list in %rN)	�stripr�re_validPackagerr�name�re_paren�splitr	)�selfZversionPredicateStrrZparen�strrrr
�__init__`s$


zVersionPredicate.__init__cCs8|jr.dd�|jD�}|jddj|�dS|jSdS)NcSs g|]\}}|dt|��qS)� )r)r�cond�verrrr
r}sz,VersionPredicate.__str__.<locals>.<listcomp>z (z, �))r	r�join)r�seqrrr
�__str__{szVersionPredicate.__str__cCs*x$|jD]\}}t|||�sdSqWdS)z�True if version is compatible with all the predicates in self.
        The parameter version must be acceptable to the StrictVersion
        constructor.  It may be either a string or StrictVersion.
        FT)r	�compmap)rrrrrrr
�satisfied_by�szVersionPredicate.satisfied_byN)�__name__�
__module__�__qualname__�__doc__rr#r%rrrr
rs?rcCsdtdkrtjdtj�a|j�}tj|�}|s8td|��|jd�pDd}|rVtj	j
|�}|jd�|fS)a9Return the name and optional version number of a provision.

    The version number, if given, will be returned as a `StrictVersion`
    instance, otherwise it will be `None`.

    >>> split_provision('mypkg')
    ('mypkg', None)
    >>> split_provision(' mypkg( 1.2 ) ')
    ('mypkg', StrictVersion ('1.2'))
    Nz=([a-zA-Z_]\w*(?:\.[a-zA-Z_]\w*)*)(?:\s*\(\s*([^)\s]+)\s*\))?$z"illegal provides specification: %r��)�
_provision_rx�re�compile�ASCIIrrr�grouprrr)�value�mrrrr
�split_provision�s
r3)r)r-Zdistutils.versionr�operatorr.r/rrrr�lt�le�eq�gt�ge�ner$rr,r3rrrr
�<module>s

nPKV[�	ư�*__pycache__/file_util.cpython-36.opt-2.pycnu�[���3


 \��@sVddlZddlmZddlmZdddd�Zdd
d�Zdd
d�Zddd�Zdd�Z	dS)�N)�DistutilsFileError)�logZcopyingzhard linkingzsymbolically linking)N�hard�sym�icNCs�d}d}�zvyt|d�}Wn4tk
rN}ztd||jf��WYdd}~XnXtjj|�r�ytj|�Wn4tk
r�}ztd||jf��WYdd}~XnXyt|d�}Wn4tk
r�}ztd||jf��WYdd}~XnXx�y|j|�}Wn6tk
�r*}ztd||jf��WYdd}~XnX|�s4Py|j	|�Wq�tk
�rx}ztd||jf��WYdd}~Xq�Xq�WWd|�r�|j
�|�r�|j
�XdS)N�rbzcould not open '%s': %szcould not delete '%s': %s�wbzcould not create '%s': %szcould not read from '%s': %szcould not write to '%s': %s)�open�OSErrorr�strerror�os�path�exists�unlink�read�write�close)�src�dst�buffer_sizeZfsrcZfdst�eZbuf�r�+/usr/lib64/python3.6/distutils/file_util.py�_copy_file_contentssF	$"""*r�cCsddlm}ddlm}	m}
m}m}tjj	|�s<t
d|��tjj|�rd|}
tjj|tjj
|��}ntjj|�}
|r�|||�r�|dkr�tjd|�|dfSyt|}Wn tk
r�td|��YnX|dk�rtjj
|�tjj
|�k�rtjd|||
�ntjd|||�|�r|dfS|d	k�rttjj|��oBtjj||��s�ytj||�|dfStk
�rpYnXn<|d
k�r�tjj|��o�tjj||��s�tj||�|dfSt||�|�s�|�rtj|�}|�r�tj|||	||
f�|�rtj||||��|dfS)Nr)�newer)�ST_ATIME�ST_MTIME�ST_MODE�S_IMODEz4can't copy '%s': doesn't exist or not a regular filerz"not copying %s (output up-to-date)z&invalid value '%s' for 'link' argumentz%s %s -> %srr)Zdistutils.dep_utilr�statrrrrrr
�isfiler�isdir�join�basename�dirnamer�debug�_copy_action�KeyError�
ValueError�infor�samefile�linkr
�symlinkr�utime�chmod)rrZ
preserve_modeZpreserve_times�updater,�verbose�dry_runrrrrr�dir�action�strrr�	copy_fileCsT!





r6c(Cs�ddlm}m}m}m}m}ddl}	|dkr:tjd||�|rB|S||�sVt	d|��||�rrt
jj|||��}n||�r�t	d||f��|||��s�t	d||f��d}
yt
j
||�WnPtk
�r
}z2|j\}}
||	jkr�d	}
nt	d
|||
f��WYdd}~XnX|
�r�t|||d�yt
j|�Wnhtk
�r�}zJ|j\}}
yt
j|�Wntk
�rpYnXt	d||||
f��WYdd}~XnX|S)
Nr)rr!r"r$r%rzmoving %s -> %sz#can't move '%s': not a regular filez0can't move '%s': destination '%s' already existsz2can't move '%s': destination '%s' not a valid pathFTzcouldn't move '%s' to '%s': %s)r1zAcouldn't move '%s' to '%s' by copy/delete: delete '%s' failed: %s)Zos.pathrr!r"r$r%�errnorr*rrr
r#�renamer
�argsZEXDEVr6r)rrr1r2rr!r"r$r%r7Zcopy_itrZnum�msgrrr�	move_file�sR

"
"r;c
Cs:t|d�}z x|D]}|j|d�qWWd|j�XdS)N�w�
)r	rr)�filename�contents�f�linerrr�
write_file�s


rB�@)rC)rrrNrr)rr)
rZdistutils.errorsrZ	distutilsrr'rr6r;rBrrrr�<module>s
3
c
=PKV[&�
��)__pycache__/filelist.cpython-36.opt-2.pycnu�[���3


 \ 2�@s�ddlZddlZddlZddlZddlmZddlmZmZddl	m
Z
Gdd�d�Zdd�Zej
fd	d
�Zdd�Zddd�ZdS)�N)�convert_path)�DistutilsTemplateError�DistutilsInternalError)�logc@sxeZdZddd�Zdd�Zejfdd�Zdd	�Zd
d�Z	dd
�Z
dd�Zdd�Zdd�Z
dd�Zddd�Zddd�ZdS)�FileListNcCsd|_g|_dS)N)�allfiles�files)�self�warn�debug_print�r�*/usr/lib64/python3.6/distutils/filelist.py�__init__szFileList.__init__cCs
||_dS)N)r)r	rrrr
�set_allfiles#szFileList.set_allfilescCst|�|_dS)N)�findallr)r	�dirrrr
r&szFileList.findallcCsddlm}|rt|�dS)Nr)�DEBUG)Zdistutils.debugr�print)r	�msgrrrr
r)szFileList.debug_printcCs|jj|�dS)N)r�append)r	�itemrrr
r3szFileList.appendcCs|jj|�dS)N)r�extend)r	�itemsrrr
r6szFileList.extendcCs@tttjj|j��}g|_x |D]}|jjtjj|��q WdS)N)�sorted�map�os�path�splitrr�join)r	Zsortable_filesZ
sort_tuplerrr
�sort9s
z
FileList.sortcCsDx>tt|j�ddd�D]$}|j||j|dkr|j|=qWdS)N�r���)�range�lenr)r	�irrr
�remove_duplicatesCszFileList.remove_duplicatescCs�|j�}|d}d}}}|dkrTt|�dkr<td|��dd	�|d
d�D�}n~|dkr�t|�d
krttd|��t|d
�}dd	�|dd�D�}n:|dkr�t|�dkr�td|��t|d
�}ntd|��||||fS)Nr�include�exclude�global-include�global-exclude�z&'%s' expects <pattern1> <pattern2> ...cSsg|]}t|��qSr)r)�.0�wrrr
�
<listcomp>Wsz1FileList._parse_template_line.<locals>.<listcomp>r �recursive-include�recursive-exclude�z,'%s' expects <dir> <pattern1> <pattern2> ...cSsg|]}t|��qSr)r)r+r,rrr
r-]s�graft�prunez#'%s' expects a single <dir_pattern>zunknown action '%s')r&r'r(r))r.r/)r1r2)rr#rr)r	�lineZwords�action�patternsr�dir_patternrrr
�_parse_template_lineLs,


zFileList._parse_template_linecCsX|j|�\}}}}|dkrZ|jddj|��x&|D]}|j|dd�s4tjd|�q4W�n�|dkr�|jddj|��x&|D]}|j|dd�s|tjd	|�q|W�n�|d
kr�|jddj|��x&|D]}|j|dd�s�tjd
|�q�W�nj|dk�r8|jddj|��x*|D]"}|j|dd��stjd|��qW�n|dk�r�|jd|dj|�f�x,|D]$}|j||d��s`tjd||��q`Wn�|dk�r�|jd|dj|�f�x�|D]$}|j||d��s�tjd||��q�Wnx|dk�r|jd|�|jd|d��sTtjd|�nB|dk�rH|jd|�|jd|d��sTtjd|�ntd|��dS)Nr&zinclude � r )�anchorz%warning: no files found matching '%s'r'zexclude z9warning: no previously-included files found matching '%s'zglobal-includezglobal-include rz>warning: no files found matching '%s' anywhere in distributionzglobal-excludezglobal-exclude zRwarning: no previously-included files matching '%s' found anywhere in distributionzrecursive-includezrecursive-include %s %s)�prefixz:warning: no files found matching '%s' under directory '%s'zrecursive-excludezrecursive-exclude %s %szNwarning: no previously-included files matching '%s' found under directory '%s'r1zgraft z+warning: no directories found matching '%s'r2zprune z6no previously-included directories found matching '%s'z'this cannot happen: invalid action '%s')r7rr�include_patternrr
�exclude_patternr)r	r3r4r5rr6�patternrrr
�process_template_linehsf










zFileList.process_template_liner rcCspd}t||||�}|jd|j�|jdkr4|j�x6|jD],}|j|�r<|jd|�|jj|�d}q<W|S)NFz%include_pattern: applying regex r'%s'z adding T)�translate_patternrr=rr�searchrr)r	r=r9r:�is_regex�files_found�
pattern_re�namerrr
r;�s


zFileList.include_patterncCsvd}t||||�}|jd|j�xNtt|j�ddd�D]4}|j|j|�r:|jd|j|�|j|=d}q:W|S)NFz%exclude_pattern: applying regex r'%s'r z
 removing Tr!r!)r?rr=r"r#rr@)r	r=r9r:rArBrCr$rrr
r<�s
zFileList.exclude_pattern)NN)r Nr)r Nr)�__name__�
__module__�__qualname__rrr�curdirrrrrrr%r7r>r;r<rrrr
rs


	L
,rcCs&dd�tj|dd�D�}ttjj|�S)Ncss,|]$\}}}|D]}tjj||�VqqdS)N)rrr)r+�base�dirsr�filerrr
�	<genexpr>�sz#_find_all_simple.<locals>.<genexpr>T)�followlinks)r�walk�filterr�isfile)rZresultsrrr
�_find_all_simple�srQcCs6t|�}|tjkr.tjtjj|d�}t||�}t|�S)N)�start)	rQrrH�	functools�partialr�relpathr�list)rrZmake_relrrr
rs


rcCs8tj|�}tj}tjdkrd}d|}tjd||�}|S)N�\z\\\\z\1[^%s]z((?<!\\)(\\\\)*)\.)�fnmatch�	translater�sep�re�sub)r=rCrZZescapedrrr
�
glob_to_res

r]r c
Cs�|rt|t�rtj|�S|Std�jd�\}}}|r>t|�}nd}|dk	r�t|�}|t|�t|�t|��}tj}	tjdkr�d}	|t|�t|�t|��}d|||	||f}n|r�d||t|�d�f}tj|�S)N�_�rWz\\z%s\A%s%s.*%s%sz%s\A%s)	�
isinstance�strr[�compiler]�	partitionr#rrZ)
r=r9r:rArRr^�endrCZ	prefix_rerZrrr
r?%s(


r?)r Nr)rr[rXrSZdistutils.utilrZdistutils.errorsrrZ	distutilsrrrQrHrr]r?rrrr
�<module>siPKV[�f7���-__pycache__/archive_util.cpython-36.opt-2.pycnu�[���3


 \F!� @s@ddlZddlmZddlZyddlZWnek
r@dZYnXddlmZddlm	Z	ddl
mZddlm
Z
yddlmZWnek
r�dZYnXyddlmZWnek
r�dZYnXd	d
�Zdd�Zd dd�Zd!dd�Zed"gdfed#gdfed$gdfed%gdfed&gdfegdfd�Zdd�Zd'dd�ZdS)(�N)�warn)�DistutilsExecError)�spawn)�mkpath)�log)�getpwnam)�getgrnamcCsNtdks|dkrdSyt|�}Wntk
r8d}YnX|dk	rJ|dSdS)N�)r�KeyError)�name�result�r
�./usr/lib64/python3.6/distutils/archive_util.py�_get_gids
rcCsNtdks|dkrdSyt|�}Wntk
r8d}YnX|dk	rJ|dSdS)Nr	)rr
)rrr
r
r�_get_uid+s
r�gzipcs.dddddd�}dddd	d
�}|dk	r:||j�kr:td��|d}	|d
krZ|	|j|d�7}	ttjj|	�|d�ddl}
tj	d�t
���t�������fdd�}|s�|
j|	d||�}z|j
||d�Wd|j�X|d
k�r*tdt�|	||}
tjdk�r||	|
g}n
|d|	g}t||d�|
S|	S)NZgz�bz2�xz�)r�bzip2rN�compressz.gzz.bz2z.xzz.Z)rrrrzKbad value for 'compress': must be None, 'gzip', 'bzip2', 'xz' or 'compress'z.tarr)�dry_runrzCreating tar archivecs,�dk	r�|_�|_�dk	r(�|_�|_|S)N)�gidZgname�uid�uname)Ztarinfo)r�group�ownerrr
r�_set_uid_gidasz"make_tarball.<locals>._set_uid_gidzw|%s)�filterz'compress' will be deprecated.Zwin32z-f)�keys�
ValueError�getr�os�path�dirname�tarfiler�inforr�open�add�closer�PendingDeprecationWarning�sys�platformr)�	base_name�base_dirr�verboserrrZtar_compressionZcompress_extZarchive_namer%r�tarZcompressed_name�cmdr
)rrrrr�make_tarball7s<
	



r2cCs�|d}ttjj|�|d�tdkrp|r.d}nd}ytd|||g|d�Wn tk
rjtd|��YnX�n:tjd||�|�s�ytj	|dtj
d	�}Wn&tk
r�tj	|dtjd	�}YnX|tj
kr�tjjtjj|d
��}|j||�tjd|�x�tj|�D]�\}}	}
x>|	D]6}tjjtjj||d
��}|j||�tjd|��qWxJ|
D]B}tjjtjj||��}tjj|��rV|j||�tjd|��qVW�qW|j�|S)Nz.zip)rz-rz-rq�zipzkunable to create zip file '%s': could neither import the 'zipfile' module nor find a standalone zip utilityz#creating '%s' and adding '%s' to it�w)Zcompressionrzadding '%s')rr"r#r$�zipfilerrrr&ZZipFileZZIP_DEFLATED�RuntimeErrorZ
ZIP_STORED�curdir�normpath�join�write�walk�isfiler))r-r.r/rZzip_filenameZ
zipoptionsr3r#�dirpathZdirnames�	filenamesrr
r
r�make_zipfilesJ	


r?rzgzip'ed tar-filerzbzip2'ed tar-filerzxz'ed tar-filezcompressed tar filezuncompressed tar filezZIP file)ZgztarZbztarZxztarZztarr0r3cCsx|D]}|tkr|SqWdS)N)�ARCHIVE_FORMATS)Zformats�formatr
r
r�check_archive_formats�s
rBcCs�tj�}|dk	r6tjd|�tjj|�}|s6tj|�|dkrDtj}d|i}	yt|}
Wn t	k
rxt
d|��YnX|
d}x|
dD]\}}
|
|	|<q�W|dkr�||	d<||	d<z|||f|	�}Wd|dk	r�tjd	|�tj|�X|S)
Nzchanging into '%s'rzunknown archive format '%s'r�r3rrzchanging back to '%s')r"�getcwdr�debugr#�abspath�chdirr7r@r
r )r-rAZroot_dirr.r/rrrZsave_cwd�kwargsZformat_info�func�arg�val�filenamer
r
r�make_archive�s2
rM)rrrNN)rr)rr)rr)rr)rr)rN)NNrrNN)r"�warningsrr+r5�ImportErrorZdistutils.errorsrZdistutils.spawnrZdistutils.dir_utilrZ	distutilsr�pwdrZgrprrrr2r?r@rBrMr
r
r
r�<module>s@



G
=





PKV[y�k���)__pycache__/__init__.cpython-36.opt-2.pycnu�[���3


 \��@s"ddlZejdejjd��ZdS)�N� )�sys�version�index�__version__�rr�*/usr/lib64/python3.6/distutils/__init__.py�<module>sPKV[�=[Ä
�
*__pycache__/extension.cpython-36.opt-2.pycnu�[���3


 \)�@s*ddlZddlZGdd�d�Zdd�ZdS)�Nc@seZdZddd�Zdd�ZdS)�	ExtensionNcKst|t�std��t|t�o,tdd�|D��s6td��||_||_|pHg|_|pRg|_|p\g|_	|pfg|_
|ppg|_|pzg|_|	p�g|_
|
p�g|_|p�g|_|p�g|_|
p�g|_|p�g|_||_||_t|�dk�rdd�|D�}djt|��}d	|}tj|�dS)
Nz'name' must be a stringcss|]}t|t�VqdS)N)�
isinstance�str)�.0�v�r�+/usr/lib64/python3.6/distutils/extension.py�	<genexpr>jsz%Extension.__init__.<locals>.<genexpr>z#'sources' must be a list of stringsrcSsg|]}t|��qSr)�repr)rZoptionrrr�
<listcomp>�sz&Extension.__init__.<locals>.<listcomp>z, zUnknown Extension options: %s)rr�AssertionError�list�all�name�sources�include_dirs�
define_macros�undef_macros�library_dirs�	libraries�runtime_library_dirs�
extra_objects�extra_compile_args�extra_link_args�export_symbols�	swig_opts�depends�language�optional�len�join�sorted�warnings�warn)�selfrrrrrrrrrrrrrrrr�kwZoptions�msgrrr�__init__Vs4













zExtension.__init__cCsd|jj|jj|jt|�fS)Nz<%s.%s(%r) at %#x>)�	__class__�
__module__�__qualname__r�id)r$rrr�__repr__�s
zExtension.__repr__)NNNNNNNNNNNNNN)�__name__r)r*r'r,rrrrrsD
!rcCs�ddlm}m}m}ddlm}ddlm}||�}||dddddd�}�zhg}�x\|j�}	|	dkrfP|j	|	�rrqT|	d|	d#ko�dknr�|j
d|	�qT||	|�}	||	�}
|
d}t|g�}d}
�x�|
dd�D�]�}|
dk	r�|
j|�d}
q�t
jj|�d}|dd	�}|d	d�}|d$k�r8|jj|�q�|dk�rP|jj|�q�|dk�r�|jd�}|d%k�r�|jj|df�n$|jj|d|�||d	d�f�q�|dk�r�|jj|�q�|dk�r�|jj|�q�|dk�r�|jj|�q�|dk�r|jj|�q�|dk�r|jj|�q�|dk�r0|j}
q�|dk�rB|j}
q�|dk�rT|j}
q�|dk�rx|jj|�|�s�|j}
q�|d&k�r�|jj|�q�|j
d"|�q�W|j|�qTWWd|j�X|S)'Nr)�parse_makefile�expand_makefile_vars�_variable_rx)�TextFile)�split_quoted�)Zstrip_commentsZskip_blanksZ
join_linesZ	lstrip_wsZ	rstrip_ws�*z'%s' lines not handled yet��.c�.cc�.cpp�.cxx�.c++�.m�.mmz-Iz-D�=z-Uz-Cz-lz-Lz-Rz-rpathz-Xlinkerz
-Xcompilerz-u�.a�.so�.sl�.o�.dylibzunrecognized argument '%s'���)r6r7r8r9r:r;r<rC)r>r?r@rArB)Zdistutils.sysconfigr.r/r0Zdistutils.text_filer1Zdistutils.utilr2�readline�matchr#r�append�os�path�splitextrr�findrrrrrrrr�close)�filenamer.r/r0r1r2�vars�file�
extensions�lineZwords�moduleZextZappend_next_wordZword�suffixZswitch�valueZequalsrrr�read_setup_file�s�

 


















rT)rGr"rrTrrrr�<module>szPKV[C^�f� � *__pycache__/sysconfig.cpython-36.opt-2.pycnu�[���3

�]dh�N�@s�ddlZddlZddlZddlZddlmZejjej�Z	ejjej
�Zejjej�Z
ejjej�Zdejkr�ejjejd�Znejjejjej��Zejdkr�ej�jd+�r�ejjejje��Zdd	�Zeed
d�Zeo�ejdko�ej�jd,��r
ejjejje��Zdd�Ze�Zd
Zye�s*ejZWnek
�rBYnXdd�Z d-dd�Z!d.dd�Z"dd�Z#dd�Z$dd�Z%d/dd�Z&ej'd�Z(ej'd�Z)ej'd�Z*d0dd �Z+d!d"�Z,da-d#d$�Z.d%d&�Z/d'd(�Z0d)d*�Z1dS)1�N�)�DistutilsPlatformErrorZ_PYTHON_PROJECT_BASE�nt�\pcbuild\win32�\pcbuild\amd64cCs.x(dD] }tjjtjj|d|��rdSqWdS)N�
Setup.dist�Setup.local�ModulesTF)rr)�os�path�isfile�join)�d�fn�r�+/usr/lib64/python3.6/distutils/sysconfig.py�_is_python_source_dir)s
r�_homecCstrtt�Stt�S)N)�	_sys_homer�project_baserrrr�
_python_build2sr�cCsdtjdd�S)Nz%d.%d�)�sys�version_inforrrr�get_python_versionDsrcCs�|dkr|rtpt}tjdkrjtrL|r.tp,tStjjt	d�d�}tjj
|�Sdt�t}tjj|d|�Stjdkr�tjj|d�St
dtj��dS)N�posix�srcdirZInclude�python�includerzFI don't know where Python installs its C header files on platform '%s')�BASE_EXEC_PREFIX�BASE_PREFIXr
�name�python_buildrrrr
�get_config_var�normpathr�build_flagsr)�
plat_specific�prefixZincdirZ
python_dirrrr�get_python_incLs

r)cCs�|dkr&|r|rtpt}n|r"tp$t}tjdkrp|s8|r>d}nd}tjj||dt��}|r`|Stjj|d�Sn<tjdkr�|r�tjj|d�Stjj|dd�Snt	dtj��dS)	Nr�lib64�librz
site-packagesrZLibz?I don't know where Python installs its library on platform '%s')
r r!�EXEC_PREFIX�PREFIXr
r"rr
rr)r'�standard_libr(r+Z	libpythonrrr�get_python_libos(

r/c
Cs�|jdk�r�tjdkr8td�s8ddl}|jt�dtd<tdddd	d
ddd
d�	\	}}}}}}}}	}
dtj	kr�tj	d}tjdkr�dtj	kr�|j
|�r�||t|�d�}|}dtj	kr�tj	d}dtj	kr�tj	d}dtj	kr�tj	d}n|d}dtj	k�r|dtj	d}d	tj	k�r@|dtj	d	}|dtj	d	}dtj	k�r�|dtj	d}|dtj	d}|dtj	d}d
tj	k�r�tj	d
}	dtj	k�r�|	dtj	d}
n|	d|
}
|d|}|j|||d|||||
d�||_
dS)NZunix�darwinZCUSTOMIZED_OSX_COMPILERr�True�CC�CXX�OPT�CFLAGS�CCSHARED�LDSHARED�SHLIB_SUFFIX�AR�ARFLAGSZCPPz -E�LDFLAGS� �CPPFLAGS)Zpreprocessor�compilerZcompiler_soZcompiler_cxxZ	linker_soZ
linker_exe�archiver)Z
compiler_typer�platformr$�_osx_support�customize_compiler�_config_vars�get_config_varsr
�environ�
startswith�lenZset_executablesZshared_lib_extension)r>rAZccZcxx�optZcflagsZccsharedZldsharedZshlib_suffix�arZar_flagsZnewccZcppr?Zcc_cmdrrrrB�s\


 











rBcCsDtr,tjdkr"tjjtptd�}q6tp(t}n
tdd�}tjj|d�S)Nr�PCr)r'z
pyconfig-64.h)r#r
r"rr
rrr))�inc_dirrrr�get_config_h_filename�s


rLcCs\trtjjtptd�Stddd�}djt�t	�}t
tjd�rL|dtjj
7}tjj||d�S)N�Makefilerr)r'r.zconfig-{}{}�
_multiarchz-%s)r#r
rr
rrr/�formatrr&�hasattrr�implementationrN)Zlib_dirZconfig_filerrr�get_makefile_filename�srRcCs�|dkri}tjd�}tjd�}xx|j�}|s0P|j|�}|rz|jdd�\}}yt|�}Wntk
rnYnX|||<q"|j|�}|r"d||jd�<q"W|S)Nz"#define ([A-Z][A-Za-z0-9_]+) (.*)
z&/[*] #undef ([A-Z][A-Za-z0-9_]+) [*]/
rrr)�re�compile�readline�match�group�int�
ValueError)�fp�g�	define_rx�undef_rx�line�m�n�vrrr�parse_config_h�s(




rbz"([a-zA-Z][a-zA-Z0-9_]+)\s*=\s*(.*)z\$\(([A-Za-z][A-Za-z0-9_]*)\)z\${([A-Za-z][A-Za-z0-9_]*)}cCs�ddlm}||ddddd�}|dkr*i}i}i}x�|j�}|dkrFPtj|�}|r4|jdd�\}}	|	j�}	|	jdd�}
d	|
kr�|	||<q4yt|	�}	Wn$t	k
r�|	jdd	�||<Yq4X|	||<q4Wd}�x�|�r��x�t
|�D�]�}||}
tj|
��pt
j|
�}|�rx|jd�}d
}||k�r2t||�}n�||k�rBd}nx|tjk�rZtj|}n`||k�r�|jd��r�|dd�|k�r�d}n$d||k�r�d}nt|d|�}nd||<}|�r~|
|j�d�}|
d|j��||}
d	|k�r�|
||<nzyt|
�}
Wn"t	k
�r*|
j�||<Yn
X|
||<||=|jd��r~|dd�|k�r~|dd�}||k�r~|
||<q�||=q�Wq�W|j�x.|j�D]"\}}	t|	t��r�|	j�||<�q�W|j|�|S)Nr)�TextFiler�surrogateescape)Zstrip_commentsZskip_blanksZ
join_lines�errorsrz$$r�$r5r;r=TF�PY_�)r5r;r=)Zdistutils.text_filercrU�_variable_rxrVrW�strip�replacerXrY�list�_findvar1_rx�search�_findvar2_rx�strr
rErF�end�start�close�items�
isinstance�update)rr[rcrZ�done�notdoner^r_r`ra�tmpv�renamed_variablesr"�value�found�item�after�krrr�parse_makefiles�











r�cCsZxTtj|�ptj|�}|rP|j�\}}|d|�|j|jd��||d�}qPqW|S)Nrr)rmrnro�span�getrW)�s�varsr_Zbegrqrrr�expand_makefile_vars�s*r�c	CsVtjjddjtjtjttjdd�d��}t	|t
�t�dgd�}|j}ia
t
j|�dS)N�_PYTHON_SYSCONFIGDATA_NAMEz+_sysconfigdata_{abi}_{platform}_{multiarch}rNr)�abir@�	multiarch�build_time_varsr)r
rEr�rOr�abiflagsr@�getattrrQ�
__import__�globals�localsr�rCrv)r"�_tempr�rrr�_init_posix�sr�cCs~i}tddd�|d<tddd�|d<tdd�|d<tj�d|d<d	|d
<t�jdd�|d
<tjjtjj	t
j��|d<|adS)Nrr)r'r.�LIBDEST�
BINLIBDEST)r'�	INCLUDEPY�
EXT_SUFFIXz.exe�EXE�.r�VERSION�BINDIR)
r/r)�_imp�extension_suffixesrrkr
r�dirname�abspathr�
executablerC)r[rrr�_init_nt�sr�cGs^tdk�r(t�jdtj�}|r(|�niattd<ttd<tjd�}|dk	rV|td<tjdt�}tjdkr�tr�tj	j
t��}tj	j||�}ntj	j
t��}tj	j
tj	j|��td<to�tjdk�r
t}tj	jtd�o�|tj�k�r
tj	j|td�}tj	j|�td<tjdk�r(d	dl}|jt�|�rVg}x|D]}|jtj|���q8W|StSdS)
NZ_init_r(�exec_prefixr��SOrrr0r)rCr�r�r
r"r-r,rr#rr�rRr
r�r%�isabs�getcwdrr@rA�customize_config_vars�append)�args�funcr�r�baserA�valsr"rrrrD�s@




rDcCs*|dkrddl}|jdtd�t�j|�S)Nr�rz SO is deprecated, use EXT_SUFFIXr)�warnings�warn�DeprecationWarningrDr�)r"r�rrrr$sr$)rr)rr)rN)rrN)N)N)2r�r
rSrrerrr%r(r-r�r,�base_prefixr!�base_exec_prefixr rEr�rr�r�r"�lower�endswithrr�rrr#r&r��AttributeErrorrr)r/rBrLrRrbrTrirmror�r�rCr�r�rDr$rrrr�<module>sX



#
+I





jJPKV[樤,�4�4(__pycache__/_msvccompiler.cpython-36.pycnu�[���3


 \KT�@s�dZddlZddlZddlZddlZddlZddlmZmZm	Z	m
Z
mZddlm
Z
mZddlmZddlmZddlmZdd	�Zd
d�Zdd
�Zdd�Zddd�Zddd�Zedg�ZGdd�de
�ZdS)adistutils._msvccompiler

Contains MSVCCompiler, an implementation of the abstract CCompiler class
for Microsoft Visual Studio 2015.

The module is compatible with VS 2015 and later. You can find legacy support
for older versions in distutils.msvc9compiler and distutils.msvccompiler.
�N)�DistutilsExecError�DistutilsPlatformError�CompileError�LibError�	LinkError)�	CCompiler�gen_lib_options)�log)�get_platform)�countc$Cs�ytjtjdtjtjBd�}Wntk
r<tjd�dSXd}d}|��x�t�D]�}ytj	||�\}}}Wntk
r�PYnX|rT|tj
krTtjj
|�rTytt|��}Wnttfk
r�wTYnX|dkrT||krT||}}qTWWdQRX||fS)Nz'Software\Microsoft\VisualStudio\SxS\VC7)�accesszVisual C++ is not registeredr�)NN)�winregZ	OpenKeyEx�HKEY_LOCAL_MACHINEZKEY_READZKEY_WOW64_32KEY�OSErrorr	�debugrZ	EnumValueZREG_SZ�os�path�isdir�int�float�
ValueError�	TypeError)�key�best_version�best_dir�i�v�vc_dirZvt�version�r �//usr/lib64/python3.6/distutils/_msvccompiler.py�_find_vc2015s0
r"c
s�ddl�ddl}d}d}g���fdd�}|j|d�}|j�|j�x��D]~\}}}}d|krLtjj|ddd�}	tjj|	�s�qLytd	d
�|j	d�D��}
Wnt
tfk
r�wLYnX|
|krL|
|	}}qLWy|d}Wntk
r�d}YnX||fS)
Nrcs�j�j��dS)N)�extend�findallr )�_distutils_findvs�all_packagesr r!�_getallDsz_find_vc2017.<locals>._getall)�targetz1Microsoft.VisualStudio.Component.VC.Tools.x86.x64ZVCZ	AuxiliaryZBuildcss|]}t|�VqdS)N)r)�.0rr r r!�	<genexpr>Psz_find_vc2017.<locals>.<genexpr>�.)r)
r%�	threadingZThread�start�joinrrr�tuple�splitrr�
IndexError)r,rrr'�t�nameZversion_strrZpackagesrrr )r%r&r!�_find_vc2017:s2
r4cCs
t�\}}d}d|krdnd}|rztjj|ddddddd	�}yd
dl}|j|dd�d}Wntttfk
rxd}YnX|s�t�\}}|r�tjj|d|dd	�}|s�t	j
d�dStjj|d�}tjj|�s�t	j
d|�dS|p�tjj|��rt	j
d|�d}||fS)N�amd64Zx64�x86z..ZredistZMSVCz**zMicrosoft.VC141.CRTzvcruntime140.dllrT)�	recursive�zMicrosoft.VC140.CRTz$No suitable Visual C++ version foundz
vcvarsall.batz%s cannot be found���)NN)NN)r4rrr.�glob�ImportErrorr�LookupErrorr"r	r�isfile)�	plat_specrr�	vcruntimeZvcruntime_platZvcredistr:�	vcvarsallr r r!�_find_vcvarsall[s6



rAcCs�tjd�rdd�tjj�D�St|�\}}|s6td��y&tjdj||�tj	d�j
ddd	�}Wn@tjk
r�}z"tj
|j�td
j|j���WYdd}~XnXdd�dd
�|j�D�D�}|r�||d<|S)NZDISTUTILS_USE_SDKcSsi|]\}}||j��qSr )�lower)r)r�valuer r r!�
<dictcomp>sz_get_vc_env.<locals>.<dictcomp>zUnable to find vcvarsall.batzcmd /u /c "{}" {} && set)�stderrzutf-16le�replace)�errorszError executing {}cSs$i|]\}}}|r|r||j��qSr )rB)r)r�_rCr r r!rD�scss|]}|jd�VqdS)�=N)�	partition)r)�liner r r!r*�sz_get_vc_env.<locals>.<genexpr>�py_vcruntime_redist)r�getenv�environ�itemsrAr�
subprocessZcheck_output�formatZSTDOUT�decodeZCalledProcessErrorr	�error�output�cmd�
splitlines)r>r@r?�out�exc�envr r r!�_get_vc_env}s(


rZcCsN|stjd�jtj�}x2|D]*}tjjtjj|�|�}tjj|�r|SqW|S)atReturn path to an MSVC executable program.

    Tries to find the program in several places: first, one of the
    MSVC program search paths from the registry; next, the directories
    in the PATH environment variable.  If any of those work, return an
    absolute path that is known to exist.  If none of them work, just
    return the original program name, 'exe'.
    r)rrMr0�pathseprr.�abspathr=)Zexe�paths�p�fnr r r!�	_find_exe�s	
r`r6Z	x86_amd64)Zwin32z	win-amd64zvcruntime140.dllc
s�eZdZdZdZiZdgZdddgZdgZdgZ	eeee	Z
d	Zd
ZdZ
dZd
ZZdZd*dd�Zd+dd�Zd,dd�Zd-dd�Zd.dd�Zd/dd�Zdd�Z�fd d!�Zd"d#�Zd$d%�Zd&d'�Zd0d(d)�Z�ZS)1�MSVCCompilerzwConcrete class that implements an interface to Microsoft Visual C++,
       as defined by the CCompiler abstract class.Zmsvcz.cz.ccz.cppz.cxxz.rcz.mcz.resz.objz.libz.dllz%s%sz.exercCs tj||||�d|_d|_dS)NF)r�__init__�	plat_name�initialized)�self�verboseZdry_runZforcer r r!rb�szMSVCCompiler.__init__NcCsN|jstd��|dkrt�}|tkr8tdjtt����t|}t|�}|sTtd��|jdd�|_	|j	j
tj�}t
d|�|_t
d|�|_t
d|�|_t
d	|�|_t
d
|�|_t
d|�|_|jdd�|_x2|jd
d�j
tj�D]}|r�|j|jtj��q�Wx6|jdd�j
tj�D]}|�r|j|jtj���qWd|_dddddg|_|jj|j�rZdnd�ddddddg|_dddg}|j�s�|jd%�ddddg}|d&�|_|d'�|_|d(�|_ |d)�|_!|�|_"|�|_#t$j%df|jt$j%d#f|jt$j%d$f|jt$j&df|j t$j&d#f|j t$j&d$f|j!t$j'df|j"t$j'd#f|j"t$j'd$f|j#i	|_(d$|_dS)*Nzdon't init multiple timesz--plat-name must be one of {}z7Unable to find a compatible Visual Studio installation.r�zcl.exezlink.exezlib.exezrc.exezmc.exezmt.exerL�include�libz/nologoz/Oxz/W3z/GLz/DNDEBUGz/MDz/MTz/Odz/MDdz/Ziz/D_DEBUGz/INCREMENTAL:NOz/LTCG�/nodefaultlib:libucrt.lib�ucrt.libz/DEBUG:FULL�/MANIFEST:EMBED,ID=1�/DLL�/MANIFEST:EMBED,ID=2�/MANIFESTUAC:NOFT)rjrk)rl)rl)rmrnro)rmrnro))rd�AssertionErrorr
�PLAT_TO_VCVARSrrQr/rZ�get�_pathsr0rr[r`�cc�linkerri�rc�mcZmt�_vcruntime_redistZadd_include_dir�rstrip�sepZadd_library_dirZpreprocess_options�compile_options�append�compile_options_debugr#Zldflags_exeZldflags_exe_debugZldflags_sharedZldflags_shared_debugZldflags_staticZldflags_static_debugrZ
EXECUTABLEZ
SHARED_OBJECTZSHARED_LIBRARY�_ldflags)rercr>Zvc_envr]�dir�ldflagsZ
ldflags_debugr r r!�
initialize�sb





zMSVCCompiler.initializergcsT�fdd��jD��fdd��j�jD����p4d����fdd�}tt||��S)Ncsi|]}�j|�qSr )�
obj_extension)r)�ext)rer r!rD8sz1MSVCCompiler.object_filenames.<locals>.<dictcomp>csi|]}�j|�qSr )�
res_extension)r)r�)rer r!rD9srgcs�tjj|�\}}�r"tjj|�}n2tjj|�\}}|jtjjtjjf�rT|dd�}ytjj�|�|�St	k
r�t
dj|���YnXdS)Nr8zDon't know how to compile {})rr�splitext�basename�
splitdrive�
startswithrz�altsepr.r<rrQ)r^�baser�rH)�ext_map�
output_dir�	strip_dirr r!�
make_out_path>sz4MSVCCompiler.object_filenames.<locals>.make_out_path)�src_extensions�_rc_extensions�_mc_extensions�list�map)reZsource_filenamesr�r�r�r )r�r�rer�r!�object_filenames3s
zMSVCCompiler.object_filenamesc	Cs�|js|j�|j||||||�}	|	\}}
}}}|p6g}
|
jd�|rT|
j|j�n|
j|j�d}�x|
D�]}y||\}}Wntk
r�wlYnX|r�tj	j
|�}||jkr�d|}�nD||jkr�d|}d}�n*||j
k�rB|}d|}y|j|jg|||g�Wqltk
�r<}zt|��WYdd}~XqlXqln�||jk�r�tj	j|�}tj	j|�}y\|j|jd|d||g�tj	jtj	j|��\}}tj	j||d	�}|j|jd||g�Wqltk
�r�}zt|��WYdd}~XqlXqlntd
j||���|jg|
|}|�r$|jd�|j|�|jd|�|j|�y|j|�Wqltk
�r�}zt|��WYdd}~XqlXqlW|
S)
Nz/cFz/Tcz/TpTz/foz-hz-rz.rcz"Don't know how to compile {} to {}z/EHscz/Fo)rdr�Z_setup_compiler|r#r}r{�KeyErrorrrr\�
_c_extensions�_cpp_extensionsr��spawnrvrrr��dirnamerwr�r�r.rQrt)reZsourcesr�ZmacrosZinclude_dirsr�
extra_preargs�extra_postargsZdependsZcompile_info�objectsZpp_optsZbuildZcompile_optsZadd_cpp_opts�obj�srcr�Z	input_optZ
output_opt�msgZh_dirZrc_dirr�rHZrc_file�argsr r r!�compileTsn








zMSVCCompiler.compilec	Cs�|js|j�|j||�\}}|j||d�}|j||�r�|d|g}|rJy,tjd|jdj|��|j	|jg|�Wq�t
k
r�}zt|��WYdd}~Xq�Xntjd|�dS)N)r�z/OUT:zExecuting "%s" %s� zskipping %s (up-to-date))rdr��_fix_object_args�library_filename�
_need_linkr	rrir.r�rr)	rer�Zoutput_libnamer�r�target_lang�output_filenameZlib_argsr�r r r!�create_static_lib�szMSVCCompiler.create_static_libcCs�|js|j�|j||�\}}|j|||�}|\}}}|rL|jdt|��t||||�}|dk	rptjj	||�}|j
||��r�|j||	f}dd�|p�gD�}||||d|g}tjj|d�}|dk	�rtjj
tjj|��\}}tjj	||j|��}|jd|�|
�r|
|dd�<|�r.|j|�tjjtjj|��}|j|�y6tjd|jdj	|��|j|jg|�|j|�Wn,tk
�r�}zt|��WYdd}~XnXntjd	|�dS)
Nz5I don't know what to do with 'runtime_library_dirs': cSsg|]}d|�qS)z/EXPORT:r )r)Zsymr r r!�
<listcomp>�sz%MSVCCompiler.link.<locals>.<listcomp>z/OUT:rz/IMPLIB:zExecuting "%s" %sr�zskipping %s (up-to-date))rdr�r�Z
_fix_lib_args�warn�strrrrr.r�r~r�r�r�r�r|r#r\Zmkpathr	rrur��_copy_vcruntimerr)reZtarget_descr�r�r�Z	librariesZlibrary_dirsZruntime_library_dirsZexport_symbolsrr�r�Z
build_tempr�Z
fixed_argsZlib_optsr�Zexport_optsZld_argsZdll_nameZdll_extZimplib_filer�r r r!�link�sN



zMSVCCompiler.linkcCs`|j}|stjj|�rdStjj|�j�tkr6dStjd|�t	j
||�}tj|tj
�dS)NzCopying "%s")rxrrr=r�rB�
_BUNDLED_DLLSr	r�shutil�copy�chmod�stat�S_IWRITE)rer�r?r r r!r�szMSVCCompiler._copy_vcruntimecs4tjd�}z|jtjd<t�j|�S|tjd<XdS)Nr)rrMrsrN�superr�)rerUZold_path)�	__class__r r!r�s

zMSVCCompiler.spawncCsd|S)Nz	/LIBPATH:r )rerr r r!�library_dir_option&szMSVCCompiler.library_dir_optioncCstd��dS)Nz:don't know how to set runtime library search path for MSVC)r)rerr r r!�runtime_library_dir_option)sz'MSVCCompiler.runtime_library_dir_optioncCs
|j|�S)N)r�)rerir r r!�library_option-szMSVCCompiler.library_optioncCs`|r|d|g}n|g}xB|D]6}x0|D](}tjj||j|��}tjj|�r(|Sq(WqWdSdS)NZ_d)rrr.r�r=)re�dirsrirZ	try_namesrr3Zlibfiler r r!�find_library_file0s

zMSVCCompiler.find_library_file)rrr)N)rrg)NNNrNNN)NrN)
NNNNNrNNNN)r)�__name__�
__module__�__qualname__�__doc__Z
compiler_typeZexecutablesr�r�r�r�r�r�r�Zstatic_lib_extensionZshared_lib_extensionZstatic_lib_formatZshared_lib_formatZ
exe_extensionrbr�r�r�r�r�r�r�r�r�r�r��
__classcell__r r )r�r!ra�sN


T

[

9ra)N)r�rr�r�rPrZdistutils.errorsrrrrrZdistutils.ccompilerrrZ	distutilsr	Zdistutils.utilr
�	itertoolsrr"r4rArZr`rq�	frozensetr�rar r r r!�<module>s&!" 

PKV[4Sc<!<!*__pycache__/cygwinccompiler.cpython-36.pycnu�[���3


 \[@�@s�dZddlZddlZddlZddlmZmZmZddlZddl	m
Z
mZddlm
Z
ddlmZddlmZmZmZmZddlmZdd	lmZdd
lmZdd�ZGd
d�de
�ZGdd�de�ZdZdZdZ dd�Z!ej"d�Z#dd�Z$dd�Z%dd�Z&dS)adistutils.cygwinccompiler

Provides the CygwinCCompiler class, a subclass of UnixCCompiler that
handles the Cygwin port of the GNU C compiler to Windows.  It also contains
the Mingw32CCompiler class which handles the mingw32 port of GCC (same as
cygwin in no-cygwin mode).
�N)�Popen�PIPE�check_output)�gen_preprocess_options�gen_lib_options)�
UnixCCompiler)�
write_file)�DistutilsExecError�CCompilerError�CompileError�UnknownFileError)�log)�LooseVersion)�find_executablecCs�tjjd�}|dkr|tj|d|d�}|dkr8dgS|dkrFdgS|d	krTd
gS|dkrbdgS|d
krpdgStd|��dS)zaInclude the appropriate MSVC runtime library if Python was built
    with MSVC 7.0 or later.
    zMSC v.���
Z1300Zmsvcr70Z1310Zmsvcr71Z1400Zmsvcr80Z1500Zmsvcr90Z1600Zmsvcr100zUnknown MS Compiler version %s N���)�sys�version�find�
ValueError)Zmsc_posZmsc_ver�r�1/usr/lib64/python3.6/distutils/cygwinccompiler.py�	get_msvcr?src
@sReZdZdZdZdZdZdZdZdZ	dZ
dd
d�Zdd
�Zddd�Z
ddd�ZdS)�CygwinCCompilerz? Handles the Cygwin port of the GNU C compiler to Windows.
    �cygwinz.oz.az.dllzlib%s%sz%s%sz.exercCs�tj||||�t�\}}|jd||f�|tk	rB|jd|�t�\|_|_|_	|j|j
d|j|j|j	f�|jdkr�d|_nd|_|jdkr�d}nd	}|jd
ddd
d|j|fd�|jdkr�dg|_
|jd�nt�|_
dS)Nz%Python's GCC status: %s (details: %s)z�Python's pyconfig.h doesn't seem to support your compiler. Reason: %s. Compiling may fail because of undefined preprocessor macros.z: gcc %s, ld %s, dllwrap %s
z2.10.90�gcc�dllwrapz2.13z-sharedz
-mdll -staticzgcc -mcygwin -O -Wallzgcc -mcygwin -mdll -O -Wallzg++ -mcygwin -O -Wallzgcc -mcygwinz%s -mcygwin %s)�compiler�compiler_so�compiler_cxx�
linker_exe�	linker_soz2.91.57Zmsvcrtz,Consider upgrading to a newer version of gcc)r�__init__�check_config_hZdebug_print�CONFIG_H_OK�warn�get_versions�gcc_version�
ld_versionZdllwrap_version�
compiler_type�
linker_dll�set_executables�
dll_librariesr)�self�verbose�dry_run�forceZstatusZdetails�
shared_optionrrrr$ds<




zCygwinCCompiler.__init__cCs�|dks|dkrVy|jdd|d|g�Wq�tk
rR}zt|��WYdd}~Xq�XnNy"|j|j||d|g|�Wn*tk
r�}zt|��WYdd}~XnXdS)z:Compiles the source by spawning GCC and windres if needed.z.rcz.resZwindresz-iz-oN)Zspawnr	rr )r/�obj�src�extZcc_args�extra_postargsZpp_opts�msgrrr�_compile�szCygwinCCompiler._compileNcCsRtj|
p
g�}
tj|pg�}tj|p&g�}|j|j�|dk	oP||jksT|jdk�rtjj|d�}tjjtjj	|��\}}tjj
||d�}tjj
|d|d�}dtjj	|�dg}x|D]}|j|�q�W|jt
||fd	|�|jd
k�r|
jd|g�|
jd|g�n
|j|�|	�s*|
jd
�tj||||||||d|	|
|||
�dS)zLink the objects.Nrrz.def�libz.az
LIBRARY %sZEXPORTSz
writing %srz--output-libz--defz-s)�copy�extendr.Z
EXECUTABLEr,�os�path�dirname�splitext�basename�join�appendZexecuterr�link)r/Ztarget_descZobjectsZoutput_filename�
output_dirZ	librariesZlibrary_dirsZruntime_library_dirsZexport_symbols�debugZ
extra_preargsr7Z
build_tempZtarget_langZtemp_dirZdll_nameZ
dll_extensionZdef_fileZlib_file�contentsZsymrrrrD�s:	



zCygwinCCompiler.link�cCs�|dkrd}g}x�|D]�}tjjtjj|��\}}||jddgkrTtd||f��|rdtjj|�}|dkr�|jtjj||||j	��q|jtjj|||j	��qW|S)z#Adds supports for rc and res files.NrH�.rc�.resz"unknown file type '%s' (from '%s'))rJrI)
r=r>r@�normcaseZsrc_extensionsrrArCrB�
obj_extension)r/Zsource_filenamesZ	strip_dirrEZ	obj_namesZsrc_name�baser6rrr�object_filenames�s 
z CygwinCCompiler.object_filenames)rrr)
NNNNNrNNNN)rrH)�__name__�
__module__�__qualname__�__doc__r+rLZstatic_lib_extensionZshared_lib_extensionZstatic_lib_formatZshared_lib_formatZ
exe_extensionr$r9rDrNrrrrrYs
;
Krc@seZdZdZdZddd�ZdS)�Mingw32CCompilerz@ Handles the Mingw32 port of the GNU C compiler to Windows.
    Zmingw32rc	Csxtj||||�|jdkr d}nd}|jdkr4d}nd}t�rFtd��|jdd	d
dd|j||fd
�g|_t	�|_dS)Nz2.13z-sharedz
-mdll -staticz2.91.57z--entry _DllMain@12rHz1Cygwin gcc cannot be used with --compiler=mingw32zgcc -O -Wallzgcc -mdll -O -Wallzg++ -O -Wallrz%s %s %s)rr r!r"r#)
rr$r*r)�is_cygwingccr
r-r,r.r)r/r0r1r2r3Zentry_pointrrrr$s&

zMingw32CCompiler.__init__N)rrr)rOrPrQrRr+r$rrrrrSsrS�okznot okZ	uncertaincCs�ddlm}dtjkrtdfS|j�}y@t|�}z(d|j�krJtd|fStd|fSWd|j	�XWn.t
k
r�}ztd	||jffSd}~XnXdS)
awCheck if the current Python installation appears amenable to building
    extensions with GCC.

    Returns a tuple (status, details), where 'status' is one of the following
    constants:

    - CONFIG_H_OK: all is well, go ahead and compile
    - CONFIG_H_NOTOK: doesn't look good
    - CONFIG_H_UNCERTAIN: not sure -- unable to read pyconfig.h

    'details' is a human-readable string explaining the situation.

    Note there are two ways to conclude "OK": either 'sys.version' contains
    the string "GCC" (implying that this Python was built with GCC), or the
    installed "pyconfig.h" contains the string "__GNUC__".
    r)�	sysconfigZGCCzsys.version mentions 'GCC'Z__GNUC__z'%s' mentions '__GNUC__'z '%s' does not mention '__GNUC__'Nzcouldn't read '%s': %s)
�	distutilsrVrrr&�get_config_h_filename�open�read�CONFIG_H_NOTOK�close�OSError�CONFIG_H_UNCERTAIN�strerror)rV�fn�config_h�excrrrr%Hs
r%s(\d+\.\d+(\.\d+)*)cCsl|j�d}t|�dkrdSt|dtd�j}z|j�}Wd|j�Xtj|�}|dkrZdSt	|j
d�j��S)z�Find the version of an executable by running `cmd` in the shell.

    If the command is not found, or the output does not match
    `RE_VERSION`, returns None.
    rNT)�shell�stdoutr)�splitrrrrdrZr\�
RE_VERSION�searchr�group�decode)�cmd�
executable�out�
out_string�resultrrr�_find_exe_versionus

rocCsdddg}tdd�|D��S)zg Try to find out the versions of gcc, ld and dllwrap.

    If not possible it returns None for it.
    zgcc -dumpversionzld -vzdllwrap --versioncSsg|]}t|��qSr)ro)�.0rjrrr�
<listcomp>�sz get_versions.<locals>.<listcomp>)�tuple)Zcommandsrrrr(�s
r(cCstddg�}|j�jd�S)z>Try to determine if the gcc that would be used is from cygwin.rz-dumpmachinescygwin)r�strip�endswith)rmrrrrT�srT)'rRr=rr;�
subprocessrrr�reZdistutils.ccompilerrrZdistutils.unixccompilerrZdistutils.file_utilrZdistutils.errorsr	r
rrrWr
Zdistutils.versionrZdistutils.spawnrrrrSr&r[r^r%�compilerfror(rTrrrr�<module>s0);1+
PKV[6��bb'__pycache__/errors.cpython-36.opt-1.pycnu�[���3


 \�
�@s8dZGdd�de�ZGdd�de�ZGdd�de�ZGdd�de�ZGd	d
�d
e�ZGdd�de�ZGd
d�de�ZGdd�de�Z	Gdd�de�Z
Gdd�de�ZGdd�de�ZGdd�de�Z
Gdd�de�ZGdd�de�ZGdd�de�ZGdd �d e�ZGd!d"�d"e�ZGd#d$�d$e�ZGd%d&�d&e�Zd'S)(a�distutils.errors

Provides exceptions used by the Distutils modules.  Note that Distutils
modules may raise standard exceptions; in particular, SystemExit is
usually raised for errors that are obviously the end-user's fault
(eg. bad command-line arguments).

This module is safe to use in "from ... import *" mode; it only exports
symbols whose names start with "Distutils" and end with "Error".c@seZdZdZdS)�DistutilsErrorzThe root of all Distutils evil.N)�__name__�
__module__�__qualname__�__doc__�rr�(/usr/lib64/python3.6/distutils/errors.pyrsrc@seZdZdZdS)�DistutilsModuleErrorz�Unable to load an expected module, or to find an expected class
    within some module (in particular, command modules and classes).N)rrrrrrrrrsrc@seZdZdZdS)�DistutilsClassErrorz�Some command class (or possibly distribution class, if anyone
    feels a need to subclass Distribution) is found not to be holding
    up its end of the bargain, ie. implementing some part of the
    "command "interface.N)rrrrrrrrr	sr	c@seZdZdZdS)�DistutilsGetoptErrorz7The option table provided to 'fancy_getopt()' is bogus.N)rrrrrrrrr
sr
c@seZdZdZdS)�DistutilsArgErrorzaRaised by fancy_getopt in response to getopt.error -- ie. an
    error in the command line usage.N)rrrrrrrrrsrc@seZdZdZdS)�DistutilsFileErrorz�Any problems in the filesystem: expected file not found, etc.
    Typically this is for problems that we detect before OSError
    could be raised.N)rrrrrrrrr$src@seZdZdZdS)�DistutilsOptionErrora�Syntactic/semantic errors in command options, such as use of
    mutually conflicting options, or inconsistent options,
    badly-spelled values, etc.  No distinction is made between option
    values originating in the setup script, the command line, config
    files, or what-have-you -- but if we *know* something originated in
    the setup script, we'll raise DistutilsSetupError instead.N)rrrrrrrrr
*sr
c@seZdZdZdS)�DistutilsSetupErrorzqFor errors that can be definitely blamed on the setup script,
    such as invalid keyword arguments to 'setup()'.N)rrrrrrrrr3src@seZdZdZdS)�DistutilsPlatformErrorz�We don't know how to do something on the current platform (but
    we do know how to do it on some platform) -- eg. trying to compile
    C files on a platform not supported by a CCompiler subclass.N)rrrrrrrrr8src@seZdZdZdS)�DistutilsExecErrorz`Any problems executing an external program (such as the C
    compiler, when compiling C files).N)rrrrrrrrr>src@seZdZdZdS)�DistutilsInternalErrorzoInternal inconsistencies or impossibilities (obviously, this
    should never be seen if the code is working!).N)rrrrrrrrrCsrc@seZdZdZdS)�DistutilsTemplateErrorz%Syntax error in a file list template.N)rrrrrrrrrHsrc@seZdZdZdS)�DistutilsByteCompileErrorzByte compile error.N)rrrrrrrrrKsrc@seZdZdZdS)�CCompilerErrorz#Some compile/link operation failed.N)rrrrrrrrrOsrc@seZdZdZdS)�PreprocessErrorz.Failure to preprocess one or more C/C++ files.N)rrrrrrrrrRsrc@seZdZdZdS)�CompileErrorz2Failure to compile one or more C/C++ source files.N)rrrrrrrrrUsrc@seZdZdZdS)�LibErrorzKFailure to create a static library from one or more C/C++ object
    files.N)rrrrrrrrrXsrc@seZdZdZdS)�	LinkErrorz]Failure to link one or more C/C++ object files into an executable
    or shared library file.N)rrrrrrrrr\src@seZdZdZdS)�UnknownFileErrorz(Attempt to process an unknown file type.N)rrrrrrrrr`srN)r�	Exceptionrrr	r
rrr
rrrrrrrrrrrrrrrr�<module>	s&	PKV[^��zz#__pycache__/__init__.cpython-36.pycnu�[���3


 \��@s&dZddlZejdejjd��ZdS)z�distutils

The main package for the Python Module Distribution Utilities.  Normally
used from a setup script as

   from distutils.core import setup

   setup (...)
�N� )�__doc__�sys�version�index�__version__�rr�*/usr/lib64/python3.6/distutils/__init__.py�<module>	sPKV[0Ah��(__pycache__/version.cpython-36.opt-2.pycnu�[���3


 \90�@s:ddlZGdd�d�ZGdd�de�ZGdd�de�ZdS)�Nc@sFeZdZddd�Zdd�Zdd�Zdd	�Zd
d�Zdd
�Zdd�Z	dS)�VersionNcCs|r|j|�dS)N)�parse)�self�vstring�r�)/usr/lib64/python3.6/distutils/version.py�__init__&szVersion.__init__cCsd|jjt|�fS)Nz	%s ('%s'))�	__class__�__name__�str)rrrr�__repr__*szVersion.__repr__cCs|j|�}|tkr|S|dkS)Nr)�_cmp�NotImplemented)r�other�crrr�__eq__-s
zVersion.__eq__cCs|j|�}|tkr|S|dkS)Nr)r
r)rrrrrr�__lt__3s
zVersion.__lt__cCs|j|�}|tkr|S|dkS)Nr)r
r)rrrrrr�__le__9s
zVersion.__le__cCs|j|�}|tkr|S|dkS)Nr)r
r)rrrrrr�__gt__?s
zVersion.__gt__cCs|j|�}|tkr|S|dkS)Nr)r
r)rrrrrr�__ge__Es
zVersion.__ge__)N)
r
�
__module__�__qualname__rrrrrrrrrrrrs
rc@s8eZdZejdejejB�Zdd�Zdd�Z	dd�Z
dS)	�
StrictVersionz)^(\d+) \. (\d+) (\. (\d+))? ([ab](\d+))?$cCs�|jj|�}|std|��|jddddd�\}}}}}|rTttt|||g��|_nttt||g��d|_|r�|dt|�f|_nd|_dS)	Nzinvalid version number '%s'�����r)r)	�
version_re�match�
ValueError�group�tuple�map�int�version�
prerelease)rrr�major�minorZpatchr&Zprerelease_numrrrr�szStrictVersion.parsecCsb|jddkr*djtt|jdd���}ndjtt|j��}|jr^||jdt|jd�}|S)Nrr�.r)r%�joinr#rr&)rrrrr�__str__�szStrictVersion.__str__cCs�t|t�rt|�}|j|jkr2|j|jkr.dSdS|jrF|jrFdS|jrX|jrXdS|jrj|jrjdS|jr�|jr�|j|jkr�dS|j|jkr�dSdSndS)Nrr���r,r,)�
isinstancerrr%r&)rrrrrr
�s&
zStrictVersion._cmpN)r
rr�re�compile�VERBOSE�ASCIIrrr+r
rrrrr]s
%
rc@sDeZdZejdej�Zd
dd�Zdd�Zdd�Z	d	d
�Z
dd�ZdS)�LooseVersionz(\d+ | [a-z]+ | \.)NcCs|r|j|�dS)N)r)rrrrrr.szLooseVersion.__init__cCsb||_dd�|jj|�D�}x:t|�D].\}}yt|�||<Wq&tk
rRYq&Xq&W||_dS)NcSsg|]}|r|dkr|�qS)r)r)�.0�xrrr�
<listcomp>8sz&LooseVersion.parse.<locals>.<listcomp>)r�component_re�split�	enumerater$r r%)rrZ
components�i�objrrrr3s
zLooseVersion.parsecCs|jS)N)r)rrrrr+CszLooseVersion.__str__cCsdt|�S)NzLooseVersion ('%s'))r)rrrrrGszLooseVersion.__repr__cCsFt|t�rt|�}|j|jkr"dS|j|jkr2dS|j|jkrBdSdS)Nrrr,)r-rr2r%)rrrrrr
Ks
zLooseVersion._cmp)N)r
rrr.r/r0r6rrr+rr
rrrrr2s!
r2)r.rrr2rrrr�<module>s>/PKV[؉ȯ��.__pycache__/unixccompiler.cpython-36.opt-1.pycnu�[���3

�\dh�:�@s�dZddlZddlZddlZddlmZddlmZddlm	Z	m
Z
mZddlm
Z
mZmZmZddlmZejdkr~ddlZGd	d
�d
e	�ZdS)a9distutils.unixccompiler

Contains the UnixCCompiler class, a subclass of CCompiler that handles
the "typical" Unix-style command-line C compiler:
  * macros defined with -Dname[=value]
  * macros undefined with -Uname
  * include search directories specified with -Idir
  * libraries specified with -lllib
  * library search directories specified with -Ldir
  * compile handled by 'cc' (or similar) executable with -c option:
    compiles .c to .o
  * link static library handled by 'ar' command (possibly with 'ranlib')
  * link shared library handled by 'cc -shared'
�N)�	sysconfig)�newer)�	CCompiler�gen_preprocess_options�gen_lib_options)�DistutilsExecError�CompileError�LibError�	LinkError)�log�darwinc
s�eZdZdZddgdgdgddgdgddgdd�Zejdd�d	krNd
ged
<ddd
dddgZdZdZ	dZ
dZdZdZ
ZZeZejdkr�dZ�fdd�Zd.dd�Zdd�Zd/d d!�Zd0d"d#�Zd$d%�Zd&d'�Zd(d)�Zd*d+�Zd1d,d-�Z�ZS)2�
UnixCCompilerZunixNZccz-shared�arz-cr)�preprocessor�compiler�compiler_so�compiler_cxx�	linker_so�
linker_exe�archiver�ranlib�rrz.cz.Cz.ccz.cxxz.cppz.mz.oz.az.soz.dylibz.tbdzlib%s%s�cygwinz.execs@t�j|||�\}}}tjd�}|r6||kr6|j|�|||fS)z'Remove standard library path from rpath�LIBDIR)�super�
_fix_lib_argsr�get_config_var�remove)�self�	libraries�library_dirs�runtime_library_dirsZlibdir)�	__class__��//usr/lib64/python3.6/distutils/unixccompiler.pyrUs

zUnixCCompiler._fix_lib_argscCs�|jd||�}|\}}}t||�}	|j|	}
|r>|
jd|g�|rN||
dd�<|r\|
j|�|
j|�|js~|dks~t||�r�|r�|jtj	j
|��y|j|
�Wn*tk
r�}zt
|��WYdd}~XnXdS)Nz-or)Z_fix_compile_argsrr�extend�appendZforcer�mkpath�os�path�dirname�spawnrr)r�sourceZoutput_fileZmacrosZinclude_dirs�
extra_preargs�extra_postargs�
fixed_args�ignore�pp_optsZpp_args�msgr#r#r$�
preprocess^s$




zUnixCCompiler.preprocessc	Csp|j}tjdkr tj|||�}y |j|||d|g|�Wn*tk
rj}zt|��WYdd}~XnXdS)Nrz-o)r�sys�platform�_osx_support�compiler_fixupr+rr)	r�obj�srcZextZcc_argsr.r1rr2r#r#r$�_compilexs

zUnixCCompiler._compilercCs�|j||�\}}|j||d�}|j||�r�|jtjj|��|j|j|g||j	�|j
r�y|j|j
|g�Wq�tk
r�}zt|��WYdd}~Xq�Xnt
jd|�dS)N)�
output_dirzskipping %s (up-to-date))�_fix_object_args�library_filename�
_need_linkr'r(r)r*r+r�objectsrrr	r�debug)rr?Zoutput_libnamer;r@�target_lang�output_filenamer2r#r#r$�create_static_lib�szUnixCCompiler.create_static_libcCs�|j||�\}}|j|||�}|\}}}t||||�}t|ttd�f�sPtd��|dk	rftjj	||�}|j
||��r�||j|d|g}|	r�dg|dd�<|
r�|
|dd�<|r�|j|�|j
tjj|��y�|tjkr�|jdd�}n|jdd�}|
dk�rR|j�rRd}tjj|d�dk�rDd}xd||k�rB|d7}�q(W|j|||<tjd	k�rjtj||�}|j||�Wn,tk
�r�}zt|��WYdd}~XnXntjd
|�dS)Nz%'output_dir' must be a string or Nonez-oz-grzc++�env��=rzskipping %s (up-to-date))r<rr�
isinstance�str�type�	TypeErrorr(r)�joinr>r?r%r'r*rZ
EXECUTABLErrr�basenamer4r5r6r7r+rr
rr@)rZtarget_descr?rBr;rr r!Zexport_symbolsr@r-r.Z
build_temprAr/Zlib_optsZld_argsZlinker�ir2r#r#r$�link�sH


zUnixCCompiler.linkcCsd|S)Nz-Lr#)r�dirr#r#r$�library_dir_option�sz UnixCCompiler.library_dir_optioncCsd|kpd|kS)N�gcczg++r#)rZ
compiler_namer#r#r$�_is_gcc�szUnixCCompiler._is_gcccCs�tjjtjd��}tjdd�dkr,d|Stjdd�dkrFd|Stjdd�d	krz|j|�rnd
d|gSdd|gStjdd�dks�tjdd�d
kr�d|gS|j|�r�tjd�dkr�d|Sd|Snd|SdS)N�CCrrz-L�Zfreebsdz-Wl,-rpath=�zhp-uxz-Wl,+sz+sZirix646Zosf1V5z-rpath�GNULD�yesz-Wl,--enable-new-dtags,-Rz-Wl,-Rz-R)r(r)rLrrr4r5rR)rrOrr#r#r$�runtime_library_dir_option�s 
$

z(UnixCCompiler.runtime_library_dir_optioncCsd|S)Nz-lr#)r�libr#r#r$�library_option	szUnixCCompiler.library_optioncCs�|j|dd�}|j|dd�}|j|dd�}|j|dd�}tjdkrptjd�}tjd|�}	|	dkrfd	}
n
|	jd
�}
�x|D�]}tj	j
||�}tj	j
||�}
tj	j
||�}tj	j
||�}tjdko�|jd�s�|jd�o�|jd
��rBtj	j
|
|d
d�|�}tj	j
|
|d
d�|�}
tj	j
|
|d
d�|�}tj	j
|
|d
d�|�}tj	j|
��rT|
Stj	j|��rf|Stj	j|��rx|Stj	j|�rx|SqxWdS)N�shared)Zlib_type�dylib�
xcode_stub�staticr�CFLAGSz-isysroot\s+(\S+)�/rEz/System/z/usr/z/usr/local/)
r=r4r5rr�re�search�groupr(r)rK�
startswith�exists)r�dirsrYr@Zshared_fZdylib_fZxcode_stub_fZstatic_fZcflags�mZsysrootrOr[r\r^r]r#r#r$�find_library_files>




zUnixCCompiler.find_library_file)NNNNN)NrN)
NNNNNrNNNN)r)�__name__�
__module__�__qualname__Z
compiler_typeZexecutablesr4r5Zsrc_extensionsZ
obj_extensionZstatic_lib_extensionZshared_lib_extensionZdylib_lib_extensionZxcode_stub_lib_extensionZstatic_lib_formatZshared_lib_formatZdylib_lib_formatZxcode_stub_lib_formatZ
exe_extensionrr3r:rCrNrPrRrXrZrh�
__classcell__r#r#)r"r$r
-sF

	


6,r
)�__doc__r(r4raZ	distutilsrZdistutils.dep_utilrZdistutils.ccompilerrrrZdistutils.errorsrrr	r
rr5r6r
r#r#r#r$�<module>s
PKV[�� ���&__pycache__/debug.cpython-36.opt-1.pycnu�[���3


 \��@sddlZejjd�ZdS)�NZDISTUTILS_DEBUG)�os�environ�get�DEBUG�rr�'/usr/lib64/python3.6/distutils/debug.py�<module>sPKV[2�jK�.�.$__pycache__/sysconfig.cpython-36.pycnu�[���3

�]dh�N�@s�dZddlZddlZddlZddlZddlmZejjej	�Z
ejjej�Zejjej
�Zejjej�Zdejkr�ejjejd�Znejjejjej��Zejdkr�ej�jd,�r�ejjejje��Zd	d
�Zeedd�Zeo�ejdko�ej�jd-��rejjejje��Zdd
�Ze�ZdZye�s.ejZWne k
�rFYnXdd�Z!d.dd�Z"d/dd�Z#dd�Z$dd�Z%dd�Z&d0dd�Z'ej(d�Z)ej(d�Z*ej(d�Z+d1d d!�Z,d"d#�Z-da.d$d%�Z/d&d'�Z0d(d)�Z1d*d+�Z2dS)2a�Provide access to Python's configuration information.  The specific
configuration variables available depend heavily on the platform and
configuration.  The values may be retrieved using
get_config_var(name), and the list of variables is available via
get_config_vars().keys().  Additional convenience functions are also
available.

Written by:   Fred L. Drake, Jr.
Email:        <fdrake@acm.org>
�N�)�DistutilsPlatformErrorZ_PYTHON_PROJECT_BASE�nt�\pcbuild\win32�\pcbuild\amd64cCs.x(dD] }tjjtjj|d|��rdSqWdS)N�
Setup.dist�Setup.local�ModulesTF)rr)�os�path�isfile�join)�d�fn�r�+/usr/lib64/python3.6/distutils/sysconfig.py�_is_python_source_dir)s
r�_homecCstrtt�Stt�S)N)�	_sys_homer�project_baserrrr�
_python_build2sr�cCsdtjdd�S)z�Return a string containing the major and minor Python version,
    leaving off the patchlevel.  Sample return values could be '1.5'
    or '2.2'.
    z%d.%dN�)�sys�version_inforrrr�get_python_versionDsrcCs�|dkr|rtpt}tjdkrjtrL|r.tp,tStjjt	d�d�}tjj
|�Sdt�t}tjj|d|�Stjdkr�tjj|d�St
dtj��dS)	a�Return the directory containing installed Python header files.

    If 'plat_specific' is false (the default), this is the path to the
    non-platform-specific header files, i.e. Python.h and so on;
    otherwise, this is the path to platform-specific header files
    (namely pyconfig.h).

    If 'prefix' is supplied, use it instead of sys.base_prefix or
    sys.base_exec_prefix -- i.e., ignore 'plat_specific'.
    N�posix�srcdirZInclude�python�includerzFI don't know where Python installs its C header files on platform '%s')�BASE_EXEC_PREFIX�BASE_PREFIXr
�name�python_buildrrrr
�get_config_var�normpathr�build_flagsr)�
plat_specific�prefixZincdirZ
python_dirrrr�get_python_incLs

r)cCs�|dkr&|r|rtpt}n|r"tp$t}tjdkrp|s8|r>d}nd}tjj||dt��}|r`|Stjj|d�Sn<tjdkr�|r�tjj|d�Stjj|dd�Snt	d	tj��dS)
aSReturn the directory containing the Python library (standard or
    site additions).

    If 'plat_specific' is true, return the directory containing
    platform-specific modules, i.e. any module from a non-pure-Python
    module distribution; otherwise, return the platform-shared library
    directory.  If 'standard_lib' is true, return the directory
    containing standard Python library modules; otherwise, return the
    directory for site-specific modules.

    If 'prefix' is supplied, use it instead of sys.base_prefix or
    sys.base_exec_prefix -- i.e., ignore 'plat_specific'.
    Nr�lib64�librz
site-packagesrZLibz?I don't know where Python installs its library on platform '%s')
r r!�EXEC_PREFIX�PREFIXr
r"rr
rr)r'�standard_libr(r+Z	libpythonrrr�get_python_libos(

r/c
Cs�|jdk�r�tjdkr8td�s8ddl}|jt�dtd<tddd	d
ddd
dd�	\	}}}}}}}}	}
dtj	kr�tj	d}tjdkr�dtj	kr�|j
|�r�||t|�d�}|}dtj	kr�tj	d}dtj	kr�tj	d}dtj	kr�tj	d}n|d}dtj	k�r|dtj	d}d
tj	k�r@|dtj	d
}|dtj	d
}dtj	k�r�|dtj	d}|dtj	d}|dtj	d}dtj	k�r�tj	d}	dtj	k�r�|	dtj	d}
n|	d|
}
|d|}|j|||d|||||
d�||_
dS)z�Do any platform-specific customization of a CCompiler instance.

    Mainly needed on Unix, so we can plug in the information that
    varies across Unices and is stored in Python's Makefile.
    Zunix�darwinZCUSTOMIZED_OSX_COMPILERrN�True�CC�CXX�OPT�CFLAGS�CCSHARED�LDSHARED�SHLIB_SUFFIX�AR�ARFLAGSZCPPz -E�LDFLAGS� �CPPFLAGS)Zpreprocessor�compilerZcompiler_soZcompiler_cxxZ	linker_soZ
linker_exe�archiver)Z
compiler_typer�platformr$�_osx_support�customize_compiler�_config_vars�get_config_varsr
�environ�
startswith�lenZset_executablesZshared_lib_extension)r>rAZccZcxx�optZcflagsZccsharedZldsharedZshlib_suffix�arZar_flagsZnewccZcppr?Zcc_cmdrrrrB�s\


 











rBcCsDtr,tjdkr"tjjtptd�}q6tp(t}n
tdd�}tjj|d�S)z2Return full pathname of installed pyconfig.h file.r�PCr)r'z
pyconfig-64.h)r#r
r"rr
rrr))�inc_dirrrr�get_config_h_filename�s


rLcCs\trtjjtptd�Stddd�}djt�t	�}t
tjd�rL|dtjj
7}tjj||d�S)zAReturn full pathname of installed Makefile from the Python build.�Makefilerr)r'r.zconfig-{}{}�
_multiarchz-%s)r#r
rr
rrr/�formatrr&�hasattrr�implementationrN)Zlib_dirZconfig_filerrr�get_makefile_filename�srRcCs�|dkri}tjd�}tjd�}xx|j�}|s0P|j|�}|rz|jdd�\}}yt|�}Wntk
rnYnX|||<q"|j|�}|r"d||jd�<q"W|S)z�Parse a config.h-style file.

    A dictionary containing name/value pairs is returned.  If an
    optional dictionary is passed in as the second argument, it is
    used instead of a new dictionary.
    Nz"#define ([A-Z][A-Za-z0-9_]+) (.*)
z&/[*] #undef ([A-Z][A-Za-z0-9_]+) [*]/
rrr)�re�compile�readline�match�group�int�
ValueError)�fp�g�	define_rx�undef_rx�line�m�n�vrrr�parse_config_h�s(




rbz"([a-zA-Z][a-zA-Z0-9_]+)\s*=\s*(.*)z\$\(([A-Za-z][A-Za-z0-9_]*)\)z\${([A-Za-z][A-Za-z0-9_]*)}cCs�ddlm}||ddddd�}|dkr*i}i}i}x�|j�}|dkrFPtj|�}|r4|jdd�\}}	|	j�}	|	jdd	�}
d
|
kr�|	||<q4yt|	�}	Wn$t	k
r�|	jdd
�||<Yq4X|	||<q4Wd}�x�|�r��x�t
|�D�]�}||}
tj|
��pt
j|
�}|�rx|jd�}d}||k�r2t||�}n�||k�rBd}nx|tjk�rZtj|}n`||k�r�|jd��r�|dd�|k�r�d	}n$d||k�r�d}nt|d|�}nd	||<}|�r~|
|j�d�}|
d|j��||}
d
|k�r�|
||<nzyt|
�}
Wn"t	k
�r*|
j�||<Yn
X|
||<||=|jd��r~|dd�|k�r~|dd�}||k�r~|
||<q�||=q�Wq�W|j�x.|j�D]"\}}	t|	t��r�|	j�||<�q�W|j|�|S)z�Parse a Makefile-style file.

    A dictionary containing name/value pairs is returned.  If an
    optional dictionary is passed in as the second argument, it is
    used instead of a new dictionary.
    r)�TextFiler�surrogateescape)Zstrip_commentsZskip_blanksZ
join_lines�errorsNrz$$r�$r5r;r=TF�PY_�)r5r;r=)Zdistutils.text_filercrU�_variable_rxrVrW�strip�replacerXrY�list�_findvar1_rx�search�_findvar2_rx�strr
rErF�end�start�close�items�
isinstance�update)rr[rcrZ�done�notdoner^r_r`ra�tmpv�renamed_variablesr"�value�found�item�after�krrr�parse_makefiles�











r�cCsZxTtj|�ptj|�}|rP|j�\}}|d|�|j|jd��||d�}qPqW|S)a�Expand Makefile-style variables -- "${foo}" or "$(foo)" -- in
    'string' according to 'vars' (a dictionary mapping variable names to
    values).  Variables not present in 'vars' are silently expanded to the
    empty string.  The variable values in 'vars' should not contain further
    variable expansions; if 'vars' is the output of 'parse_makefile()',
    you're fine.  Returns a variable-expanded version of 's'.
    rrN)rmrnro�span�getrW)�s�varsr_Zbegrqrrr�expand_makefile_vars�s*r�c	CsVtjjddjtjtjttjdd�d��}t	|t
�t�dgd�}|j}ia
t
j|�dS)	z7Initialize the module as appropriate for POSIX systems.�_PYTHON_SYSCONFIGDATA_NAMEz+_sysconfigdata_{abi}_{platform}_{multiarch}rNr)�abir@�	multiarch�build_time_varsrN)r
rEr�rOr�abiflagsr@�getattrrQ�
__import__�globals�localsr�rCrv)r"�_tempr�rrr�_init_posix�sr�cCs~i}tddd�|d<tddd�|d<tdd�|d<tj�d|d<d	|d
<t�jdd�|d
<tjjtjj	t
j��|d<|adS)z+Initialize the module as appropriate for NTrr)r'r.�LIBDEST�
BINLIBDEST)r'�	INCLUDEPY�
EXT_SUFFIXz.exe�EXE�.r�VERSION�BINDIRN)
r/r)�_imp�extension_suffixesrrkr
r�dirname�abspathr�
executablerC)r[rrr�_init_nt�sr�cGs^tdk�r(t�jdtj�}|r(|�niattd<ttd<tjd�}|dk	rV|td<tjdt�}tjdkr�tr�tj	j
t��}tj	j||�}ntj	j
t��}tj	j
tj	j|��td<to�tjdk�r
t}tj	jtd�o�|tj�k�r
tj	j|td�}tj	j|�td<tjd	k�r(d
dl}|jt�|�rVg}x|D]}|jtj|���q8W|StSdS)a�With no arguments, return a dictionary of all configuration
    variables relevant for the current platform.  Generally this includes
    everything needed to build extensions and install both pure modules and
    extensions.  On Unix, this means every variable defined in Python's
    installed Makefile; on Windows it's a much smaller set.

    With arguments, return a list of values that result from looking up
    each argument in the configuration variable dictionary.
    NZ_init_r(�exec_prefixr��SOrrr0r)rCr�r�r
r"r-r,rr#rr�rRr
r�r%�isabs�getcwdrr@rA�customize_config_vars�append)�args�funcr�r�baserA�valsr"rrrrD�s@




rDcCs*|dkrddl}|jdtd�t�j|�S)z�Return the value of a single variable using the dictionary
    returned by 'get_config_vars()'.  Equivalent to
    get_config_vars().get(name)
    r�rNz SO is deprecated, use EXT_SUFFIXr)�warnings�warn�DeprecationWarningrDr�)r"r�rrrr$sr$)rr)rr)rN)rrN)N)N)3�__doc__r�r
rSrrerrr%r(r-r�r,�base_prefixr!�base_exec_prefixr rEr�rr�r�r"�lower�endswithrr�rrr#r&r��AttributeErrorrr)r/rBrLrRrbrTrirmror�r�rCr�r�rDr$rrrr�<module>
sZ



#
+I





jJPKV[��B��:�:__pycache__/cmd.cpython-36.pycnu�[���3


 \�J�@srdZddlZddlZddlZddlmZddlmZmZm	Z	m
Z
mZddlmZGdd�d�Z
Gdd	�d	e
�ZdS)
ztdistutils.cmd

Provides the Command class, the base class for the command classes
in the distutils.command package.
�N)�DistutilsOptionError)�util�dir_util�	file_util�archive_util�dep_util)�logc@s"eZdZdZgZdd�Zdd�Zdd�Zdd	�Zd
d�Z	dCdd�Z
dd�ZdDdd�Zdd�Z
dEdd�ZdFdd�Zdd�ZdGdd�Zdd �Zd!d"�Zd#d$�Zd%d&�ZdHd'd(�ZdId*d+�Zd,d-�Zd.d/�Zd0d1�ZdJd2d3�ZdKd5d6�ZdLd7d8�ZdMd9d:�ZdNd;d<�ZdOd=d>�Z dPd?d@�Z!dQdAdB�Z"dS)R�Commanda}Abstract base class for defining command classes, the "worker bees"
    of the Distutils.  A useful analogy for command classes is to think of
    them as subroutines with local variables called "options".  The options
    are "declared" in 'initialize_options()' and "defined" (given their
    final values, aka "finalized") in 'finalize_options()', both of which
    must be defined by every command class.  The distinction between the
    two is necessary because option values might come from the outside
    world (command line, config file, ...), and any options dependent on
    other options must be computed *after* these outside influences have
    been processed -- hence 'finalize_options()'.  The "body" of the
    subroutine, where it does all its work based on the values of its
    options, is the 'run()' method, which must also be implemented by every
    command class.
    cCsbddlm}t||�std��|jtkr0td��||_|j�d|_	|j
|_
d|_d|_d|_
dS)z�Create and initialize a new Command object.  Most importantly,
        invokes the 'initialize_options()' method, which is the real
        initializer and depends on the actual command being
        instantiated.
        r)�Distributionz$dist must be a Distribution instancezCommand is an abstract classN)Zdistutils.distr
�
isinstance�	TypeError�	__class__r	�RuntimeError�distribution�initialize_optionsZ_dry_run�verbose�force�help�	finalized)�selfZdistr
�r�%/usr/lib64/python3.6/distutils/cmd.py�__init__/s


zCommand.__init__cCs<|dkr0t|d|�}|dkr*t|j|�S|Snt|��dS)N�dry_run�_)�getattrr�AttributeError)r�attrZmyvalrrr�__getattr___szCommand.__getattr__cCs|js|j�d|_dS)N�)r�finalize_options)rrrr�ensure_finalizediszCommand.ensure_finalizedcCstd|j��dS)a�Set default values for all the options that this command
        supports.  Note that these defaults may be overridden by other
        commands, by the setup script, by config files, or by the
        command-line.  Thus, this is not the place to code dependencies
        between options; generally, 'initialize_options()' implementations
        are just a bunch of "self.foo = None" assignments.

        This method must be implemented by all command classes.
        z,abstract method -- subclass %s must overrideN)rr
)rrrrr{s
zCommand.initialize_optionscCstd|j��dS)aSet final values for all the options that this command supports.
        This is always called as late as possible, ie.  after any option
        assignments from the command-line or from other commands have been
        done.  Thus, this is the place to code option dependencies: if
        'foo' depends on 'bar', then it is safe to set 'foo' from 'bar' as
        long as 'foo' still has the same value it was assigned in
        'initialize_options()'.

        This method must be implemented by all command classes.
        z,abstract method -- subclass %s must overrideN)rr
)rrrrr �szCommand.finalize_optionsN�cCs�ddlm}|dkr d|j�}|j||tjd�|d}x\|jD]R\}}}|j|�}|d	dkrp|dd
�}t||�}|j|d||ftjd�qDWdS)Nr)�
longopt_xlatezcommand options for '%s':)�levelz  r�=z%s = %s���r&)	Zdistutils.fancy_getoptr#�get_command_name�announcer�INFO�user_options�	translater)r�header�indentr#�optionr�valuerrr�dump_options�s

zCommand.dump_optionscCstd|j��dS)a�A command's raison d'etre: carry out the action it exists to
        perform, controlled by the options initialized in
        'initialize_options()', customized by other commands, the setup
        script, the command-line, and config files, and finalized in
        'finalize_options()'.  All terminal output and filesystem
        interaction should be done by 'run()'.

        This method must be implemented by all command classes.
        z,abstract method -- subclass %s must overrideN)rr
)rrrr�run�s
zCommand.runrcCstj||�dS)zmIf the current verbosity level is of greater than or equal to
        'level' print 'msg' to stdout.
        N)r)r�msgr$rrrr(�szCommand.announcecCs&ddlm}|r"t|�tjj�dS)z~Print 'msg' to stdout if the global DEBUG (taken from the
        DISTUTILS_DEBUG environment variable) flag is true.
        r)�DEBUGN)Zdistutils.debugr3�print�sys�stdout�flush)rr2r3rrr�debug_print�szCommand.debug_printcCsBt||�}|dkr"t|||�|St|t�s>td|||f��|S)Nz'%s' must be a %s (got `%s`))r�setattrr�strr)rr.�what�default�valrrr�_ensure_stringlike�s

zCommand._ensure_stringlikecCs|j|d|�dS)zWEnsure that 'option' is a string; if not defined, set it to
        'default'.
        �stringN)r>)rr.r<rrr�
ensure_string�szCommand.ensure_stringcCspt||�}|dkrdSt|t�r6t||tjd|��n6t|t�rTtdd�|D��}nd}|sltd||f��dS)z�Ensure that 'option' is a list of strings.  If 'option' is
        currently a string, we split it either on /,\s*/ or /\s+/, so
        "foo bar baz", "foo,bar,baz", and "foo,   bar baz" all become
        ["foo", "bar", "baz"].
        Nz,\s*|\s+css|]}t|t�VqdS)N)rr:)�.0�vrrr�	<genexpr>�sz-Command.ensure_string_list.<locals>.<genexpr>Fz''%s' must be a list of strings (got %r))	rrr:r9�re�split�list�allr)rr.r=�okrrr�ensure_string_list�s


zCommand.ensure_string_listcCs8|j|||�}|dk	r4||�r4td|||f��dS)Nzerror in '%s' option: )r>r)rr.Ztesterr;Z	error_fmtr<r=rrr�_ensure_tested_string�szCommand._ensure_tested_stringcCs|j|tjjdd�dS)z5Ensure that 'option' is the name of an existing file.�filenamez$'%s' does not exist or is not a fileN)rJ�os�path�isfile)rr.rrr�ensure_filename�szCommand.ensure_filenamecCs|j|tjjdd�dS)Nzdirectory namez)'%s' does not exist or is not a directory)rJrLrM�isdir)rr.rrr�ensure_dirnameszCommand.ensure_dirnamecCst|d�r|jS|jjSdS)N�command_name)�hasattrrRr
�__name__)rrrrr'	s
zCommand.get_command_namecGsJ|jj|�}|j�x0|D](\}}t||�dkrt||t||��qWdS)a>Set the values of any "undefined" options from corresponding
        option values in some other command object.  "Undefined" here means
        "is None", which is the convention used to indicate that an option
        has not been changed between 'initialize_options()' and
        'finalize_options()'.  Usually called from 'finalize_options()' for
        options that depend on some other command rather than another
        option of the same command.  'src_cmd' is the other command from
        which option values will be taken (a command object will be created
        for it if necessary); the remaining arguments are
        '(src_option,dst_option)' tuples which mean "take the value of
        'src_option' in the 'src_cmd' command object, and copy it to
        'dst_option' in the current command object".
        N)r�get_command_objr!rr9)rZsrc_cmdZoption_pairsZsrc_cmd_objZ
src_optionZ
dst_optionrrr�set_undefined_optionss
zCommand.set_undefined_optionscCs|jj||�}|j�|S)z�Wrapper around Distribution's 'get_command_obj()' method: find
        (create if necessary and 'create' is true) the command object for
        'command', call its 'ensure_finalized()' method, and return the
        finalized command object.
        )rrUr!)r�commandZcreateZcmd_objrrr�get_finalized_command$szCommand.get_finalized_commandrcCs|jj||�S)N)r�reinitialize_command)rrWZreinit_subcommandsrrrrY0szCommand.reinitialize_commandcCs|jj|�dS)z�Run some other command: uses the 'run_command()' method of
        Distribution, which creates and finalizes the command object if
        necessary and then invokes its 'run()' method.
        N)r�run_command)rrWrrrrZ4szCommand.run_commandcCs6g}x,|jD]"\}}|dks$||�r|j|�qW|S)akDetermine the sub-commands that are relevant in the current
        distribution (ie., that need to be run).  This is based on the
        'sub_commands' class attribute: each tuple in that list may include
        a method that we call to determine if the subcommand needs to be
        run for the current distribution.  Return a list of command names.
        N)�sub_commands�append)rZcommandsZcmd_name�methodrrr�get_sub_commands;s
zCommand.get_sub_commandscCstjd|j�|�dS)Nzwarning: %s: %s
)r�warnr')rr2rrrr_KszCommand.warncCstj||||jd�dS)N)r)r�executer)r�func�argsr2r$rrrr`NszCommand.execute�cCstj|||jd�dS)N)r)r�mkpathr)r�name�moderrrrdQszCommand.mkpathc	Cstj|||||j||jd�S)z�Copy a file respecting verbose, dry-run and force flags.  (The
        former two default to whatever is in the Distribution object, and
        the latter defaults to false for commands that don't define it.))r)r�	copy_filerr)r�infile�outfile�
preserve_mode�preserve_times�linkr$rrrrgTs

zCommand.copy_filec	Cstj||||||j|jd�S)z\Copy an entire directory tree respecting verbose, dry-run,
        and force flags.
        )r)r�	copy_treerr)rrhrirjrkZpreserve_symlinksr$rrrrm]s
zCommand.copy_treecCstj|||jd�S)z$Move a file respecting dry-run flag.)r)r�	move_filer)r�src�dstr$rrrrnfszCommand.move_filecCs ddlm}||||jd�dS)z2Spawn an external command respecting dry-run flag.r)�spawn)rN)Zdistutils.spawnrqr)r�cmdZsearch_pathr$rqrrrrqjsz
Command.spawnc	Cstj|||||j||d�S)N)r�owner�group)r�make_archiver)rZ	base_name�formatZroot_dirZbase_dirrsrtrrrruoszCommand.make_archivecCs�|dkrd|}t|t�r"|f}nt|ttf�s8td��|dkrRd|dj|�f}|jsdtj||�rv|j	||||�n
t
j|�dS)a�Special case of 'execute()' for operations that process one or
        more input files and generate one output file.  Works just like
        'execute()', except the operation is skipped and a different
        message printed if 'outfile' already exists and is newer than all
        files listed in 'infiles'.  If the command defined 'self.force',
        and it is true, then the command is unconditionally run -- does no
        timestamp checks.
        Nzskipping %s (inputs unchanged)z9'infiles' must be a string, or a list or tuple of stringszgenerating %s from %sz, )rr:rF�tupler�joinrrZnewer_groupr`r�debug)rZinfilesrirarbZexec_msgZskip_msgr$rrr�	make_fileus

zCommand.make_file)Nr")r)N)N)N)r)r)Nr)rc)rrNr)rrrr)r)rr)NNNN)NNr)#rT�
__module__�__qualname__�__doc__r[rrr!rr r0r1r(r8r>r@rIrJrOrQr'rVrXrYrZr^r_r`rdrgrmrnrqrurzrrrrr	sF0
















r	c@s6eZdZdZdgZdd�Zdd�Zd	d
�Zdd�Zd
S)�install_miscz{Common base class for installing some files in a subdirectory.
    Currently used by install_data and install_scripts.
    �install-dir=�d�!directory to install the files tocCsd|_g|_dS)N)�install_dir�outfiles)rrrrr�szinstall_misc.initialize_optionscCs|jd|df�dS)NZinstallr�)rV)r�dirnamerrr�_install_dir_from�szinstall_misc._install_dir_fromcCsRg|_|sdS|j|j�x2|D]*}|j||j�|jjtjj|j|��q WdS)N)r�rdr�rgr\rLrMrx)rZfilelist�frrr�_copy_files�s
zinstall_misc._copy_filescCs|jS)N)r�)rrrr�get_outputs�szinstall_misc.get_outputsN)rr�r�)	rTr{r|r}r*rr�r�r�rrrrr~�s	r~)r}r5rLrDZdistutils.errorsrZ	distutilsrrrrrrr	r~rrrr�<module>sPKV[OS��

*__pycache__/text_file.cpython-36.opt-2.pycnu�[���3


 \�0�@s"ddlZddlZGdd�d�ZdS)�Nc@speZdZdddddddd�Zddd�Zdd	�Zd
d�Zddd
�Zddd�Zddd�Z	dd�Z
dd�Zdd�ZdS)�TextFile�r�strict)�strip_comments�skip_blanks�	lstrip_ws�	rstrip_ws�
join_lines�
collapse_join�errorsNcKs�|dkr|dkrtd��x>|jj�D]0}||krBt||||�q$t|||j|�q$Wx&|j�D]}||jkrbtd|��qbW|dkr�|j|�n||_||_d|_g|_	dS)Nz7you must supply either or both of 'filename' and 'file'zinvalid TextFile option '%s'r)
�RuntimeError�default_options�keys�setattr�KeyError�open�filename�file�current_line�linebuf)�selfrrZoptions�opt�r�+/usr/lib64/python3.6/distutils/text_file.py�__init__Ns
zTextFile.__init__cCs&||_tj|jd|jd�|_d|_dS)N�r)rr)r�iorrrr)rrrrrrosz
TextFile.opencCs$|j}d|_d|_d|_|j�dS)N)rrr�close)rrrrrrvs
zTextFile.closecCsjg}|dkr|j}|j|jd�t|ttf�rD|jdt|��n|jd|�|jt|��dj|�S)Nz, z
lines %d-%d: z	line %d: �)r�appendr�
isinstance�list�tuple�str�join)r�msg�lineZoutmsgrrr�	gen_errorszTextFile.gen_errorcCstd|j||���dS)Nzerror: )�
ValueErrorr')rr%r&rrr�error�szTextFile.errorcCs tjjd|j||�d�dS)Nz	warning: �
)�sys�stderr�writer')rr%r&rrr�warn�sz
TextFile.warncCs|jr|jd}|jd=|Sd}�x�|jj�}|dkr:d}|jr�|r�|jd�}|d
krXnX|dksp||ddkr�|ddkr�dp�d}|d|�|}|j�dkr�q$n|jdd�}|jo�|�r |dkr�|jd�|S|j	r�|j
�}||}t|jt
��r|jdd|jd<n|j|jdg|_n:|dk�r.dSt|jt
��rN|jdd|_n|jd|_|j�rt|j�rt|j�}n"|j�r�|j
�}n|j�r�|j�}|dk�s�|dk�r�|j�r�q$|j�r�|ddk�r�|dd�}q$|dd�d
k�r�|dd�d}q$|SdS)Nrr�#r�\r*z\#z2continuation line immediately precedes end-of-file�z\
���r2r2r2r2r2���r3)rr�readliner�find�strip�replacer	r.r
�lstripr rr!rr�rstripr)rr&Zbuildup_line�posZeolrrrr4�sf




	



zTextFile.readlinecCs,g}x"|j�}|dkr|S|j|�qWdS)N)r4r)r�linesr&rrr�	readlinesszTextFile.readlinescCs|jj|�dS)N)rr)rr&rrr�
unreadlineszTextFile.unreadline)NN)N)N)N)
�__name__�
__module__�__qualname__r
rrrr'r)r.r4r<r=rrrrr
s ;
!	



x
r)r+rrrrrr�<module>sPKV[`�E(11-__pycache__/bcppcompiler.cpython-36.opt-2.pycnu�[���3


 \W:�@stddlZddlmZmZmZmZmZmZddlm	Z	m
Z
mZddlm
Z
ddlmZddlmZGdd�de	�ZdS)	�N)�DistutilsExecError�DistutilsPlatformError�CompileError�LibError�	LinkError�UnknownFileError)�	CCompiler�gen_preprocess_options�gen_lib_options)�
write_file)�newer)�logc
@s�eZdZdZiZdgZdddgZeeZdZdZ	dZ
d	ZZd
Z
ddd
�Zddd�Zddd�Zddd�Zd dd�Zd!dd�Zd"dd�ZdS)#�BCPPCompilerZbcppz.cz.ccz.cppz.cxxz.objz.libz.dllz%s%sz.exercCs�tj||||�d|_d|_d|_d|_ddddg|_ddddg|_d	d
ddg|_d	d
ddg|_	g|_
d
ddg|_d
dddg|_dS)
Nz	bcc32.exezilink32.exeztlib.exez/tWMz/O2z/qz/g0z/Odz/Tpdz/Gnz/xz/r)
r�__init__�cc�linker�libZpreprocess_options�compile_options�compile_options_debug�ldflags_shared�ldflags_shared_debugZldflags_static�ldflags_exe�ldflags_exe_debug)�self�verboseZdry_run�force�r�./usr/lib64/python3.6/distutils/bcppcompiler.pyr5szBCPPCompiler.__init__Nc	Cs�|j||||||�\}}	}}
}|p$g}|jd�|rB|j|j�n|j|j��xD|	D�]:}
y||
\}}Wntk
r�wVYnXtjj|�}tjj|
�}
|j	tjj
|
��|dkr�qV|dk�ry|jdd|
|g�WqVtk
�r}zt
|��WYdd}~XqVXqV||jk�rd}n||jk�r,d}nd}d|
}y,|j|jg||
||g||g�WqVtk
�r�}zt
|��WYdd}~XqVXqVW|	S)	Nz-cz.resz.rcZbrcc32z-fo�z-Pz-o)Z_setup_compile�append�extendrr�KeyError�os�path�normpath�mkpath�dirname�spawnrr�
_c_extensions�_cpp_extensionsr)rZsources�
output_dir�macros�include_dirs�debug�
extra_preargs�extra_postargsZdepends�objects�pp_optsZbuildZcompile_opts�obj�src�ext�msgZ	input_optZ
output_optrrr�compileQsF

(zBCPPCompiler.compilec	Cs�|j||�\}}|j||d�}|j||�r~|dg|}|r:y|j|jg|�Wq�tk
rz}zt|��WYdd}~Xq�Xntjd|�dS)N)r*z/uzskipping %s (up-to-date))	�_fix_object_args�library_filename�
_need_linkr'rrrr
r-)	rr0Zoutput_libnamer*r-�target_lang�output_filenameZlib_argsr5rrr�create_static_lib�szBCPPCompiler.create_static_libc Cs�|j||�\}}|j|||�\}}}|r8tjdt|��|dk	rNtjj||�}|j||��r�|t	j
kr�d}|	r~|jdd�}q�|jdd�}n&d}|	r�|j
dd�}n|jdd�}|dkr�d}n�tjj|�\}}tjj|�\}}tjj|d�}tjj|d|�}dg}x&|�pgD]}|jd||f��qW|jt||fd	|�ttjj|�}|g}g}xF|D]>}tjjtjj|��\}}|d
k�r�|j|�n
|j|��qfWx$|D]}|jdtjj|���q�W|jd�|j|�|jd
|g�|jd�x<|D]4}|j|||	�}|dk�r(|j|�n
|j|��qW|jd�|jd�|jd
|g�|jd
�|j|�|
�r�|
|dd�<|�r�|j|�|jtjj|��y|j|jg|�Wn,tk
�r�}zt|��WYdd}~XnXntjd|�dS)Nz7I don't know what to do with 'runtime_library_dirs': %sZc0w32Zc0d32rrz%s.defZEXPORTSz  %s=_%sz
writing %sz.resz/L%sz/L.�,z,,Zimport32Zcw32mtzskipping %s (up-to-date)) r7Z
_fix_lib_argsr
�warn�strr"r#�joinr9rZ
EXECUTABLErrrr�split�splitextr&rZexecuter�mapr$�normcaser �find_library_filer%r'rrrr-) rZtarget_descr0r;r*Z	librariesZlibrary_dirsZruntime_library_dirsZexport_symbolsr-r.r/Z
build_tempr:Zstartup_objZld_argsZdef_file�head�tail�modnamer4Ztemp_dir�contentsZsymZobjects2Z	resources�file�base�lr�libfiler5rrr�link�s|
















zBCPPCompiler.linkc	Csv|r"|d}|d|d||f}n|d|f}xB|D]6}x0|D](}tjj||j|��}tjj|�r>|Sq>Wq4WdSdS)NZ_dZ_bcpp)r"r#r@r8�exists)	r�dirsrr-ZdlibZ	try_names�dir�namerMrrrrE4s


zBCPPCompiler.find_library_filercCs�|dkrd}g}x�|D]�}tjjtjj|��\}}||jddgkrTtd||f��|rdtjj|�}|dkr�|jtjj|||��q|dkr�|jtjj||d��q|jtjj|||j	��qW|S)Nrz.rcz.resz"unknown file type '%s' (from '%s'))
r"r#rBrD�src_extensionsr�basenamerr@�
obj_extension)rZsource_filenamesZ	strip_dirr*Z	obj_namesZsrc_namerKr4rrr�object_filenamesNs"
zBCPPCompiler.object_filenamescCs�|jd||�\}}}t||�}dg|}	|dk	r>|	jd|�|rN||	dd�<|r\|	j|�|	j|�|js~|dks~t||�r�|r�|jtjj	|��y|j
|	�Wn2tk
r�}
zt|
�t
|
��WYdd}
~
XnXdS)Nz	cpp32.exez-or)Z_fix_compile_argsr	rr rrr%r"r#r&r'r�printr)r�sourceZoutput_filer+r,r.r/�_r1Zpp_argsr5rrr�
preprocessis$	



zBCPPCompiler.preprocess)rrr)NNNrNNN)NrN)
NNNNNrNNNN)r)rr)NNNNN)�__name__�
__module__�__qualname__Z
compiler_typeZexecutablesr(r)rSrUZstatic_lib_extensionZshared_lib_extensionZstatic_lib_formatZshared_lib_formatZ
exe_extensionrr6r<rNrErVrZrrrrrsH


B

|

r)r"Zdistutils.errorsrrrrrrZdistutils.ccompilerrr	r
Zdistutils.file_utilrZdistutils.dep_utilrZ	distutilsr
rrrrr�<module>s PKV[�Fk��&__pycache__/spawn.cpython-36.opt-1.pycnu�[���3


 \�@s�dZddlZddlZddlmZmZddlmZddlm	Z	ddd�Z
d	d
�Zddd�Zej
d
krvddlmZdadaddd�Zddd�ZdS)z�distutils.spawn

Provides the 'spawn()' function, a front-end to various platform-
specific functions for launching another program in a sub-process.
Also provides the 'find_executable()' to search the path for a given
executable name.
�N)�DistutilsPlatformError�DistutilsExecError)�DEBUG)�log�cCsNt|�}tjdkr"t|||d�n(tjdkr<t|||d�ntdtj��dS)a�Run another program, specified as a command list 'cmd', in a new process.

    'cmd' is just the argument list for the new process, ie.
    cmd[0] is the program to run and cmd[1:] are the rest of its arguments.
    There is no way to run a program with a name different from that of its
    executable.

    If 'search_path' is true (the default), the system's executable
    search path will be used to find the program; otherwise, cmd[0]
    must be the exact path to the executable.  If 'dry_run' is true,
    the command will not actually be run.

    Raise DistutilsExecError if running the program fails in any way; just
    return on success.
    �posix)�dry_run�ntz1don't know how to spawn programs on platform '%s'N)�list�os�name�_spawn_posix�	_spawn_ntr)�cmd�search_path�verboser�r�'/usr/lib64/python3.6/distutils/spawn.py�spawns

rcCs.x(t|�D]\}}d|kr
d|||<q
W|S)z�Quote command-line arguments for DOS/Windows conventions.

    Just wraps every argument which contains blanks in double quotes, and
    returns a new argument list.
    � z"%s")�	enumerate)�args�i�argrrr�_nt_quote_args+srcCs�|d}t|�}|r t|�p|}tjdj|g|dd���|s�ytjtj||�}Wn@tk
r�}z$t	sp|}t
d||jdf��WYdd}~XnX|dkr�t	s�|}t
d||f��dS)Nrrrzcommand %r failed: %sz%command %r failed with exit status %d���)r�find_executabler�info�joinr�spawnv�P_WAIT�OSErrorrrr)rrrr�
executableZrc�excrrrr;s$&r�darwin)�	sysconfigcCsxtjdj|��|rdS|d}|r*tjp.tj}d}tjdkr�tdkrlt	j
d�pRdatrldd�tjd�D�atr�tj
jdt�}td	d�|jd�D�kr�d
|tf}t|��ttj
|d�}|r�tjp�tj}tj�}	|	dk�rvy$|dkr�|||�n||||�WnNtk
�rL}
z0t�s|}tjjd||
jf�tjd
�WYdd}
~
XnXt�sX|}tjjd|�tjd
��n��x�ytj|	d�\}	}WnDtk
�r�}z&t�s�|}td||jdf��WYdd}~XnXtj|��rt�s�|}td|tj|�f��nltj|��rBtj |�}
|
dk�r&dSt�s0|}td||
f��n,tj!|��rT�qznt�s^|}td||f���qzWdS)Nrrr$�MACOSX_DEPLOYMENT_TARGET�cSsg|]}t|��qSr)�int)�.0�xrrr�
<listcomp>esz _spawn_posix.<locals>.<listcomp>�.cSsg|]}t|��qSr)r()r)r*rrrr+kszF$MACOSX_DEPLOYMENT_TARGET mismatch: now "%s" but "%s" during configure)r&zunable to execute %r: %s
rz(unable to execute %r for unknown reasonszcommand %r failed: %sz"command %r terminated by signal %dz%command %r failed with exit status %dz1unknown error executing %r: termination status %dr)"rrrr�execvp�execv�sys�platform�_cfg_targetr%�get_config_var�split�_cfg_target_split�environ�getr�dict�execvpe�execve�forkr!r�stderr�write�strerror�_exit�waitpidrr�WIFSIGNALED�WTERMSIG�	WIFEXITED�WEXITSTATUS�
WIFSTOPPED)rrrrr"Zexec_fn�envZ
cur_targetZmy_msg�pid�eZstatusr#Zexit_statusrrrr
Xs�



&

r
cCs�|dkrtjjdtj�}|jtj�}tjj|�\}}tj	dkrN|dkrN|d}tjj
|�s�x*|D]"}tjj||�}tjj
|�r`|Sq`WdS|SdS)z�Tries to find 'executable' in the directories listed in 'path'.

    A string listing directories separated by 'os.pathsep'; defaults to
    os.environ['PATH'].  Returns the complete filename or None if not found.
    N�PATHZwin32z.exe)rr5r6�defpathr3�pathsep�path�splitextr/r0�isfiler)r"rK�paths�baseZext�p�frrrr�s
r)rrr)rrr)rrr)N)�__doc__r/rZdistutils.errorsrrZdistutils.debugrZ	distutilsrrrrr0r%r1r4r
rrrrr�<module>s



QPKV[D;^��A�A*__pycache__/ccompiler.cpython-36.opt-2.pycnu�[���3


 \7��@s�ddlZddlZddlZddlTddlmZddlmZddlm	Z	ddl
mZmZddl
mZmZddlmZGd	d
�d
�Zd,Zd-dd�Zd.d/d0d1d2d �Zd!d"�Zd3d#d$�Zd%d&�Zd'd(�ZdS)4�N)�*)�spawn)�	move_file)�mkpath)�newer_pairwise�newer_group)�split_quoted�execute)�logc
@seZdZdZdZdZdZdZdZdZ	dZ
dddddd�ZdddgZdpdd�Z
d	d
�Zdd�Zd
d�Zdd�Zdqdd�Zdd�Zdd�Zdd�Zdd�Zdd�Zdd�Zdd �Zd!d"�Zd#d$�Zd%d&�Zd'd(�Zd)d*�Zd+d,�Zd-d.�Z drd/d0�Z!d1d2�Z"d3d4�Z#d5d6�Z$d7d8�Z%dsd9d:�Z&dtd;d<�Z'd=d>�Z(dud?d@�Z)dAZ*dBZ+dCZ,dvdDdE�Z-dwdFdG�Z.dxdHdI�Z/dydJdK�Z0dLdM�Z1dNdO�Z2dPdQ�Z3dzdRdS�Z4d{dTdU�Z5d|dWdX�Z6d}dYdZ�Z7d~d[d\�Z8dd^d_�Z9d�dadb�Z:dcdd�Z;dedf�Z<d�dgdh�Z=didj�Z>dkdl�Z?d�dndo�Z@dS)��	CCompilerN�czc++Zobjc)z.cz.ccz.cppz.cxxz.mrcCsf||_||_||_d|_g|_g|_g|_g|_g|_g|_	x$|j
j�D]}|j||j
|�qHWdS)N)
�dry_run�force�verbose�
output_dir�macros�include_dirs�	libraries�library_dirs�runtime_library_dirs�objects�executables�keys�set_executable)�selfrr
r�key�r�+/usr/lib64/python3.6/distutils/ccompiler.py�__init__UszCCompiler.__init__cKs@x:|D]2}||jkr(td||jjf��|j|||�qWdS)Nz$unknown executable '%s' for class %s)r�
ValueError�	__class__�__name__r)r�kwargsrrrr�set_executablesys


zCCompiler.set_executablescCs,t|t�rt||t|��nt|||�dS)N)�
isinstance�str�setattrr)rr�valuerrrr�s
zCCompiler.set_executablecCs0d}x&|jD]}|d|kr |S|d7}qWdS)Nr�)r)r�name�i�defnrrr�_find_macro�szCCompiler._find_macrocCsdx^|D]V}t|t�oFt|�dkoFt|dt�s:|ddkoFt|dt�std|dd��qWdS)Nr(�rzinvalid macro definition '%s': z.must be tuple (string,), (string, string), or z(string, None))r(r-)r$�tuple�lenr%�	TypeError)rZdefinitionsr+rrr�_check_macro_definitions�s


z"CCompiler._check_macro_definitionscCs.|j|�}|dk	r|j|=|jj||f�dS)N)r,r�append)rr)r'r*rrr�define_macro�s	
zCCompiler.define_macrocCs0|j|�}|dk	r|j|=|f}|jj|�dS)N)r,rr2)rr)r*Zundefnrrr�undefine_macro�s

zCCompiler.undefine_macrocCs|jj|�dS)N)rr2)r�dirrrr�add_include_dir�szCCompiler.add_include_dircCs|dd�|_dS)N)r)r�dirsrrr�set_include_dirs�szCCompiler.set_include_dirscCs|jj|�dS)N)rr2)r�libnamerrr�add_library�szCCompiler.add_librarycCs|dd�|_dS)N)r)rZlibnamesrrr�
set_libraries�szCCompiler.set_librariescCs|jj|�dS)N)rr2)rr5rrr�add_library_dirszCCompiler.add_library_dircCs|dd�|_dS)N)r)rr7rrr�set_library_dirsszCCompiler.set_library_dirscCs|jj|�dS)N)rr2)rr5rrr�add_runtime_library_dirsz!CCompiler.add_runtime_library_dircCs|dd�|_dS)N)r)rr7rrr�set_runtime_library_dirssz"CCompiler.set_runtime_library_dirscCs|jj|�dS)N)rr2)r�objectrrr�add_link_object szCCompiler.add_link_objectcCs|dd�|_dS)N)r)rrrrr�set_link_objects(szCCompiler.set_link_objectscCs|dkr|j}nt|t�s"td��|dkr2|j}n"t|t�rL||jpFg}ntd��|dkrd|j}n*t|ttf�r�t|�|jp�g}ntd��|dkr�g}|j|d|d�}t	||�}i}	xRt
t|��D]B}
||
}||
}tj
j|�d}
|jtj
j|��||
f|	|<q�W|||||	fS)Nz%'output_dir' must be a string or Nonez/'macros' (if supplied) must be a list of tuplesz6'include_dirs' (if supplied) must be a list of stringsr)�	strip_dirrr()rr$r%r0r�listrr.�object_filenames�gen_preprocess_options�ranger/�os�path�splitextr�dirname)rZoutdirrZincdirs�sources�dependsZextrar�pp_opts�buildr*�src�obj�extrrr�_setup_compile6s8


zCCompiler._setup_compilecCs0|dg}|rdg|dd�<|r,||dd�<|S)Nz-cz-grr)rrN�debugZbefore�cc_argsrrr�_get_cc_argsas
zCCompiler._get_cc_argscCs�|dkr|j}nt|t�s"td��|dkr2|j}n"t|t�rL||jpFg}ntd��|dkrd|j}n*t|ttf�r�t|�|jp�g}ntd��|||fS)Nz%'output_dir' must be a string or Nonez/'macros' (if supplied) must be a list of tuplesz6'include_dirs' (if supplied) must be a list of strings)rr$r%r0rrDrr.)rrrrrrr�_fix_compile_argsjs 


zCCompiler._fix_compile_argscCs|j||d�}|ifS)N)r)rE)rrLrrMrrrr�
_prep_compile�s	zCCompiler._prep_compilecCsHt|ttf�std��t|�}|dkr.|j}nt|t�s@td��||fS)Nz,'objects' must be a list or tuple of stringsz%'output_dir' must be a string or None)r$rDr.r0rr%)rrrrrr�_fix_object_args�s
zCCompiler._fix_object_argscCs�|dkr|j}n*t|ttf�r2t|�|jp,g}ntd��|dkrJ|j}n*t|ttf�rlt|�|jpfg}ntd��|dkr�|j}n*t|ttf�r�t|�|jp�g}ntd��|||fS)Nz3'libraries' (if supplied) must be a list of stringsz6'library_dirs' (if supplied) must be a list of stringsz>'runtime_library_dirs' (if supplied) must be a list of strings)rr$rDr.r0rr)rrrrrrr�
_fix_lib_args�s&zCCompiler._fix_lib_argscCs2|jr
dS|jr t||dd�}n
t||�}|SdS)NT�newer)Zmissing)rr
r)rr�output_filer[rrr�
_need_link�s
zCCompiler._need_linkc	Cs�t|t�s|g}d}t|j�}x^|D]V}tjj|�\}}|jj|�}y |jj	|�}||krb|}|}Wq$t
k
rxYq$Xq$W|S)N)r$rDr/�language_orderrHrIrJ�language_map�get�indexr)	rrLZlangra�source�baserRZextlangZextindexrrr�detect_language�s



zCCompiler.detect_languagecCsdS)Nr)rrbr\rr�
extra_preargs�extra_postargsrrr�
preprocess�szCCompiler.preprocessc	Csz|j||||||�\}}	}}
}|j|
||�}xH|	D]@}
y||
\}}Wntk
r\w2YnX|j|
|||||
�q2W|	S)N)rSrV�KeyError�_compile)rrLrrrrTrerfrMrrNrOrUrQrPrRrrr�compile�s6
zCCompiler.compilecCsdS)Nr)rrQrPrRrUrfrNrrrriCszCCompiler._compilecCsdS)Nr)rr�output_libnamerrT�target_langrrr�create_static_libIszCCompiler.create_static_libZ
shared_objectZshared_library�
executablecCst�dS)N)�NotImplementedError)rZtarget_descr�output_filenamerrrr�export_symbolsrTrerf�
build_temprlrrr�linkis9zCCompiler.linkc

Cs2|jtj||j|dd�|||||||	|
||�
dS)N�shared)�lib_type)rsr�SHARED_LIBRARY�library_filename)
rrrkrrrrrqrTrerfrrrlrrr�link_shared_lib�s
zCCompiler.link_shared_libc

Cs(|jtj|||||||||	|
||�
dS)N)rsr�
SHARED_OBJECT)
rrrprrrrrqrTrerfrrrlrrr�link_shared_object�s

zCCompiler.link_shared_objectcCs.|jtj||j|�||||d|||	d|
�
dS)N)rsr�
EXECUTABLE�executable_filename)rrZoutput_prognamerrrrrTrerfrlrrr�link_executable�s

zCCompiler.link_executablecCst�dS)N)ro)rr5rrr�library_dir_option�szCCompiler.library_dir_optioncCst�dS)N)ro)rr5rrr�runtime_library_dir_option�sz$CCompiler.runtime_library_dir_optioncCst�dS)N)ro)r�librrr�library_option�szCCompiler.library_optioncCs�ddl}|dkrg}|dkr g}|dkr,g}|dkr8g}|jd|dd�\}}tj|d�}	z.x|D]}
|	jd|
�q`W|	jd|�Wd|	j�Xy|j|g|d�}Wntk
r�d	SXy|j|d
||d�Wnt	t
fk
r�d	SXdS)Nrz.cT)�text�wz#include "%s"
z+main (int argc, char **argv) {
    %s();
}
)rFza.out)rr)�tempfileZmkstemprH�fdopen�write�closerjZCompileErrorr}Z	LinkErrorr0)r�funcnameZincludesrrrr��fdZfname�fZinclrrrr�has_function�s8	

zCCompiler.has_functioncCst�dS)N)ro)rr7r�rTrrr�find_library_file#szCCompiler.find_library_file�cCs�|dkrd}g}x�|D]|}tjj|�\}}tjj|�d}|tjj|�d�}||jkrhtd||f��|rxtjj|�}|jtjj	|||j
��qW|S)Nr�r(z"unknown file type '%s' (from '%s'))rHrIrJ�
splitdrive�isabs�src_extensionsZUnknownFileError�basenamer2�join�
obj_extension)rZsource_filenamesrCrZ	obj_namesZsrc_namercrRrrrrENs

zCCompiler.object_filenamescCs$|rtjj|�}tjj|||j�S)N)rHrIr�r��shared_lib_extension)rr�rCrrrr�shared_object_filename_sz CCompiler.shared_object_filenamecCs(|rtjj|�}tjj|||jp"d�S)Nr�)rHrIr�r��
exe_extension)rr�rCrrrrr|eszCCompiler.executable_filename�staticc
Cs`|d	krtd��t||d�}t||d�}tjj|�\}}|||f}	|rPd}tjj|||	�S)
Nr�rt�dylib�
xcode_stubz?'lib_type' must be "static", "shared", "dylib", or "xcode_stub"Z_lib_formatZ_lib_extensionr�)r�rtr�r�)r�getattrrHrI�splitr�)
rr9rurCrZfmtrRr5rc�filenamerrrrwkszCCompiler.library_filenamer(cCstj|�dS)N)r
rT)r�msg�levelrrr�announce~szCCompiler.announcecCsddlm}|rt|�dS)Nr)�DEBUG)Zdistutils.debugr��print)rr�r�rrr�debug_print�szCCompiler.debug_printcCstjjd|�dS)Nzwarning: %s
)�sys�stderrr�)rr�rrr�warn�szCCompiler.warncCst||||j�dS)N)r	r
)r�func�argsr�r�rrrr	�szCCompiler.executecCst||jd�dS)N)r
)rr
)r�cmdrrrr�szCCompiler.spawncCst|||jd�S)N)r
)rr
)rrP�dstrrrr�szCCompiler.move_file�cCst|||jd�dS)N)r
)rr
)rr)�moderrrr�szCCompiler.mkpath)rrr)N)N)NNNNN)NNNrNNN)NrN)
NNNNNrNNNN)
NNNNNrNNNN)
NNNNNrNNNN)NNNNrNNN)NNNN)r)rr�)rr�)rr�)r�rr�)r()Nr()r�)Ar!�
__module__�__qualname__Z
compiler_typer�r�Zstatic_lib_extensionr�Zstatic_lib_formatZshared_lib_formatr�r_r^rr#rr,r1r3r4r6r8r:r;r<r=r>r?rArBrSrVrWrXrYrZr]rdrgrjrirmryrvr{rsrxrzr}r~rr�r�r�rEr�r|rwr�r�r�r	rrrrrrrrs�

$ 

+	 
"


B

4



*
+





r�cygwin.*�unix�posix�nt�msvccCsV|dkrtj}|dkrtj}x4tD],\}}tj||�dk	sJtj||�dk	r"|Sq"WdS)Nr�)rHr)r��platform�_default_compilers�re�match)�osnamer��pattern�compilerrrr�get_default_compiler�s
r��
unixccompiler�
UnixCCompiler�standard UNIX-style compiler�
_msvccompiler�MSVCCompiler�Microsoft Visual C++�cygwinccompiler�CygwinCCompiler�'Cygwin port of GNU C Compiler for Win32�Mingw32CCompiler�(Mingw32 port of GNU C Compiler for Win32�bcppcompiler�BCPPCompiler�Borland C++ Compiler)r�r��cygwinZmingw32ZbcppcCs\ddlm}g}x,tj�D] }|jd|dt|df�qW|j�||�}|jd�dS)Nr)�FancyGetoptz	compiler=r-zList of available compilers:)Zdistutils.fancy_getoptr��compiler_classrr2�sortZ
print_help)r�Z	compilersr�Zpretty_printerrrr�show_compilers�sr�cCs�|dkrtj}y"|dkr t|�}t|\}}}Wn8tk
rhd|}|dk	r\|d|}t|��YnXy*d|}t|�tj|}	t	|	�|}
WnBt
k
r�td|��Yn$tk
r�td||f��YnX|
d||�S)Nz5don't know how to compile C/C++ code on platform '%s'z with '%s' compilerz
distutils.z4can't compile C/C++ code: unable to load module '%s'zBcan't compile C/C++ code: unable to find class '%s' in module '%s')rHr)r�r�rhZDistutilsPlatformError�
__import__r��modules�vars�ImportErrorZDistutilsModuleError)Zplatr�rr
rZmodule_name�
class_nameZlong_descriptionr��module�klassrrr�new_compiler�s2
r�cCs�g}x�|D]�}t|t�o2dt|�ko.dkns@td|��t|�dkr`|jd|d�q
t|�dkr
|ddkr�|jd|d�q
|jd|�q
Wx|D]}|jd|�q�W|S)	Nr(r-zPbad macro definition '%s': each element of 'macros' list must be a 1- or 2-tuplez-U%srz-D%sz-D%s=%sz-I%s)r$r.r/r0r2)rrrNZmacror5rrrrF
s
&
rFcCs�g}x|D]}|j|j|��q
Wx4|D],}|j|�}t|t�rJ||}q(|j|�q(Wx^|D]V}tjj|�\}}	|r�|j|g|	�}
|
r�|j|
�q�|j	d|�q^|j|j
|��q^W|S)Nz6no library file corresponding to '%s' found (skipping))r2r~rr$rDrHrIr�r�r�r�)r�rrrZlib_optsr5�optr�Zlib_dirZlib_nameZlib_filerrr�gen_lib_options7s$






r��r�r��r�r��r�r�)r�r�r�)NN)r�r�r�)r�r�r�)r�r�r�)r�r�r�)r�r�r�)NNrrr)r�rHr�Zdistutils.errorsZdistutils.spawnrZdistutils.file_utilrZdistutils.dir_utilrZdistutils.dep_utilrrZdistutils.utilrr	Z	distutilsr
rr�r�r�r�r�rFr�rrrr�<module>sB

--PKV[uT�W�$�$%__pycache__/util.cpython-36.opt-2.pycnu�[���3


 \5Q�@sddlZddlZddlZddlZddlZddlmZddlm	Z	ddl
mZddlm
Z
ddlmZdd�Zd	d
�Zdd�Zdad
d�Zdd�Zd'dd�Zdaaadd�Zdd�Zd(dd�Zdd�Zd)dd�Zdd �Zd*d!d"�Zd+d#d$�Z Gd%d&�d&�Z!dS),�N)�DistutilsPlatformError)�newer)�spawn)�log)�DistutilsByteCompileErrorcCstjdkrnd}tjj|�}|d(kr(tjStjjd|�}tj|t|�|�j�}|dkr\dS|dkrhdStjSd	tjkr�tjd	Stjd
ks�t	td�r�tjStj
�\}}}}}|j�jdd
�}|jdd�}|jdd�}|dd�dkr�d||fS|dd�dk�rV|ddk�rd}dt|d�d|dd�f}ddd�}	|d|	tj
7}n�|dd�d k�rtd||fS|dd�d!k�r�d"|||fS|dd#�d$k�r�d$}tjd%tj�}
|
j|�}|�r|j�}n>|dd#�d&k�rddl}ddl}
|j|
jj�|||�\}}}d'|||fS))N�ntz bit (��)�amd64z	win-amd64�itaniumzwin-ia64�_PYTHON_HOST_PLATFORM�posix�uname�/�� �_�-��linuxz%s-%s�sunosr�5�solarisz%d.%s���32bit�64bit)i���l����z.%s��irix�aixz%s-%s.%s��cygwinz[\d.]+�darwinz%s-%s-%s���)�os�name�sys�version�find�platform�len�lower�environ�hasattrr�replace�int�maxsize�re�compile�ASCII�match�group�_osx_supportZdistutils.sysconfig�get_platform_osx�	sysconfig�get_config_vars)�prefix�i�j�look�osname�host�releaser'�machine�bitness�rel_re�mr6�	distutils�rF�&/usr/lib64/python3.6/distutils/util.py�get_platformsX


 


rHcCs~tjdkr|S|s|S|ddkr.td|��|ddkrFtd|��|jd�}xd|krf|jd�qRW|srtjStjj|�S)Nrrzpath '%s' cannot be absoluterzpath '%s' cannot end with '/'�.r#)r$�sep�
ValueError�split�remove�curdir�path�join)�pathname�pathsrFrFrG�convert_pathos	


rScCs�tjdkr<tjj|�s$tjj||�Stjj||dd��SnNtjdkr|tjj|�\}}|ddkrn|dd�}tjj||�Stdtj��dS)Nr
rrr�\z!nothing known about platform '%s')r$r%rO�isabsrP�
splitdriver)Znew_rootrQZdriverOrFrFrG�change_root�s

rWcCsZtrdStjdkr<dtjkr<ddl}|jtj��dtjd<dtjkrRt�tjd<dadS)Nr
�HOMErrZPLATr)�_environ_checkedr$r%r,�pwd�getpwuid�getuidrH)rZrFrFrG�
check_environ�s	
r]cCsTt�|fdd�}ytjd||�Stk
rN}ztd|��WYdd}~XnXdS)NcSs,|jd�}||krt||�Stj|SdS)Nr)r5�strr$r,)r4�
local_varsZvar_namerFrFrG�_subst�s
zsubst_vars.<locals>._substz\$([a-zA-Z_][a-zA-Z_0-9]*)zinvalid variable '$%s')r]r1�sub�KeyErrorrK)�sr_r`�varrFrFrG�
subst_vars�s	re�error: cCs|t|�S)N)r^)�excr:rFrFrG�grok_environment_error�srhcCs(tjdtj�atjd�atjd�adS)Nz
[^\\\'\"%s ]*z'(?:[^'\\]|\\.)*'z"(?:[^"\\]|\\.)*")r1r2�string�
whitespace�
_wordchars_re�
_squote_re�
_dquote_rerFrFrFrG�_init_regex�s
rncCs�tdkrt�|j�}g}d}�x`|�r�tj||�}|j�}|t|�kr\|j|d|��P||tjkr�|j|d|��||d�j	�}d}n�||dkr�|d|�||dd�}|d}n�||dkr�t
j||�}n*||dkr�tj||�}ntd||��|dk�r"t
d||��|j�\}}|d|�||d|d�||d�}|j�d}|t|�kr"|j|�Pq"W|S)	NrrTr�'�"z!this can't happen (bad char '%c')z"bad string (mismatched %s quotes?)r)rkrn�stripr4�endr*�appendrirj�lstriprlrm�RuntimeErrorrK�span)rcZwords�posrDrrZbegrFrFrG�split_quoted�s@


,
rxcCsP|dkr6d|j|f}|dd�dkr6|dd�d}tj|�|sL||�dS)Nz%s%rrz,)rr	���ry)�__name__r�info)�func�args�msg�verbose�dry_runrFrFrG�executes	
r�cCs2|j�}|dkrdS|dkr dStd|f��dS)N�y�yes�t�true�on�1r�n�no�f�false�off�0rzinvalid truth value %r)r�r�r�r�r�r�)r�r�r�r�r�r�)r+rK)�valrFrFrG�	strtobool0sr�rcCsTddl}tjrtd��|dkr*do(|dk}|�s8yddlm}	|	d�\}
}Wn.tk
rzddlm}d|d�}
}YnXtj	d|�|s�|
dk	r�t
j|
d�}
n
t|d�}
|
j
d	�|
j
d
jtt|��d�|
j
d|||||f�|
j�tjg}|j|j��|j|�t||d
�tt
j|fd||d
��nddlm}�x|D�]�}|dd�dk�rh�qL|dk�r�|dk�r�dn|}tjj||d�}ntjj|�}|}|�r�|dt|��|k�r�td||f��|t|�d�}|�r�t
j j||�}t
j j!|�}|�rL|�st"||��r<tj	d||�|�sJ||||�ntj#d||��qLWdS)Nrzbyte-compiling is disabled.F)�mkstempz.py)�mktempz$writing byte-compilation script '%s'�wz2from distutils.util import byte_compile
files = [
z,
z]
z�
byte_compile(files, optimize=%r, force=%r,
             prefix=%r, base_dir=%r,
             verbose=%r, dry_run=0,
             direct=1)
)r�zremoving %s)r2rr)�optimizationz1invalid prefix: filename %r doesn't start with %rzbyte-compiling %s to %sz%skipping byte-compilation of %s to %s���)$�
subprocessr&�dont_write_bytecoderZtempfiler��ImportErrorr�rr{r$�fdopen�open�writerP�map�repr�close�
executable�extendZ"_optim_args_from_interpreter_flagsrsrr�rM�
py_compiler2�	importlib�util�cache_from_sourcer*rKrO�basenamer�debug)Zpy_files�optimizeZforcer:Zbase_dirrr�Zdirectr�r�Z	script_fdZscript_namer�Zscript�cmdr2�file�opt�cfile�dfileZ
cfile_baserFrFrG�byte_compile@sl$


r�cCs|jd�}d}|j|�S)N�
�rz        z	
        )rLrP)�header�linesrJrFrFrG�
rfc822_escape�s
r�cCsV|sdSddlm}m}Gdd�d|�}|dkr8|d�}|||d�}|j|dd�dS)	Nr)�RefactoringTool�get_fixers_from_packagec@s$eZdZdd�Zdd�Zdd�ZdS)z*run_2to3.<locals>.DistutilsRefactoringToolc_stj|f|��dS)N)r�error)�selfr~r}�kwrFrFrG�	log_error�sz4run_2to3.<locals>.DistutilsRefactoringTool.log_errorcWstj|f|��dS)N)rr{)r�r~r}rFrFrG�log_message�sz6run_2to3.<locals>.DistutilsRefactoringTool.log_messagecWstj|f|��dS)N)rr�)r�r~r}rFrFrG�	log_debug�sz4run_2to3.<locals>.DistutilsRefactoringTool.log_debugN)rz�
__module__�__qualname__r�r�r�rFrFrFrG�DistutilsRefactoringTool�sr�z
lib2to3.fixes)�optionsT)r�)Zlib2to3.refactorr�r�Zrefactor)�files�fixer_namesr��explicitr�r�r��rrFrFrG�run_2to3�s
r�cCsddlm}ddlm}ddlm}|�}	tj�}
tj|�z|	j	�Wdtj|
�X|	j
|	jdd�<|r�x(|j�D]}|j
�}|s�qt|	j|�qtWg}xV|	jD]L}
tjj||
�}|tjj|��|tjj||
�|dd�}|dr�|j|�q�Wtdd�|D�|||d	�|S)
Nr)�mkpath)�	copy_file)�FileListr)�updatecSsg|]}|j�jd�r|�qS)z.py)r+�endswith)�.0�fnrFrFrG�
<listcomp>sz$copydir_run_2to3.<locals>.<listcomp>)r�r�r�)Zdistutils.dir_utilr�Zdistutils.file_utilr�Zdistutils.filelistr�r$�getcwd�chdir�findallZallfilesr��
splitlinesrqZprocess_template_linerOrP�dirnamersr�)�src�dest�templater�r�r�r�r�r�ZfilelistrN�lineZcopied�filenameZoutname�resrFrFrG�copydir_run_2to3�s4
r�c@s eZdZdZdZdZdd�ZdS)�	Mixin2to3NcCst||j|j|j�S)N)r�r�r�r�)r�r�rFrFrGr�,szMixin2to3.run_2to3)rzr�r�r�r�r�r�rFrFrFrGr�sr�)rf)Nrr)rrNNrrN)NNN)NNNN)"r$r1�importlib.utilr�rir&Zdistutils.errorsrZdistutils.dep_utilrZdistutils.spawnrrErrrHrSrWrYr]rerhrkrlrmrnrxr�r�r�r�r�r�r�rFrFrFrG�<module>s>]
=




 PKV[�Y��/&/&)__pycache__/filelist.cpython-36.opt-1.pycnu�[���3


 \ 2�@s�dZddlZddlZddlZddlZddlmZddlmZm	Z	ddl
mZGdd�d�Zdd	�Z
ejfd
d�Zdd
�Zddd�ZdS)zsdistutils.filelist

Provides the FileList class, used for poking about the filesystem
and building lists of files.
�N)�convert_path)�DistutilsTemplateError�DistutilsInternalError)�logc@s|eZdZdZddd�Zdd�Zejfdd�Zd	d
�Z	dd�Z
d
d�Zdd�Zdd�Z
dd�Zdd�Zddd�Zddd�ZdS) �FileLista�A list of files built by on exploring the filesystem and filtered by
    applying various patterns to what we find there.

    Instance attributes:
      dir
        directory from which files will be taken -- only used if
        'allfiles' not supplied to constructor
      files
        list of filenames currently being built/filtered/manipulated
      allfiles
        complete list of files under consideration (ie. without any
        filtering applied)
    NcCsd|_g|_dS)N)�allfiles�files)�self�warn�debug_print�r�*/usr/lib64/python3.6/distutils/filelist.py�__init__szFileList.__init__cCs
||_dS)N)r)r	rrrr
�set_allfiles#szFileList.set_allfilescCst|�|_dS)N)�findallr)r	�dirrrr
r&szFileList.findallcCsddlm}|rt|�dS)z~Print 'msg' to stdout if the global DEBUG (taken from the
        DISTUTILS_DEBUG environment variable) flag is true.
        r)�DEBUGN)Zdistutils.debugr�print)r	�msgrrrr
r)szFileList.debug_printcCs|jj|�dS)N)r�append)r	�itemrrr
r3szFileList.appendcCs|jj|�dS)N)r�extend)r	�itemsrrr
r6szFileList.extendcCs@tttjj|j��}g|_x |D]}|jjtjj|��q WdS)N)�sorted�map�os�path�splitrr�join)r	Zsortable_filesZ
sort_tuplerrr
�sort9s
z
FileList.sortcCsDx>tt|j�ddd�D]$}|j||j|dkr|j|=qWdS)N�r���)�range�lenr)r	�irrr
�remove_duplicatesCszFileList.remove_duplicatescCs�|j�}|d}d}}}|dkrTt|�dkr<td|��dd	�|d
d�D�}n~|dkr�t|�d
krttd|��t|d
�}dd	�|dd�D�}n:|dkr�t|�dkr�td|��t|d
�}ntd|��||||fS)Nr�include�exclude�global-include�global-exclude�z&'%s' expects <pattern1> <pattern2> ...cSsg|]}t|��qSr)r)�.0�wrrr
�
<listcomp>Wsz1FileList._parse_template_line.<locals>.<listcomp>r �recursive-include�recursive-exclude�z,'%s' expects <dir> <pattern1> <pattern2> ...cSsg|]}t|��qSr)r)r+r,rrr
r-]s�graft�prunez#'%s' expects a single <dir_pattern>zunknown action '%s')r&r'r(r))r.r/)r1r2)rr#rr)r	�lineZwords�action�patternsr�dir_patternrrr
�_parse_template_lineLs,


zFileList._parse_template_linecCsX|j|�\}}}}|dkrZ|jddj|��x&|D]}|j|dd�s4tjd|�q4W�n�|dkr�|jddj|��x&|D]}|j|dd�s|tjd	|�q|W�n�|d
kr�|jddj|��x&|D]}|j|dd�s�tjd
|�q�W�nj|dk�r8|jddj|��x*|D]"}|j|dd��stjd|��qW�n|dk�r�|jd|dj|�f�x,|D]$}|j||d��s`tjd||��q`Wn�|dk�r�|jd|dj|�f�x�|D]$}|j||d��s�tjd||��q�Wnx|dk�r|jd|�|jd|d��sTtjd|�nB|dk�rH|jd|�|jd|d��sTtjd|�ntd|��dS)Nr&zinclude � r )�anchorz%warning: no files found matching '%s'r'zexclude z9warning: no previously-included files found matching '%s'zglobal-includezglobal-include rz>warning: no files found matching '%s' anywhere in distributionzglobal-excludezglobal-exclude zRwarning: no previously-included files matching '%s' found anywhere in distributionzrecursive-includezrecursive-include %s %s)�prefixz:warning: no files found matching '%s' under directory '%s'zrecursive-excludezrecursive-exclude %s %szNwarning: no previously-included files matching '%s' found under directory '%s'r1zgraft z+warning: no directories found matching '%s'r2zprune z6no previously-included directories found matching '%s'z'this cannot happen: invalid action '%s')r7rr�include_patternrr
�exclude_patternr)r	r3r4r5rr6�patternrrr
�process_template_linehsf










zFileList.process_template_liner rcCspd}t||||�}|jd|j�|jdkr4|j�x6|jD],}|j|�r<|jd|�|jj|�d}q<W|S)a�Select strings (presumably filenames) from 'self.files' that
        match 'pattern', a Unix-style wildcard (glob) pattern.  Patterns
        are not quite the same as implemented by the 'fnmatch' module: '*'
        and '?'  match non-special characters, where "special" is platform-
        dependent: slash on Unix; colon, slash, and backslash on
        DOS/Windows; and colon on Mac OS.

        If 'anchor' is true (the default), then the pattern match is more
        stringent: "*.py" will match "foo.py" but not "foo/bar.py".  If
        'anchor' is false, both of these will match.

        If 'prefix' is supplied, then only filenames starting with 'prefix'
        (itself a pattern) and ending with 'pattern', with anything in between
        them, will match.  'anchor' is ignored in this case.

        If 'is_regex' is true, 'anchor' and 'prefix' are ignored, and
        'pattern' is assumed to be either a string containing a regex or a
        regex object -- no translation is done, the regex is just compiled
        and used as-is.

        Selected strings will be added to self.files.

        Return True if files are found, False otherwise.
        Fz%include_pattern: applying regex r'%s'Nz adding T)�translate_patternrr=rr�searchrr)r	r=r9r:�is_regex�files_found�
pattern_re�namerrr
r;�s


zFileList.include_patterncCsvd}t||||�}|jd|j�xNtt|j�ddd�D]4}|j|j|�r:|jd|j|�|j|=d}q:W|S)aRemove strings (presumably filenames) from 'files' that match
        'pattern'.  Other parameters are the same as for
        'include_pattern()', above.
        The list 'self.files' is modified in place.
        Return True if files are found, False otherwise.
        Fz%exclude_pattern: applying regex r'%s'r z
 removing Tr!r!)r?rr=r"r#rr@)r	r=r9r:rArBrCr$rrr
r<�s
zFileList.exclude_pattern)NN)r Nr)r Nr)�__name__�
__module__�__qualname__�__doc__rrr�curdirrrrrrr%r7r>r;r<rrrr
rs



	L
,rcCs&dd�tj|dd�D�}ttjj|�S)z%
    Find all files under 'path'
    css,|]$\}}}|D]}tjj||�VqqdS)N)rrr)r+�base�dirsr�filerrr
�	<genexpr>�sz#_find_all_simple.<locals>.<genexpr>T)�followlinks)r�walk�filterr�isfile)rZresultsrrr
�_find_all_simple�srRcCs6t|�}|tjkr.tjtjj|d�}t||�}t|�S)z�
    Find all files under 'dir' and return the list of full filenames.
    Unless dir is '.', return full filenames with dir prepended.
    )�start)	rRrrI�	functools�partialr�relpathr�list)rrZmake_relrrr
rs


rcCs8tj|�}tj}tjdkrd}d|}tjd||�}|S)z�Translate a shell-like glob pattern to a regular expression; return
    a string containing the regex.  Differs from 'fnmatch.translate()' in
    that '*' does not match "special characters" (which are
    platform-specific).
    �\z\\\\z\1[^%s]z((?<!\\)(\\\\)*)\.)�fnmatch�	translater�sep�re�sub)r=rCr[Zescapedrrr
�
glob_to_res

r^r c
Cs�|rt|t�rtj|�S|Std�jd�\}}}|r>t|�}nd}|dk	r�t|�}|t|�t|�t|��}tj}	tjdkr�d}	|t|�t|�t|��}d|||	||f}n|r�d||t|�d�f}tj|�S)aTranslate a shell-like wildcard pattern to a compiled regular
    expression.  Return the compiled regex.  If 'is_regex' true,
    then 'pattern' is directly compiled to a regex (if it's a string)
    or just returned as-is (assumes it's a regex object).
    �_�NrXz\\z%s\A%s%s.*%s%sz%s\A%s)	�
isinstance�strr\�compiler^�	partitionr#rr[)
r=r9r:rArSr_�endrCZ	prefix_rer[rrr
r?%s(


r?)r Nr)rHrr\rYrTZdistutils.utilrZdistutils.errorsrrZ	distutilsrrrRrIrr^r?rrrr
�<module>siPKV[c����0__pycache__/cygwinccompiler.cpython-36.opt-2.pycnu�[���3


 \[@�@s�ddlZddlZddlZddlmZmZmZddlZddlm	Z	m
Z
ddlmZddl
mZddlmZmZmZmZddlmZddlmZdd	lmZd
d�ZGdd
�d
e�ZGdd�de�ZdZdZdZdd�Z ej!d�Z"dd�Z#dd�Z$dd�Z%dS)�N)�Popen�PIPE�check_output)�gen_preprocess_options�gen_lib_options)�
UnixCCompiler)�
write_file)�DistutilsExecError�CCompilerError�CompileError�UnknownFileError)�log)�LooseVersion)�find_executablecCs�tjjd�}|dkr|tj|d|d�}|dkr8dgS|dkrFdgS|d	krTd
gS|dkrbdgS|d
krpdgStd|��dS)NzMSC v.���
Z1300Zmsvcr70Z1310Zmsvcr71Z1400Zmsvcr80Z1500Zmsvcr90Z1600Zmsvcr100zUnknown MS Compiler version %s ���)�sys�version�find�
ValueError)Zmsc_posZmsc_ver�r�1/usr/lib64/python3.6/distutils/cygwinccompiler.py�	get_msvcr?src
@sNeZdZdZdZdZdZdZdZdZ	dd	d
�Z
dd�Zddd�Zddd�Z
d
S)�CygwinCCompiler�cygwinz.oz.az.dllzlib%s%sz%s%sz.exercCs�tj||||�t�\}}|jd||f�|tk	rB|jd|�t�\|_|_|_	|j|j
d|j|j|j	f�|jdkr�d|_nd|_|jdkr�d}nd	}|jd
ddd
d|j|fd�|jdkr�dg|_
|jd�nt�|_
dS)Nz%Python's GCC status: %s (details: %s)z�Python's pyconfig.h doesn't seem to support your compiler. Reason: %s. Compiling may fail because of undefined preprocessor macros.z: gcc %s, ld %s, dllwrap %s
z2.10.90�gcc�dllwrapz2.13z-sharedz
-mdll -staticzgcc -mcygwin -O -Wallzgcc -mcygwin -mdll -O -Wallzg++ -mcygwin -O -Wallzgcc -mcygwinz%s -mcygwin %s)�compiler�compiler_so�compiler_cxx�
linker_exe�	linker_soz2.91.57Zmsvcrtz,Consider upgrading to a newer version of gcc)r�__init__�check_config_hZdebug_print�CONFIG_H_OK�warn�get_versions�gcc_version�
ld_versionZdllwrap_version�
compiler_type�
linker_dll�set_executables�
dll_librariesr)�self�verbose�dry_run�forceZstatusZdetails�
shared_optionrrrr$ds<




zCygwinCCompiler.__init__cCs�|dks|dkrVy|jdd|d|g�Wq�tk
rR}zt|��WYdd}~Xq�XnNy"|j|j||d|g|�Wn*tk
r�}zt|��WYdd}~XnXdS)Nz.rcz.resZwindresz-iz-o)Zspawnr	rr )r/�obj�src�extZcc_args�extra_postargsZpp_opts�msgrrr�_compile�szCygwinCCompiler._compileNcCsRtj|
p
g�}
tj|pg�}tj|p&g�}|j|j�|dk	oP||jksT|jdk�rtjj|d�}tjjtjj	|��\}}tjj
||d�}tjj
|d|d�}dtjj	|�dg}x|D]}|j|�q�W|jt
||fd|�|jd	k�r|
jd
|g�|
jd|g�n
|j|�|	�s*|
jd�tj||||||||d|	|
|||
�dS)
Nrrz.def�libz.az
LIBRARY %sZEXPORTSz
writing %srz--output-libz--defz-s)�copy�extendr.Z
EXECUTABLEr,�os�path�dirname�splitext�basename�join�appendZexecuterr�link)r/Ztarget_descZobjectsZoutput_filename�
output_dirZ	librariesZlibrary_dirsZruntime_library_dirsZexport_symbols�debugZ
extra_preargsr7Z
build_tempZtarget_langZtemp_dirZdll_nameZ
dll_extensionZdef_fileZlib_file�contentsZsymrrrrD�s:	



zCygwinCCompiler.link�cCs�|dkrd}g}x�|D]�}tjjtjj|��\}}||jddgkrTtd||f��|rdtjj|�}|dkr�|jtjj||||j	��q|jtjj|||j	��qW|S)NrH�.rc�.resz"unknown file type '%s' (from '%s'))rJrI)
r=r>r@�normcaseZsrc_extensionsrrArCrB�
obj_extension)r/Zsource_filenamesZ	strip_dirrEZ	obj_namesZsrc_name�baser6rrr�object_filenames�s 
z CygwinCCompiler.object_filenames)rrr)
NNNNNrNNNN)rrH)�__name__�
__module__�__qualname__r+rLZstatic_lib_extensionZshared_lib_extensionZstatic_lib_formatZshared_lib_formatZ
exe_extensionr$r9rDrNrrrrrYs
;
Krc@seZdZdZddd�ZdS)�Mingw32CCompilerZmingw32rc	Csxtj||||�|jdkr d}nd}|jdkr4d}nd}t�rFtd��|jdd	d
dd|j||fd
�g|_t	�|_dS)Nz2.13z-sharedz
-mdll -staticz2.91.57z--entry _DllMain@12rHz1Cygwin gcc cannot be used with --compiler=mingw32zgcc -O -Wallzgcc -mdll -O -Wallzg++ -O -Wallrz%s %s %s)rr r!r"r#)
rr$r*r)�is_cygwingccr
r-r,r.r)r/r0r1r2r3Zentry_pointrrrr$s&

zMingw32CCompiler.__init__N)rrr)rOrPrQr+r$rrrrrRsrR�okznot okZ	uncertaincCs�ddlm}dtjkrtdfS|j�}y@t|�}z(d|j�krJtd|fStd|fSWd|j	�XWn.t
k
r�}ztd||jffSd}~XnXdS)	Nr)�	sysconfigZGCCzsys.version mentions 'GCC'Z__GNUC__z'%s' mentions '__GNUC__'z '%s' does not mention '__GNUC__'zcouldn't read '%s': %s)
�	distutilsrUrrr&�get_config_h_filename�open�read�CONFIG_H_NOTOK�close�OSError�CONFIG_H_UNCERTAIN�strerror)rU�fn�config_h�excrrrr%Hs
r%s(\d+\.\d+(\.\d+)*)cCsl|j�d}t|�dkrdSt|dtd�j}z|j�}Wd|j�Xtj|�}|dkrZdSt	|j
d�j��S)NrT)�shell�stdoutr)�splitrrrrcrYr[�
RE_VERSION�searchr�group�decode)�cmd�
executable�out�
out_string�resultrrr�_find_exe_versionus

rncCsdddg}tdd�|D��S)Nzgcc -dumpversionzld -vzdllwrap --versioncSsg|]}t|��qSr)rn)�.0rirrr�
<listcomp>�sz get_versions.<locals>.<listcomp>)�tuple)Zcommandsrrrr(�s
r(cCstddg�}|j�jd�S)Nrz-dumpmachinescygwin)r�strip�endswith)rlrrrrS�srS)&r=rr;�
subprocessrrr�reZdistutils.ccompilerrrZdistutils.unixccompilerrZdistutils.file_utilrZdistutils.errorsr	r
rrrVr
Zdistutils.versionrZdistutils.spawnrrrrRr&rZr]r%�compilerernr(rSrrrr�<module>0s.;1+
PKV[��c�-__pycache__/fancy_getopt.cpython-36.opt-2.pycnu�[���3


 \xE�@s�ddlZddlZddlZddlZddlTdZejde�Zejdeef�Ze	j
dd�ZGdd	�d	�Zd
d�Z
dd
�ejD�Zdd�Zdd�ZGdd�d�Zedkr�dZx2dD]*Zede�edjeee���e�q�WdS)�N)�*z[a-zA-Z](?:[a-zA-Z0-9-]*)z^%s$z^(%s)=!(%s)$�-�_c@s�eZdZddd�Zdd�Zdd�Zddd	�Zd
d�Zdd
�Zdd�Z	dd�Z
dd�Zdd�Zd dd�Z
dd�Zd!dd�Zd"dd�ZdS)#�FancyGetoptNcCsN||_i|_|jr|j�i|_i|_g|_g|_i|_i|_i|_	g|_
dS)N)�option_table�option_index�_build_index�alias�negative_alias�
short_opts�	long_opts�
short2long�	attr_name�	takes_arg�option_order)�selfr�r�./usr/lib64/python3.6/distutils/fancy_getopt.py�__init__)s	zFancyGetopt.__init__cCs,|jj�x|jD]}||j|d<qWdS)Nr)r�clearr)r�optionrrrrQs
zFancyGetopt._build_indexcCs||_|j�dS)N)rr)rrrrr�set_option_tableVszFancyGetopt.set_option_tablecCs<||jkrtd|��n |||f}|jj|�||j|<dS)Nz'option conflict: already an option '%s')r�DistutilsGetoptErrorr�append)r�long_optionZshort_optionZhelp_stringrrrr�
add_optionZs

zFancyGetopt.add_optioncCs
||jkS)N)r)rrrrr�
has_optioncszFancyGetopt.has_optioncCs
|jt�S)N)�	translate�
longopt_xlate)rrrrr�
get_attr_namehszFancyGetopt.get_attr_namecCsRxL|j�D]@\}}||jkr.td|||f��||jkr
td|||f��q
WdS)Nz(invalid %s '%s': option '%s' not definedz0invalid %s '%s': aliased option '%s' not defined)�itemsrr)r�aliasesZwhatr	�optrrr�_check_alias_dictns

zFancyGetopt._check_alias_dictcCs|j|d�||_dS)Nr	)r#r	)rr	rrr�set_aliasesxszFancyGetopt.set_aliasescCs|j|d�||_dS)Nznegative alias)r#r
)rr
rrr�set_negative_aliases}sz FancyGetopt.set_negative_aliasescCs�g|_g|_|jj�i|_�x�|jD�]�}t|�dkrH|\}}}d}n(t|�dkrb|\}}}}ntd|f��t|t	�s�t|�dkr�t
d|��|dkp�t|t	�o�t|�dks�t
d|��||j|<|jj|�|dd	k�r|r�|d
}|dd�}d|j|<nF|j
j|�}|dk	�rB|j|�r8t
d||f��||jd<d|j|<|jj|�}|dk	�r�|j||j|k�r�t
d||f��tj|��s�t
d
|��|j|�|j|<|r&|jj|�||j|d<q&WdS)N�r�zinvalid option tuple: %r�z9invalid long option '%s': must be a string of length >= 2�z:invalid short option '%s': must a single character or None�=�:z>invalid negative alias '%s': aliased option '%s' takes a valuezginvalid alias '%s': inconsistent with aliased option '%s' (one of them takes a value, the other doesn'tzEinvalid long option name '%s' (must be letters, numbers, hyphens only���r,r,)rrr
r�repeatr�len�
ValueError�
isinstance�strrrrr
�getr	�
longopt_re�matchrr)rr�long�short�helpr-Zalias_torrr�_grok_option_table�s^






zFancyGetopt._grok_option_tablecCsr|dkrtjdd�}|dkr*t�}d}nd}|j�dj|j�}ytj|||j�\}}Wn,tjk
r�}zt	|��WYdd}~XnXx�|D]�\}}t
|�dkr�|ddkr�|j|d}n|dd�}|jj
|�}	|	r�|	}|j|�s
|jj
|�}	|	�r|	}d}nd}|j|}
|�r<|jj
|
�dk	�r<t||
d�d}t||
|�|jj||f�q�W|�rj||fS|SdS)Nr)TF� r(rr)�sys�argv�OptionDummyr8�joinr�getoptr�errorZDistutilsArgErrorr.r
r	r2rr
rr-�getattr�setattrrr)r�args�objectZcreated_objectrZopts�msgr"�valr	�attrrrrr>�sB
zFancyGetopt.getoptcCs|jdkrtd��n|jSdS)Nz!'getopt()' hasn't been called yet)r�RuntimeError)rrrr�get_option_orders

zFancyGetopt.get_option_ordercCsxd}xV|jD]L}|d}|d}t|�}|ddkr<|d}|dk	rL|d}||kr|}qW|ddd}d}||}	d|}
|r�|g}ndg}x�|jD]�}|dd	�\}}}t||	�}
|ddkr�|dd�}|dk�r|
�r�|jd
|||
df�n|jd||f�n:d||f}|
�r<|jd
|||
df�n|jd
|�x$|
dd�D]}|j|
|��qXWq�W|S)Nrr)r*�r(�Nr9zOption summary:r&z  --%-*s  %sz
  --%-*s  z%s (-%s)z  --%-*sr,r,r,)rr.�	wrap_textr)r�headerZmax_optrr5r6�lZ	opt_widthZ
line_widthZ
text_widthZ
big_indent�linesr7�textZ	opt_namesrrr�
generate_helpsF

zFancyGetopt.generate_helpcCs4|dkrtj}x |j|�D]}|j|d�qWdS)N�
)r:�stdoutrP�write)rrL�file�linerrr�
print_helphszFancyGetopt.print_help)N)NN)NN)N)NN)�__name__�
__module__�__qualname__rrrrrrr#r$r%r8r>rHrPrVrrrrrs
(
	
M
=

OrcCst|�}|j|�|j||�S)N)rr%r>)�optionsZnegative_optrCrB�parserrrr�fancy_getoptos
r\cCsi|]}dt|��qS)r9)�ord)�.0Z_wscharrrr�
<dictcomp>usr_cCs"|dkrgSt|�|kr|gS|j�}|jt�}tjd|�}dd�|D�}g}x�|�rg}d}xZ|r�t|d�}|||kr�|j|d�|d=||}q`|r�|dddkr�|d	=Pq`W|�r
|dkr�|j|dd|��|d|d�|d<|dddk�r
|d=|jdj|��qPW|S)
Nz( +|-+)cSsg|]}|r|�qSrr)r^Zchrrr�
<listcomp>�szwrap_text.<locals>.<listcomp>rr)r9�r,r,)r.�
expandtabsr�WS_TRANS�re�splitrr=)rO�widthZchunksrNZcur_lineZcur_lenrMrrrrKws:

rKcCs
|jt�S)N)rr)r"rrr�translate_longopt�srgc@seZdZgfdd�ZdS)r<cCsx|D]}t||d�qWdS)N)rA)rrZr"rrrr�s
zOptionDummy.__init__N)rWrXrYrrrrrr<�sr<�__main__z�Tra-la-la, supercalifragilisticexpialidocious.
How *do* you spell that odd word, anyways?
(Someone ask Mary -- she'll know [or she'll
say, "How should I know?"].)�
���(z	width: %drQ)rirjrkrl)r:�stringrdr>Zdistutils.errorsZlongopt_pat�compiler3Zneg_alias_rer1�	maketransrrr\Z
whitespacercrKrgr<rWrO�w�printr=rrrr�<module>s(T6
PKV[5L�
!
!*__pycache__/text_file.cpython-36.opt-1.pycnu�[���3


 \�0�@s&dZddlZddlZGdd�d�ZdS)z�text_file

provides the TextFile class, which gives an interface to text files
that (optionally) takes care of stripping comments, ignoring blank
lines, and joining lines with backslashes.�Nc@steZdZdZdddddddd�Zddd�Zd	d
�Zdd�Zdd
d�Zddd�Z	ddd�Z
dd�Zdd�Zdd�Z
dS)�TextFilea�Provides a file-like object that takes care of all the things you
       commonly want to do when processing a text file that has some
       line-by-line syntax: strip comments (as long as "#" is your
       comment character), skip blank lines, join adjacent lines by
       escaping the newline (ie. backslash at end of line), strip
       leading and/or trailing whitespace.  All of these are optional
       and independently controllable.

       Provides a 'warn()' method so you can generate warning messages that
       report physical line number, even if the logical line in question
       spans multiple physical lines.  Also provides 'unreadline()' for
       implementing line-at-a-time lookahead.

       Constructor is called as:

           TextFile (filename=None, file=None, **options)

       It bombs (RuntimeError) if both 'filename' and 'file' are None;
       'filename' should be a string, and 'file' a file object (or
       something that provides 'readline()' and 'close()' methods).  It is
       recommended that you supply at least 'filename', so that TextFile
       can include it in warning messages.  If 'file' is not supplied,
       TextFile creates its own using 'io.open()'.

       The options are all boolean, and affect the value returned by
       'readline()':
         strip_comments [default: true]
           strip from "#" to end-of-line, as well as any whitespace
           leading up to the "#" -- unless it is escaped by a backslash
         lstrip_ws [default: false]
           strip leading whitespace from each line before returning it
         rstrip_ws [default: true]
           strip trailing whitespace (including line terminator!) from
           each line before returning it
         skip_blanks [default: true}
           skip lines that are empty *after* stripping comments and
           whitespace.  (If both lstrip_ws and rstrip_ws are false,
           then some lines may consist of solely whitespace: these will
           *not* be skipped, even if 'skip_blanks' is true.)
         join_lines [default: false]
           if a backslash is the last non-newline character on a line
           after stripping comments and whitespace, join the following line
           to it to form one "logical line"; if N consecutive lines end
           with a backslash, then N+1 physical lines will be joined to
           form one logical line.
         collapse_join [default: false]
           strip leading whitespace from lines that are joined to their
           predecessor; only matters if (join_lines and not lstrip_ws)
         errors [default: 'strict']
           error handler used to decode the file content

       Note that since 'rstrip_ws' can strip the trailing newline, the
       semantics of 'readline()' must differ from those of the builtin file
       object's 'readline()' method!  In particular, 'readline()' returns
       None for end-of-file: an empty string might just be a blank line (or
       an all-whitespace line), if 'rstrip_ws' is true but 'skip_blanks' is
       not.�r�strict)�strip_comments�skip_blanks�	lstrip_ws�	rstrip_ws�
join_lines�
collapse_join�errorsNcKs�|dkr|dkrtd��x>|jj�D]0}||krBt||||�q$t|||j|�q$Wx&|j�D]}||jkrbtd|��qbW|dkr�|j|�n||_||_d|_g|_	dS)z�Construct a new TextFile object.  At least one of 'filename'
           (a string) and 'file' (a file-like object) must be supplied.
           They keyword argument options are described above and affect
           the values returned by 'readline()'.Nz7you must supply either or both of 'filename' and 'file'zinvalid TextFile option '%s'r)
�RuntimeError�default_options�keys�setattr�KeyError�open�filename�file�current_line�linebuf)�selfrrZoptions�opt�r�+/usr/lib64/python3.6/distutils/text_file.py�__init__Ns
zTextFile.__init__cCs&||_tj|jd|jd�|_d|_dS)zyOpen a new file named 'filename'.  This overrides both the
           'filename' and 'file' arguments to the constructor.�r)rrN)r�iorrrr)rrrrrrosz
TextFile.opencCs$|j}d|_d|_d|_|j�dS)ziClose the current file and forget everything we know about it
           (filename, current line number).N)rrr�close)rrrrrrvs
zTextFile.closecCsjg}|dkr|j}|j|jd�t|ttf�rD|jdt|��n|jd|�|jt|��dj|�S)Nz, z
lines %d-%d: z	line %d: �)r�appendr�
isinstance�list�tuple�str�join)r�msg�lineZoutmsgrrr�	gen_errorszTextFile.gen_errorcCstd|j||���dS)Nzerror: )�
ValueErrorr')rr%r&rrr�error�szTextFile.errorcCs tjjd|j||�d�dS)a�Print (to stderr) a warning message tied to the current logical
           line in the current file.  If the current logical line in the
           file spans multiple physical lines, the warning refers to the
           whole range, eg. "lines 3-5".  If 'line' supplied, it overrides
           the current line number; it may be a list or tuple to indicate a
           range of physical lines, or an integer for a single physical
           line.z	warning: �
N)�sys�stderr�writer')rr%r&rrr�warn�sz
TextFile.warncCs|jr|jd}|jd
=|Sd}�x�|jj�}|dkr:d}|jr�|r�|jd�}|dkrXnX|dksp||ddkr�|ddkr�dp�d}|d|�|}|j�dkr�q$n|jdd�}|jo�|�r |dkr�|jd	�|S|j	r�|j
�}||}t|jt
��r|jdd|jd<n|j|jdg|_n:|dk�r.dSt|jt
��rN|jdd|_n|jd|_|j�rt|j�rt|j�}n"|j�r�|j
�}n|j�r�|j�}|dk�s�|dk�r�|j�r�q$|j�r�|ddk�r�|dd�}q$|dd�dk�r�|dd�d}q$|SdS)aURead and return a single logical line from the current file (or
           from an internal buffer if lines have previously been "unread"
           with 'unreadline()').  If the 'join_lines' option is true, this
           may involve reading multiple physical lines concatenated into a
           single string.  Updates the current line number, so calling
           'warn()' after 'readline()' emits a warning about the physical
           line(s) just read.  Returns None on end-of-file, since the empty
           string can occur if 'rstrip_ws' is true but 'strip_blanks' is
           not.rrN�#r�\r*z\#z2continuation line immediately precedes end-of-file�z\
���r2r2r2r2r2���r3)rr�readliner�find�strip�replacer	r.r
�lstripr rr!rr�rstripr)rr&Zbuildup_line�posZeolrrrr4�sf




	



zTextFile.readlinecCs,g}x"|j�}|dkr|S|j|�qWdS)zWRead and return the list of all logical lines remaining in the
           current file.N)r4r)r�linesr&rrr�	readlinesszTextFile.readlinescCs|jj|�dS)z�Push 'line' (a string) onto an internal buffer that will be
           checked by future 'readline()' calls.  Handy for implementing
           a parser with line-at-a-time lookahead.N)rr)rr&rrr�
unreadlineszTextFile.unreadline)NN)N)N)N)�__name__�
__module__�__qualname__�__doc__r
rrrr'r)r.r4r<r=rrrrr
s"9
!	



x
r)rAr+rrrrrr�<module>sPKV[n7#Fāā*__pycache__/ccompiler.cpython-36.opt-1.pycnu�[���3


 \7��@s�dZddlZddlZddlZddlTddlmZddlmZddl	m
Z
ddlmZm
Z
ddlmZmZdd	lmZGd
d�d�Zd-Zd.dd�Zd/d0d1d2d3d!�Zd"d#�Zd4d$d%�Zd&d'�Zd(d)�ZdS)5z�distutils.ccompiler

Contains CCompiler, an abstract base class that defines the interface
for the Distutils compiler abstraction model.�N)�*)�spawn)�	move_file)�mkpath)�newer_pairwise�newer_group)�split_quoted�execute)�logc
@seZdZdZdZdZdZdZdZdZ	dZ
dZdddddd�ZdddgZ
dqdd	�Zd
d�Zdd
�Zdd�Zdd�Zdrdd�Zdd�Zdd�Zdd�Zdd�Zdd�Zdd�Zd d!�Zd"d#�Zd$d%�Zd&d'�Zd(d)�Zd*d+�Zd,d-�Z d.d/�Z!dsd0d1�Z"d2d3�Z#d4d5�Z$d6d7�Z%d8d9�Z&dtd:d;�Z'dud<d=�Z(d>d?�Z)dvd@dA�Z*dBZ+dCZ,dDZ-dwdEdF�Z.dxdGdH�Z/dydIdJ�Z0dzdKdL�Z1dMdN�Z2dOdP�Z3dQdR�Z4d{dSdT�Z5d|dUdV�Z6d}dXdY�Z7d~dZd[�Z8dd\d]�Z9d�d_d`�Z:d�dbdc�Z;ddde�Z<dfdg�Z=d�dhdi�Z>djdk�Z?dldm�Z@d�dodp�ZAdS)��	CCompilera�Abstract base class to define the interface that must be implemented
    by real compiler classes.  Also has some utility methods used by
    several compiler classes.

    The basic idea behind a compiler abstraction class is that each
    instance can be used for all the compile/link steps in building a
    single project.  Thus, attributes common to all of those compile and
    link steps -- include directories, macros to define, libraries to link
    against, etc. -- are attributes of the compiler instance.  To allow for
    variability in how individual files are treated, most of those
    attributes may be varied on a per-compilation or per-link basis.
    N�czc++Zobjc)z.cz.ccz.cppz.cxxz.mrcCsf||_||_||_d|_g|_g|_g|_g|_g|_g|_	x$|j
j�D]}|j||j
|�qHWdS)N)
�dry_run�force�verbose�
output_dir�macros�include_dirs�	libraries�library_dirs�runtime_library_dirs�objects�executables�keys�set_executable)�selfrr
r�key�r�+/usr/lib64/python3.6/distutils/ccompiler.py�__init__UszCCompiler.__init__cKs@x:|D]2}||jkr(td||jjf��|j|||�qWdS)a�Define the executables (and options for them) that will be run
        to perform the various stages of compilation.  The exact set of
        executables that may be specified here depends on the compiler
        class (via the 'executables' class attribute), but most will have:
          compiler      the C/C++ compiler
          linker_so     linker used to create shared objects and libraries
          linker_exe    linker used to create binary executables
          archiver      static library creator

        On platforms with a command-line (Unix, DOS/Windows), each of these
        is a string that will be split into executable name and (optional)
        list of arguments.  (Splitting the string is done similarly to how
        Unix shells operate: words are delimited by spaces, but quotes and
        backslashes can override this.  See
        'distutils.util.split_quoted()'.)
        z$unknown executable '%s' for class %sN)r�
ValueError�	__class__�__name__r)r�kwargsrrrr�set_executablesys


zCCompiler.set_executablescCs,t|t�rt||t|��nt|||�dS)N)�
isinstance�str�setattrr)rr�valuerrrr�s
zCCompiler.set_executablecCs0d}x&|jD]}|d|kr |S|d7}qWdS)Nr�)r)r�name�i�defnrrr�_find_macro�szCCompiler._find_macrocCsdx^|D]V}t|t�oFt|�dkoFt|dt�s:|ddkoFt|dt�std|dd��qWdS)	z�Ensures that every element of 'definitions' is a valid macro
        definition, ie. either (name,value) 2-tuple or a (name,) tuple.  Do
        nothing if all definitions are OK, raise TypeError otherwise.
        r(�Nrzinvalid macro definition '%s': z.must be tuple (string,), (string, string), or z(string, None))r(r-)r$�tuple�lenr%�	TypeError)rZdefinitionsr+rrr�_check_macro_definitions�s


z"CCompiler._check_macro_definitionscCs.|j|�}|dk	r|j|=|jj||f�dS)a_Define a preprocessor macro for all compilations driven by this
        compiler object.  The optional parameter 'value' should be a
        string; if it is not supplied, then the macro will be defined
        without an explicit value and the exact outcome depends on the
        compiler used (XXX true? does ANSI say anything about this?)
        N)r,r�append)rr)r'r*rrr�define_macro�s	
zCCompiler.define_macrocCs0|j|�}|dk	r|j|=|f}|jj|�dS)a�Undefine a preprocessor macro for all compilations driven by
        this compiler object.  If the same macro is defined by
        'define_macro()' and undefined by 'undefine_macro()' the last call
        takes precedence (including multiple redefinitions or
        undefinitions).  If the macro is redefined/undefined on a
        per-compilation basis (ie. in the call to 'compile()'), then that
        takes precedence.
        N)r,rr2)rr)r*Zundefnrrr�undefine_macro�s

zCCompiler.undefine_macrocCs|jj|�dS)z�Add 'dir' to the list of directories that will be searched for
        header files.  The compiler is instructed to search directories in
        the order in which they are supplied by successive calls to
        'add_include_dir()'.
        N)rr2)r�dirrrr�add_include_dir�szCCompiler.add_include_dircCs|dd�|_dS)aySet the list of directories that will be searched to 'dirs' (a
        list of strings).  Overrides any preceding calls to
        'add_include_dir()'; subsequence calls to 'add_include_dir()' add
        to the list passed to 'set_include_dirs()'.  This does not affect
        any list of standard include directories that the compiler may
        search by default.
        N)r)r�dirsrrr�set_include_dirs�szCCompiler.set_include_dirscCs|jj|�dS)a�Add 'libname' to the list of libraries that will be included in
        all links driven by this compiler object.  Note that 'libname'
        should *not* be the name of a file containing a library, but the
        name of the library itself: the actual filename will be inferred by
        the linker, the compiler, or the compiler class (depending on the
        platform).

        The linker will be instructed to link against libraries in the
        order they were supplied to 'add_library()' and/or
        'set_libraries()'.  It is perfectly valid to duplicate library
        names; the linker will be instructed to link against libraries as
        many times as they are mentioned.
        N)rr2)r�libnamerrr�add_library�szCCompiler.add_librarycCs|dd�|_dS)z�Set the list of libraries to be included in all links driven by
        this compiler object to 'libnames' (a list of strings).  This does
        not affect any standard system libraries that the linker may
        include by default.
        N)r)rZlibnamesrrr�
set_libraries�szCCompiler.set_librariescCs|jj|�dS)a'Add 'dir' to the list of directories that will be searched for
        libraries specified to 'add_library()' and 'set_libraries()'.  The
        linker will be instructed to search for libraries in the order they
        are supplied to 'add_library_dir()' and/or 'set_library_dirs()'.
        N)rr2)rr5rrr�add_library_dirszCCompiler.add_library_dircCs|dd�|_dS)z�Set the list of library search directories to 'dirs' (a list of
        strings).  This does not affect any standard library search path
        that the linker may search by default.
        N)r)rr7rrr�set_library_dirsszCCompiler.set_library_dirscCs|jj|�dS)zlAdd 'dir' to the list of directories that will be searched for
        shared libraries at runtime.
        N)rr2)rr5rrr�add_runtime_library_dirsz!CCompiler.add_runtime_library_dircCs|dd�|_dS)z�Set the list of directories to search for shared libraries at
        runtime to 'dirs' (a list of strings).  This does not affect any
        standard search path that the runtime linker may search by
        default.
        N)r)rr7rrr�set_runtime_library_dirssz"CCompiler.set_runtime_library_dirscCs|jj|�dS)z�Add 'object' to the list of object files (or analogues, such as
        explicitly named library files or the output of "resource
        compilers") to be included in every link driven by this compiler
        object.
        N)rr2)r�objectrrr�add_link_object szCCompiler.add_link_objectcCs|dd�|_dS)z�Set the list of object files (or analogues) to be included in
        every link to 'objects'.  This does not affect any standard object
        files that the linker may include by default (such as system
        libraries).
        N)r)rrrrr�set_link_objects(szCCompiler.set_link_objectscCs|dkr|j}nt|t�s"td��|dkr2|j}n"t|t�rL||jpFg}ntd��|dkrd|j}n*t|ttf�r�t|�|jp�g}ntd��|dkr�g}|j|d|d�}t	||�}i}	xRt
t|��D]B}
||
}||
}tj
j|�d}
|jtj
j|��||
f|	|<q�W|||||	fS)z;Process arguments and decide which source files to compile.Nz%'output_dir' must be a string or Nonez/'macros' (if supplied) must be a list of tuplesz6'include_dirs' (if supplied) must be a list of stringsr)�	strip_dirrr()rr$r%r0r�listrr.�object_filenames�gen_preprocess_options�ranger/�os�path�splitextr�dirname)rZoutdirrZincdirs�sources�dependsZextrar�pp_opts�buildr*�src�obj�extrrr�_setup_compile6s8


zCCompiler._setup_compilecCs0|dg}|rdg|dd�<|r,||dd�<|S)Nz-cz-grr)rrN�debugZbefore�cc_argsrrr�_get_cc_argsas
zCCompiler._get_cc_argscCs�|dkr|j}nt|t�s"td��|dkr2|j}n"t|t�rL||jpFg}ntd��|dkrd|j}n*t|ttf�r�t|�|jp�g}ntd��|||fS)a'Typecheck and fix-up some of the arguments to the 'compile()'
        method, and return fixed-up values.  Specifically: if 'output_dir'
        is None, replaces it with 'self.output_dir'; ensures that 'macros'
        is a list, and augments it with 'self.macros'; ensures that
        'include_dirs' is a list, and augments it with 'self.include_dirs'.
        Guarantees that the returned values are of the correct type,
        i.e. for 'output_dir' either string or None, and for 'macros' and
        'include_dirs' either list or None.
        Nz%'output_dir' must be a string or Nonez/'macros' (if supplied) must be a list of tuplesz6'include_dirs' (if supplied) must be a list of strings)rr$r%r0rrDrr.)rrrrrrr�_fix_compile_argsjs 


zCCompiler._fix_compile_argscCs|j||d�}|ifS)a+Decide which souce files must be recompiled.

        Determine the list of object files corresponding to 'sources',
        and figure out which ones really need to be recompiled.
        Return a list of all object files and a dictionary telling
        which source files can be skipped.
        )r)rE)rrLrrMrrrr�
_prep_compile�s	zCCompiler._prep_compilecCsHt|ttf�std��t|�}|dkr.|j}nt|t�s@td��||fS)z�Typecheck and fix up some arguments supplied to various methods.
        Specifically: ensure that 'objects' is a list; if output_dir is
        None, replace with self.output_dir.  Return fixed versions of
        'objects' and 'output_dir'.
        z,'objects' must be a list or tuple of stringsNz%'output_dir' must be a string or None)r$rDr.r0rr%)rrrrrr�_fix_object_args�s
zCCompiler._fix_object_argscCs�|dkr|j}n*t|ttf�r2t|�|jp,g}ntd��|dkrJ|j}n*t|ttf�rlt|�|jpfg}ntd��|dkr�|j}n*t|ttf�r�t|�|jp�g}ntd��|||fS)a;Typecheck and fix up some of the arguments supplied to the
        'link_*' methods.  Specifically: ensure that all arguments are
        lists, and augment them with their permanent versions
        (eg. 'self.libraries' augments 'libraries').  Return a tuple with
        fixed versions of all arguments.
        Nz3'libraries' (if supplied) must be a list of stringsz6'library_dirs' (if supplied) must be a list of stringsz>'runtime_library_dirs' (if supplied) must be a list of strings)rr$rDr.r0rr)rrrrrrr�
_fix_lib_args�s&zCCompiler._fix_lib_argscCs2|jr
dS|jr t||dd�}n
t||�}|SdS)zjReturn true if we need to relink the files listed in 'objects'
        to recreate 'output_file'.
        T�newer)ZmissingN)rr
r)rr�output_filer[rrr�
_need_link�s
zCCompiler._need_linkc	Cs�t|t�s|g}d}t|j�}x^|D]V}tjj|�\}}|jj|�}y |jj	|�}||krb|}|}Wq$t
k
rxYq$Xq$W|S)z|Detect the language of a given file, or list of files. Uses
        language_map, and language_order to do the job.
        N)r$rDr/�language_orderrHrIrJ�language_map�get�indexr)	rrLZlangra�source�baserRZextlangZextindexrrr�detect_language�s



zCCompiler.detect_languagecCsdS)a�Preprocess a single C/C++ source file, named in 'source'.
        Output will be written to file named 'output_file', or stdout if
        'output_file' not supplied.  'macros' is a list of macro
        definitions as for 'compile()', which will augment the macros set
        with 'define_macro()' and 'undefine_macro()'.  'include_dirs' is a
        list of directory names that will be added to the default list.

        Raises PreprocessError on failure.
        Nr)rrbr\rr�
extra_preargs�extra_postargsrrr�
preprocess�szCCompiler.preprocessc	Csz|j||||||�\}}	}}
}|j|
||�}xH|	D]@}
y||
\}}Wntk
r\w2YnX|j|
|||||
�q2W|	S)aK	Compile one or more source files.

        'sources' must be a list of filenames, most likely C/C++
        files, but in reality anything that can be handled by a
        particular compiler and compiler class (eg. MSVCCompiler can
        handle resource files in 'sources').  Return a list of object
        filenames, one per source filename in 'sources'.  Depending on
        the implementation, not all source files will necessarily be
        compiled, but all corresponding object filenames will be
        returned.

        If 'output_dir' is given, object files will be put under it, while
        retaining their original path component.  That is, "foo/bar.c"
        normally compiles to "foo/bar.o" (for a Unix implementation); if
        'output_dir' is "build", then it would compile to
        "build/foo/bar.o".

        'macros', if given, must be a list of macro definitions.  A macro
        definition is either a (name, value) 2-tuple or a (name,) 1-tuple.
        The former defines a macro; if the value is None, the macro is
        defined without an explicit value.  The 1-tuple case undefines a
        macro.  Later definitions/redefinitions/ undefinitions take
        precedence.

        'include_dirs', if given, must be a list of strings, the
        directories to add to the default include file search path for this
        compilation only.

        'debug' is a boolean; if true, the compiler will be instructed to
        output debug symbols in (or alongside) the object file(s).

        'extra_preargs' and 'extra_postargs' are implementation- dependent.
        On platforms that have the notion of a command-line (e.g. Unix,
        DOS/Windows), they are most likely lists of strings: extra
        command-line arguments to prepand/append to the compiler command
        line.  On other platforms, consult the implementation class
        documentation.  In any event, they are intended as an escape hatch
        for those occasions when the abstract compiler framework doesn't
        cut the mustard.

        'depends', if given, is a list of filenames that all targets
        depend on.  If a source file is older than any file in
        depends, then the source file will be recompiled.  This
        supports dependency tracking, but only at a coarse
        granularity.

        Raises CompileError on failure.
        )rSrV�KeyError�_compile)rrLrrrrTrerfrMrrNrOrUrQrPrRrrr�compile�s6
zCCompiler.compilecCsdS)zCompile 'src' to product 'obj'.Nr)rrQrPrRrUrfrNrrrriCszCCompiler._compilecCsdS)a&Link a bunch of stuff together to create a static library file.
        The "bunch of stuff" consists of the list of object files supplied
        as 'objects', the extra object files supplied to
        'add_link_object()' and/or 'set_link_objects()', the libraries
        supplied to 'add_library()' and/or 'set_libraries()', and the
        libraries supplied as 'libraries' (if any).

        'output_libname' should be a library name, not a filename; the
        filename will be inferred from the library name.  'output_dir' is
        the directory where the library file will be put.

        'debug' is a boolean; if true, debugging information will be
        included in the library (note that on most platforms, it is the
        compile step where this matters: the 'debug' flag is included here
        just for consistency).

        'target_lang' is the target language for which the given objects
        are being compiled. This allows specific linkage time treatment of
        certain languages.

        Raises LibError on failure.
        Nr)rr�output_libnamerrT�target_langrrr�create_static_libIszCCompiler.create_static_libZ
shared_objectZshared_library�
executablecCst�dS)auLink a bunch of stuff together to create an executable or
        shared library file.

        The "bunch of stuff" consists of the list of object files supplied
        as 'objects'.  'output_filename' should be a filename.  If
        'output_dir' is supplied, 'output_filename' is relative to it
        (i.e. 'output_filename' can provide directory components if
        needed).

        'libraries' is a list of libraries to link against.  These are
        library names, not filenames, since they're translated into
        filenames in a platform-specific way (eg. "foo" becomes "libfoo.a"
        on Unix and "foo.lib" on DOS/Windows).  However, they can include a
        directory component, which means the linker will look in that
        specific directory rather than searching all the normal locations.

        'library_dirs', if supplied, should be a list of directories to
        search for libraries that were specified as bare library names
        (ie. no directory component).  These are on top of the system
        default and those supplied to 'add_library_dir()' and/or
        'set_library_dirs()'.  'runtime_library_dirs' is a list of
        directories that will be embedded into the shared library and used
        to search for other shared libraries that *it* depends on at
        run-time.  (This may only be relevant on Unix.)

        'export_symbols' is a list of symbols that the shared library will
        export.  (This appears to be relevant only on Windows.)

        'debug' is as for 'compile()' and 'create_static_lib()', with the
        slight distinction that it actually matters on most platforms (as
        opposed to 'create_static_lib()', which includes a 'debug' flag
        mostly for form's sake).

        'extra_preargs' and 'extra_postargs' are as for 'compile()' (except
        of course that they supply command-line arguments for the
        particular linker being used).

        'target_lang' is the target language for which the given objects
        are being compiled. This allows specific linkage time treatment of
        certain languages.

        Raises LinkError on failure.
        N)�NotImplementedError)rZtarget_descr�output_filenamerrrr�export_symbolsrTrerf�
build_temprlrrr�linkis9zCCompiler.linkc

Cs2|jtj||j|dd�|||||||	|
||�
dS)N�shared)�lib_type)rsr�SHARED_LIBRARY�library_filename)
rrrkrrrrrqrTrerfrrrlrrr�link_shared_lib�s
zCCompiler.link_shared_libc

Cs(|jtj|||||||||	|
||�
dS)N)rsr�
SHARED_OBJECT)
rrrprrrrrqrTrerfrrrlrrr�link_shared_object�s

zCCompiler.link_shared_objectcCs.|jtj||j|�||||d|||	d|
�
dS)N)rsr�
EXECUTABLE�executable_filename)rrZoutput_prognamerrrrrTrerfrlrrr�link_executable�s

zCCompiler.link_executablecCst�dS)zkReturn the compiler option to add 'dir' to the list of
        directories searched for libraries.
        N)ro)rr5rrr�library_dir_option�szCCompiler.library_dir_optioncCst�dS)zsReturn the compiler option to add 'dir' to the list of
        directories searched for runtime libraries.
        N)ro)rr5rrr�runtime_library_dir_option�sz$CCompiler.runtime_library_dir_optioncCst�dS)zReturn the compiler option to add 'lib' to the list of libraries
        linked into the shared library or executable.
        N)ro)r�librrr�library_option�szCCompiler.library_optioncCs�ddl}|dkrg}|dkr g}|dkr,g}|dkr8g}|jd|dd�\}}tj|d�}	z.x|D]}
|	jd|
�q`W|	jd|�Wd|	j�Xy|j|g|d	�}Wntk
r�d
SXy|j|d||d�Wnt	t
fk
r�d
SXdS)
z�Return a boolean indicating whether funcname is supported on
        the current platform.  The optional arguments can be used to
        augment the compilation environment.
        rNz.cT)�text�wz#include "%s"
z+main (int argc, char **argv) {
    %s();
}
)rFza.out)rr)�tempfileZmkstemprH�fdopen�write�closerjZCompileErrorr}Z	LinkErrorr0)r�funcnameZincludesrrrr��fdZfname�fZinclrrrr�has_function�s8	

zCCompiler.has_functioncCst�dS)aHSearch the specified list of directories for a static or shared
        library file 'lib' and return the full path to that file.  If
        'debug' true, look for a debugging version (if that makes sense on
        the current platform).  Return None if 'lib' wasn't found in any of
        the specified directories.
        N)ro)rr7r�rTrrr�find_library_file#szCCompiler.find_library_file�cCs�|dkrd}g}x�|D]|}tjj|�\}}tjj|�d}|tjj|�d�}||jkrhtd||f��|rxtjj|�}|jtjj	|||j
��qW|S)Nr�r(z"unknown file type '%s' (from '%s'))rHrIrJ�
splitdrive�isabs�src_extensionsZUnknownFileError�basenamer2�join�
obj_extension)rZsource_filenamesrCrZ	obj_namesZsrc_namercrRrrrrENs

zCCompiler.object_filenamescCs$|rtjj|�}tjj|||j�S)N)rHrIr�r��shared_lib_extension)rr�rCrrrr�shared_object_filename_sz CCompiler.shared_object_filenamecCs(|rtjj|�}tjj|||jp"d�S)Nr�)rHrIr�r��
exe_extension)rr�rCrrrrr|eszCCompiler.executable_filename�staticc
Cs`|d	krtd��t||d�}t||d�}tjj|�\}}|||f}	|rPd}tjj|||	�S)
Nr�rt�dylib�
xcode_stubz?'lib_type' must be "static", "shared", "dylib", or "xcode_stub"Z_lib_formatZ_lib_extensionr�)r�rtr�r�)r�getattrrHrI�splitr�)
rr9rurCrZfmtrRr5rc�filenamerrrrwkszCCompiler.library_filenamer(cCstj|�dS)N)r
rT)r�msg�levelrrr�announce~szCCompiler.announcecCsddlm}|rt|�dS)Nr)�DEBUG)Zdistutils.debugr��print)rr�r�rrr�debug_print�szCCompiler.debug_printcCstjjd|�dS)Nzwarning: %s
)�sys�stderrr�)rr�rrr�warn�szCCompiler.warncCst||||j�dS)N)r	r
)r�func�argsr�r�rrrr	�szCCompiler.executecCst||jd�dS)N)r
)rr
)r�cmdrrrr�szCCompiler.spawncCst|||jd�S)N)r
)rr
)rrP�dstrrrr�szCCompiler.move_file�cCst|||jd�dS)N)r
)rr
)rr)�moderrrr�szCCompiler.mkpath)rrr)N)N)NNNNN)NNNrNNN)NrN)
NNNNNrNNNN)
NNNNNrNNNN)
NNNNNrNNNN)NNNNrNNN)NNNN)r)rr�)rr�)rr�)r�rr�)r()Nr()r�)Br!�
__module__�__qualname__�__doc__Z
compiler_typer�r�Zstatic_lib_extensionr�Zstatic_lib_formatZshared_lib_formatr�r_r^rr#rr,r1r3r4r6r8r:r;r<r=r>r?rArBrSrVrWrXrYrZr]rdrgrjrirmryrvr{rsrxrzr}r~rr�r�r�rEr�r|rwr�r�r�r	rrrrrrrrs�


$ 

+	 
"


B

4



*
+





r�cygwin.*�unix�posix�nt�msvccCsV|dkrtj}|dkrtj}x4tD],\}}tj||�dk	sJtj||�dk	r"|Sq"WdS)akDetermine the default compiler to use for the given platform.

       osname should be one of the standard Python OS names (i.e. the
       ones returned by os.name) and platform the common value
       returned by sys.platform for the platform in question.

       The default values are os.name and sys.platform in case the
       parameters are not given.
    Nr�)rHr)r��platform�_default_compilers�re�match)�osnamer��pattern�compilerrrr�get_default_compiler�s
r��
unixccompiler�
UnixCCompiler�standard UNIX-style compiler�
_msvccompiler�MSVCCompiler�Microsoft Visual C++�cygwinccompiler�CygwinCCompiler�'Cygwin port of GNU C Compiler for Win32�Mingw32CCompiler�(Mingw32 port of GNU C Compiler for Win32�bcppcompiler�BCPPCompiler�Borland C++ Compiler)r�r��cygwinZmingw32ZbcppcCs\ddlm}g}x,tj�D] }|jd|dt|df�qW|j�||�}|jd�dS)zyPrint list of available compilers (used by the "--help-compiler"
    options to "build", "build_ext", "build_clib").
    r)�FancyGetoptz	compiler=Nr-zList of available compilers:)Zdistutils.fancy_getoptr��compiler_classrr2�sortZ
print_help)r�Z	compilersr�Zpretty_printerrrr�show_compilers�sr�cCs�|dkrtj}y"|dkr t|�}t|\}}}Wn8tk
rhd|}|dk	r\|d|}t|��YnXy*d|}t|�tj|}	t	|	�|}
WnBt
k
r�td|��Yn$tk
r�td||f��YnX|
d||�S)a[Generate an instance of some CCompiler subclass for the supplied
    platform/compiler combination.  'plat' defaults to 'os.name'
    (eg. 'posix', 'nt'), and 'compiler' defaults to the default compiler
    for that platform.  Currently only 'posix' and 'nt' are supported, and
    the default compilers are "traditional Unix interface" (UnixCCompiler
    class) and Visual C++ (MSVCCompiler class).  Note that it's perfectly
    possible to ask for a Unix compiler object under Windows, and a
    Microsoft compiler object under Unix -- if you supply a value for
    'compiler', 'plat' is ignored.
    Nz5don't know how to compile C/C++ code on platform '%s'z with '%s' compilerz
distutils.z4can't compile C/C++ code: unable to load module '%s'zBcan't compile C/C++ code: unable to find class '%s' in module '%s')rHr)r�r�rhZDistutilsPlatformError�
__import__r��modules�vars�ImportErrorZDistutilsModuleError)Zplatr�rr
rZmodule_name�
class_nameZlong_descriptionr��module�klassrrr�new_compiler�s2
r�cCs�g}x�|D]�}t|t�o2dt|�ko.dkns@td|��t|�dkr`|jd|d�q
t|�dkr
|ddkr�|jd|d�q
|jd|�q
Wx|D]}|jd	|�q�W|S)
aGenerate C pre-processor options (-D, -U, -I) as used by at least
    two types of compilers: the typical Unix compiler and Visual C++.
    'macros' is the usual thing, a list of 1- or 2-tuples, where (name,)
    means undefine (-U) macro 'name', and (name,value) means define (-D)
    macro 'name' to 'value'.  'include_dirs' is just a list of directory
    names to be added to the header file search path (-I).  Returns a list
    of command-line options suitable for either Unix compilers or Visual
    C++.
    r(r-zPbad macro definition '%s': each element of 'macros' list must be a 1- or 2-tuplez-U%srNz-D%sz-D%s=%sz-I%s)r$r.r/r0r2)rrrNZmacror5rrrrF
s
&
rFcCs�g}x|D]}|j|j|��q
Wx4|D],}|j|�}t|t�rJ||}q(|j|�q(Wx^|D]V}tjj|�\}}	|r�|j|g|	�}
|
r�|j|
�q�|j	d|�q^|j|j
|��q^W|S)acGenerate linker options for searching library directories and
    linking with specific libraries.  'libraries' and 'library_dirs' are,
    respectively, lists of library names (not filenames!) and search
    directories.  Returns a list of command-line options suitable for use
    with some compiler (depending on the two format strings passed in).
    z6no library file corresponding to '%s' found (skipping))r2r~rr$rDrHrIr�r�r�r�)r�rrrZlib_optsr5�optr�Zlib_dirZlib_nameZlib_filerrr�gen_lib_options7s$






r��r�r��r�r��r�r�)r�r�r�)NN)r�r�r�)r�r�r�)r�r�r�)r�r�r�)r�r�r�)NNrrr)r�r�rHr�Zdistutils.errorsZdistutils.spawnrZdistutils.file_utilrZdistutils.dir_utilrZdistutils.dep_utilrrZdistutils.utilrr	Z	distutilsr
rr�r�r�r�r�rFr�rrrr�<module>sD

--PKV[4Sc<!<!0__pycache__/cygwinccompiler.cpython-36.opt-1.pycnu�[���3


 \[@�@s�dZddlZddlZddlZddlmZmZmZddlZddl	m
Z
mZddlm
Z
ddlmZddlmZmZmZmZddlmZdd	lmZdd
lmZdd�ZGd
d�de
�ZGdd�de�ZdZdZdZ dd�Z!ej"d�Z#dd�Z$dd�Z%dd�Z&dS)adistutils.cygwinccompiler

Provides the CygwinCCompiler class, a subclass of UnixCCompiler that
handles the Cygwin port of the GNU C compiler to Windows.  It also contains
the Mingw32CCompiler class which handles the mingw32 port of GCC (same as
cygwin in no-cygwin mode).
�N)�Popen�PIPE�check_output)�gen_preprocess_options�gen_lib_options)�
UnixCCompiler)�
write_file)�DistutilsExecError�CCompilerError�CompileError�UnknownFileError)�log)�LooseVersion)�find_executablecCs�tjjd�}|dkr|tj|d|d�}|dkr8dgS|dkrFdgS|d	krTd
gS|dkrbdgS|d
krpdgStd|��dS)zaInclude the appropriate MSVC runtime library if Python was built
    with MSVC 7.0 or later.
    zMSC v.���
Z1300Zmsvcr70Z1310Zmsvcr71Z1400Zmsvcr80Z1500Zmsvcr90Z1600Zmsvcr100zUnknown MS Compiler version %s N���)�sys�version�find�
ValueError)Zmsc_posZmsc_ver�r�1/usr/lib64/python3.6/distutils/cygwinccompiler.py�	get_msvcr?src
@sReZdZdZdZdZdZdZdZdZ	dZ
dd
d�Zdd
�Zddd�Z
ddd�ZdS)�CygwinCCompilerz? Handles the Cygwin port of the GNU C compiler to Windows.
    �cygwinz.oz.az.dllzlib%s%sz%s%sz.exercCs�tj||||�t�\}}|jd||f�|tk	rB|jd|�t�\|_|_|_	|j|j
d|j|j|j	f�|jdkr�d|_nd|_|jdkr�d}nd	}|jd
ddd
d|j|fd�|jdkr�dg|_
|jd�nt�|_
dS)Nz%Python's GCC status: %s (details: %s)z�Python's pyconfig.h doesn't seem to support your compiler. Reason: %s. Compiling may fail because of undefined preprocessor macros.z: gcc %s, ld %s, dllwrap %s
z2.10.90�gcc�dllwrapz2.13z-sharedz
-mdll -staticzgcc -mcygwin -O -Wallzgcc -mcygwin -mdll -O -Wallzg++ -mcygwin -O -Wallzgcc -mcygwinz%s -mcygwin %s)�compiler�compiler_so�compiler_cxx�
linker_exe�	linker_soz2.91.57Zmsvcrtz,Consider upgrading to a newer version of gcc)r�__init__�check_config_hZdebug_print�CONFIG_H_OK�warn�get_versions�gcc_version�
ld_versionZdllwrap_version�
compiler_type�
linker_dll�set_executables�
dll_librariesr)�self�verbose�dry_run�forceZstatusZdetails�
shared_optionrrrr$ds<




zCygwinCCompiler.__init__cCs�|dks|dkrVy|jdd|d|g�Wq�tk
rR}zt|��WYdd}~Xq�XnNy"|j|j||d|g|�Wn*tk
r�}zt|��WYdd}~XnXdS)z:Compiles the source by spawning GCC and windres if needed.z.rcz.resZwindresz-iz-oN)Zspawnr	rr )r/�obj�src�extZcc_args�extra_postargsZpp_opts�msgrrr�_compile�szCygwinCCompiler._compileNcCsRtj|
p
g�}
tj|pg�}tj|p&g�}|j|j�|dk	oP||jksT|jdk�rtjj|d�}tjjtjj	|��\}}tjj
||d�}tjj
|d|d�}dtjj	|�dg}x|D]}|j|�q�W|jt
||fd	|�|jd
k�r|
jd|g�|
jd|g�n
|j|�|	�s*|
jd
�tj||||||||d|	|
|||
�dS)zLink the objects.Nrrz.def�libz.az
LIBRARY %sZEXPORTSz
writing %srz--output-libz--defz-s)�copy�extendr.Z
EXECUTABLEr,�os�path�dirname�splitext�basename�join�appendZexecuterr�link)r/Ztarget_descZobjectsZoutput_filename�
output_dirZ	librariesZlibrary_dirsZruntime_library_dirsZexport_symbols�debugZ
extra_preargsr7Z
build_tempZtarget_langZtemp_dirZdll_nameZ
dll_extensionZdef_fileZlib_file�contentsZsymrrrrD�s:	



zCygwinCCompiler.link�cCs�|dkrd}g}x�|D]�}tjjtjj|��\}}||jddgkrTtd||f��|rdtjj|�}|dkr�|jtjj||||j	��q|jtjj|||j	��qW|S)z#Adds supports for rc and res files.NrH�.rc�.resz"unknown file type '%s' (from '%s'))rJrI)
r=r>r@�normcaseZsrc_extensionsrrArCrB�
obj_extension)r/Zsource_filenamesZ	strip_dirrEZ	obj_namesZsrc_name�baser6rrr�object_filenames�s 
z CygwinCCompiler.object_filenames)rrr)
NNNNNrNNNN)rrH)�__name__�
__module__�__qualname__�__doc__r+rLZstatic_lib_extensionZshared_lib_extensionZstatic_lib_formatZshared_lib_formatZ
exe_extensionr$r9rDrNrrrrrYs
;
Krc@seZdZdZdZddd�ZdS)�Mingw32CCompilerz@ Handles the Mingw32 port of the GNU C compiler to Windows.
    Zmingw32rc	Csxtj||||�|jdkr d}nd}|jdkr4d}nd}t�rFtd��|jdd	d
dd|j||fd
�g|_t	�|_dS)Nz2.13z-sharedz
-mdll -staticz2.91.57z--entry _DllMain@12rHz1Cygwin gcc cannot be used with --compiler=mingw32zgcc -O -Wallzgcc -mdll -O -Wallzg++ -O -Wallrz%s %s %s)rr r!r"r#)
rr$r*r)�is_cygwingccr
r-r,r.r)r/r0r1r2r3Zentry_pointrrrr$s&

zMingw32CCompiler.__init__N)rrr)rOrPrQrRr+r$rrrrrSsrS�okznot okZ	uncertaincCs�ddlm}dtjkrtdfS|j�}y@t|�}z(d|j�krJtd|fStd|fSWd|j	�XWn.t
k
r�}ztd	||jffSd}~XnXdS)
awCheck if the current Python installation appears amenable to building
    extensions with GCC.

    Returns a tuple (status, details), where 'status' is one of the following
    constants:

    - CONFIG_H_OK: all is well, go ahead and compile
    - CONFIG_H_NOTOK: doesn't look good
    - CONFIG_H_UNCERTAIN: not sure -- unable to read pyconfig.h

    'details' is a human-readable string explaining the situation.

    Note there are two ways to conclude "OK": either 'sys.version' contains
    the string "GCC" (implying that this Python was built with GCC), or the
    installed "pyconfig.h" contains the string "__GNUC__".
    r)�	sysconfigZGCCzsys.version mentions 'GCC'Z__GNUC__z'%s' mentions '__GNUC__'z '%s' does not mention '__GNUC__'Nzcouldn't read '%s': %s)
�	distutilsrVrrr&�get_config_h_filename�open�read�CONFIG_H_NOTOK�close�OSError�CONFIG_H_UNCERTAIN�strerror)rV�fn�config_h�excrrrr%Hs
r%s(\d+\.\d+(\.\d+)*)cCsl|j�d}t|�dkrdSt|dtd�j}z|j�}Wd|j�Xtj|�}|dkrZdSt	|j
d�j��S)z�Find the version of an executable by running `cmd` in the shell.

    If the command is not found, or the output does not match
    `RE_VERSION`, returns None.
    rNT)�shell�stdoutr)�splitrrrrdrZr\�
RE_VERSION�searchr�group�decode)�cmd�
executable�out�
out_string�resultrrr�_find_exe_versionus

rocCsdddg}tdd�|D��S)zg Try to find out the versions of gcc, ld and dllwrap.

    If not possible it returns None for it.
    zgcc -dumpversionzld -vzdllwrap --versioncSsg|]}t|��qSr)ro)�.0rjrrr�
<listcomp>�sz get_versions.<locals>.<listcomp>)�tuple)Zcommandsrrrr(�s
r(cCstddg�}|j�jd�S)z>Try to determine if the gcc that would be used is from cygwin.rz-dumpmachinescygwin)r�strip�endswith)rmrrrrT�srT)'rRr=rr;�
subprocessrrr�reZdistutils.ccompilerrrZdistutils.unixccompilerrZdistutils.file_utilrZdistutils.errorsr	r
rrrWr
Zdistutils.versionrZdistutils.spawnrrrrSr&r[r^r%�compilerfror(rTrrrr�<module>s0);1+
PKV[2�jK�.�.*__pycache__/sysconfig.cpython-36.opt-1.pycnu�[���3

�]dh�N�@s�dZddlZddlZddlZddlZddlmZejjej	�Z
ejjej�Zejjej
�Zejjej�Zdejkr�ejjejd�Znejjejjej��Zejdkr�ej�jd,�r�ejjejje��Zd	d
�Zeedd�Zeo�ejdko�ej�jd-��rejjejje��Zdd
�Ze�ZdZye�s.ejZWne k
�rFYnXdd�Z!d.dd�Z"d/dd�Z#dd�Z$dd�Z%dd�Z&d0dd�Z'ej(d�Z)ej(d�Z*ej(d�Z+d1d d!�Z,d"d#�Z-da.d$d%�Z/d&d'�Z0d(d)�Z1d*d+�Z2dS)2a�Provide access to Python's configuration information.  The specific
configuration variables available depend heavily on the platform and
configuration.  The values may be retrieved using
get_config_var(name), and the list of variables is available via
get_config_vars().keys().  Additional convenience functions are also
available.

Written by:   Fred L. Drake, Jr.
Email:        <fdrake@acm.org>
�N�)�DistutilsPlatformErrorZ_PYTHON_PROJECT_BASE�nt�\pcbuild\win32�\pcbuild\amd64cCs.x(dD] }tjjtjj|d|��rdSqWdS)N�
Setup.dist�Setup.local�ModulesTF)rr)�os�path�isfile�join)�d�fn�r�+/usr/lib64/python3.6/distutils/sysconfig.py�_is_python_source_dir)s
r�_homecCstrtt�Stt�S)N)�	_sys_homer�project_baserrrr�
_python_build2sr�cCsdtjdd�S)z�Return a string containing the major and minor Python version,
    leaving off the patchlevel.  Sample return values could be '1.5'
    or '2.2'.
    z%d.%dN�)�sys�version_inforrrr�get_python_versionDsrcCs�|dkr|rtpt}tjdkrjtrL|r.tp,tStjjt	d�d�}tjj
|�Sdt�t}tjj|d|�Stjdkr�tjj|d�St
dtj��dS)	a�Return the directory containing installed Python header files.

    If 'plat_specific' is false (the default), this is the path to the
    non-platform-specific header files, i.e. Python.h and so on;
    otherwise, this is the path to platform-specific header files
    (namely pyconfig.h).

    If 'prefix' is supplied, use it instead of sys.base_prefix or
    sys.base_exec_prefix -- i.e., ignore 'plat_specific'.
    N�posix�srcdirZInclude�python�includerzFI don't know where Python installs its C header files on platform '%s')�BASE_EXEC_PREFIX�BASE_PREFIXr
�name�python_buildrrrr
�get_config_var�normpathr�build_flagsr)�
plat_specific�prefixZincdirZ
python_dirrrr�get_python_incLs

r)cCs�|dkr&|r|rtpt}n|r"tp$t}tjdkrp|s8|r>d}nd}tjj||dt��}|r`|Stjj|d�Sn<tjdkr�|r�tjj|d�Stjj|dd�Snt	d	tj��dS)
aSReturn the directory containing the Python library (standard or
    site additions).

    If 'plat_specific' is true, return the directory containing
    platform-specific modules, i.e. any module from a non-pure-Python
    module distribution; otherwise, return the platform-shared library
    directory.  If 'standard_lib' is true, return the directory
    containing standard Python library modules; otherwise, return the
    directory for site-specific modules.

    If 'prefix' is supplied, use it instead of sys.base_prefix or
    sys.base_exec_prefix -- i.e., ignore 'plat_specific'.
    Nr�lib64�librz
site-packagesrZLibz?I don't know where Python installs its library on platform '%s')
r r!�EXEC_PREFIX�PREFIXr
r"rr
rr)r'�standard_libr(r+Z	libpythonrrr�get_python_libos(

r/c
Cs�|jdk�r�tjdkr8td�s8ddl}|jt�dtd<tddd	d
ddd
dd�	\	}}}}}}}}	}
dtj	kr�tj	d}tjdkr�dtj	kr�|j
|�r�||t|�d�}|}dtj	kr�tj	d}dtj	kr�tj	d}dtj	kr�tj	d}n|d}dtj	k�r|dtj	d}d
tj	k�r@|dtj	d
}|dtj	d
}dtj	k�r�|dtj	d}|dtj	d}|dtj	d}dtj	k�r�tj	d}	dtj	k�r�|	dtj	d}
n|	d|
}
|d|}|j|||d|||||
d�||_
dS)z�Do any platform-specific customization of a CCompiler instance.

    Mainly needed on Unix, so we can plug in the information that
    varies across Unices and is stored in Python's Makefile.
    Zunix�darwinZCUSTOMIZED_OSX_COMPILERrN�True�CC�CXX�OPT�CFLAGS�CCSHARED�LDSHARED�SHLIB_SUFFIX�AR�ARFLAGSZCPPz -E�LDFLAGS� �CPPFLAGS)Zpreprocessor�compilerZcompiler_soZcompiler_cxxZ	linker_soZ
linker_exe�archiver)Z
compiler_typer�platformr$�_osx_support�customize_compiler�_config_vars�get_config_varsr
�environ�
startswith�lenZset_executablesZshared_lib_extension)r>rAZccZcxx�optZcflagsZccsharedZldsharedZshlib_suffix�arZar_flagsZnewccZcppr?Zcc_cmdrrrrB�s\


 











rBcCsDtr,tjdkr"tjjtptd�}q6tp(t}n
tdd�}tjj|d�S)z2Return full pathname of installed pyconfig.h file.r�PCr)r'z
pyconfig-64.h)r#r
r"rr
rrr))�inc_dirrrr�get_config_h_filename�s


rLcCs\trtjjtptd�Stddd�}djt�t	�}t
tjd�rL|dtjj
7}tjj||d�S)zAReturn full pathname of installed Makefile from the Python build.�Makefilerr)r'r.zconfig-{}{}�
_multiarchz-%s)r#r
rr
rrr/�formatrr&�hasattrr�implementationrN)Zlib_dirZconfig_filerrr�get_makefile_filename�srRcCs�|dkri}tjd�}tjd�}xx|j�}|s0P|j|�}|rz|jdd�\}}yt|�}Wntk
rnYnX|||<q"|j|�}|r"d||jd�<q"W|S)z�Parse a config.h-style file.

    A dictionary containing name/value pairs is returned.  If an
    optional dictionary is passed in as the second argument, it is
    used instead of a new dictionary.
    Nz"#define ([A-Z][A-Za-z0-9_]+) (.*)
z&/[*] #undef ([A-Z][A-Za-z0-9_]+) [*]/
rrr)�re�compile�readline�match�group�int�
ValueError)�fp�g�	define_rx�undef_rx�line�m�n�vrrr�parse_config_h�s(




rbz"([a-zA-Z][a-zA-Z0-9_]+)\s*=\s*(.*)z\$\(([A-Za-z][A-Za-z0-9_]*)\)z\${([A-Za-z][A-Za-z0-9_]*)}cCs�ddlm}||ddddd�}|dkr*i}i}i}x�|j�}|dkrFPtj|�}|r4|jdd�\}}	|	j�}	|	jdd	�}
d
|
kr�|	||<q4yt|	�}	Wn$t	k
r�|	jdd
�||<Yq4X|	||<q4Wd}�x�|�r��x�t
|�D�]�}||}
tj|
��pt
j|
�}|�rx|jd�}d}||k�r2t||�}n�||k�rBd}nx|tjk�rZtj|}n`||k�r�|jd��r�|dd�|k�r�d	}n$d||k�r�d}nt|d|�}nd	||<}|�r~|
|j�d�}|
d|j��||}
d
|k�r�|
||<nzyt|
�}
Wn"t	k
�r*|
j�||<Yn
X|
||<||=|jd��r~|dd�|k�r~|dd�}||k�r~|
||<q�||=q�Wq�W|j�x.|j�D]"\}}	t|	t��r�|	j�||<�q�W|j|�|S)z�Parse a Makefile-style file.

    A dictionary containing name/value pairs is returned.  If an
    optional dictionary is passed in as the second argument, it is
    used instead of a new dictionary.
    r)�TextFiler�surrogateescape)Zstrip_commentsZskip_blanksZ
join_lines�errorsNrz$$r�$r5r;r=TF�PY_�)r5r;r=)Zdistutils.text_filercrU�_variable_rxrVrW�strip�replacerXrY�list�_findvar1_rx�search�_findvar2_rx�strr
rErF�end�start�close�items�
isinstance�update)rr[rcrZ�done�notdoner^r_r`ra�tmpv�renamed_variablesr"�value�found�item�after�krrr�parse_makefiles�











r�cCsZxTtj|�ptj|�}|rP|j�\}}|d|�|j|jd��||d�}qPqW|S)a�Expand Makefile-style variables -- "${foo}" or "$(foo)" -- in
    'string' according to 'vars' (a dictionary mapping variable names to
    values).  Variables not present in 'vars' are silently expanded to the
    empty string.  The variable values in 'vars' should not contain further
    variable expansions; if 'vars' is the output of 'parse_makefile()',
    you're fine.  Returns a variable-expanded version of 's'.
    rrN)rmrnro�span�getrW)�s�varsr_Zbegrqrrr�expand_makefile_vars�s*r�c	CsVtjjddjtjtjttjdd�d��}t	|t
�t�dgd�}|j}ia
t
j|�dS)	z7Initialize the module as appropriate for POSIX systems.�_PYTHON_SYSCONFIGDATA_NAMEz+_sysconfigdata_{abi}_{platform}_{multiarch}rNr)�abir@�	multiarch�build_time_varsrN)r
rEr�rOr�abiflagsr@�getattrrQ�
__import__�globals�localsr�rCrv)r"�_tempr�rrr�_init_posix�sr�cCs~i}tddd�|d<tddd�|d<tdd�|d<tj�d|d<d	|d
<t�jdd�|d
<tjjtjj	t
j��|d<|adS)z+Initialize the module as appropriate for NTrr)r'r.�LIBDEST�
BINLIBDEST)r'�	INCLUDEPY�
EXT_SUFFIXz.exe�EXE�.r�VERSION�BINDIRN)
r/r)�_imp�extension_suffixesrrkr
r�dirname�abspathr�
executablerC)r[rrr�_init_nt�sr�cGs^tdk�r(t�jdtj�}|r(|�niattd<ttd<tjd�}|dk	rV|td<tjdt�}tjdkr�tr�tj	j
t��}tj	j||�}ntj	j
t��}tj	j
tj	j|��td<to�tjdk�r
t}tj	jtd�o�|tj�k�r
tj	j|td�}tj	j|�td<tjd	k�r(d
dl}|jt�|�rVg}x|D]}|jtj|���q8W|StSdS)a�With no arguments, return a dictionary of all configuration
    variables relevant for the current platform.  Generally this includes
    everything needed to build extensions and install both pure modules and
    extensions.  On Unix, this means every variable defined in Python's
    installed Makefile; on Windows it's a much smaller set.

    With arguments, return a list of values that result from looking up
    each argument in the configuration variable dictionary.
    NZ_init_r(�exec_prefixr��SOrrr0r)rCr�r�r
r"r-r,rr#rr�rRr
r�r%�isabs�getcwdrr@rA�customize_config_vars�append)�args�funcr�r�baserA�valsr"rrrrD�s@




rDcCs*|dkrddl}|jdtd�t�j|�S)z�Return the value of a single variable using the dictionary
    returned by 'get_config_vars()'.  Equivalent to
    get_config_vars().get(name)
    r�rNz SO is deprecated, use EXT_SUFFIXr)�warnings�warn�DeprecationWarningrDr�)r"r�rrrr$sr$)rr)rr)rN)rrN)N)N)3�__doc__r�r
rSrrerrr%r(r-r�r,�base_prefixr!�base_exec_prefixr rEr�rr�r�r"�lower�endswithrr�rrr#r&r��AttributeErrorrr)r/rBrLrRrbrTrirmror�r�rCr�r�rDr$rrrr�<module>
sZ



#
+I





jJPKV[f��		*__pycache__/file_util.cpython-36.opt-1.pycnu�[���3


 \��@sZdZddlZddlmZddlmZdddd�Zddd�Zddd�Zddd�Z	dd�Z
dS)zFdistutils.file_util

Utility functions for operating on single files.
�N)�DistutilsFileError)�logZcopyingzhard linkingzsymbolically linking)N�hard�sym�icNCs�d}d}�zvyt|d�}Wn4tk
rN}ztd||jf��WYdd}~XnXtjj|�r�ytj|�Wn4tk
r�}ztd||jf��WYdd}~XnXyt|d�}Wn4tk
r�}ztd||jf��WYdd}~XnXx�y|j|�}Wn6tk
�r*}ztd||jf��WYdd}~XnX|�s4Py|j	|�Wq�tk
�rx}ztd||jf��WYdd}~Xq�Xq�WWd|�r�|j
�|�r�|j
�XdS)	a5Copy the file 'src' to 'dst'; both must be filenames.  Any error
    opening either file, reading from 'src', or writing to 'dst', raises
    DistutilsFileError.  Data is read/written in chunks of 'buffer_size'
    bytes (default 16k).  No attempt is made to handle anything apart from
    regular files.
    N�rbzcould not open '%s': %szcould not delete '%s': %s�wbzcould not create '%s': %szcould not read from '%s': %szcould not write to '%s': %s)�open�OSErrorr�strerror�os�path�exists�unlink�read�write�close)�src�dst�buffer_sizeZfsrcZfdst�eZbuf�r�+/usr/lib64/python3.6/distutils/file_util.py�_copy_file_contentssF	$"""*r�cCsddlm}ddlm}	m}
m}m}tjj	|�s<t
d|��tjj|�rd|}
tjj|tjj
|��}ntjj|�}
|r�|||�r�|dkr�tjd|�|dfSyt|}Wn tk
r�td|��YnX|dk�rtjj
|�tjj
|�k�rtjd|||
�ntjd|||�|�r|dfS|d	k�rttjj|��oBtjj||��s�ytj||�|dfStk
�rpYnXn<|d
k�r�tjj|��o�tjj||��s�tj||�|dfSt||�|�s�|�rtj|�}|�r�tj|||	||
f�|�rtj||||��|dfS)aCopy a file 'src' to 'dst'.  If 'dst' is a directory, then 'src' is
    copied there with the same name; otherwise, it must be a filename.  (If
    the file exists, it will be ruthlessly clobbered.)  If 'preserve_mode'
    is true (the default), the file's mode (type and permission bits, or
    whatever is analogous on the current platform) is copied.  If
    'preserve_times' is true (the default), the last-modified and
    last-access times are copied as well.  If 'update' is true, 'src' will
    only be copied if 'dst' does not exist, or if 'dst' does exist but is
    older than 'src'.

    'link' allows you to make hard links (os.link) or symbolic links
    (os.symlink) instead of copying: set it to "hard" or "sym"; if it is
    None (the default), files are copied.  Don't set 'link' on systems that
    don't support it: 'copy_file()' doesn't check if hard or symbolic
    linking is available. If hardlink fails, falls back to
    _copy_file_contents().

    Under Mac OS, uses the native file copy function in macostools; on
    other systems, uses '_copy_file_contents()' to copy file contents.

    Return a tuple (dest_name, copied): 'dest_name' is the actual name of
    the output file, and 'copied' is true if the file was copied (or would
    have been copied, if 'dry_run' true).
    r)�newer)�ST_ATIME�ST_MTIME�ST_MODE�S_IMODEz4can't copy '%s': doesn't exist or not a regular filerz"not copying %s (output up-to-date)z&invalid value '%s' for 'link' argumentz%s %s -> %srr)Zdistutils.dep_utilr�statrrrrrr
�isfiler�isdir�join�basename�dirnamer�debug�_copy_action�KeyError�
ValueError�infor�samefile�linkr
�symlinkr�utime�chmod)rrZ
preserve_modeZpreserve_times�updater,�verbose�dry_runrrrrr�dir�action�strrr�	copy_fileCsT!





r6c(Cs�ddlm}m}m}m}m}ddl}	|dkr:tjd||�|rB|S||�sVt	d|��||�rrt
jj|||��}n||�r�t	d||f��|||��s�t	d||f��d	}
yt
j
||�WnPtk
�r
}z2|j\}}
||	jkr�d
}
nt	d|||
f��WYdd}~XnX|
�r�t|||d�yt
j|�Wnhtk
�r�}zJ|j\}}
yt
j|�Wntk
�rpYnXt	d
||||
f��WYdd}~XnX|S)a%Move a file 'src' to 'dst'.  If 'dst' is a directory, the file will
    be moved into it with the same name; otherwise, 'src' is just renamed
    to 'dst'.  Return the new full name of the file.

    Handles cross-device moves on Unix using 'copy_file()'.  What about
    other systems???
    r)rr!r"r$r%Nrzmoving %s -> %sz#can't move '%s': not a regular filez0can't move '%s': destination '%s' already existsz2can't move '%s': destination '%s' not a valid pathFTzcouldn't move '%s' to '%s': %s)r1zAcouldn't move '%s' to '%s' by copy/delete: delete '%s' failed: %s)Zos.pathrr!r"r$r%�errnorr*rrr
r#�renamer
�argsZEXDEVr6r)rrr1r2rr!r"r$r%r7Zcopy_itrZnum�msgrrr�	move_file�sR

"
"r;c
Cs:t|d�}z x|D]}|j|d�qWWd|j�XdS)z{Create a file with the specified name and write 'contents' (a
    sequence of strings without line terminators) to it.
    �w�
N)r	rr)�filename�contents�f�linerrr�
write_file�s


rB�@)rC)rrrNrr)rr)�__doc__rZdistutils.errorsrZ	distutilsrr'rr6r;rBrrrr�<module>s
3
c
=PKV[E'�l+
+
1__pycache__/versionpredicate.cpython-36.opt-2.pycnu�[���3


 \
�@s~ddlZddlZddlZejdej�Zejd�Zejd�Zdd�Z	ej
ejejej
ejejd�ZGdd	�d	�Zdad
d�ZdS)�Nz'(?i)^\s*([a-z_]\w*(?:\.[a-z_]\w*)*)(.*)z^\s*\((.*)\)\s*$z%^\s*(<=|>=|<|>|!=|==)\s*([^\s,]+)\s*$cCs6tj|�}|std|��|j�\}}|tjj|�fS)Nz"bad package restriction syntax: %r)�re_splitComparison�match�
ValueError�groups�	distutils�version�
StrictVersion)�pred�res�compZverStr�r�2/usr/lib64/python3.6/distutils/versionpredicate.py�splitUps

r)�<z<=z==�>z>=z!=c@s$eZdZdd�Zdd�Zdd�ZdS)�VersionPredicatecCs�|j�}|std��tj|�}|s.td|��|j�\|_}|j�}|r�tj|�}|sbtd|��|j�d}dd�|jd�D�|_|js�td|��ng|_dS)	Nzempty package restrictionzbad package name in %rzexpected parenthesized list: %rrcSsg|]}t|��qSr)r)�.0ZaPredrrr
�
<listcomp>tsz-VersionPredicate.__init__.<locals>.<listcomp>�,zempty parenthesized list in %r)	�stripr�re_validPackagerr�name�re_paren�splitr	)�selfZversionPredicateStrrZparen�strrrr
�__init__`s$


zVersionPredicate.__init__cCs8|jr.dd�|jD�}|jddj|�dS|jSdS)NcSs g|]\}}|dt|��qS)� )r)r�cond�verrrr
r}sz,VersionPredicate.__str__.<locals>.<listcomp>z (z, �))r	r�join)r�seqrrr
�__str__{szVersionPredicate.__str__cCs*x$|jD]\}}t|||�sdSqWdS)NFT)r	�compmap)rrrrrrr
�satisfied_by�szVersionPredicate.satisfied_byN)�__name__�
__module__�__qualname__rr#r%rrrr
rsArcCsdtdkrtjdtj�a|j�}tj|�}|s8td|��|jd�pDd}|rVtj	j
|�}|jd�|fS)Nz=([a-zA-Z_]\w*(?:\.[a-zA-Z_]\w*)*)(?:\s*\(\s*([^)\s]+)\s*\))?$z"illegal provides specification: %r��)�
_provision_rx�re�compile�ASCIIrrr�grouprrr)�value�mrrrr
�split_provision�s
r2)r,Zdistutils.versionr�operatorr-r.rrrr�lt�le�eq�gt�ge�ner$rr+r2rrrr
�<module>s

nPKV[i��N�=�=.__pycache__/msvc9compiler.cpython-36.opt-2.pycnu�[���3


 \�w�@sPddlZddlZddlZddlZddlmZmZmZmZm	Z	ddl
mZmZm
Z
ddlmZddlmZddlZejZejZejZejZejejejejfZej dko�ej!d%kZ"e"r�d	Z#d
Z$dZ%ndZ#d
Z$dZ%dddd�Z&Gdd�d�Z'Gdd�d�Z(dd�Z)dd�Z*dd�Z+dd�Z,d&dd �Z-e)�Z.e.d!k�r<ed"e.��Gd#d$�d$e�Z/dS)'�N)�DistutilsExecError�DistutilsPlatformError�CompileError�LibError�	LinkError)�	CCompiler�gen_preprocess_options�gen_lib_options)�log)�get_platform�win32�� z1Software\Wow6432Node\Microsoft\VisualStudio\%0.1fz5Software\Wow6432Node\Microsoft\Microsoft SDKs\Windowsz,Software\Wow6432Node\Microsoft\.NETFrameworkz%Software\Microsoft\VisualStudio\%0.1fz)Software\Microsoft\Microsoft SDKs\Windowsz Software\Microsoft\.NETFramework�x86�amd64Zia64)rz	win-amd64zwin-ia64c@sLeZdZdd�Zee�Zdd�Zee�Zdd�Zee�Zdd�Zee�Zd	S)
�RegcCs:x,tD]$}|j||�}|r||kr||SqWt|��dS)N)�HKEYS�read_values�KeyError)�cls�path�key�base�d�r�//usr/lib64/python3.6/distutils/msvc9compiler.py�	get_valueAs

z
Reg.get_valuecCsnyt||�}Wntk
r"dSXg}d}x<yt||�}Wntk
rRPYnX|j|�|d7}q.W|S)Nr�)�RegOpenKeyEx�RegError�
RegEnumKey�append)rrr�handle�L�i�krrr�	read_keysIs
z
Reg.read_keysc	Cs�yt||�}Wntk
r"dSXi}d}xTyt||�\}}}Wntk
rXPYnX|j�}|j|�||j|�<|d7}q.W|S)Nrr)rr�RegEnumValue�lower�convert_mbcs)	rrrr"rr$�name�value�typerrrr[szReg.read_valuescCs:t|dd�}|dk	r6y|d�}Wntk
r4YnX|S)N�decode�mbcs)�getattr�UnicodeError)�sZdecrrrr)qszReg.convert_mbcsN)	�__name__�
__module__�__qualname__r�classmethodr&rr)�staticmethodrrrrr=src@s,eZdZdd�Zdd�Zdd�Zdd�Zd	S)
�
MacroExpandercCsi|_t||_|j|�dS)N)�macros�VS_BASE�vsbase�load_macros)�self�versionrrr�__init__}s
zMacroExpander.__init__cCstj||�|jd|<dS)Nz$(%s))rrr8)r<Zmacrorrrrr�	set_macro�szMacroExpander.set_macrocCs|jd|jdd�|jd|jdd�|jdtd�y$|dkrP|jd	td
�ntd
��Wntk
rvtd��YnX|dkr�|jd
|jd�|jdtd�ndd}x^tD]V}yt||�}Wntk
r�w�YnXt	|d�}t
j|d||f�}|d|jd<q�WdS)NZVCInstallDirz	\Setup\VC�
productdirZVSInstallDirz	\Setup\VSZFrameworkDirZinstallrootg @ZFrameworkSDKDirzsdkinstallrootv2.0aPython was built with Visual Studio 2008;
extensions must be built with a compiler than can generate compatible binaries.
Visual Studio 2008 was not found on this system. If you have Cygwin installed,
you can try compiling with MingW32, by passing "-c mingw32" to setup.py.g"@ZFrameworkVersionzclr versionZ
WindowsSdkDirZcurrentinstallfolderz.Software\Microsoft\NET Framework Setup\Productrz%s\%sr=z$(FrameworkVersion))
r?r:�NET_BASErr�WINSDK_BASErrrr rrr8)r<r=�pr�hrrrrrr;�s.

zMacroExpander.load_macroscCs(x"|jj�D]\}}|j||�}qW|S)N)r8�items�replace)r<r1r%�vrrr�sub�szMacroExpander.subN)r2r3r4r>r?r;rHrrrrr7{sr7cCs�d}tjj|�}|d
krdS|t|�}tj|d�jdd�\}}t|dd��d}|dkrf|d7}t|dd��d}|dkr�d	}|dkr�||SdS)NzMSC v.r�� r
�
�g$@r������)�sysr=�find�len�split�int)�prefixr$r1�restZmajorVersionZminorVersionrrr�get_build_version�srVcCs4g}x*|D]"}tjj|�}||kr
|j|�q
W|S)N)�osr�normpathr!)�pathsZ
reduced_pathsrCZnprrr�normalize_and_reduce_paths�s
rZcCs@|jtj�}g}x|D]}||kr|j|�qWtjj|�}|S)N)rRrW�pathsepr!�join)ZvariableZoldListZnewListr$ZnewVariablerrr�removeDuplicates�s
r]c
Cst|}ytjd|d�}Wn"tk
r>tjd�d}YnX|sTtjj|�r�d|}tj	j
|d�}|r�tjj|�r�tjj|tjtjd�}tjj
|�}tjj|�s�tjd|�dSntjd|�|s�tjd�dStjj|d	�}tjj|�r�|Stjd
�dS)Nz%s\Setup\VCr@z%Unable to find productdir in registryzVS%0.f0COMNTOOLSZVCz%s is not a valid directoryz Env var %s is not set or invalidzNo productdir foundz
vcvarsall.batzUnable to find vcvarsall.bat)r9rrrr
�debugrWr�isdir�environ�getr\�pardir�abspath�isfile)r=r:r@ZtoolskeyZtoolsdir�	vcvarsallrrr�find_vcvarsall�s2





rfcCs8t|�}td�}i}|dkr$td��tjd||�tjd||ftjtjd�}z�|j�\}}|j	�d	krvt|j
d
���|j
d
�}xr|jd�D]d}tj
|�}d|kr�q�|j�}|jdd
�\}	}
|	j�}	|	|kr�|
jtj�r�|
dd�}
t|
�||	<q�WWd|jj�|jj�Xt|�t|�k�r4ttt|j�����|S)N�include�lib�libpathrzUnable to find vcvarsall.batz'Calling 'vcvarsall.bat %s' (version=%s)z
"%s" %s & set)�stdout�stderrrr.�
�=r)rgrhrirrM)rf�setrr
r^�
subprocess�Popen�PIPEZcommunicate�waitr-rRrr)�stripr(�endswithrWr[r]rj�closerkrQ�
ValueError�str�list�keys)r=ZarchreZinteresting�result�popenrjrk�linerr+rrr�query_vcvarsall�s<



r}g @z(VC %0.1f is not supported by this modulec
@s�eZdZdZiZdgZdddgZdgZdgZeeeeZ	dZ
d	Zd
ZdZ
dZZd
Zd-dd�Zd.dd�Zd/dd�Zd0dd�Zd1dd�Zd2dd�Zdd�Zdd �Zd!d"�Zd#d$�Zd%d&�Zd'd(�Zd3d)d*�Zd+d,�ZdS)4�MSVCCompilerZmsvcz.cz.ccz.cppz.cxxz.rcz.mcz.resz.objz.libz.dllz%s%sz.exercCs8tj||||�t|_d|_g|_d|_d|_d|_dS)NzSoftware\Microsoft\VisualStudioF)	rr>�VERSION�_MSVCCompiler__versionZ_MSVCCompiler__root�_MSVCCompiler__paths�	plat_name�_MSVCCompiler__arch�initialized)r<�verboseZdry_runZforcerrrr>JszMSVCCompiler.__init__NcCs|dkrt�}d$}||kr(td|f��dtjkrfdtjkrf|jd�rfd|_d|_d	|_d
|_d|_	n�|t�ksx|dkr�t
|}nt
t�dt
|}tt|�}|d
j
tj�|_|dtjd<|dtjd<t|j�dkr�td|j��|jd�|_|jd�|_|jd	�|_|jd
�|_|jd�|_	y,x&tjd
j
d�D]}|jj|��q<WWntk
�rjYnXt|j�|_dj|j�tjd
<d|_|jdk�r�dddddg|_ddddddg|_n&ddddddg|_dddddddg|_dddg|_|jd k�rddd!d"g|_dg|_d#|_dS)%Nr�	win-amd64�win-ia64z--plat-name must be one of %sZDISTUTILS_USE_SDKZMSSdkzcl.exezlink.exezlib.exezrc.exezmc.exe�_rrhrgrzxPython was built with %s, and extensions need to be built with the same version of the compiler, but it isn't installed.�;rz/nologoz/Oxz/MDz/W3z/DNDEBUGz/Odz/MDdz/Z7z/D_DEBUGz/GS-z/DLLz/INCREMENTAL:NO�z/INCREMENTAL:noz/DEBUGT)rr�r�)rrrWr`�find_exe�cc�linkerrh�rc�mc�PLAT_TO_VCVARSr}rrRr[r�rQZ_MSVCCompiler__productr!rrZr\Zpreprocess_optionsr��compile_options�compile_options_debug�ldflags_sharedr��ldflags_shared_debugZldflags_staticr�)r<r�Zok_platsZ	plat_specZvc_envrCrrr�
initializeUsd







zMSVCCompiler.initialize�cCs�|dkrd}g}x�|D]�}tjj|�\}}tjj|�d}|tjj|�d�}||jkrdtd|��|rttjj|�}||jkr�|j	tjj
|||j��q||jkr�|j	tjj
|||j��q|j	tjj
|||j
��qW|S)Nr�rzDon't know how to compile %s)rWr�splitext�
splitdrive�isabs�src_extensionsr�basename�_rc_extensionsr!r\�
res_extension�_mc_extensions�
obj_extension)r<Zsource_filenamesZ	strip_dir�
output_dirZ	obj_namesZsrc_namer�extrrr�object_filenames�s(



zMSVCCompiler.object_filenamesc	Cst|js|j�|j||||||�}	|	\}}
}}}|p6g}
|
jd�|rT|
j|j�n|
j|j��x|
D�]}y||\}}Wntk
r�whYnX|r�tj	j
|�}||jkr�d|}�nT||jkr�d|}�n>||j
k�r>|}d|}y"|j|jg||g|g�Wqhtk
�r8}zt|��WYdd}~XqhXqhn�||jk�rtj	j|�}tj	j|�}yl|j|jgd|d|g|g�tj	jtj	j|��\}}tj	j||d�}|j|jgd|g|g�Wqhtk
�r�}zt|��WYdd}~XqhXqhntd||f��d	|}y&|j|jg|
|||g|�Wqhtk
�rj}zt|��WYdd}~XqhXqhW|
S)
Nz/cz/Tcz/Tpz/foz-hz-rz.rcz"Don't know how to compile %s to %sz/Fo)r�r�Z_setup_compiler!�extendr�r�rrWrrc�
_c_extensions�_cpp_extensionsr��spawnr�rrr��dirnamer�r�r�r\r�)r<Zsourcesr�r8Zinclude_dirsr^�
extra_preargs�extra_postargsZdependsZcompile_info�objectsZpp_optsZbuildZcompile_opts�obj�srcr�Z	input_optZ
output_opt�msgZh_dirZrc_dirrr�Zrc_filerrr�compile�sj




zMSVCCompiler.compilec	Cs�|js|j�|j||�\}}|j||d�}|j||�r�|d|g}|rJy|j|jg|�Wq�tk
r�}zt|��WYdd}~Xq�Xnt	j
d|�dS)N)r�z/OUT:zskipping %s (up-to-date))r�r��_fix_object_args�library_filename�
_need_linkr�rhrrr
r^)	r<r�Zoutput_libnamer�r^�target_lang�output_filenameZlib_argsr�rrr�create_static_libszMSVCCompiler.create_static_libcCsX|js|j�|j||�\}}|j|||�}|\}}}|rL|jdt|��t||||�}|dk	rptjj	||�}|j
||��rH|tjkr�|	r�|j
dd�}q�|jdd�}n|	r�|j
}n|j}g}x|p�gD]}|jd|�q�W||||d|g}tjj|d�}|dk	�rPtjjtjj|��\}}tjj	||j|��}|jd|�|j|||�|
�rp|
|dd�<|�r�|j|�|jtjj|��y|j|jg|�Wn,tk
�r�}zt|��WYdd}~XnX|j||�}|dk	�rT|\}}d||f}y|jdd	d
||g�Wn,tk
�rD}zt|��WYdd}~XnXntjd|�dS)Nz5I don't know what to do with 'runtime_library_dirs': rz/EXPORT:z/OUT:rz/IMPLIB:z-outputresource:%s;%szmt.exez-nologoz	-manifestzskipping %s (up-to-date))r�r�r�Z
_fix_lib_args�warnrwr	rWrr\r�r�
EXECUTABLEr�r�r!r�r�r�r��manifest_setup_ldargsr�Zmkpathr�r�rr�manifest_get_embed_infor
r^)r<�target_descr�r�r�Z	librariesZlibrary_dirsZruntime_library_dirsZexport_symbolsr^r�r��
build_tempr�Z
fixed_argsZlib_optsZldflagsZexport_optsZsym�ld_argsZdll_nameZdll_extZimplib_filer�ZmfinfoZ
mffilename�mfidZout_argrrr�link8sl





zMSVCCompiler.linkcCs,tjj|tjj|�d�}|jd|�dS)Nz	.manifestz/MANIFESTFILE:)rWrr\r�r!)r<r�r�r��
temp_manifestrrrr��sz"MSVCCompiler.manifest_setup_ldargscCs`x,|D] }|jd�r|jdd�d}PqWdS|tjkr>d}nd}|j|�}|dkrXdS||fS)Nz/MANIFESTFILE:�:rr
)�
startswithrRrr��_remove_visual_c_ref)r<r�r��argr�r�rrrr��s



z$MSVCCompiler.manifest_get_embed_infocCs�y�t|�}z|j�}Wd|j�Xtjdtj�}tj|d|�}d}tj|d|�}tjdtj�}tj||�dkrrdSt|d�}z|j|�|S|j�XWnt	k
r�YnXdS)NzU<assemblyIdentity.*?name=("|')Microsoft\.VC\d{2}\.CRT("|').*?(/>|</assemblyIdentity>)r�z*<dependentAssembly>\s*</dependentAssembly>zI<assemblyIdentity.*?name=(?:"|')(.+?)(?:"|').*?(?:/>|</assemblyIdentity>)�w)
�open�readru�rer��DOTALLrH�search�write�OSError)r<Z
manifest_fileZ
manifest_fZmanifest_buf�patternrrrr��s.	


z!MSVCCompiler._remove_visual_c_refcCsd|S)Nz	/LIBPATH:r)r<�dirrrr�library_dir_option�szMSVCCompiler.library_dir_optioncCstd��dS)Nz<don't know how to set runtime library search path for MSVC++)r)r<r�rrr�runtime_library_dir_option�sz'MSVCCompiler.runtime_library_dir_optioncCs
|j|�S)N)r�)r<rhrrr�library_option�szMSVCCompiler.library_optioncCs`|r|d|g}n|g}xB|D]6}x0|D](}tjj||j|��}tjj|�r(|Sq(WqWdSdS)NZ_d)rWrr\r��exists)r<�dirsrhr^Z	try_namesr�r*Zlibfilerrr�find_library_file�s

zMSVCCompiler.find_library_filecCszx4|jD]*}tjjtjj|�|�}tjj|�r|SqWx>tjdjd�D]*}tjjtjj|�|�}tjj|�rH|SqHW|S)NZPathr�)r�rWrr\rcrdr`rR)r<ZexerC�fnrrrr�s	zMSVCCompiler.find_exe)rrr)N)rr�)NNNrNNN)NrN)
NNNNNrNNNN)r)r2r3r4Z
compiler_typeZexecutablesr�r�r�r�r�r�r�Zstatic_lib_extensionZshared_lib_extensionZstatic_lib_formatZshared_lib_formatZ
exe_extensionr>r�r�r�r�r�r�r�r�r�r�r�r�r�rrrrr~,sP


X

V

R+
r~l)r)0rWrorOr�Zdistutils.errorsrrrrrZdistutils.ccompilerrrr	Z	distutilsr
Zdistutils.utilr�winregZ	OpenKeyExrZEnumKeyr Z	EnumValuer'�errorrZ
HKEY_USERS�HKEY_CURRENT_USER�HKEY_LOCAL_MACHINEZHKEY_CLASSES_ROOTr�platform�maxsizeZNATIVE_WIN64r9rBrAr�rr7rVrZr]rfr}rr~rrrr�<module>sL>.#
)
PKV[�y����+__pycache__/versionpredicate.cpython-36.pycnu�[���3


 \
�@s�dZddlZddlZddlZejdej�Zejd�Zejd�Z	dd�Z
ejejej
ejejejd�ZGd	d
�d
�Zdadd�ZdS)
zBModule for parsing and testing package version predicate strings.
�Nz'(?i)^\s*([a-z_]\w*(?:\.[a-z_]\w*)*)(.*)z^\s*\((.*)\)\s*$z%^\s*(<=|>=|<|>|!=|==)\s*([^\s,]+)\s*$cCs6tj|�}|std|��|j�\}}|tjj|�fS)zVParse a single version comparison.

    Return (comparison string, StrictVersion)
    z"bad package restriction syntax: %r)�re_splitComparison�match�
ValueError�groups�	distutils�version�
StrictVersion)�pred�res�compZverStr�r�2/usr/lib64/python3.6/distutils/versionpredicate.py�splitUps

r)�<z<=z==�>z>=z!=c@s(eZdZdZdd�Zdd�Zdd�ZdS)	�VersionPredicatea�Parse and test package version predicates.

    >>> v = VersionPredicate('pyepat.abc (>1.0, <3333.3a1, !=1555.1b3)')

    The `name` attribute provides the full dotted name that is given::

    >>> v.name
    'pyepat.abc'

    The str() of a `VersionPredicate` provides a normalized
    human-readable version of the expression::

    >>> print(v)
    pyepat.abc (> 1.0, < 3333.3a1, != 1555.1b3)

    The `satisfied_by()` method can be used to determine with a given
    version number is included in the set described by the version
    restrictions::

    >>> v.satisfied_by('1.1')
    True
    >>> v.satisfied_by('1.4')
    True
    >>> v.satisfied_by('1.0')
    False
    >>> v.satisfied_by('4444.4')
    False
    >>> v.satisfied_by('1555.1b3')
    False

    `VersionPredicate` is flexible in accepting extra whitespace::

    >>> v = VersionPredicate(' pat( ==  0.1  )  ')
    >>> v.name
    'pat'
    >>> v.satisfied_by('0.1')
    True
    >>> v.satisfied_by('0.2')
    False

    If any version numbers passed in do not conform to the
    restrictions of `StrictVersion`, a `ValueError` is raised::

    >>> v = VersionPredicate('p1.p2.p3.p4(>=1.0, <=1.3a1, !=1.2zb3)')
    Traceback (most recent call last):
      ...
    ValueError: invalid version number '1.2zb3'

    It the module or package name given does not conform to what's
    allowed as a legal module or package name, `ValueError` is
    raised::

    >>> v = VersionPredicate('foo-bar')
    Traceback (most recent call last):
      ...
    ValueError: expected parenthesized list: '-bar'

    >>> v = VersionPredicate('foo bar (12.21)')
    Traceback (most recent call last):
      ...
    ValueError: expected parenthesized list: 'bar (12.21)'

    cCs�|j�}|std��tj|�}|s.td|��|j�\|_}|j�}|r�tj|�}|sbtd|��|j�d}dd�|jd�D�|_|js�td|��ng|_d	S)
z*Parse a version predicate string.
        zempty package restrictionzbad package name in %rzexpected parenthesized list: %rrcSsg|]}t|��qSr)r)�.0ZaPredrrr
�
<listcomp>tsz-VersionPredicate.__init__.<locals>.<listcomp>�,zempty parenthesized list in %rN)	�stripr�re_validPackagerr�name�re_paren�splitr	)�selfZversionPredicateStrrZparen�strrrr
�__init__`s$


zVersionPredicate.__init__cCs8|jr.dd�|jD�}|jddj|�dS|jSdS)NcSs g|]\}}|dt|��qS)� )r)r�cond�verrrr
r}sz,VersionPredicate.__str__.<locals>.<listcomp>z (z, �))r	r�join)r�seqrrr
�__str__{szVersionPredicate.__str__cCs*x$|jD]\}}t|||�sdSqWdS)z�True if version is compatible with all the predicates in self.
        The parameter version must be acceptable to the StrictVersion
        constructor.  It may be either a string or StrictVersion.
        FT)r	�compmap)rrrrrrr
�satisfied_by�szVersionPredicate.satisfied_byN)�__name__�
__module__�__qualname__�__doc__rr#r%rrrr
rs?rcCsdtdkrtjdtj�a|j�}tj|�}|s8td|��|jd�pDd}|rVtj	j
|�}|jd�|fS)a9Return the name and optional version number of a provision.

    The version number, if given, will be returned as a `StrictVersion`
    instance, otherwise it will be `None`.

    >>> split_provision('mypkg')
    ('mypkg', None)
    >>> split_provision(' mypkg( 1.2 ) ')
    ('mypkg', StrictVersion ('1.2'))
    Nz=([a-zA-Z_]\w*(?:\.[a-zA-Z_]\w*)*)(?:\s*\(\s*([^)\s]+)\s*\))?$z"illegal provides specification: %r��)�
_provision_rx�re�compile�ASCIIrrr�grouprrr)�value�mrrrr
�split_provision�s
r3)r)r-Zdistutils.versionr�operatorr.r/rrrr�lt�le�eq�gt�ge�ner$rr,r3rrrr
�<module>s

nPKV[;T>��$__pycache__/log.cpython-36.opt-2.pycnu�[���3


 \��@shdZdZdZdZdZddlZGdd�d�Ze�ZejZej	Z	ej
Z
ejZejZej
Z
d	d
�Zdd�ZdS)
������Nc@sPeZdZefdd�Zdd�Zdd�Zdd�Zd	d
�Zdd�Z	d
d�Z
dd�ZdS)�LogcCs
||_dS)N)�	threshold)�selfr�r
�%/usr/lib64/python3.6/distutils/log.py�__init__szLog.__init__cCs�|tttttfkr"tdt|���||jkr�|r8||}|tttfkrNtj	}ntj
}y|jd|�Wn:tk
r�|j
}|j|d�j|�}|jd|�YnX|j�dS)Nz%s wrong log levelz%s
�backslashreplace)�DEBUG�INFO�WARN�ERROR�FATAL�
ValueError�strr�sys�stderr�stdout�write�UnicodeEncodeError�encoding�encode�decode�flush)r	�level�msg�args�streamrr
r
r�_logs
zLog._logcGs|j|||�dS)N)r")r	rrr r
r
r�log'szLog.logcGs|jt||�dS)N)r"r)r	rr r
r
r�debug*sz	Log.debugcGs|jt||�dS)N)r"r)r	rr r
r
r�info-szLog.infocGs|jt||�dS)N)r"r)r	rr r
r
r�warn0szLog.warncGs|jt||�dS)N)r"r)r	rr r
r
r�error3sz	Log.errorcGs|jt||�dS)N)r"r)r	rr r
r
r�fatal6sz	Log.fatalN)�__name__�
__module__�__qualname__rrr"r#r$r%r&r'r(r
r
r
rrsrcCstj}|t_|S)N)�_global_logr)r�oldr
r
r�
set_thresholdAsr.cCs8|dkrtt�n"|dkr$tt�n|dkr4tt�dS)Nrrr)r.rrr)�vr
r
r�
set_verbosityGs

r0)rrrrrrrr,r#r$r%r&r'r(r.r0r
r
r
r�<module>s+PKV[�z!�'__pycache__/errors.cpython-36.opt-2.pycnu�[���3


 \�
�@s4Gdd�de�ZGdd�de�ZGdd�de�ZGdd�de�ZGdd	�d	e�ZGd
d�de�ZGdd
�d
e�ZGdd�de�ZGdd�de�Z	Gdd�de�Z
Gdd�de�ZGdd�de�ZGdd�de�Z
Gdd�de�ZGdd�de�ZGdd�de�ZGd d!�d!e�ZGd"d#�d#e�ZGd$d%�d%e�Zd&S)'c@seZdZdS)�DistutilsErrorN)�__name__�
__module__�__qualname__�rr�(/usr/lib64/python3.6/distutils/errors.pyrsrc@seZdZdS)�DistutilsModuleErrorN)rrrrrrrrsrc@seZdZdS)�DistutilsClassErrorN)rrrrrrrrsrc@seZdZdS)�DistutilsGetoptErrorN)rrrrrrrr	sr	c@seZdZdS)�DistutilsArgErrorN)rrrrrrrr
sr
c@seZdZdS)�DistutilsFileErrorN)rrrrrrrr$src@seZdZdS)�DistutilsOptionErrorN)rrrrrrrr*src@seZdZdS)�DistutilsSetupErrorN)rrrrrrrr
3sr
c@seZdZdS)�DistutilsPlatformErrorN)rrrrrrrr8src@seZdZdS)�DistutilsExecErrorN)rrrrrrrr>src@seZdZdS)�DistutilsInternalErrorN)rrrrrrrrCsrc@seZdZdS)�DistutilsTemplateErrorN)rrrrrrrrHsrc@seZdZdS)�DistutilsByteCompileErrorN)rrrrrrrrKsrc@seZdZdS)�CCompilerErrorN)rrrrrrrrOsrc@seZdZdS)�PreprocessErrorN)rrrrrrrrRsrc@seZdZdS)�CompileErrorN)rrrrrrrrUsrc@seZdZdS)�LibErrorN)rrrrrrrrXsrc@seZdZdS)�	LinkErrorN)rrrrrrrr\src@seZdZdS)�UnknownFileErrorN)rrrrrrrr`srN)�	Exceptionrrrr	r
rrr
rrrrrrrrrrrrrrr�<module>s$	PKV[S�۬�)__pycache__/dir_util.cpython-36.opt-1.pycnu�[���3


 \b�@spdZddlZddlZddlmZmZddlmZiaddd�Z	dd	d
�Z
ddd�Zd
d�Zddd�Z
dd�ZdS)zWdistutils.dir_util

Utility functions for manipulating directories and directory trees.�N)�DistutilsFileError�DistutilsInternalError)�log��cCspt|t�std|f��tjj|�}g}tjj|�s<|dkr@|Stjtjj	|��rV|Stjj
|�\}}|g}x6|r�|r�tjj|�r�tjj
|�\}}|jd|�qnWx�|D]�}tjj||�}tjj	|�}	tj|	�r�q�|dkr�t
jd|�|�s`ytj||�WnVtk
�rT}
z8|
jtjk�o*tjj|��sDtd||
jdf��WYdd}
~
XnX|j|�dt|	<q�W|S)	a�Create a directory and any missing ancestor directories.

    If the directory already exists (or if 'name' is the empty string, which
    means the current directory, which of course exists), then do nothing.
    Raise DistutilsFileError if unable to create some directory along the way
    (eg. some sub-path exists, but is a file rather than a directory).
    If 'verbose' is true, print a one-line summary of each mkdir to stdout.
    Return the list of directories actually created.
    z(mkpath: 'name' must be a string (got %r)�rrzcreating %szcould not create '%s': %sN���)�
isinstance�strr�os�path�normpath�isdir�
_path_created�get�abspath�split�insert�joinr�info�mkdir�OSError�errnoZEEXISTr�args�append)�name�mode�verbose�dry_runZcreated_dirs�head�tailZtails�dZabs_head�exc�r#�*/usr/lib64/python3.6/distutils/dir_util.py�mkpaths>


&
r%cCsVt�}x(|D] }|jtjj|tjj|���qWx t|�D]}t||||d�q:WdS)a�Create all the empty directories under 'base_dir' needed to put 'files'
    there.

    'base_dir' is just the name of a directory which doesn't necessarily
    exist yet; 'files' is a list of filenames to be interpreted relative to
    'base_dir'.  'base_dir' + the directory portion of every file in 'files'
    will be created if it doesn't already exist.  'mode', 'verbose' and
    'dry_run' flags are as for 'mkpath()'.
    )rrN)�set�addrrr�dirname�sortedr%)Zbase_dir�filesrrrZneed_dir�file�dirr#r#r$�create_treePs

 r-cCsfddlm}|r,tjj|�r,td|��ytj|�}	Wn>tk
rx}
z"|rVg}	ntd||
jf��WYdd}
~
XnX|s�t	||d�g}x�|	D]�}tjj
||�}
tjj
||�}|jd�r�q�|o�tjj|
��rtj
|
�}|dkr�tjd	||�|�stj||�|j|�q�tjj|
��r>|jt|
|||||||d
��q�||
||||||d
�|j|�q�W|S)aCopy an entire directory tree 'src' to a new location 'dst'.

    Both 'src' and 'dst' must be directory names.  If 'src' is not a
    directory, raise DistutilsFileError.  If 'dst' does not exist, it is
    created with 'mkpath()'.  The end result of the copy is that every
    file in 'src' is copied to 'dst', and directories under 'src' are
    recursively copied to 'dst'.  Return the list of files that were
    copied or might have been copied, using their output name.  The
    return value is unaffected by 'update' or 'dry_run': it is simply
    the list of all files under 'src', with the names changed to be
    under 'dst'.

    'preserve_mode' and 'preserve_times' are the same as for
    'copy_file'; note that they only apply to regular files, not to
    directories.  If 'preserve_symlinks' is true, symlinks will be
    copied as symlinks (on platforms that support them!); otherwise
    (the default), the destination of the symlink will be copied.
    'update' and 'verbose' are the same as for 'copy_file'.
    r)�	copy_filez&cannot copy tree '%s': not a directoryzerror listing files in '%s': %sN)rz.nfsrzlinking %s -> %s)rr)Zdistutils.file_utilr.rrrr�listdirr�strerrorr%r�
startswith�islink�readlinkrr�symlinkr�extend�	copy_tree)�src�dstZ
preserve_modeZpreserve_timesZpreserve_symlinks�updaterrr.�names�eZoutputs�nZsrc_nameZdst_nameZ	link_destr#r#r$r6csH
"


r6cCslxVtj|�D]H}tjj||�}tjj|�rDtjj|�rDt||�q|jtj|f�qW|jtj	|f�dS)zHelper for remove_tree().N)
rr/rrrr2�_build_cmdtupler�remove�rmdir)r�	cmdtuples�fZreal_fr#r#r$r=�sr=cCs�|dkrtjd|�|rdSg}t||�xp|D]h}y2|d|d�tjj|d�}|tkrdt|=Wq0tk
r�}ztjd||�WYdd}~Xq0Xq0WdS)z�Recursively remove an entire directory tree.

    Any errors are ignored (apart from being reported to stdout if 'verbose'
    is true).
    rz'removing '%s' (and everything under it)Nrzerror removing %s: %s)	rrr=rrrrr�warn)Z	directoryrrr@�cmdrr"r#r#r$�remove_tree�s


rDcCs6tjj|�\}}|dd�tjkr2||dd�}|S)z�Take the full path 'path', and make it a relative path.

    This is useful to make 'path' the second argument to os.path.join().
    rrN)rr�
splitdrive�sep)rZdriver#r#r$�ensure_relative�srG)rrr)rrr)rrrrrr)rr)�__doc__rrZdistutils.errorsrrZ	distutilsrrr%r-r6r=rDrGr#r#r#r$�<module>s
?

D

PKV[��#6�1�1.__pycache__/_msvccompiler.cpython-36.opt-2.pycnu�[���3


 \KT�@s�ddlZddlZddlZddlZddlZddlmZmZmZm	Z	m
Z
ddlmZm
Z
ddlmZddlmZddlmZdd�Zd	d
�Zdd�Zd
d�Zddd�Zddd�Zedg�ZGdd�de�ZdS)�N)�DistutilsExecError�DistutilsPlatformError�CompileError�LibError�	LinkError)�	CCompiler�gen_lib_options)�log)�get_platform)�countc$Cs�ytjtjdtjtjBd�}Wntk
r<tjd�dSXd}d}|��x�t�D]�}ytj	||�\}}}Wntk
r�PYnX|rT|tj
krTtjj
|�rTytt|��}Wnttfk
r�wTYnX|dkrT||krT||}}qTWWdQRX||fS)Nz'Software\Microsoft\VisualStudio\SxS\VC7)�accesszVisual C++ is not registeredr�)NN)�winregZ	OpenKeyEx�HKEY_LOCAL_MACHINEZKEY_READZKEY_WOW64_32KEY�OSErrorr	�debugrZ	EnumValueZREG_SZ�os�path�isdir�int�float�
ValueError�	TypeError)�key�best_version�best_dir�i�v�vc_dirZvt�version�r �//usr/lib64/python3.6/distutils/_msvccompiler.py�_find_vc2015s0
r"c
s�ddl�ddl}d}d}g���fdd�}|j|d�}|j�|j�x��D]~\}}}}d|krLtjj|ddd�}	tjj|	�s�qLytd	d
�|j	d�D��}
Wnt
tfk
r�wLYnX|
|krL|
|	}}qLWy|d}Wntk
r�d}YnX||fS)
Nrcs�j�j��dS)N)�extend�findallr )�_distutils_findvs�all_packagesr r!�_getallDsz_find_vc2017.<locals>._getall)�targetz1Microsoft.VisualStudio.Component.VC.Tools.x86.x64ZVCZ	AuxiliaryZBuildcss|]}t|�VqdS)N)r)�.0rr r r!�	<genexpr>Psz_find_vc2017.<locals>.<genexpr>�.)r)
r%�	threadingZThread�start�joinrrr�tuple�splitrr�
IndexError)r,rrr'�t�nameZversion_strrZpackagesrrr )r%r&r!�_find_vc2017:s2
r4cCs
t�\}}d}d|krdnd}|rztjj|ddddddd	�}yd
dl}|j|dd�d}Wntttfk
rxd}YnX|s�t�\}}|r�tjj|d|dd	�}|s�t	j
d�dStjj|d�}tjj|�s�t	j
d|�dS|p�tjj|��rt	j
d|�d}||fS)N�amd64Zx64�x86z..ZredistZMSVCz**zMicrosoft.VC141.CRTzvcruntime140.dllrT)�	recursive�zMicrosoft.VC140.CRTz$No suitable Visual C++ version foundz
vcvarsall.batz%s cannot be found���)NN)NN)r4rrr.�glob�ImportErrorr�LookupErrorr"r	r�isfile)�	plat_specrr�	vcruntimeZvcruntime_platZvcredistr:�	vcvarsallr r r!�_find_vcvarsall[s6



rAcCs�tjd�rdd�tjj�D�St|�\}}|s6td��y&tjdj||�tj	d�j
ddd	�}Wn@tjk
r�}z"tj
|j�td
j|j���WYdd}~XnXdd�dd
�|j�D�D�}|r�||d<|S)NZDISTUTILS_USE_SDKcSsi|]\}}||j��qSr )�lower)r)r�valuer r r!�
<dictcomp>sz_get_vc_env.<locals>.<dictcomp>zUnable to find vcvarsall.batzcmd /u /c "{}" {} && set)�stderrzutf-16le�replace)�errorszError executing {}cSs$i|]\}}}|r|r||j��qSr )rB)r)r�_rCr r r!rD�scss|]}|jd�VqdS)�=N)�	partition)r)�liner r r!r*�sz_get_vc_env.<locals>.<genexpr>�py_vcruntime_redist)r�getenv�environ�itemsrAr�
subprocessZcheck_output�formatZSTDOUT�decodeZCalledProcessErrorr	�error�output�cmd�
splitlines)r>r@r?�out�exc�envr r r!�_get_vc_env}s(


rZcCsN|stjd�jtj�}x2|D]*}tjjtjj|�|�}tjj|�r|SqW|S)Nr)rrMr0�pathseprr.�abspathr=)Zexe�paths�p�fnr r r!�	_find_exe�s	
r`r6Z	x86_amd64)Zwin32z	win-amd64zvcruntime140.dllc
s�eZdZdZiZdgZdddgZdgZdgZeeeeZ	dZ
d	Zd
ZdZ
dZZd
Zd)dd�Zd*dd�Zd+dd�Zd,dd�Zd-dd�Zd.dd�Zdd�Z�fdd �Zd!d"�Zd#d$�Zd%d&�Zd/d'd(�Z�ZS)0�MSVCCompilerZmsvcz.cz.ccz.cppz.cxxz.rcz.mcz.resz.objz.libz.dllz%s%sz.exercCs tj||||�d|_d|_dS)NF)r�__init__�	plat_name�initialized)�self�verboseZdry_runZforcer r r!rb�szMSVCCompiler.__init__NcCs>|dkrt�}|tkr(tdjtt����t|}t|�}|sDtd��|jdd�|_|jjt	j
�}td|�|_td|�|_
td|�|_td|�|_td	|�|_td
|�|_|jdd�|_x2|jdd�jt	j
�D]}|r�|j|jt	j��q�Wx6|jd
d�jt	j
�D]}|�r|j|jt	j���qWd|_dddddg|_|jj|j�rJdnd�ddddddg|_dddg}|j�s~|jd$�ddddg}|d%�|_|d&�|_|d'�|_|d(�|_|�|_ |�|_!t"j#df|jt"j#d"f|jt"j#d#f|jt"j$df|jt"j$d"f|jt"j$d#f|jt"j%df|j t"j%d"f|j t"j%d#f|j!i	|_&d#|_'dS))Nz--plat-name must be one of {}z7Unable to find a compatible Visual Studio installation.r�zcl.exezlink.exezlib.exezrc.exezmc.exezmt.exerL�include�libz/nologoz/Oxz/W3z/GLz/DNDEBUGz/MDz/MTz/Odz/MDdz/Ziz/D_DEBUGz/INCREMENTAL:NOz/LTCG�/nodefaultlib:libucrt.lib�ucrt.libz/DEBUG:FULL�/MANIFEST:EMBED,ID=1�/DLL�/MANIFEST:EMBED,ID=2�/MANIFESTUAC:NOFT)rjrk)rl)rl)rmrnro)rmrnro)(r
�PLAT_TO_VCVARSrrQr/rZ�get�_pathsr0rr[r`�cc�linkerri�rc�mcZmt�_vcruntime_redistZadd_include_dir�rstrip�sepZadd_library_dirZpreprocess_options�compile_options�append�compile_options_debugr#Zldflags_exeZldflags_exe_debugZldflags_sharedZldflags_shared_debugZldflags_staticZldflags_static_debugrZ
EXECUTABLEZ
SHARED_OBJECTZSHARED_LIBRARY�_ldflagsrd)rercr>Zvc_envr]�dir�ldflagsZ
ldflags_debugr r r!�
initialize�s`





zMSVCCompiler.initializergcsT�fdd��jD��fdd��j�jD����p4d����fdd�}tt||��S)Ncsi|]}�j|�qSr )�
obj_extension)r)�ext)rer r!rD8sz1MSVCCompiler.object_filenames.<locals>.<dictcomp>csi|]}�j|�qSr )�
res_extension)r)r�)rer r!rD9srgcs�tjj|�\}}�r"tjj|�}n2tjj|�\}}|jtjjtjjf�rT|dd�}ytjj�|�|�St	k
r�t
dj|���YnXdS)Nr8zDon't know how to compile {})rr�splitext�basename�
splitdrive�
startswithry�altsepr.r<rrQ)r^�baser�rH)�ext_map�
output_dir�	strip_dirr r!�
make_out_path>sz4MSVCCompiler.object_filenames.<locals>.make_out_path)�src_extensions�_rc_extensions�_mc_extensions�list�map)reZsource_filenamesr�r�r�r )r�r�rer�r!�object_filenames3s
zMSVCCompiler.object_filenamesc	Cs�|js|j�|j||||||�}	|	\}}
}}}|p6g}
|
jd�|rT|
j|j�n|
j|j�d}�x|
D�]}y||\}}Wntk
r�wlYnX|r�tj	j
|�}||jkr�d|}�nD||jkr�d|}d}�n*||j
k�rB|}d|}y|j|jg|||g�Wqltk
�r<}zt|��WYdd}~XqlXqln�||jk�r�tj	j|�}tj	j|�}y\|j|jd|d||g�tj	jtj	j|��\}}tj	j||d	�}|j|jd||g�Wqltk
�r�}zt|��WYdd}~XqlXqlntd
j||���|jg|
|}|�r$|jd�|j|�|jd|�|j|�y|j|�Wqltk
�r�}zt|��WYdd}~XqlXqlW|
S)
Nz/cFz/Tcz/TpTz/foz-hz-rz.rcz"Don't know how to compile {} to {}z/EHscz/Fo)rdr�Z_setup_compiler{r#r|rz�KeyErrorrrr\�
_c_extensions�_cpp_extensionsr��spawnrurrr��dirnamervr�r�r.rQrs)reZsourcesr�ZmacrosZinclude_dirsr�
extra_preargs�extra_postargsZdependsZcompile_info�objectsZpp_optsZbuildZcompile_optsZadd_cpp_opts�obj�srcr�Z	input_optZ
output_opt�msgZh_dirZrc_dirr�rHZrc_file�argsr r r!�compileTsn








zMSVCCompiler.compilec	Cs�|js|j�|j||�\}}|j||d�}|j||�r�|d|g}|rJy,tjd|jdj|��|j	|jg|�Wq�t
k
r�}zt|��WYdd}~Xq�Xntjd|�dS)N)r�z/OUT:zExecuting "%s" %s� zskipping %s (up-to-date))rdr��_fix_object_args�library_filename�
_need_linkr	rrir.r�rr)	rer�Zoutput_libnamer�r�target_lang�output_filenameZlib_argsr�r r r!�create_static_lib�szMSVCCompiler.create_static_libcCs�|js|j�|j||�\}}|j|||�}|\}}}|rL|jdt|��t||||�}|dk	rptjj	||�}|j
||��r�|j||	f}dd�|p�gD�}||||d|g}tjj|d�}|dk	�rtjj
tjj|��\}}tjj	||j|��}|jd|�|
�r|
|dd�<|�r.|j|�tjjtjj|��}|j|�y6tjd|jdj	|��|j|jg|�|j|�Wn,tk
�r�}zt|��WYdd}~XnXntjd	|�dS)
Nz5I don't know what to do with 'runtime_library_dirs': cSsg|]}d|�qS)z/EXPORT:r )r)Zsymr r r!�
<listcomp>�sz%MSVCCompiler.link.<locals>.<listcomp>z/OUT:rz/IMPLIB:zExecuting "%s" %sr�zskipping %s (up-to-date))rdr�r�Z
_fix_lib_args�warn�strrrrr.r�r}r�r�r�r�r{r#r\Zmkpathr	rrtr��_copy_vcruntimerr)reZtarget_descr�r�r�Z	librariesZlibrary_dirsZruntime_library_dirsZexport_symbolsrr�r�Z
build_tempr�Z
fixed_argsZlib_optsrZexport_optsZld_argsZdll_nameZdll_extZimplib_filer�r r r!�link�sN



zMSVCCompiler.linkcCs`|j}|stjj|�rdStjj|�j�tkr6dStjd|�t	j
||�}tj|tj
�dS)NzCopying "%s")rwrrr=r�rB�
_BUNDLED_DLLSr	r�shutil�copy�chmod�stat�S_IWRITE)rer�r?r r r!r�szMSVCCompiler._copy_vcruntimecs4tjd�}z|jtjd<t�j|�S|tjd<XdS)Nr)rrMrrrN�superr�)rerUZold_path)�	__class__r r!r�s

zMSVCCompiler.spawncCsd|S)Nz	/LIBPATH:r )rer~r r r!�library_dir_option&szMSVCCompiler.library_dir_optioncCstd��dS)Nz:don't know how to set runtime library search path for MSVC)r)rer~r r r!�runtime_library_dir_option)sz'MSVCCompiler.runtime_library_dir_optioncCs
|j|�S)N)r�)rerir r r!�library_option-szMSVCCompiler.library_optioncCs`|r|d|g}n|g}xB|D]6}x0|D](}tjj||j|��}tjj|�r(|Sq(WqWdSdS)NZ_d)rrr.r�r=)re�dirsrirZ	try_namesr~r3Zlibfiler r r!�find_library_file0s

zMSVCCompiler.find_library_file)rrr)N)rrg)NNNrNNN)NrN)
NNNNNrNNNN)r)�__name__�
__module__�__qualname__Z
compiler_typeZexecutablesr�r�r�r�r�r�r�Zstatic_lib_extensionZshared_lib_extensionZstatic_lib_formatZshared_lib_formatZ
exe_extensionrbr�r�r�r�r�r�r�r�r�r�r��
__classcell__r r )r�r!ra�sL


T

[

9ra)N)rr�r�rPrZdistutils.errorsrrrrrZdistutils.ccompilerrrZ	distutilsr	Zdistutils.utilr
�	itertoolsrr"r4rArZr`rp�	frozensetr�rar r r r!�<module>s$!" 

PKV[wm���)__pycache__/dep_util.cpython-36.opt-2.pycnu�[���3


 \�
�@s2ddlZddlmZdd�Zdd�Zd
dd	�ZdS)�N)�DistutilsFileErrorcCs`tjj|�s tdtjj|���tjj|�s0dSddlm}tj|�|}tj|�|}||kS)Nzfile '%s' does not exist�r)�ST_MTIME)�os�path�existsr�abspath�statr)�source�targetrZmtime1Zmtime2�r�*/usr/lib64/python3.6/distutils/dep_util.py�newersrcCslt|�t|�krtd��g}g}xBtt|��D]2}t||||�r.|j||�|j||�q.W||fS)Nz+'sources' and 'targets' must be same length)�len�
ValueError�ranger�append)�sourcesZtargetsZ	n_sourcesZ	n_targets�irrr
�newer_pairwise sr�errorcCs�tjj|�sdSddlm}tj|�|}xX|D]L}tjj|�sb|dkrJn|dkrVq0n|dkrbdStj|�|}||kr0dSq0WdSdS)Nrr)rr�ignorer)rrrr	r)rrZmissingrZtarget_mtimer
�source_mtimerrr
�newer_group6s 
r)r)rZdistutils.errorsrrrrrrrr
�<module>sPKV[�
)�
�
#__pycache__/dep_util.cpython-36.pycnu�[���3


 \�
�@s6dZddlZddlmZdd�Zdd�Zdd	d
�ZdS)z�distutils.dep_util

Utility functions for simple, timestamp-based dependency of files
and groups of files; also, function based entirely on such
timestamp dependency analysis.�N)�DistutilsFileErrorcCs`tjj|�s tdtjj|���tjj|�s0dSddlm}tj|�|}tj|�|}||kS)aReturn true if 'source' exists and is more recently modified than
    'target', or if 'source' exists and 'target' doesn't.  Return false if
    both exist and 'target' is the same age or younger than 'source'.
    Raise DistutilsFileError if 'source' does not exist.
    zfile '%s' does not exist�r)�ST_MTIME)�os�path�existsr�abspath�statr)�source�targetrZmtime1Zmtime2�r�*/usr/lib64/python3.6/distutils/dep_util.py�newersrcCslt|�t|�krtd��g}g}xBtt|��D]2}t||||�r.|j||�|j||�q.W||fS)z�Walk two filename lists in parallel, testing if each source is newer
    than its corresponding target.  Return a pair of lists (sources,
    targets) where source is newer than target, according to the semantics
    of 'newer()'.
    z+'sources' and 'targets' must be same length)�len�
ValueError�ranger�append)�sourcesZtargetsZ	n_sourcesZ	n_targets�irrr
�newer_pairwise sr�errorcCs�tjj|�sdSddlm}tj|�|}xX|D]L}tjj|�sb|dkrJn|dkrVq0n|dkrbdStj|�|}||kr0dSq0WdSdS)a�Return true if 'target' is out-of-date with respect to any file
    listed in 'sources'.  In other words, if 'target' exists and is newer
    than every file in 'sources', return false; otherwise return true.
    'missing' controls what we do when a source file is missing; the
    default ("error") is to blow up with an OSError from inside 'stat()';
    if it is "ignore", we silently drop any missing source files; if it is
    "newer", any missing source files make us assume that 'target' is
    out-of-date (this is handy in "dry-run" mode: it'll make you pretend to
    carry out commands that wouldn't work because inputs are missing, but
    that doesn't matter because you're not actually going to run the
    commands).
    rr)rr�ignorerN)rrrr	r)rrZmissingrZtarget_mtimer
�source_mtimerrr
�newer_group6s 
r)r)�__doc__rZdistutils.errorsrrrrrrrr
�<module>s
PKV[a"�-__pycache__/archive_util.cpython-36.opt-1.pycnu�[���3


 \F!� @sDdZddlZddlmZddlZyddlZWnek
rDdZYnXddlmZddl	m
Z
ddlmZddl
mZyddlmZWnek
r�dZYnXydd	lmZWnek
r�dZYnXd
d�Zdd
�Zd!dd�Zd"dd�Zed#gdfed$gdfed%gdfed&gdfed'gdfegdfd�Zdd�Zd(dd �ZdS))zodistutils.archive_util

Utility functions for creating archive files (tarballs, zip files,
that sort of thing).�N)�warn)�DistutilsExecError)�spawn)�mkpath)�log)�getpwnam)�getgrnamcCsNtdks|dkrdSyt|�}Wntk
r8d}YnX|dk	rJ|dSdS)z"Returns a gid, given a group name.N�)r�KeyError)�name�result�r
�./usr/lib64/python3.6/distutils/archive_util.py�_get_gids
rcCsNtdks|dkrdSyt|�}Wntk
r8d}YnX|dk	rJ|dSdS)z"Returns an uid, given a user name.Nr	)rr
)rrr
r
r�_get_uid+s
r�gzipcs.dddddd�}dddd	d
�}|dk	r:||j�kr:td��|d
}	|dkrZ|	|j|d�7}	ttjj|	�|d�ddl}
tj	d�t
���t�������fdd�}|s�|
j|	d||�}z|j
||d�Wd|j�X|dk�r*tdt�|	||}
tjdk�r||	|
g}n
|d|	g}t||d�|
S|	S)a=Create a (possibly compressed) tar file from all the files under
    'base_dir'.

    'compress' must be "gzip" (the default), "bzip2", "xz", "compress", or
    None.  ("compress" will be deprecated in Python 3.2)

    'owner' and 'group' can be used to define an owner and a group for the
    archive that is being built. If not provided, the current owner and group
    will be used.

    The output tar file will be named 'base_dir' +  ".tar", possibly plus
    the appropriate compression extension (".gz", ".bz2", ".xz" or ".Z").

    Returns the output filename.
    Zgz�bz2�xz�)r�bzip2rN�compressz.gzz.bz2z.xzz.Z)rrrrNzKbad value for 'compress': must be None, 'gzip', 'bzip2', 'xz' or 'compress'z.tarr)�dry_runrzCreating tar archivecs,�dk	r�|_�|_�dk	r(�|_�|_|S)N)�gidZgname�uid�uname)Ztarinfo)r�group�ownerrr
r�_set_uid_gidasz"make_tarball.<locals>._set_uid_gidzw|%s)�filterz'compress' will be deprecated.Zwin32z-f)�keys�
ValueError�getr�os�path�dirname�tarfiler�inforr�open�add�closer�PendingDeprecationWarning�sys�platformr)�	base_name�base_dirr�verboserrrZtar_compressionZcompress_extZarchive_namer%r�tarZcompressed_name�cmdr
)rrrrr�make_tarball7s<
	



r2cCs�|d}ttjj|�|d�tdkrp|r.d}nd}ytd|||g|d�Wn tk
rjtd|��YnX�n:tjd||�|�s�ytj	|d	tj
d
�}Wn&tk
r�tj	|d	tjd
�}YnX|tj
kr�tjjtjj|d��}|j||�tjd|�x�tj|�D]�\}}	}
x>|	D]6}tjjtjj||d��}|j||�tjd|��qWxJ|
D]B}tjjtjj||��}tjj|��rV|j||�tjd|��qVW�qW|j�|S)
avCreate a zip file from all the files under 'base_dir'.

    The output zip file will be named 'base_name' + ".zip".  Uses either the
    "zipfile" Python module (if available) or the InfoZIP "zip" utility
    (if installed and found on the default search path).  If neither tool is
    available, raises DistutilsExecError.  Returns the name of the output zip
    file.
    z.zip)rNz-rz-rq�zipzkunable to create zip file '%s': could neither import the 'zipfile' module nor find a standalone zip utilityz#creating '%s' and adding '%s' to it�w)Zcompressionrzadding '%s')rr"r#r$�zipfilerrrr&ZZipFileZZIP_DEFLATED�RuntimeErrorZ
ZIP_STORED�curdir�normpath�join�write�walk�isfiler))r-r.r/rZzip_filenameZ
zipoptionsr3r#�dirpathZdirnames�	filenamesrr
r
r�make_zipfilesJ	


r?rzgzip'ed tar-filerzbzip2'ed tar-filerzxz'ed tar-filezcompressed tar filezuncompressed tar filezZIP file)ZgztarZbztarZxztarZztarr0r3cCsx|D]}|tkr|SqWdS)zqReturns the first format from the 'format' list that is unknown.

    If all formats are known, returns None
    N)�ARCHIVE_FORMATS)Zformats�formatr
r
r�check_archive_formats�s
rBcCs�tj�}|dk	r6tjd|�tjj|�}|s6tj|�|dkrDtj}d|i}	yt|}
Wn t	k
rxt
d|��YnX|
d}x|
dD]\}}
|
|	|<q�W|dkr�||	d<||	d	<z|||f|	�}Wd|dk	r�tjd
|�tj|�X|S)a�Create an archive file (eg. zip or tar).

    'base_name' is the name of the file to create, minus any format-specific
    extension; 'format' is the archive format: one of "zip", "tar", "gztar",
    "bztar", "xztar", or "ztar".

    'root_dir' is a directory that will be the root directory of the
    archive; ie. we typically chdir into 'root_dir' before creating the
    archive.  'base_dir' is the directory where we start archiving from;
    ie. 'base_dir' will be the common prefix of all files and
    directories in the archive.  'root_dir' and 'base_dir' both default
    to the current directory.  Returns the name of the archive file.

    'owner' and 'group' are used when creating a tar archive. By default,
    uses the current owner and group.
    Nzchanging into '%s'rzunknown archive format '%s'r�r3rrzchanging back to '%s')r"�getcwdr�debugr#�abspath�chdirr7r@r
r )r-rAZroot_dirr.r/rrrZsave_cwd�kwargsZformat_info�func�arg�val�filenamer
r
r�make_archive�s2
rM)rrrNN)rr)rr)rr)rr)rr)rN)NNrrNN)�__doc__r"�warningsrr+r5�ImportErrorZdistutils.errorsrZdistutils.spawnrZdistutils.dir_utilrZ	distutilsr�pwdrZgrprrrr2r?r@rBrMr
r
r
r�<module>sB



G
=





PKV[���$D$D(__pycache__/msvc9compiler.cpython-36.pycnu�[���3


 \�w�@sTdZddlZddlZddlZddlZddlmZmZmZm	Z	m
Z
ddlmZm
Z
mZddlmZddlmZddlZejZejZejZejZejejejejfZ ej!dko�ej"d&kZ#e#r�d
Z$dZ%dZ&nd
Z$dZ%dZ&dddd�Z'Gdd�d�Z(Gdd�d�Z)dd�Z*dd�Z+dd�Z,dd�Z-d'd d!�Z.e*�Z/e/d"k�r@ed#e/��Gd$d%�d%e�Z0dS)(adistutils.msvc9compiler

Contains MSVCCompiler, an implementation of the abstract CCompiler class
for the Microsoft Visual Studio 2008.

The module is compatible with VS 2005 and VS 2008. You can find legacy support
for older versions of VS in distutils.msvccompiler.
�N)�DistutilsExecError�DistutilsPlatformError�CompileError�LibError�	LinkError)�	CCompiler�gen_preprocess_options�gen_lib_options)�log)�get_platform�win32�� z1Software\Wow6432Node\Microsoft\VisualStudio\%0.1fz5Software\Wow6432Node\Microsoft\Microsoft SDKs\Windowsz,Software\Wow6432Node\Microsoft\.NETFrameworkz%Software\Microsoft\VisualStudio\%0.1fz)Software\Microsoft\Microsoft SDKs\Windowsz Software\Microsoft\.NETFramework�x86�amd64Zia64)rz	win-amd64zwin-ia64c@sPeZdZdZdd�Zee�Zdd�Zee�Zdd�Zee�Zdd	�Ze	e�Zd
S)�Regz2Helper class to read values from the registry
    cCs:x,tD]$}|j||�}|r||kr||SqWt|��dS)N)�HKEYS�read_values�KeyError)�cls�path�key�base�d�r�//usr/lib64/python3.6/distutils/msvc9compiler.py�	get_valueAs

z
Reg.get_valuecCsnyt||�}Wntk
r"dSXg}d}x<yt||�}Wntk
rRPYnX|j|�|d7}q.W|S)zReturn list of registry keys.Nr�)�RegOpenKeyEx�RegError�
RegEnumKey�append)rrr�handle�L�i�krrr�	read_keysIs
z
Reg.read_keysc	Cs�yt||�}Wntk
r"dSXi}d}xTyt||�\}}}Wntk
rXPYnX|j�}|j|�||j|�<|d7}q.W|S)z`Return dict of registry keys and values.

        All names are converted to lowercase.
        Nrr)rr�RegEnumValue�lower�convert_mbcs)	rrrr"rr$�name�value�typerrrr[szReg.read_valuescCs:t|dd�}|dk	r6y|d�}Wntk
r4YnX|S)N�decode�mbcs)�getattr�UnicodeError)�sZdecrrrr)qszReg.convert_mbcsN)
�__name__�
__module__�__qualname__�__doc__r�classmethodr&rr)�staticmethodrrrrr=src@s,eZdZdd�Zdd�Zdd�Zdd�Zd	S)
�
MacroExpandercCsi|_t||_|j|�dS)N)�macros�VS_BASE�vsbase�load_macros)�self�versionrrr�__init__}s
zMacroExpander.__init__cCstj||�|jd|<dS)Nz$(%s))rrr9)r=Zmacrorrrrr�	set_macro�szMacroExpander.set_macrocCs|jd|jdd�|jd|jdd�|jdtd�y$|dkrP|jd	td
�ntd
��Wntk
rvtd��YnX|dkr�|jd
|jd�|jdtd�ndd}x^tD]V}yt||�}Wntk
r�w�YnXt	|d�}t
j|d||f�}|d|jd<q�WdS)NZVCInstallDirz	\Setup\VC�
productdirZVSInstallDirz	\Setup\VSZFrameworkDirZinstallrootg @ZFrameworkSDKDirzsdkinstallrootv2.0aPython was built with Visual Studio 2008;
extensions must be built with a compiler than can generate compatible binaries.
Visual Studio 2008 was not found on this system. If you have Cygwin installed,
you can try compiling with MingW32, by passing "-c mingw32" to setup.py.g"@ZFrameworkVersionzclr versionZ
WindowsSdkDirZcurrentinstallfolderz.Software\Microsoft\NET Framework Setup\Productrz%s\%sr>z$(FrameworkVersion))
r@r;�NET_BASErr�WINSDK_BASErrrr rrr9)r=r>�pr�hrrrrrr<�s.

zMacroExpander.load_macroscCs(x"|jj�D]\}}|j||�}qW|S)N)r9�items�replace)r=r1r%�vrrr�sub�szMacroExpander.subN)r2r3r4r?r@r<rIrrrrr8{sr8cCs�d}tjj|�}|dkrdS|t|�}tj|d�jdd�\}}t|dd��d}|dkrf|d7}t|dd��d	}|dkr�d
}|dkr�||SdS)
z�Return the version of MSVC that was used to build Python.

    For Python 2.3 and up, the version number is included in
    sys.version.  For earlier versions, assume the compiler is MSVC 6.
    zMSC v.r�N� r
�
�g$@r������)�sysr>�find�len�split�int)�prefixr$r1�restZmajorVersionZminorVersionrrr�get_build_version�srWcCs4g}x*|D]"}tjj|�}||kr
|j|�q
W|S)znReturn a list of normalized paths with duplicates removed.

    The current order of paths is maintained.
    )�osr�normpathr!)�pathsZ
reduced_pathsrDZnprrr�normalize_and_reduce_paths�s
r[cCs@|jtj�}g}x|D]}||kr|j|�qWtjj|�}|S)z8Remove duplicate values of an environment variable.
    )rSrX�pathsepr!�join)ZvariableZoldListZnewListr$ZnewVariablerrr�removeDuplicates�s
r^c
Cst|}ytjd|d�}Wn"tk
r>tjd�d}YnX|sTtjj|�r�d|}tj	j
|d�}|r�tjj|�r�tjj|tjtjd�}tjj
|�}tjj|�s�tjd|�dSntjd|�|s�tjd	�dStjj|d
�}tjj|�r�|Stjd�dS)z�Find the vcvarsall.bat file

    At first it tries to find the productdir of VS 2008 in the registry. If
    that fails it falls back to the VS90COMNTOOLS env var.
    z%s\Setup\VCrAz%Unable to find productdir in registryNzVS%0.f0COMNTOOLSZVCz%s is not a valid directoryz Env var %s is not set or invalidzNo productdir foundz
vcvarsall.batzUnable to find vcvarsall.bat)r:rrrr
�debugrXr�isdir�environ�getr]�pardir�abspath�isfile)r>r;rAZtoolskeyZtoolsdir�	vcvarsallrrr�find_vcvarsall�s2





rgcCs8t|�}td�}i}|dkr$td��tjd||�tjd||ftjtjd	�}z�|j�\}}|j	�d
krvt|j
d���|j
d�}xr|jd�D]d}tj
|�}d
|kr�q�|j�}|jd
d�\}	}
|	j�}	|	|kr�|
jtj�r�|
dd�}
t|
�||	<q�WWd|jj�|jj�Xt|�t|�k�r4ttt|j�����|S)zDLaunch vcvarsall.bat and read the settings from its environment
    �include�lib�libpathrNzUnable to find vcvarsall.batz'Calling 'vcvarsall.bat %s' (version=%s)z
"%s" %s & set)�stdout�stderrrr.�
�=r)rhrirjrrN)rg�setrr
r_�
subprocess�Popen�PIPEZcommunicate�waitr-rSrr)�stripr(�endswithrXr\r^rk�closerlrR�
ValueError�str�list�keys)r>ZarchrfZinteresting�result�popenrkrl�linerr+rrr�query_vcvarsall�s<



r~g @z(VC %0.1f is not supported by this modulec
@s�eZdZdZdZiZdgZdddgZdgZdgZ	eeee	Z
d	Zd
ZdZ
dZd
ZZdZd.dd�Zd/dd�Zd0dd�Zd1dd�Zd2dd�Zd3dd�Zdd�Zd d!�Zd"d#�Zd$d%�Zd&d'�Zd(d)�Zd4d*d+�Zd,d-�ZdS)5�MSVCCompilerzwConcrete class that implements an interface to Microsoft Visual C++,
       as defined by the CCompiler abstract class.Zmsvcz.cz.ccz.cppz.cxxz.rcz.mcz.resz.objz.libz.dllz%s%sz.exercCs8tj||||�t|_d|_g|_d|_d|_d|_dS)NzSoftware\Microsoft\VisualStudioF)	rr?�VERSION�_MSVCCompiler__versionZ_MSVCCompiler__root�_MSVCCompiler__paths�	plat_name�_MSVCCompiler__arch�initialized)r=�verboseZdry_runZforcerrrr?JszMSVCCompiler.__init__NcCs0|jstd��|dkrt�}d%}||kr8td|f��dtjkrvdtjkrv|jd�rvd|_d	|_d
|_	d|_
d|_n�|t�ks�|dkr�t|}ntt�d
t|}t
t|�}|djtj�|_|dtjd<|dtjd<t|j�dk�r�td|j��|jd�|_|jd	�|_|jd
�|_	|jd�|_
|jd�|_y,x&tjdjd�D]}|jj|��qNWWntk
�r|YnXt|j�|_dj|j�tjd<d|_|jdk�r�dddddg|_ddddddg|_n&ddddddg|_dddddddg|_ddd g|_|jd!k�rddd"d#g|_dg|_d$|_dS)&Nzdon't init multiple timesr�	win-amd64�win-ia64z--plat-name must be one of %sZDISTUTILS_USE_SDKZMSSdkzcl.exezlink.exezlib.exezrc.exezmc.exe�_rrirhrzxPython was built with %s, and extensions need to be built with the same version of the compiler, but it isn't installed.�;rz/nologoz/Oxz/MDz/W3z/DNDEBUGz/Odz/MDdz/Z7z/D_DEBUGz/GS-z/DLLz/INCREMENTAL:NO�z/INCREMENTAL:noz/DEBUGT)rr�r�) r��AssertionErrorrrrXra�find_exe�cc�linkerri�rc�mc�PLAT_TO_VCVARSr~r�rSr\r�rRZ_MSVCCompiler__productr!rr[r]Zpreprocess_optionsr��compile_options�compile_options_debug�ldflags_sharedr��ldflags_shared_debugZldflags_static)r=r�Zok_platsZ	plat_specZvc_envrDrrr�
initializeUsf







zMSVCCompiler.initialize�cCs�|dkrd}g}x�|D]�}tjj|�\}}tjj|�d}|tjj|�d�}||jkrdtd|��|rttjj|�}||jkr�|j	tjj
|||j��q||jkr�|j	tjj
|||j��q|j	tjj
|||j
��qW|S)Nr�rzDon't know how to compile %s)rXr�splitext�
splitdrive�isabs�src_extensionsr�basename�_rc_extensionsr!r]�
res_extension�_mc_extensions�
obj_extension)r=Zsource_filenamesZ	strip_dir�
output_dirZ	obj_namesZsrc_namer�extrrr�object_filenames�s(



zMSVCCompiler.object_filenamesc	Cst|js|j�|j||||||�}	|	\}}
}}}|p6g}
|
jd�|rT|
j|j�n|
j|j��x|
D�]}y||\}}Wntk
r�whYnX|r�tj	j
|�}||jkr�d|}�nT||jkr�d|}�n>||j
k�r>|}d|}y"|j|jg||g|g�Wqhtk
�r8}zt|��WYdd}~XqhXqhn�||jk�rtj	j|�}tj	j|�}yl|j|jgd|d|g|g�tj	jtj	j|��\}}tj	j||d�}|j|jgd|g|g�Wqhtk
�r�}zt|��WYdd}~XqhXqhntd||f��d	|}y&|j|jg|
|||g|�Wqhtk
�rj}zt|��WYdd}~XqhXqhW|
S)
Nz/cz/Tcz/Tpz/foz-hz-rz.rcz"Don't know how to compile %s to %sz/Fo)r�r�Z_setup_compiler!�extendr�r�rrXrrd�
_c_extensions�_cpp_extensionsr��spawnr�rrr��dirnamer�r�r�r]r�)r=Zsourcesr�r9Zinclude_dirsr_�
extra_preargs�extra_postargsZdependsZcompile_info�objectsZpp_optsZbuildZcompile_opts�obj�srcr�Z	input_optZ
output_opt�msgZh_dirZrc_dirrr�Zrc_filerrr�compile�sj




zMSVCCompiler.compilec	Cs�|js|j�|j||�\}}|j||d�}|j||�r�|d|g}|rJy|j|jg|�Wq�tk
r�}zt|��WYdd}~Xq�Xnt	j
d|�dS)N)r�z/OUT:zskipping %s (up-to-date))r�r��_fix_object_args�library_filename�
_need_linkr�rirrr
r_)	r=r�Zoutput_libnamer�r_�target_lang�output_filenameZlib_argsr�rrr�create_static_libszMSVCCompiler.create_static_libcCsX|js|j�|j||�\}}|j|||�}|\}}}|rL|jdt|��t||||�}|dk	rptjj	||�}|j
||��rH|tjkr�|	r�|j
dd�}q�|jdd�}n|	r�|j
}n|j}g}x|p�gD]}|jd|�q�W||||d|g}tjj|d�}|dk	�rPtjjtjj|��\}}tjj	||j|��}|jd|�|j|||�|
�rp|
|dd�<|�r�|j|�|jtjj|��y|j|jg|�Wn,tk
�r�}zt|��WYdd}~XnX|j||�}|dk	�rT|\}}d||f}y|jdd	d
||g�Wn,tk
�rD}zt|��WYdd}~XnXntjd|�dS)Nz5I don't know what to do with 'runtime_library_dirs': rz/EXPORT:z/OUT:rz/IMPLIB:z-outputresource:%s;%szmt.exez-nologoz	-manifestzskipping %s (up-to-date))r�r�r�Z
_fix_lib_args�warnrxr	rXrr]r�r�
EXECUTABLEr�r�r!r�r�r�r��manifest_setup_ldargsr�Zmkpathr�r�rr�manifest_get_embed_infor
r_)r=�target_descr�r�r�Z	librariesZlibrary_dirsZruntime_library_dirsZexport_symbolsr_r�r��
build_tempr�Z
fixed_argsZlib_optsZldflagsZexport_optsZsym�ld_argsZdll_nameZdll_extZimplib_filer�ZmfinfoZ
mffilename�mfidZout_argrrr�link8sl





zMSVCCompiler.linkcCs,tjj|tjj|�d�}|jd|�dS)Nz	.manifestz/MANIFESTFILE:)rXrr]r�r!)r=r�r�r��
temp_manifestrrrr��sz"MSVCCompiler.manifest_setup_ldargscCs`x,|D] }|jd�r|jdd�d}PqWdS|tjkr>d}nd}|j|�}|dkrXdS||fS)Nz/MANIFESTFILE:�:rr
)�
startswithrSrr��_remove_visual_c_ref)r=r�r��argr�r�rrrr��s



z$MSVCCompiler.manifest_get_embed_infocCs�y�t|�}z|j�}Wd|j�Xtjdtj�}tj|d|�}d}tj|d|�}tjdtj�}tj||�dkrrdSt|d�}z|j|�|S|j�XWnt	k
r�YnXdS)NzU<assemblyIdentity.*?name=("|')Microsoft\.VC\d{2}\.CRT("|').*?(/>|</assemblyIdentity>)r�z*<dependentAssembly>\s*</dependentAssembly>zI<assemblyIdentity.*?name=(?:"|')(.+?)(?:"|').*?(?:/>|</assemblyIdentity>)�w)
�open�readrv�rer��DOTALLrI�search�write�OSError)r=Z
manifest_fileZ
manifest_fZmanifest_buf�patternrrrr��s.	


z!MSVCCompiler._remove_visual_c_refcCsd|S)Nz	/LIBPATH:r)r=�dirrrr�library_dir_option�szMSVCCompiler.library_dir_optioncCstd��dS)Nz<don't know how to set runtime library search path for MSVC++)r)r=r�rrr�runtime_library_dir_option�sz'MSVCCompiler.runtime_library_dir_optioncCs
|j|�S)N)r�)r=rirrr�library_option�szMSVCCompiler.library_optioncCs`|r|d|g}n|g}xB|D]6}x0|D](}tjj||j|��}tjj|�r(|Sq(WqWdSdS)NZ_d)rXrr]r��exists)r=�dirsrir_Z	try_namesr�r*Zlibfilerrr�find_library_file�s

zMSVCCompiler.find_library_filecCszx4|jD]*}tjjtjj|�|�}tjj|�r|SqWx>tjdjd�D]*}tjjtjj|�|�}tjj|�rH|SqHW|S)a�Return path to an MSVC executable program.

        Tries to find the program in several places: first, one of the
        MSVC program search paths from the registry; next, the directories
        in the PATH environment variable.  If any of those work, return an
        absolute path that is known to exist.  If none of them work, just
        return the original program name, 'exe'.
        ZPathr�)r�rXrr]rdrerarS)r=ZexerD�fnrrrr�s	zMSVCCompiler.find_exe)rrr)N)rr�)NNNrNNN)NrN)
NNNNNrNNNN)r) r2r3r4r5Z
compiler_typeZexecutablesr�r�r�r�r�r�r�Zstatic_lib_extensionZshared_lib_extensionZstatic_lib_formatZshared_lib_formatZ
exe_extensionr?r�r�r�r�r�r�r�r�r�r�r�r�r�rrrrr,sR


X

V

R+
rl)r)1r5rXrprPr�Zdistutils.errorsrrrrrZdistutils.ccompilerrrr	Z	distutilsr
Zdistutils.utilr�winregZ	OpenKeyExrZEnumKeyr Z	EnumValuer'�errorrZ
HKEY_USERS�HKEY_CURRENT_USER�HKEY_LOCAL_MACHINEZHKEY_CLASSES_ROOTr�platform�maxsizeZNATIVE_WIN64r:rCrBr�rr8rWr[r^rgr~r�rrrrr�<module>sN>.#
)
PKV[5L�
!
!$__pycache__/text_file.cpython-36.pycnu�[���3


 \�0�@s&dZddlZddlZGdd�d�ZdS)z�text_file

provides the TextFile class, which gives an interface to text files
that (optionally) takes care of stripping comments, ignoring blank
lines, and joining lines with backslashes.�Nc@steZdZdZdddddddd�Zddd�Zd	d
�Zdd�Zdd
d�Zddd�Z	ddd�Z
dd�Zdd�Zdd�Z
dS)�TextFilea�Provides a file-like object that takes care of all the things you
       commonly want to do when processing a text file that has some
       line-by-line syntax: strip comments (as long as "#" is your
       comment character), skip blank lines, join adjacent lines by
       escaping the newline (ie. backslash at end of line), strip
       leading and/or trailing whitespace.  All of these are optional
       and independently controllable.

       Provides a 'warn()' method so you can generate warning messages that
       report physical line number, even if the logical line in question
       spans multiple physical lines.  Also provides 'unreadline()' for
       implementing line-at-a-time lookahead.

       Constructor is called as:

           TextFile (filename=None, file=None, **options)

       It bombs (RuntimeError) if both 'filename' and 'file' are None;
       'filename' should be a string, and 'file' a file object (or
       something that provides 'readline()' and 'close()' methods).  It is
       recommended that you supply at least 'filename', so that TextFile
       can include it in warning messages.  If 'file' is not supplied,
       TextFile creates its own using 'io.open()'.

       The options are all boolean, and affect the value returned by
       'readline()':
         strip_comments [default: true]
           strip from "#" to end-of-line, as well as any whitespace
           leading up to the "#" -- unless it is escaped by a backslash
         lstrip_ws [default: false]
           strip leading whitespace from each line before returning it
         rstrip_ws [default: true]
           strip trailing whitespace (including line terminator!) from
           each line before returning it
         skip_blanks [default: true}
           skip lines that are empty *after* stripping comments and
           whitespace.  (If both lstrip_ws and rstrip_ws are false,
           then some lines may consist of solely whitespace: these will
           *not* be skipped, even if 'skip_blanks' is true.)
         join_lines [default: false]
           if a backslash is the last non-newline character on a line
           after stripping comments and whitespace, join the following line
           to it to form one "logical line"; if N consecutive lines end
           with a backslash, then N+1 physical lines will be joined to
           form one logical line.
         collapse_join [default: false]
           strip leading whitespace from lines that are joined to their
           predecessor; only matters if (join_lines and not lstrip_ws)
         errors [default: 'strict']
           error handler used to decode the file content

       Note that since 'rstrip_ws' can strip the trailing newline, the
       semantics of 'readline()' must differ from those of the builtin file
       object's 'readline()' method!  In particular, 'readline()' returns
       None for end-of-file: an empty string might just be a blank line (or
       an all-whitespace line), if 'rstrip_ws' is true but 'skip_blanks' is
       not.�r�strict)�strip_comments�skip_blanks�	lstrip_ws�	rstrip_ws�
join_lines�
collapse_join�errorsNcKs�|dkr|dkrtd��x>|jj�D]0}||krBt||||�q$t|||j|�q$Wx&|j�D]}||jkrbtd|��qbW|dkr�|j|�n||_||_d|_g|_	dS)z�Construct a new TextFile object.  At least one of 'filename'
           (a string) and 'file' (a file-like object) must be supplied.
           They keyword argument options are described above and affect
           the values returned by 'readline()'.Nz7you must supply either or both of 'filename' and 'file'zinvalid TextFile option '%s'r)
�RuntimeError�default_options�keys�setattr�KeyError�open�filename�file�current_line�linebuf)�selfrrZoptions�opt�r�+/usr/lib64/python3.6/distutils/text_file.py�__init__Ns
zTextFile.__init__cCs&||_tj|jd|jd�|_d|_dS)zyOpen a new file named 'filename'.  This overrides both the
           'filename' and 'file' arguments to the constructor.�r)rrN)r�iorrrr)rrrrrrosz
TextFile.opencCs$|j}d|_d|_d|_|j�dS)ziClose the current file and forget everything we know about it
           (filename, current line number).N)rrr�close)rrrrrrvs
zTextFile.closecCsjg}|dkr|j}|j|jd�t|ttf�rD|jdt|��n|jd|�|jt|��dj|�S)Nz, z
lines %d-%d: z	line %d: �)r�appendr�
isinstance�list�tuple�str�join)r�msg�lineZoutmsgrrr�	gen_errorszTextFile.gen_errorcCstd|j||���dS)Nzerror: )�
ValueErrorr')rr%r&rrr�error�szTextFile.errorcCs tjjd|j||�d�dS)a�Print (to stderr) a warning message tied to the current logical
           line in the current file.  If the current logical line in the
           file spans multiple physical lines, the warning refers to the
           whole range, eg. "lines 3-5".  If 'line' supplied, it overrides
           the current line number; it may be a list or tuple to indicate a
           range of physical lines, or an integer for a single physical
           line.z	warning: �
N)�sys�stderr�writer')rr%r&rrr�warn�sz
TextFile.warncCs|jr|jd}|jd
=|Sd}�x�|jj�}|dkr:d}|jr�|r�|jd�}|dkrXnX|dksp||ddkr�|ddkr�dp�d}|d|�|}|j�dkr�q$n|jdd�}|jo�|�r |dkr�|jd	�|S|j	r�|j
�}||}t|jt
��r|jdd|jd<n|j|jdg|_n:|dk�r.dSt|jt
��rN|jdd|_n|jd|_|j�rt|j�rt|j�}n"|j�r�|j
�}n|j�r�|j�}|dk�s�|dk�r�|j�r�q$|j�r�|ddk�r�|dd�}q$|dd�dk�r�|dd�d}q$|SdS)aURead and return a single logical line from the current file (or
           from an internal buffer if lines have previously been "unread"
           with 'unreadline()').  If the 'join_lines' option is true, this
           may involve reading multiple physical lines concatenated into a
           single string.  Updates the current line number, so calling
           'warn()' after 'readline()' emits a warning about the physical
           line(s) just read.  Returns None on end-of-file, since the empty
           string can occur if 'rstrip_ws' is true but 'strip_blanks' is
           not.rrN�#r�\r*z\#z2continuation line immediately precedes end-of-file�z\
���r2r2r2r2r2���r3)rr�readliner�find�strip�replacer	r.r
�lstripr rr!rr�rstripr)rr&Zbuildup_line�posZeolrrrr4�sf




	



zTextFile.readlinecCs,g}x"|j�}|dkr|S|j|�qWdS)zWRead and return the list of all logical lines remaining in the
           current file.N)r4r)r�linesr&rrr�	readlinesszTextFile.readlinescCs|jj|�dS)z�Push 'line' (a string) onto an internal buffer that will be
           checked by future 'readline()' calls.  Handy for implementing
           a parser with line-at-a-time lookahead.N)rr)rr&rrr�
unreadlineszTextFile.unreadline)NN)N)N)N)�__name__�
__module__�__qualname__�__doc__r
rrrr'r)r.r4r<r=rrrrr
s"9
!	



x
r)rAr+rrrrrr�<module>sPKV[�
)�
�
)__pycache__/dep_util.cpython-36.opt-1.pycnu�[���3


 \�
�@s6dZddlZddlmZdd�Zdd�Zdd	d
�ZdS)z�distutils.dep_util

Utility functions for simple, timestamp-based dependency of files
and groups of files; also, function based entirely on such
timestamp dependency analysis.�N)�DistutilsFileErrorcCs`tjj|�s tdtjj|���tjj|�s0dSddlm}tj|�|}tj|�|}||kS)aReturn true if 'source' exists and is more recently modified than
    'target', or if 'source' exists and 'target' doesn't.  Return false if
    both exist and 'target' is the same age or younger than 'source'.
    Raise DistutilsFileError if 'source' does not exist.
    zfile '%s' does not exist�r)�ST_MTIME)�os�path�existsr�abspath�statr)�source�targetrZmtime1Zmtime2�r�*/usr/lib64/python3.6/distutils/dep_util.py�newersrcCslt|�t|�krtd��g}g}xBtt|��D]2}t||||�r.|j||�|j||�q.W||fS)z�Walk two filename lists in parallel, testing if each source is newer
    than its corresponding target.  Return a pair of lists (sources,
    targets) where source is newer than target, according to the semantics
    of 'newer()'.
    z+'sources' and 'targets' must be same length)�len�
ValueError�ranger�append)�sourcesZtargetsZ	n_sourcesZ	n_targets�irrr
�newer_pairwise sr�errorcCs�tjj|�sdSddlm}tj|�|}xX|D]L}tjj|�sb|dkrJn|dkrVq0n|dkrbdStj|�|}||kr0dSq0WdSdS)a�Return true if 'target' is out-of-date with respect to any file
    listed in 'sources'.  In other words, if 'target' exists and is newer
    than every file in 'sources', return false; otherwise return true.
    'missing' controls what we do when a source file is missing; the
    default ("error") is to blow up with an OSError from inside 'stat()';
    if it is "ignore", we silently drop any missing source files; if it is
    "newer", any missing source files make us assume that 'target' is
    out-of-date (this is handy in "dry-run" mode: it'll make you pretend to
    carry out commands that wouldn't work because inputs are missing, but
    that doesn't matter because you're not actually going to run the
    commands).
    rr)rr�ignorerN)rrrr	r)rrZmissingrZtarget_mtimer
�source_mtimerrr
�newer_group6s 
r)r)�__doc__rZdistutils.errorsrrrrrrrr
�<module>s
PKV[(E�O��__pycache__/core.cpython-36.pycnu�[���3


 \�"�@s�dZddlZddlZddlmZddlTddlmZddlm	Z	ddl
mZddlm
Z
d	Zd
d�Zdadad4Zd5Zd/d0�Zd6d2d3�ZdS)7a#distutils.core

The only module that needs to be imported to use the Distutils; provides
the 'setup' function (which is to be called from the setup script).  Also
indirectly provides the Distribution and Command classes, although they are
really defined in distutils.dist and distutils.cmd.
�N)�DEBUG)�*)�Distribution)�Command)�
PyPIRCCommand)�	Extensionz�usage: %(script)s [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]
   or: %(script)s --help [cmd1 cmd2 ...]
   or: %(script)s --help-commands
   or: %(script)s cmd --help
cCstjj|�}tt�S)N)�os�path�basename�USAGE�vars)�script_nameZscript�r�&/usr/lib64/python3.6/distutils/core.py�	gen_usage sr�	distclassr
�script_args�options�name�version�author�author_email�
maintainer�maintainer_email�url�license�description�long_description�keywords�	platforms�classifiers�download_url�requires�provides�	obsoletes�sources�include_dirs�
define_macros�undef_macros�library_dirs�	libraries�runtime_library_dirs�
extra_objects�extra_compile_args�extra_link_args�	swig_opts�export_symbols�depends�languagec,Ks|jd�}|r|d=nt}d|kr8tjjtjd�|d<d|krRtjdd�|d<y||�a}WnLtk
r�}z0d|kr�t	d|��nt	d	|d|f��WYdd}~XnXt
d
kr�|S|j�tr�t
d�|j�t
dkr�|Sy|j�}Wn:tk
�r*}zt	t|j�d
|��WYdd}~XnXt�rBt
d�|j�t
dk�rP|S|�ry|j�Wn�tk
�r�t	d��Yn�tk
�r�}z0t�r�tjjd|f��nt	d|f��WYdd}~XnBttfk
�r}z t�r�nt	dt|���WYdd}~XnX|S)a�The gateway to the Distutils: do everything your setup script needs
    to do, in a highly flexible and user-driven way.  Briefly: create a
    Distribution instance; find and parse config files; parse the command
    line; run each Distutils command found there, customized by the options
    supplied to 'setup()' (as keyword arguments), in config files, and on
    the command line.

    The Distribution instance might be an instance of a class supplied via
    the 'distclass' keyword argument to 'setup'; if no such class is
    supplied, then the Distribution class (in dist.py) is instantiated.
    All other arguments to 'setup' (except for 'cmdclass') are used to set
    attributes of the Distribution instance.

    The 'cmdclass' argument, if supplied, is a dictionary mapping command
    names to command classes.  Each command encountered on the command line
    will be turned into a command class, which is in turn instantiated; any
    class found in 'cmdclass' is used in place of the default, which is
    (for command 'foo_bar') class 'foo_bar' in module
    'distutils.command.foo_bar'.  The command class must provide a
    'user_options' attribute which is a list of option specifiers for
    'distutils.fancy_getopt'.  Any command-line options between the current
    and the next command are used to set attributes of the current command
    object.

    When the entire command-line has been successfully parsed, calls the
    'run()' method on each command object in turn.  This method will be
    driven entirely by the Distribution object (which each command object
    has a reference to, thanks to its constructor), and the
    command-specific options that became attributes of each command
    object.
    rr
rr�Nrzerror in setup command: %szerror in %s setup command: %s�initz%options (after parsing config files):�configz

error: %sz%options (after parsing command line):�commandlineZinterruptedz
error: %s
z	error: %szerror: )�getrrr	r
�sys�argv�_setup_distributionZDistutilsSetupError�
SystemExit�_setup_stop_afterZparse_config_filesr�printZdump_option_dictsZparse_command_lineZDistutilsArgErrorrr
Zrun_commands�KeyboardInterrupt�OSError�stderr�writeZDistutilsErrorZCCompilerError�str)�attrs�klassZdist�msg�ok�excrrr�setup9s`%
"(
"rH�runcCs�|dkrtd|f��|atjj�}d|i}yZzH|tjd<|dk	rP|tjd	d�<t|d
��}t|j�|�WdQRXWd|t_daXWntk
r�YnXt	dkr�t
d|��t	S)
a.Run a setup script in a somewhat controlled environment, and
    return the Distribution instance that drives things.  This is useful
    if you need to find out the distribution meta-data (passed as
    keyword args from 'script' to 'setup()', or the contents of the
    config files or command-line.

    'script_name' is a file that will be read and run with 'exec()';
    'sys.argv[0]' will be replaced with 'script' for the duration of the
    call.  'script_args' is a list of strings; if supplied,
    'sys.argv[1:]' will be replaced by 'script_args' for the duration of
    the call.

    'stop_after' tells 'setup()' when to stop processing; possible
    values:
      init
        stop after the Distribution instance has been created and
        populated with the keyword arguments to 'setup()'
      config
        stop after config files have been parsed (and their data
        stored in the Distribution instance)
      commandline
        stop after the command-line ('sys.argv[1:]' or 'script_args')
        have been parsed (and the data stored in the Distribution)
      run [default]
        stop after all commands have been run (the same as if 'setup()'
        had been called in the usual way

    Returns the Distribution instance, which provides all information
    used to drive the Distutils.
    r4r5r6rIz"invalid value for 'stop_after': %r�__file__rNr3�rbzZ'distutils.core.setup()' was never called -- perhaps '%s' is not a Distutils setup script?)r4r5r6rI)�
ValueErrorr<r8r9�copy�open�exec�readr;r:�RuntimeError)r
rZ
stop_afterZ	save_argv�g�frrr�	run_setup�s(


rT)rr
rrrrrrrrrrrrrrr r!r"r#r$)rr%r&r'r(r)r*r+r,r-r.r/r0r1r2)NrI)�__doc__rr8Zdistutils.debugrZdistutils.errorsZdistutils.distrZ
distutils.cmdrZdistutils.configrZdistutils.extensionrrrr<r:Zsetup_keywordsZextension_keywordsrHrTrrrr�<module>s2qPKV[�Cֺ�"__pycache__/version.cpython-36.pycnu�[���3


 \90�@s>dZddlZGdd�d�ZGdd�de�ZGdd�de�ZdS)	a�Provides classes to represent module version numbers (one class for
each style of version numbering).  There are currently two such classes
implemented: StrictVersion and LooseVersion.

Every version number class implements the following interface:
  * the 'parse' method takes a string and parses it to some internal
    representation; if the string is an invalid version number,
    'parse' raises a ValueError exception
  * the class constructor takes an optional string argument which,
    if supplied, is passed to 'parse'
  * __str__ reconstructs the string that was passed to 'parse' (or
    an equivalent string -- ie. one that will generate an equivalent
    version number instance)
  * __repr__ generates Python code to recreate the version number instance
  * _cmp compares the current instance with either another instance
    of the same class or a string (which will be parsed to an instance
    of the same class, thus must follow the same rules)
�Nc@sJeZdZdZddd�Zdd�Zdd�Zd	d
�Zdd�Zd
d�Z	dd�Z
dS)�Versionz�Abstract base class for version numbering classes.  Just provides
    constructor (__init__) and reproducer (__repr__), because those
    seem to be the same for all version numbering classes; and route
    rich comparisons to _cmp.
    NcCs|r|j|�dS)N)�parse)�self�vstring�r�)/usr/lib64/python3.6/distutils/version.py�__init__&szVersion.__init__cCsd|jjt|�fS)Nz	%s ('%s'))�	__class__�__name__�str)rrrr�__repr__*szVersion.__repr__cCs|j|�}|tkr|S|dkS)Nr)�_cmp�NotImplemented)r�other�crrr�__eq__-s
zVersion.__eq__cCs|j|�}|tkr|S|dkS)Nr)r
r)rrrrrr�__lt__3s
zVersion.__lt__cCs|j|�}|tkr|S|dkS)Nr)r
r)rrrrrr�__le__9s
zVersion.__le__cCs|j|�}|tkr|S|dkS)Nr)r
r)rrrrrr�__gt__?s
zVersion.__gt__cCs|j|�}|tkr|S|dkS)Nr)r
r)rrrrrr�__ge__Es
zVersion.__ge__)N)r
�
__module__�__qualname__�__doc__rrrrrrrrrrrrs
rc@s<eZdZdZejdejejB�Zdd�Z	dd�Z
dd�Zd	S)
�
StrictVersiona?Version numbering for anal retentives and software idealists.
    Implements the standard interface for version number classes as
    described above.  A version number consists of two or three
    dot-separated numeric components, with an optional "pre-release" tag
    on the end.  The pre-release tag consists of the letter 'a' or 'b'
    followed by a number.  If the numeric components of two version
    numbers are equal, then one with a pre-release tag will always
    be deemed earlier (lesser) than one without.

    The following are valid version numbers (shown in the order that
    would be obtained by sorting according to the supplied cmp function):

        0.4       0.4.0  (these two are equivalent)
        0.4.1
        0.5a1
        0.5b3
        0.5
        0.9.6
        1.0
        1.0.4a3
        1.0.4b1
        1.0.4

    The following are examples of invalid version numbers:

        1
        2.7.2.2
        1.3.a4
        1.3pl1
        1.3c4

    The rationale for this version numbering system will be explained
    in the distutils documentation.
    z)^(\d+) \. (\d+) (\. (\d+))? ([ab](\d+))?$cCs�|jj|�}|std|��|jddddd�\}}}}}|rTttt|||g��|_nttt||g��d|_|r�|dt|�f|_nd|_dS)	Nzinvalid version number '%s'�����r)r)	�
version_re�match�
ValueError�group�tuple�map�int�version�
prerelease)rrr �major�minorZpatchr'Zprerelease_numrrrr�szStrictVersion.parsecCsb|jddkr*djtt|jdd���}ndjtt|j��}|jr^||jdt|jd�}|S)Nrr�.r)r&�joinr$rr')rrrrr�__str__�szStrictVersion.__str__cCs�t|t�rt|�}|j|jkr2|j|jkr.dSdS|jrF|jrFdS|jrX|jrXdS|jrj|jrjdS|jr�|jr�|j|jkr�dS|j|jkr�dSdSnds�td��dS)NrrFznever get here���r-r-)�
isinstancerrr&r'�AssertionError)rrrrrr
�s&
zStrictVersion._cmpN)r
rrr�re�compile�VERBOSE�ASCIIrrr,r
rrrrr]s#
rc@sHeZdZdZejdej�Zddd�Zdd�Z	dd	�Z
d
d�Zdd
�ZdS)�LooseVersiona�Version numbering for anarchists and software realists.
    Implements the standard interface for version number classes as
    described above.  A version number consists of a series of numbers,
    separated by either periods or strings of letters.  When comparing
    version numbers, the numeric components will be compared
    numerically, and the alphabetic components lexically.  The following
    are all valid version numbers, in no particular order:

        1.5.1
        1.5.2b2
        161
        3.10a
        8.02
        3.4j
        1996.07.12
        3.2.pl0
        3.1.1.6
        2g6
        11g
        0.960923
        2.2beta29
        1.13++
        5.5.kw
        2.0b1pl0

    In fact, there is no such thing as an invalid version number under
    this scheme; the rules for comparison are simple and predictable,
    but may not always give the results you want (for some definition
    of "want").
    z(\d+ | [a-z]+ | \.)NcCs|r|j|�dS)N)r)rrrrrr.szLooseVersion.__init__cCsb||_dd�|jj|�D�}x:t|�D].\}}yt|�||<Wq&tk
rRYq&Xq&W||_dS)NcSsg|]}|r|dkr|�qS)r*r)�.0�xrrr�
<listcomp>8sz&LooseVersion.parse.<locals>.<listcomp>)r�component_re�split�	enumerater%r!r&)rrZ
components�i�objrrrr3s
zLooseVersion.parsecCs|jS)N)r)rrrrr,CszLooseVersion.__str__cCsdt|�S)NzLooseVersion ('%s'))r)rrrrrGszLooseVersion.__repr__cCsFt|t�rt|�}|j|jkr"dS|j|jkr2dS|j|jkrBdSdS)Nrrr-)r.rr4r&)rrrrrr
Ks
zLooseVersion._cmp)N)
r
rrrr0r1r2r8rrr,rr
rrrrr4s
r4)rr0rrr4rrrr�<module>s
>/PKV[f��		$__pycache__/file_util.cpython-36.pycnu�[���3


 \��@sZdZddlZddlmZddlmZdddd�Zddd�Zddd�Zddd�Z	dd�Z
dS)zFdistutils.file_util

Utility functions for operating on single files.
�N)�DistutilsFileError)�logZcopyingzhard linkingzsymbolically linking)N�hard�sym�icNCs�d}d}�zvyt|d�}Wn4tk
rN}ztd||jf��WYdd}~XnXtjj|�r�ytj|�Wn4tk
r�}ztd||jf��WYdd}~XnXyt|d�}Wn4tk
r�}ztd||jf��WYdd}~XnXx�y|j|�}Wn6tk
�r*}ztd||jf��WYdd}~XnX|�s4Py|j	|�Wq�tk
�rx}ztd||jf��WYdd}~Xq�Xq�WWd|�r�|j
�|�r�|j
�XdS)	a5Copy the file 'src' to 'dst'; both must be filenames.  Any error
    opening either file, reading from 'src', or writing to 'dst', raises
    DistutilsFileError.  Data is read/written in chunks of 'buffer_size'
    bytes (default 16k).  No attempt is made to handle anything apart from
    regular files.
    N�rbzcould not open '%s': %szcould not delete '%s': %s�wbzcould not create '%s': %szcould not read from '%s': %szcould not write to '%s': %s)�open�OSErrorr�strerror�os�path�exists�unlink�read�write�close)�src�dst�buffer_sizeZfsrcZfdst�eZbuf�r�+/usr/lib64/python3.6/distutils/file_util.py�_copy_file_contentssF	$"""*r�cCsddlm}ddlm}	m}
m}m}tjj	|�s<t
d|��tjj|�rd|}
tjj|tjj
|��}ntjj|�}
|r�|||�r�|dkr�tjd|�|dfSyt|}Wn tk
r�td|��YnX|dk�rtjj
|�tjj
|�k�rtjd|||
�ntjd|||�|�r|dfS|d	k�rttjj|��oBtjj||��s�ytj||�|dfStk
�rpYnXn<|d
k�r�tjj|��o�tjj||��s�tj||�|dfSt||�|�s�|�rtj|�}|�r�tj|||	||
f�|�rtj||||��|dfS)aCopy a file 'src' to 'dst'.  If 'dst' is a directory, then 'src' is
    copied there with the same name; otherwise, it must be a filename.  (If
    the file exists, it will be ruthlessly clobbered.)  If 'preserve_mode'
    is true (the default), the file's mode (type and permission bits, or
    whatever is analogous on the current platform) is copied.  If
    'preserve_times' is true (the default), the last-modified and
    last-access times are copied as well.  If 'update' is true, 'src' will
    only be copied if 'dst' does not exist, or if 'dst' does exist but is
    older than 'src'.

    'link' allows you to make hard links (os.link) or symbolic links
    (os.symlink) instead of copying: set it to "hard" or "sym"; if it is
    None (the default), files are copied.  Don't set 'link' on systems that
    don't support it: 'copy_file()' doesn't check if hard or symbolic
    linking is available. If hardlink fails, falls back to
    _copy_file_contents().

    Under Mac OS, uses the native file copy function in macostools; on
    other systems, uses '_copy_file_contents()' to copy file contents.

    Return a tuple (dest_name, copied): 'dest_name' is the actual name of
    the output file, and 'copied' is true if the file was copied (or would
    have been copied, if 'dry_run' true).
    r)�newer)�ST_ATIME�ST_MTIME�ST_MODE�S_IMODEz4can't copy '%s': doesn't exist or not a regular filerz"not copying %s (output up-to-date)z&invalid value '%s' for 'link' argumentz%s %s -> %srr)Zdistutils.dep_utilr�statrrrrrr
�isfiler�isdir�join�basename�dirnamer�debug�_copy_action�KeyError�
ValueError�infor�samefile�linkr
�symlinkr�utime�chmod)rrZ
preserve_modeZpreserve_times�updater,�verbose�dry_runrrrrr�dir�action�strrr�	copy_fileCsT!





r6c(Cs�ddlm}m}m}m}m}ddl}	|dkr:tjd||�|rB|S||�sVt	d|��||�rrt
jj|||��}n||�r�t	d||f��|||��s�t	d||f��d	}
yt
j
||�WnPtk
�r
}z2|j\}}
||	jkr�d
}
nt	d|||
f��WYdd}~XnX|
�r�t|||d�yt
j|�Wnhtk
�r�}zJ|j\}}
yt
j|�Wntk
�rpYnXt	d
||||
f��WYdd}~XnX|S)a%Move a file 'src' to 'dst'.  If 'dst' is a directory, the file will
    be moved into it with the same name; otherwise, 'src' is just renamed
    to 'dst'.  Return the new full name of the file.

    Handles cross-device moves on Unix using 'copy_file()'.  What about
    other systems???
    r)rr!r"r$r%Nrzmoving %s -> %sz#can't move '%s': not a regular filez0can't move '%s': destination '%s' already existsz2can't move '%s': destination '%s' not a valid pathFTzcouldn't move '%s' to '%s': %s)r1zAcouldn't move '%s' to '%s' by copy/delete: delete '%s' failed: %s)Zos.pathrr!r"r$r%�errnorr*rrr
r#�renamer
�argsZEXDEVr6r)rrr1r2rr!r"r$r%r7Zcopy_itrZnum�msgrrr�	move_file�sR

"
"r;c
Cs:t|d�}z x|D]}|j|d�qWWd|j�XdS)z{Create a file with the specified name and write 'contents' (a
    sequence of strings without line terminators) to it.
    �w�
N)r	rr)�filename�contents�f�linerrr�
write_file�s


rB�@)rC)rrrNrr)rr)�__doc__rZdistutils.errorsrZ	distutilsrr'rr6r;rBrrrr�<module>s
3
c
=PKV[�Fӎ##$__pycache__/cmd.cpython-36.opt-2.pycnu�[���3


 \�J�@snddlZddlZddlZddlmZddlmZmZmZm	Z	m
Z
ddlmZGdd�d�ZGdd�de�Z
dS)	�N)�DistutilsOptionError)�util�dir_util�	file_util�archive_util�dep_util)�logc@seZdZgZdd�Zdd�Zdd�Zdd�Zd	d
�ZdBd
d�Z	dd�Z
dCdd�Zdd�ZdDdd�Z
dEdd�Zdd�ZdFdd�Zdd�Zd d!�Zd"d#�Zd$d%�ZdGd&d'�ZdHd)d*�Zd+d,�Zd-d.�Zd/d0�ZdId1d2�ZdJd4d5�ZdKd6d7�ZdLd8d9�ZdMd:d;�ZdNd<d=�ZdOd>d?�Z dPd@dA�Z!dS)Q�CommandcCsbddlm}t||�std��|jtkr0td��||_|j�d|_	|j
|_
d|_d|_d|_
dS)Nr)�Distributionz$dist must be a Distribution instancezCommand is an abstract class)Zdistutils.distr
�
isinstance�	TypeError�	__class__r	�RuntimeError�distribution�initialize_optionsZ_dry_run�verbose�force�help�	finalized)�selfZdistr
�r�%/usr/lib64/python3.6/distutils/cmd.py�__init__/s


zCommand.__init__cCs<|dkr0t|d|�}|dkr*t|j|�S|Snt|��dS)N�dry_run�_)�getattrr�AttributeError)r�attrZmyvalrrr�__getattr___szCommand.__getattr__cCs|js|j�d|_dS)N�)r�finalize_options)rrrr�ensure_finalizediszCommand.ensure_finalizedcCstd|j��dS)Nz,abstract method -- subclass %s must override)rr
)rrrrr{s
zCommand.initialize_optionscCstd|j��dS)Nz,abstract method -- subclass %s must override)rr
)rrrrr �szCommand.finalize_optionsN�cCs�ddlm}|dkr d|j�}|j||tjd�|d}x\|jD]R\}}}|j|�}|d	dkrp|dd
�}t||�}|j|d||ftjd�qDWdS)Nr)�
longopt_xlatezcommand options for '%s':)�levelz  r�=z%s = %s���r&)	Zdistutils.fancy_getoptr#�get_command_name�announcer�INFO�user_options�	translater)r�header�indentr#�optionr�valuerrr�dump_options�s

zCommand.dump_optionscCstd|j��dS)Nz,abstract method -- subclass %s must override)rr
)rrrr�run�s
zCommand.runrcCstj||�dS)N)r)r�msgr$rrrr(�szCommand.announcecCs&ddlm}|r"t|�tjj�dS)Nr)�DEBUG)Zdistutils.debugr3�print�sys�stdout�flush)rr2r3rrr�debug_print�szCommand.debug_printcCsBt||�}|dkr"t|||�|St|t�s>td|||f��|S)Nz'%s' must be a %s (got `%s`))r�setattrr�strr)rr.�what�default�valrrr�_ensure_stringlike�s

zCommand._ensure_stringlikecCs|j|d|�dS)N�string)r>)rr.r<rrr�
ensure_string�szCommand.ensure_stringcCspt||�}|dkrdSt|t�r6t||tjd|��n6t|t�rTtdd�|D��}nd}|sltd||f��dS)Nz,\s*|\s+css|]}t|t�VqdS)N)rr:)�.0�vrrr�	<genexpr>�sz-Command.ensure_string_list.<locals>.<genexpr>Fz''%s' must be a list of strings (got %r))	rrr:r9�re�split�list�allr)rr.r=�okrrr�ensure_string_list�s


zCommand.ensure_string_listcCs8|j|||�}|dk	r4||�r4td|||f��dS)Nzerror in '%s' option: )r>r)rr.Ztesterr;Z	error_fmtr<r=rrr�_ensure_tested_string�szCommand._ensure_tested_stringcCs|j|tjjdd�dS)N�filenamez$'%s' does not exist or is not a file)rJ�os�path�isfile)rr.rrr�ensure_filename�szCommand.ensure_filenamecCs|j|tjjdd�dS)Nzdirectory namez)'%s' does not exist or is not a directory)rJrLrM�isdir)rr.rrr�ensure_dirnameszCommand.ensure_dirnamecCst|d�r|jS|jjSdS)N�command_name)�hasattrrRr
�__name__)rrrrr'	s
zCommand.get_command_namecGsJ|jj|�}|j�x0|D](\}}t||�dkrt||t||��qWdS)N)r�get_command_objr!rr9)rZsrc_cmdZoption_pairsZsrc_cmd_objZ
src_optionZ
dst_optionrrr�set_undefined_optionss
zCommand.set_undefined_optionscCs|jj||�}|j�|S)N)rrUr!)r�commandZcreateZcmd_objrrr�get_finalized_command$szCommand.get_finalized_commandrcCs|jj||�S)N)r�reinitialize_command)rrWZreinit_subcommandsrrrrY0szCommand.reinitialize_commandcCs|jj|�dS)N)r�run_command)rrWrrrrZ4szCommand.run_commandcCs6g}x,|jD]"\}}|dks$||�r|j|�qW|S)N)�sub_commands�append)rZcommandsZcmd_name�methodrrr�get_sub_commands;s
zCommand.get_sub_commandscCstjd|j�|�dS)Nzwarning: %s: %s
)r�warnr')rr2rrrr_KszCommand.warncCstj||||jd�dS)N)r)r�executer)r�func�argsr2r$rrrr`NszCommand.execute�cCstj|||jd�dS)N)r)r�mkpathr)r�name�moderrrrdQszCommand.mkpathc	Cstj|||||j||jd�S)N)r)r�	copy_filerr)r�infile�outfile�
preserve_mode�preserve_times�linkr$rrrrgTs

zCommand.copy_filec	Cstj||||||j|jd�S)N)r)r�	copy_treerr)rrhrirjrkZpreserve_symlinksr$rrrrm]s
zCommand.copy_treecCstj|||jd�S)N)r)r�	move_filer)r�src�dstr$rrrrnfszCommand.move_filecCs ddlm}||||jd�dS)Nr)�spawn)r)Zdistutils.spawnrqr)r�cmdZsearch_pathr$rqrrrrqjsz
Command.spawnc	Cstj|||||j||d�S)N)r�owner�group)r�make_archiver)rZ	base_name�formatZroot_dirZbase_dirrsrtrrrruoszCommand.make_archivecCs�|dkrd|}t|t�r"|f}nt|ttf�s8td��|dkrRd|dj|�f}|jsdtj||�rv|j	||||�n
t
j|�dS)Nzskipping %s (inputs unchanged)z9'infiles' must be a string, or a list or tuple of stringszgenerating %s from %sz, )rr:rF�tupler�joinrrZnewer_groupr`r�debug)rZinfilesrirarbZexec_msgZskip_msgr$rrr�	make_fileus

zCommand.make_file)Nr")r)N)N)N)r)r)Nr)rc)rrNr)rrrr)r)rr)NNNN)NNr)"rT�
__module__�__qualname__r[rrr!rr r0r1r(r8r>r@rIrJrOrQr'rVrXrYrZr^r_r`rdrgrmrnrqrurzrrrrr	sD0
















r	c@s2eZdZd
gZdd�Zdd�Zdd	�Zd
d�ZdS)�install_misc�install-dir=�d�!directory to install the files tocCsd|_g|_dS)N)�install_dir�outfiles)rrrrr�szinstall_misc.initialize_optionscCs|jd|df�dS)NZinstallr�)rV)r�dirnamerrr�_install_dir_from�szinstall_misc._install_dir_fromcCsRg|_|sdS|j|j�x2|D]*}|j||j�|jjtjj|j|��q WdS)N)r�rdr�rgr\rLrMrx)rZfilelist�frrr�_copy_files�s
zinstall_misc._copy_filescCs|jS)N)r�)rrrr�get_outputs�szinstall_misc.get_outputsN)r~rr�)rTr{r|r*rr�r�r�rrrrr}�s
	r})r5rLrDZdistutils.errorsrZ	distutilsrrrrrrr	r}rrrr�<module>sPKV[�Fk�� __pycache__/spawn.cpython-36.pycnu�[���3


 \�@s�dZddlZddlZddlmZmZddlmZddlm	Z	ddd�Z
d	d
�Zddd�Zej
d
krvddlmZdadaddd�Zddd�ZdS)z�distutils.spawn

Provides the 'spawn()' function, a front-end to various platform-
specific functions for launching another program in a sub-process.
Also provides the 'find_executable()' to search the path for a given
executable name.
�N)�DistutilsPlatformError�DistutilsExecError)�DEBUG)�log�cCsNt|�}tjdkr"t|||d�n(tjdkr<t|||d�ntdtj��dS)a�Run another program, specified as a command list 'cmd', in a new process.

    'cmd' is just the argument list for the new process, ie.
    cmd[0] is the program to run and cmd[1:] are the rest of its arguments.
    There is no way to run a program with a name different from that of its
    executable.

    If 'search_path' is true (the default), the system's executable
    search path will be used to find the program; otherwise, cmd[0]
    must be the exact path to the executable.  If 'dry_run' is true,
    the command will not actually be run.

    Raise DistutilsExecError if running the program fails in any way; just
    return on success.
    �posix)�dry_run�ntz1don't know how to spawn programs on platform '%s'N)�list�os�name�_spawn_posix�	_spawn_ntr)�cmd�search_path�verboser�r�'/usr/lib64/python3.6/distutils/spawn.py�spawns

rcCs.x(t|�D]\}}d|kr
d|||<q
W|S)z�Quote command-line arguments for DOS/Windows conventions.

    Just wraps every argument which contains blanks in double quotes, and
    returns a new argument list.
    � z"%s")�	enumerate)�args�i�argrrr�_nt_quote_args+srcCs�|d}t|�}|r t|�p|}tjdj|g|dd���|s�ytjtj||�}Wn@tk
r�}z$t	sp|}t
d||jdf��WYdd}~XnX|dkr�t	s�|}t
d||f��dS)Nrrrzcommand %r failed: %sz%command %r failed with exit status %d���)r�find_executabler�info�joinr�spawnv�P_WAIT�OSErrorrrr)rrrr�
executableZrc�excrrrr;s$&r�darwin)�	sysconfigcCsxtjdj|��|rdS|d}|r*tjp.tj}d}tjdkr�tdkrlt	j
d�pRdatrldd�tjd�D�atr�tj
jdt�}td	d�|jd�D�kr�d
|tf}t|��ttj
|d�}|r�tjp�tj}tj�}	|	dk�rvy$|dkr�|||�n||||�WnNtk
�rL}
z0t�s|}tjjd||
jf�tjd
�WYdd}
~
XnXt�sX|}tjjd|�tjd
��n��x�ytj|	d�\}	}WnDtk
�r�}z&t�s�|}td||jdf��WYdd}~XnXtj|��rt�s�|}td|tj|�f��nltj|��rBtj |�}
|
dk�r&dSt�s0|}td||
f��n,tj!|��rT�qznt�s^|}td||f���qzWdS)Nrrr$�MACOSX_DEPLOYMENT_TARGET�cSsg|]}t|��qSr)�int)�.0�xrrr�
<listcomp>esz _spawn_posix.<locals>.<listcomp>�.cSsg|]}t|��qSr)r()r)r*rrrr+kszF$MACOSX_DEPLOYMENT_TARGET mismatch: now "%s" but "%s" during configure)r&zunable to execute %r: %s
rz(unable to execute %r for unknown reasonszcommand %r failed: %sz"command %r terminated by signal %dz%command %r failed with exit status %dz1unknown error executing %r: termination status %dr)"rrrr�execvp�execv�sys�platform�_cfg_targetr%�get_config_var�split�_cfg_target_split�environ�getr�dict�execvpe�execve�forkr!r�stderr�write�strerror�_exit�waitpidrr�WIFSIGNALED�WTERMSIG�	WIFEXITED�WEXITSTATUS�
WIFSTOPPED)rrrrr"Zexec_fn�envZ
cur_targetZmy_msg�pid�eZstatusr#Zexit_statusrrrr
Xs�



&

r
cCs�|dkrtjjdtj�}|jtj�}tjj|�\}}tj	dkrN|dkrN|d}tjj
|�s�x*|D]"}tjj||�}tjj
|�r`|Sq`WdS|SdS)z�Tries to find 'executable' in the directories listed in 'path'.

    A string listing directories separated by 'os.pathsep'; defaults to
    os.environ['PATH'].  Returns the complete filename or None if not found.
    N�PATHZwin32z.exe)rr5r6�defpathr3�pathsep�path�splitextr/r0�isfiler)r"rK�paths�baseZext�p�frrrr�s
r)rrr)rrr)rrr)N)�__doc__r/rZdistutils.errorsrrZdistutils.debugrZ	distutilsrrrrr0r%r1r4r
rrrrr�<module>s



QPKV[؉ȯ��(__pycache__/unixccompiler.cpython-36.pycnu�[���3

�\dh�:�@s�dZddlZddlZddlZddlmZddlmZddlm	Z	m
Z
mZddlm
Z
mZmZmZddlmZejdkr~ddlZGd	d
�d
e	�ZdS)a9distutils.unixccompiler

Contains the UnixCCompiler class, a subclass of CCompiler that handles
the "typical" Unix-style command-line C compiler:
  * macros defined with -Dname[=value]
  * macros undefined with -Uname
  * include search directories specified with -Idir
  * libraries specified with -lllib
  * library search directories specified with -Ldir
  * compile handled by 'cc' (or similar) executable with -c option:
    compiles .c to .o
  * link static library handled by 'ar' command (possibly with 'ranlib')
  * link shared library handled by 'cc -shared'
�N)�	sysconfig)�newer)�	CCompiler�gen_preprocess_options�gen_lib_options)�DistutilsExecError�CompileError�LibError�	LinkError)�log�darwinc
s�eZdZdZddgdgdgddgdgddgdd�Zejdd�d	krNd
ged
<ddd
dddgZdZdZ	dZ
dZdZdZ
ZZeZejdkr�dZ�fdd�Zd.dd�Zdd�Zd/d d!�Zd0d"d#�Zd$d%�Zd&d'�Zd(d)�Zd*d+�Zd1d,d-�Z�ZS)2�
UnixCCompilerZunixNZccz-shared�arz-cr)�preprocessor�compiler�compiler_so�compiler_cxx�	linker_so�
linker_exe�archiver�ranlib�rrz.cz.Cz.ccz.cxxz.cppz.mz.oz.az.soz.dylibz.tbdzlib%s%s�cygwinz.execs@t�j|||�\}}}tjd�}|r6||kr6|j|�|||fS)z'Remove standard library path from rpath�LIBDIR)�super�
_fix_lib_argsr�get_config_var�remove)�self�	libraries�library_dirs�runtime_library_dirsZlibdir)�	__class__��//usr/lib64/python3.6/distutils/unixccompiler.pyrUs

zUnixCCompiler._fix_lib_argscCs�|jd||�}|\}}}t||�}	|j|	}
|r>|
jd|g�|rN||
dd�<|r\|
j|�|
j|�|js~|dks~t||�r�|r�|jtj	j
|��y|j|
�Wn*tk
r�}zt
|��WYdd}~XnXdS)Nz-or)Z_fix_compile_argsrr�extend�appendZforcer�mkpath�os�path�dirname�spawnrr)r�sourceZoutput_fileZmacrosZinclude_dirs�
extra_preargs�extra_postargs�
fixed_args�ignore�pp_optsZpp_args�msgr#r#r$�
preprocess^s$




zUnixCCompiler.preprocessc	Csp|j}tjdkr tj|||�}y |j|||d|g|�Wn*tk
rj}zt|��WYdd}~XnXdS)Nrz-o)r�sys�platform�_osx_support�compiler_fixupr+rr)	r�obj�srcZextZcc_argsr.r1rr2r#r#r$�_compilexs

zUnixCCompiler._compilercCs�|j||�\}}|j||d�}|j||�r�|jtjj|��|j|j|g||j	�|j
r�y|j|j
|g�Wq�tk
r�}zt|��WYdd}~Xq�Xnt
jd|�dS)N)�
output_dirzskipping %s (up-to-date))�_fix_object_args�library_filename�
_need_linkr'r(r)r*r+r�objectsrrr	r�debug)rr?Zoutput_libnamer;r@�target_lang�output_filenamer2r#r#r$�create_static_lib�szUnixCCompiler.create_static_libcCs�|j||�\}}|j|||�}|\}}}t||||�}t|ttd�f�sPtd��|dk	rftjj	||�}|j
||��r�||j|d|g}|	r�dg|dd�<|
r�|
|dd�<|r�|j|�|j
tjj|��y�|tjkr�|jdd�}n|jdd�}|
dk�rR|j�rRd}tjj|d�dk�rDd}xd||k�rB|d7}�q(W|j|||<tjd	k�rjtj||�}|j||�Wn,tk
�r�}zt|��WYdd}~XnXntjd
|�dS)Nz%'output_dir' must be a string or Nonez-oz-grzc++�env��=rzskipping %s (up-to-date))r<rr�
isinstance�str�type�	TypeErrorr(r)�joinr>r?r%r'r*rZ
EXECUTABLErrr�basenamer4r5r6r7r+rr
rr@)rZtarget_descr?rBr;rr r!Zexport_symbolsr@r-r.Z
build_temprAr/Zlib_optsZld_argsZlinker�ir2r#r#r$�link�sH


zUnixCCompiler.linkcCsd|S)Nz-Lr#)r�dirr#r#r$�library_dir_option�sz UnixCCompiler.library_dir_optioncCsd|kpd|kS)N�gcczg++r#)rZ
compiler_namer#r#r$�_is_gcc�szUnixCCompiler._is_gcccCs�tjjtjd��}tjdd�dkr,d|Stjdd�dkrFd|Stjdd�d	krz|j|�rnd
d|gSdd|gStjdd�dks�tjdd�d
kr�d|gS|j|�r�tjd�dkr�d|Sd|Snd|SdS)N�CCrrz-L�Zfreebsdz-Wl,-rpath=�zhp-uxz-Wl,+sz+sZirix646Zosf1V5z-rpath�GNULD�yesz-Wl,--enable-new-dtags,-Rz-Wl,-Rz-R)r(r)rLrrr4r5rR)rrOrr#r#r$�runtime_library_dir_option�s 
$

z(UnixCCompiler.runtime_library_dir_optioncCsd|S)Nz-lr#)r�libr#r#r$�library_option	szUnixCCompiler.library_optioncCs�|j|dd�}|j|dd�}|j|dd�}|j|dd�}tjdkrptjd�}tjd|�}	|	dkrfd	}
n
|	jd
�}
�x|D�]}tj	j
||�}tj	j
||�}
tj	j
||�}tj	j
||�}tjdko�|jd�s�|jd�o�|jd
��rBtj	j
|
|d
d�|�}tj	j
|
|d
d�|�}
tj	j
|
|d
d�|�}tj	j
|
|d
d�|�}tj	j|
��rT|
Stj	j|��rf|Stj	j|��rx|Stj	j|�rx|SqxWdS)N�shared)Zlib_type�dylib�
xcode_stub�staticr�CFLAGSz-isysroot\s+(\S+)�/rEz/System/z/usr/z/usr/local/)
r=r4r5rr�re�search�groupr(r)rK�
startswith�exists)r�dirsrYr@Zshared_fZdylib_fZxcode_stub_fZstatic_fZcflags�mZsysrootrOr[r\r^r]r#r#r$�find_library_files>




zUnixCCompiler.find_library_file)NNNNN)NrN)
NNNNNrNNNN)r)�__name__�
__module__�__qualname__Z
compiler_typeZexecutablesr4r5Zsrc_extensionsZ
obj_extensionZstatic_lib_extensionZshared_lib_extensionZdylib_lib_extensionZxcode_stub_lib_extensionZstatic_lib_formatZshared_lib_formatZdylib_lib_formatZxcode_stub_lib_formatZ
exe_extensionrr3r:rCrNrPrRrXrZrh�
__classcell__r#r#)r"r$r
-sF

	


6,r
)�__doc__r(r4raZ	distutilsrZdistutils.dep_utilrZdistutils.ccompilerrrrZdistutils.errorsrrr	r
rr5r6r
r#r#r#r$�<module>s
PKV[q�ii&__pycache__/spawn.cpython-36.opt-2.pycnu�[���3


 \�@s�ddlZddlZddlmZmZddlmZddlmZddd�Z	dd	�Z
dd
d�Zejdkrrdd
lm
Z
dadaddd�Zddd�ZdS)�N)�DistutilsPlatformError�DistutilsExecError)�DEBUG)�log�cCsNt|�}tjdkr"t|||d�n(tjdkr<t|||d�ntdtj��dS)N�posix)�dry_run�ntz1don't know how to spawn programs on platform '%s')�list�os�name�_spawn_posix�	_spawn_ntr)�cmd�search_path�verboser�r�'/usr/lib64/python3.6/distutils/spawn.py�spawns

rcCs.x(t|�D]\}}d|kr
d|||<q
W|S)N� z"%s")�	enumerate)�args�i�argrrr�_nt_quote_args+srcCs�|d}t|�}|r t|�p|}tjdj|g|dd���|s�ytjtj||�}Wn@tk
r�}z$t	sp|}t
d||jdf��WYdd}~XnX|dkr�t	s�|}t
d||f��dS)Nrrrzcommand %r failed: %sz%command %r failed with exit status %d���)r�find_executabler�info�joinr�spawnv�P_WAIT�OSErrorrrr)rrrr�
executableZrc�excrrrr;s$&r�darwin)�	sysconfigcCsxtjdj|��|rdS|d}|r*tjp.tj}d}tjdkr�tdkrlt	j
d�pRdatrldd�tjd�D�atr�tj
jdt�}td	d�|jd�D�kr�d
|tf}t|��ttj
|d�}|r�tjp�tj}tj�}	|	dk�rvy$|dkr�|||�n||||�WnNtk
�rL}
z0t�s|}tjjd||
jf�tjd
�WYdd}
~
XnXt�sX|}tjjd|�tjd
��n��x�ytj|	d�\}	}WnDtk
�r�}z&t�s�|}td||jdf��WYdd}~XnXtj|��rt�s�|}td|tj|�f��nltj|��rBtj |�}
|
dk�r&dSt�s0|}td||
f��n,tj!|��rT�qznt�s^|}td||f���qzWdS)Nrrr$�MACOSX_DEPLOYMENT_TARGET�cSsg|]}t|��qSr)�int)�.0�xrrr�
<listcomp>esz _spawn_posix.<locals>.<listcomp>�.cSsg|]}t|��qSr)r()r)r*rrrr+kszF$MACOSX_DEPLOYMENT_TARGET mismatch: now "%s" but "%s" during configure)r&zunable to execute %r: %s
rz(unable to execute %r for unknown reasonszcommand %r failed: %sz"command %r terminated by signal %dz%command %r failed with exit status %dz1unknown error executing %r: termination status %dr)"rrrr�execvp�execv�sys�platform�_cfg_targetr%�get_config_var�split�_cfg_target_split�environ�getr�dict�execvpe�execve�forkr!r�stderr�write�strerror�_exit�waitpidrr�WIFSIGNALED�WTERMSIG�	WIFEXITED�WEXITSTATUS�
WIFSTOPPED)rrrrr"Zexec_fn�envZ
cur_targetZmy_msg�pid�eZstatusr#Zexit_statusrrrr
Xs�



&

r
cCs�|dkrtjjdtj�}|jtj�}tjj|�\}}tj	dkrN|dkrN|d}tjj
|�s�x*|D]"}tjj||�}tjj
|�r`|Sq`WdS|SdS)N�PATHZwin32z.exe)rr5r6�defpathr3�pathsep�path�splitextr/r0�isfiler)r"rK�paths�baseZext�p�frrrr�s
r)rrr)rrr)rrr)N)r/rZdistutils.errorsrrZdistutils.debugrZ	distutilsrrrrr0r%r1r4r
rrrrr�<module>	s



QPKV[d�S�<�<__pycache__/util.cpython-36.pycnu�[���3


 \5Q�@sdZddlZddlZddlZddlZddlZddlmZddl	m
Z
ddlmZddl
mZddlmZdd	�Zd
d�Zdd
�Zdadd�Zdd�Zd(dd�Zdaaadd�Zdd�Zd)dd�Zdd�Zd*dd�Zd d!�Zd+d"d#�Z d,d$d%�Z!Gd&d'�d'�Z"dS)-zudistutils.util

Miscellaneous utility functions -- anything that doesn't fit into
one of the other *util.py modules.
�N)�DistutilsPlatformError)�newer)�spawn)�log)�DistutilsByteCompileErrorcCstjdkrnd}tjj|�}|d)kr(tjStjjd|�}tj|t|�|�j�}|dkr\dS|dkrhdStjSd	tjkr�tjd	Stjd
ks�t	td�r�tjStj
�\}}}}}|j�jdd
�}|jdd�}|jdd�}|dd�dkr�d||fS|dd�dk�rV|ddk�rd}dt|d�d|dd�f}ddd�}	|d|	tj
7}n�|dd �d!k�rtd||fS|dd�d"k�r�d#|||fS|dd$�d%k�r�d%}tjd&tj�}
|
j|�}|�r|j�}n>|dd$�d'k�rddl}ddl}
|j|
jj�|||�\}}}d(|||fS)*a�Return a string that identifies the current platform.  This is used
    mainly to distinguish platform-specific build directories and
    platform-specific built distributions.  Typically includes the OS name
    and version and the architecture (as supplied by 'os.uname()'),
    although the exact information included depends on the OS; eg. for IRIX
    the architecture isn't particularly important (IRIX only runs on SGI
    hardware), but for Linux the kernel version isn't particularly
    important.

    Examples of returned values:
       linux-i586
       linux-alpha (?)
       solaris-2.6-sun4u
       irix-5.3
       irix64-6.2

    Windows will return one of:
       win-amd64 (64bit Windows on AMD64 (aka x86_64, Intel64, EM64T, etc)
       win-ia64 (64bit Windows on Itanium)
       win32 (all others - specifically, sys.platform is returned)

    For other non-POSIX platforms, currently just returns 'sys.platform'.
    �ntz bit (��)�amd64z	win-amd64�itaniumzwin-ia64�_PYTHON_HOST_PLATFORM�posix�uname�/�� �_�-N��linuxz%s-%s�sunosr�5�solarisz%d.%s���32bit�64bit)i���l����z.%s��irix�aixz%s-%s.%s��cygwinz[\d.]+�darwinz%s-%s-%s���)�os�name�sys�version�find�platform�len�lower�environ�hasattrr�replace�int�maxsize�re�compile�ASCII�match�group�_osx_supportZdistutils.sysconfig�get_platform_osx�	sysconfig�get_config_vars)�prefix�i�j�look�osname�host�releaser'�machine�bitness�rel_re�mr6�	distutils�rF�&/usr/lib64/python3.6/distutils/util.py�get_platformsX


 


rHcCs~tjdkr|S|s|S|ddkr.td|��|ddkrFtd|��|jd�}xd|krf|jd�qRW|srtjStjj|�S)a�Return 'pathname' as a name that will work on the native filesystem,
    i.e. split it on '/' and put it back together again using the current
    directory separator.  Needed because filenames in the setup script are
    always supplied in Unix style, and have to be converted to the local
    convention before we can actually use them in the filesystem.  Raises
    ValueError on non-Unix-ish systems if 'pathname' either starts or
    ends with a slash.
    rrzpath '%s' cannot be absoluterzpath '%s' cannot end with '/'�.r#)r$�sep�
ValueError�split�remove�curdir�path�join)�pathname�pathsrFrFrG�convert_pathos	


rScCs�tjdkr<tjj|�s$tjj||�Stjj||dd��SnNtjdkr|tjj|�\}}|ddkrn|dd�}tjj||�Stdtj��dS)a	Return 'pathname' with 'new_root' prepended.  If 'pathname' is
    relative, this is equivalent to "os.path.join(new_root,pathname)".
    Otherwise, it requires making 'pathname' relative and then joining the
    two, which is tricky on DOS/Windows and Mac OS.
    r
rNrr�\z!nothing known about platform '%s')r$r%rO�isabsrP�
splitdriver)Znew_rootrQZdriverOrFrFrG�change_root�s

rWcCsZtrdStjdkr<dtjkr<ddl}|jtj��dtjd<dtjkrRt�tjd<dadS)aLEnsure that 'os.environ' has all the environment variables we
    guarantee that users can use in config files, command-line options,
    etc.  Currently this includes:
      HOME - user's home directory (Unix only)
      PLAT - description of the current platform, including hardware
             and OS (see 'get_platform()')
    Nr
�HOMErrZPLATr)�_environ_checkedr$r%r,�pwd�getpwuid�getuidrH)rZrFrFrG�
check_environ�s	
r]cCsTt�|fdd�}ytjd||�Stk
rN}ztd|��WYdd}~XnXdS)a�Perform shell/Perl-style variable substitution on 'string'.  Every
    occurrence of '$' followed by a name is considered a variable, and
    variable is substituted by the value found in the 'local_vars'
    dictionary, or in 'os.environ' if it's not in 'local_vars'.
    'os.environ' is first checked/augmented to guarantee that it contains
    certain values: see 'check_environ()'.  Raise ValueError for any
    variables not found in either 'local_vars' or 'os.environ'.
    cSs,|jd�}||krt||�Stj|SdS)Nr)r5�strr$r,)r4�
local_varsZvar_namerFrFrG�_subst�s
zsubst_vars.<locals>._substz\$([a-zA-Z_][a-zA-Z_0-9]*)zinvalid variable '$%s'N)r]r1�sub�KeyErrorrK)�sr_r`�varrFrFrG�
subst_vars�s	re�error: cCs|t|�S)N)r^)�excr:rFrFrG�grok_environment_error�srhcCs(tjdtj�atjd�atjd�adS)Nz
[^\\\'\"%s ]*z'(?:[^'\\]|\\.)*'z"(?:[^"\\]|\\.)*")r1r2�string�
whitespace�
_wordchars_re�
_squote_re�
_dquote_rerFrFrFrG�_init_regex�s
rncCs�tdkrt�|j�}g}d}�x`|�r�tj||�}|j�}|t|�kr\|j|d|��P||tjkr�|j|d|��||d�j	�}d}n�||dkr�|d|�||dd�}|d}n�||dkr�t
j||�}n*||dkr�tj||�}ntd||��|dk�r"t
d||��|j�\}}|d|�||d|d�||d�}|j�d	}|t|�kr"|j|�Pq"W|S)
aSplit a string up according to Unix shell-like rules for quotes and
    backslashes.  In short: words are delimited by spaces, as long as those
    spaces are not escaped by a backslash, or inside a quoted string.
    Single and double quotes are equivalent, and the quote characters can
    be backslash-escaped.  The backslash is stripped from any two-character
    escape sequence, leaving only the escaped character.  The quote
    characters are stripped from any quoted string.  Returns a list of
    words.
    NrrTr�'�"z!this can't happen (bad char '%c')z"bad string (mismatched %s quotes?)r)rkrn�stripr4�endr*�appendrirj�lstriprlrm�RuntimeErrorrK�span)rcZwords�posrDrrZbegrFrFrG�split_quoted�s@


,
rxcCsP|dkr6d|j|f}|dd�dkr6|dd�d}tj|�|sL||�dS)	a�Perform some action that affects the outside world (eg.  by
    writing to the filesystem).  Such actions are special because they
    are disabled by the 'dry_run' flag.  This method takes care of all
    that bureaucracy for you; all you have to do is supply the
    function to call and an argument tuple for it (to embody the
    "external action" being performed), and an optional message to
    print.
    Nz%s%rrz,)rr	���ry)�__name__r�info)�func�args�msg�verbose�dry_runrFrFrG�executes	
r�cCs2|j�}|dkrdS|dkr dStd|f��dS)z�Convert a string representation of truth to true (1) or false (0).

    True values are 'y', 'yes', 't', 'true', 'on', and '1'; false values
    are 'n', 'no', 'f', 'false', 'off', and '0'.  Raises ValueError if
    'val' is anything else.
    �y�yes�t�true�on�1r�n�no�f�false�off�0rzinvalid truth value %rN)r�r�r�r�r�r�)r�r�r�r�r�r�)r+rK)�valrFrFrG�	strtobool0sr�rcCsTddl}tjrtd��|dkr*do(|dk}|�s8yddlm}	|	d�\}
}Wn.tk
rzddlm}d|d�}
}YnXtj	d|�|s�|
dk	r�t
j|
d	�}
n
t|d	�}
|
j
d
�|
j
djtt|��d�|
j
d
|||||f�|
j�tjg}|j|j��|j|�t||d�tt
j|fd||d��nddlm}�x|D�]�}|dd�dk�rh�qL|dk�r�|dk�r�dn|}tjj||d�}ntjj|�}|}|�r�|dt|��|k�r�td||f��|t|�d�}|�r�t
j j||�}t
j j!|�}|�rL|�st"||��r<tj	d||�|�sJ||||�ntj#d||��qLWdS)a~Byte-compile a collection of Python source files to .pyc
    files in a __pycache__ subdirectory.  'py_files' is a list
    of files to compile; any files that don't end in ".py" are silently
    skipped.  'optimize' must be one of the following:
      0 - don't optimize
      1 - normal optimization (like "python -O")
      2 - extra optimization (like "python -OO")
    If 'force' is true, all files are recompiled regardless of
    timestamps.

    The source filename encoded in each bytecode file defaults to the
    filenames listed in 'py_files'; you can modify these with 'prefix' and
    'basedir'.  'prefix' is a string that will be stripped off of each
    source filename, and 'base_dir' is a directory name that will be
    prepended (after 'prefix' is stripped).  You can supply either or both
    (or neither) of 'prefix' and 'base_dir', as you wish.

    If 'dry_run' is true, doesn't actually do anything that would
    affect the filesystem.

    Byte-compilation is either done directly in this interpreter process
    with the standard py_compile module, or indirectly by writing a
    temporary script and executing it.  Normally, you should let
    'byte_compile()' figure out to use direct compilation or not (see
    the source for details).  The 'direct' flag is used by the script
    generated in indirect mode; unless you know what you're doing, leave
    it set to None.
    rNzbyte-compiling is disabled.T)�mkstempz.py)�mktempz$writing byte-compilation script '%s'�wz2from distutils.util import byte_compile
files = [
z,
z]
z�
byte_compile(files, optimize=%r, force=%r,
             prefix=%r, base_dir=%r,
             verbose=%r, dry_run=0,
             direct=1)
)r�zremoving %s)r2rr)�optimizationz1invalid prefix: filename %r doesn't start with %rzbyte-compiling %s to %sz%skipping byte-compilation of %s to %s���)$�
subprocessr&�dont_write_bytecoderZtempfiler��ImportErrorr�rr{r$�fdopen�open�writerP�map�repr�close�
executable�extendZ"_optim_args_from_interpreter_flagsrsrr�rM�
py_compiler2�	importlib�util�cache_from_sourcer*rKrO�basenamer�debug)Zpy_files�optimizeZforcer:Zbase_dirrr�Zdirectr�r�Z	script_fdZscript_namer�Zscript�cmdr2�file�opt�cfile�dfileZ
cfile_baserFrFrG�byte_compile@sl$


r�cCs|jd�}d}|j|�S)z�Return a version of the string escaped for inclusion in an
    RFC-822 header, by ensuring there are 8 spaces space after each newline.
    �
�rz        z	
        )rLrP)�header�linesrJrFrFrG�
rfc822_escape�s
r�cCsV|sdSddlm}m}Gdd�d|�}|dkr8|d�}|||d�}|j|dd	�dS)
aInvoke 2to3 on a list of Python files.
    The files should all come from the build area, as the
    modification is done in-place. To reduce the build time,
    only files modified since the last invocation of this
    function should be passed in the files argument.Nr)�RefactoringTool�get_fixers_from_packagec@s$eZdZdd�Zdd�Zdd�ZdS)z*run_2to3.<locals>.DistutilsRefactoringToolc_stj|f|��dS)N)r�error)�selfr~r}�kwrFrFrG�	log_error�sz4run_2to3.<locals>.DistutilsRefactoringTool.log_errorcWstj|f|��dS)N)rr{)r�r~r}rFrFrG�log_message�sz6run_2to3.<locals>.DistutilsRefactoringTool.log_messagecWstj|f|��dS)N)rr�)r�r~r}rFrFrG�	log_debug�sz4run_2to3.<locals>.DistutilsRefactoringTool.log_debugN)rz�
__module__�__qualname__r�r�r�rFrFrFrG�DistutilsRefactoringTool�sr�z
lib2to3.fixes)�optionsT)r�)Zlib2to3.refactorr�r�Zrefactor)�files�fixer_namesr��explicitr�r�r��rrFrFrG�run_2to3�s
r�cCsddlm}ddlm}ddlm}|�}	tj�}
tj|�z|	j	�Wdtj|
�X|	j
|	jdd�<|r�x(|j�D]}|j
�}|s�qt|	j|�qtWg}xV|	jD]L}
tjj||
�}|tjj|��|tjj||
�|dd�}|dr�|j|�q�Wtdd	�|D�|||d
�|S)z�Recursively copy a directory, only copying new and changed files,
    running run_2to3 over all newly copied Python modules afterward.

    If you give a template string, it's parsed like a MANIFEST.in.
    r)�mkpath)�	copy_file)�FileListNr)�updatecSsg|]}|j�jd�r|�qS)z.py)r+�endswith)�.0�fnrFrFrG�
<listcomp>sz$copydir_run_2to3.<locals>.<listcomp>)r�r�r�)Zdistutils.dir_utilr�Zdistutils.file_utilr�Zdistutils.filelistr�r$�getcwd�chdir�findallZallfilesr��
splitlinesrqZprocess_template_linerOrP�dirnamersr�)�src�dest�templater�r�r�r�r�r�ZfilelistrN�lineZcopied�filenameZoutname�resrFrFrG�copydir_run_2to3�s4
r�c@s$eZdZdZdZdZdZdd�ZdS)�	Mixin2to3z�Mixin class for commands that run 2to3.
    To configure 2to3, setup scripts may either change
    the class variables, or inherit from individual commands
    to override how 2to3 is invoked.NcCst||j|j|j�S)N)r�r�r�r�)r�r�rFrFrGr�,szMixin2to3.run_2to3)rzr�r��__doc__r�r�r�r�rFrFrFrGr�s
r�)rf)Nrr)rrNNrrN)NNN)NNNN)#r�r$r1�importlib.utilr�rir&Zdistutils.errorsrZdistutils.dep_utilrZdistutils.spawnrrErrrHrSrWrYr]rerhrkrlrmrnrxr�r�r�r�r�r�r�rFrFrFrG�<module>s@]
=




 PKV[nQQ-__pycache__/bcppcompiler.cpython-36.opt-1.pycnu�[���3


 \W:�@sxdZddlZddlmZmZmZmZmZmZddl	m
Z
mZmZddl
mZddlmZddlmZGdd	�d	e
�ZdS)
z�distutils.bcppcompiler

Contains BorlandCCompiler, an implementation of the abstract CCompiler class
for the Borland C++ compiler.
�N)�DistutilsExecError�DistutilsPlatformError�CompileError�LibError�	LinkError�UnknownFileError)�	CCompiler�gen_preprocess_options�gen_lib_options)�
write_file)�newer)�logc
@s�eZdZdZdZiZdgZdddgZeeZdZ	dZ
d	Zd
ZZ
dZdd
d�Zddd�Zddd�Zd dd�Zd!dd�Zd"dd�Zd#dd�ZdS)$�BCPPCompilerzConcrete class that implements an interface to the Borland C/C++
    compiler, as defined by the CCompiler abstract class.
    Zbcppz.cz.ccz.cppz.cxxz.objz.libz.dllz%s%sz.exercCs�tj||||�d|_d|_d|_d|_ddddg|_ddddg|_d	d
ddg|_d	d
ddg|_	g|_
d
ddg|_d
dddg|_dS)
Nz	bcc32.exezilink32.exeztlib.exez/tWMz/O2z/qz/g0z/Odz/Tpdz/Gnz/xz/r)
r�__init__�cc�linker�libZpreprocess_options�compile_options�compile_options_debug�ldflags_shared�ldflags_shared_debugZldflags_static�ldflags_exe�ldflags_exe_debug)�self�verboseZdry_run�force�r�./usr/lib64/python3.6/distutils/bcppcompiler.pyr5szBCPPCompiler.__init__Nc	Cs�|j||||||�\}}	}}
}|p$g}|jd�|rB|j|j�n|j|j��xD|	D�]:}
y||
\}}Wntk
r�wVYnXtjj|�}tjj|
�}
|j	tjj
|
��|dkr�qV|dk�ry|jdd|
|g�WqVtk
�r}zt
|��WYdd}~XqVXqV||jk�rd}n||jk�r,d}nd}d|
}y,|j|jg||
||g||g�WqVtk
�r�}zt
|��WYdd}~XqVXqVW|	S)	Nz-cz.resz.rcZbrcc32z-fo�z-Pz-o)Z_setup_compile�append�extendrr�KeyError�os�path�normpath�mkpath�dirname�spawnrr�
_c_extensions�_cpp_extensionsr)rZsources�
output_dir�macros�include_dirs�debug�
extra_preargs�extra_postargsZdepends�objects�pp_optsZbuildZcompile_opts�obj�src�ext�msgZ	input_optZ
output_optrrr�compileQsF

(zBCPPCompiler.compilec	Cs�|j||�\}}|j||d�}|j||�r~|dg|}|r:y|j|jg|�Wq�tk
rz}zt|��WYdd}~Xq�Xntjd|�dS)N)r*z/uzskipping %s (up-to-date))	�_fix_object_args�library_filename�
_need_linkr'rrrr
r-)	rr0Zoutput_libnamer*r-�target_lang�output_filenameZlib_argsr5rrr�create_static_lib�szBCPPCompiler.create_static_libc Cs�|j||�\}}|j|||�\}}}|r8tjdt|��|dk	rNtjj||�}|j||��r�|t	j
kr�d}|	r~|jdd�}q�|jdd�}n&d}|	r�|j
dd�}n|jdd�}|dkr�d}n�tjj|�\}}tjj|�\}}tjj|d�}tjj|d|�}dg}x&|�pgD]}|jd||f��qW|jt||fd	|�ttjj|�}|g}g}xF|D]>}tjjtjj|��\}}|d
k�r�|j|�n
|j|��qfWx$|D]}|jdtjj|���q�W|jd�|j|�|jd
|g�|jd�x<|D]4}|j|||	�}|dk�r(|j|�n
|j|��qW|jd�|jd�|jd
|g�|jd
�|j|�|
�r�|
|dd�<|�r�|j|�|jtjj|��y|j|jg|�Wn,tk
�r�}zt|��WYdd}~XnXntjd|�dS)Nz7I don't know what to do with 'runtime_library_dirs': %sZc0w32Zc0d32rrz%s.defZEXPORTSz  %s=_%sz
writing %sz.resz/L%sz/L.�,z,,Zimport32Zcw32mtzskipping %s (up-to-date)) r7Z
_fix_lib_argsr
�warn�strr"r#�joinr9rZ
EXECUTABLErrrr�split�splitextr&rZexecuter�mapr$�normcaser �find_library_filer%r'rrrr-) rZtarget_descr0r;r*Z	librariesZlibrary_dirsZruntime_library_dirsZexport_symbolsr-r.r/Z
build_tempr:Zstartup_objZld_argsZdef_file�head�tail�modnamer4Ztemp_dir�contentsZsymZobjects2Z	resources�file�base�lr�libfiler5rrr�link�s|
















zBCPPCompiler.linkc	Csv|r"|d}|d|d||f}n|d|f}xB|D]6}x0|D](}tjj||j|��}tjj|�r>|Sq>Wq4WdSdS)NZ_dZ_bcpp)r"r#r@r8�exists)	r�dirsrr-ZdlibZ	try_names�dir�namerMrrrrE4s


zBCPPCompiler.find_library_filercCs�|dkrd}g}x�|D]�}tjjtjj|��\}}||jddgkrTtd||f��|rdtjj|�}|dkr�|jtjj|||��q|dkr�|jtjj||d��q|jtjj|||j	��qW|S)Nrz.rcz.resz"unknown file type '%s' (from '%s'))
r"r#rBrD�src_extensionsr�basenamerr@�
obj_extension)rZsource_filenamesZ	strip_dirr*Z	obj_namesZsrc_namerKr4rrr�object_filenamesNs"
zBCPPCompiler.object_filenamescCs�|jd||�\}}}t||�}dg|}	|dk	r>|	jd|�|rN||	dd�<|r\|	j|�|	j|�|js~|dks~t||�r�|r�|jtjj	|��y|j
|	�Wn2tk
r�}
zt|
�t
|
��WYdd}
~
XnXdS)Nz	cpp32.exez-or)Z_fix_compile_argsr	rr rrr%r"r#r&r'r�printr)r�sourceZoutput_filer+r,r.r/�_r1Zpp_argsr5rrr�
preprocessis$	



zBCPPCompiler.preprocess)rrr)NNNrNNN)NrN)
NNNNNrNNNN)r)rr)NNNNN)�__name__�
__module__�__qualname__�__doc__Z
compiler_typeZexecutablesr(r)rSrUZstatic_lib_extensionZshared_lib_extensionZstatic_lib_formatZshared_lib_formatZ
exe_extensionrr6r<rNrErVrZrrrrrsJ


B

|

r)r^r"Zdistutils.errorsrrrrrrZdistutils.ccompilerrr	r
Zdistutils.file_utilrZdistutils.dep_utilrZ	distutilsr
rrrrr�<module>s
 PKV[c��Խ4�4.__pycache__/_msvccompiler.cpython-36.opt-1.pycnu�[���3


 \KT�@s�dZddlZddlZddlZddlZddlZddlmZmZm	Z	m
Z
mZddlm
Z
mZddlmZddlmZddlmZdd	�Zd
d�Zdd
�Zdd�Zddd�Zddd�Zedg�ZGdd�de
�ZdS)adistutils._msvccompiler

Contains MSVCCompiler, an implementation of the abstract CCompiler class
for Microsoft Visual Studio 2015.

The module is compatible with VS 2015 and later. You can find legacy support
for older versions in distutils.msvc9compiler and distutils.msvccompiler.
�N)�DistutilsExecError�DistutilsPlatformError�CompileError�LibError�	LinkError)�	CCompiler�gen_lib_options)�log)�get_platform)�countc$Cs�ytjtjdtjtjBd�}Wntk
r<tjd�dSXd}d}|��x�t�D]�}ytj	||�\}}}Wntk
r�PYnX|rT|tj
krTtjj
|�rTytt|��}Wnttfk
r�wTYnX|dkrT||krT||}}qTWWdQRX||fS)Nz'Software\Microsoft\VisualStudio\SxS\VC7)�accesszVisual C++ is not registeredr�)NN)�winregZ	OpenKeyEx�HKEY_LOCAL_MACHINEZKEY_READZKEY_WOW64_32KEY�OSErrorr	�debugrZ	EnumValueZREG_SZ�os�path�isdir�int�float�
ValueError�	TypeError)�key�best_version�best_dir�i�v�vc_dirZvt�version�r �//usr/lib64/python3.6/distutils/_msvccompiler.py�_find_vc2015s0
r"c
s�ddl�ddl}d}d}g���fdd�}|j|d�}|j�|j�x��D]~\}}}}d|krLtjj|ddd�}	tjj|	�s�qLytd	d
�|j	d�D��}
Wnt
tfk
r�wLYnX|
|krL|
|	}}qLWy|d}Wntk
r�d}YnX||fS)
Nrcs�j�j��dS)N)�extend�findallr )�_distutils_findvs�all_packagesr r!�_getallDsz_find_vc2017.<locals>._getall)�targetz1Microsoft.VisualStudio.Component.VC.Tools.x86.x64ZVCZ	AuxiliaryZBuildcss|]}t|�VqdS)N)r)�.0rr r r!�	<genexpr>Psz_find_vc2017.<locals>.<genexpr>�.)r)
r%�	threadingZThread�start�joinrrr�tuple�splitrr�
IndexError)r,rrr'�t�nameZversion_strrZpackagesrrr )r%r&r!�_find_vc2017:s2
r4cCs
t�\}}d}d|krdnd}|rztjj|ddddddd	�}yd
dl}|j|dd�d}Wntttfk
rxd}YnX|s�t�\}}|r�tjj|d|dd	�}|s�t	j
d�dStjj|d�}tjj|�s�t	j
d|�dS|p�tjj|��rt	j
d|�d}||fS)N�amd64Zx64�x86z..ZredistZMSVCz**zMicrosoft.VC141.CRTzvcruntime140.dllrT)�	recursive�zMicrosoft.VC140.CRTz$No suitable Visual C++ version foundz
vcvarsall.batz%s cannot be found���)NN)NN)r4rrr.�glob�ImportErrorr�LookupErrorr"r	r�isfile)�	plat_specrr�	vcruntimeZvcruntime_platZvcredistr:�	vcvarsallr r r!�_find_vcvarsall[s6



rAcCs�tjd�rdd�tjj�D�St|�\}}|s6td��y&tjdj||�tj	d�j
ddd	�}Wn@tjk
r�}z"tj
|j�td
j|j���WYdd}~XnXdd�dd
�|j�D�D�}|r�||d<|S)NZDISTUTILS_USE_SDKcSsi|]\}}||j��qSr )�lower)r)r�valuer r r!�
<dictcomp>sz_get_vc_env.<locals>.<dictcomp>zUnable to find vcvarsall.batzcmd /u /c "{}" {} && set)�stderrzutf-16le�replace)�errorszError executing {}cSs$i|]\}}}|r|r||j��qSr )rB)r)r�_rCr r r!rD�scss|]}|jd�VqdS)�=N)�	partition)r)�liner r r!r*�sz_get_vc_env.<locals>.<genexpr>�py_vcruntime_redist)r�getenv�environ�itemsrAr�
subprocessZcheck_output�formatZSTDOUT�decodeZCalledProcessErrorr	�error�output�cmd�
splitlines)r>r@r?�out�exc�envr r r!�_get_vc_env}s(


rZcCsN|stjd�jtj�}x2|D]*}tjjtjj|�|�}tjj|�r|SqW|S)atReturn path to an MSVC executable program.

    Tries to find the program in several places: first, one of the
    MSVC program search paths from the registry; next, the directories
    in the PATH environment variable.  If any of those work, return an
    absolute path that is known to exist.  If none of them work, just
    return the original program name, 'exe'.
    r)rrMr0�pathseprr.�abspathr=)Zexe�paths�p�fnr r r!�	_find_exe�s	
r`r6Z	x86_amd64)Zwin32z	win-amd64zvcruntime140.dllc
s�eZdZdZdZiZdgZdddgZdgZdgZ	eeee	Z
d	Zd
ZdZ
dZd
ZZdZd*dd�Zd+dd�Zd,dd�Zd-dd�Zd.dd�Zd/dd�Zdd�Z�fd d!�Zd"d#�Zd$d%�Zd&d'�Zd0d(d)�Z�ZS)1�MSVCCompilerzwConcrete class that implements an interface to Microsoft Visual C++,
       as defined by the CCompiler abstract class.Zmsvcz.cz.ccz.cppz.cxxz.rcz.mcz.resz.objz.libz.dllz%s%sz.exercCs tj||||�d|_d|_dS)NF)r�__init__�	plat_name�initialized)�self�verboseZdry_runZforcer r r!rb�szMSVCCompiler.__init__NcCs>|dkrt�}|tkr(tdjtt����t|}t|�}|sDtd��|jdd�|_|jjt	j
�}td|�|_td|�|_
td|�|_td|�|_td	|�|_td
|�|_|jdd�|_x2|jdd�jt	j
�D]}|r�|j|jt	j��q�Wx6|jd
d�jt	j
�D]}|�r|j|jt	j���qWd|_dddddg|_|jj|j�rJdnd�ddddddg|_dddg}|j�s~|jd$�ddddg}|d%�|_|d&�|_|d'�|_|d(�|_|�|_ |�|_!t"j#df|jt"j#d"f|jt"j#d#f|jt"j$df|jt"j$d"f|jt"j$d#f|jt"j%df|j t"j%d"f|j t"j%d#f|j!i	|_&d#|_'dS))Nz--plat-name must be one of {}z7Unable to find a compatible Visual Studio installation.r�zcl.exezlink.exezlib.exezrc.exezmc.exezmt.exerL�include�libz/nologoz/Oxz/W3z/GLz/DNDEBUGz/MDz/MTz/Odz/MDdz/Ziz/D_DEBUGz/INCREMENTAL:NOz/LTCG�/nodefaultlib:libucrt.lib�ucrt.libz/DEBUG:FULL�/MANIFEST:EMBED,ID=1�/DLL�/MANIFEST:EMBED,ID=2�/MANIFESTUAC:NOFT)rjrk)rl)rl)rmrnro)rmrnro)(r
�PLAT_TO_VCVARSrrQr/rZ�get�_pathsr0rr[r`�cc�linkerri�rc�mcZmt�_vcruntime_redistZadd_include_dir�rstrip�sepZadd_library_dirZpreprocess_options�compile_options�append�compile_options_debugr#Zldflags_exeZldflags_exe_debugZldflags_sharedZldflags_shared_debugZldflags_staticZldflags_static_debugrZ
EXECUTABLEZ
SHARED_OBJECTZSHARED_LIBRARY�_ldflagsrd)rercr>Zvc_envr]�dir�ldflagsZ
ldflags_debugr r r!�
initialize�s`





zMSVCCompiler.initializergcsT�fdd��jD��fdd��j�jD����p4d����fdd�}tt||��S)Ncsi|]}�j|�qSr )�
obj_extension)r)�ext)rer r!rD8sz1MSVCCompiler.object_filenames.<locals>.<dictcomp>csi|]}�j|�qSr )�
res_extension)r)r�)rer r!rD9srgcs�tjj|�\}}�r"tjj|�}n2tjj|�\}}|jtjjtjjf�rT|dd�}ytjj�|�|�St	k
r�t
dj|���YnXdS)Nr8zDon't know how to compile {})rr�splitext�basename�
splitdrive�
startswithry�altsepr.r<rrQ)r^�baser�rH)�ext_map�
output_dir�	strip_dirr r!�
make_out_path>sz4MSVCCompiler.object_filenames.<locals>.make_out_path)�src_extensions�_rc_extensions�_mc_extensions�list�map)reZsource_filenamesr�r�r�r )r�r�rer�r!�object_filenames3s
zMSVCCompiler.object_filenamesc	Cs�|js|j�|j||||||�}	|	\}}
}}}|p6g}
|
jd�|rT|
j|j�n|
j|j�d}�x|
D�]}y||\}}Wntk
r�wlYnX|r�tj	j
|�}||jkr�d|}�nD||jkr�d|}d}�n*||j
k�rB|}d|}y|j|jg|||g�Wqltk
�r<}zt|��WYdd}~XqlXqln�||jk�r�tj	j|�}tj	j|�}y\|j|jd|d||g�tj	jtj	j|��\}}tj	j||d	�}|j|jd||g�Wqltk
�r�}zt|��WYdd}~XqlXqlntd
j||���|jg|
|}|�r$|jd�|j|�|jd|�|j|�y|j|�Wqltk
�r�}zt|��WYdd}~XqlXqlW|
S)
Nz/cFz/Tcz/TpTz/foz-hz-rz.rcz"Don't know how to compile {} to {}z/EHscz/Fo)rdr�Z_setup_compiler{r#r|rz�KeyErrorrrr\�
_c_extensions�_cpp_extensionsr��spawnrurrr��dirnamervr�r�r.rQrs)reZsourcesr�ZmacrosZinclude_dirsr�
extra_preargs�extra_postargsZdependsZcompile_info�objectsZpp_optsZbuildZcompile_optsZadd_cpp_opts�obj�srcr�Z	input_optZ
output_opt�msgZh_dirZrc_dirr�rHZrc_file�argsr r r!�compileTsn








zMSVCCompiler.compilec	Cs�|js|j�|j||�\}}|j||d�}|j||�r�|d|g}|rJy,tjd|jdj|��|j	|jg|�Wq�t
k
r�}zt|��WYdd}~Xq�Xntjd|�dS)N)r�z/OUT:zExecuting "%s" %s� zskipping %s (up-to-date))rdr��_fix_object_args�library_filename�
_need_linkr	rrir.r�rr)	rer�Zoutput_libnamer�r�target_lang�output_filenameZlib_argsr�r r r!�create_static_lib�szMSVCCompiler.create_static_libcCs�|js|j�|j||�\}}|j|||�}|\}}}|rL|jdt|��t||||�}|dk	rptjj	||�}|j
||��r�|j||	f}dd�|p�gD�}||||d|g}tjj|d�}|dk	�rtjj
tjj|��\}}tjj	||j|��}|jd|�|
�r|
|dd�<|�r.|j|�tjjtjj|��}|j|�y6tjd|jdj	|��|j|jg|�|j|�Wn,tk
�r�}zt|��WYdd}~XnXntjd	|�dS)
Nz5I don't know what to do with 'runtime_library_dirs': cSsg|]}d|�qS)z/EXPORT:r )r)Zsymr r r!�
<listcomp>�sz%MSVCCompiler.link.<locals>.<listcomp>z/OUT:rz/IMPLIB:zExecuting "%s" %sr�zskipping %s (up-to-date))rdr�r�Z
_fix_lib_args�warn�strrrrr.r�r}r�r�r�r�r{r#r\Zmkpathr	rrtr��_copy_vcruntimerr)reZtarget_descr�r�r�Z	librariesZlibrary_dirsZruntime_library_dirsZexport_symbolsrr�r�Z
build_tempr�Z
fixed_argsZlib_optsrZexport_optsZld_argsZdll_nameZdll_extZimplib_filer�r r r!�link�sN



zMSVCCompiler.linkcCs`|j}|stjj|�rdStjj|�j�tkr6dStjd|�t	j
||�}tj|tj
�dS)NzCopying "%s")rwrrr=r�rB�
_BUNDLED_DLLSr	r�shutil�copy�chmod�stat�S_IWRITE)rer�r?r r r!r�szMSVCCompiler._copy_vcruntimecs4tjd�}z|jtjd<t�j|�S|tjd<XdS)Nr)rrMrrrN�superr�)rerUZold_path)�	__class__r r!r�s

zMSVCCompiler.spawncCsd|S)Nz	/LIBPATH:r )rer~r r r!�library_dir_option&szMSVCCompiler.library_dir_optioncCstd��dS)Nz:don't know how to set runtime library search path for MSVC)r)rer~r r r!�runtime_library_dir_option)sz'MSVCCompiler.runtime_library_dir_optioncCs
|j|�S)N)r�)rerir r r!�library_option-szMSVCCompiler.library_optioncCs`|r|d|g}n|g}xB|D]6}x0|D](}tjj||j|��}tjj|�r(|Sq(WqWdSdS)NZ_d)rrr.r�r=)re�dirsrirZ	try_namesr~r3Zlibfiler r r!�find_library_file0s

zMSVCCompiler.find_library_file)rrr)N)rrg)NNNrNNN)NrN)
NNNNNrNNNN)r)�__name__�
__module__�__qualname__�__doc__Z
compiler_typeZexecutablesr�r�r�r�r�r�r�Zstatic_lib_extensionZshared_lib_extensionZstatic_lib_formatZshared_lib_formatZ
exe_extensionrbr�r�r�r�r�r�r�r�r�r�r��
__classcell__r r )r�r!ra�sN


T

[

9ra)N)r�rr�r�rPrZdistutils.errorsrrrrrZdistutils.ccompilerrrZ	distutilsr	Zdistutils.utilr
�	itertoolsrr"r4rArZr`rp�	frozensetr�rar r r r!�<module>s&!" 

PKV[�� ���&__pycache__/debug.cpython-36.opt-2.pycnu�[���3


 \��@sddlZejjd�ZdS)�NZDISTUTILS_DEBUG)�os�environ�get�DEBUG�rr�'/usr/lib64/python3.6/distutils/debug.py�<module>sPKV[a"�'__pycache__/archive_util.cpython-36.pycnu�[���3


 \F!� @sDdZddlZddlmZddlZyddlZWnek
rDdZYnXddlmZddl	m
Z
ddlmZddl
mZyddlmZWnek
r�dZYnXydd	lmZWnek
r�dZYnXd
d�Zdd
�Zd!dd�Zd"dd�Zed#gdfed$gdfed%gdfed&gdfed'gdfegdfd�Zdd�Zd(dd �ZdS))zodistutils.archive_util

Utility functions for creating archive files (tarballs, zip files,
that sort of thing).�N)�warn)�DistutilsExecError)�spawn)�mkpath)�log)�getpwnam)�getgrnamcCsNtdks|dkrdSyt|�}Wntk
r8d}YnX|dk	rJ|dSdS)z"Returns a gid, given a group name.N�)r�KeyError)�name�result�r
�./usr/lib64/python3.6/distutils/archive_util.py�_get_gids
rcCsNtdks|dkrdSyt|�}Wntk
r8d}YnX|dk	rJ|dSdS)z"Returns an uid, given a user name.Nr	)rr
)rrr
r
r�_get_uid+s
r�gzipcs.dddddd�}dddd	d
�}|dk	r:||j�kr:td��|d
}	|dkrZ|	|j|d�7}	ttjj|	�|d�ddl}
tj	d�t
���t�������fdd�}|s�|
j|	d||�}z|j
||d�Wd|j�X|dk�r*tdt�|	||}
tjdk�r||	|
g}n
|d|	g}t||d�|
S|	S)a=Create a (possibly compressed) tar file from all the files under
    'base_dir'.

    'compress' must be "gzip" (the default), "bzip2", "xz", "compress", or
    None.  ("compress" will be deprecated in Python 3.2)

    'owner' and 'group' can be used to define an owner and a group for the
    archive that is being built. If not provided, the current owner and group
    will be used.

    The output tar file will be named 'base_dir' +  ".tar", possibly plus
    the appropriate compression extension (".gz", ".bz2", ".xz" or ".Z").

    Returns the output filename.
    Zgz�bz2�xz�)r�bzip2rN�compressz.gzz.bz2z.xzz.Z)rrrrNzKbad value for 'compress': must be None, 'gzip', 'bzip2', 'xz' or 'compress'z.tarr)�dry_runrzCreating tar archivecs,�dk	r�|_�|_�dk	r(�|_�|_|S)N)�gidZgname�uid�uname)Ztarinfo)r�group�ownerrr
r�_set_uid_gidasz"make_tarball.<locals>._set_uid_gidzw|%s)�filterz'compress' will be deprecated.Zwin32z-f)�keys�
ValueError�getr�os�path�dirname�tarfiler�inforr�open�add�closer�PendingDeprecationWarning�sys�platformr)�	base_name�base_dirr�verboserrrZtar_compressionZcompress_extZarchive_namer%r�tarZcompressed_name�cmdr
)rrrrr�make_tarball7s<
	



r2cCs�|d}ttjj|�|d�tdkrp|r.d}nd}ytd|||g|d�Wn tk
rjtd|��YnX�n:tjd||�|�s�ytj	|d	tj
d
�}Wn&tk
r�tj	|d	tjd
�}YnX|tj
kr�tjjtjj|d��}|j||�tjd|�x�tj|�D]�\}}	}
x>|	D]6}tjjtjj||d��}|j||�tjd|��qWxJ|
D]B}tjjtjj||��}tjj|��rV|j||�tjd|��qVW�qW|j�|S)
avCreate a zip file from all the files under 'base_dir'.

    The output zip file will be named 'base_name' + ".zip".  Uses either the
    "zipfile" Python module (if available) or the InfoZIP "zip" utility
    (if installed and found on the default search path).  If neither tool is
    available, raises DistutilsExecError.  Returns the name of the output zip
    file.
    z.zip)rNz-rz-rq�zipzkunable to create zip file '%s': could neither import the 'zipfile' module nor find a standalone zip utilityz#creating '%s' and adding '%s' to it�w)Zcompressionrzadding '%s')rr"r#r$�zipfilerrrr&ZZipFileZZIP_DEFLATED�RuntimeErrorZ
ZIP_STORED�curdir�normpath�join�write�walk�isfiler))r-r.r/rZzip_filenameZ
zipoptionsr3r#�dirpathZdirnames�	filenamesrr
r
r�make_zipfilesJ	


r?rzgzip'ed tar-filerzbzip2'ed tar-filerzxz'ed tar-filezcompressed tar filezuncompressed tar filezZIP file)ZgztarZbztarZxztarZztarr0r3cCsx|D]}|tkr|SqWdS)zqReturns the first format from the 'format' list that is unknown.

    If all formats are known, returns None
    N)�ARCHIVE_FORMATS)Zformats�formatr
r
r�check_archive_formats�s
rBcCs�tj�}|dk	r6tjd|�tjj|�}|s6tj|�|dkrDtj}d|i}	yt|}
Wn t	k
rxt
d|��YnX|
d}x|
dD]\}}
|
|	|<q�W|dkr�||	d<||	d	<z|||f|	�}Wd|dk	r�tjd
|�tj|�X|S)a�Create an archive file (eg. zip or tar).

    'base_name' is the name of the file to create, minus any format-specific
    extension; 'format' is the archive format: one of "zip", "tar", "gztar",
    "bztar", "xztar", or "ztar".

    'root_dir' is a directory that will be the root directory of the
    archive; ie. we typically chdir into 'root_dir' before creating the
    archive.  'base_dir' is the directory where we start archiving from;
    ie. 'base_dir' will be the common prefix of all files and
    directories in the archive.  'root_dir' and 'base_dir' both default
    to the current directory.  Returns the name of the archive file.

    'owner' and 'group' are used when creating a tar archive. By default,
    uses the current owner and group.
    Nzchanging into '%s'rzunknown archive format '%s'r�r3rrzchanging back to '%s')r"�getcwdr�debugr#�abspath�chdirr7r@r
r )r-rAZroot_dirr.r/rrrZsave_cwd�kwargsZformat_info�func�arg�val�filenamer
r
r�make_archive�s2
rM)rrrNN)rr)rr)rr)rr)rr)rN)NNrrNN)�__doc__r"�warningsrr+r5�ImportErrorZdistutils.errorsrZdistutils.spawnrZdistutils.dir_utilrZ	distutilsr�pwdrZgrprrrr2r?r@rBrMr
r
r
r�<module>sB



G
=





PKV[W6�=��__pycache__/log.cpython-36.pycnu�[���3


 \��@sldZdZdZdZdZdZddlZGdd	�d	�Ze�Zej	Z	ej
Z
ejZejZej
Z
ejZd
d�Zdd
�ZdS)z,A simple log mechanism styled after PEP 282.������Nc@sPeZdZefdd�Zdd�Zdd�Zdd�Zd	d
�Zdd�Z	d
d�Z
dd�ZdS)�LogcCs
||_dS)N)�	threshold)�selfr�r
�%/usr/lib64/python3.6/distutils/log.py�__init__szLog.__init__cCs�|tttttfkr"tdt|���||jkr�|r8||}|tttfkrNtj	}ntj
}y|jd|�Wn:tk
r�|j
}|j|d�j|�}|jd|�YnX|j�dS)Nz%s wrong log levelz%s
�backslashreplace)�DEBUG�INFO�WARN�ERROR�FATAL�
ValueError�strr�sys�stderr�stdout�write�UnicodeEncodeError�encoding�encode�decode�flush)r	�level�msg�args�streamrr
r
r�_logs
zLog._logcGs|j|||�dS)N)r")r	rrr r
r
r�log'szLog.logcGs|jt||�dS)N)r"r)r	rr r
r
r�debug*sz	Log.debugcGs|jt||�dS)N)r"r)r	rr r
r
r�info-szLog.infocGs|jt||�dS)N)r"r)r	rr r
r
r�warn0szLog.warncGs|jt||�dS)N)r"r)r	rr r
r
r�error3sz	Log.errorcGs|jt||�dS)N)r"r)r	rr r
r
r�fatal6sz	Log.fatalN)�__name__�
__module__�__qualname__rrr"r#r$r%r&r'r(r
r
r
rrsrcCstj}|t_|S)N)�_global_logr)r�oldr
r
r�
set_thresholdAsr.cCs8|dkrtt�n"|dkr$tt�n|dkr4tt�dS)Nrrr)r.rrr)�vr
r
r�
set_verbosityGs

r0)�__doc__rrrrrrrr,r#r$r%r&r'r(r.r0r
r
r
r�<module>s +PKV[nQQ'__pycache__/bcppcompiler.cpython-36.pycnu�[���3


 \W:�@sxdZddlZddlmZmZmZmZmZmZddl	m
Z
mZmZddl
mZddlmZddlmZGdd	�d	e
�ZdS)
z�distutils.bcppcompiler

Contains BorlandCCompiler, an implementation of the abstract CCompiler class
for the Borland C++ compiler.
�N)�DistutilsExecError�DistutilsPlatformError�CompileError�LibError�	LinkError�UnknownFileError)�	CCompiler�gen_preprocess_options�gen_lib_options)�
write_file)�newer)�logc
@s�eZdZdZdZiZdgZdddgZeeZdZ	dZ
d	Zd
ZZ
dZdd
d�Zddd�Zddd�Zd dd�Zd!dd�Zd"dd�Zd#dd�ZdS)$�BCPPCompilerzConcrete class that implements an interface to the Borland C/C++
    compiler, as defined by the CCompiler abstract class.
    Zbcppz.cz.ccz.cppz.cxxz.objz.libz.dllz%s%sz.exercCs�tj||||�d|_d|_d|_d|_ddddg|_ddddg|_d	d
ddg|_d	d
ddg|_	g|_
d
ddg|_d
dddg|_dS)
Nz	bcc32.exezilink32.exeztlib.exez/tWMz/O2z/qz/g0z/Odz/Tpdz/Gnz/xz/r)
r�__init__�cc�linker�libZpreprocess_options�compile_options�compile_options_debug�ldflags_shared�ldflags_shared_debugZldflags_static�ldflags_exe�ldflags_exe_debug)�self�verboseZdry_run�force�r�./usr/lib64/python3.6/distutils/bcppcompiler.pyr5szBCPPCompiler.__init__Nc	Cs�|j||||||�\}}	}}
}|p$g}|jd�|rB|j|j�n|j|j��xD|	D�]:}
y||
\}}Wntk
r�wVYnXtjj|�}tjj|
�}
|j	tjj
|
��|dkr�qV|dk�ry|jdd|
|g�WqVtk
�r}zt
|��WYdd}~XqVXqV||jk�rd}n||jk�r,d}nd}d|
}y,|j|jg||
||g||g�WqVtk
�r�}zt
|��WYdd}~XqVXqVW|	S)	Nz-cz.resz.rcZbrcc32z-fo�z-Pz-o)Z_setup_compile�append�extendrr�KeyError�os�path�normpath�mkpath�dirname�spawnrr�
_c_extensions�_cpp_extensionsr)rZsources�
output_dir�macros�include_dirs�debug�
extra_preargs�extra_postargsZdepends�objects�pp_optsZbuildZcompile_opts�obj�src�ext�msgZ	input_optZ
output_optrrr�compileQsF

(zBCPPCompiler.compilec	Cs�|j||�\}}|j||d�}|j||�r~|dg|}|r:y|j|jg|�Wq�tk
rz}zt|��WYdd}~Xq�Xntjd|�dS)N)r*z/uzskipping %s (up-to-date))	�_fix_object_args�library_filename�
_need_linkr'rrrr
r-)	rr0Zoutput_libnamer*r-�target_lang�output_filenameZlib_argsr5rrr�create_static_lib�szBCPPCompiler.create_static_libc Cs�|j||�\}}|j|||�\}}}|r8tjdt|��|dk	rNtjj||�}|j||��r�|t	j
kr�d}|	r~|jdd�}q�|jdd�}n&d}|	r�|j
dd�}n|jdd�}|dkr�d}n�tjj|�\}}tjj|�\}}tjj|d�}tjj|d|�}dg}x&|�pgD]}|jd||f��qW|jt||fd	|�ttjj|�}|g}g}xF|D]>}tjjtjj|��\}}|d
k�r�|j|�n
|j|��qfWx$|D]}|jdtjj|���q�W|jd�|j|�|jd
|g�|jd�x<|D]4}|j|||	�}|dk�r(|j|�n
|j|��qW|jd�|jd�|jd
|g�|jd
�|j|�|
�r�|
|dd�<|�r�|j|�|jtjj|��y|j|jg|�Wn,tk
�r�}zt|��WYdd}~XnXntjd|�dS)Nz7I don't know what to do with 'runtime_library_dirs': %sZc0w32Zc0d32rrz%s.defZEXPORTSz  %s=_%sz
writing %sz.resz/L%sz/L.�,z,,Zimport32Zcw32mtzskipping %s (up-to-date)) r7Z
_fix_lib_argsr
�warn�strr"r#�joinr9rZ
EXECUTABLErrrr�split�splitextr&rZexecuter�mapr$�normcaser �find_library_filer%r'rrrr-) rZtarget_descr0r;r*Z	librariesZlibrary_dirsZruntime_library_dirsZexport_symbolsr-r.r/Z
build_tempr:Zstartup_objZld_argsZdef_file�head�tail�modnamer4Ztemp_dir�contentsZsymZobjects2Z	resources�file�base�lr�libfiler5rrr�link�s|
















zBCPPCompiler.linkc	Csv|r"|d}|d|d||f}n|d|f}xB|D]6}x0|D](}tjj||j|��}tjj|�r>|Sq>Wq4WdSdS)NZ_dZ_bcpp)r"r#r@r8�exists)	r�dirsrr-ZdlibZ	try_names�dir�namerMrrrrE4s


zBCPPCompiler.find_library_filercCs�|dkrd}g}x�|D]�}tjjtjj|��\}}||jddgkrTtd||f��|rdtjj|�}|dkr�|jtjj|||��q|dkr�|jtjj||d��q|jtjj|||j	��qW|S)Nrz.rcz.resz"unknown file type '%s' (from '%s'))
r"r#rBrD�src_extensionsr�basenamerr@�
obj_extension)rZsource_filenamesZ	strip_dirr*Z	obj_namesZsrc_namerKr4rrr�object_filenamesNs"
zBCPPCompiler.object_filenamescCs�|jd||�\}}}t||�}dg|}	|dk	r>|	jd|�|rN||	dd�<|r\|	j|�|	j|�|js~|dks~t||�r�|r�|jtjj	|��y|j
|	�Wn2tk
r�}
zt|
�t
|
��WYdd}
~
XnXdS)Nz	cpp32.exez-or)Z_fix_compile_argsr	rr rrr%r"r#r&r'r�printr)r�sourceZoutput_filer+r,r.r/�_r1Zpp_argsr5rrr�
preprocessis$	



zBCPPCompiler.preprocess)rrr)NNNrNNN)NrN)
NNNNNrNNNN)r)rr)NNNNN)�__name__�
__module__�__qualname__�__doc__Z
compiler_typeZexecutablesr(r)rSrUZstatic_lib_extensionZshared_lib_extensionZstatic_lib_formatZshared_lib_formatZ
exe_extensionrr6r<rNrErVrZrrrrrsJ


B

|

r)r^r"Zdistutils.errorsrrrrrrZdistutils.ccompilerrr	r
Zdistutils.file_utilrZdistutils.dep_utilrZ	distutilsr
rrrrr�<module>s
 PKV[�D�A�8�8'__pycache__/msvccompiler.cpython-36.pycnu�[���3


 \\�@s�dZddlZddlZddlmZmZmZmZmZddl	m
Z
mZmZddl
mZdZy,ddlZdZeZejZejZejZejZWnhek
r�y4ddlZddlZdZeZejZejZejZejZWnek
r�ejd�YnXYnXe�rejejej ej!fZ"d	d
�Z#dd�Z$d
d�Z%Gdd�d�Z&dd�Z'dd�Z(dd�Z)Gdd�de
�Z*e'�dk�r�ej+d�e*Z,ddl-m*Z*ddl-m&Z&dS)z�distutils.msvccompiler

Contains MSVCCompiler, an implementation of the abstract CCompiler class
for the Microsoft Visual Studio.
�N)�DistutilsExecError�DistutilsPlatformError�CompileError�LibError�	LinkError)�	CCompiler�gen_preprocess_options�gen_lib_options)�logFTz�Warning: Can't read registry to find the necessary compiler setting
Make sure that Python modules winreg, win32api or win32con are installed.cCsnyt||�}Wntk
r"dSXg}d}x<yt||�}Wntk
rRPYnX|j|�|d7}q.W|S)zReturn list of registry keys.Nr�)�RegOpenKeyEx�RegError�
RegEnumKey�append)�base�key�handle�L�i�k�r�./usr/lib64/python3.6/distutils/msvccompiler.py�	read_keys7s
rcCs�yt||�}Wntk
r"dSXi}d}xPyt||�\}}}Wntk
rXPYnX|j�}t|�|t|�<|d7}q.W|S)zXReturn dict of registry keys and values.

    All names are converted to lowercase.
    Nrr)rr
�RegEnumValue�lower�convert_mbcs)rrr�dr�name�value�typerrr�read_valuesHsr cCs:t|dd�}|dk	r6y|d�}Wntk
r4YnX|S)N�decode�mbcs)�getattr�UnicodeError)�sZdecrrrr]src@s,eZdZdd�Zdd�Zdd�Zdd�Zd	S)
�
MacroExpandercCsi|_|j|�dS)N)�macros�load_macros)�self�versionrrr�__init__gszMacroExpander.__init__cCs4x.tD]&}t||�}|r|||jd|<PqWdS)Nz$(%s))�HKEYSr r')r)Zmacro�pathrrrrrr�	set_macroks


zMacroExpander.set_macroc
Cs�d|}|jd|dd�|jd|dd�d}|jd|d	�y*|d
krX|jd|d�n|jd|d
�Wn*tk
r�}ztd��WYdd}~XnXd}x\tD]T}yt||�}Wntk
r�w�YnXt|d�}t|d||f�}	|	d|jd<q�WdS)Nz%Software\Microsoft\VisualStudio\%0.1fZVCInstallDirz	\Setup\VCZ
productdirZVSInstallDirz	\Setup\VSz Software\Microsoft\.NETFrameworkZFrameworkDirZinstallrootg@ZFrameworkSDKDirzsdkinstallrootv1.1ZsdkinstallrootaPython was built with Visual Studio 2003;
extensions must be built with a compiler than can generate compatible binaries.
Visual Studio 2003 was not found on this system. If you have Cygwin installed,
you can try compiling with MingW32, by passing "-c mingw32" to setup.py.z.Software\Microsoft\NET Framework Setup\Productrz%s\%sr*z$(FrameworkVersion))	r.�KeyErrorrr,rr
rr r')
r)r*ZvsbaseZnet�exc�pr�hrrrrrr(rs*

zMacroExpander.load_macroscCs(x"|jj�D]\}}|j||�}qW|S)N)r'�items�replace)r)r%r�vrrr�sub�szMacroExpander.subN)�__name__�
__module__�__qualname__r+r.r(r6rrrrr&fsr&cCs�d}tjj|�}|dkrdS|t|�}tj|d�jdd�\}}t|dd��d}|dkrf|d7}t|dd��d	}|dkr�d
}|dkr�||SdS)
z�Return the version of MSVC that was used to build Python.

    For Python 2.3 and up, the version number is included in
    sys.version.  For earlier versions, assume the compiler is MSVC 6.
    zMSC v.r�N� ��
�g$@r������)�sysr*�find�len�split�int)�prefixrr%�restZmajorVersionZminorVersionrrr�get_build_version�srHcCs@d}tjj|�}|dkrdStjjd|�}tj|t|�|�S)zaReturn the processor architecture.

    Possible results are "Intel", "Itanium", or "AMD64".
    z bit (r�Intel�)r?)rAr*rBrC)rFr�jrrr�get_build_architecture�srLcCs4g}x*|D]"}tjj|�}||kr
|j|�q
W|S)znReturn a list of normalized paths with duplicates removed.

    The current order of paths is maintained.
    )�osr-�normpathr)�pathsZ
reduced_pathsr1Znprrr�normalize_and_reduce_paths�s
rPc
@s�eZdZdZdZiZdgZdddgZdgZdgZ	eeee	Z
d	Zd
ZdZ
dZd
ZZdZd-dd�Zdd�Zd.dd�Zd/dd�Zd0dd�Zd1dd�Zdd�Zd d!�Zd"d#�Zd2d$d%�Zd&d'�Zd3d)d*�Zd+d,�ZdS)4�MSVCCompilerzwConcrete class that implements an interface to Microsoft Visual C++,
       as defined by the CCompiler abstract class.Zmsvcz.cz.ccz.cppz.cxxz.rcz.mcz.resz.objz.libz.dllz%s%sz.exercCsvtj||||�t�|_t�|_|jdkr\|jdkrHd|_t|j�|_nd|_d|j|_	nd|jd|_	d|_
dS)	NrI�zSoftware\Microsoft\VisualStudiozSoftware\Microsoft\DevstudiozVisual Studio version %szMicrosoft SDK compiler %sr:F)rr+rH�_MSVCCompiler__versionrL�_MSVCCompiler__arch�_MSVCCompiler__rootr&�_MSVCCompiler__macros�_MSVCCompiler__product�initialized)r)�verboseZdry_runZforcerrrr+�s

zMSVCCompiler.__init__cCs�g|_dtjkrDdtjkrD|jd�rDd|_d|_d|_d|_d|_nx|j	d�|_t
|j�d	krltd
|j��|jd�|_|jd�|_|jd�|_|jd�|_|jd�|_|j
d�|j
d�y*x$tjdjd
�D]}|jj|�q�WWntk
r�YnXt|j�|_d
j|j�tjd<d|_|jdk�rTddddddg|_dddddddg|_n&ddddddg|_dddddddg|_dddg|_|jdk�r�ddddg|_ndddddg|_dg|_d |_dS)!NZDISTUTILS_USE_SDKZMSSdkzcl.exezlink.exezlib.exezrc.exezmc.exer-rzxPython was built with %s, and extensions need to be built with the same version of the compiler, but it isn't installed.�lib�include�;rIz/nologoz/Oxz/MDz/W3z/GXz/DNDEBUGz/Odz/MDdz/Z7z/D_DEBUGz/GS-z/DLLz/INCREMENTAL:NOrRz/INCREMENTAL:noz/DEBUGz	/pdb:NoneT)�_MSVCCompiler__pathsrM�environ�find_exe�cc�linkerrZ�rc�mc�get_msvc_pathsrCrrW�set_path_env_varrDrr/rP�joinZpreprocess_optionsrT�compile_options�compile_options_debug�ldflags_sharedrS�ldflags_shared_debugZldflags_staticrX)r)r1rrr�
initialize�sR







zMSVCCompiler.initialize�cCs�|dkrd}g}x�|D]�}tjj|�\}}tjj|�d}|tjj|�d�}||jkrdtd|��|rttjj|�}||jkr�|j	tjj
|||j��q||jkr�|j	tjj
|||j��q|j	tjj
|||j
��qW|S)NrlrzDon't know how to compile %s)rMr-�splitext�
splitdrive�isabs�src_extensionsr�basename�_rc_extensionsrrf�
res_extension�_mc_extensions�
obj_extension)r)Zsource_filenamesZ	strip_dir�
output_dirZ	obj_namesZsrc_namer�extrrr�object_filenames8s(



zMSVCCompiler.object_filenamesNc	Cst|js|j�|j||||||�}	|	\}}
}}}|p6g}
|
jd�|rT|
j|j�n|
j|j��x|
D�]}y||\}}Wntk
r�whYnX|r�tj	j
|�}||jkr�d|}�nT||jkr�d|}�n>||j
k�r>|}d|}y"|j|jg||g|g�Wqhtk
�r8}zt|��WYdd}~XqhXqhn�||jk�rtj	j|�}tj	j|�}yl|j|jgd|d|g|g�tj	jtj	j|��\}}tj	j||d�}|j|jgd|g|g�Wqhtk
�r�}zt|��WYdd}~XqhXqhntd||f��d	|}y&|j|jg|
|||g|�Wqhtk
�rj}zt|��WYdd}~XqhXqhW|
S)
Nz/cz/Tcz/Tpz/foz-hz-rz.rcz"Don't know how to compile %s to %sz/Fo)rXrkZ_setup_compiler�extendrhrgr/rMr-�abspath�
_c_extensions�_cpp_extensionsrr�spawnrbrrrt�dirnamercrmrqrfr`)r)Zsourcesrvr'Zinclude_dirs�debug�
extra_preargs�extra_postargsZdependsZcompile_info�objectsZpp_optsZbuildZcompile_opts�obj�srcrwZ	input_optZ
output_opt�msgZh_dirZrc_dirr�_Zrc_filerrr�compileWsj




zMSVCCompiler.compilec	Cs�|js|j�|j||�\}}|j||d�}|j||�r�|d|g}|rJy|j|jg|�Wq�tk
r�}zt|��WYdd}~Xq�Xnt	j
d|�dS)N)rvz/OUT:zskipping %s (up-to-date))rXrk�_fix_object_args�library_filename�
_need_linkr}rZrrr
r)	r)r�Zoutput_libnamervr�target_lang�output_filenameZlib_argsr�rrr�create_static_lib�szMSVCCompiler.create_static_libcCs�|js|j�|j||�\}}|j|||�}|\}}}|rL|jdt|��t||||�}|dk	rptjj	||�}|j
||��r�|tjkr�|	r�|j
dd�}q�|jdd�}n|	r�|j
}n|j}g}x|p�gD]}|jd|�q�W||||d|g}|dk	�rLtjjtjj|��\}}tjj	tjj|d�|j|��}|jd|�|
�r^|
|dd�<|�rn|j|�|jtjj|��y|j|jg|�Wn,tk
�r�}zt|��WYdd}~XnXntjd|�dS)Nz5I don't know what to do with 'runtime_library_dirs': rz/EXPORT:z/OUT:rz/IMPLIB:zskipping %s (up-to-date))rXrkr�Z
_fix_lib_args�warn�strr	rMr-rfr�rZ
EXECUTABLErjrirrmrqr~r�ryZmkpathr}rarrr
r)r)Ztarget_descr�r�rvZ	librariesZlibrary_dirsZruntime_library_dirsZexport_symbolsrr�r�Z
build_tempr�Z
fixed_argsZlib_optsZldflagsZexport_optsZsymZld_argsZdll_nameZdll_extZimplib_filer�rrr�link�sV



zMSVCCompiler.linkcCsd|S)Nz	/LIBPATH:r)r)�dirrrr�library_dir_optionszMSVCCompiler.library_dir_optioncCstd��dS)Nz<don't know how to set runtime library search path for MSVC++)r)r)r�rrr�runtime_library_dir_optionsz'MSVCCompiler.runtime_library_dir_optioncCs
|j|�S)N)r�)r)rZrrr�library_optionszMSVCCompiler.library_optioncCs`|r|d|g}n|g}xB|D]6}x0|D](}tjj||j|��}tjj|�r(|Sq(WqWdSdS)NZ_d)rMr-rfr��exists)r)�dirsrZrZ	try_namesr�rZlibfilerrr�find_library_file#s

zMSVCCompiler.find_library_filecCszx4|jD]*}tjjtjj|�|�}tjj|�r|SqWx>tjdjd�D]*}tjjtjj|�|�}tjj|�rH|SqHW|S)a�Return path to an MSVC executable program.

        Tries to find the program in several places: first, one of the
        MSVC program search paths from the registry; next, the directories
        in the PATH environment variable.  If any of those work, return an
        absolute path that is known to exist.  If none of them work, just
        return the original program name, 'exe'.
        ZPathr\)r]rMr-rfrz�isfiler^rD)r)Zexer1�fnrrrr_5s	zMSVCCompiler.find_exe�x86cCs�tsgS|d}|jdkr,d|j|jf}nd|j|f}xHtD]@}t||�}|r@|jdkrr|jj||�jd�S||jd�Sq@W|jdkr�x,tD]$}t|d|j�dk	r�|jd	�Pq�WgS)
z�Get a list of devstudio directories (include, lib or path).

        Return a list of strings.  The list will be empty if unable to
        access the registry or appropriate registry keys not found.
        z dirsrRz6%s\%0.1f\VC\VC_OBJECTS_PLATFORM_INFO\Win32\Directoriesz?%s\6.0\Build System\Components\Platforms\Win32 (%s)\Directoriesr\r:z%s\6.0Nz�It seems you have Visual Studio 6 installed, but the expected registry settings are not present.
You must at least run the Visual Studio GUI once so that these entries are created.)	�
_can_read_regrSrUr,r rVr6rDr�)r)r-�platformrrrrrrrdKs(






zMSVCCompiler.get_msvc_pathscCs6|dkr|jd�}n
|j|�}|r2dj|�tj|<dS)z�Set environment variable 'name' to an MSVC path type value.

        This is equivalent to a SET command prior to execution of spawned
        commands.
        rZZlibraryr\N)rdrfrMr^)r)rr1rrrreos

zMSVCCompiler.set_path_env_var)rrr)rrl)NNNrNNN)NrN)
NNNNNrNNNN)r)r�)r7r8r9�__doc__Z
compiler_typeZexecutablesr{r|rrrtrprsruZstatic_lib_extensionZshared_lib_extensionZstatic_lib_formatZshared_lib_formatZ
exe_extensionr+rkrxr�r�r�r�r�r�r�r_rdrerrrrrQ�sP

B

V

F

$rQg @z3Importing new compiler from distutils.msvc9compiler)rQ)r&).r�rArMZdistutils.errorsrrrrrZdistutils.ccompilerrrr	Z	distutilsr
r��winregZhkey_modZ	OpenKeyExrZEnumKeyrZ	EnumValuer�errorr
�ImportErrorZwin32apiZwin32con�infoZ
HKEY_USERS�HKEY_CURRENT_USER�HKEY_LOCAL_MACHINEZHKEY_CLASSES_ROOTr,rr rr&rHrLrPrQrZOldMSVCCompilerZdistutils.msvc9compilerrrrr�<module>s^


	-
9
PKV[f�Y
&&$__pycache__/extension.cpython-36.pycnu�[���3


 \)�@s.dZddlZddlZGdd�d�Zdd�ZdS)zmdistutils.extension

Provides the Extension class, used to describe C/C++ extension
modules in setup scripts.�Nc@s"eZdZdZddd�Zdd�ZdS)�	Extensiona�Just a collection of attributes that describes an extension
    module and everything needed to build it (hopefully in a portable
    way, but there are hooks that let you be as unportable as you need).

    Instance attributes:
      name : string
        the full name of the extension, including any packages -- ie.
        *not* a filename or pathname, but Python dotted name
      sources : [string]
        list of source filenames, relative to the distribution root
        (where the setup script lives), in Unix form (slash-separated)
        for portability.  Source files may be C, C++, SWIG (.i),
        platform-specific resource files, or whatever else is recognized
        by the "build_ext" command as source for a Python extension.
      include_dirs : [string]
        list of directories to search for C/C++ header files (in Unix
        form for portability)
      define_macros : [(name : string, value : string|None)]
        list of macros to define; each macro is defined using a 2-tuple,
        where 'value' is either the string to define it to or None to
        define it without a particular value (equivalent of "#define
        FOO" in source or -DFOO on Unix C compiler command line)
      undef_macros : [string]
        list of macros to undefine explicitly
      library_dirs : [string]
        list of directories to search for C/C++ libraries at link time
      libraries : [string]
        list of library names (not filenames or paths) to link against
      runtime_library_dirs : [string]
        list of directories to search for C/C++ libraries at run time
        (for shared extensions, this is when the extension is loaded)
      extra_objects : [string]
        list of extra files to link with (eg. object files not implied
        by 'sources', static library that must be explicitly specified,
        binary resource files, etc.)
      extra_compile_args : [string]
        any extra platform- and compiler-specific information to use
        when compiling the source files in 'sources'.  For platforms and
        compilers where "command line" makes sense, this is typically a
        list of command-line arguments, but for other platforms it could
        be anything.
      extra_link_args : [string]
        any extra platform- and compiler-specific information to use
        when linking object files together to create the extension (or
        to create a new static Python interpreter).  Similar
        interpretation as for 'extra_compile_args'.
      export_symbols : [string]
        list of symbols to be exported from a shared extension.  Not
        used on all platforms, and not generally necessary for Python
        extensions, which typically export exactly one symbol: "init" +
        extension_name.
      swig_opts : [string]
        any extra options to pass to SWIG if a source file has the .i
        extension.
      depends : [string]
        list of files that the extension depends on
      language : string
        extension language (i.e. "c", "c++", "objc"). Will be detected
        from the source extensions if not provided.
      optional : boolean
        specifies that a build failure in the extension should not abort the
        build process, but simply not install the failing extension.
    NcKst|t�std��t|t�o,tdd�|D��s6td��||_||_|pHg|_|pRg|_|p\g|_	|pfg|_
|ppg|_|pzg|_|	p�g|_
|
p�g|_|p�g|_|p�g|_|
p�g|_|p�g|_||_||_t|�dk�rdd�|D�}djt|��}d	|}tj|�dS)
Nz'name' must be a stringcss|]}t|t�VqdS)N)�
isinstance�str)�.0�v�r�+/usr/lib64/python3.6/distutils/extension.py�	<genexpr>jsz%Extension.__init__.<locals>.<genexpr>z#'sources' must be a list of stringsrcSsg|]}t|��qSr)�repr)rZoptionrrr�
<listcomp>�sz&Extension.__init__.<locals>.<listcomp>z, zUnknown Extension options: %s)rr�AssertionError�list�all�name�sources�include_dirs�
define_macros�undef_macros�library_dirs�	libraries�runtime_library_dirs�
extra_objects�extra_compile_args�extra_link_args�export_symbols�	swig_opts�depends�language�optional�len�join�sorted�warnings�warn)�selfrrrrrrrrrrrrrrrr�kwZoptions�msgrrr�__init__Vs4













zExtension.__init__cCsd|jj|jj|jt|�fS)Nz<%s.%s(%r) at %#x>)�	__class__�
__module__�__qualname__r�id)r$rrr�__repr__�s
zExtension.__repr__)NNNNNNNNNNNNNN)�__name__r)r*�__doc__r'r,rrrrrs ?
!rcCs�ddlm}m}m}ddlm}ddlm}||�}||dddddd�}�zhg}�x\|j�}	|	dkrfP|j	|	�rrqT|	d|	d$ko�dknr�|j
d	|	�qT||	|�}	||	�}
|
d}t|g�}d}
�x�|
dd�D�]�}|
dk	r�|
j|�d}
q�t
jj|�d}|dd
�}|d
d�}|d%k�r8|jj|�q�|dk�rP|jj|�q�|dk�r�|jd�}|d&k�r�|jj|df�n$|jj|d|�||d
d�f�q�|dk�r�|jj|�q�|dk�r�|jj|�q�|dk�r�|jj|�q�|dk�r|jj|�q�|dk�r|jj|�q�|dk�r0|j}
q�|dk�rB|j}
q�|dk�rT|j}
q�|dk�rx|jj|�|�s�|j}
q�|d'k�r�|jj|�q�|j
d#|�q�W|j|�qTWWd|j�X|S)(z3Reads a Setup file and returns Extension instances.r)�parse_makefile�expand_makefile_vars�_variable_rx)�TextFile)�split_quoted�)Zstrip_commentsZskip_blanksZ
join_linesZ	lstrip_wsZ	rstrip_wsN�*z'%s' lines not handled yet��.c�.cc�.cpp�.cxx�.c++�.m�.mmz-Iz-D�=z-Uz-Cz-lz-Lz-Rz-rpathz-Xlinkerz
-Xcompilerz-u�.a�.so�.sl�.o�.dylibzunrecognized argument '%s'���)r7r8r9r:r;r<r=rD)r?r@rArBrC)Zdistutils.sysconfigr/r0r1Zdistutils.text_filer2Zdistutils.utilr3�readline�matchr#r�append�os�path�splitextrr�findrrrrrrrr�close)�filenamer/r0r1r2r3�vars�file�
extensions�lineZwords�moduleZextZappend_next_wordZword�suffixZswitch�valueZequalsrrr�read_setup_file�s�

 


















rU)r.rHr"rrUrrrr�<module>szPKV[���ƥ���__pycache__/dist.cpython-36.pycnu�[���3


 \��@s�dZddlZddlZddlZddlmZyddlZWnek
rLdZYnXddlTddl	m
Z
mZddlm
Z
mZmZddlmZddlmZejd	�ZGd
d�d�ZGdd
�d
�Zdd�ZdS)z}distutils.dist

Provides the Distribution class, which represents the module distribution
being built/installed/distributed.
�N)�message_from_file)�*)�FancyGetopt�translate_longopt)�
check_environ�	strtobool�
rfc822_escape)�log)�DEBUGz^[a-zA-Z]([a-zA-Z0-9_]*)$c@speZdZdZd~dd�d�d�gZdZd�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�gZd>d?�eD�ZddiZd�d@dA�Z	dBdC�Z
d�dEdF�ZdGdH�Zd�dIdJ�Z
dKdL�ZdMdN�ZdOdP�ZdQdR�ZddgfdSdT�ZdUdV�ZdWdX�ZdYdZ�Zd[d\�Zd]d^�Zd_d`�Zd�dadb�Zd�dcdd�Zd�dfdg�Zejfdhdi�Zdjdk�Zdldm�Z dndo�Z!dpdq�Z"drds�Z#dtdu�Z$dvdw�Z%dxdy�Z&dzd{�Z'd|d}�Z(dS)��Distributiona�The core of the Distutils.  Most of the work hiding behind 'setup'
    is really done within a Distribution instance, which farms the work out
    to the Distutils commands specified on the command line.

    Setup scripts will almost never instantiate Distribution directly,
    unless the 'setup()' function is totally inadequate to their needs.
    However, it is conceivable that a setup script might wish to subclass
    Distribution for some specialized purpose, and then pass the subclass
    to 'setup()' as the 'distclass' keyword argument.  If so, it is
    necessary to respect the expectations that 'setup' has of Distribution.
    See the code for 'setup()', in core.py, for details.
    �verbose�v�run verbosely (default)��quiet�q�!run quietly (turns verbosity off)�dry-run�n�don't actually do anything�help�h�show detailed help message�no-user-cfgN�-ignore pydistutils.cfg in your home directoryz�Common commands: (see '--help-commands' for more)

  setup.py build      will build the package underneath 'build/'
  setup.py install    will install the package
�
help-commands�list all available commands�name�print package name�version�V�print package version�fullname�print <package name>-<version>�author�print the author's name�author-email� print the author's email address�
maintainer�print the maintainer's name�maintainer-email�$print the maintainer's email address�contact�7print the maintainer's name if known, else the author's�
contact-email�@print the maintainer's email address if known, else the author's�url�print the URL for this package�license� print the license of the package�licence�alias for --license�description�print the package description�long-description�"print the long package description�	platforms�print the list of platforms�classifiers�print the list of classifiers�keywords�print the list of keywords�provides�+print the list of packages/modules provided�requires�+print the list of packages/modules required�	obsoletes�0print the list of packages/modules made obsoletecCsg|]}t|d��qS)r)r)�.0�x�rH�&/usr/lib64/python3.6/distutils/dist.py�
<listcomp>sszDistribution.<listcomp>cCs�d|_d|_d|_x|jD]}t||d�qWt�|_x,|jjD] }d|}t||t|j|��q@Wi|_	d|_
d|_d|_i|_
g|_d|_i|_d|_d|_d|_d|_d|_d|_d|_d|_d|_d|_d|_i|_i|_|�r8|jd�}|dk	�rH|d=xD|j�D]8\}}|j |�}x"|j�D]\}	}
d|
f||	<�q(W�qWd|k�r�|d|d	<|d=d
}t!dk	�r~t!j"|�nt#j$j%|d�x�|j�D]�\}}
t&|jd|��r�t|jd|�|
�njt&|j|��r�t|j||
�nLt&||��rt|||
�n2d
t'|�}t!dk	�r"t!j"|�nt#j$j%|d��q�Wd|_(|jdk	�r|x0|jD]&}
|
j)d��sdP|
dk�rRd|_(P�qRW|j*�dS)a0Construct a new Distribution instance: initialize all the
        attributes of a Distribution, and then use 'attrs' (a dictionary
        mapping attribute names to values) to assign some of those
        attributes their "real" values.  (Any attributes not mentioned in
        'attrs' will be assigned to some null value: 0, None, an empty list
        or dictionary, etc.)  Most importantly, initialize the
        'command_obj' attribute to the empty dictionary; this will be
        filled in with real command objects by 'parse_command_line()'.
        rr�get_N��optionszsetup scriptr4r2z:'licence' distribution option is deprecated; use 'license'�
Zset_zUnknown distribution option: %sT�-z
--no-user-cfgF)+r�dry_runr�display_option_names�setattr�DistributionMetadata�metadata�_METHOD_BASENAMES�getattr�cmdclass�command_packages�script_name�script_args�command_optionsZ
dist_files�packagesZpackage_dataZpackage_dir�
py_modules�	libraries�headers�ext_modulesZext_packageZinclude_dirsZ
extra_path�scripts�
data_filesZpassword�command_obj�have_run�get�items�get_option_dict�warnings�warn�sys�stderr�write�hasattr�repr�
want_user_cfg�
startswith�finalize_options)�self�attrs�attr�basenameZmethod_namerM�commandZcmd_options�opt_dict�opt�val�msg�key�argrHrHrI�__init__zs�






zDistribution.__init__cCs&|jj|�}|dkr"i}|j|<|S)z�Get the option dictionary for a given command.  If that
        command's option dictionary hasn't been created yet, then create it
        and return the new dictionary; otherwise, return the existing
        option dictionary.
        N)r[re)rrrv�dictrHrHrIrgszDistribution.get_option_dictrLc	Cs�ddlm}|dkr"t|jj��}|dk	r@|j||�|d}|sV|j|d�dSxt|D]l}|jj|�}|dkr�|j|d|�q\|j|d|�||�}x$|jd�D]}|j|d|�q�Wq\WdS)Nr)�pformatz  zno commands known yetzno option dict for '%s' commandzoption dict for '%s' command:rN)�pprintr�sortedr[�keys�announcere�split)	rr�header�commands�indentrZcmd_namerw�out�linerHrHrI�dump_option_dicts&s&
zDistribution.dump_option_dictscCs�g}t�tjjtjdj�}tjj|d�}tjj|�rB|j	|�tj
dkrRd}nd}|jr�tjjtjjd�|�}tjj|�r�|j	|�d}tjj|�r�|j	|�t
r�|jdd	j|��|S)
a�Find as many configuration files as should be processed for this
        platform, and return a list of filenames in the order in which they
        should be parsed.  The filenames returned are guaranteed to exist
        (modulo nasty race conditions).

        There are three possible config files: distutils.cfg in the
        Distutils installation directory (ie. where the top-level
        Distutils __inst__.py file lives), a file in the user's home
        directory named .pydistutils.cfg on Unix and pydistutils.cfg
        on Windows/Mac; and setup.cfg in the current directory.

        The file in the user's home directory can be disabled with the
        --no-user-cfg option.
        �	distutilsz
distutils.cfg�posixz.pydistutils.cfgzpydistutils.cfg�~z	setup.cfgzusing config files: %sz, )r�os�path�dirnamerj�modules�__file__�join�isfile�appendrro�
expanduserr
r�)rr�filesZsys_dirZsys_fileZ
user_filenameZ	user_fileZ
local_filerHrHrI�find_config_filesBs&



zDistribution.find_config_filescCs�ddlm}tjtjkr8ddddddd	d
ddd
ddg
}ng}t|�}|dkrT|j�}trb|jd�|�}x�|D]�}tr�|jd|�|j	|�xf|j
�D]Z}|j|�}|j|�}x@|D]8}	|	dkr�|	|kr�|j
||	�}
|	jdd�}	||
f||	<q�Wq�W|j�qnWd|jk�r�x�|jdj�D]�\}	\}}
|jj
|	�}yF|�rRt||t|
��n(|	dk�rnt||	t|
��nt||	|
�Wn,tk
�r�}
zt|
��WYdd}
~
XnX�qWdS)Nr)�ConfigParserzinstall-basezinstall-platbasezinstall-libzinstall-platlibzinstall-purelibzinstall-headerszinstall-scriptszinstall-data�prefixzexec-prefix�home�user�rootz"Distribution.parse_config_files():z  reading %s�__name__rO�_�globalrrP)rrP)Zconfigparserr�rjr��base_prefix�	frozensetr�r
r��readZsectionsrMrgre�replacer}r[rf�negative_optrRr�
ValueError�DistutilsOptionError)rr�	filenamesr�Zignore_options�parser�filenameZsectionrMrwrxry�src�aliasrzrHrHrI�parse_config_filesrsJ






zDistribution.parse_config_filescCs�|j�}g|_t||j�}|j|j�|jddi�|j|j|d�}|j	�}t
j|j�|j
|�rhdSx |r�|j||�}|dkrjdSqjW|jr�|j|t|j�dk|jd�dS|js�td��dS)	a�Parse the setup script's command line, taken from the
        'script_args' instance attribute (which defaults to 'sys.argv[1:]'
        -- see 'setup()' in core.py).  This list is first processed for
        "global options" -- options that set attributes of the Distribution
        instance.  Then, it is alternately scanned for Distutils commands
        and options for that command.  Each new command terminates the
        options for the previous command.  The allowed options for a
        command are determined by the 'user_options' attribute of the
        command class -- thus, we have to be able to load command classes
        in order to parse the command line.  Any error in that 'options'
        attribute raises DistutilsGetoptError; any error on the
        command-line raises DistutilsArgError.  If no Distutils commands
        were found on the command line, raises DistutilsArgError.  Return
        true if command-line was successfully parsed and we should carry
        on with executing commands; false if no errors but we shouldn't
        execute commands (currently, this only happens if user asks for
        help).
        r4r2)�args�objectNr)�display_optionsr�zno commands suppliedT)�_get_toplevel_optionsr�rr��set_negative_aliasesr�Zset_aliases�getoptrZZget_option_orderr	Z
set_verbosityr�handle_display_options�_parse_command_optsr�
_show_help�len�DistutilsArgError)rrZtoplevel_optionsr�r��option_orderrHrHrI�parse_command_line�s,	

zDistribution.parse_command_linecCs|jdgS)z�Return the non-display options recognized at the top level.

        This includes options that are recognized *only* at the top
        level as well as options recognized for commands.
        �command-packages=N�0list of packages that provide distutils commands)r�Nr�)�global_options)rrrHrHrIr��sz"Distribution._get_toplevel_optionscCsddlm}|d}tj|�s*td|��|jj|�y|j|�}Wn*tk
rn}zt	|��WYdd}~XnXt
||�s�td|��t|d�o�t
|jt�s�d}t||��|j}t|d�r�|j�}|j|j�t|d	�r�t
|jt�r�t|j�}ng}|j|j|j|�|j|�|j|d
d��\}}	t|	d��rV|	j�rV|j|d|gd�dSt|d	��r�t
|jt��r�d}
xP|jD]F\}}}
}t|	|j|���r|d
}
t|��r�|�ntd
||f���q|W|
�r�dS|j|�}x&t|	�j�D]\}}d|f||<�q�W|S)a�Parse the command-line options for a single command.
        'parser' must be a FancyGetopt instance; 'args' must be the list
        of arguments, starting with the current command (whose options
        we are about to parse).  Returns a new version of 'args' with
        the next command at the front of the list; will be the empty
        list if there are no more commands on the command line.  Returns
        None if the user asked for help on this command.
        r)�Commandzinvalid command name '%s'Nz&command class %s must subclass Command�user_optionszIcommand class %s must provide 'user_options' attribute (a list of tuples)r��help_optionsrr)r�r�zYinvalid help function %r for help option '%s': must be a callable object (function, etc.)zcommand line) �
distutils.cmdr��
command_re�match�
SystemExitr�r��get_command_class�DistutilsModuleErrorr��
issubclassZDistutilsClassErrorrm�
isinstancer��listr��copy�updater��fix_help_options�set_option_tabler�r�r�rr�Z
get_attr_name�callablerg�varsrf)rrr�r�r�rvZ	cmd_classrzr�r�ZoptsZhelp_option_foundZhelp_optionZshortZdesc�funcrwr�valuerHrHrIr��sb










z Distribution._parse_command_optscCsTxNdD]F}t|j|�}|dkr qt|t�rdd�|jd�D�}t|j||�qWdS)z�Set final values for all the options on the Distribution
        instance, analogous to the .finalize_options() method of Command
        objects.
        r>r:NcSsg|]}|j��qSrH)�strip)rFZelmrHrHrIrJ_sz1Distribution.finalize_options.<locals>.<listcomp>�,)r>r:)rVrTr��strr�rR)rrrtr�rHrHrIrqUs

zDistribution.finalize_optionsc
Csddlm}ddlm}|rR|r*|j�}n|j}|j|�|j|jd�t	d�|rt|j|j
�|jd�t	d�x�|jD]z}t|t
�r�t||�r�|}	n
|j|�}	t|	d�r�t|	jt�r�|j|	jt|	j��n|j|	j�|jd	|	j�t	d�q|Wt	||j��d
S)abShow help for the setup script command-line in the form of
        several lists of command-line options.  'parser' should be a
        FancyGetopt instance; do not expect it to be returned in the
        same state, as its option table will be reset to make it
        generate the correct help text.

        If 'global_options' is true, lists the global options:
        --verbose, --dry-run, etc.  If 'display_options' is true, lists
        the "display-only" options: --name, --version, etc.  Finally,
        lists per-command help for every command name or command class
        in 'commands'.
        r)�	gen_usage)r�z
Global options:rLz*Information display options (just display z!information, ignore any commands)r�zOptions for '%s' command:NzKInformation display options (just display information, ignore any commands))�distutils.corer�r�r�r�r�r�Z
print_help�common_usage�printr�r�r��typer�r�rmr�r�r�r�r�rY)
rrr�r�r�r�r�r�rMrv�klassrHrHrIr�bs6



zDistribution._show_helpc	Cs�ddlm}|jr4|j�td�t||j��dSd}i}x|jD]}d||d<qDWxt|D]l\}}|r^|j|�r^t|�}t	|j
d|��}|dkr�tdj|��n |dkr�td
j|��nt|�d}q^W|S)z�If there were any non-global "display-only" options
        (--help-commands or the metadata display options) on the command
        line, display the requested info and return true; else return
        false.
        r)r�rLrrKr>r:r�r<r@rBrDrN)r>r:)r<r@rBrD)r�r�Z
help_commands�print_commandsr�rYr�rerrVrTr�)	rrr�r�Zany_display_optionsZis_display_option�optionrxryr�rHrHrIr��s,z#Distribution.handle_display_optionscCsnt|d�x\|D]T}|jj|�}|s0|j|�}y
|j}Wntk
rRd}YnXtd|||f�qWdS)zZPrint a subset of the list of all commands -- used by
        'print_commands()'.
        �:z(no description available)z
  %-*s  %sN)r�rWrer�r6�AttributeError)rrr�r��
max_length�cmdr�r6rHrHrI�print_command_list�s



zDistribution.print_command_listcCs�ddl}|jj}i}x|D]}d||<qWg}x&|jj�D]}|j|�s:|j|�q:Wd}x$||D]}t|�|krdt|�}qdW|j|d|�|r�t	�|j|d|�dS)anPrint out a help message listing all available commands with a
        description of each.  The list is divided into "standard commands"
        (listed in distutils.command.__all__) and "extra commands"
        (mentioned in self.cmdclass, but not a standard command).  The
        descriptions come from the command class attribute
        'description'.
        rNrzStandard commandszExtra commands)
�distutils.commandrv�__all__rWr�rer�r�r�r�)rrr��std_commands�is_stdr��extra_commandsr�rHrHrIr��s*

zDistribution.print_commandsc	Cs�ddl}|jj}i}x|D]}d||<qWg}x&|jj�D]}|j|�s:|j|�q:Wg}x\||D]P}|jj|�}|s�|j|�}y
|j}Wnt	k
r�d}YnX|j||f�qdW|S)a>Get a list of (command, description) tuples.
        The list is divided into "standard commands" (listed in
        distutils.command.__all__) and "extra commands" (mentioned in
        self.cmdclass, but not a standard command).  The descriptions come
        from the command class attribute 'description'.
        rNrz(no description available))
r�rvr�rWr�rer�r�r6r�)	rrr�r�r�r�r��rvr�r6rHrHrI�get_command_list�s(	




zDistribution.get_command_listcCsN|j}t|t�sJ|dkrd}dd�|jd�D�}d|krD|jdd�||_|S)z9Return a list of packages from which commands are loaded.NrLcSsg|]}|dkr|j��qS)rL)r�)rFZpkgrHrHrIrJsz5Distribution.get_command_packages.<locals>.<listcomp>r�zdistutils.commandr)rXr�r�r��insert)rrZpkgsrHrHrI�get_command_packagess
z!Distribution.get_command_packagescCs�|jj|�}|r|Sx�|j�D]�}d||f}|}yt|�tj|}Wntk
r^wYnXyt||�}Wn&tk
r�t	d|||f��YnX||j|<|SWt	d|��dS)aoReturn the class that implements the Distutils command named by
        'command'.  First we check the 'cmdclass' dictionary; if the
        command is mentioned there, we fetch the class object from the
        dictionary and return it.  Otherwise we load the command module
        ("distutils.command." + command) and fetch the command class from
        the module.  The loaded class is also stored in 'cmdclass'
        to speed future calls to 'get_command_class()'.

        Raises DistutilsModuleError if the expected module could not be
        found, or if that module does not define the expected class.
        z%s.%sz3invalid command '%s' (no class '%s' in module '%s')zinvalid command '%s'N)
rWrer��
__import__rjr��ImportErrorrVr�r�)rrrvr�ZpkgnameZmodule_nameZ
klass_name�modulerHrHrIr�s(
zDistribution.get_command_classcCsn|jj|�}|rj|rjtr(|jd|�|j|�}||�}|j|<d|j|<|jj|�}|rj|j||�|S)aReturn the command object for 'command'.  Normally this object
        is cached on a previous call to 'get_command_obj()'; if no command
        object for 'command' is in the cache, then we either create and
        return it (if 'create' is true) or return None.
        z<Distribution.get_command_obj(): creating '%s' command objectr)rcrer
r�r�rdr[�_set_command_options)rrrvZcreate�cmd_objr�rMrHrHrI�get_command_objBs


zDistribution.get_command_objc!Csb|j�}|dkr|j|�}tr,|jd|��x.|j�D�] \}\}}tr^|jd|||f�ydd�|jD�}Wntk
r�g}YnXy
|j}Wntk
r�i}YnXy|t|t	�}	||kr�|	r�t
|||t|��nJ||kr�|	r�t
||t|��n,t||��rt
|||�nt
d|||f��Wq8tk
�rX}
zt
|
��WYdd}
~
Xq8Xq8WdS)aySet the options for 'command_obj' from 'option_dict'.  Basically
        this means copying elements of a dictionary ('option_dict') to
        attributes of an instance ('command').

        'command_obj' must be a Command instance.  If 'option_dict' is not
        supplied, uses the standard option dictionary for this command
        (from 'self.command_options').
        Nz#  setting options for '%s' command:z    %s = %s (from %s)cSsg|]}t|��qSrH)r)rF�orHrHrIrJqsz5Distribution._set_command_options.<locals>.<listcomp>z1error in %s: command '%s' has no such option '%s')�get_command_namergr
r�rfZboolean_optionsr�r�r�r�rRrrmr�r�)rrrcZoption_dict�command_namer��sourcer�Z	bool_optsZneg_optZ	is_stringrzrHrHrIr�]s>	






z!Distribution._set_command_optionsrcCs�ddlm}t||�s&|}|j|�}n|j�}|js8|S|j�d|_d|j|<|j|�|r|x|j	�D]}|j
||�qhW|S)a�Reinitializes a command to the state it was in when first
        returned by 'get_command_obj()': ie., initialized but not yet
        finalized.  This provides the opportunity to sneak option
        values in programmatically, overriding or supplementing
        user-supplied values from the config files and command line.
        You'll have to re-finalize the command object (by calling
        'finalize_options()' or 'ensure_finalized()') before using it for
        real.

        'command' should be a command name (string) or command object.  If
        'reinit_subcommands' is true, also reinitializes the command's
        sub-commands, as declared by the 'sub_commands' class attribute (if
        it has one).  See the "install" command for an example.  Only
        reinitializes the sub-commands that actually matter, ie. those
        whose test predicates return true.

        Returns the reinitialized command object.
        r)r�)r�r�r�r�r�Z	finalizedZinitialize_optionsrdr�Zget_sub_commands�reinitialize_command)rrrvZreinit_subcommandsr�r��subrHrHrIr��s


z!Distribution.reinitialize_commandcCstj||�dS)N)r	)rrrz�levelrHrHrIr��szDistribution.announcecCsx|jD]}|j|�qWdS)z�Run each command that was seen on the setup script command line.
        Uses the list of commands found and cache of command objects
        created by 'get_command_obj()'.
        N)r��run_command)rrr�rHrHrI�run_commands�szDistribution.run_commandscCsD|jj|�rdStjd|�|j|�}|j�|j�d|j|<dS)a�Do whatever it takes to run a command (including nothing at all,
        if the command has already been run).  Specifically: if we have
        already created and run the command named by 'command', return
        silently without doing anything.  If the command named by 'command'
        doesn't even have a command object yet, create one.  Then invoke
        'run()' on that command object (or an existing one).
        Nz
running %sr)rdrer	�infor�Zensure_finalizedZrun)rrrvr�rHrHrIr��s	
zDistribution.run_commandcCst|jp|jpg�dkS)Nr)r�r\r])rrrHrHrI�has_pure_modules�szDistribution.has_pure_modulescCs|jot|j�dkS)Nr)r`r�)rrrHrHrI�has_ext_modules�szDistribution.has_ext_modulescCs|jot|j�dkS)Nr)r^r�)rrrHrHrI�has_c_libraries�szDistribution.has_c_librariescCs|j�p|j�S)N)r�r�)rrrHrHrI�has_modules�szDistribution.has_modulescCs|jot|j�dkS)Nr)r_r�)rrrHrHrI�has_headers�szDistribution.has_headerscCs|jot|j�dkS)Nr)rar�)rrrHrHrI�has_scripts�szDistribution.has_scriptscCs|jot|j�dkS)Nr)rbr�)rrrHrHrI�has_data_files�szDistribution.has_data_filescCs|j�o|j�o|j�S)N)r�r�r�)rrrHrHrI�is_pure�s
zDistribution.is_pure)rr
rr)rrr)rrr)rrr)rNr)rNr)rNr)rr r!)r"Nr#)r$Nr%)r&Nr')r(Nr))r*Nr+)r,Nr-)r.Nr/)r0Nr1)r2Nr3)r4Nr5)r6Nr7)r8Nr9)r:Nr;)r<Nr=)r>Nr?)r@NrA)rBNrC)rDNrE)N)NNrL)N)r)N)r))r��
__module__�__qualname__�__doc__r�r�r�rQr�r}rgr�r�r�r�r�r�rqr�r�r�r�r�r�r�r�r�r�r	�INFOr�r�r�r�r�r�r�r�rrrrHrHrHrIrs�

"
0
:C[
1(!"&

,
)
rc@s�eZdZdZdOZdPdd�Zdd�Zdd�Zdd�Zdd �Z	d!d"�Z
d#d$�Zd%d&�Zd'd(�Z
d)d*�Zd+d,�Zd-d.�Zd/d0�Zd1d2�Zd3d4�Zd5d6�ZeZd7d8�Zd9d:�Zd;d<�Zd=d>�Zd?d@�ZdAdB�ZdCdD�ZdEdF�ZdGdH�ZdIdJ�ZdKdL�Z dMdN�Z!dS)QrSz]Dummy class to hold the distribution meta-data: name, version,
    author, and so forth.
    rrr$�author_emailr(�maintainer_emailr0r2r6�long_descriptionr>r:r"r,�
contact_emailr<�download_urlr@rBrDNcCs�|dk	r|jt|��nfd|_d|_d|_d|_d|_d|_d|_d|_	d|_
d|_d|_d|_
d|_d|_d|_d|_d|_dS)N)�
read_pkg_file�openrrr$rr(rr0r2r6r	r>r:r<rr@rBrD)rrr�rHrHrIr}s&zDistributionMetadata.__init__cst|���fdd�}�fdd�}�d}|d�|_|d�|_|d�|_|d	�|_d
|_|d�|_d
|_|d�|_|d
�|_	d�kr�|d�|_
nd
|_
|d�|_|d�|_d�kr�|d�jd�|_
|d�|_|d�|_|dkr�|d�|_|d�|_|d�|_nd
|_d
|_d
|_d
S)z-Reads the metadata values from a file object.cs�|}|dkrdS|S)N�UNKNOWNrH)rr�)rzrHrI�_read_fieldsz7DistributionMetadata.read_pkg_file.<locals>._read_fieldcs�j|d�}|gkrdS|S)N)Zget_all)r�values)rzrHrI�
_read_list#sz6DistributionMetadata.read_pkg_file.<locals>._read_listzmetadata-versionrrZsummaryr$Nzauthor-emailz	home-pager2zdownload-urlr6r>r��platformZ
classifierz1.1rBr@rD)rrrr6r$r(rrr0r2rr	r�r>r:r<rBr@rD)rr�filerrZmetadata_versionrH)rzrIrs:












z"DistributionMetadata.read_pkg_filec	Cs2ttjj|d�ddd��}|j|�WdQRXdS)z7Write the PKG-INFO file into the release tree.
        zPKG-INFO�wzUTF-8)�encodingN)r
r�r�r��write_pkg_file)rrZbase_dirZpkg_inforHrHrI�write_pkg_infoMs
z#DistributionMetadata.write_pkg_infocCsbd}|js"|js"|js"|js"|jr&d}|jd|�|jd|j��|jd|j��|jd|j��|jd|j	��|jd|j
��|jd	|j��|jd
|j��|jr�|jd|j�t
|j��}|jd|�d
j|j��}|�r|jd|�|j|d|j��|j|d|j��|j|d|j��|j|d|j��|j|d|j��dS)z9Write the PKG-INFO format data to a file object.
        z1.0z1.1zMetadata-Version: %s
z	Name: %s
zVersion: %s
zSummary: %s
zHome-page: %s
zAuthor: %s
zAuthor-email: %s
zLicense: %s
zDownload-URL: %s
zDescription: %s
r�z
Keywords: %s
ZPlatformZ
ClassifierZRequiresZProvidesZ	ObsoletesN)r@rBrDr<rrl�get_name�get_version�get_description�get_url�get_contact�get_contact_email�get_licenser�get_long_descriptionr��get_keywords�_write_list�
get_platforms�get_classifiers�get_requires�get_provides�
get_obsoletes)rrrrZ	long_descr>rHrHrIrTs0z#DistributionMetadata.write_pkg_filecCs$x|D]}|jd||f�qWdS)Nz%s: %s
)rl)rrrrrr�rHrHrIr!vs
z DistributionMetadata._write_listcCs
|jpdS)Nr)r)rrrHrHrIr|szDistributionMetadata.get_namecCs
|jpdS)Nz0.0.0)r)rrrHrHrIrsz DistributionMetadata.get_versioncCsd|j�|j�fS)Nz%s-%s)rr)rrrHrHrI�get_fullname�sz!DistributionMetadata.get_fullnamecCs
|jpdS)Nr)r$)rrrHrHrI�
get_author�szDistributionMetadata.get_authorcCs
|jpdS)Nr)r)rrrHrHrI�get_author_email�sz%DistributionMetadata.get_author_emailcCs
|jpdS)Nr)r()rrrHrHrI�get_maintainer�sz#DistributionMetadata.get_maintainercCs
|jpdS)Nr)r)rrrHrHrI�get_maintainer_email�sz)DistributionMetadata.get_maintainer_emailcCs|jp|jpdS)Nr)r(r$)rrrHrHrIr�sz DistributionMetadata.get_contactcCs|jp|jpdS)Nr)rr)rrrHrHrIr�sz&DistributionMetadata.get_contact_emailcCs
|jpdS)Nr)r0)rrrHrHrIr�szDistributionMetadata.get_urlcCs
|jpdS)Nr)r2)rrrHrHrIr�sz DistributionMetadata.get_licensecCs
|jpdS)Nr)r6)rrrHrHrIr�sz$DistributionMetadata.get_descriptioncCs
|jpdS)Nr)r	)rrrHrHrIr�sz)DistributionMetadata.get_long_descriptioncCs
|jpgS)N)r>)rrrHrHrIr �sz!DistributionMetadata.get_keywordscCs|jp
dgS)Nr)r:)rrrHrHrIr"�sz"DistributionMetadata.get_platformscCs
|jpgS)N)r<)rrrHrHrIr#�sz$DistributionMetadata.get_classifierscCs
|jpdS)Nr)r)rrrHrHrI�get_download_url�sz%DistributionMetadata.get_download_urlcCs
|jpgS)N)rB)rrrHrHrIr$�sz!DistributionMetadata.get_requirescCs,ddl}x|D]}|jj|�qW||_dS)Nr)�distutils.versionpredicate�versionpredicate�VersionPredicaterB)rrr�r�r
rHrHrI�set_requires�s
z!DistributionMetadata.set_requirescCs
|jpgS)N)r@)rrrHrHrIr%�sz!DistributionMetadata.get_providescCs:dd�|D�}x |D]}ddl}|jj|�qW||_dS)NcSsg|]}|j��qSrH)r�)rFr
rHrHrIrJ�sz5DistributionMetadata.set_provides.<locals>.<listcomp>r)r-r.Zsplit_provisionr@)rrr�r
r�rHrHrI�set_provides�s

z!DistributionMetadata.set_providescCs
|jpgS)N)rD)rrrHrHrIr&�sz"DistributionMetadata.get_obsoletescCs,ddl}x|D]}|jj|�qW||_dS)Nr)r-r.r/rD)rrr�r�r
rHrHrI�
set_obsoletes�s
z"DistributionMetadata.set_obsoletes)rrr$rr(rr0r2r6r	r>r:r"r,r
r<rr@rBrD)N)"r�rrrrUr}rrrr!rrr'r(r)r*r+rrrrZget_licencerrr r"r#r,r$r0r%r1r&r2rHrHrHrIrS�sH
4"rScCs(g}x|D]}|j|dd��q
W|S)zConvert a 4-tuple 'help_options' list as found in various command
    classes to the 3-tuple form required by FancyGetopt.
    r�)r�)rMZnew_optionsZ
help_tuplerHrHrIr��s
r�)rrjr��reZemailrrhr�Zdistutils.errorsZdistutils.fancy_getoptrrZdistutils.utilrrrr�r	Zdistutils.debugr
�compiler�rrSr�rHrHrHrI�<module>s2

]ZPKV[�� ��� __pycache__/debug.cpython-36.pycnu�[���3


 \��@sddlZejjd�ZdS)�NZDISTUTILS_DEBUG)�os�environ�get�DEBUG�rr�'/usr/lib64/python3.6/distutils/debug.py�<module>sPKV[�x�x�2�2-__pycache__/msvccompiler.cpython-36.opt-2.pycnu�[���3


 \\�@s�ddlZddlZddlmZmZmZmZmZddlm	Z	m
Z
mZddlm
Z
dZy,ddlZdZeZejZejZejZejZWnhek
r�y4ddlZddlZdZeZejZejZejZejZWnek
r�e
jd�YnXYnXer�ejejejej fZ!dd	�Z"d
d�Z#dd
�Z$Gdd�d�Z%dd�Z&dd�Z'dd�Z(Gdd�de	�Z)e&�dk�r~e
j*d�e)Z+ddl,m)Z)ddl,m%Z%dS)�N)�DistutilsExecError�DistutilsPlatformError�CompileError�LibError�	LinkError)�	CCompiler�gen_preprocess_options�gen_lib_options)�logFTz�Warning: Can't read registry to find the necessary compiler setting
Make sure that Python modules winreg, win32api or win32con are installed.cCsnyt||�}Wntk
r"dSXg}d}x<yt||�}Wntk
rRPYnX|j|�|d7}q.W|S)Nr�)�RegOpenKeyEx�RegError�
RegEnumKey�append)�base�key�handle�L�i�k�r�./usr/lib64/python3.6/distutils/msvccompiler.py�	read_keys7s
rcCs�yt||�}Wntk
r"dSXi}d}xPyt||�\}}}Wntk
rXPYnX|j�}t|�|t|�<|d7}q.W|S)Nrr)rr
�RegEnumValue�lower�convert_mbcs)rrr�dr�name�value�typerrr�read_valuesHsr cCs:t|dd�}|dk	r6y|d�}Wntk
r4YnX|S)N�decode�mbcs)�getattr�UnicodeError)�sZdecrrrr]src@s,eZdZdd�Zdd�Zdd�Zdd�Zd	S)
�
MacroExpandercCsi|_|j|�dS)N)�macros�load_macros)�self�versionrrr�__init__gszMacroExpander.__init__cCs4x.tD]&}t||�}|r|||jd|<PqWdS)Nz$(%s))�HKEYSr r')r)Zmacro�pathrrrrrr�	set_macroks


zMacroExpander.set_macroc
Cs�d|}|jd|dd�|jd|dd�d}|jd|d	�y*|d
krX|jd|d�n|jd|d
�Wn*tk
r�}ztd��WYdd}~XnXd}x\tD]T}yt||�}Wntk
r�w�YnXt|d�}t|d||f�}	|	d|jd<q�WdS)Nz%Software\Microsoft\VisualStudio\%0.1fZVCInstallDirz	\Setup\VCZ
productdirZVSInstallDirz	\Setup\VSz Software\Microsoft\.NETFrameworkZFrameworkDirZinstallrootg@ZFrameworkSDKDirzsdkinstallrootv1.1ZsdkinstallrootaPython was built with Visual Studio 2003;
extensions must be built with a compiler than can generate compatible binaries.
Visual Studio 2003 was not found on this system. If you have Cygwin installed,
you can try compiling with MingW32, by passing "-c mingw32" to setup.py.z.Software\Microsoft\NET Framework Setup\Productrz%s\%sr*z$(FrameworkVersion))	r.�KeyErrorrr,rr
rr r')
r)r*ZvsbaseZnet�exc�pr�hrrrrrr(rs*

zMacroExpander.load_macroscCs(x"|jj�D]\}}|j||�}qW|S)N)r'�items�replace)r)r%r�vrrr�sub�szMacroExpander.subN)�__name__�
__module__�__qualname__r+r.r(r6rrrrr&fsr&cCs�d}tjj|�}|d
krdS|t|�}tj|d�jdd�\}}t|dd��d}|dkrf|d7}t|dd��d}|dkr�d	}|dkr�||SdS)NzMSC v.r�� ��
�g$@r������)�sysr*�find�len�split�int)�prefixrr%�restZmajorVersionZminorVersionrrr�get_build_version�srHcCs@d}tjj|�}|dkrdStjjd|�}tj|t|�|�S)Nz bit (r�Intel�)r?)rAr*rBrC)rFr�jrrr�get_build_architecture�srLcCs4g}x*|D]"}tjj|�}||kr
|j|�q
W|S)N)�osr-�normpathr)�pathsZ
reduced_pathsr1Znprrr�normalize_and_reduce_paths�s
rPc
@s�eZdZdZiZdgZdddgZdgZdgZeeeeZ	dZ
d	Zd
ZdZ
dZZd
Zd,dd�Zdd�Zd-dd�Zd.dd�Zd/dd�Zd0dd�Zdd�Zdd �Zd!d"�Zd1d#d$�Zd%d&�Zd2d(d)�Zd*d+�ZdS)3�MSVCCompilerZmsvcz.cz.ccz.cppz.cxxz.rcz.mcz.resz.objz.libz.dllz%s%sz.exercCsvtj||||�t�|_t�|_|jdkr\|jdkrHd|_t|j�|_nd|_d|j|_	nd|jd|_	d|_
dS)	NrI�zSoftware\Microsoft\VisualStudiozSoftware\Microsoft\DevstudiozVisual Studio version %szMicrosoft SDK compiler %sr:F)rr+rH�_MSVCCompiler__versionrL�_MSVCCompiler__arch�_MSVCCompiler__rootr&�_MSVCCompiler__macros�_MSVCCompiler__product�initialized)r)�verboseZdry_runZforcerrrr+�s

zMSVCCompiler.__init__cCs�g|_dtjkrDdtjkrD|jd�rDd|_d|_d|_d|_d|_nx|j	d�|_t
|j�d	krltd
|j��|jd�|_|jd�|_|jd�|_|jd�|_|jd�|_|j
d�|j
d�y*x$tjdjd
�D]}|jj|�q�WWntk
r�YnXt|j�|_d
j|j�tjd<d|_|jdk�rTddddddg|_dddddddg|_n&ddddddg|_dddddddg|_dddg|_|jdk�r�ddddg|_ndddddg|_dg|_d |_dS)!NZDISTUTILS_USE_SDKZMSSdkzcl.exezlink.exezlib.exezrc.exezmc.exer-rzxPython was built with %s, and extensions need to be built with the same version of the compiler, but it isn't installed.�lib�include�;rIz/nologoz/Oxz/MDz/W3z/GXz/DNDEBUGz/Odz/MDdz/Z7z/D_DEBUGz/GS-z/DLLz/INCREMENTAL:NOrRz/INCREMENTAL:noz/DEBUGz	/pdb:NoneT)�_MSVCCompiler__pathsrM�environ�find_exe�cc�linkerrZ�rc�mc�get_msvc_pathsrCrrW�set_path_env_varrDrr/rP�joinZpreprocess_optionsrT�compile_options�compile_options_debug�ldflags_sharedrS�ldflags_shared_debugZldflags_staticrX)r)r1rrr�
initialize�sR







zMSVCCompiler.initialize�cCs�|dkrd}g}x�|D]�}tjj|�\}}tjj|�d}|tjj|�d�}||jkrdtd|��|rttjj|�}||jkr�|j	tjj
|||j��q||jkr�|j	tjj
|||j��q|j	tjj
|||j
��qW|S)NrlrzDon't know how to compile %s)rMr-�splitext�
splitdrive�isabs�src_extensionsr�basename�_rc_extensionsrrf�
res_extension�_mc_extensions�
obj_extension)r)Zsource_filenamesZ	strip_dir�
output_dirZ	obj_namesZsrc_namer�extrrr�object_filenames8s(



zMSVCCompiler.object_filenamesNc	Cst|js|j�|j||||||�}	|	\}}
}}}|p6g}
|
jd�|rT|
j|j�n|
j|j��x|
D�]}y||\}}Wntk
r�whYnX|r�tj	j
|�}||jkr�d|}�nT||jkr�d|}�n>||j
k�r>|}d|}y"|j|jg||g|g�Wqhtk
�r8}zt|��WYdd}~XqhXqhn�||jk�rtj	j|�}tj	j|�}yl|j|jgd|d|g|g�tj	jtj	j|��\}}tj	j||d�}|j|jgd|g|g�Wqhtk
�r�}zt|��WYdd}~XqhXqhntd||f��d	|}y&|j|jg|
|||g|�Wqhtk
�rj}zt|��WYdd}~XqhXqhW|
S)
Nz/cz/Tcz/Tpz/foz-hz-rz.rcz"Don't know how to compile %s to %sz/Fo)rXrkZ_setup_compiler�extendrhrgr/rMr-�abspath�
_c_extensions�_cpp_extensionsrr�spawnrbrrrt�dirnamercrmrqrfr`)r)Zsourcesrvr'Zinclude_dirs�debug�
extra_preargs�extra_postargsZdependsZcompile_info�objectsZpp_optsZbuildZcompile_opts�obj�srcrwZ	input_optZ
output_opt�msgZh_dirZrc_dirr�_Zrc_filerrr�compileWsj




zMSVCCompiler.compilec	Cs�|js|j�|j||�\}}|j||d�}|j||�r�|d|g}|rJy|j|jg|�Wq�tk
r�}zt|��WYdd}~Xq�Xnt	j
d|�dS)N)rvz/OUT:zskipping %s (up-to-date))rXrk�_fix_object_args�library_filename�
_need_linkr}rZrrr
r)	r)r�Zoutput_libnamervr�target_lang�output_filenameZlib_argsr�rrr�create_static_lib�szMSVCCompiler.create_static_libcCs�|js|j�|j||�\}}|j|||�}|\}}}|rL|jdt|��t||||�}|dk	rptjj	||�}|j
||��r�|tjkr�|	r�|j
dd�}q�|jdd�}n|	r�|j
}n|j}g}x|p�gD]}|jd|�q�W||||d|g}|dk	�rLtjjtjj|��\}}tjj	tjj|d�|j|��}|jd|�|
�r^|
|dd�<|�rn|j|�|jtjj|��y|j|jg|�Wn,tk
�r�}zt|��WYdd}~XnXntjd|�dS)Nz5I don't know what to do with 'runtime_library_dirs': rz/EXPORT:z/OUT:rz/IMPLIB:zskipping %s (up-to-date))rXrkr�Z
_fix_lib_args�warn�strr	rMr-rfr�rZ
EXECUTABLErjrirrmrqr~r�ryZmkpathr}rarrr
r)r)Ztarget_descr�r�rvZ	librariesZlibrary_dirsZruntime_library_dirsZexport_symbolsrr�r�Z
build_tempr�Z
fixed_argsZlib_optsZldflagsZexport_optsZsymZld_argsZdll_nameZdll_extZimplib_filer�rrr�link�sV



zMSVCCompiler.linkcCsd|S)Nz	/LIBPATH:r)r)�dirrrr�library_dir_optionszMSVCCompiler.library_dir_optioncCstd��dS)Nz<don't know how to set runtime library search path for MSVC++)r)r)r�rrr�runtime_library_dir_optionsz'MSVCCompiler.runtime_library_dir_optioncCs
|j|�S)N)r�)r)rZrrr�library_optionszMSVCCompiler.library_optioncCs`|r|d|g}n|g}xB|D]6}x0|D](}tjj||j|��}tjj|�r(|Sq(WqWdSdS)NZ_d)rMr-rfr��exists)r)�dirsrZrZ	try_namesr�rZlibfilerrr�find_library_file#s

zMSVCCompiler.find_library_filecCszx4|jD]*}tjjtjj|�|�}tjj|�r|SqWx>tjdjd�D]*}tjjtjj|�|�}tjj|�rH|SqHW|S)NZPathr\)r]rMr-rfrz�isfiler^rD)r)Zexer1�fnrrrr_5s	zMSVCCompiler.find_exe�x86cCs�tsgS|d}|jdkr,d|j|jf}nd|j|f}xHtD]@}t||�}|r@|jdkrr|jj||�jd�S||jd�Sq@W|jdkr�x,tD]$}t|d|j�dk	r�|jd�Pq�WgS)	Nz dirsrRz6%s\%0.1f\VC\VC_OBJECTS_PLATFORM_INFO\Win32\Directoriesz?%s\6.0\Build System\Components\Platforms\Win32 (%s)\Directoriesr\r:z%s\6.0z�It seems you have Visual Studio 6 installed, but the expected registry settings are not present.
You must at least run the Visual Studio GUI once so that these entries are created.)	�
_can_read_regrSrUr,r rVr6rDr�)r)r-�platformrrrrrrrdKs(






zMSVCCompiler.get_msvc_pathscCs6|dkr|jd�}n
|j|�}|r2dj|�tj|<dS)NrZZlibraryr\)rdrfrMr^)r)rr1rrrreos

zMSVCCompiler.set_path_env_var)rrr)rrl)NNNrNNN)NrN)
NNNNNrNNNN)r)r�)r7r8r9Z
compiler_typeZexecutablesr{r|rrrtrprsruZstatic_lib_extensionZshared_lib_extensionZstatic_lib_formatZshared_lib_formatZ
exe_extensionr+rkrxr�r�r�r�r�r�r�r_rdrerrrrrQ�sN

B

V

F

$rQg @z3Importing new compiler from distutils.msvc9compiler)rQ)r&)-rArMZdistutils.errorsrrrrrZdistutils.ccompilerrrr	Z	distutilsr
r��winregZhkey_modZ	OpenKeyExrZEnumKeyrZ	EnumValuer�errorr
�ImportErrorZwin32apiZwin32con�infoZ
HKEY_USERS�HKEY_CURRENT_USER�HKEY_LOCAL_MACHINEZHKEY_CLASSES_ROOTr,rr rr&rHrLrPrQrZOldMSVCCompilerZdistutils.msvc9compilerrrrr�<module>s\


	-
9
PKV[�q��)�)'__pycache__/fancy_getopt.cpython-36.pycnu�[���3


 \xE�@s�dZddlZddlZddlZddlZddlTdZejde�Zejdeef�Z	e
jdd�ZGd	d
�d
�Z
dd�Zd
d�ejD�Zdd�Zdd�ZGdd�d�Zedkr�dZx2dD]*Zede�edjeee���e�q�WdS)a6distutils.fancy_getopt

Wrapper around the standard getopt module that provides the following
additional features:
  * short and long options are tied together
  * options have help strings, so fancy_getopt could potentially
    create a complete usage summary
  * options set attributes of a passed-in object
�N)�*z[a-zA-Z](?:[a-zA-Z0-9-]*)z^%s$z^(%s)=!(%s)$�-�_c@s�eZdZdZddd�Zdd�Zdd�Zd d	d
�Zdd�Zd
d�Z	dd�Z
dd�Zdd�Zdd�Z
d!dd�Zdd�Zd"dd�Zd#dd�ZdS)$�FancyGetopta�Wrapper around the standard 'getopt()' module that provides some
    handy extra functionality:
      * short and long options are tied together
      * options have help strings, and help text can be assembled
        from them
      * options set attributes of a passed-in object
      * boolean options can have "negative aliases" -- eg. if
        --quiet is the "negative alias" of --verbose, then "--quiet"
        on the command line sets 'verbose' to false
    NcCsN||_i|_|jr|j�i|_i|_g|_g|_i|_i|_i|_	g|_
dS)N)�option_table�option_index�_build_index�alias�negative_alias�
short_opts�	long_opts�
short2long�	attr_name�	takes_arg�option_order)�selfr�r�./usr/lib64/python3.6/distutils/fancy_getopt.py�__init__)s	zFancyGetopt.__init__cCs,|jj�x|jD]}||j|d<qWdS)Nr)r�clearr)r�optionrrrrQs
zFancyGetopt._build_indexcCs||_|j�dS)N)rr)rrrrr�set_option_tableVszFancyGetopt.set_option_tablecCs<||jkrtd|��n |||f}|jj|�||j|<dS)Nz'option conflict: already an option '%s')r�DistutilsGetoptErrorr�append)r�long_optionZshort_optionZhelp_stringrrrr�
add_optionZs

zFancyGetopt.add_optioncCs
||jkS)zcReturn true if the option table for this parser has an
        option with long name 'long_option'.)r)rrrrr�
has_optioncszFancyGetopt.has_optioncCs
|jt�S)z�Translate long option name 'long_option' to the form it
        has as an attribute of some object: ie., translate hyphens
        to underscores.)�	translate�
longopt_xlate)rrrrr�
get_attr_namehszFancyGetopt.get_attr_namecCs`t|t�st�xL|j�D]@\}}||jkr<td|||f��||jkrtd|||f��qWdS)Nz(invalid %s '%s': option '%s' not definedz0invalid %s '%s': aliased option '%s' not defined)�
isinstance�dict�AssertionError�itemsrr)r�aliasesZwhatr	�optrrr�_check_alias_dictns

zFancyGetopt._check_alias_dictcCs|j|d�||_dS)z'Set the aliases for this option parser.r	N)r&r	)rr	rrr�set_aliasesxszFancyGetopt.set_aliasescCs|j|d�||_dS)z�Set the negative aliases for this option parser.
        'negative_alias' should be a dictionary mapping option names to
        option names, both the key and value must already be defined
        in the option table.znegative aliasN)r&r
)rr
rrr�set_negative_aliases}sz FancyGetopt.set_negative_aliasescCs�g|_g|_|jj�i|_�x�|jD�]�}t|�dkrH|\}}}d}n(t|�dkrb|\}}}}ntd|f��t|t	�s�t|�dkr�t
d|��|dkp�t|t	�o�t|�dks�t
d	|��||j|<|jj|�|dd
k�r|r�|d}|dd�}d|j|<nF|j
j|�}|dk	�rB|j|�r8t
d||f��||jd<d|j|<|jj|�}|dk	�r�|j||j|k�r�t
d
||f��tj|��s�t
d|��|j|�|j|<|r&|jj|�||j|d<q&WdS)z�Populate the various data structures that keep tabs on the
        option table.  Called by 'getopt()' before it can do anything
        worthwhile.
        �r�zinvalid option tuple: %r�z9invalid long option '%s': must be a string of length >= 2N�z:invalid short option '%s': must a single character or None�=�:z>invalid negative alias '%s': aliased option '%s' takes a valuezginvalid alias '%s': inconsistent with aliased option '%s' (one of them takes a value, the other doesn'tzEinvalid long option name '%s' (must be letters, numbers, hyphens only���r/r/)rrr
r�repeatr�len�
ValueErrorr �strrrrr
�getr	�
longopt_re�matchrr)rr�long�short�helpr0Zalias_torrr�_grok_option_table�s^






zFancyGetopt._grok_option_tablecCs�|dkrtjdd�}|dkr*t�}d}nd}|j�dj|j�}ytj|||j�\}}Wn,tjk
r�}zt	|��WYdd}~XnX�x|D�]�\}}t
|�dkr�|ddkr�|j|d}n,t
|�dkr�|dd�d	ks�t�|dd�}|j
j|�}	|	�r|	}|j|�sB|d
k�s"td��|jj|�}	|	�r>|	}d}nd}|j|}
|�rt|jj|
�dk	�rtt||
d�d}t||
|�|jj||f�q�W|�r�||fS|SdS)aParse command-line options in args. Store as attributes on object.

        If 'args' is None or not supplied, uses 'sys.argv[1:]'.  If
        'object' is None or not supplied, creates a new OptionDummy
        object, stores option values there, and returns a tuple (args,
        object).  If 'object' is supplied, it is modified in place and
        'getopt()' just returns 'args'; in both cases, the returned
        'args' is a modified copy of the passed-in 'args' list, which
        is left untouched.
        Nr,TF� r+rrz--�zboolean option can't have value)�sys�argv�OptionDummyr:�joinr�getoptr�errorZDistutilsArgErrorr1r
r"r	r4rr
rr0�getattr�setattrrr)r�args�objectZcreated_objectrZopts�msgr%�valr	�attrrrrrA�sF 
zFancyGetopt.getoptcCs|jdkrtd��n|jSdS)z�Returns the list of (option, value) tuples processed by the
        previous run of 'getopt()'.  Raises RuntimeError if
        'getopt()' hasn't been called yet.
        Nz!'getopt()' hasn't been called yet)r�RuntimeError)rrrr�get_option_orders

zFancyGetopt.get_option_ordercCsxd}xV|jD]L}|d}|d}t|�}|ddkr<|d}|dk	rL|d}||kr|}qW|ddd}d}||}	d|}
|r�|g}nd	g}x�|jD]�}|dd
�\}}}t||	�}
|ddkr�|dd�}|dk�r|
�r�|jd|||
df�n|jd||f�n:d
||f}|
�r<|jd|||
df�n|jd|�x$|
dd�D]}|j|
|��qXWq�W|S)z�Generate help text (a list of strings, one per suggested line of
        output) from the option table for this FancyGetopt object.
        rr,r-N�r+�Nr;zOption summary:r)z  --%-*s  %sz
  --%-*s  z%s (-%s)z  --%-*sr/r/r/)rr1�	wrap_textr)r�headerZmax_optrr7r8�lZ	opt_widthZ
line_widthZ
text_widthZ
big_indent�linesr9�textZ	opt_namesrrr�
generate_helpsF

zFancyGetopt.generate_helpcCs4|dkrtj}x |j|�D]}|j|d�qWdS)N�
)r=�stdoutrS�write)rrO�file�linerrr�
print_helphszFancyGetopt.print_help)N)NN)NN)N)NN)�__name__�
__module__�__qualname__�__doc__rrrrrrr&r'r(r:rArKrSrYrrrrrs

(
	
M
=

OrcCst|�}|j|�|j||�S)N)rr(rA)�optionsZnegative_optrFrE�parserrrr�fancy_getoptos
r`cCsi|]}dt|��qS)r;)�ord)�.0Z_wscharrrr�
<dictcomp>usrccCs"|dkrgSt|�|kr|gS|j�}|jt�}tjd|�}dd�|D�}g}x�|�rg}d}xZ|r�t|d�}|||kr�|j|d�|d=||}q`|r�|d	ddkr�|d
=Pq`W|�r
|dkr�|j|dd|��|d|d�|d<|dddk�r
|d=|jdj|��qPW|S)z�wrap_text(text : string, width : int) -> [string]

    Split 'text' into multiple lines of no more than 'width' characters
    each, and return the list of strings that results.
    Nz( +|-+)cSsg|]}|r|�qSrr)rbZchrrr�
<listcomp>�szwrap_text.<locals>.<listcomp>rr,r;r<r/r/)r1�
expandtabsr�WS_TRANS�re�splitrr@)rR�widthZchunksrQZcur_lineZcur_lenrPrrrrNws:

rNcCs
|jt�S)zXConvert a long option name to a valid Python identifier by
    changing "-" to "_".
    )rr)r%rrr�translate_longopt�srjc@seZdZdZgfdd�ZdS)r?z_Dummy class just used as a place to hold command-line option
    values as instance attributes.cCsx|D]}t||d�qWdS)zkCreate a new OptionDummy instance.  The attributes listed in
        'options' will be initialized to None.N)rD)rr^r%rrrr�s
zOptionDummy.__init__N)rZr[r\r]rrrrrr?�sr?�__main__z�Tra-la-la, supercalifragilisticexpialidocious.
How *do* you spell that odd word, anyways?
(Someone ask Mary -- she'll know [or she'll
say, "How should I know?"].)�
���(z	width: %drT)rlrmrnro)r]r=�stringrgrAZdistutils.errorsZlongopt_pat�compiler5Zneg_alias_rer3�	maketransrrr`Z
whitespacerfrNrjr?rZrR�w�printr@rrrr�<module>	s*T6
PKV[���C�C�$__pycache__/ccompiler.cpython-36.pycnu�[���3


 \7��@s�dZddlZddlZddlZddlTddlmZddlmZddl	m
Z
ddlmZm
Z
ddlmZmZdd	lmZGd
d�d�Zd-Zd.dd�Zd/d0d1d2d3d!�Zd"d#�Zd4d$d%�Zd&d'�Zd(d)�ZdS)5z�distutils.ccompiler

Contains CCompiler, an abstract base class that defines the interface
for the Distutils compiler abstraction model.�N)�*)�spawn)�	move_file)�mkpath)�newer_pairwise�newer_group)�split_quoted�execute)�logc
@seZdZdZdZdZdZdZdZdZ	dZ
dZdddddd�ZdddgZ
dqdd	�Zd
d�Zdd
�Zdd�Zdd�Zdrdd�Zdd�Zdd�Zdd�Zdd�Zdd�Zdd�Zd d!�Zd"d#�Zd$d%�Zd&d'�Zd(d)�Zd*d+�Zd,d-�Z d.d/�Z!dsd0d1�Z"d2d3�Z#d4d5�Z$d6d7�Z%d8d9�Z&dtd:d;�Z'dud<d=�Z(d>d?�Z)dvd@dA�Z*dBZ+dCZ,dDZ-dwdEdF�Z.dxdGdH�Z/dydIdJ�Z0dzdKdL�Z1dMdN�Z2dOdP�Z3dQdR�Z4d{dSdT�Z5d|dUdV�Z6d}dXdY�Z7d~dZd[�Z8dd\d]�Z9d�d_d`�Z:d�dbdc�Z;ddde�Z<dfdg�Z=d�dhdi�Z>djdk�Z?dldm�Z@d�dodp�ZAdS)��	CCompilera�Abstract base class to define the interface that must be implemented
    by real compiler classes.  Also has some utility methods used by
    several compiler classes.

    The basic idea behind a compiler abstraction class is that each
    instance can be used for all the compile/link steps in building a
    single project.  Thus, attributes common to all of those compile and
    link steps -- include directories, macros to define, libraries to link
    against, etc. -- are attributes of the compiler instance.  To allow for
    variability in how individual files are treated, most of those
    attributes may be varied on a per-compilation or per-link basis.
    N�czc++Zobjc)z.cz.ccz.cppz.cxxz.mrcCsf||_||_||_d|_g|_g|_g|_g|_g|_g|_	x$|j
j�D]}|j||j
|�qHWdS)N)
�dry_run�force�verbose�
output_dir�macros�include_dirs�	libraries�library_dirs�runtime_library_dirs�objects�executables�keys�set_executable)�selfrr
r�key�r�+/usr/lib64/python3.6/distutils/ccompiler.py�__init__UszCCompiler.__init__cKs@x:|D]2}||jkr(td||jjf��|j|||�qWdS)a�Define the executables (and options for them) that will be run
        to perform the various stages of compilation.  The exact set of
        executables that may be specified here depends on the compiler
        class (via the 'executables' class attribute), but most will have:
          compiler      the C/C++ compiler
          linker_so     linker used to create shared objects and libraries
          linker_exe    linker used to create binary executables
          archiver      static library creator

        On platforms with a command-line (Unix, DOS/Windows), each of these
        is a string that will be split into executable name and (optional)
        list of arguments.  (Splitting the string is done similarly to how
        Unix shells operate: words are delimited by spaces, but quotes and
        backslashes can override this.  See
        'distutils.util.split_quoted()'.)
        z$unknown executable '%s' for class %sN)r�
ValueError�	__class__�__name__r)r�kwargsrrrr�set_executablesys


zCCompiler.set_executablescCs,t|t�rt||t|��nt|||�dS)N)�
isinstance�str�setattrr)rr�valuerrrr�s
zCCompiler.set_executablecCs0d}x&|jD]}|d|kr |S|d7}qWdS)Nr�)r)r�name�i�defnrrr�_find_macro�szCCompiler._find_macrocCsdx^|D]V}t|t�oFt|�dkoFt|dt�s:|ddkoFt|dt�std|dd��qWdS)	z�Ensures that every element of 'definitions' is a valid macro
        definition, ie. either (name,value) 2-tuple or a (name,) tuple.  Do
        nothing if all definitions are OK, raise TypeError otherwise.
        r(�Nrzinvalid macro definition '%s': z.must be tuple (string,), (string, string), or z(string, None))r(r-)r$�tuple�lenr%�	TypeError)rZdefinitionsr+rrr�_check_macro_definitions�s


z"CCompiler._check_macro_definitionscCs.|j|�}|dk	r|j|=|jj||f�dS)a_Define a preprocessor macro for all compilations driven by this
        compiler object.  The optional parameter 'value' should be a
        string; if it is not supplied, then the macro will be defined
        without an explicit value and the exact outcome depends on the
        compiler used (XXX true? does ANSI say anything about this?)
        N)r,r�append)rr)r'r*rrr�define_macro�s	
zCCompiler.define_macrocCs0|j|�}|dk	r|j|=|f}|jj|�dS)a�Undefine a preprocessor macro for all compilations driven by
        this compiler object.  If the same macro is defined by
        'define_macro()' and undefined by 'undefine_macro()' the last call
        takes precedence (including multiple redefinitions or
        undefinitions).  If the macro is redefined/undefined on a
        per-compilation basis (ie. in the call to 'compile()'), then that
        takes precedence.
        N)r,rr2)rr)r*Zundefnrrr�undefine_macro�s

zCCompiler.undefine_macrocCs|jj|�dS)z�Add 'dir' to the list of directories that will be searched for
        header files.  The compiler is instructed to search directories in
        the order in which they are supplied by successive calls to
        'add_include_dir()'.
        N)rr2)r�dirrrr�add_include_dir�szCCompiler.add_include_dircCs|dd�|_dS)aySet the list of directories that will be searched to 'dirs' (a
        list of strings).  Overrides any preceding calls to
        'add_include_dir()'; subsequence calls to 'add_include_dir()' add
        to the list passed to 'set_include_dirs()'.  This does not affect
        any list of standard include directories that the compiler may
        search by default.
        N)r)r�dirsrrr�set_include_dirs�szCCompiler.set_include_dirscCs|jj|�dS)a�Add 'libname' to the list of libraries that will be included in
        all links driven by this compiler object.  Note that 'libname'
        should *not* be the name of a file containing a library, but the
        name of the library itself: the actual filename will be inferred by
        the linker, the compiler, or the compiler class (depending on the
        platform).

        The linker will be instructed to link against libraries in the
        order they were supplied to 'add_library()' and/or
        'set_libraries()'.  It is perfectly valid to duplicate library
        names; the linker will be instructed to link against libraries as
        many times as they are mentioned.
        N)rr2)r�libnamerrr�add_library�szCCompiler.add_librarycCs|dd�|_dS)z�Set the list of libraries to be included in all links driven by
        this compiler object to 'libnames' (a list of strings).  This does
        not affect any standard system libraries that the linker may
        include by default.
        N)r)rZlibnamesrrr�
set_libraries�szCCompiler.set_librariescCs|jj|�dS)a'Add 'dir' to the list of directories that will be searched for
        libraries specified to 'add_library()' and 'set_libraries()'.  The
        linker will be instructed to search for libraries in the order they
        are supplied to 'add_library_dir()' and/or 'set_library_dirs()'.
        N)rr2)rr5rrr�add_library_dirszCCompiler.add_library_dircCs|dd�|_dS)z�Set the list of library search directories to 'dirs' (a list of
        strings).  This does not affect any standard library search path
        that the linker may search by default.
        N)r)rr7rrr�set_library_dirsszCCompiler.set_library_dirscCs|jj|�dS)zlAdd 'dir' to the list of directories that will be searched for
        shared libraries at runtime.
        N)rr2)rr5rrr�add_runtime_library_dirsz!CCompiler.add_runtime_library_dircCs|dd�|_dS)z�Set the list of directories to search for shared libraries at
        runtime to 'dirs' (a list of strings).  This does not affect any
        standard search path that the runtime linker may search by
        default.
        N)r)rr7rrr�set_runtime_library_dirssz"CCompiler.set_runtime_library_dirscCs|jj|�dS)z�Add 'object' to the list of object files (or analogues, such as
        explicitly named library files or the output of "resource
        compilers") to be included in every link driven by this compiler
        object.
        N)rr2)r�objectrrr�add_link_object szCCompiler.add_link_objectcCs|dd�|_dS)z�Set the list of object files (or analogues) to be included in
        every link to 'objects'.  This does not affect any standard object
        files that the linker may include by default (such as system
        libraries).
        N)r)rrrrr�set_link_objects(szCCompiler.set_link_objectscCs.|dkr|j}nt|t�s"td��|dkr2|j}n"t|t�rL||jpFg}ntd��|dkrd|j}n*t|ttf�r�t|�|jp�g}ntd��|dkr�g}|j|d|d�}t	|�t	|�ks�t
�t||�}i}	xRtt	|��D]B}
||
}||
}t
jj|�d}
|jt
jj|��||
f|	|<q�W|||||	fS)z;Process arguments and decide which source files to compile.Nz%'output_dir' must be a string or Nonez/'macros' (if supplied) must be a list of tuplesz6'include_dirs' (if supplied) must be a list of stringsr)�	strip_dirrr()rr$r%r0r�listrr.�object_filenamesr/�AssertionError�gen_preprocess_options�range�os�path�splitextr�dirname)rZoutdirrZincdirs�sources�dependsZextrar�pp_opts�buildr*�src�obj�extrrr�_setup_compile6s:


zCCompiler._setup_compilecCs0|dg}|rdg|dd�<|r,||dd�<|S)Nz-cz-grr)rrO�debugZbefore�cc_argsrrr�_get_cc_argsas
zCCompiler._get_cc_argscCs�|dkr|j}nt|t�s"td��|dkr2|j}n"t|t�rL||jpFg}ntd��|dkrd|j}n*t|ttf�r�t|�|jp�g}ntd��|||fS)a'Typecheck and fix-up some of the arguments to the 'compile()'
        method, and return fixed-up values.  Specifically: if 'output_dir'
        is None, replaces it with 'self.output_dir'; ensures that 'macros'
        is a list, and augments it with 'self.macros'; ensures that
        'include_dirs' is a list, and augments it with 'self.include_dirs'.
        Guarantees that the returned values are of the correct type,
        i.e. for 'output_dir' either string or None, and for 'macros' and
        'include_dirs' either list or None.
        Nz%'output_dir' must be a string or Nonez/'macros' (if supplied) must be a list of tuplesz6'include_dirs' (if supplied) must be a list of strings)rr$r%r0rrDrr.)rrrrrrr�_fix_compile_argsjs 


zCCompiler._fix_compile_argscCs*|j||d�}t|�t|�ks"t�|ifS)a+Decide which souce files must be recompiled.

        Determine the list of object files corresponding to 'sources',
        and figure out which ones really need to be recompiled.
        Return a list of all object files and a dictionary telling
        which source files can be skipped.
        )r)rEr/rF)rrMrrNrrrr�
_prep_compile�s	zCCompiler._prep_compilecCsHt|ttf�std��t|�}|dkr.|j}nt|t�s@td��||fS)z�Typecheck and fix up some arguments supplied to various methods.
        Specifically: ensure that 'objects' is a list; if output_dir is
        None, replace with self.output_dir.  Return fixed versions of
        'objects' and 'output_dir'.
        z,'objects' must be a list or tuple of stringsNz%'output_dir' must be a string or None)r$rDr.r0rr%)rrrrrr�_fix_object_args�s
zCCompiler._fix_object_argscCs�|dkr|j}n*t|ttf�r2t|�|jp,g}ntd��|dkrJ|j}n*t|ttf�rlt|�|jpfg}ntd��|dkr�|j}n*t|ttf�r�t|�|jp�g}ntd��|||fS)a;Typecheck and fix up some of the arguments supplied to the
        'link_*' methods.  Specifically: ensure that all arguments are
        lists, and augment them with their permanent versions
        (eg. 'self.libraries' augments 'libraries').  Return a tuple with
        fixed versions of all arguments.
        Nz3'libraries' (if supplied) must be a list of stringsz6'library_dirs' (if supplied) must be a list of stringsz>'runtime_library_dirs' (if supplied) must be a list of strings)rr$rDr.r0rr)rrrrrrr�
_fix_lib_args�s&zCCompiler._fix_lib_argscCs2|jr
dS|jr t||dd�}n
t||�}|SdS)zjReturn true if we need to relink the files listed in 'objects'
        to recreate 'output_file'.
        T�newer)ZmissingN)rr
r)rr�output_filer\rrr�
_need_link�s
zCCompiler._need_linkc	Cs�t|t�s|g}d}t|j�}x^|D]V}tjj|�\}}|jj|�}y |jj	|�}||krb|}|}Wq$t
k
rxYq$Xq$W|S)z|Detect the language of a given file, or list of files. Uses
        language_map, and language_order to do the job.
        N)r$rDr/�language_orderrIrJrK�language_map�get�indexr)	rrMZlangrb�source�baserSZextlangZextindexrrr�detect_language�s



zCCompiler.detect_languagecCsdS)a�Preprocess a single C/C++ source file, named in 'source'.
        Output will be written to file named 'output_file', or stdout if
        'output_file' not supplied.  'macros' is a list of macro
        definitions as for 'compile()', which will augment the macros set
        with 'define_macro()' and 'undefine_macro()'.  'include_dirs' is a
        list of directory names that will be added to the default list.

        Raises PreprocessError on failure.
        Nr)rrcr]rr�
extra_preargs�extra_postargsrrr�
preprocess�szCCompiler.preprocessc	Csz|j||||||�\}}	}}
}|j|
||�}xH|	D]@}
y||
\}}Wntk
r\w2YnX|j|
|||||
�q2W|	S)aK	Compile one or more source files.

        'sources' must be a list of filenames, most likely C/C++
        files, but in reality anything that can be handled by a
        particular compiler and compiler class (eg. MSVCCompiler can
        handle resource files in 'sources').  Return a list of object
        filenames, one per source filename in 'sources'.  Depending on
        the implementation, not all source files will necessarily be
        compiled, but all corresponding object filenames will be
        returned.

        If 'output_dir' is given, object files will be put under it, while
        retaining their original path component.  That is, "foo/bar.c"
        normally compiles to "foo/bar.o" (for a Unix implementation); if
        'output_dir' is "build", then it would compile to
        "build/foo/bar.o".

        'macros', if given, must be a list of macro definitions.  A macro
        definition is either a (name, value) 2-tuple or a (name,) 1-tuple.
        The former defines a macro; if the value is None, the macro is
        defined without an explicit value.  The 1-tuple case undefines a
        macro.  Later definitions/redefinitions/ undefinitions take
        precedence.

        'include_dirs', if given, must be a list of strings, the
        directories to add to the default include file search path for this
        compilation only.

        'debug' is a boolean; if true, the compiler will be instructed to
        output debug symbols in (or alongside) the object file(s).

        'extra_preargs' and 'extra_postargs' are implementation- dependent.
        On platforms that have the notion of a command-line (e.g. Unix,
        DOS/Windows), they are most likely lists of strings: extra
        command-line arguments to prepand/append to the compiler command
        line.  On other platforms, consult the implementation class
        documentation.  In any event, they are intended as an escape hatch
        for those occasions when the abstract compiler framework doesn't
        cut the mustard.

        'depends', if given, is a list of filenames that all targets
        depend on.  If a source file is older than any file in
        depends, then the source file will be recompiled.  This
        supports dependency tracking, but only at a coarse
        granularity.

        Raises CompileError on failure.
        )rTrW�KeyError�_compile)rrMrrrrUrfrgrNrrOrPrVrRrQrSrrr�compile�s6
zCCompiler.compilecCsdS)zCompile 'src' to product 'obj'.Nr)rrRrQrSrVrgrOrrrrjCszCCompiler._compilecCsdS)a&Link a bunch of stuff together to create a static library file.
        The "bunch of stuff" consists of the list of object files supplied
        as 'objects', the extra object files supplied to
        'add_link_object()' and/or 'set_link_objects()', the libraries
        supplied to 'add_library()' and/or 'set_libraries()', and the
        libraries supplied as 'libraries' (if any).

        'output_libname' should be a library name, not a filename; the
        filename will be inferred from the library name.  'output_dir' is
        the directory where the library file will be put.

        'debug' is a boolean; if true, debugging information will be
        included in the library (note that on most platforms, it is the
        compile step where this matters: the 'debug' flag is included here
        just for consistency).

        'target_lang' is the target language for which the given objects
        are being compiled. This allows specific linkage time treatment of
        certain languages.

        Raises LibError on failure.
        Nr)rr�output_libnamerrU�target_langrrr�create_static_libIszCCompiler.create_static_libZ
shared_objectZshared_library�
executablecCst�dS)auLink a bunch of stuff together to create an executable or
        shared library file.

        The "bunch of stuff" consists of the list of object files supplied
        as 'objects'.  'output_filename' should be a filename.  If
        'output_dir' is supplied, 'output_filename' is relative to it
        (i.e. 'output_filename' can provide directory components if
        needed).

        'libraries' is a list of libraries to link against.  These are
        library names, not filenames, since they're translated into
        filenames in a platform-specific way (eg. "foo" becomes "libfoo.a"
        on Unix and "foo.lib" on DOS/Windows).  However, they can include a
        directory component, which means the linker will look in that
        specific directory rather than searching all the normal locations.

        'library_dirs', if supplied, should be a list of directories to
        search for libraries that were specified as bare library names
        (ie. no directory component).  These are on top of the system
        default and those supplied to 'add_library_dir()' and/or
        'set_library_dirs()'.  'runtime_library_dirs' is a list of
        directories that will be embedded into the shared library and used
        to search for other shared libraries that *it* depends on at
        run-time.  (This may only be relevant on Unix.)

        'export_symbols' is a list of symbols that the shared library will
        export.  (This appears to be relevant only on Windows.)

        'debug' is as for 'compile()' and 'create_static_lib()', with the
        slight distinction that it actually matters on most platforms (as
        opposed to 'create_static_lib()', which includes a 'debug' flag
        mostly for form's sake).

        'extra_preargs' and 'extra_postargs' are as for 'compile()' (except
        of course that they supply command-line arguments for the
        particular linker being used).

        'target_lang' is the target language for which the given objects
        are being compiled. This allows specific linkage time treatment of
        certain languages.

        Raises LinkError on failure.
        N)�NotImplementedError)rZtarget_descr�output_filenamerrrr�export_symbolsrUrfrg�
build_temprmrrr�linkis9zCCompiler.linkc

Cs2|jtj||j|dd�|||||||	|
||�
dS)N�shared)�lib_type)rtr�SHARED_LIBRARY�library_filename)
rrrlrrrrrrrUrfrgrsrmrrr�link_shared_lib�s
zCCompiler.link_shared_libc

Cs(|jtj|||||||||	|
||�
dS)N)rtr�
SHARED_OBJECT)
rrrqrrrrrrrUrfrgrsrmrrr�link_shared_object�s

zCCompiler.link_shared_objectcCs.|jtj||j|�||||d|||	d|
�
dS)N)rtr�
EXECUTABLE�executable_filename)rrZoutput_prognamerrrrrUrfrgrmrrr�link_executable�s

zCCompiler.link_executablecCst�dS)zkReturn the compiler option to add 'dir' to the list of
        directories searched for libraries.
        N)rp)rr5rrr�library_dir_option�szCCompiler.library_dir_optioncCst�dS)zsReturn the compiler option to add 'dir' to the list of
        directories searched for runtime libraries.
        N)rp)rr5rrr�runtime_library_dir_option�sz$CCompiler.runtime_library_dir_optioncCst�dS)zReturn the compiler option to add 'lib' to the list of libraries
        linked into the shared library or executable.
        N)rp)r�librrr�library_option�szCCompiler.library_optioncCs�ddl}|dkrg}|dkr g}|dkr,g}|dkr8g}|jd|dd�\}}tj|d�}	z.x|D]}
|	jd|
�q`W|	jd|�Wd|	j�Xy|j|g|d	�}Wntk
r�d
SXy|j|d||d�Wnt	t
fk
r�d
SXdS)
z�Return a boolean indicating whether funcname is supported on
        the current platform.  The optional arguments can be used to
        augment the compilation environment.
        rNz.cT)�text�wz#include "%s"
z+main (int argc, char **argv) {
    %s();
}
)rFza.out)rr)�tempfileZmkstemprI�fdopen�write�closerkZCompileErrorr~Z	LinkErrorr0)r�funcnameZincludesrrrr��fdZfname�fZinclrrrr�has_function�s8	

zCCompiler.has_functioncCst�dS)aHSearch the specified list of directories for a static or shared
        library file 'lib' and return the full path to that file.  If
        'debug' true, look for a debugging version (if that makes sense on
        the current platform).  Return None if 'lib' wasn't found in any of
        the specified directories.
        N)rp)rr7r�rUrrr�find_library_file#szCCompiler.find_library_file�cCs�|dkrd}g}x�|D]|}tjj|�\}}tjj|�d}|tjj|�d�}||jkrhtd||f��|rxtjj|�}|jtjj	|||j
��qW|S)Nr�r(z"unknown file type '%s' (from '%s'))rIrJrK�
splitdrive�isabs�src_extensionsZUnknownFileError�basenamer2�join�
obj_extension)rZsource_filenamesrCrZ	obj_namesZsrc_namerdrSrrrrENs

zCCompiler.object_filenamescCs0|dk	st�|rtjj|�}tjj|||j�S)N)rFrIrJr�r��shared_lib_extension)rr�rCrrrr�shared_object_filename_sz CCompiler.shared_object_filenamecCs4|dk	st�|rtjj|�}tjj|||jp.d�S)Nr�)rFrIrJr�r��
exe_extension)rr�rCrrrrr}eszCCompiler.executable_filename�staticc
Csl|dk	st�|d	krtd��t||d�}t||d�}tjj|�\}}|||f}	|r\d}tjj|||	�S)
Nr�ru�dylib�
xcode_stubz?'lib_type' must be "static", "shared", "dylib", or "xcode_stub"Z_lib_formatZ_lib_extensionr�)r�rur�r�)rFr�getattrrIrJ�splitr�)
rr9rvrCrZfmtrSr5rd�filenamerrrrxkszCCompiler.library_filenamer(cCstj|�dS)N)r
rU)r�msg�levelrrr�announce~szCCompiler.announcecCsddlm}|rt|�dS)Nr)�DEBUG)Zdistutils.debugr��print)rr�r�rrr�debug_print�szCCompiler.debug_printcCstjjd|�dS)Nzwarning: %s
)�sys�stderrr�)rr�rrr�warn�szCCompiler.warncCst||||j�dS)N)r	r
)r�func�argsr�r�rrrr	�szCCompiler.executecCst||jd�dS)N)r
)rr
)r�cmdrrrr�szCCompiler.spawncCst|||jd�S)N)r
)rr
)rrQ�dstrrrr�szCCompiler.move_file�cCst|||jd�dS)N)r
)rr
)rr)�moderrrr�szCCompiler.mkpath)rrr)N)N)NNNNN)NNNrNNN)NrN)
NNNNNrNNNN)
NNNNNrNNNN)
NNNNNrNNNN)NNNNrNNN)NNNN)r)rr�)rr�)rr�)r�rr�)r()Nr()r�)Br!�
__module__�__qualname__�__doc__Z
compiler_typer�r�Zstatic_lib_extensionr�Zstatic_lib_formatZshared_lib_formatr�r`r_rr#rr,r1r3r4r6r8r:r;r<r=r>r?rArBrTrWrXrYrZr[r^rerhrkrjrnrzrwr|rtryr{r~rr�r�r�r�rEr�r}rxr�r�r�r	rrrrrrrrs�


$ 

+	 
"


B

4



*
+





r�cygwin.*�unix�posix�nt�msvccCsV|dkrtj}|dkrtj}x4tD],\}}tj||�dk	sJtj||�dk	r"|Sq"WdS)akDetermine the default compiler to use for the given platform.

       osname should be one of the standard Python OS names (i.e. the
       ones returned by os.name) and platform the common value
       returned by sys.platform for the platform in question.

       The default values are os.name and sys.platform in case the
       parameters are not given.
    Nr�)rIr)r��platform�_default_compilers�re�match)�osnamer��pattern�compilerrrr�get_default_compiler�s
r��
unixccompiler�
UnixCCompiler�standard UNIX-style compiler�
_msvccompiler�MSVCCompiler�Microsoft Visual C++�cygwinccompiler�CygwinCCompiler�'Cygwin port of GNU C Compiler for Win32�Mingw32CCompiler�(Mingw32 port of GNU C Compiler for Win32�bcppcompiler�BCPPCompiler�Borland C++ Compiler)r�r��cygwinZmingw32ZbcppcCs\ddlm}g}x,tj�D] }|jd|dt|df�qW|j�||�}|jd�dS)zyPrint list of available compilers (used by the "--help-compiler"
    options to "build", "build_ext", "build_clib").
    r)�FancyGetoptz	compiler=Nr-zList of available compilers:)Zdistutils.fancy_getoptr��compiler_classrr2�sortZ
print_help)r�Z	compilersr�Zpretty_printerrrr�show_compilers�sr�cCs�|dkrtj}y"|dkr t|�}t|\}}}Wn8tk
rhd|}|dk	r\|d|}t|��YnXy*d|}t|�tj|}	t	|	�|}
WnBt
k
r�td|��Yn$tk
r�td||f��YnX|
d||�S)a[Generate an instance of some CCompiler subclass for the supplied
    platform/compiler combination.  'plat' defaults to 'os.name'
    (eg. 'posix', 'nt'), and 'compiler' defaults to the default compiler
    for that platform.  Currently only 'posix' and 'nt' are supported, and
    the default compilers are "traditional Unix interface" (UnixCCompiler
    class) and Visual C++ (MSVCCompiler class).  Note that it's perfectly
    possible to ask for a Unix compiler object under Windows, and a
    Microsoft compiler object under Unix -- if you supply a value for
    'compiler', 'plat' is ignored.
    Nz5don't know how to compile C/C++ code on platform '%s'z with '%s' compilerz
distutils.z4can't compile C/C++ code: unable to load module '%s'zBcan't compile C/C++ code: unable to find class '%s' in module '%s')rIr)r�r�riZDistutilsPlatformError�
__import__r��modules�vars�ImportErrorZDistutilsModuleError)Zplatr�rr
rZmodule_name�
class_nameZlong_descriptionr��module�klassrrr�new_compiler�s2
r�cCs�g}x�|D]�}t|t�o2dt|�ko.dkns@td|��t|�dkr`|jd|d�q
t|�dkr
|ddkr�|jd|d�q
|jd|�q
Wx|D]}|jd	|�q�W|S)
aGenerate C pre-processor options (-D, -U, -I) as used by at least
    two types of compilers: the typical Unix compiler and Visual C++.
    'macros' is the usual thing, a list of 1- or 2-tuples, where (name,)
    means undefine (-U) macro 'name', and (name,value) means define (-D)
    macro 'name' to 'value'.  'include_dirs' is just a list of directory
    names to be added to the header file search path (-I).  Returns a list
    of command-line options suitable for either Unix compilers or Visual
    C++.
    r(r-zPbad macro definition '%s': each element of 'macros' list must be a 1- or 2-tuplez-U%srNz-D%sz-D%s=%sz-I%s)r$r.r/r0r2)rrrOZmacror5rrrrG
s
&
rGcCs�g}x|D]}|j|j|��q
Wx4|D],}|j|�}t|t�rJ||}q(|j|�q(Wx^|D]V}tjj|�\}}	|r�|j|g|	�}
|
r�|j|
�q�|j	d|�q^|j|j
|��q^W|S)acGenerate linker options for searching library directories and
    linking with specific libraries.  'libraries' and 'library_dirs' are,
    respectively, lists of library names (not filenames!) and search
    directories.  Returns a list of command-line options suitable for use
    with some compiler (depending on the two format strings passed in).
    z6no library file corresponding to '%s' found (skipping))r2rr�r$rDrIrJr�r�r�r�)r�rrrZlib_optsr5�optr�Zlib_dirZlib_nameZlib_filerrr�gen_lib_options7s$






r��r�r��r�r��r�r�)r�r�r�)NN)r�r�r�)r�r�r�)r�r�r�)r�r�r�)r�r�r�)NNrrr)r�r�rIr�Zdistutils.errorsZdistutils.spawnrZdistutils.file_utilrZdistutils.dir_utilrZdistutils.dep_utilrrZdistutils.utilrr	Z	distutilsr
rr�r�r�r�r�rGr�rrrr�<module>sD

--PKV[_�H%��debug.pynu�[���import os

# If DISTUTILS_DEBUG is anything other than the empty string, we run in
# debug mode.
DEBUG = os.environ.get('DISTUTILS_DEBUG')
PKV[���۟F�Fcmd.pynu�[���"""distutils.cmd

Provides the Command class, the base class for the command classes
in the distutils.command package.
"""

import sys, os, re
from distutils.errors import DistutilsOptionError
from distutils import util, dir_util, file_util, archive_util, dep_util
from distutils import log

class Command:
    """Abstract base class for defining command classes, the "worker bees"
    of the Distutils.  A useful analogy for command classes is to think of
    them as subroutines with local variables called "options".  The options
    are "declared" in 'initialize_options()' and "defined" (given their
    final values, aka "finalized") in 'finalize_options()', both of which
    must be defined by every command class.  The distinction between the
    two is necessary because option values might come from the outside
    world (command line, config file, ...), and any options dependent on
    other options must be computed *after* these outside influences have
    been processed -- hence 'finalize_options()'.  The "body" of the
    subroutine, where it does all its work based on the values of its
    options, is the 'run()' method, which must also be implemented by every
    command class.
    """

    # 'sub_commands' formalizes the notion of a "family" of commands,
    # eg. "install" as the parent with sub-commands "install_lib",
    # "install_headers", etc.  The parent of a family of commands
    # defines 'sub_commands' as a class attribute; it's a list of
    #    (command_name : string, predicate : unbound_method | string | None)
    # tuples, where 'predicate' is a method of the parent command that
    # determines whether the corresponding command is applicable in the
    # current situation.  (Eg. we "install_headers" is only applicable if
    # we have any C header files to install.)  If 'predicate' is None,
    # that command is always applicable.
    #
    # 'sub_commands' is usually defined at the *end* of a class, because
    # predicates can be unbound methods, so they must already have been
    # defined.  The canonical example is the "install" command.
    sub_commands = []


    # -- Creation/initialization methods -------------------------------

    def __init__(self, dist):
        """Create and initialize a new Command object.  Most importantly,
        invokes the 'initialize_options()' method, which is the real
        initializer and depends on the actual command being
        instantiated.
        """
        # late import because of mutual dependence between these classes
        from distutils.dist import Distribution

        if not isinstance(dist, Distribution):
            raise TypeError("dist must be a Distribution instance")
        if self.__class__ is Command:
            raise RuntimeError("Command is an abstract class")

        self.distribution = dist
        self.initialize_options()

        # Per-command versions of the global flags, so that the user can
        # customize Distutils' behaviour command-by-command and let some
        # commands fall back on the Distribution's behaviour.  None means
        # "not defined, check self.distribution's copy", while 0 or 1 mean
        # false and true (duh).  Note that this means figuring out the real
        # value of each flag is a touch complicated -- hence "self._dry_run"
        # will be handled by __getattr__, below.
        # XXX This needs to be fixed.
        self._dry_run = None

        # verbose is largely ignored, but needs to be set for
        # backwards compatibility (I think)?
        self.verbose = dist.verbose

        # Some commands define a 'self.force' option to ignore file
        # timestamps, but methods defined *here* assume that
        # 'self.force' exists for all commands.  So define it here
        # just to be safe.
        self.force = None

        # The 'help' flag is just used for command-line parsing, so
        # none of that complicated bureaucracy is needed.
        self.help = 0

        # 'finalized' records whether or not 'finalize_options()' has been
        # called.  'finalize_options()' itself should not pay attention to
        # this flag: it is the business of 'ensure_finalized()', which
        # always calls 'finalize_options()', to respect/update it.
        self.finalized = 0

    # XXX A more explicit way to customize dry_run would be better.
    def __getattr__(self, attr):
        if attr == 'dry_run':
            myval = getattr(self, "_" + attr)
            if myval is None:
                return getattr(self.distribution, attr)
            else:
                return myval
        else:
            raise AttributeError(attr)

    def ensure_finalized(self):
        if not self.finalized:
            self.finalize_options()
        self.finalized = 1

    # Subclasses must define:
    #   initialize_options()
    #     provide default values for all options; may be customized by
    #     setup script, by options from config file(s), or by command-line
    #     options
    #   finalize_options()
    #     decide on the final values for all options; this is called
    #     after all possible intervention from the outside world
    #     (command-line, option file, etc.) has been processed
    #   run()
    #     run the command: do whatever it is we're here to do,
    #     controlled by the command's various option values

    def initialize_options(self):
        """Set default values for all the options that this command
        supports.  Note that these defaults may be overridden by other
        commands, by the setup script, by config files, or by the
        command-line.  Thus, this is not the place to code dependencies
        between options; generally, 'initialize_options()' implementations
        are just a bunch of "self.foo = None" assignments.

        This method must be implemented by all command classes.
        """
        raise RuntimeError("abstract method -- subclass %s must override"
                           % self.__class__)

    def finalize_options(self):
        """Set final values for all the options that this command supports.
        This is always called as late as possible, ie.  after any option
        assignments from the command-line or from other commands have been
        done.  Thus, this is the place to code option dependencies: if
        'foo' depends on 'bar', then it is safe to set 'foo' from 'bar' as
        long as 'foo' still has the same value it was assigned in
        'initialize_options()'.

        This method must be implemented by all command classes.
        """
        raise RuntimeError("abstract method -- subclass %s must override"
                           % self.__class__)


    def dump_options(self, header=None, indent=""):
        from distutils.fancy_getopt import longopt_xlate
        if header is None:
            header = "command options for '%s':" % self.get_command_name()
        self.announce(indent + header, level=log.INFO)
        indent = indent + "  "
        for (option, _, _) in self.user_options:
            option = option.translate(longopt_xlate)
            if option[-1] == "=":
                option = option[:-1]
            value = getattr(self, option)
            self.announce(indent + "%s = %s" % (option, value),
                          level=log.INFO)

    def run(self):
        """A command's raison d'etre: carry out the action it exists to
        perform, controlled by the options initialized in
        'initialize_options()', customized by other commands, the setup
        script, the command-line, and config files, and finalized in
        'finalize_options()'.  All terminal output and filesystem
        interaction should be done by 'run()'.

        This method must be implemented by all command classes.
        """
        raise RuntimeError("abstract method -- subclass %s must override"
                           % self.__class__)

    def announce(self, msg, level=1):
        """If the current verbosity level is of greater than or equal to
        'level' print 'msg' to stdout.
        """
        log.log(level, msg)

    def debug_print(self, msg):
        """Print 'msg' to stdout if the global DEBUG (taken from the
        DISTUTILS_DEBUG environment variable) flag is true.
        """
        from distutils.debug import DEBUG
        if DEBUG:
            print(msg)
            sys.stdout.flush()


    # -- Option validation methods -------------------------------------
    # (these are very handy in writing the 'finalize_options()' method)
    #
    # NB. the general philosophy here is to ensure that a particular option
    # value meets certain type and value constraints.  If not, we try to
    # force it into conformance (eg. if we expect a list but have a string,
    # split the string on comma and/or whitespace).  If we can't force the
    # option into conformance, raise DistutilsOptionError.  Thus, command
    # classes need do nothing more than (eg.)
    #   self.ensure_string_list('foo')
    # and they can be guaranteed that thereafter, self.foo will be
    # a list of strings.

    def _ensure_stringlike(self, option, what, default=None):
        val = getattr(self, option)
        if val is None:
            setattr(self, option, default)
            return default
        elif not isinstance(val, str):
            raise DistutilsOptionError("'%s' must be a %s (got `%s`)"
                                       % (option, what, val))
        return val

    def ensure_string(self, option, default=None):
        """Ensure that 'option' is a string; if not defined, set it to
        'default'.
        """
        self._ensure_stringlike(option, "string", default)

    def ensure_string_list(self, option):
        r"""Ensure that 'option' is a list of strings.  If 'option' is
        currently a string, we split it either on /,\s*/ or /\s+/, so
        "foo bar baz", "foo,bar,baz", and "foo,   bar baz" all become
        ["foo", "bar", "baz"].
        """
        val = getattr(self, option)
        if val is None:
            return
        elif isinstance(val, str):
            setattr(self, option, re.split(r',\s*|\s+', val))
        else:
            if isinstance(val, list):
                ok = all(isinstance(v, str) for v in val)
            else:
                ok = False
            if not ok:
                raise DistutilsOptionError(
                      "'%s' must be a list of strings (got %r)"
                      % (option, val))

    def _ensure_tested_string(self, option, tester, what, error_fmt,
                              default=None):
        val = self._ensure_stringlike(option, what, default)
        if val is not None and not tester(val):
            raise DistutilsOptionError(("error in '%s' option: " + error_fmt)
                                       % (option, val))

    def ensure_filename(self, option):
        """Ensure that 'option' is the name of an existing file."""
        self._ensure_tested_string(option, os.path.isfile,
                                   "filename",
                                   "'%s' does not exist or is not a file")

    def ensure_dirname(self, option):
        self._ensure_tested_string(option, os.path.isdir,
                                   "directory name",
                                   "'%s' does not exist or is not a directory")


    # -- Convenience methods for commands ------------------------------

    def get_command_name(self):
        if hasattr(self, 'command_name'):
            return self.command_name
        else:
            return self.__class__.__name__

    def set_undefined_options(self, src_cmd, *option_pairs):
        """Set the values of any "undefined" options from corresponding
        option values in some other command object.  "Undefined" here means
        "is None", which is the convention used to indicate that an option
        has not been changed between 'initialize_options()' and
        'finalize_options()'.  Usually called from 'finalize_options()' for
        options that depend on some other command rather than another
        option of the same command.  'src_cmd' is the other command from
        which option values will be taken (a command object will be created
        for it if necessary); the remaining arguments are
        '(src_option,dst_option)' tuples which mean "take the value of
        'src_option' in the 'src_cmd' command object, and copy it to
        'dst_option' in the current command object".
        """
        # Option_pairs: list of (src_option, dst_option) tuples
        src_cmd_obj = self.distribution.get_command_obj(src_cmd)
        src_cmd_obj.ensure_finalized()
        for (src_option, dst_option) in option_pairs:
            if getattr(self, dst_option) is None:
                setattr(self, dst_option, getattr(src_cmd_obj, src_option))

    def get_finalized_command(self, command, create=1):
        """Wrapper around Distribution's 'get_command_obj()' method: find
        (create if necessary and 'create' is true) the command object for
        'command', call its 'ensure_finalized()' method, and return the
        finalized command object.
        """
        cmd_obj = self.distribution.get_command_obj(command, create)
        cmd_obj.ensure_finalized()
        return cmd_obj

    # XXX rename to 'get_reinitialized_command()'? (should do the
    # same in dist.py, if so)
    def reinitialize_command(self, command, reinit_subcommands=0):
        return self.distribution.reinitialize_command(command,
                                                      reinit_subcommands)

    def run_command(self, command):
        """Run some other command: uses the 'run_command()' method of
        Distribution, which creates and finalizes the command object if
        necessary and then invokes its 'run()' method.
        """
        self.distribution.run_command(command)

    def get_sub_commands(self):
        """Determine the sub-commands that are relevant in the current
        distribution (ie., that need to be run).  This is based on the
        'sub_commands' class attribute: each tuple in that list may include
        a method that we call to determine if the subcommand needs to be
        run for the current distribution.  Return a list of command names.
        """
        commands = []
        for (cmd_name, method) in self.sub_commands:
            if method is None or method(self):
                commands.append(cmd_name)
        return commands


    # -- External world manipulation -----------------------------------

    def warn(self, msg):
        log.warn("warning: %s: %s\n", self.get_command_name(), msg)

    def execute(self, func, args, msg=None, level=1):
        util.execute(func, args, msg, dry_run=self.dry_run)

    def mkpath(self, name, mode=0o777):
        dir_util.mkpath(name, mode, dry_run=self.dry_run)

    def copy_file(self, infile, outfile, preserve_mode=1, preserve_times=1,
                  link=None, level=1):
        """Copy a file respecting verbose, dry-run and force flags.  (The
        former two default to whatever is in the Distribution object, and
        the latter defaults to false for commands that don't define it.)"""
        return file_util.copy_file(infile, outfile, preserve_mode,
                                   preserve_times, not self.force, link,
                                   dry_run=self.dry_run)

    def copy_tree(self, infile, outfile, preserve_mode=1, preserve_times=1,
                   preserve_symlinks=0, level=1):
        """Copy an entire directory tree respecting verbose, dry-run,
        and force flags.
        """
        return dir_util.copy_tree(infile, outfile, preserve_mode,
                                  preserve_times, preserve_symlinks,
                                  not self.force, dry_run=self.dry_run)

    def move_file (self, src, dst, level=1):
        """Move a file respecting dry-run flag."""
        return file_util.move_file(src, dst, dry_run=self.dry_run)

    def spawn(self, cmd, search_path=1, level=1):
        """Spawn an external command respecting dry-run flag."""
        from distutils.spawn import spawn
        spawn(cmd, search_path, dry_run=self.dry_run)

    def make_archive(self, base_name, format, root_dir=None, base_dir=None,
                     owner=None, group=None):
        return archive_util.make_archive(base_name, format, root_dir, base_dir,
                                         dry_run=self.dry_run,
                                         owner=owner, group=group)

    def make_file(self, infiles, outfile, func, args,
                  exec_msg=None, skip_msg=None, level=1):
        """Special case of 'execute()' for operations that process one or
        more input files and generate one output file.  Works just like
        'execute()', except the operation is skipped and a different
        message printed if 'outfile' already exists and is newer than all
        files listed in 'infiles'.  If the command defined 'self.force',
        and it is true, then the command is unconditionally run -- does no
        timestamp checks.
        """
        if skip_msg is None:
            skip_msg = "skipping %s (inputs unchanged)" % outfile

        # Allow 'infiles' to be a single string
        if isinstance(infiles, str):
            infiles = (infiles,)
        elif not isinstance(infiles, (list, tuple)):
            raise TypeError(
                  "'infiles' must be a string, or a list or tuple of strings")

        if exec_msg is None:
            exec_msg = "generating %s from %s" % (outfile, ', '.join(infiles))

        # If 'outfile' must be regenerated (either because it doesn't
        # exist, is out-of-date, or the 'force' flag is true) then
        # perform the action that presumably regenerates it
        if self.force or dep_util.newer_group(infiles, outfile):
            self.execute(func, args, exec_msg, level)
        # Otherwise, print the "skip" message
        else:
            log.debug(skip_msg)
PKV[fP[5 2 2filelist.pynu�[���"""distutils.filelist

Provides the FileList class, used for poking about the filesystem
and building lists of files.
"""

import os, re
import fnmatch
import functools
from distutils.util import convert_path
from distutils.errors import DistutilsTemplateError, DistutilsInternalError
from distutils import log

class FileList:
    """A list of files built by on exploring the filesystem and filtered by
    applying various patterns to what we find there.

    Instance attributes:
      dir
        directory from which files will be taken -- only used if
        'allfiles' not supplied to constructor
      files
        list of filenames currently being built/filtered/manipulated
      allfiles
        complete list of files under consideration (ie. without any
        filtering applied)
    """

    def __init__(self, warn=None, debug_print=None):
        # ignore argument to FileList, but keep them for backwards
        # compatibility
        self.allfiles = None
        self.files = []

    def set_allfiles(self, allfiles):
        self.allfiles = allfiles

    def findall(self, dir=os.curdir):
        self.allfiles = findall(dir)

    def debug_print(self, msg):
        """Print 'msg' to stdout if the global DEBUG (taken from the
        DISTUTILS_DEBUG environment variable) flag is true.
        """
        from distutils.debug import DEBUG
        if DEBUG:
            print(msg)

    # -- List-like methods ---------------------------------------------

    def append(self, item):
        self.files.append(item)

    def extend(self, items):
        self.files.extend(items)

    def sort(self):
        # Not a strict lexical sort!
        sortable_files = sorted(map(os.path.split, self.files))
        self.files = []
        for sort_tuple in sortable_files:
            self.files.append(os.path.join(*sort_tuple))


    # -- Other miscellaneous utility methods ---------------------------

    def remove_duplicates(self):
        # Assumes list has been sorted!
        for i in range(len(self.files) - 1, 0, -1):
            if self.files[i] == self.files[i - 1]:
                del self.files[i]


    # -- "File template" methods ---------------------------------------

    def _parse_template_line(self, line):
        words = line.split()
        action = words[0]

        patterns = dir = dir_pattern = None

        if action in ('include', 'exclude',
                      'global-include', 'global-exclude'):
            if len(words) < 2:
                raise DistutilsTemplateError(
                      "'%s' expects <pattern1> <pattern2> ..." % action)
            patterns = [convert_path(w) for w in words[1:]]
        elif action in ('recursive-include', 'recursive-exclude'):
            if len(words) < 3:
                raise DistutilsTemplateError(
                      "'%s' expects <dir> <pattern1> <pattern2> ..." % action)
            dir = convert_path(words[1])
            patterns = [convert_path(w) for w in words[2:]]
        elif action in ('graft', 'prune'):
            if len(words) != 2:
                raise DistutilsTemplateError(
                      "'%s' expects a single <dir_pattern>" % action)
            dir_pattern = convert_path(words[1])
        else:
            raise DistutilsTemplateError("unknown action '%s'" % action)

        return (action, patterns, dir, dir_pattern)

    def process_template_line(self, line):
        # Parse the line: split it up, make sure the right number of words
        # is there, and return the relevant words.  'action' is always
        # defined: it's the first word of the line.  Which of the other
        # three are defined depends on the action; it'll be either
        # patterns, (dir and patterns), or (dir_pattern).
        (action, patterns, dir, dir_pattern) = self._parse_template_line(line)

        # OK, now we know that the action is valid and we have the
        # right number of words on the line for that action -- so we
        # can proceed with minimal error-checking.
        if action == 'include':
            self.debug_print("include " + ' '.join(patterns))
            for pattern in patterns:
                if not self.include_pattern(pattern, anchor=1):
                    log.warn("warning: no files found matching '%s'",
                             pattern)

        elif action == 'exclude':
            self.debug_print("exclude " + ' '.join(patterns))
            for pattern in patterns:
                if not self.exclude_pattern(pattern, anchor=1):
                    log.warn(("warning: no previously-included files "
                              "found matching '%s'"), pattern)

        elif action == 'global-include':
            self.debug_print("global-include " + ' '.join(patterns))
            for pattern in patterns:
                if not self.include_pattern(pattern, anchor=0):
                    log.warn(("warning: no files found matching '%s' "
                              "anywhere in distribution"), pattern)

        elif action == 'global-exclude':
            self.debug_print("global-exclude " + ' '.join(patterns))
            for pattern in patterns:
                if not self.exclude_pattern(pattern, anchor=0):
                    log.warn(("warning: no previously-included files matching "
                              "'%s' found anywhere in distribution"),
                             pattern)

        elif action == 'recursive-include':
            self.debug_print("recursive-include %s %s" %
                             (dir, ' '.join(patterns)))
            for pattern in patterns:
                if not self.include_pattern(pattern, prefix=dir):
                    log.warn(("warning: no files found matching '%s' "
                                "under directory '%s'"),
                             pattern, dir)

        elif action == 'recursive-exclude':
            self.debug_print("recursive-exclude %s %s" %
                             (dir, ' '.join(patterns)))
            for pattern in patterns:
                if not self.exclude_pattern(pattern, prefix=dir):
                    log.warn(("warning: no previously-included files matching "
                              "'%s' found under directory '%s'"),
                             pattern, dir)

        elif action == 'graft':
            self.debug_print("graft " + dir_pattern)
            if not self.include_pattern(None, prefix=dir_pattern):
                log.warn("warning: no directories found matching '%s'",
                         dir_pattern)

        elif action == 'prune':
            self.debug_print("prune " + dir_pattern)
            if not self.exclude_pattern(None, prefix=dir_pattern):
                log.warn(("no previously-included directories found "
                          "matching '%s'"), dir_pattern)
        else:
            raise DistutilsInternalError(
                  "this cannot happen: invalid action '%s'" % action)


    # -- Filtering/selection methods -----------------------------------

    def include_pattern(self, pattern, anchor=1, prefix=None, is_regex=0):
        """Select strings (presumably filenames) from 'self.files' that
        match 'pattern', a Unix-style wildcard (glob) pattern.  Patterns
        are not quite the same as implemented by the 'fnmatch' module: '*'
        and '?'  match non-special characters, where "special" is platform-
        dependent: slash on Unix; colon, slash, and backslash on
        DOS/Windows; and colon on Mac OS.

        If 'anchor' is true (the default), then the pattern match is more
        stringent: "*.py" will match "foo.py" but not "foo/bar.py".  If
        'anchor' is false, both of these will match.

        If 'prefix' is supplied, then only filenames starting with 'prefix'
        (itself a pattern) and ending with 'pattern', with anything in between
        them, will match.  'anchor' is ignored in this case.

        If 'is_regex' is true, 'anchor' and 'prefix' are ignored, and
        'pattern' is assumed to be either a string containing a regex or a
        regex object -- no translation is done, the regex is just compiled
        and used as-is.

        Selected strings will be added to self.files.

        Return True if files are found, False otherwise.
        """
        # XXX docstring lying about what the special chars are?
        files_found = False
        pattern_re = translate_pattern(pattern, anchor, prefix, is_regex)
        self.debug_print("include_pattern: applying regex r'%s'" %
                         pattern_re.pattern)

        # delayed loading of allfiles list
        if self.allfiles is None:
            self.findall()

        for name in self.allfiles:
            if pattern_re.search(name):
                self.debug_print(" adding " + name)
                self.files.append(name)
                files_found = True
        return files_found


    def exclude_pattern (self, pattern,
                         anchor=1, prefix=None, is_regex=0):
        """Remove strings (presumably filenames) from 'files' that match
        'pattern'.  Other parameters are the same as for
        'include_pattern()', above.
        The list 'self.files' is modified in place.
        Return True if files are found, False otherwise.
        """
        files_found = False
        pattern_re = translate_pattern(pattern, anchor, prefix, is_regex)
        self.debug_print("exclude_pattern: applying regex r'%s'" %
                         pattern_re.pattern)
        for i in range(len(self.files)-1, -1, -1):
            if pattern_re.search(self.files[i]):
                self.debug_print(" removing " + self.files[i])
                del self.files[i]
                files_found = True
        return files_found


# ----------------------------------------------------------------------
# Utility functions

def _find_all_simple(path):
    """
    Find all files under 'path'
    """
    results = (
        os.path.join(base, file)
        for base, dirs, files in os.walk(path, followlinks=True)
        for file in files
    )
    return filter(os.path.isfile, results)


def findall(dir=os.curdir):
    """
    Find all files under 'dir' and return the list of full filenames.
    Unless dir is '.', return full filenames with dir prepended.
    """
    files = _find_all_simple(dir)
    if dir == os.curdir:
        make_rel = functools.partial(os.path.relpath, start=dir)
        files = map(make_rel, files)
    return list(files)


def glob_to_re(pattern):
    """Translate a shell-like glob pattern to a regular expression; return
    a string containing the regex.  Differs from 'fnmatch.translate()' in
    that '*' does not match "special characters" (which are
    platform-specific).
    """
    pattern_re = fnmatch.translate(pattern)

    # '?' and '*' in the glob pattern become '.' and '.*' in the RE, which
    # IMHO is wrong -- '?' and '*' aren't supposed to match slash in Unix,
    # and by extension they shouldn't match such "special characters" under
    # any OS.  So change all non-escaped dots in the RE to match any
    # character except the special characters (currently: just os.sep).
    sep = os.sep
    if os.sep == '\\':
        # we're using a regex to manipulate a regex, so we need
        # to escape the backslash twice
        sep = r'\\\\'
    escaped = r'\1[^%s]' % sep
    pattern_re = re.sub(r'((?<!\\)(\\\\)*)\.', escaped, pattern_re)
    return pattern_re


def translate_pattern(pattern, anchor=1, prefix=None, is_regex=0):
    """Translate a shell-like wildcard pattern to a compiled regular
    expression.  Return the compiled regex.  If 'is_regex' true,
    then 'pattern' is directly compiled to a regex (if it's a string)
    or just returned as-is (assumes it's a regex object).
    """
    if is_regex:
        if isinstance(pattern, str):
            return re.compile(pattern)
        else:
            return pattern

    # ditch start and end characters
    start, _, end = glob_to_re('_').partition('_')

    if pattern:
        pattern_re = glob_to_re(pattern)
        assert pattern_re.startswith(start) and pattern_re.endswith(end)
    else:
        pattern_re = ''

    if prefix is not None:
        prefix_re = glob_to_re(prefix)
        assert prefix_re.startswith(start) and prefix_re.endswith(end)
        prefix_re = prefix_re[len(start): len(prefix_re) - len(end)]
        sep = os.sep
        if os.sep == '\\':
            sep = r'\\'
        pattern_re = pattern_re[len(start): len(pattern_re) - len(end)]
        pattern_re = r'%s\A%s%s.*%s%s' % (start, prefix_re, sep, pattern_re, end)
    else:                               # no prefix -- respect anchor flag
        if anchor:
            pattern_re = r'%s\A%s' % (start, pattern_re[len(start):])

    return re.compile(pattern_re)
PKV[ˆ�б�log.pynu�[���"""A simple log mechanism styled after PEP 282."""

# The class here is styled after PEP 282 so that it could later be
# replaced with a standard Python logging implementation.

DEBUG = 1
INFO = 2
WARN = 3
ERROR = 4
FATAL = 5

import sys

class Log:

    def __init__(self, threshold=WARN):
        self.threshold = threshold

    def _log(self, level, msg, args):
        if level not in (DEBUG, INFO, WARN, ERROR, FATAL):
            raise ValueError('%s wrong log level' % str(level))

        if level >= self.threshold:
            if args:
                msg = msg % args
            if level in (WARN, ERROR, FATAL):
                stream = sys.stderr
            else:
                stream = sys.stdout
            try:
                stream.write('%s\n' % msg)
            except UnicodeEncodeError:
                # emulate backslashreplace error handler
                encoding = stream.encoding
                msg = msg.encode(encoding, "backslashreplace").decode(encoding)
                stream.write('%s\n' % msg)
            stream.flush()

    def log(self, level, msg, *args):
        self._log(level, msg, args)

    def debug(self, msg, *args):
        self._log(DEBUG, msg, args)

    def info(self, msg, *args):
        self._log(INFO, msg, args)

    def warn(self, msg, *args):
        self._log(WARN, msg, args)

    def error(self, msg, *args):
        self._log(ERROR, msg, args)

    def fatal(self, msg, *args):
        self._log(FATAL, msg, args)

_global_log = Log()
log = _global_log.log
debug = _global_log.debug
info = _global_log.info
warn = _global_log.warn
error = _global_log.error
fatal = _global_log.fatal

def set_threshold(level):
    # return the old threshold for use from tests
    old = _global_log.threshold
    _global_log.threshold = level
    return old

def set_verbosity(v):
    if v <= 0:
        set_threshold(WARN)
    elif v == 1:
        set_threshold(INFO)
    elif v >= 2:
        set_threshold(DEBUG)
PKV[9�RNRN_msvccompiler.pynu�[���"""distutils._msvccompiler

Contains MSVCCompiler, an implementation of the abstract CCompiler class
for Microsoft Visual Studio 2015.

The module is compatible with VS 2015 and later. You can find legacy support
for older versions in distutils.msvc9compiler and distutils.msvccompiler.
"""

# Written by Perry Stoll
# hacked by Robin Becker and Thomas Heller to do a better job of
#   finding DevStudio (through the registry)
# ported to VS 2005 and VS 2008 by Christian Heimes
# ported to VS 2015 by Steve Dower

import os
import shutil
import stat
import subprocess
import winreg

from distutils.errors import DistutilsExecError, DistutilsPlatformError, \
                             CompileError, LibError, LinkError
from distutils.ccompiler import CCompiler, gen_lib_options
from distutils import log
from distutils.util import get_platform

from itertools import count

def _find_vc2015():
    try:
        key = winreg.OpenKeyEx(
            winreg.HKEY_LOCAL_MACHINE,
            r"Software\Microsoft\VisualStudio\SxS\VC7",
            access=winreg.KEY_READ | winreg.KEY_WOW64_32KEY
        )
    except OSError:
        log.debug("Visual C++ is not registered")
        return None, None

    best_version = 0
    best_dir = None
    with key:
        for i in count():
            try:
                v, vc_dir, vt = winreg.EnumValue(key, i)
            except OSError:
                break
            if v and vt == winreg.REG_SZ and os.path.isdir(vc_dir):
                try:
                    version = int(float(v))
                except (ValueError, TypeError):
                    continue
                if version >= 14 and version > best_version:
                    best_version, best_dir = version, vc_dir
    return best_version, best_dir

def _find_vc2017():
    """Returns "15, path" based on the result of invoking vswhere.exe
    If no install is found, returns "None, None"

    The version is returned to avoid unnecessarily changing the function
    result. It may be ignored when the path is not None.

    If vswhere.exe is not available, by definition, VS 2017 is not
    installed.
    """
    import json

    root = os.environ.get("ProgramFiles(x86)") or os.environ.get("ProgramFiles")
    if not root:
        return None, None

    try:
        path = subprocess.check_output([
            os.path.join(root, "Microsoft Visual Studio", "Installer", "vswhere.exe"),
            "-latest",
            "-prerelease",
            "-requires", "Microsoft.VisualStudio.Component.VC.Tools.x86.x64",
            "-property", "installationPath",
            "-products", "*",
        ], encoding="mbcs", errors="strict").strip()
    except (subprocess.CalledProcessError, OSError, UnicodeDecodeError):
        return None, None

    path = os.path.join(path, "VC", "Auxiliary", "Build")
    if os.path.isdir(path):
        return 15, path

    return None, None

PLAT_SPEC_TO_RUNTIME = {
    'x86' : 'x86',
    'x86_amd64' : 'x64',
    'x86_arm' : 'arm',
    'x86_arm64' : 'arm64'
}

def _find_vcvarsall(plat_spec):
    # bpo-38597: Removed vcruntime return value
    _, best_dir = _find_vc2017()

    if not best_dir:
        best_version, best_dir = _find_vc2015()

    if not best_dir:
        log.debug("No suitable Visual C++ version found")
        return None, None

    vcvarsall = os.path.join(best_dir, "vcvarsall.bat")
    if not os.path.isfile(vcvarsall):
        log.debug("%s cannot be found", vcvarsall)
        return None, None

    return vcvarsall, None

def _get_vc_env(plat_spec):
    if os.getenv("DISTUTILS_USE_SDK"):
        return {
            key.lower(): value
            for key, value in os.environ.items()
        }

    vcvarsall, _ = _find_vcvarsall(plat_spec)
    if not vcvarsall:
        raise DistutilsPlatformError("Unable to find vcvarsall.bat")

    try:
        out = subprocess.check_output(
            'cmd /u /c "{}" {} && set'.format(vcvarsall, plat_spec),
            stderr=subprocess.STDOUT,
        ).decode('utf-16le', errors='replace')
    except subprocess.CalledProcessError as exc:
        log.error(exc.output)
        raise DistutilsPlatformError("Error executing {}"
                .format(exc.cmd))

    env = {
        key.lower(): value
        for key, _, value in
        (line.partition('=') for line in out.splitlines())
        if key and value
    }

    return env

def _find_exe(exe, paths=None):
    """Return path to an MSVC executable program.

    Tries to find the program in several places: first, one of the
    MSVC program search paths from the registry; next, the directories
    in the PATH environment variable.  If any of those work, return an
    absolute path that is known to exist.  If none of them work, just
    return the original program name, 'exe'.
    """
    if not paths:
        paths = os.getenv('path').split(os.pathsep)
    for p in paths:
        fn = os.path.join(os.path.abspath(p), exe)
        if os.path.isfile(fn):
            return fn
    return exe

# A map keyed by get_platform() return values to values accepted by
# 'vcvarsall.bat'. Always cross-compile from x86 to work with the
# lighter-weight MSVC installs that do not include native 64-bit tools.
PLAT_TO_VCVARS = {
    'win32' : 'x86',
    'win-amd64' : 'x86_amd64',
    'win-arm32' : 'x86_arm',
    'win-arm64' : 'x86_arm64'
}

class MSVCCompiler(CCompiler) :
    """Concrete class that implements an interface to Microsoft Visual C++,
       as defined by the CCompiler abstract class."""

    compiler_type = 'msvc'

    # Just set this so CCompiler's constructor doesn't barf.  We currently
    # don't use the 'set_executables()' bureaucracy provided by CCompiler,
    # as it really isn't necessary for this sort of single-compiler class.
    # Would be nice to have a consistent interface with UnixCCompiler,
    # though, so it's worth thinking about.
    executables = {}

    # Private class data (need to distinguish C from C++ source for compiler)
    _c_extensions = ['.c']
    _cpp_extensions = ['.cc', '.cpp', '.cxx']
    _rc_extensions = ['.rc']
    _mc_extensions = ['.mc']

    # Needed for the filename generation methods provided by the
    # base class, CCompiler.
    src_extensions = (_c_extensions + _cpp_extensions +
                      _rc_extensions + _mc_extensions)
    res_extension = '.res'
    obj_extension = '.obj'
    static_lib_extension = '.lib'
    shared_lib_extension = '.dll'
    static_lib_format = shared_lib_format = '%s%s'
    exe_extension = '.exe'


    def __init__(self, verbose=0, dry_run=0, force=0):
        CCompiler.__init__ (self, verbose, dry_run, force)
        # target platform (.plat_name is consistent with 'bdist')
        self.plat_name = None
        self.initialized = False

    def initialize(self, plat_name=None):
        # multi-init means we would need to check platform same each time...
        assert not self.initialized, "don't init multiple times"
        if plat_name is None:
            plat_name = get_platform()
        # sanity check for platforms to prevent obscure errors later.
        if plat_name not in PLAT_TO_VCVARS:
            raise DistutilsPlatformError("--plat-name must be one of {}"
                                         .format(tuple(PLAT_TO_VCVARS)))

        # Get the vcvarsall.bat spec for the requested platform.
        plat_spec = PLAT_TO_VCVARS[plat_name]

        vc_env = _get_vc_env(plat_spec)
        if not vc_env:
            raise DistutilsPlatformError("Unable to find a compatible "
                "Visual Studio installation.")

        self._paths = vc_env.get('path', '')
        paths = self._paths.split(os.pathsep)
        self.cc = _find_exe("cl.exe", paths)
        self.linker = _find_exe("link.exe", paths)
        self.lib = _find_exe("lib.exe", paths)
        self.rc = _find_exe("rc.exe", paths)   # resource compiler
        self.mc = _find_exe("mc.exe", paths)   # message compiler
        self.mt = _find_exe("mt.exe", paths)   # message compiler

        for dir in vc_env.get('include', '').split(os.pathsep):
            if dir:
                self.add_include_dir(dir.rstrip(os.sep))

        for dir in vc_env.get('lib', '').split(os.pathsep):
            if dir:
                self.add_library_dir(dir.rstrip(os.sep))

        self.preprocess_options = None
        # bpo-38597: Always compile with dynamic linking
        # Future releases of Python 3.x will include all past
        # versions of vcruntime*.dll for compatibility.
        self.compile_options = [
            '/nologo', '/Ox', '/W3', '/GL', '/DNDEBUG', '/MD'
        ]

        self.compile_options_debug = [
            '/nologo', '/Od', '/MDd', '/Zi', '/W3', '/D_DEBUG'
        ]

        ldflags = [
            '/nologo', '/INCREMENTAL:NO', '/LTCG'
        ]

        ldflags_debug = [
            '/nologo', '/INCREMENTAL:NO', '/LTCG', '/DEBUG:FULL'
        ]

        self.ldflags_exe = [*ldflags, '/MANIFEST:EMBED,ID=1']
        self.ldflags_exe_debug = [*ldflags_debug, '/MANIFEST:EMBED,ID=1']
        self.ldflags_shared = [*ldflags, '/DLL', '/MANIFEST:EMBED,ID=2', '/MANIFESTUAC:NO']
        self.ldflags_shared_debug = [*ldflags_debug, '/DLL', '/MANIFEST:EMBED,ID=2', '/MANIFESTUAC:NO']
        self.ldflags_static = [*ldflags]
        self.ldflags_static_debug = [*ldflags_debug]

        self._ldflags = {
            (CCompiler.EXECUTABLE, None): self.ldflags_exe,
            (CCompiler.EXECUTABLE, False): self.ldflags_exe,
            (CCompiler.EXECUTABLE, True): self.ldflags_exe_debug,
            (CCompiler.SHARED_OBJECT, None): self.ldflags_shared,
            (CCompiler.SHARED_OBJECT, False): self.ldflags_shared,
            (CCompiler.SHARED_OBJECT, True): self.ldflags_shared_debug,
            (CCompiler.SHARED_LIBRARY, None): self.ldflags_static,
            (CCompiler.SHARED_LIBRARY, False): self.ldflags_static,
            (CCompiler.SHARED_LIBRARY, True): self.ldflags_static_debug,
        }

        self.initialized = True

    # -- Worker methods ------------------------------------------------

    def object_filenames(self,
                         source_filenames,
                         strip_dir=0,
                         output_dir=''):
        ext_map = {
            **{ext: self.obj_extension for ext in self.src_extensions},
            **{ext: self.res_extension for ext in self._rc_extensions + self._mc_extensions},
        }

        output_dir = output_dir or ''

        def make_out_path(p):
            base, ext = os.path.splitext(p)
            if strip_dir:
                base = os.path.basename(base)
            else:
                _, base = os.path.splitdrive(base)
                if base.startswith((os.path.sep, os.path.altsep)):
                    base = base[1:]
            try:
                # XXX: This may produce absurdly long paths. We should check
                # the length of the result and trim base until we fit within
                # 260 characters.
                return os.path.join(output_dir, base + ext_map[ext])
            except LookupError:
                # Better to raise an exception instead of silently continuing
                # and later complain about sources and targets having
                # different lengths
                raise CompileError("Don't know how to compile {}".format(p))

        return list(map(make_out_path, source_filenames))


    def compile(self, sources,
                output_dir=None, macros=None, include_dirs=None, debug=0,
                extra_preargs=None, extra_postargs=None, depends=None):

        if not self.initialized:
            self.initialize()
        compile_info = self._setup_compile(output_dir, macros, include_dirs,
                                           sources, depends, extra_postargs)
        macros, objects, extra_postargs, pp_opts, build = compile_info

        compile_opts = extra_preargs or []
        compile_opts.append('/c')
        if debug:
            compile_opts.extend(self.compile_options_debug)
        else:
            compile_opts.extend(self.compile_options)


        add_cpp_opts = False

        for obj in objects:
            try:
                src, ext = build[obj]
            except KeyError:
                continue
            if debug:
                # pass the full pathname to MSVC in debug mode,
                # this allows the debugger to find the source file
                # without asking the user to browse for it
                src = os.path.abspath(src)

            if ext in self._c_extensions:
                input_opt = "/Tc" + src
            elif ext in self._cpp_extensions:
                input_opt = "/Tp" + src
                add_cpp_opts = True
            elif ext in self._rc_extensions:
                # compile .RC to .RES file
                input_opt = src
                output_opt = "/fo" + obj
                try:
                    self.spawn([self.rc] + pp_opts + [output_opt, input_opt])
                except DistutilsExecError as msg:
                    raise CompileError(msg)
                continue
            elif ext in self._mc_extensions:
                # Compile .MC to .RC file to .RES file.
                #   * '-h dir' specifies the directory for the
                #     generated include file
                #   * '-r dir' specifies the target directory of the
                #     generated RC file and the binary message resource
                #     it includes
                #
                # For now (since there are no options to change this),
                # we use the source-directory for the include file and
                # the build directory for the RC file and message
                # resources. This works at least for win32all.
                h_dir = os.path.dirname(src)
                rc_dir = os.path.dirname(obj)
                try:
                    # first compile .MC to .RC and .H file
                    self.spawn([self.mc, '-h', h_dir, '-r', rc_dir, src])
                    base, _ = os.path.splitext(os.path.basename (src))
                    rc_file = os.path.join(rc_dir, base + '.rc')
                    # then compile .RC to .RES file
                    self.spawn([self.rc, "/fo" + obj, rc_file])

                except DistutilsExecError as msg:
                    raise CompileError(msg)
                continue
            else:
                # how to handle this file?
                raise CompileError("Don't know how to compile {} to {}"
                                   .format(src, obj))

            args = [self.cc] + compile_opts + pp_opts
            if add_cpp_opts:
                args.append('/EHsc')
            args.append(input_opt)
            args.append("/Fo" + obj)
            args.extend(extra_postargs)

            try:
                self.spawn(args)
            except DistutilsExecError as msg:
                raise CompileError(msg)

        return objects


    def create_static_lib(self,
                          objects,
                          output_libname,
                          output_dir=None,
                          debug=0,
                          target_lang=None):

        if not self.initialized:
            self.initialize()
        objects, output_dir = self._fix_object_args(objects, output_dir)
        output_filename = self.library_filename(output_libname,
                                                output_dir=output_dir)

        if self._need_link(objects, output_filename):
            lib_args = objects + ['/OUT:' + output_filename]
            if debug:
                pass # XXX what goes here?
            try:
                log.debug('Executing "%s" %s', self.lib, ' '.join(lib_args))
                self.spawn([self.lib] + lib_args)
            except DistutilsExecError as msg:
                raise LibError(msg)
        else:
            log.debug("skipping %s (up-to-date)", output_filename)


    def link(self,
             target_desc,
             objects,
             output_filename,
             output_dir=None,
             libraries=None,
             library_dirs=None,
             runtime_library_dirs=None,
             export_symbols=None,
             debug=0,
             extra_preargs=None,
             extra_postargs=None,
             build_temp=None,
             target_lang=None):

        if not self.initialized:
            self.initialize()
        objects, output_dir = self._fix_object_args(objects, output_dir)
        fixed_args = self._fix_lib_args(libraries, library_dirs,
                                        runtime_library_dirs)
        libraries, library_dirs, runtime_library_dirs = fixed_args

        if runtime_library_dirs:
            self.warn("I don't know what to do with 'runtime_library_dirs': "
                       + str(runtime_library_dirs))

        lib_opts = gen_lib_options(self,
                                   library_dirs, runtime_library_dirs,
                                   libraries)
        if output_dir is not None:
            output_filename = os.path.join(output_dir, output_filename)

        if self._need_link(objects, output_filename):
            ldflags = self._ldflags[target_desc, debug]

            export_opts = ["/EXPORT:" + sym for sym in (export_symbols or [])]

            ld_args = (ldflags + lib_opts + export_opts +
                       objects + ['/OUT:' + output_filename])

            # The MSVC linker generates .lib and .exp files, which cannot be
            # suppressed by any linker switches. The .lib files may even be
            # needed! Make sure they are generated in the temporary build
            # directory. Since they have different names for debug and release
            # builds, they can go into the same directory.
            build_temp = os.path.dirname(objects[0])
            if export_symbols is not None:
                (dll_name, dll_ext) = os.path.splitext(
                    os.path.basename(output_filename))
                implib_file = os.path.join(
                    build_temp,
                    self.library_filename(dll_name))
                ld_args.append ('/IMPLIB:' + implib_file)

            if extra_preargs:
                ld_args[:0] = extra_preargs
            if extra_postargs:
                ld_args.extend(extra_postargs)

            output_dir = os.path.dirname(os.path.abspath(output_filename))
            self.mkpath(output_dir)
            try:
                log.debug('Executing "%s" %s', self.linker, ' '.join(ld_args))
                self.spawn([self.linker] + ld_args)
            except DistutilsExecError as msg:
                raise LinkError(msg)
        else:
            log.debug("skipping %s (up-to-date)", output_filename)

    def spawn(self, cmd):
        old_path = os.getenv('path')
        try:
            os.environ['path'] = self._paths
            return super().spawn(cmd)
        finally:
            os.environ['path'] = old_path

    # -- Miscellaneous methods -----------------------------------------
    # These are all used by the 'gen_lib_options() function, in
    # ccompiler.py.

    def library_dir_option(self, dir):
        return "/LIBPATH:" + dir

    def runtime_library_dir_option(self, dir):
        raise DistutilsPlatformError(
              "don't know how to set runtime library search path for MSVC")

    def library_option(self, lib):
        return self.library_filename(lib)

    def find_library_file(self, dirs, lib, debug=0):
        # Prefer a debugging library if found (and requested), but deal
        # with it if we don't have one.
        if debug:
            try_names = [lib + "_d", lib]
        else:
            try_names = [lib]
        for dir in dirs:
            for name in try_names:
                libfile = os.path.join(dir, self.library_filename(name))
                if os.path.isfile(libfile):
                    return libfile
        else:
            # Oops, didn't find it in *any* of 'dirs'
            return None
PKV[�:���command/install_scripts.pynu�[���"""distutils.command.install_scripts

Implements the Distutils 'install_scripts' command, for installing
Python scripts."""

# contributed by Bastian Kleineidam

import os
from distutils.core import Command
from distutils import log
from stat import ST_MODE


class install_scripts(Command):

    description = "install scripts (Python or otherwise)"

    user_options = [
        ('install-dir=', 'd', "directory to install scripts to"),
        ('build-dir=','b', "build directory (where to install from)"),
        ('force', 'f', "force installation (overwrite existing files)"),
        ('skip-build', None, "skip the build steps"),
    ]

    boolean_options = ['force', 'skip-build']

    def initialize_options(self):
        self.install_dir = None
        self.force = 0
        self.build_dir = None
        self.skip_build = None

    def finalize_options(self):
        self.set_undefined_options('build', ('build_scripts', 'build_dir'))
        self.set_undefined_options('install',
                                   ('install_scripts', 'install_dir'),
                                   ('force', 'force'),
                                   ('skip_build', 'skip_build'),
                                  )

    def run(self):
        if not self.skip_build:
            self.run_command('build_scripts')
        self.outfiles = self.copy_tree(self.build_dir, self.install_dir)
        if os.name == 'posix':
            # Set the executable bits (owner, group, and world) on
            # all the scripts we just installed.
            for file in self.get_outputs():
                if self.dry_run:
                    log.info("changing mode of %s", file)
                else:
                    mode = ((os.stat(file)[ST_MODE]) | 0o555) & 0o7777
                    log.info("changing mode of %s to %o", file, mode)
                    os.chmod(file, mode)

    def get_inputs(self):
        return self.distribution.scripts or []

    def get_outputs(self):
        return self.outfiles or []
PKV[����-�-command/register.pynu�[���"""distutils.command.register

Implements the Distutils 'register' command (register with the repository).
"""

# created 2002/10/21, Richard Jones

import getpass
import io
import urllib.parse, urllib.request
from warnings import warn

from distutils.core import PyPIRCCommand
from distutils.errors import *
from distutils import log

class register(PyPIRCCommand):

    description = ("register the distribution with the Python package index")
    user_options = PyPIRCCommand.user_options + [
        ('list-classifiers', None,
         'list the valid Trove classifiers'),
        ('strict', None ,
         'Will stop the registering if the meta-data are not fully compliant')
        ]
    boolean_options = PyPIRCCommand.boolean_options + [
        'verify', 'list-classifiers', 'strict']

    sub_commands = [('check', lambda self: True)]

    def initialize_options(self):
        PyPIRCCommand.initialize_options(self)
        self.list_classifiers = 0
        self.strict = 0

    def finalize_options(self):
        PyPIRCCommand.finalize_options(self)
        # setting options for the `check` subcommand
        check_options = {'strict': ('register', self.strict),
                         'restructuredtext': ('register', 1)}
        self.distribution.command_options['check'] = check_options

    def run(self):
        self.finalize_options()
        self._set_config()

        # Run sub commands
        for cmd_name in self.get_sub_commands():
            self.run_command(cmd_name)

        if self.dry_run:
            self.verify_metadata()
        elif self.list_classifiers:
            self.classifiers()
        else:
            self.send_metadata()

    def check_metadata(self):
        """Deprecated API."""
        warn("distutils.command.register.check_metadata is deprecated, \
              use the check command instead", PendingDeprecationWarning)
        check = self.distribution.get_command_obj('check')
        check.ensure_finalized()
        check.strict = self.strict
        check.restructuredtext = 1
        check.run()

    def _set_config(self):
        ''' Reads the configuration file and set attributes.
        '''
        config = self._read_pypirc()
        if config != {}:
            self.username = config['username']
            self.password = config['password']
            self.repository = config['repository']
            self.realm = config['realm']
            self.has_config = True
        else:
            if self.repository not in ('pypi', self.DEFAULT_REPOSITORY):
                raise ValueError('%s not found in .pypirc' % self.repository)
            if self.repository == 'pypi':
                self.repository = self.DEFAULT_REPOSITORY
            self.has_config = False

    def classifiers(self):
        ''' Fetch the list of classifiers from the server.
        '''
        url = self.repository+'?:action=list_classifiers'
        response = urllib.request.urlopen(url)
        log.info(self._read_pypi_response(response))

    def verify_metadata(self):
        ''' Send the metadata to the package index server to be checked.
        '''
        # send the info to the server and report the result
        (code, result) = self.post_to_server(self.build_post_data('verify'))
        log.info('Server response (%s): %s', code, result)

    def send_metadata(self):
        ''' Send the metadata to the package index server.

            Well, do the following:
            1. figure who the user is, and then
            2. send the data as a Basic auth'ed POST.

            First we try to read the username/password from $HOME/.pypirc,
            which is a ConfigParser-formatted file with a section
            [distutils] containing username and password entries (both
            in clear text). Eg:

                [distutils]
                index-servers =
                    pypi

                [pypi]
                username: fred
                password: sekrit

            Otherwise, to figure who the user is, we offer the user three
            choices:

             1. use existing login,
             2. register as a new user, or
             3. set the password to a random string and email the user.

        '''
        # see if we can short-cut and get the username/password from the
        # config
        if self.has_config:
            choice = '1'
            username = self.username
            password = self.password
        else:
            choice = 'x'
            username = password = ''

        # get the user's login info
        choices = '1 2 3 4'.split()
        while choice not in choices:
            self.announce('''\
We need to know who you are, so please choose either:
 1. use your existing login,
 2. register as a new user,
 3. have the server generate a new password for you (and email it to you), or
 4. quit
Your selection [default 1]: ''', log.INFO)
            choice = input()
            if not choice:
                choice = '1'
            elif choice not in choices:
                print('Please choose one of the four options!')

        if choice == '1':
            # get the username and password
            while not username:
                username = input('Username: ')
            while not password:
                password = getpass.getpass('Password: ')

            # set up the authentication
            auth = urllib.request.HTTPPasswordMgr()
            host = urllib.parse.urlparse(self.repository)[1]
            auth.add_password(self.realm, host, username, password)
            # send the info to the server and report the result
            code, result = self.post_to_server(self.build_post_data('submit'),
                auth)
            self.announce('Server response (%s): %s' % (code, result),
                          log.INFO)

            # possibly save the login
            if code == 200:
                if self.has_config:
                    # sharing the password in the distribution instance
                    # so the upload command can reuse it
                    self.distribution.password = password
                else:
                    self.announce(('I can store your PyPI login so future '
                                   'submissions will be faster.'), log.INFO)
                    self.announce('(the login will be stored in %s)' % \
                                  self._get_rc_file(), log.INFO)
                    choice = 'X'
                    while choice.lower() not in 'yn':
                        choice = input('Save your login (y/N)?')
                        if not choice:
                            choice = 'n'
                    if choice.lower() == 'y':
                        self._store_pypirc(username, password)

        elif choice == '2':
            data = {':action': 'user'}
            data['name'] = data['password'] = data['email'] = ''
            data['confirm'] = None
            while not data['name']:
                data['name'] = input('Username: ')
            while data['password'] != data['confirm']:
                while not data['password']:
                    data['password'] = getpass.getpass('Password: ')
                while not data['confirm']:
                    data['confirm'] = getpass.getpass(' Confirm: ')
                if data['password'] != data['confirm']:
                    data['password'] = ''
                    data['confirm'] = None
                    print("Password and confirm don't match!")
            while not data['email']:
                data['email'] = input('   EMail: ')
            code, result = self.post_to_server(data)
            if code != 200:
                log.info('Server response (%s): %s', code, result)
            else:
                log.info('You will receive an email shortly.')
                log.info(('Follow the instructions in it to '
                          'complete registration.'))
        elif choice == '3':
            data = {':action': 'password_reset'}
            data['email'] = ''
            while not data['email']:
                data['email'] = input('Your email address: ')
            code, result = self.post_to_server(data)
            log.info('Server response (%s): %s', code, result)

    def build_post_data(self, action):
        # figure the data to send - the metadata plus some additional
        # information used by the package server
        meta = self.distribution.metadata
        data = {
            ':action': action,
            'metadata_version' : '1.0',
            'name': meta.get_name(),
            'version': meta.get_version(),
            'summary': meta.get_description(),
            'home_page': meta.get_url(),
            'author': meta.get_contact(),
            'author_email': meta.get_contact_email(),
            'license': meta.get_licence(),
            'description': meta.get_long_description(),
            'keywords': meta.get_keywords(),
            'platform': meta.get_platforms(),
            'classifiers': meta.get_classifiers(),
            'download_url': meta.get_download_url(),
            # PEP 314
            'provides': meta.get_provides(),
            'requires': meta.get_requires(),
            'obsoletes': meta.get_obsoletes(),
        }
        if data['provides'] or data['requires'] or data['obsoletes']:
            data['metadata_version'] = '1.1'
        return data

    def post_to_server(self, data, auth=None):
        ''' Post a query to the server, and return a string response.
        '''
        if 'name' in data:
            self.announce('Registering %s to %s' % (data['name'],
                                                    self.repository),
                                                    log.INFO)
        # Build up the MIME payload for the urllib2 POST data
        boundary = '--------------GHSKFJDLGDS7543FJKLFHRE75642756743254'
        sep_boundary = '\n--' + boundary
        end_boundary = sep_boundary + '--'
        body = io.StringIO()
        for key, value in data.items():
            # handle multiple entries for the same name
            if type(value) not in (type([]), type( () )):
                value = [value]
            for value in value:
                value = str(value)
                body.write(sep_boundary)
                body.write('\nContent-Disposition: form-data; name="%s"'%key)
                body.write("\n\n")
                body.write(value)
                if value and value[-1] == '\r':
                    body.write('\n')  # write an extra newline (lurve Macs)
        body.write(end_boundary)
        body.write("\n")
        body = body.getvalue().encode("utf-8")

        # build the Request
        headers = {
            'Content-type': 'multipart/form-data; boundary=%s; charset=utf-8'%boundary,
            'Content-length': str(len(body))
        }
        req = urllib.request.Request(self.repository, body, headers)

        # handle HTTP and include the Basic Auth handler
        opener = urllib.request.build_opener(
            urllib.request.HTTPBasicAuthHandler(password_mgr=auth)
        )
        data = ''
        try:
            result = opener.open(req)
        except urllib.error.HTTPError as e:
            if self.show_response:
                data = e.fp.read()
            result = e.code, e.msg
        except urllib.error.URLError as e:
            result = 500, str(e)
        else:
            if self.show_response:
                data = self._read_pypi_response(result)
            result = 200, 'OK'
        if self.show_response:
            msg = '\n'.join(('-' * 75, data, '-' * 75))
            self.announce(msg, log.INFO)
        return result
PKV[,����
�
command/clean.pynu�[���"""distutils.command.clean

Implements the Distutils 'clean' command."""

# contributed by Bastian Kleineidam <calvin@cs.uni-sb.de>, added 2000-03-18

import os
from distutils.core import Command
from distutils.dir_util import remove_tree
from distutils import log

class clean(Command):

    description = "clean up temporary files from 'build' command"
    user_options = [
        ('build-base=', 'b',
         "base build directory (default: 'build.build-base')"),
        ('build-lib=', None,
         "build directory for all modules (default: 'build.build-lib')"),
        ('build-temp=', 't',
         "temporary build directory (default: 'build.build-temp')"),
        ('build-scripts=', None,
         "build directory for scripts (default: 'build.build-scripts')"),
        ('bdist-base=', None,
         "temporary directory for built distributions"),
        ('all', 'a',
         "remove all build output, not just temporary by-products")
    ]

    boolean_options = ['all']

    def initialize_options(self):
        self.build_base = None
        self.build_lib = None
        self.build_temp = None
        self.build_scripts = None
        self.bdist_base = None
        self.all = None

    def finalize_options(self):
        self.set_undefined_options('build',
                                   ('build_base', 'build_base'),
                                   ('build_lib', 'build_lib'),
                                   ('build_scripts', 'build_scripts'),
                                   ('build_temp', 'build_temp'))
        self.set_undefined_options('bdist',
                                   ('bdist_base', 'bdist_base'))

    def run(self):
        # remove the build/temp.<plat> directory (unless it's already
        # gone)
        if os.path.exists(self.build_temp):
            remove_tree(self.build_temp, dry_run=self.dry_run)
        else:
            log.debug("'%s' does not exist -- can't clean it",
                      self.build_temp)

        if self.all:
            # remove build directories
            for directory in (self.build_lib,
                              self.bdist_base,
                              self.build_scripts):
                if os.path.exists(directory):
                    remove_tree(directory, dry_run=self.dry_run)
                else:
                    log.warn("'%s' does not exist -- can't clean it",
                             directory)

        # just for the heck of it, try to remove the base build directory:
        # we might have emptied it right now, but if not we don't care
        if not self.dry_run:
            try:
                os.rmdir(self.build_base)
                log.info("removing '%s'", self.build_base)
            except OSError:
                pass
PKV[���command/install_data.pynu�[���"""distutils.command.install_data

Implements the Distutils 'install_data' command, for installing
platform-independent data files."""

# contributed by Bastian Kleineidam

import os
from distutils.core import Command
from distutils.util import change_root, convert_path

class install_data(Command):

    description = "install data files"

    user_options = [
        ('install-dir=', 'd',
         "base directory for installing data files "
         "(default: installation base dir)"),
        ('root=', None,
         "install everything relative to this alternate root directory"),
        ('force', 'f', "force installation (overwrite existing files)"),
        ]

    boolean_options = ['force']

    def initialize_options(self):
        self.install_dir = None
        self.outfiles = []
        self.root = None
        self.force = 0
        self.data_files = self.distribution.data_files
        self.warn_dir = 1

    def finalize_options(self):
        self.set_undefined_options('install',
                                   ('install_data', 'install_dir'),
                                   ('root', 'root'),
                                   ('force', 'force'),
                                  )

    def run(self):
        self.mkpath(self.install_dir)
        for f in self.data_files:
            if isinstance(f, str):
                # it's a simple file, so copy it
                f = convert_path(f)
                if self.warn_dir:
                    self.warn("setup script did not provide a directory for "
                              "'%s' -- installing right in '%s'" %
                              (f, self.install_dir))
                (out, _) = self.copy_file(f, self.install_dir)
                self.outfiles.append(out)
            else:
                # it's a tuple with path to install to and a list of files
                dir = convert_path(f[0])
                if not os.path.isabs(dir):
                    dir = os.path.join(self.install_dir, dir)
                elif self.root:
                    dir = change_root(self.root, dir)
                self.mkpath(dir)

                if f[1] == []:
                    # If there are no files listed, the user must be
                    # trying to create an empty directory, so add the
                    # directory to the list of output files.
                    self.outfiles.append(dir)
                else:
                    # Copy files, adding them to the list of output files.
                    for data in f[1]:
                        data = convert_path(data)
                        (out, _) = self.copy_file(data, dir)
                        self.outfiles.append(out)

    def get_inputs(self):
        return self.data_files or []

    def get_outputs(self):
        return self.outfiles
PKV[���7=3=3command/config.pynu�[���"""distutils.command.config

Implements the Distutils 'config' command, a (mostly) empty command class
that exists mainly to be sub-classed by specific module distributions and
applications.  The idea is that while every "config" command is different,
at least they're all named the same, and users always see "config" in the
list of standard commands.  Also, this is a good place to put common
configure-like tasks: "try to compile this C code", or "figure out where
this header file lives".
"""

import os, re

from distutils.core import Command
from distutils.errors import DistutilsExecError
from distutils.sysconfig import customize_compiler
from distutils import log

LANG_EXT = {"c": ".c", "c++": ".cxx"}

class config(Command):

    description = "prepare to build"

    user_options = [
        ('compiler=', None,
         "specify the compiler type"),
        ('cc=', None,
         "specify the compiler executable"),
        ('include-dirs=', 'I',
         "list of directories to search for header files"),
        ('define=', 'D',
         "C preprocessor macros to define"),
        ('undef=', 'U',
         "C preprocessor macros to undefine"),
        ('libraries=', 'l',
         "external C libraries to link with"),
        ('library-dirs=', 'L',
         "directories to search for external C libraries"),

        ('noisy', None,
         "show every action (compile, link, run, ...) taken"),
        ('dump-source', None,
         "dump generated source files before attempting to compile them"),
        ]


    # The three standard command methods: since the "config" command
    # does nothing by default, these are empty.

    def initialize_options(self):
        self.compiler = None
        self.cc = None
        self.include_dirs = None
        self.libraries = None
        self.library_dirs = None

        # maximal output for now
        self.noisy = 1
        self.dump_source = 1

        # list of temporary files generated along-the-way that we have
        # to clean at some point
        self.temp_files = []

    def finalize_options(self):
        if self.include_dirs is None:
            self.include_dirs = self.distribution.include_dirs or []
        elif isinstance(self.include_dirs, str):
            self.include_dirs = self.include_dirs.split(os.pathsep)

        if self.libraries is None:
            self.libraries = []
        elif isinstance(self.libraries, str):
            self.libraries = [self.libraries]

        if self.library_dirs is None:
            self.library_dirs = []
        elif isinstance(self.library_dirs, str):
            self.library_dirs = self.library_dirs.split(os.pathsep)

    def run(self):
        pass

    # Utility methods for actual "config" commands.  The interfaces are
    # loosely based on Autoconf macros of similar names.  Sub-classes
    # may use these freely.

    def _check_compiler(self):
        """Check that 'self.compiler' really is a CCompiler object;
        if not, make it one.
        """
        # We do this late, and only on-demand, because this is an expensive
        # import.
        from distutils.ccompiler import CCompiler, new_compiler
        if not isinstance(self.compiler, CCompiler):
            self.compiler = new_compiler(compiler=self.compiler,
                                         dry_run=self.dry_run, force=1)
            customize_compiler(self.compiler)
            if self.include_dirs:
                self.compiler.set_include_dirs(self.include_dirs)
            if self.libraries:
                self.compiler.set_libraries(self.libraries)
            if self.library_dirs:
                self.compiler.set_library_dirs(self.library_dirs)

    def _gen_temp_sourcefile(self, body, headers, lang):
        filename = "_configtest" + LANG_EXT[lang]
        with open(filename, "w") as file:
            if headers:
                for header in headers:
                    file.write("#include <%s>\n" % header)
                file.write("\n")
            file.write(body)
            if body[-1] != "\n":
                file.write("\n")
        return filename

    def _preprocess(self, body, headers, include_dirs, lang):
        src = self._gen_temp_sourcefile(body, headers, lang)
        out = "_configtest.i"
        self.temp_files.extend([src, out])
        self.compiler.preprocess(src, out, include_dirs=include_dirs)
        return (src, out)

    def _compile(self, body, headers, include_dirs, lang):
        src = self._gen_temp_sourcefile(body, headers, lang)
        if self.dump_source:
            dump_file(src, "compiling '%s':" % src)
        (obj,) = self.compiler.object_filenames([src])
        self.temp_files.extend([src, obj])
        self.compiler.compile([src], include_dirs=include_dirs)
        return (src, obj)

    def _link(self, body, headers, include_dirs, libraries, library_dirs,
              lang):
        (src, obj) = self._compile(body, headers, include_dirs, lang)
        prog = os.path.splitext(os.path.basename(src))[0]
        self.compiler.link_executable([obj], prog,
                                      libraries=libraries,
                                      library_dirs=library_dirs,
                                      target_lang=lang)

        if self.compiler.exe_extension is not None:
            prog = prog + self.compiler.exe_extension
        self.temp_files.append(prog)

        return (src, obj, prog)

    def _clean(self, *filenames):
        if not filenames:
            filenames = self.temp_files
            self.temp_files = []
        log.info("removing: %s", ' '.join(filenames))
        for filename in filenames:
            try:
                os.remove(filename)
            except OSError:
                pass


    # XXX these ignore the dry-run flag: what to do, what to do? even if
    # you want a dry-run build, you still need some sort of configuration
    # info.  My inclination is to make it up to the real config command to
    # consult 'dry_run', and assume a default (minimal) configuration if
    # true.  The problem with trying to do it here is that you'd have to
    # return either true or false from all the 'try' methods, neither of
    # which is correct.

    # XXX need access to the header search path and maybe default macros.

    def try_cpp(self, body=None, headers=None, include_dirs=None, lang="c"):
        """Construct a source file from 'body' (a string containing lines
        of C/C++ code) and 'headers' (a list of header files to include)
        and run it through the preprocessor.  Return true if the
        preprocessor succeeded, false if there were any errors.
        ('body' probably isn't of much use, but what the heck.)
        """
        from distutils.ccompiler import CompileError
        self._check_compiler()
        ok = True
        try:
            self._preprocess(body, headers, include_dirs, lang)
        except CompileError:
            ok = False

        self._clean()
        return ok

    def search_cpp(self, pattern, body=None, headers=None, include_dirs=None,
                   lang="c"):
        """Construct a source file (just like 'try_cpp()'), run it through
        the preprocessor, and return true if any line of the output matches
        'pattern'.  'pattern' should either be a compiled regex object or a
        string containing a regex.  If both 'body' and 'headers' are None,
        preprocesses an empty file -- which can be useful to determine the
        symbols the preprocessor and compiler set by default.
        """
        self._check_compiler()
        src, out = self._preprocess(body, headers, include_dirs, lang)

        if isinstance(pattern, str):
            pattern = re.compile(pattern)

        with open(out) as file:
            match = False
            while True:
                line = file.readline()
                if line == '':
                    break
                if pattern.search(line):
                    match = True
                    break

        self._clean()
        return match

    def try_compile(self, body, headers=None, include_dirs=None, lang="c"):
        """Try to compile a source file built from 'body' and 'headers'.
        Return true on success, false otherwise.
        """
        from distutils.ccompiler import CompileError
        self._check_compiler()
        try:
            self._compile(body, headers, include_dirs, lang)
            ok = True
        except CompileError:
            ok = False

        log.info(ok and "success!" or "failure.")
        self._clean()
        return ok

    def try_link(self, body, headers=None, include_dirs=None, libraries=None,
                 library_dirs=None, lang="c"):
        """Try to compile and link a source file, built from 'body' and
        'headers', to executable form.  Return true on success, false
        otherwise.
        """
        from distutils.ccompiler import CompileError, LinkError
        self._check_compiler()
        try:
            self._link(body, headers, include_dirs,
                       libraries, library_dirs, lang)
            ok = True
        except (CompileError, LinkError):
            ok = False

        log.info(ok and "success!" or "failure.")
        self._clean()
        return ok

    def try_run(self, body, headers=None, include_dirs=None, libraries=None,
                library_dirs=None, lang="c"):
        """Try to compile, link to an executable, and run a program
        built from 'body' and 'headers'.  Return true on success, false
        otherwise.
        """
        from distutils.ccompiler import CompileError, LinkError
        self._check_compiler()
        try:
            src, obj, exe = self._link(body, headers, include_dirs,
                                       libraries, library_dirs, lang)
            self.spawn([exe])
            ok = True
        except (CompileError, LinkError, DistutilsExecError):
            ok = False

        log.info(ok and "success!" or "failure.")
        self._clean()
        return ok


    # -- High-level methods --------------------------------------------
    # (these are the ones that are actually likely to be useful
    # when implementing a real-world config command!)

    def check_func(self, func, headers=None, include_dirs=None,
                   libraries=None, library_dirs=None, decl=0, call=0):
        """Determine if function 'func' is available by constructing a
        source file that refers to 'func', and compiles and links it.
        If everything succeeds, returns true; otherwise returns false.

        The constructed source file starts out by including the header
        files listed in 'headers'.  If 'decl' is true, it then declares
        'func' (as "int func()"); you probably shouldn't supply 'headers'
        and set 'decl' true in the same call, or you might get errors about
        a conflicting declarations for 'func'.  Finally, the constructed
        'main()' function either references 'func' or (if 'call' is true)
        calls it.  'libraries' and 'library_dirs' are used when
        linking.
        """
        self._check_compiler()
        body = []
        if decl:
            body.append("int %s ();" % func)
        body.append("int main () {")
        if call:
            body.append("  %s();" % func)
        else:
            body.append("  %s;" % func)
        body.append("}")
        body = "\n".join(body) + "\n"

        return self.try_link(body, headers, include_dirs,
                             libraries, library_dirs)

    def check_lib(self, library, library_dirs=None, headers=None,
                  include_dirs=None, other_libraries=[]):
        """Determine if 'library' is available to be linked against,
        without actually checking that any particular symbols are provided
        by it.  'headers' will be used in constructing the source file to
        be compiled, but the only effect of this is to check if all the
        header files listed are available.  Any libraries listed in
        'other_libraries' will be included in the link, in case 'library'
        has symbols that depend on other libraries.
        """
        self._check_compiler()
        return self.try_link("int main (void) { }", headers, include_dirs,
                             [library] + other_libraries, library_dirs)

    def check_header(self, header, include_dirs=None, library_dirs=None,
                     lang="c"):
        """Determine if the system header file named by 'header_file'
        exists and can be found by the preprocessor; return true if so,
        false otherwise.
        """
        return self.try_cpp(body="/* No body */", headers=[header],
                            include_dirs=include_dirs)

def dump_file(filename, head=None):
    """Dumps a file content into log.info.

    If head is not None, will be dumped before the file content.
    """
    if head is None:
        log.info('%s', filename)
    else:
        log.info(head)
    file = open(filename)
    try:
        log.info(file.read())
    finally:
        file.close()
PKV[�d+�XXcommand/build_scripts.pynu�[���"""distutils.command.build_scripts

Implements the Distutils 'build_scripts' command."""

import os, re
from stat import ST_MODE
from distutils import sysconfig
from distutils.core import Command
from distutils.dep_util import newer
from distutils.util import convert_path, Mixin2to3
from distutils import log
import tokenize

# check if Python is called on the first line with this expression
first_line_re = re.compile(b'^#!.*python[0-9.]*([ \t].*)?$')

class build_scripts(Command):

    description = "\"build\" scripts (copy and fixup #! line)"

    user_options = [
        ('build-dir=', 'd', "directory to \"build\" (copy) to"),
        ('force', 'f', "forcibly build everything (ignore file timestamps"),
        ('executable=', 'e', "specify final destination interpreter path"),
        ]

    boolean_options = ['force']


    def initialize_options(self):
        self.build_dir = None
        self.scripts = None
        self.force = None
        self.executable = None
        self.outfiles = None

    def finalize_options(self):
        self.set_undefined_options('build',
                                   ('build_scripts', 'build_dir'),
                                   ('force', 'force'),
                                   ('executable', 'executable'))
        self.scripts = self.distribution.scripts

    def get_source_files(self):
        return self.scripts

    def run(self):
        if not self.scripts:
            return
        self.copy_scripts()


    def copy_scripts(self):
        r"""Copy each script listed in 'self.scripts'; if it's marked as a
        Python script in the Unix way (first line matches 'first_line_re',
        ie. starts with "\#!" and contains "python"), then adjust the first
        line to refer to the current Python interpreter as we copy.
        """
        self.mkpath(self.build_dir)
        outfiles = []
        updated_files = []
        for script in self.scripts:
            adjust = False
            script = convert_path(script)
            outfile = os.path.join(self.build_dir, os.path.basename(script))
            outfiles.append(outfile)

            if not self.force and not newer(script, outfile):
                log.debug("not copying %s (up-to-date)", script)
                continue

            # Always open the file, but ignore failures in dry-run mode --
            # that way, we'll get accurate feedback if we can read the
            # script.
            try:
                f = open(script, "rb")
            except OSError:
                if not self.dry_run:
                    raise
                f = None
            else:
                encoding, lines = tokenize.detect_encoding(f.readline)
                f.seek(0)
                first_line = f.readline()
                if not first_line:
                    self.warn("%s is an empty file (skipping)" % script)
                    continue

                match = first_line_re.match(first_line)
                if match:
                    adjust = True
                    post_interp = match.group(1) or b''

            if adjust:
                log.info("copying and adjusting %s -> %s", script,
                         self.build_dir)
                updated_files.append(outfile)
                if not self.dry_run:
                    if not sysconfig.python_build:
                        executable = self.executable
                    else:
                        executable = os.path.join(
                            sysconfig.get_config_var("BINDIR"),
                           "python%s%s" % (sysconfig.get_config_var("VERSION"),
                                           sysconfig.get_config_var("EXE")))
                    executable = os.fsencode(executable)
                    shebang = b"#!" + executable + post_interp + b"\n"
                    # Python parser starts to read a script using UTF-8 until
                    # it gets a #coding:xxx cookie. The shebang has to be the
                    # first line of a file, the #coding:xxx cookie cannot be
                    # written before. So the shebang has to be decodable from
                    # UTF-8.
                    try:
                        shebang.decode('utf-8')
                    except UnicodeDecodeError:
                        raise ValueError(
                            "The shebang ({!r}) is not decodable "
                            "from utf-8".format(shebang))
                    # If the script is encoded to a custom encoding (use a
                    # #coding:xxx cookie), the shebang has to be decodable from
                    # the script encoding too.
                    try:
                        shebang.decode(encoding)
                    except UnicodeDecodeError:
                        raise ValueError(
                            "The shebang ({!r}) is not decodable "
                            "from the script encoding ({})"
                            .format(shebang, encoding))
                    with open(outfile, "wb") as outf:
                        outf.write(shebang)
                        outf.writelines(f.readlines())
                if f:
                    f.close()
            else:
                if f:
                    f.close()
                updated_files.append(outfile)
                self.copy_file(script, outfile)

        if os.name == 'posix':
            for file in outfiles:
                if self.dry_run:
                    log.info("changing mode of %s", file)
                else:
                    oldmode = os.stat(file)[ST_MODE] & 0o7777
                    newmode = (oldmode | 0o555) & 0o7777
                    if newmode != oldmode:
                        log.info("changing mode of %s from %o to %o",
                                 file, oldmode, newmode)
                        os.chmod(file, newmode)
        # XXX should we modify self.outfiles?
        return outfiles, updated_files

class build_scripts_2to3(build_scripts, Mixin2to3):

    def copy_scripts(self):
        outfiles, updated_files = build_scripts.copy_scripts(self)
        if not self.dry_run:
            self.run_2to3(updated_files)
        return outfiles, updated_files
PKV[��ndITITcommand/bdist_rpm.pynu�[���"""distutils.command.bdist_rpm

Implements the Distutils 'bdist_rpm' command (create RPM source and binary
distributions)."""

import subprocess, sys, os
from distutils.core import Command
from distutils.debug import DEBUG
from distutils.util import get_platform
from distutils.file_util import write_file
from distutils.errors import *
from distutils.sysconfig import get_python_version
from distutils import log

class bdist_rpm(Command):

    description = "create an RPM distribution"

    user_options = [
        ('bdist-base=', None,
         "base directory for creating built distributions"),
        ('rpm-base=', None,
         "base directory for creating RPMs (defaults to \"rpm\" under "
         "--bdist-base; must be specified for RPM 2)"),
        ('dist-dir=', 'd',
         "directory to put final RPM files in "
         "(and .spec files if --spec-only)"),
        ('python=', None,
         "path to Python interpreter to hard-code in the .spec file "
         "(default: \"python\")"),
        ('fix-python', None,
         "hard-code the exact path to the current Python interpreter in "
         "the .spec file"),
        ('spec-only', None,
         "only regenerate spec file"),
        ('source-only', None,
         "only generate source RPM"),
        ('binary-only', None,
         "only generate binary RPM"),
        ('use-bzip2', None,
         "use bzip2 instead of gzip to create source distribution"),

        # More meta-data: too RPM-specific to put in the setup script,
        # but needs to go in the .spec file -- so we make these options
        # to "bdist_rpm".  The idea is that packagers would put this
        # info in setup.cfg, although they are of course free to
        # supply it on the command line.
        ('distribution-name=', None,
         "name of the (Linux) distribution to which this "
         "RPM applies (*not* the name of the module distribution!)"),
        ('group=', None,
         "package classification [default: \"Development/Libraries\"]"),
        ('release=', None,
         "RPM release number"),
        ('serial=', None,
         "RPM serial number"),
        ('vendor=', None,
         "RPM \"vendor\" (eg. \"Joe Blow <joe@example.com>\") "
         "[default: maintainer or author from setup script]"),
        ('packager=', None,
         "RPM packager (eg. \"Jane Doe <jane@example.net>\") "
         "[default: vendor]"),
        ('doc-files=', None,
         "list of documentation files (space or comma-separated)"),
        ('changelog=', None,
         "RPM changelog"),
        ('icon=', None,
         "name of icon file"),
        ('provides=', None,
         "capabilities provided by this package"),
        ('requires=', None,
         "capabilities required by this package"),
        ('conflicts=', None,
         "capabilities which conflict with this package"),
        ('build-requires=', None,
         "capabilities required to build this package"),
        ('obsoletes=', None,
         "capabilities made obsolete by this package"),
        ('no-autoreq', None,
         "do not automatically calculate dependencies"),

        # Actions to take when building RPM
        ('keep-temp', 'k',
         "don't clean up RPM build directory"),
        ('no-keep-temp', None,
         "clean up RPM build directory [default]"),
        ('use-rpm-opt-flags', None,
         "compile with RPM_OPT_FLAGS when building from source RPM"),
        ('no-rpm-opt-flags', None,
         "do not pass any RPM CFLAGS to compiler"),
        ('rpm3-mode', None,
         "RPM 3 compatibility mode (default)"),
        ('rpm2-mode', None,
         "RPM 2 compatibility mode"),

        # Add the hooks necessary for specifying custom scripts
        ('prep-script=', None,
         "Specify a script for the PREP phase of RPM building"),
        ('build-script=', None,
         "Specify a script for the BUILD phase of RPM building"),

        ('pre-install=', None,
         "Specify a script for the pre-INSTALL phase of RPM building"),
        ('install-script=', None,
         "Specify a script for the INSTALL phase of RPM building"),
        ('post-install=', None,
         "Specify a script for the post-INSTALL phase of RPM building"),

        ('pre-uninstall=', None,
         "Specify a script for the pre-UNINSTALL phase of RPM building"),
        ('post-uninstall=', None,
         "Specify a script for the post-UNINSTALL phase of RPM building"),

        ('clean-script=', None,
         "Specify a script for the CLEAN phase of RPM building"),

        ('verify-script=', None,
         "Specify a script for the VERIFY phase of the RPM build"),

        # Allow a packager to explicitly force an architecture
        ('force-arch=', None,
         "Force an architecture onto the RPM build process"),

        ('quiet', 'q',
         "Run the INSTALL phase of RPM building in quiet mode"),
        ]

    boolean_options = ['keep-temp', 'use-rpm-opt-flags', 'rpm3-mode',
                       'no-autoreq', 'quiet']

    negative_opt = {'no-keep-temp': 'keep-temp',
                    'no-rpm-opt-flags': 'use-rpm-opt-flags',
                    'rpm2-mode': 'rpm3-mode'}


    def initialize_options(self):
        self.bdist_base = None
        self.rpm_base = None
        self.dist_dir = None
        self.python = None
        self.fix_python = None
        self.spec_only = None
        self.binary_only = None
        self.source_only = None
        self.use_bzip2 = None

        self.distribution_name = None
        self.group = None
        self.release = None
        self.serial = None
        self.vendor = None
        self.packager = None
        self.doc_files = None
        self.changelog = None
        self.icon = None

        self.prep_script = None
        self.build_script = None
        self.install_script = None
        self.clean_script = None
        self.verify_script = None
        self.pre_install = None
        self.post_install = None
        self.pre_uninstall = None
        self.post_uninstall = None
        self.prep = None
        self.provides = None
        self.requires = None
        self.conflicts = None
        self.build_requires = None
        self.obsoletes = None

        self.keep_temp = 0
        self.use_rpm_opt_flags = 1
        self.rpm3_mode = 1
        self.no_autoreq = 0

        self.force_arch = None
        self.quiet = 0

    def finalize_options(self):
        self.set_undefined_options('bdist', ('bdist_base', 'bdist_base'))
        if self.rpm_base is None:
            if not self.rpm3_mode:
                raise DistutilsOptionError(
                      "you must specify --rpm-base in RPM 2 mode")
            self.rpm_base = os.path.join(self.bdist_base, "rpm")

        if self.python is None:
            if self.fix_python:
                self.python = sys.executable
            else:
                self.python = "python3"
        elif self.fix_python:
            raise DistutilsOptionError(
                  "--python and --fix-python are mutually exclusive options")

        if os.name != 'posix':
            raise DistutilsPlatformError("don't know how to create RPM "
                   "distributions on platform %s" % os.name)
        if self.binary_only and self.source_only:
            raise DistutilsOptionError(
                  "cannot supply both '--source-only' and '--binary-only'")

        # don't pass CFLAGS to pure python distributions
        if not self.distribution.has_ext_modules():
            self.use_rpm_opt_flags = 0

        self.set_undefined_options('bdist', ('dist_dir', 'dist_dir'))
        self.finalize_package_data()

    def finalize_package_data(self):
        self.ensure_string('group', "Development/Libraries")
        self.ensure_string('vendor',
                           "%s <%s>" % (self.distribution.get_contact(),
                                        self.distribution.get_contact_email()))
        self.ensure_string('packager')
        self.ensure_string_list('doc_files')
        if isinstance(self.doc_files, list):
            for readme in ('README', 'README.txt'):
                if os.path.exists(readme) and readme not in self.doc_files:
                    self.doc_files.append(readme)

        self.ensure_string('release', "1")
        self.ensure_string('serial')   # should it be an int?

        self.ensure_string('distribution_name')

        self.ensure_string('changelog')
          # Format changelog correctly
        self.changelog = self._format_changelog(self.changelog)

        self.ensure_filename('icon')

        self.ensure_filename('prep_script')
        self.ensure_filename('build_script')
        self.ensure_filename('install_script')
        self.ensure_filename('clean_script')
        self.ensure_filename('verify_script')
        self.ensure_filename('pre_install')
        self.ensure_filename('post_install')
        self.ensure_filename('pre_uninstall')
        self.ensure_filename('post_uninstall')

        # XXX don't forget we punted on summaries and descriptions -- they
        # should be handled here eventually!

        # Now *this* is some meta-data that belongs in the setup script...
        self.ensure_string_list('provides')
        self.ensure_string_list('requires')
        self.ensure_string_list('conflicts')
        self.ensure_string_list('build_requires')
        self.ensure_string_list('obsoletes')

        self.ensure_string('force_arch')

    def run(self):
        if DEBUG:
            print("before _get_package_data():")
            print("vendor =", self.vendor)
            print("packager =", self.packager)
            print("doc_files =", self.doc_files)
            print("changelog =", self.changelog)

        # make directories
        if self.spec_only:
            spec_dir = self.dist_dir
            self.mkpath(spec_dir)
        else:
            rpm_dir = {}
            for d in ('SOURCES', 'SPECS', 'BUILD', 'RPMS', 'SRPMS'):
                rpm_dir[d] = os.path.join(self.rpm_base, d)
                self.mkpath(rpm_dir[d])
            spec_dir = rpm_dir['SPECS']

        # Spec file goes into 'dist_dir' if '--spec-only specified',
        # build/rpm.<plat> otherwise.
        spec_path = os.path.join(spec_dir,
                                 "%s.spec" % self.distribution.get_name())
        self.execute(write_file,
                     (spec_path,
                      self._make_spec_file()),
                     "writing '%s'" % spec_path)

        if self.spec_only: # stop if requested
            return

        # Make a source distribution and copy to SOURCES directory with
        # optional icon.
        saved_dist_files = self.distribution.dist_files[:]
        sdist = self.reinitialize_command('sdist')
        if self.use_bzip2:
            sdist.formats = ['bztar']
        else:
            sdist.formats = ['gztar']
        self.run_command('sdist')
        self.distribution.dist_files = saved_dist_files

        source = sdist.get_archive_files()[0]
        source_dir = rpm_dir['SOURCES']
        self.copy_file(source, source_dir)

        if self.icon:
            if os.path.exists(self.icon):
                self.copy_file(self.icon, source_dir)
            else:
                raise DistutilsFileError(
                      "icon file '%s' does not exist" % self.icon)

        # build package
        log.info("building RPMs")
        rpm_cmd = ['rpmbuild']

        if self.source_only: # what kind of RPMs?
            rpm_cmd.append('-bs')
        elif self.binary_only:
            rpm_cmd.append('-bb')
        else:
            rpm_cmd.append('-ba')
        rpm_cmd.extend(['--define', '__python %s' % self.python])
        if self.rpm3_mode:
            rpm_cmd.extend(['--define',
                             '_topdir %s' % os.path.abspath(self.rpm_base)])
        if not self.keep_temp:
            rpm_cmd.append('--clean')

        if self.quiet:
            rpm_cmd.append('--quiet')

        rpm_cmd.append(spec_path)
        # Determine the binary rpm names that should be built out of this spec
        # file
        # Note that some of these may not be really built (if the file
        # list is empty)
        nvr_string = "%{name}-%{version}-%{release}"
        src_rpm = nvr_string + ".src.rpm"
        non_src_rpm = "%{arch}/" + nvr_string + ".%{arch}.rpm"
        q_cmd = r"rpm -q --qf '%s %s\n' --specfile '%s'" % (
            src_rpm, non_src_rpm, spec_path)

        out = os.popen(q_cmd)
        try:
            binary_rpms = []
            source_rpm = None
            while True:
                line = out.readline()
                if not line:
                    break
                l = line.strip().split()
                assert(len(l) == 2)
                binary_rpms.append(l[1])
                # The source rpm is named after the first entry in the spec file
                if source_rpm is None:
                    source_rpm = l[0]

            status = out.close()
            if status:
                raise DistutilsExecError("Failed to execute: %s" % repr(q_cmd))

        finally:
            out.close()

        self.spawn(rpm_cmd)

        if not self.dry_run:
            if self.distribution.has_ext_modules():
                pyversion = get_python_version()
            else:
                pyversion = 'any'

            if not self.binary_only:
                srpm = os.path.join(rpm_dir['SRPMS'], source_rpm)
                assert(os.path.exists(srpm))
                self.move_file(srpm, self.dist_dir)
                filename = os.path.join(self.dist_dir, source_rpm)
                self.distribution.dist_files.append(
                    ('bdist_rpm', pyversion, filename))

            if not self.source_only:
                for rpm in binary_rpms:
                    rpm = os.path.join(rpm_dir['RPMS'], rpm)
                    if os.path.exists(rpm):
                        self.move_file(rpm, self.dist_dir)
                        filename = os.path.join(self.dist_dir,
                                                os.path.basename(rpm))
                        self.distribution.dist_files.append(
                            ('bdist_rpm', pyversion, filename))

    def _dist_path(self, path):
        return os.path.join(self.dist_dir, os.path.basename(path))

    def _make_spec_file(self):
        """Generate the text of an RPM spec file and return it as a
        list of strings (one per line).
        """
        # definitions and headers
        spec_file = [
            '%define name ' + self.distribution.get_name(),
            '%define version ' + self.distribution.get_version().replace('-','_'),
            '%define unmangled_version ' + self.distribution.get_version(),
            '%define release ' + self.release.replace('-','_'),
            '',
            'Summary: ' + self.distribution.get_description(),
            ]

        # Workaround for #14443 which affects some RPM based systems such as
        # RHEL6 (and probably derivatives)
        vendor_hook = subprocess.getoutput('rpm --eval %{__os_install_post}')
        # Generate a potential replacement value for __os_install_post (whilst
        # normalizing the whitespace to simplify the test for whether the
        # invocation of brp-python-bytecompile passes in __python):
        vendor_hook = '\n'.join(['  %s \\' % line.strip()
                                 for line in vendor_hook.splitlines()])
        problem = "brp-python-bytecompile \\\n"
        fixed = "brp-python-bytecompile %{__python} \\\n"
        fixed_hook = vendor_hook.replace(problem, fixed)
        if fixed_hook != vendor_hook:
            spec_file.append('# Workaround for http://bugs.python.org/issue14443')
            spec_file.append('%define __os_install_post ' + fixed_hook + '\n')

        # put locale summaries into spec file
        # XXX not supported for now (hard to put a dictionary
        # in a config file -- arg!)
        #for locale in self.summaries.keys():
        #    spec_file.append('Summary(%s): %s' % (locale,
        #                                          self.summaries[locale]))

        spec_file.extend([
            'Name: %{name}',
            'Version: %{version}',
            'Release: %{release}',])

        # XXX yuck! this filename is available from the "sdist" command,
        # but only after it has run: and we create the spec file before
        # running "sdist", in case of --spec-only.
        if self.use_bzip2:
            spec_file.append('Source0: %{name}-%{unmangled_version}.tar.bz2')
        else:
            spec_file.append('Source0: %{name}-%{unmangled_version}.tar.gz')

        spec_file.extend([
            'License: ' + self.distribution.get_license(),
            'Group: ' + self.group,
            'BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot',
            'Prefix: %{_prefix}', ])

        if not self.force_arch:
            # noarch if no extension modules
            if not self.distribution.has_ext_modules():
                spec_file.append('BuildArch: noarch')
        else:
            spec_file.append( 'BuildArch: %s' % self.force_arch )

        for field in ('Vendor',
                      'Packager',
                      'Provides',
                      'Requires',
                      'Conflicts',
                      'Obsoletes',
                      ):
            val = getattr(self, field.lower())
            if isinstance(val, list):
                spec_file.append('%s: %s' % (field, ' '.join(val)))
            elif val is not None:
                spec_file.append('%s: %s' % (field, val))


        if self.distribution.get_url() != 'UNKNOWN':
            spec_file.append('Url: ' + self.distribution.get_url())

        if self.distribution_name:
            spec_file.append('Distribution: ' + self.distribution_name)

        if self.build_requires:
            spec_file.append('BuildRequires: ' +
                             ' '.join(self.build_requires))

        if self.icon:
            spec_file.append('Icon: ' + os.path.basename(self.icon))

        if self.no_autoreq:
            spec_file.append('AutoReq: 0')

        spec_file.extend([
            '',
            '%description',
            self.distribution.get_long_description()
            ])

        # put locale descriptions into spec file
        # XXX again, suppressed because config file syntax doesn't
        # easily support this ;-(
        #for locale in self.descriptions.keys():
        #    spec_file.extend([
        #        '',
        #        '%description -l ' + locale,
        #        self.descriptions[locale],
        #        ])

        # rpm scripts
        # figure out default build script
        def_setup_call = "%s %s" % (self.python,os.path.basename(sys.argv[0]))
        def_build = "%s build" % def_setup_call
        if self.use_rpm_opt_flags:
            def_build = 'env CFLAGS="$RPM_OPT_FLAGS" ' + def_build

        # insert contents of files

        # XXX this is kind of misleading: user-supplied options are files
        # that we open and interpolate into the spec file, but the defaults
        # are just text that we drop in as-is.  Hmmm.

        install_cmd = ('%s install -O1 --root=$RPM_BUILD_ROOT '
                       '--record=INSTALLED_FILES') % def_setup_call

        script_options = [
            ('prep', 'prep_script', "%setup -n %{name}-%{unmangled_version}"),
            ('build', 'build_script', def_build),
            ('install', 'install_script', install_cmd),
            ('clean', 'clean_script', "rm -rf $RPM_BUILD_ROOT"),
            ('verifyscript', 'verify_script', None),
            ('pre', 'pre_install', None),
            ('post', 'post_install', None),
            ('preun', 'pre_uninstall', None),
            ('postun', 'post_uninstall', None),
        ]

        for (rpm_opt, attr, default) in script_options:
            # Insert contents of file referred to, if no file is referred to
            # use 'default' as contents of script
            val = getattr(self, attr)
            if val or default:
                spec_file.extend([
                    '',
                    '%' + rpm_opt,])
                if val:
                    with open(val) as f:
                        spec_file.extend(f.read().split('\n'))
                else:
                    spec_file.append(default)


        # files section
        spec_file.extend([
            '',
            '%files -f INSTALLED_FILES',
            '%defattr(-,root,root)',
            ])

        if self.doc_files:
            spec_file.append('%doc ' + ' '.join(self.doc_files))

        if self.changelog:
            spec_file.extend([
                '',
                '%changelog',])
            spec_file.extend(self.changelog)

        return spec_file

    def _format_changelog(self, changelog):
        """Format the changelog correctly and convert it to a list of strings
        """
        if not changelog:
            return changelog
        new_changelog = []
        for line in changelog.strip().split('\n'):
            line = line.strip()
            if line[0] == '*':
                new_changelog.extend(['', line])
            elif line[0] == '-':
                new_changelog.append(line)
            else:
                new_changelog.append('  ' + line)

        # strip trailing newline inserted by first changelog entry
        if not new_changelog[0]:
            del new_changelog[0]

        return new_changelog
PKV[��x���command/build.pynu�[���"""distutils.command.build

Implements the Distutils 'build' command."""

import sys, os
from distutils.core import Command
from distutils.errors import DistutilsOptionError
from distutils.util import get_platform


def show_compilers():
    from distutils.ccompiler import show_compilers
    show_compilers()


class build(Command):

    description = "build everything needed to install"

    user_options = [
        ('build-base=', 'b',
         "base directory for build library"),
        ('build-purelib=', None,
         "build directory for platform-neutral distributions"),
        ('build-platlib=', None,
         "build directory for platform-specific distributions"),
        ('build-lib=', None,
         "build directory for all distribution (defaults to either " +
         "build-purelib or build-platlib"),
        ('build-scripts=', None,
         "build directory for scripts"),
        ('build-temp=', 't',
         "temporary build directory"),
        ('plat-name=', 'p',
         "platform name to build for, if supported "
         "(default: %s)" % get_platform()),
        ('compiler=', 'c',
         "specify the compiler type"),
        ('parallel=', 'j',
         "number of parallel build jobs"),
        ('debug', 'g',
         "compile extensions and libraries with debugging information"),
        ('force', 'f',
         "forcibly build everything (ignore file timestamps)"),
        ('executable=', 'e',
         "specify final destination interpreter path (build.py)"),
        ]

    boolean_options = ['debug', 'force']

    help_options = [
        ('help-compiler', None,
         "list available compilers", show_compilers),
        ]

    def initialize_options(self):
        self.build_base = 'build'
        # these are decided only after 'build_base' has its final value
        # (unless overridden by the user or client)
        self.build_purelib = None
        self.build_platlib = None
        self.build_lib = None
        self.build_temp = None
        self.build_scripts = None
        self.compiler = None
        self.plat_name = None
        self.debug = None
        self.force = 0
        self.executable = None
        self.parallel = None

    def finalize_options(self):
        if self.plat_name is None:
            self.plat_name = get_platform()
        else:
            # plat-name only supported for windows (other platforms are
            # supported via ./configure flags, if at all).  Avoid misleading
            # other platforms.
            if os.name != 'nt':
                raise DistutilsOptionError(
                            "--plat-name only supported on Windows (try "
                            "using './configure --help' on your platform)")

        plat_specifier = ".%s-%d.%d" % (self.plat_name, *sys.version_info[:2])

        # Make it so Python 2.x and Python 2.x with --with-pydebug don't
        # share the same build directories. Doing so confuses the build
        # process for C modules
        if hasattr(sys, 'gettotalrefcount'):
            plat_specifier += '-pydebug'

        # 'build_purelib' and 'build_platlib' just default to 'lib' and
        # 'lib.<plat>' under the base build directory.  We only use one of
        # them for a given distribution, though --
        if self.build_purelib is None:
            self.build_purelib = os.path.join(self.build_base, 'lib')
        if self.build_platlib is None:
            self.build_platlib = os.path.join(self.build_base,
                                              'lib' + plat_specifier)

        # 'build_lib' is the actual directory that we will use for this
        # particular module distribution -- if user didn't supply it, pick
        # one of 'build_purelib' or 'build_platlib'.
        if self.build_lib is None:
            if self.distribution.ext_modules:
                self.build_lib = self.build_platlib
            else:
                self.build_lib = self.build_purelib

        # 'build_temp' -- temporary directory for compiler turds,
        # "build/temp.<plat>"
        if self.build_temp is None:
            self.build_temp = os.path.join(self.build_base,
                                           'temp' + plat_specifier)
        if self.build_scripts is None:
            self.build_scripts = os.path.join(self.build_base,
                                              'scripts-%d.%d' % sys.version_info[:2])

        if self.executable is None and sys.executable:
            self.executable = os.path.normpath(sys.executable)

        if isinstance(self.parallel, str):
            try:
                self.parallel = int(self.parallel)
            except ValueError:
                raise DistutilsOptionError("parallel should be an integer")

    def run(self):
        # Run all relevant sub-commands.  This will be some subset of:
        #  - build_py      - pure Python modules
        #  - build_clib    - standalone C libraries
        #  - build_ext     - Python extensions
        #  - build_scripts - (Python) scripts
        for cmd_name in self.get_sub_commands():
            self.run_command(cmd_name)


    # -- Predicates for the sub-command list ---------------------------

    def has_pure_modules(self):
        return self.distribution.has_pure_modules()

    def has_c_libraries(self):
        return self.distribution.has_c_libraries()

    def has_ext_modules(self):
        return self.distribution.has_ext_modules()

    def has_scripts(self):
        return self.distribution.has_scripts()


    sub_commands = [('build_py',      has_pure_modules),
                    ('build_clib',    has_c_libraries),
                    ('build_ext',     has_ext_modules),
                    ('build_scripts', has_scripts),
                   ]
PKV[��E߉߉command/bdist_msi.pynu�[���# Copyright (C) 2005, 2006 Martin von Löwis
# Licensed to PSF under a Contributor Agreement.
# The bdist_wininst command proper
# based on bdist_wininst
"""
Implements the bdist_msi command.
"""

import sys, os
from distutils.core import Command
from distutils.dir_util import remove_tree
from distutils.sysconfig import get_python_version
from distutils.version import StrictVersion
from distutils.errors import DistutilsOptionError
from distutils.util import get_platform
from distutils import log
import msilib
from msilib import schema, sequence, text
from msilib import Directory, Feature, Dialog, add_data

class PyDialog(Dialog):
    """Dialog class with a fixed layout: controls at the top, then a ruler,
    then a list of buttons: back, next, cancel. Optionally a bitmap at the
    left."""
    def __init__(self, *args, **kw):
        """Dialog(database, name, x, y, w, h, attributes, title, first,
        default, cancel, bitmap=true)"""
        Dialog.__init__(self, *args)
        ruler = self.h - 36
        bmwidth = 152*ruler/328
        #if kw.get("bitmap", True):
        #    self.bitmap("Bitmap", 0, 0, bmwidth, ruler, "PythonWin")
        self.line("BottomLine", 0, ruler, self.w, 0)

    def title(self, title):
        "Set the title text of the dialog at the top."
        # name, x, y, w, h, flags=Visible|Enabled|Transparent|NoPrefix,
        # text, in VerdanaBold10
        self.text("Title", 15, 10, 320, 60, 0x30003,
                  r"{\VerdanaBold10}%s" % title)

    def back(self, title, next, name = "Back", active = 1):
        """Add a back button with a given title, the tab-next button,
        its name in the Control table, possibly initially disabled.

        Return the button, so that events can be associated"""
        if active:
            flags = 3 # Visible|Enabled
        else:
            flags = 1 # Visible
        return self.pushbutton(name, 180, self.h-27 , 56, 17, flags, title, next)

    def cancel(self, title, next, name = "Cancel", active = 1):
        """Add a cancel button with a given title, the tab-next button,
        its name in the Control table, possibly initially disabled.

        Return the button, so that events can be associated"""
        if active:
            flags = 3 # Visible|Enabled
        else:
            flags = 1 # Visible
        return self.pushbutton(name, 304, self.h-27, 56, 17, flags, title, next)

    def next(self, title, next, name = "Next", active = 1):
        """Add a Next button with a given title, the tab-next button,
        its name in the Control table, possibly initially disabled.

        Return the button, so that events can be associated"""
        if active:
            flags = 3 # Visible|Enabled
        else:
            flags = 1 # Visible
        return self.pushbutton(name, 236, self.h-27, 56, 17, flags, title, next)

    def xbutton(self, name, title, next, xpos):
        """Add a button with a given title, the tab-next button,
        its name in the Control table, giving its x position; the
        y-position is aligned with the other buttons.

        Return the button, so that events can be associated"""
        return self.pushbutton(name, int(self.w*xpos - 28), self.h-27, 56, 17, 3, title, next)

class bdist_msi(Command):

    description = "create a Microsoft Installer (.msi) binary distribution"

    user_options = [('bdist-dir=', None,
                     "temporary directory for creating the distribution"),
                    ('plat-name=', 'p',
                     "platform name to embed in generated filenames "
                     "(default: %s)" % get_platform()),
                    ('keep-temp', 'k',
                     "keep the pseudo-installation tree around after " +
                     "creating the distribution archive"),
                    ('target-version=', None,
                     "require a specific python version" +
                     " on the target system"),
                    ('no-target-compile', 'c',
                     "do not compile .py to .pyc on the target system"),
                    ('no-target-optimize', 'o',
                     "do not compile .py to .pyo (optimized) "
                     "on the target system"),
                    ('dist-dir=', 'd',
                     "directory to put final built distributions in"),
                    ('skip-build', None,
                     "skip rebuilding everything (for testing/debugging)"),
                    ('install-script=', None,
                     "basename of installation script to be run after "
                     "installation or before deinstallation"),
                    ('pre-install-script=', None,
                     "Fully qualified filename of a script to be run before "
                     "any files are installed.  This script need not be in the "
                     "distribution"),
                   ]

    boolean_options = ['keep-temp', 'no-target-compile', 'no-target-optimize',
                       'skip-build']

    all_versions = ['2.0', '2.1', '2.2', '2.3', '2.4',
                    '2.5', '2.6', '2.7', '2.8', '2.9',
                    '3.0', '3.1', '3.2', '3.3', '3.4',
                    '3.5', '3.6', '3.7', '3.8', '3.9']
    other_version = 'X'

    def initialize_options(self):
        self.bdist_dir = None
        self.plat_name = None
        self.keep_temp = 0
        self.no_target_compile = 0
        self.no_target_optimize = 0
        self.target_version = None
        self.dist_dir = None
        self.skip_build = None
        self.install_script = None
        self.pre_install_script = None
        self.versions = None

    def finalize_options(self):
        self.set_undefined_options('bdist', ('skip_build', 'skip_build'))

        if self.bdist_dir is None:
            bdist_base = self.get_finalized_command('bdist').bdist_base
            self.bdist_dir = os.path.join(bdist_base, 'msi')

        short_version = get_python_version()
        if (not self.target_version) and self.distribution.has_ext_modules():
            self.target_version = short_version

        if self.target_version:
            self.versions = [self.target_version]
            if not self.skip_build and self.distribution.has_ext_modules()\
               and self.target_version != short_version:
                raise DistutilsOptionError(
                      "target version can only be %s, or the '--skip-build'"
                      " option must be specified" % (short_version,))
        else:
            self.versions = list(self.all_versions)

        self.set_undefined_options('bdist',
                                   ('dist_dir', 'dist_dir'),
                                   ('plat_name', 'plat_name'),
                                   )

        if self.pre_install_script:
            raise DistutilsOptionError(
                  "the pre-install-script feature is not yet implemented")

        if self.install_script:
            for script in self.distribution.scripts:
                if self.install_script == os.path.basename(script):
                    break
            else:
                raise DistutilsOptionError(
                      "install_script '%s' not found in scripts"
                      % self.install_script)
        self.install_script_key = None

    def run(self):
        if not self.skip_build:
            self.run_command('build')

        install = self.reinitialize_command('install', reinit_subcommands=1)
        install.prefix = self.bdist_dir
        install.skip_build = self.skip_build
        install.warn_dir = 0

        install_lib = self.reinitialize_command('install_lib')
        # we do not want to include pyc or pyo files
        install_lib.compile = 0
        install_lib.optimize = 0

        if self.distribution.has_ext_modules():
            # If we are building an installer for a Python version other
            # than the one we are currently running, then we need to ensure
            # our build_lib reflects the other Python version rather than ours.
            # Note that for target_version!=sys.version, we must have skipped the
            # build step, so there is no issue with enforcing the build of this
            # version.
            target_version = self.target_version
            if not target_version:
                assert self.skip_build, "Should have already checked this"
                target_version = '%d.%d' % sys.version_info[:2]
            plat_specifier = ".%s-%s" % (self.plat_name, target_version)
            build = self.get_finalized_command('build')
            build.build_lib = os.path.join(build.build_base,
                                           'lib' + plat_specifier)

        log.info("installing to %s", self.bdist_dir)
        install.ensure_finalized()

        # avoid warning of 'install_lib' about installing
        # into a directory not in sys.path
        sys.path.insert(0, os.path.join(self.bdist_dir, 'PURELIB'))

        install.run()

        del sys.path[0]

        self.mkpath(self.dist_dir)
        fullname = self.distribution.get_fullname()
        installer_name = self.get_installer_filename(fullname)
        installer_name = os.path.abspath(installer_name)
        if os.path.exists(installer_name): os.unlink(installer_name)

        metadata = self.distribution.metadata
        author = metadata.author
        if not author:
            author = metadata.maintainer
        if not author:
            author = "UNKNOWN"
        version = metadata.get_version()
        # ProductVersion must be strictly numeric
        # XXX need to deal with prerelease versions
        sversion = "%d.%d.%d" % StrictVersion(version).version
        # Prefix ProductName with Python x.y, so that
        # it sorts together with the other Python packages
        # in Add-Remove-Programs (APR)
        fullname = self.distribution.get_fullname()
        if self.target_version:
            product_name = "Python %s %s" % (self.target_version, fullname)
        else:
            product_name = "Python %s" % (fullname)
        self.db = msilib.init_database(installer_name, schema,
                product_name, msilib.gen_uuid(),
                sversion, author)
        msilib.add_tables(self.db, sequence)
        props = [('DistVersion', version)]
        email = metadata.author_email or metadata.maintainer_email
        if email:
            props.append(("ARPCONTACT", email))
        if metadata.url:
            props.append(("ARPURLINFOABOUT", metadata.url))
        if props:
            add_data(self.db, 'Property', props)

        self.add_find_python()
        self.add_files()
        self.add_scripts()
        self.add_ui()
        self.db.Commit()

        if hasattr(self.distribution, 'dist_files'):
            tup = 'bdist_msi', self.target_version or 'any', fullname
            self.distribution.dist_files.append(tup)

        if not self.keep_temp:
            remove_tree(self.bdist_dir, dry_run=self.dry_run)

    def add_files(self):
        db = self.db
        cab = msilib.CAB("distfiles")
        rootdir = os.path.abspath(self.bdist_dir)

        root = Directory(db, cab, None, rootdir, "TARGETDIR", "SourceDir")
        f = Feature(db, "Python", "Python", "Everything",
                    0, 1, directory="TARGETDIR")

        items = [(f, root, '')]
        for version in self.versions + [self.other_version]:
            target = "TARGETDIR" + version
            name = default = "Python" + version
            desc = "Everything"
            if version is self.other_version:
                title = "Python from another location"
                level = 2
            else:
                title = "Python %s from registry" % version
                level = 1
            f = Feature(db, name, title, desc, 1, level, directory=target)
            dir = Directory(db, cab, root, rootdir, target, default)
            items.append((f, dir, version))
        db.Commit()

        seen = {}
        for feature, dir, version in items:
            todo = [dir]
            while todo:
                dir = todo.pop()
                for file in os.listdir(dir.absolute):
                    afile = os.path.join(dir.absolute, file)
                    if os.path.isdir(afile):
                        short = "%s|%s" % (dir.make_short(file), file)
                        default = file + version
                        newdir = Directory(db, cab, dir, file, default, short)
                        todo.append(newdir)
                    else:
                        if not dir.component:
                            dir.start_component(dir.logical, feature, 0)
                        if afile not in seen:
                            key = seen[afile] = dir.add_file(file)
                            if file==self.install_script:
                                if self.install_script_key:
                                    raise DistutilsOptionError(
                                          "Multiple files with name %s" % file)
                                self.install_script_key = '[#%s]' % key
                        else:
                            key = seen[afile]
                            add_data(self.db, "DuplicateFile",
                                [(key + version, dir.component, key, None, dir.logical)])
            db.Commit()
        cab.commit(db)

    def add_find_python(self):
        """Adds code to the installer to compute the location of Python.

        Properties PYTHON.MACHINE.X.Y and PYTHON.USER.X.Y will be set from the
        registry for each version of Python.

        Properties TARGETDIRX.Y will be set from PYTHON.USER.X.Y if defined,
        else from PYTHON.MACHINE.X.Y.

        Properties PYTHONX.Y will be set to TARGETDIRX.Y\\python.exe"""

        start = 402
        for ver in self.versions:
            install_path = r"SOFTWARE\Python\PythonCore\%s\InstallPath" % ver
            machine_reg = "python.machine." + ver
            user_reg = "python.user." + ver
            machine_prop = "PYTHON.MACHINE." + ver
            user_prop = "PYTHON.USER." + ver
            machine_action = "PythonFromMachine" + ver
            user_action = "PythonFromUser" + ver
            exe_action = "PythonExe" + ver
            target_dir_prop = "TARGETDIR" + ver
            exe_prop = "PYTHON" + ver
            if msilib.Win64:
                # type: msidbLocatorTypeRawValue + msidbLocatorType64bit
                Type = 2+16
            else:
                Type = 2
            add_data(self.db, "RegLocator",
                    [(machine_reg, 2, install_path, None, Type),
                     (user_reg, 1, install_path, None, Type)])
            add_data(self.db, "AppSearch",
                    [(machine_prop, machine_reg),
                     (user_prop, user_reg)])
            add_data(self.db, "CustomAction",
                    [(machine_action, 51+256, target_dir_prop, "[" + machine_prop + "]"),
                     (user_action, 51+256, target_dir_prop, "[" + user_prop + "]"),
                     (exe_action, 51+256, exe_prop, "[" + target_dir_prop + "]\\python.exe"),
                    ])
            add_data(self.db, "InstallExecuteSequence",
                    [(machine_action, machine_prop, start),
                     (user_action, user_prop, start + 1),
                     (exe_action, None, start + 2),
                    ])
            add_data(self.db, "InstallUISequence",
                    [(machine_action, machine_prop, start),
                     (user_action, user_prop, start + 1),
                     (exe_action, None, start + 2),
                    ])
            add_data(self.db, "Condition",
                    [("Python" + ver, 0, "NOT TARGETDIR" + ver)])
            start += 4
            assert start < 500

    def add_scripts(self):
        if self.install_script:
            start = 6800
            for ver in self.versions + [self.other_version]:
                install_action = "install_script." + ver
                exe_prop = "PYTHON" + ver
                add_data(self.db, "CustomAction",
                        [(install_action, 50, exe_prop, self.install_script_key)])
                add_data(self.db, "InstallExecuteSequence",
                        [(install_action, "&Python%s=3" % ver, start)])
                start += 1
        # XXX pre-install scripts are currently refused in finalize_options()
        #     but if this feature is completed, it will also need to add
        #     entries for each version as the above code does
        if self.pre_install_script:
            scriptfn = os.path.join(self.bdist_dir, "preinstall.bat")
            with open(scriptfn, "w") as f:
                # The batch file will be executed with [PYTHON], so that %1
                # is the path to the Python interpreter; %0 will be the path
                # of the batch file.
                # rem ="""
                # %1 %0
                # exit
                # """
                # <actual script>
                f.write('rem ="""\n%1 %0\nexit\n"""\n')
                with open(self.pre_install_script) as fin:
                    f.write(fin.read())
            add_data(self.db, "Binary",
                [("PreInstall", msilib.Binary(scriptfn))
                ])
            add_data(self.db, "CustomAction",
                [("PreInstall", 2, "PreInstall", None)
                ])
            add_data(self.db, "InstallExecuteSequence",
                    [("PreInstall", "NOT Installed", 450)])


    def add_ui(self):
        db = self.db
        x = y = 50
        w = 370
        h = 300
        title = "[ProductName] Setup"

        # see "Dialog Style Bits"
        modal = 3      # visible | modal
        modeless = 1   # visible
        track_disk_space = 32

        # UI customization properties
        add_data(db, "Property",
                 # See "DefaultUIFont Property"
                 [("DefaultUIFont", "DlgFont8"),
                  # See "ErrorDialog Style Bit"
                  ("ErrorDialog", "ErrorDlg"),
                  ("Progress1", "Install"),   # modified in maintenance type dlg
                  ("Progress2", "installs"),
                  ("MaintenanceForm_Action", "Repair"),
                  # possible values: ALL, JUSTME
                  ("WhichUsers", "ALL")
                 ])

        # Fonts, see "TextStyle Table"
        add_data(db, "TextStyle",
                 [("DlgFont8", "Tahoma", 9, None, 0),
                  ("DlgFontBold8", "Tahoma", 8, None, 1), #bold
                  ("VerdanaBold10", "Verdana", 10, None, 1),
                  ("VerdanaRed9", "Verdana", 9, 255, 0),
                 ])

        # UI Sequences, see "InstallUISequence Table", "Using a Sequence Table"
        # Numbers indicate sequence; see sequence.py for how these action integrate
        add_data(db, "InstallUISequence",
                 [("PrepareDlg", "Not Privileged or Windows9x or Installed", 140),
                  ("WhichUsersDlg", "Privileged and not Windows9x and not Installed", 141),
                  # In the user interface, assume all-users installation if privileged.
                  ("SelectFeaturesDlg", "Not Installed", 1230),
                  # XXX no support for resume installations yet
                  #("ResumeDlg", "Installed AND (RESUME OR Preselected)", 1240),
                  ("MaintenanceTypeDlg", "Installed AND NOT RESUME AND NOT Preselected", 1250),
                  ("ProgressDlg", None, 1280)])

        add_data(db, 'ActionText', text.ActionText)
        add_data(db, 'UIText', text.UIText)
        #####################################################################
        # Standard dialogs: FatalError, UserExit, ExitDialog
        fatal=PyDialog(db, "FatalError", x, y, w, h, modal, title,
                     "Finish", "Finish", "Finish")
        fatal.title("[ProductName] Installer ended prematurely")
        fatal.back("< Back", "Finish", active = 0)
        fatal.cancel("Cancel", "Back", active = 0)
        fatal.text("Description1", 15, 70, 320, 80, 0x30003,
                   "[ProductName] setup ended prematurely because of an error.  Your system has not been modified.  To install this program at a later time, please run the installation again.")
        fatal.text("Description2", 15, 155, 320, 20, 0x30003,
                   "Click the Finish button to exit the Installer.")
        c=fatal.next("Finish", "Cancel", name="Finish")
        c.event("EndDialog", "Exit")

        user_exit=PyDialog(db, "UserExit", x, y, w, h, modal, title,
                     "Finish", "Finish", "Finish")
        user_exit.title("[ProductName] Installer was interrupted")
        user_exit.back("< Back", "Finish", active = 0)
        user_exit.cancel("Cancel", "Back", active = 0)
        user_exit.text("Description1", 15, 70, 320, 80, 0x30003,
                   "[ProductName] setup was interrupted.  Your system has not been modified.  "
                   "To install this program at a later time, please run the installation again.")
        user_exit.text("Description2", 15, 155, 320, 20, 0x30003,
                   "Click the Finish button to exit the Installer.")
        c = user_exit.next("Finish", "Cancel", name="Finish")
        c.event("EndDialog", "Exit")

        exit_dialog = PyDialog(db, "ExitDialog", x, y, w, h, modal, title,
                             "Finish", "Finish", "Finish")
        exit_dialog.title("Completing the [ProductName] Installer")
        exit_dialog.back("< Back", "Finish", active = 0)
        exit_dialog.cancel("Cancel", "Back", active = 0)
        exit_dialog.text("Description", 15, 235, 320, 20, 0x30003,
                   "Click the Finish button to exit the Installer.")
        c = exit_dialog.next("Finish", "Cancel", name="Finish")
        c.event("EndDialog", "Return")

        #####################################################################
        # Required dialog: FilesInUse, ErrorDlg
        inuse = PyDialog(db, "FilesInUse",
                         x, y, w, h,
                         19,                # KeepModeless|Modal|Visible
                         title,
                         "Retry", "Retry", "Retry", bitmap=False)
        inuse.text("Title", 15, 6, 200, 15, 0x30003,
                   r"{\DlgFontBold8}Files in Use")
        inuse.text("Description", 20, 23, 280, 20, 0x30003,
               "Some files that need to be updated are currently in use.")
        inuse.text("Text", 20, 55, 330, 50, 3,
                   "The following applications are using files that need to be updated by this setup. Close these applications and then click Retry to continue the installation or Cancel to exit it.")
        inuse.control("List", "ListBox", 20, 107, 330, 130, 7, "FileInUseProcess",
                      None, None, None)
        c=inuse.back("Exit", "Ignore", name="Exit")
        c.event("EndDialog", "Exit")
        c=inuse.next("Ignore", "Retry", name="Ignore")
        c.event("EndDialog", "Ignore")
        c=inuse.cancel("Retry", "Exit", name="Retry")
        c.event("EndDialog","Retry")

        # See "Error Dialog". See "ICE20" for the required names of the controls.
        error = Dialog(db, "ErrorDlg",
                       50, 10, 330, 101,
                       65543,       # Error|Minimize|Modal|Visible
                       title,
                       "ErrorText", None, None)
        error.text("ErrorText", 50,9,280,48,3, "")
        #error.control("ErrorIcon", "Icon", 15, 9, 24, 24, 5242881, None, "py.ico", None, None)
        error.pushbutton("N",120,72,81,21,3,"No",None).event("EndDialog","ErrorNo")
        error.pushbutton("Y",240,72,81,21,3,"Yes",None).event("EndDialog","ErrorYes")
        error.pushbutton("A",0,72,81,21,3,"Abort",None).event("EndDialog","ErrorAbort")
        error.pushbutton("C",42,72,81,21,3,"Cancel",None).event("EndDialog","ErrorCancel")
        error.pushbutton("I",81,72,81,21,3,"Ignore",None).event("EndDialog","ErrorIgnore")
        error.pushbutton("O",159,72,81,21,3,"Ok",None).event("EndDialog","ErrorOk")
        error.pushbutton("R",198,72,81,21,3,"Retry",None).event("EndDialog","ErrorRetry")

        #####################################################################
        # Global "Query Cancel" dialog
        cancel = Dialog(db, "CancelDlg", 50, 10, 260, 85, 3, title,
                        "No", "No", "No")
        cancel.text("Text", 48, 15, 194, 30, 3,
                    "Are you sure you want to cancel [ProductName] installation?")
        #cancel.control("Icon", "Icon", 15, 15, 24, 24, 5242881, None,
        #               "py.ico", None, None)
        c=cancel.pushbutton("Yes", 72, 57, 56, 17, 3, "Yes", "No")
        c.event("EndDialog", "Exit")

        c=cancel.pushbutton("No", 132, 57, 56, 17, 3, "No", "Yes")
        c.event("EndDialog", "Return")

        #####################################################################
        # Global "Wait for costing" dialog
        costing = Dialog(db, "WaitForCostingDlg", 50, 10, 260, 85, modal, title,
                         "Return", "Return", "Return")
        costing.text("Text", 48, 15, 194, 30, 3,
                     "Please wait while the installer finishes determining your disk space requirements.")
        c = costing.pushbutton("Return", 102, 57, 56, 17, 3, "Return", None)
        c.event("EndDialog", "Exit")

        #####################################################################
        # Preparation dialog: no user input except cancellation
        prep = PyDialog(db, "PrepareDlg", x, y, w, h, modeless, title,
                        "Cancel", "Cancel", "Cancel")
        prep.text("Description", 15, 70, 320, 40, 0x30003,
                  "Please wait while the Installer prepares to guide you through the installation.")
        prep.title("Welcome to the [ProductName] Installer")
        c=prep.text("ActionText", 15, 110, 320, 20, 0x30003, "Pondering...")
        c.mapping("ActionText", "Text")
        c=prep.text("ActionData", 15, 135, 320, 30, 0x30003, None)
        c.mapping("ActionData", "Text")
        prep.back("Back", None, active=0)
        prep.next("Next", None, active=0)
        c=prep.cancel("Cancel", None)
        c.event("SpawnDialog", "CancelDlg")

        #####################################################################
        # Feature (Python directory) selection
        seldlg = PyDialog(db, "SelectFeaturesDlg", x, y, w, h, modal, title,
                        "Next", "Next", "Cancel")
        seldlg.title("Select Python Installations")

        seldlg.text("Hint", 15, 30, 300, 20, 3,
                    "Select the Python locations where %s should be installed."
                    % self.distribution.get_fullname())

        seldlg.back("< Back", None, active=0)
        c = seldlg.next("Next >", "Cancel")
        order = 1
        c.event("[TARGETDIR]", "[SourceDir]", ordering=order)
        for version in self.versions + [self.other_version]:
            order += 1
            c.event("[TARGETDIR]", "[TARGETDIR%s]" % version,
                    "FEATURE_SELECTED AND &Python%s=3" % version,
                    ordering=order)
        c.event("SpawnWaitDialog", "WaitForCostingDlg", ordering=order + 1)
        c.event("EndDialog", "Return", ordering=order + 2)
        c = seldlg.cancel("Cancel", "Features")
        c.event("SpawnDialog", "CancelDlg")

        c = seldlg.control("Features", "SelectionTree", 15, 60, 300, 120, 3,
                           "FEATURE", None, "PathEdit", None)
        c.event("[FEATURE_SELECTED]", "1")
        ver = self.other_version
        install_other_cond = "FEATURE_SELECTED AND &Python%s=3" % ver
        dont_install_other_cond = "FEATURE_SELECTED AND &Python%s<>3" % ver

        c = seldlg.text("Other", 15, 200, 300, 15, 3,
                        "Provide an alternate Python location")
        c.condition("Enable", install_other_cond)
        c.condition("Show", install_other_cond)
        c.condition("Disable", dont_install_other_cond)
        c.condition("Hide", dont_install_other_cond)

        c = seldlg.control("PathEdit", "PathEdit", 15, 215, 300, 16, 1,
                           "TARGETDIR" + ver, None, "Next", None)
        c.condition("Enable", install_other_cond)
        c.condition("Show", install_other_cond)
        c.condition("Disable", dont_install_other_cond)
        c.condition("Hide", dont_install_other_cond)

        #####################################################################
        # Disk cost
        cost = PyDialog(db, "DiskCostDlg", x, y, w, h, modal, title,
                        "OK", "OK", "OK", bitmap=False)
        cost.text("Title", 15, 6, 200, 15, 0x30003,
                 r"{\DlgFontBold8}Disk Space Requirements")
        cost.text("Description", 20, 20, 280, 20, 0x30003,
                  "The disk space required for the installation of the selected features.")
        cost.text("Text", 20, 53, 330, 60, 3,
                  "The highlighted volumes (if any) do not have enough disk space "
              "available for the currently selected features.  You can either "
              "remove some files from the highlighted volumes, or choose to "
              "install less features onto local drive(s), or select different "
              "destination drive(s).")
        cost.control("VolumeList", "VolumeCostList", 20, 100, 330, 150, 393223,
                     None, "{120}{70}{70}{70}{70}", None, None)
        cost.xbutton("OK", "Ok", None, 0.5).event("EndDialog", "Return")

        #####################################################################
        # WhichUsers Dialog. Only available on NT, and for privileged users.
        # This must be run before FindRelatedProducts, because that will
        # take into account whether the previous installation was per-user
        # or per-machine. We currently don't support going back to this
        # dialog after "Next" was selected; to support this, we would need to
        # find how to reset the ALLUSERS property, and how to re-run
        # FindRelatedProducts.
        # On Windows9x, the ALLUSERS property is ignored on the command line
        # and in the Property table, but installer fails according to the documentation
        # if a dialog attempts to set ALLUSERS.
        whichusers = PyDialog(db, "WhichUsersDlg", x, y, w, h, modal, title,
                            "AdminInstall", "Next", "Cancel")
        whichusers.title("Select whether to install [ProductName] for all users of this computer.")
        # A radio group with two options: allusers, justme
        g = whichusers.radiogroup("AdminInstall", 15, 60, 260, 50, 3,
                                  "WhichUsers", "", "Next")
        g.add("ALL", 0, 5, 150, 20, "Install for all users")
        g.add("JUSTME", 0, 25, 150, 20, "Install just for me")

        whichusers.back("Back", None, active=0)

        c = whichusers.next("Next >", "Cancel")
        c.event("[ALLUSERS]", "1", 'WhichUsers="ALL"', 1)
        c.event("EndDialog", "Return", ordering = 2)

        c = whichusers.cancel("Cancel", "AdminInstall")
        c.event("SpawnDialog", "CancelDlg")

        #####################################################################
        # Installation Progress dialog (modeless)
        progress = PyDialog(db, "ProgressDlg", x, y, w, h, modeless, title,
                            "Cancel", "Cancel", "Cancel", bitmap=False)
        progress.text("Title", 20, 15, 200, 15, 0x30003,
                     r"{\DlgFontBold8}[Progress1] [ProductName]")
        progress.text("Text", 35, 65, 300, 30, 3,
                      "Please wait while the Installer [Progress2] [ProductName]. "
                      "This may take several minutes.")
        progress.text("StatusLabel", 35, 100, 35, 20, 3, "Status:")

        c=progress.text("ActionText", 70, 100, w-70, 20, 3, "Pondering...")
        c.mapping("ActionText", "Text")

        #c=progress.text("ActionData", 35, 140, 300, 20, 3, None)
        #c.mapping("ActionData", "Text")

        c=progress.control("ProgressBar", "ProgressBar", 35, 120, 300, 10, 65537,
                           None, "Progress done", None, None)
        c.mapping("SetProgress", "Progress")

        progress.back("< Back", "Next", active=False)
        progress.next("Next >", "Cancel", active=False)
        progress.cancel("Cancel", "Back").event("SpawnDialog", "CancelDlg")

        ###################################################################
        # Maintenance type: repair/uninstall
        maint = PyDialog(db, "MaintenanceTypeDlg", x, y, w, h, modal, title,
                         "Next", "Next", "Cancel")
        maint.title("Welcome to the [ProductName] Setup Wizard")
        maint.text("BodyText", 15, 63, 330, 42, 3,
                   "Select whether you want to repair or remove [ProductName].")
        g=maint.radiogroup("RepairRadioGroup", 15, 108, 330, 60, 3,
                            "MaintenanceForm_Action", "", "Next")
        #g.add("Change", 0, 0, 200, 17, "&Change [ProductName]")
        g.add("Repair", 0, 18, 200, 17, "&Repair [ProductName]")
        g.add("Remove", 0, 36, 200, 17, "Re&move [ProductName]")

        maint.back("< Back", None, active=False)
        c=maint.next("Finish", "Cancel")
        # Change installation: Change progress dialog to "Change", then ask
        # for feature selection
        #c.event("[Progress1]", "Change", 'MaintenanceForm_Action="Change"', 1)
        #c.event("[Progress2]", "changes", 'MaintenanceForm_Action="Change"', 2)

        # Reinstall: Change progress dialog to "Repair", then invoke reinstall
        # Also set list of reinstalled features to "ALL"
        c.event("[REINSTALL]", "ALL", 'MaintenanceForm_Action="Repair"', 5)
        c.event("[Progress1]", "Repairing", 'MaintenanceForm_Action="Repair"', 6)
        c.event("[Progress2]", "repairs", 'MaintenanceForm_Action="Repair"', 7)
        c.event("Reinstall", "ALL", 'MaintenanceForm_Action="Repair"', 8)

        # Uninstall: Change progress to "Remove", then invoke uninstall
        # Also set list of removed features to "ALL"
        c.event("[REMOVE]", "ALL", 'MaintenanceForm_Action="Remove"', 11)
        c.event("[Progress1]", "Removing", 'MaintenanceForm_Action="Remove"', 12)
        c.event("[Progress2]", "removes", 'MaintenanceForm_Action="Remove"', 13)
        c.event("Remove", "ALL", 'MaintenanceForm_Action="Remove"', 14)

        # Close dialog when maintenance action scheduled
        c.event("EndDialog", "Return", 'MaintenanceForm_Action<>"Change"', 20)
        #c.event("NewDialog", "SelectFeaturesDlg", 'MaintenanceForm_Action="Change"', 21)

        maint.cancel("Cancel", "RepairRadioGroup").event("SpawnDialog", "CancelDlg")

    def get_installer_filename(self, fullname):
        # Factored out to allow overriding in subclasses
        if self.target_version:
            base_name = "%s.%s-py%s.msi" % (fullname, self.plat_name,
                                            self.target_version)
        else:
            base_name = "%s.%s.msi" % (fullname, self.plat_name)
        installer_name = os.path.join(self.dist_dir, base_name)
        return installer_name
PKV[���� � command/install_lib.pynu�[���"""distutils.command.install_lib

Implements the Distutils 'install_lib' command
(install all Python modules)."""

import os
import importlib.util
import sys

from distutils.core import Command
from distutils.errors import DistutilsOptionError


# Extension for Python source files.
PYTHON_SOURCE_EXTENSION = ".py"

class install_lib(Command):

    description = "install all Python modules (extensions and pure Python)"

    # The byte-compilation options are a tad confusing.  Here are the
    # possible scenarios:
    #   1) no compilation at all (--no-compile --no-optimize)
    #   2) compile .pyc only (--compile --no-optimize; default)
    #   3) compile .pyc and "opt-1" .pyc (--compile --optimize)
    #   4) compile "opt-1" .pyc only (--no-compile --optimize)
    #   5) compile .pyc and "opt-2" .pyc (--compile --optimize-more)
    #   6) compile "opt-2" .pyc only (--no-compile --optimize-more)
    #
    # The UI for this is two options, 'compile' and 'optimize'.
    # 'compile' is strictly boolean, and only decides whether to
    # generate .pyc files.  'optimize' is three-way (0, 1, or 2), and
    # decides both whether to generate .pyc files and what level of
    # optimization to use.

    user_options = [
        ('install-dir=', 'd', "directory to install to"),
        ('build-dir=','b', "build directory (where to install from)"),
        ('force', 'f', "force installation (overwrite existing files)"),
        ('compile', 'c', "compile .py to .pyc [default]"),
        ('no-compile', None, "don't compile .py files"),
        ('optimize=', 'O',
         "also compile with optimization: -O1 for \"python -O\", "
         "-O2 for \"python -OO\", and -O0 to disable [default: -O0]"),
        ('skip-build', None, "skip the build steps"),
        ]

    boolean_options = ['force', 'compile', 'skip-build']
    negative_opt = {'no-compile' : 'compile'}

    def initialize_options(self):
        # let the 'install' command dictate our installation directory
        self.install_dir = None
        self.build_dir = None
        self.force = 0
        self.compile = None
        self.optimize = None
        self.skip_build = None

    def finalize_options(self):
        # Get all the information we need to install pure Python modules
        # from the umbrella 'install' command -- build (source) directory,
        # install (target) directory, and whether to compile .py files.
        self.set_undefined_options('install',
                                   ('build_lib', 'build_dir'),
                                   ('install_lib', 'install_dir'),
                                   ('force', 'force'),
                                   ('compile', 'compile'),
                                   ('optimize', 'optimize'),
                                   ('skip_build', 'skip_build'),
                                  )

        if self.compile is None:
            self.compile = True
        if self.optimize is None:
            self.optimize = False

        if not isinstance(self.optimize, int):
            try:
                self.optimize = int(self.optimize)
                if self.optimize not in (0, 1, 2):
                    raise AssertionError
            except (ValueError, AssertionError):
                raise DistutilsOptionError("optimize must be 0, 1, or 2")

    def run(self):
        # Make sure we have built everything we need first
        self.build()

        # Install everything: simply dump the entire contents of the build
        # directory to the installation directory (that's the beauty of
        # having a build directory!)
        outfiles = self.install()

        # (Optionally) compile .py to .pyc
        if outfiles is not None and self.distribution.has_pure_modules():
            self.byte_compile(outfiles)

    # -- Top-level worker functions ------------------------------------
    # (called from 'run()')

    def build(self):
        if not self.skip_build:
            if self.distribution.has_pure_modules():
                self.run_command('build_py')
            if self.distribution.has_ext_modules():
                self.run_command('build_ext')

    def install(self):
        if os.path.isdir(self.build_dir):
            outfiles = self.copy_tree(self.build_dir, self.install_dir)
        else:
            self.warn("'%s' does not exist -- no Python modules to install" %
                      self.build_dir)
            return
        return outfiles

    def byte_compile(self, files):
        if sys.dont_write_bytecode:
            self.warn('byte-compiling is disabled, skipping.')
            return

        from distutils.util import byte_compile

        # Get the "--root" directory supplied to the "install" command,
        # and use it as a prefix to strip off the purported filename
        # encoded in bytecode files.  This is far from complete, but it
        # should at least generate usable bytecode in RPM distributions.
        install_root = self.get_finalized_command('install').root

        if self.compile:
            byte_compile(files, optimize=0,
                         force=self.force, prefix=install_root,
                         dry_run=self.dry_run)
        if self.optimize > 0:
            byte_compile(files, optimize=self.optimize,
                         force=self.force, prefix=install_root,
                         verbose=self.verbose, dry_run=self.dry_run)


    # -- Utility methods -----------------------------------------------

    def _mutate_outputs(self, has_any, build_cmd, cmd_option, output_dir):
        if not has_any:
            return []

        build_cmd = self.get_finalized_command(build_cmd)
        build_files = build_cmd.get_outputs()
        build_dir = getattr(build_cmd, cmd_option)

        prefix_len = len(build_dir) + len(os.sep)
        outputs = []
        for file in build_files:
            outputs.append(os.path.join(output_dir, file[prefix_len:]))

        return outputs

    def _bytecode_filenames(self, py_filenames):
        bytecode_files = []
        for py_file in py_filenames:
            # Since build_py handles package data installation, the
            # list of outputs can contain more than just .py files.
            # Make sure we only report bytecode for the .py files.
            ext = os.path.splitext(os.path.normcase(py_file))[1]
            if ext != PYTHON_SOURCE_EXTENSION:
                continue
            if self.compile:
                bytecode_files.append(importlib.util.cache_from_source(
                    py_file, optimization=''))
            if self.optimize > 0:
                bytecode_files.append(importlib.util.cache_from_source(
                    py_file, optimization=self.optimize))

        return bytecode_files


    # -- External interface --------------------------------------------
    # (called by outsiders)

    def get_outputs(self):
        """Return the list of files that would be installed if this command
        were actually run.  Not affected by the "dry-run" flag or whether
        modules have actually been built yet.
        """
        pure_outputs = \
            self._mutate_outputs(self.distribution.has_pure_modules(),
                                 'build_py', 'build_lib',
                                 self.install_dir)
        if self.compile:
            bytecode_outputs = self._bytecode_filenames(pure_outputs)
        else:
            bytecode_outputs = []

        ext_outputs = \
            self._mutate_outputs(self.distribution.has_ext_modules(),
                                 'build_ext', 'build_lib',
                                 self.install_dir)

        return pure_outputs + bytecode_outputs + ext_outputs

    def get_inputs(self):
        """Get the list of files that are input to this command, ie. the
        files that get installed as they are named in the build tree.
        The files in this list correspond one-to-one to the output
        filenames returned by 'get_outputs()'.
        """
        inputs = []

        if self.distribution.has_pure_modules():
            build_py = self.get_finalized_command('build_py')
            inputs.extend(build_py.get_outputs())

        if self.distribution.has_ext_modules():
            build_ext = self.get_finalized_command('build_ext')
            inputs.extend(build_ext.get_outputs())

        return inputs
PKV[�t��=J=Jcommand/sdist.pynu�[���"""distutils.command.sdist

Implements the Distutils 'sdist' command (create a source distribution)."""

import os
import sys
from glob import glob
from warnings import warn

from distutils.core import Command
from distutils import dir_util
from distutils import file_util
from distutils import archive_util
from distutils.text_file import TextFile
from distutils.filelist import FileList
from distutils import log
from distutils.util import convert_path
from distutils.errors import DistutilsTemplateError, DistutilsOptionError


def show_formats():
    """Print all possible values for the 'formats' option (used by
    the "--help-formats" command-line option).
    """
    from distutils.fancy_getopt import FancyGetopt
    from distutils.archive_util import ARCHIVE_FORMATS
    formats = []
    for format in ARCHIVE_FORMATS.keys():
        formats.append(("formats=" + format, None,
                        ARCHIVE_FORMATS[format][2]))
    formats.sort()
    FancyGetopt(formats).print_help(
        "List of available source distribution formats:")


class sdist(Command):

    description = "create a source distribution (tarball, zip file, etc.)"

    def checking_metadata(self):
        """Callable used for the check sub-command.

        Placed here so user_options can view it"""
        return self.metadata_check

    user_options = [
        ('template=', 't',
         "name of manifest template file [default: MANIFEST.in]"),
        ('manifest=', 'm',
         "name of manifest file [default: MANIFEST]"),
        ('use-defaults', None,
         "include the default file set in the manifest "
         "[default; disable with --no-defaults]"),
        ('no-defaults', None,
         "don't include the default file set"),
        ('prune', None,
         "specifically exclude files/directories that should not be "
         "distributed (build tree, RCS/CVS dirs, etc.) "
         "[default; disable with --no-prune]"),
        ('no-prune', None,
         "don't automatically exclude anything"),
        ('manifest-only', 'o',
         "just regenerate the manifest and then stop "
         "(implies --force-manifest)"),
        ('force-manifest', 'f',
         "forcibly regenerate the manifest and carry on as usual. "
         "Deprecated: now the manifest is always regenerated."),
        ('formats=', None,
         "formats for source distribution (comma-separated list)"),
        ('keep-temp', 'k',
         "keep the distribution tree around after creating " +
         "archive file(s)"),
        ('dist-dir=', 'd',
         "directory to put the source distribution archive(s) in "
         "[default: dist]"),
        ('metadata-check', None,
         "Ensure that all required elements of meta-data "
         "are supplied. Warn if any missing. [default]"),
        ('owner=', 'u',
         "Owner name used when creating a tar file [default: current user]"),
        ('group=', 'g',
         "Group name used when creating a tar file [default: current group]"),
        ]

    boolean_options = ['use-defaults', 'prune',
                       'manifest-only', 'force-manifest',
                       'keep-temp', 'metadata-check']

    help_options = [
        ('help-formats', None,
         "list available distribution formats", show_formats),
        ]

    negative_opt = {'no-defaults': 'use-defaults',
                    'no-prune': 'prune' }

    sub_commands = [('check', checking_metadata)]

    READMES = ('README', 'README.txt', 'README.rst')

    def initialize_options(self):
        # 'template' and 'manifest' are, respectively, the names of
        # the manifest template and manifest file.
        self.template = None
        self.manifest = None

        # 'use_defaults': if true, we will include the default file set
        # in the manifest
        self.use_defaults = 1
        self.prune = 1

        self.manifest_only = 0
        self.force_manifest = 0

        self.formats = ['gztar']
        self.keep_temp = 0
        self.dist_dir = None

        self.archive_files = None
        self.metadata_check = 1
        self.owner = None
        self.group = None

    def finalize_options(self):
        if self.manifest is None:
            self.manifest = "MANIFEST"
        if self.template is None:
            self.template = "MANIFEST.in"

        self.ensure_string_list('formats')

        bad_format = archive_util.check_archive_formats(self.formats)
        if bad_format:
            raise DistutilsOptionError(
                  "unknown archive format '%s'" % bad_format)

        if self.dist_dir is None:
            self.dist_dir = "dist"

    def run(self):
        # 'filelist' contains the list of files that will make up the
        # manifest
        self.filelist = FileList()

        # Run sub commands
        for cmd_name in self.get_sub_commands():
            self.run_command(cmd_name)

        # Do whatever it takes to get the list of files to process
        # (process the manifest template, read an existing manifest,
        # whatever).  File list is accumulated in 'self.filelist'.
        self.get_file_list()

        # If user just wanted us to regenerate the manifest, stop now.
        if self.manifest_only:
            return

        # Otherwise, go ahead and create the source distribution tarball,
        # or zipfile, or whatever.
        self.make_distribution()

    def check_metadata(self):
        """Deprecated API."""
        warn("distutils.command.sdist.check_metadata is deprecated, \
              use the check command instead", PendingDeprecationWarning)
        check = self.distribution.get_command_obj('check')
        check.ensure_finalized()
        check.run()

    def get_file_list(self):
        """Figure out the list of files to include in the source
        distribution, and put it in 'self.filelist'.  This might involve
        reading the manifest template (and writing the manifest), or just
        reading the manifest, or just using the default file set -- it all
        depends on the user's options.
        """
        # new behavior when using a template:
        # the file list is recalculated every time because
        # even if MANIFEST.in or setup.py are not changed
        # the user might have added some files in the tree that
        # need to be included.
        #
        #  This makes --force the default and only behavior with templates.
        template_exists = os.path.isfile(self.template)
        if not template_exists and self._manifest_is_not_generated():
            self.read_manifest()
            self.filelist.sort()
            self.filelist.remove_duplicates()
            return

        if not template_exists:
            self.warn(("manifest template '%s' does not exist " +
                        "(using default file list)") %
                        self.template)
        self.filelist.findall()

        if self.use_defaults:
            self.add_defaults()

        if template_exists:
            self.read_template()

        if self.prune:
            self.prune_file_list()

        self.filelist.sort()
        self.filelist.remove_duplicates()
        self.write_manifest()

    def add_defaults(self):
        """Add all the default files to self.filelist:
          - README or README.txt
          - setup.py
          - test/test*.py
          - all pure Python modules mentioned in setup script
          - all files pointed by package_data (build_py)
          - all files defined in data_files.
          - all files defined as scripts.
          - all C sources listed as part of extensions or C libraries
            in the setup script (doesn't catch C headers!)
        Warns if (README or README.txt) or setup.py are missing; everything
        else is optional.
        """
        self._add_defaults_standards()
        self._add_defaults_optional()
        self._add_defaults_python()
        self._add_defaults_data_files()
        self._add_defaults_ext()
        self._add_defaults_c_libs()
        self._add_defaults_scripts()

    @staticmethod
    def _cs_path_exists(fspath):
        """
        Case-sensitive path existence check

        >>> sdist._cs_path_exists(__file__)
        True
        >>> sdist._cs_path_exists(__file__.upper())
        False
        """
        if not os.path.exists(fspath):
            return False
        # make absolute so we always have a directory
        abspath = os.path.abspath(fspath)
        directory, filename = os.path.split(abspath)
        return filename in os.listdir(directory)

    def _add_defaults_standards(self):
        standards = [self.READMES, self.distribution.script_name]
        for fn in standards:
            if isinstance(fn, tuple):
                alts = fn
                got_it = False
                for fn in alts:
                    if self._cs_path_exists(fn):
                        got_it = True
                        self.filelist.append(fn)
                        break

                if not got_it:
                    self.warn("standard file not found: should have one of " +
                              ', '.join(alts))
            else:
                if self._cs_path_exists(fn):
                    self.filelist.append(fn)
                else:
                    self.warn("standard file '%s' not found" % fn)

    def _add_defaults_optional(self):
        optional = ['test/test*.py', 'setup.cfg']
        for pattern in optional:
            files = filter(os.path.isfile, glob(pattern))
            self.filelist.extend(files)

    def _add_defaults_python(self):
        # build_py is used to get:
        #  - python modules
        #  - files defined in package_data
        build_py = self.get_finalized_command('build_py')

        # getting python files
        if self.distribution.has_pure_modules():
            self.filelist.extend(build_py.get_source_files())

        # getting package_data files
        # (computed in build_py.data_files by build_py.finalize_options)
        for pkg, src_dir, build_dir, filenames in build_py.data_files:
            for filename in filenames:
                self.filelist.append(os.path.join(src_dir, filename))

    def _add_defaults_data_files(self):
        # getting distribution.data_files
        if self.distribution.has_data_files():
            for item in self.distribution.data_files:
                if isinstance(item, str):
                    # plain file
                    item = convert_path(item)
                    if os.path.isfile(item):
                        self.filelist.append(item)
                else:
                    # a (dirname, filenames) tuple
                    dirname, filenames = item
                    for f in filenames:
                        f = convert_path(f)
                        if os.path.isfile(f):
                            self.filelist.append(f)

    def _add_defaults_ext(self):
        if self.distribution.has_ext_modules():
            build_ext = self.get_finalized_command('build_ext')
            self.filelist.extend(build_ext.get_source_files())

    def _add_defaults_c_libs(self):
        if self.distribution.has_c_libraries():
            build_clib = self.get_finalized_command('build_clib')
            self.filelist.extend(build_clib.get_source_files())

    def _add_defaults_scripts(self):
        if self.distribution.has_scripts():
            build_scripts = self.get_finalized_command('build_scripts')
            self.filelist.extend(build_scripts.get_source_files())

    def read_template(self):
        """Read and parse manifest template file named by self.template.

        (usually "MANIFEST.in") The parsing and processing is done by
        'self.filelist', which updates itself accordingly.
        """
        log.info("reading manifest template '%s'", self.template)
        template = TextFile(self.template, strip_comments=1, skip_blanks=1,
                            join_lines=1, lstrip_ws=1, rstrip_ws=1,
                            collapse_join=1)

        try:
            while True:
                line = template.readline()
                if line is None:            # end of file
                    break

                try:
                    self.filelist.process_template_line(line)
                # the call above can raise a DistutilsTemplateError for
                # malformed lines, or a ValueError from the lower-level
                # convert_path function
                except (DistutilsTemplateError, ValueError) as msg:
                    self.warn("%s, line %d: %s" % (template.filename,
                                                   template.current_line,
                                                   msg))
        finally:
            template.close()

    def prune_file_list(self):
        """Prune off branches that might slip into the file list as created
        by 'read_template()', but really don't belong there:
          * the build tree (typically "build")
          * the release tree itself (only an issue if we ran "sdist"
            previously with --keep-temp, or it aborted)
          * any RCS, CVS, .svn, .hg, .git, .bzr, _darcs directories
        """
        build = self.get_finalized_command('build')
        base_dir = self.distribution.get_fullname()

        self.filelist.exclude_pattern(None, prefix=build.build_base)
        self.filelist.exclude_pattern(None, prefix=base_dir)

        if sys.platform == 'win32':
            seps = r'/|\\'
        else:
            seps = '/'

        vcs_dirs = ['RCS', 'CVS', r'\.svn', r'\.hg', r'\.git', r'\.bzr',
                    '_darcs']
        vcs_ptrn = r'(^|%s)(%s)(%s).*' % (seps, '|'.join(vcs_dirs), seps)
        self.filelist.exclude_pattern(vcs_ptrn, is_regex=1)

    def write_manifest(self):
        """Write the file list in 'self.filelist' (presumably as filled in
        by 'add_defaults()' and 'read_template()') to the manifest file
        named by 'self.manifest'.
        """
        if self._manifest_is_not_generated():
            log.info("not writing to manually maintained "
                     "manifest file '%s'" % self.manifest)
            return

        content = self.filelist.files[:]
        content.insert(0, '# file GENERATED by distutils, do NOT edit')
        self.execute(file_util.write_file, (self.manifest, content),
                     "writing manifest file '%s'" % self.manifest)

    def _manifest_is_not_generated(self):
        # check for special comment used in 3.1.3 and higher
        if not os.path.isfile(self.manifest):
            return False

        fp = open(self.manifest)
        try:
            first_line = fp.readline()
        finally:
            fp.close()
        return first_line != '# file GENERATED by distutils, do NOT edit\n'

    def read_manifest(self):
        """Read the manifest file (named by 'self.manifest') and use it to
        fill in 'self.filelist', the list of files to include in the source
        distribution.
        """
        log.info("reading manifest file '%s'", self.manifest)
        with open(self.manifest) as manifest:
            for line in manifest:
                # ignore comments and blank lines
                line = line.strip()
                if line.startswith('#') or not line:
                    continue
                self.filelist.append(line)

    def make_release_tree(self, base_dir, files):
        """Create the directory tree that will become the source
        distribution archive.  All directories implied by the filenames in
        'files' are created under 'base_dir', and then we hard link or copy
        (if hard linking is unavailable) those files into place.
        Essentially, this duplicates the developer's source tree, but in a
        directory named after the distribution, containing only the files
        to be distributed.
        """
        # Create all the directories under 'base_dir' necessary to
        # put 'files' there; the 'mkpath()' is just so we don't die
        # if the manifest happens to be empty.
        self.mkpath(base_dir)
        dir_util.create_tree(base_dir, files, dry_run=self.dry_run)

        # And walk over the list of files, either making a hard link (if
        # os.link exists) to each one that doesn't already exist in its
        # corresponding location under 'base_dir', or copying each file
        # that's out-of-date in 'base_dir'.  (Usually, all files will be
        # out-of-date, because by default we blow away 'base_dir' when
        # we're done making the distribution archives.)

        if hasattr(os, 'link'):        # can make hard links on this system
            link = 'hard'
            msg = "making hard links in %s..." % base_dir
        else:                           # nope, have to copy
            link = None
            msg = "copying files to %s..." % base_dir

        if not files:
            log.warn("no files to distribute -- empty manifest?")
        else:
            log.info(msg)
        for file in files:
            if not os.path.isfile(file):
                log.warn("'%s' not a regular file -- skipping", file)
            else:
                dest = os.path.join(base_dir, file)
                self.copy_file(file, dest, link=link)

        self.distribution.metadata.write_pkg_info(base_dir)

    def make_distribution(self):
        """Create the source distribution(s).  First, we create the release
        tree with 'make_release_tree()'; then, we create all required
        archive files (according to 'self.formats') from the release tree.
        Finally, we clean up by blowing away the release tree (unless
        'self.keep_temp' is true).  The list of archive files created is
        stored so it can be retrieved later by 'get_archive_files()'.
        """
        # Don't warn about missing meta-data here -- should be (and is!)
        # done elsewhere.
        base_dir = self.distribution.get_fullname()
        base_name = os.path.join(self.dist_dir, base_dir)

        self.make_release_tree(base_dir, self.filelist.files)
        archive_files = []              # remember names of files we create
        # tar archive must be created last to avoid overwrite and remove
        if 'tar' in self.formats:
            self.formats.append(self.formats.pop(self.formats.index('tar')))

        for fmt in self.formats:
            file = self.make_archive(base_name, fmt, base_dir=base_dir,
                                     owner=self.owner, group=self.group)
            archive_files.append(file)
            self.distribution.dist_files.append(('sdist', '', file))

        self.archive_files = archive_files

        if not self.keep_temp:
            dir_util.remove_tree(base_dir, dry_run=self.dry_run)

    def get_archive_files(self):
        """Return the list of archive files created when the command
        was run, or None if the command hasn't run yet.
        """
        return self.archive_files
PKV[��|P{P{command/build_ext.pynu�[���"""distutils.command.build_ext

Implements the Distutils 'build_ext' command, for building extension
modules (currently limited to C extensions, should accommodate C++
extensions ASAP)."""

import contextlib
import os
import re
import sys
from distutils.core import Command
from distutils.errors import *
from distutils.sysconfig import customize_compiler, get_python_version
from distutils.sysconfig import get_config_h_filename
from distutils.dep_util import newer_group
from distutils.extension import Extension
from distutils.util import get_platform
from distutils import log

from site import USER_BASE

# An extension name is just a dot-separated list of Python NAMEs (ie.
# the same as a fully-qualified module name).
extension_name_re = re.compile \
    (r'^[a-zA-Z_][a-zA-Z_0-9]*(\.[a-zA-Z_][a-zA-Z_0-9]*)*$')


def show_compilers ():
    from distutils.ccompiler import show_compilers
    show_compilers()


class build_ext(Command):

    description = "build C/C++ extensions (compile/link to build directory)"

    # XXX thoughts on how to deal with complex command-line options like
    # these, i.e. how to make it so fancy_getopt can suck them off the
    # command line and make it look like setup.py defined the appropriate
    # lists of tuples of what-have-you.
    #   - each command needs a callback to process its command-line options
    #   - Command.__init__() needs access to its share of the whole
    #     command line (must ultimately come from
    #     Distribution.parse_command_line())
    #   - it then calls the current command class' option-parsing
    #     callback to deal with weird options like -D, which have to
    #     parse the option text and churn out some custom data
    #     structure
    #   - that data structure (in this case, a list of 2-tuples)
    #     will then be present in the command object by the time
    #     we get to finalize_options() (i.e. the constructor
    #     takes care of both command-line and client options
    #     in between initialize_options() and finalize_options())

    sep_by = " (separated by '%s')" % os.pathsep
    user_options = [
        ('build-lib=', 'b',
         "directory for compiled extension modules"),
        ('build-temp=', 't',
         "directory for temporary files (build by-products)"),
        ('plat-name=', 'p',
         "platform name to cross-compile for, if supported "
         "(default: %s)" % get_platform()),
        ('inplace', 'i',
         "ignore build-lib and put compiled extensions into the source " +
         "directory alongside your pure Python modules"),
        ('include-dirs=', 'I',
         "list of directories to search for header files" + sep_by),
        ('define=', 'D',
         "C preprocessor macros to define"),
        ('undef=', 'U',
         "C preprocessor macros to undefine"),
        ('libraries=', 'l',
         "external C libraries to link with"),
        ('library-dirs=', 'L',
         "directories to search for external C libraries" + sep_by),
        ('rpath=', 'R',
         "directories to search for shared C libraries at runtime"),
        ('link-objects=', 'O',
         "extra explicit link objects to include in the link"),
        ('debug', 'g',
         "compile/link with debugging information"),
        ('force', 'f',
         "forcibly build everything (ignore file timestamps)"),
        ('compiler=', 'c',
         "specify the compiler type"),
        ('parallel=', 'j',
         "number of parallel build jobs"),
        ('swig-cpp', None,
         "make SWIG create C++ files (default is C)"),
        ('swig-opts=', None,
         "list of SWIG command line options"),
        ('swig=', None,
         "path to the SWIG executable"),
        ('user', None,
         "add user include, library and rpath")
        ]

    boolean_options = ['inplace', 'debug', 'force', 'swig-cpp', 'user']

    help_options = [
        ('help-compiler', None,
         "list available compilers", show_compilers),
        ]

    def initialize_options(self):
        self.extensions = None
        self.build_lib = None
        self.plat_name = None
        self.build_temp = None
        self.inplace = 0
        self.package = None

        self.include_dirs = None
        self.define = None
        self.undef = None
        self.libraries = None
        self.library_dirs = None
        self.rpath = None
        self.link_objects = None
        self.debug = None
        self.force = None
        self.compiler = None
        self.swig = None
        self.swig_cpp = None
        self.swig_opts = None
        self.user = None
        self.parallel = None

    def finalize_options(self):
        from distutils import sysconfig

        self.set_undefined_options('build',
                                   ('build_lib', 'build_lib'),
                                   ('build_temp', 'build_temp'),
                                   ('compiler', 'compiler'),
                                   ('debug', 'debug'),
                                   ('force', 'force'),
                                   ('parallel', 'parallel'),
                                   ('plat_name', 'plat_name'),
                                   )

        if self.package is None:
            self.package = self.distribution.ext_package

        self.extensions = self.distribution.ext_modules

        # Make sure Python's include directories (for Python.h, pyconfig.h,
        # etc.) are in the include search path.
        py_include = sysconfig.get_python_inc()
        plat_py_include = sysconfig.get_python_inc(plat_specific=1)
        if self.include_dirs is None:
            self.include_dirs = self.distribution.include_dirs or []
        if isinstance(self.include_dirs, str):
            self.include_dirs = self.include_dirs.split(os.pathsep)

        # If in a virtualenv, add its include directory
        # Issue 16116
        if sys.exec_prefix != sys.base_exec_prefix:
            self.include_dirs.append(os.path.join(sys.exec_prefix, 'include'))

        # Put the Python "system" include dir at the end, so that
        # any local include dirs take precedence.
        self.include_dirs.extend(py_include.split(os.path.pathsep))
        if plat_py_include != py_include:
            self.include_dirs.extend(
                plat_py_include.split(os.path.pathsep))

        self.ensure_string_list('libraries')
        self.ensure_string_list('link_objects')

        # Life is easier if we're not forever checking for None, so
        # simplify these options to empty lists if unset
        if self.libraries is None:
            self.libraries = []
        if self.library_dirs is None:
            self.library_dirs = []
        elif isinstance(self.library_dirs, str):
            self.library_dirs = self.library_dirs.split(os.pathsep)

        if self.rpath is None:
            self.rpath = []
        elif isinstance(self.rpath, str):
            self.rpath = self.rpath.split(os.pathsep)

        # for extensions under windows use different directories
        # for Release and Debug builds.
        # also Python's library directory must be appended to library_dirs
        if os.name == 'nt':
            # the 'libs' directory is for binary installs - we assume that
            # must be the *native* platform.  But we don't really support
            # cross-compiling via a binary install anyway, so we let it go.
            self.library_dirs.append(os.path.join(sys.exec_prefix, 'libs'))
            if sys.base_exec_prefix != sys.prefix:  # Issue 16116
                self.library_dirs.append(os.path.join(sys.base_exec_prefix, 'libs'))
            if self.debug:
                self.build_temp = os.path.join(self.build_temp, "Debug")
            else:
                self.build_temp = os.path.join(self.build_temp, "Release")

            # Append the source distribution include and library directories,
            # this allows distutils on windows to work in the source tree
            self.include_dirs.append(os.path.dirname(get_config_h_filename()))
            _sys_home = getattr(sys, '_home', None)
            if _sys_home:
                self.library_dirs.append(_sys_home)

            # Use the .lib files for the correct architecture
            if self.plat_name == 'win32':
                suffix = 'win32'
            else:
                # win-amd64
                suffix = self.plat_name[4:]
            new_lib = os.path.join(sys.exec_prefix, 'PCbuild')
            if suffix:
                new_lib = os.path.join(new_lib, suffix)
            self.library_dirs.append(new_lib)

        # For extensions under Cygwin, Python's library directory must be
        # appended to library_dirs
        if sys.platform[:6] == 'cygwin':
            if sys.executable.startswith(os.path.join(sys.exec_prefix, "bin")):
                # building third party extensions
                self.library_dirs.append(os.path.join(sys.prefix, "lib",
                                                      "python" + get_python_version(),
                                                      "config"))
            else:
                # building python standard extensions
                self.library_dirs.append('.')

        # For building extensions with a shared Python library,
        # Python's library directory must be appended to library_dirs
        # See Issues: #1600860, #4366
        if (sysconfig.get_config_var('Py_ENABLE_SHARED')):
            if not sysconfig.python_build:
                # building third party extensions
                self.library_dirs.append(sysconfig.get_config_var('LIBDIR'))
            else:
                # building python standard extensions
                self.library_dirs.append('.')

        # The argument parsing will result in self.define being a string, but
        # it has to be a list of 2-tuples.  All the preprocessor symbols
        # specified by the 'define' option will be set to '1'.  Multiple
        # symbols can be separated with commas.

        if self.define:
            defines = self.define.split(',')
            self.define = [(symbol, '1') for symbol in defines]

        # The option for macros to undefine is also a string from the
        # option parsing, but has to be a list.  Multiple symbols can also
        # be separated with commas here.
        if self.undef:
            self.undef = self.undef.split(',')

        if self.swig_opts is None:
            self.swig_opts = []
        else:
            self.swig_opts = self.swig_opts.split(' ')

        # Finally add the user include and library directories if requested
        if self.user:
            user_include = os.path.join(USER_BASE, "include")
            user_lib = os.path.join(USER_BASE, "lib")
            if os.path.isdir(user_include):
                self.include_dirs.append(user_include)
            if os.path.isdir(user_lib):
                self.library_dirs.append(user_lib)
                self.rpath.append(user_lib)

        if isinstance(self.parallel, str):
            try:
                self.parallel = int(self.parallel)
            except ValueError:
                raise DistutilsOptionError("parallel should be an integer")

    def run(self):
        from distutils.ccompiler import new_compiler

        # 'self.extensions', as supplied by setup.py, is a list of
        # Extension instances.  See the documentation for Extension (in
        # distutils.extension) for details.
        #
        # For backwards compatibility with Distutils 0.8.2 and earlier, we
        # also allow the 'extensions' list to be a list of tuples:
        #    (ext_name, build_info)
        # where build_info is a dictionary containing everything that
        # Extension instances do except the name, with a few things being
        # differently named.  We convert these 2-tuples to Extension
        # instances as needed.

        if not self.extensions:
            return

        # If we were asked to build any C/C++ libraries, make sure that the
        # directory where we put them is in the library search path for
        # linking extensions.
        if self.distribution.has_c_libraries():
            build_clib = self.get_finalized_command('build_clib')
            self.libraries.extend(build_clib.get_library_names() or [])
            self.library_dirs.append(build_clib.build_clib)

        # Setup the CCompiler object that we'll use to do all the
        # compiling and linking
        self.compiler = new_compiler(compiler=self.compiler,
                                     verbose=self.verbose,
                                     dry_run=self.dry_run,
                                     force=self.force)
        customize_compiler(self.compiler)
        # If we are cross-compiling, init the compiler now (if we are not
        # cross-compiling, init would not hurt, but people may rely on
        # late initialization of compiler even if they shouldn't...)
        if os.name == 'nt' and self.plat_name != get_platform():
            self.compiler.initialize(self.plat_name)

        # And make sure that any compile/link-related options (which might
        # come from the command-line or from the setup script) are set in
        # that CCompiler object -- that way, they automatically apply to
        # all compiling and linking done here.
        if self.include_dirs is not None:
            self.compiler.set_include_dirs(self.include_dirs)
        if self.define is not None:
            # 'define' option is a list of (name,value) tuples
            for (name, value) in self.define:
                self.compiler.define_macro(name, value)
        if self.undef is not None:
            for macro in self.undef:
                self.compiler.undefine_macro(macro)
        if self.libraries is not None:
            self.compiler.set_libraries(self.libraries)
        if self.library_dirs is not None:
            self.compiler.set_library_dirs(self.library_dirs)
        if self.rpath is not None:
            self.compiler.set_runtime_library_dirs(self.rpath)
        if self.link_objects is not None:
            self.compiler.set_link_objects(self.link_objects)

        # Now actually compile and link everything.
        self.build_extensions()

    def check_extensions_list(self, extensions):
        """Ensure that the list of extensions (presumably provided as a
        command option 'extensions') is valid, i.e. it is a list of
        Extension objects.  We also support the old-style list of 2-tuples,
        where the tuples are (ext_name, build_info), which are converted to
        Extension instances here.

        Raise DistutilsSetupError if the structure is invalid anywhere;
        just returns otherwise.
        """
        if not isinstance(extensions, list):
            raise DistutilsSetupError(
                  "'ext_modules' option must be a list of Extension instances")

        for i, ext in enumerate(extensions):
            if isinstance(ext, Extension):
                continue                # OK! (assume type-checking done
                                        # by Extension constructor)

            if not isinstance(ext, tuple) or len(ext) != 2:
                raise DistutilsSetupError(
                       "each element of 'ext_modules' option must be an "
                       "Extension instance or 2-tuple")

            ext_name, build_info = ext

            log.warn("old-style (ext_name, build_info) tuple found in "
                     "ext_modules for extension '%s' "
                     "-- please convert to Extension instance", ext_name)

            if not (isinstance(ext_name, str) and
                    extension_name_re.match(ext_name)):
                raise DistutilsSetupError(
                       "first element of each tuple in 'ext_modules' "
                       "must be the extension name (a string)")

            if not isinstance(build_info, dict):
                raise DistutilsSetupError(
                       "second element of each tuple in 'ext_modules' "
                       "must be a dictionary (build info)")

            # OK, the (ext_name, build_info) dict is type-safe: convert it
            # to an Extension instance.
            ext = Extension(ext_name, build_info['sources'])

            # Easy stuff: one-to-one mapping from dict elements to
            # instance attributes.
            for key in ('include_dirs', 'library_dirs', 'libraries',
                        'extra_objects', 'extra_compile_args',
                        'extra_link_args'):
                val = build_info.get(key)
                if val is not None:
                    setattr(ext, key, val)

            # Medium-easy stuff: same syntax/semantics, different names.
            ext.runtime_library_dirs = build_info.get('rpath')
            if 'def_file' in build_info:
                log.warn("'def_file' element of build info dict "
                         "no longer supported")

            # Non-trivial stuff: 'macros' split into 'define_macros'
            # and 'undef_macros'.
            macros = build_info.get('macros')
            if macros:
                ext.define_macros = []
                ext.undef_macros = []
                for macro in macros:
                    if not (isinstance(macro, tuple) and len(macro) in (1, 2)):
                        raise DistutilsSetupError(
                              "'macros' element of build info dict "
                              "must be 1- or 2-tuple")
                    if len(macro) == 1:
                        ext.undef_macros.append(macro[0])
                    elif len(macro) == 2:
                        ext.define_macros.append(macro)

            extensions[i] = ext

    def get_source_files(self):
        self.check_extensions_list(self.extensions)
        filenames = []

        # Wouldn't it be neat if we knew the names of header files too...
        for ext in self.extensions:
            filenames.extend(ext.sources)
        return filenames

    def get_outputs(self):
        # Sanity check the 'extensions' list -- can't assume this is being
        # done in the same run as a 'build_extensions()' call (in fact, we
        # can probably assume that it *isn't*!).
        self.check_extensions_list(self.extensions)

        # And build the list of output (built) filenames.  Note that this
        # ignores the 'inplace' flag, and assumes everything goes in the
        # "build" tree.
        outputs = []
        for ext in self.extensions:
            outputs.append(self.get_ext_fullpath(ext.name))
        return outputs

    def build_extensions(self):
        # First, sanity-check the 'extensions' list
        self.check_extensions_list(self.extensions)
        if self.parallel:
            self._build_extensions_parallel()
        else:
            self._build_extensions_serial()

    def _build_extensions_parallel(self):
        workers = self.parallel
        if self.parallel is True:
            workers = os.cpu_count()  # may return None
        try:
            from concurrent.futures import ThreadPoolExecutor
        except ImportError:
            workers = None

        if workers is None:
            self._build_extensions_serial()
            return

        with ThreadPoolExecutor(max_workers=workers) as executor:
            futures = [executor.submit(self.build_extension, ext)
                       for ext in self.extensions]
            for ext, fut in zip(self.extensions, futures):
                with self._filter_build_errors(ext):
                    fut.result()

    def _build_extensions_serial(self):
        for ext in self.extensions:
            with self._filter_build_errors(ext):
                self.build_extension(ext)

    @contextlib.contextmanager
    def _filter_build_errors(self, ext):
        try:
            yield
        except (CCompilerError, DistutilsError, CompileError) as e:
            if not ext.optional:
                raise
            self.warn('building extension "%s" failed: %s' %
                      (ext.name, e))

    def build_extension(self, ext):
        sources = ext.sources
        if sources is None or not isinstance(sources, (list, tuple)):
            raise DistutilsSetupError(
                  "in 'ext_modules' option (extension '%s'), "
                  "'sources' must be present and must be "
                  "a list of source filenames" % ext.name)
        sources = list(sources)

        ext_path = self.get_ext_fullpath(ext.name)
        depends = sources + ext.depends
        if not (self.force or newer_group(depends, ext_path, 'newer')):
            log.debug("skipping '%s' extension (up-to-date)", ext.name)
            return
        else:
            log.info("building '%s' extension", ext.name)

        # First, scan the sources for SWIG definition files (.i), run
        # SWIG on 'em to create .c files, and modify the sources list
        # accordingly.
        sources = self.swig_sources(sources, ext)

        # Next, compile the source code to object files.

        # XXX not honouring 'define_macros' or 'undef_macros' -- the
        # CCompiler API needs to change to accommodate this, and I
        # want to do one thing at a time!

        # Two possible sources for extra compiler arguments:
        #   - 'extra_compile_args' in Extension object
        #   - CFLAGS environment variable (not particularly
        #     elegant, but people seem to expect it and I
        #     guess it's useful)
        # The environment variable should take precedence, and
        # any sensible compiler will give precedence to later
        # command line args.  Hence we combine them in order:
        extra_args = ext.extra_compile_args or []

        macros = ext.define_macros[:]
        for undef in ext.undef_macros:
            macros.append((undef,))

        objects = self.compiler.compile(sources,
                                         output_dir=self.build_temp,
                                         macros=macros,
                                         include_dirs=ext.include_dirs,
                                         debug=self.debug,
                                         extra_postargs=extra_args,
                                         depends=ext.depends)

        # XXX outdated variable, kept here in case third-part code
        # needs it.
        self._built_objects = objects[:]

        # Now link the object files together into a "shared object" --
        # of course, first we have to figure out all the other things
        # that go into the mix.
        if ext.extra_objects:
            objects.extend(ext.extra_objects)
        extra_args = ext.extra_link_args or []

        # Detect target language, if not provided
        language = ext.language or self.compiler.detect_language(sources)

        self.compiler.link_shared_object(
            objects, ext_path,
            libraries=self.get_libraries(ext),
            library_dirs=ext.library_dirs,
            runtime_library_dirs=ext.runtime_library_dirs,
            extra_postargs=extra_args,
            export_symbols=self.get_export_symbols(ext),
            debug=self.debug,
            build_temp=self.build_temp,
            target_lang=language)

    def swig_sources(self, sources, extension):
        """Walk the list of source files in 'sources', looking for SWIG
        interface (.i) files.  Run SWIG on all that are found, and
        return a modified 'sources' list with SWIG source files replaced
        by the generated C (or C++) files.
        """
        new_sources = []
        swig_sources = []
        swig_targets = {}

        # XXX this drops generated C/C++ files into the source tree, which
        # is fine for developers who want to distribute the generated
        # source -- but there should be an option to put SWIG output in
        # the temp dir.

        if self.swig_cpp:
            log.warn("--swig-cpp is deprecated - use --swig-opts=-c++")

        if self.swig_cpp or ('-c++' in self.swig_opts) or \
           ('-c++' in extension.swig_opts):
            target_ext = '.cpp'
        else:
            target_ext = '.c'

        for source in sources:
            (base, ext) = os.path.splitext(source)
            if ext == ".i":             # SWIG interface file
                new_sources.append(base + '_wrap' + target_ext)
                swig_sources.append(source)
                swig_targets[source] = new_sources[-1]
            else:
                new_sources.append(source)

        if not swig_sources:
            return new_sources

        swig = self.swig or self.find_swig()
        swig_cmd = [swig, "-python"]
        swig_cmd.extend(self.swig_opts)
        if self.swig_cpp:
            swig_cmd.append("-c++")

        # Do not override commandline arguments
        if not self.swig_opts:
            for o in extension.swig_opts:
                swig_cmd.append(o)

        for source in swig_sources:
            target = swig_targets[source]
            log.info("swigging %s to %s", source, target)
            self.spawn(swig_cmd + ["-o", target, source])

        return new_sources

    def find_swig(self):
        """Return the name of the SWIG executable.  On Unix, this is
        just "swig" -- it should be in the PATH.  Tries a bit harder on
        Windows.
        """
        if os.name == "posix":
            return "swig"
        elif os.name == "nt":
            # Look for SWIG in its standard installation directory on
            # Windows (or so I presume!).  If we find it there, great;
            # if not, act like Unix and assume it's in the PATH.
            for vers in ("1.3", "1.2", "1.1"):
                fn = os.path.join("c:\\swig%s" % vers, "swig.exe")
                if os.path.isfile(fn):
                    return fn
            else:
                return "swig.exe"
        else:
            raise DistutilsPlatformError(
                  "I don't know how to find (much less run) SWIG "
                  "on platform '%s'" % os.name)

    # -- Name generators -----------------------------------------------
    # (extension names, filenames, whatever)
    def get_ext_fullpath(self, ext_name):
        """Returns the path of the filename for a given extension.

        The file is located in `build_lib` or directly in the package
        (inplace option).
        """
        fullname = self.get_ext_fullname(ext_name)
        modpath = fullname.split('.')
        filename = self.get_ext_filename(modpath[-1])

        if not self.inplace:
            # no further work needed
            # returning :
            #   build_dir/package/path/filename
            filename = os.path.join(*modpath[:-1]+[filename])
            return os.path.join(self.build_lib, filename)

        # the inplace option requires to find the package directory
        # using the build_py command for that
        package = '.'.join(modpath[0:-1])
        build_py = self.get_finalized_command('build_py')
        package_dir = os.path.abspath(build_py.get_package_dir(package))

        # returning
        #   package_dir/filename
        return os.path.join(package_dir, filename)

    def get_ext_fullname(self, ext_name):
        """Returns the fullname of a given extension name.

        Adds the `package.` prefix"""
        if self.package is None:
            return ext_name
        else:
            return self.package + '.' + ext_name

    def get_ext_filename(self, ext_name):
        r"""Convert the name of an extension (eg. "foo.bar") into the name
        of the file from which it will be loaded (eg. "foo/bar.so", or
        "foo\bar.pyd").
        """
        from distutils.sysconfig import get_config_var
        ext_path = ext_name.split('.')
        ext_suffix = get_config_var('EXT_SUFFIX')
        return os.path.join(*ext_path) + ext_suffix

    def get_export_symbols(self, ext):
        """Return the list of symbols that a shared extension has to
        export.  This either uses 'ext.export_symbols' or, if it's not
        provided, "PyInit_" + module_name.  Only relevant on Windows, where
        the .pyd file (DLL) must export the module "PyInit_" function.
        """
        suffix = '_' + ext.name.split('.')[-1]
        try:
            # Unicode module name support as defined in PEP-489
            # https://www.python.org/dev/peps/pep-0489/#export-hook-name
            suffix.encode('ascii')
        except UnicodeEncodeError:
            suffix = 'U' + suffix.encode('punycode').replace(b'-', b'_').decode('ascii')

        initfunc_name = "PyInit" + suffix
        if initfunc_name not in ext.export_symbols:
            ext.export_symbols.append(initfunc_name)
        return ext.export_symbols

    def get_libraries(self, ext):
        """Return the list of libraries to link against when building a
        shared extension.  On most platforms, this is just 'ext.libraries';
        on Windows, we add the Python library (eg. python20.dll).
        """
        # The python library is always needed on Windows.  For MSVC, this
        # is redundant, since the library is mentioned in a pragma in
        # pyconfig.h that MSVC groks.  The other Windows compilers all seem
        # to need it mentioned explicitly, though, so that's what we do.
        # Append '_d' to the python import library on debug builds.
        if sys.platform == "win32":
            from distutils._msvccompiler import MSVCCompiler
            if not isinstance(self.compiler, MSVCCompiler):
                template = "python%d%d"
                if self.debug:
                    template = template + '_d'
                pythonlib = (template %
                       (sys.hexversion >> 24, (sys.hexversion >> 16) & 0xff))
                # don't extend ext.libraries, it may be shared with other
                # extensions, it is a reference to the original list
                return ext.libraries + [pythonlib]
        else:
            # On Android only the main executable and LD_PRELOADs are considered
            # to be RTLD_GLOBAL, all the dependencies of the main executable
            # remain RTLD_LOCAL and so the shared libraries must be linked with
            # libpython when python is built with a shared python library (issue
            # bpo-21536).
            # On Cygwin (and if required, other POSIX-like platforms based on
            # Windows like MinGW) it is simply necessary that all symbols in
            # shared libraries are resolved at link time.
            from distutils.sysconfig import get_config_var
            link_libpython = False
            if get_config_var('Py_ENABLE_SHARED'):
                # A native build on an Android device or on Cygwin
                if hasattr(sys, 'getandroidapilevel'):
                    link_libpython = True
                elif sys.platform == 'cygwin':
                    link_libpython = True
                elif '_PYTHON_HOST_PLATFORM' in os.environ:
                    # We are cross-compiling for one of the relevant platforms
                    if get_config_var('ANDROID_API_LEVEL') != 0:
                        link_libpython = True
                    elif get_config_var('MACHDEP') == 'cygwin':
                        link_libpython = True

            if link_libpython:
                ldversion = get_config_var('LDVERSION')
                return ext.libraries + ['python' + ldversion]

        return ext.libraries
PKV[k���8command/__pycache__/install_scripts.cpython-36.opt-1.pycnu�[���3


 \��@sDdZddlZddlmZddlmZddlmZGdd�de�ZdS)zudistutils.command.install_scripts

Implements the Distutils 'install_scripts' command, for installing
Python scripts.�N)�Command)�log)�ST_MODEc@sLeZdZdZddddgZddgZdd�Zdd�Zdd�Zdd�Z	dd�Z
dS)�install_scriptsz%install scripts (Python or otherwise)�install-dir=�d�directory to install scripts to�
build-dir=�b�'build directory (where to install from)�force�f�-force installation (overwrite existing files)�
skip-buildN�skip the build stepscCsd|_d|_d|_d|_dS)Nr)�install_dirr�	build_dir�
skip_build)�self�r�9/usr/lib64/python3.6/distutils/command/install_scripts.py�initialize_optionssz"install_scripts.initialize_optionscCs |jdd	�|jdd
dd�dS)
NZbuild�
build_scriptsrZinstallrrrr)rr)rr)rr)rr)Zset_undefined_options)rrrr�finalize_options!s
z install_scripts.finalize_optionscCs�|js|jd�|j|j|j�|_tjdkr�xT|j�D]H}|j	rNt
jd|�q6tj|�t
dBd@}t
jd||�tj||�q6WdS)Nr�posixzchanging mode of %simi�zchanging mode of %s to %o)rZrun_commandZ	copy_treerr�outfiles�os�name�get_outputsZdry_runr�info�statr�chmod)r�file�moderrr�run)s

zinstall_scripts.runcCs|jjp
gS)N)Zdistribution�scripts)rrrr�
get_inputs8szinstall_scripts.get_inputscCs
|jpgS)N)r)rrrrr;szinstall_scripts.get_outputs)rrr)r	r
r)rr
r)rNr)�__name__�
__module__�__qualname__ZdescriptionZuser_optionsZboolean_optionsrrr$r&rrrrrrsr)	�__doc__rZdistutils.corerZ	distutilsrr rrrrrr�<module>s
PKV[�1command/__pycache__/__init__.cpython-36.opt-1.pycnu�[���3


 \�@s2dZddddddddd	d
ddd
ddddddgZdS)z\distutils.command

Package containing implementation of all the standard Distutils
commands.ZbuildZbuild_pyZ	build_extZ
build_clibZ
build_scriptsZcleanZinstallZinstall_libZinstall_headersZinstall_scriptsZinstall_dataZsdist�registerZbdistZ
bdist_dumbZ	bdist_rpmZ
bdist_wininstZcheckZuploadN)�__doc__�__all__�rr�2/usr/lib64/python3.6/distutils/command/__init__.py�<module>s&PKV[���88.command/__pycache__/install_lib.cpython-36.pycnu�[���3


 \� �@sLdZddlZddlZddlZddlmZddlmZdZ	Gdd�de�Z
dS)zkdistutils.command.install_lib

Implements the Distutils 'install_lib' command
(install all Python modules).�N)�Command)�DistutilsOptionErrorz.pyc	@s�eZdZdZd*d+d,d-d.d/d0gZdddgZddiZdd�Zdd�Zdd�Z	dd�Z
dd�Zd d!�Zd"d#�Z
d$d%�Zd&d'�Zd(d)�ZdS)1�install_libz7install all Python modules (extensions and pure Python)�install-dir=�d�directory to install to�
build-dir=�b�'build directory (where to install from)�force�f�-force installation (overwrite existing files)�compile�c�compile .py to .pyc [default]�
no-compileN�don't compile .py files�	optimize=�O�lalso compile with optimization: -O1 for "python -O", -O2 for "python -OO", and -O0 to disable [default: -O0]�
skip-build�skip the build stepscCs(d|_d|_d|_d|_d|_d|_dS)Nr)�install_dir�	build_dirrr�optimize�
skip_build)�self�r�5/usr/lib64/python3.6/distutils/command/install_lib.py�initialize_options3szinstall_lib.initialize_optionscCs�|jddddddd�|jdkr&d
|_|jdkr6d|_t|jt�s�yt|j�|_|jdkr^t�Wn ttfk
r�td��YnXdS)N�install�	build_librrrrrrrTFr��zoptimize must be 0, 1, or 2)r!r)rr)rr)rr)rr)rr)rr"r#)Zset_undefined_optionsrr�
isinstance�int�AssertionError�
ValueErrorr)rrrr�finalize_options<s$


zinstall_lib.finalize_optionscCs0|j�|j�}|dk	r,|jj�r,|j|�dS)N)�buildr �distribution�has_pure_modules�byte_compile)r�outfilesrrr�runVszinstall_lib.runcCs2|js.|jj�r|jd�|jj�r.|jd�dS)N�build_py�	build_ext)rr*r+Zrun_command�has_ext_modules)rrrrr)fs



zinstall_lib.buildcCs8tjj|j�r |j|j|j�}n|jd|j�dS|S)Nz3'%s' does not exist -- no Python modules to install)�os�path�isdirrZ	copy_treer�warn)rr-rrrr ms
zinstall_lib.installcCsrtjr|jd�dSddlm}|jd�j}|jrH||d|j||j	d�|j
dkrn|||j
|j||j|j	d�dS)Nz%byte-compiling is disabled, skipping.r)r,r )rr�prefix�dry_run)rrr6�verboser7)�sys�dont_write_bytecoder5Zdistutils.utilr,�get_finalized_command�rootrrr7rr8)r�filesr,Zinstall_rootrrrr,vs


zinstall_lib.byte_compilec
Csh|sgS|j|�}|j�}t||�}t|�ttj�}g}x(|D] }	|jtjj||	|d���q@W|S)N)	r;�get_outputs�getattr�lenr2�sep�appendr3�join)
rZhas_anyZ	build_cmdZ
cmd_optionZ
output_dirZbuild_filesrZ
prefix_lenZoutputs�filerrr�_mutate_outputs�s


 zinstall_lib._mutate_outputscCsvg}xl|D]d}tjjtjj|��d}|tkr0q
|jrL|jtjj	|dd��|j
dkr
|jtjj	||j
d��q
W|S)Nr"�)�optimizationr)r2r3�splitext�normcase�PYTHON_SOURCE_EXTENSIONrrB�	importlib�util�cache_from_sourcer)rZpy_filenamesZbytecode_filesZpy_fileZextrrr�_bytecode_filenames�s



zinstall_lib._bytecode_filenamescCsR|j|jj�dd|j�}|jr*|j|�}ng}|j|jj�dd|j�}|||S)z�Return the list of files that would be installed if this command
        were actually run.  Not affected by the "dry-run" flag or whether
        modules have actually been built yet.
        r/r!r0)rEr*r+rrrNr1)rZpure_outputsZbytecode_outputsZext_outputsrrrr>�szinstall_lib.get_outputscCsLg}|jj�r&|jd�}|j|j��|jj�rH|jd�}|j|j��|S)z�Get the list of files that are input to this command, ie. the
        files that get installed as they are named in the build tree.
        The files in this list correspond one-to-one to the output
        filenames returned by 'get_outputs()'.
        r/r0)r*r+r;�extendr>r1)rZinputsr/r0rrr�
get_inputs�s



zinstall_lib.get_inputs)rrr)rr	r
)rrr
)rrr)rNr)rrr)rNr)�__name__�
__module__�__qualname__ZdescriptionZuser_optionsZboolean_optionsZnegative_optrr(r.r)r r,rErNr>rPrrrrrs*
		r)�__doc__r2�importlib.utilrKr9Zdistutils.corerZdistutils.errorsrrJrrrrr�<module>sPKV[�zL��.command/__pycache__/bdist.cpython-36.opt-1.pycnu�[���3


 \��@sHdZddlZddlmZddlTddlmZdd�ZGdd	�d	e�ZdS)
zidistutils.command.bdist

Implements the Distutils 'bdist' command (create a built [binary]
distribution).�N)�Command)�*)�get_platformcCsTddlm}g}x,tjD]"}|jd|dtj|df�qW||�}|jd�dS)zFPrint list of available formats (arguments to "--format" option).
    r)�FancyGetoptzformats=N�z'List of available distribution formats:)Zdistutils.fancy_getoptr�bdist�format_commands�append�format_commandZ
print_help)r�formats�formatZpretty_printer�r
�//usr/lib64/python3.6/distutils/command/bdist.py�show_formatssrc
@s�eZdZdZd6ddde�fd7d8d9d:d;gZdgZdd	defgZd<Z	ddd�Z
dddddd d!dd"g	Zd=d>d?d@dAdBdCdDdEd/�	Zd0d1�Z
d2d3�Zd4d5�Zd	S)Frz$create a built (binary) distribution�bdist-base=�b�4temporary directory for creating built distributionsz
plat-name=�pz;platform name to embed in generated filenames (default: %s)�formats=N�/formats for distribution (comma-separated list)�	dist-dir=�d�=directory to put final built distributions in [default: dist]�
skip-build�2skip rebuilding everything (for testing/debugging)�owner=�u�@Owner name used when creating a tar file [default: current user]�group=�g�AGroup name used when creating a tar file [default: current group]zhelp-formatsz$lists available distribution formats�	bdist_rpm�gztar�zip)�posix�nt�rpm�bztar�xztar�ztar�tar�wininst�msi�RPM distribution�
bdist_dumb�gzip'ed tar file�bzip2'ed tar file�xz'ed tar file�compressed tar file�tar file�
bdist_wininst�Windows executable installer�ZIP file�	bdist_msi�Microsoft Installer)	r&r"r'r(r)r*r+r#r,cCs.d|_d|_d|_d|_d|_d|_d|_dS)Nr)�
bdist_base�	plat_namer�dist_dir�
skip_build�group�owner)�selfr
r
r�initialize_optionsQszbdist.initialize_optionscCs�|jdkr(|jrt�|_n|jd�j|_|jdkrT|jd�j}tjj|d|j�|_|j	d�|j
dkr�y|jtjg|_
Wn"t
k
r�tdtj��YnX|jdkr�d|_dS)NZbuildzbdist.rz;don't know how to create built distributions on platform %sZdist)r:r<rZget_finalized_commandr9�
build_base�os�path�joinZensure_string_listr�default_format�name�KeyErrorZDistutilsPlatformErrorr;)r?rAr
r
r�finalize_optionsZs$





zbdist.finalize_optionscCs�g}xH|jD]>}y|j|j|d�Wqtk
rHtd|��YqXqWxztt|j��D]h}||}|j|�}||jkr�|j||_	|dkr�|j
|_
|j|_|||dd�kr�d|_|j
|�q^WdS)Nrzinvalid format '%s'r.r)rr	r
rGZDistutilsOptionError�range�lenZreinitialize_command�no_format_optionrr>r=Z	keep_tempZrun_command)r?Zcommandsr�iZcmd_nameZsub_cmdr
r
r�runvs"

z	bdist.run)rrr)rNr)rrr)rNr)rrr)rrr )r!)r!r-)r.r/)r.r0)r.r1)r.r2)r.r3)r4r5)r.r6)r7r8)�__name__�
__module__�__qualname__ZdescriptionrZuser_optionsZboolean_optionsrZhelp_optionsrKrErr
r@rHrMr
r
r
rrsJ

	r)	�__doc__rBZdistutils.corerZdistutils.errorsZdistutils.utilrrrr
r
r
r�<module>sPKV[2	a׃�(command/__pycache__/clean.cpython-36.pycnu�[���3


 \�
�@sDdZddlZddlmZddlmZddlmZGdd�de�ZdS)zBdistutils.command.clean

Implements the Distutils 'clean' command.�N)�Command)�remove_tree)�logc@s>eZdZdZddddddgZdgZdd�Zdd�Zdd�ZdS)�cleanz-clean up temporary files from 'build' command�build-base=�b�2base build directory (default: 'build.build-base')�
build-lib=N�<build directory for all modules (default: 'build.build-lib')�build-temp=�t�7temporary build directory (default: 'build.build-temp')�build-scripts=�<build directory for scripts (default: 'build.build-scripts')�bdist-base=�+temporary directory for built distributions�all�a�7remove all build output, not just temporary by-productscCs(d|_d|_d|_d|_d|_d|_dS)N)�
build_base�	build_lib�
build_temp�
build_scripts�
bdist_baser)�self�r�//usr/lib64/python3.6/distutils/command/clean.py�initialize_options szclean.initialize_optionscCs"|jddd	d
d�|jdd�dS)
NZbuildrrrrZbdistr)rr)rr)rr)rr)rr)Zset_undefined_options)rrrr�finalize_options(szclean.finalize_optionscCs�tjj|j�r t|j|jd�ntjd|j�|jrvx@|j	|j
|jfD],}tjj|�rft||jd�qFtjd|�qFW|js�ytj
|j�tjd|j�Wntk
r�YnXdS)N)�dry_runz%'%s' does not exist -- can't clean itz
removing '%s')�os�path�existsrrrr�debugrrrr�warn�rmdirr�info�OSError)rZ	directoryrrr�run1s$
z	clean.run)rrr)r	Nr
)rrr
)rNr)rNr)rrr)	�__name__�
__module__�__qualname__ZdescriptionZuser_optionsZboolean_optionsrrr(rrrrrs"	r)	�__doc__r Zdistutils.corerZdistutils.dir_utilrZ	distutilsrrrrrr�<module>s
PKV['5�5��6command/__pycache__/build_scripts.cpython-36.opt-1.pycnu�[���3


 \X�@s�dZddlZddlZddlmZddlmZddlmZddl	m
Z
ddlmZm
Z
ddlmZddlZejd	�ZGd
d�de�ZGdd
�d
ee
�ZdS)zRdistutils.command.build_scripts

Implements the Distutils 'build_scripts' command.�N)�ST_MODE)�	sysconfig)�Command)�newer)�convert_path�	Mixin2to3)�logs^#!.*python[0-9.]*([ 	].*)?$c@sHeZdZdZdddgZdgZdd�Zd
d�Zdd�Zdd�Z	dd�Z
dS)�
build_scriptsz("build" scripts (copy and fixup #! line)�
build-dir=�d�directory to "build" (copy) to�force�f�1forcibly build everything (ignore file timestamps�executable=�e�*specify final destination interpreter pathcCs"d|_d|_d|_d|_d|_dS)N)�	build_dir�scriptsr
�
executable�outfiles)�self�r�7/usr/lib64/python3.6/distutils/command/build_scripts.py�initialize_optionss
z build_scripts.initialize_optionscCs|jdddd�|jj|_dS)	NZbuildr	rr
r)r	r)r
r
)rr)Zset_undefined_optionsZdistributionr)rrrr�finalize_options%s
zbuild_scripts.finalize_optionscCs|jS)N)r)rrrr�get_source_files,szbuild_scripts.get_source_filescCs|js
dS|j�dS)N)r�copy_scripts)rrrr�run/szbuild_scripts.runc"Cs�|j|j�g}g}�x,|jD�] }d}t|�}tjj|jtjj|��}|j|�|j	rtt
||�rttjd|�qyt
|d�}Wn tk
r�|js��d}YnXXtj|j�\}}|jd�|j�}	|	s�|jd|�qtj|	�}
|
r�d}|
jd�p�d	}|�rtjd
||j�|j|�|j�stj�s2|j}n(tjjtjd�dtjd
�tjd�f�}tj|�}d||d}
y|
jd�Wn$tk
�r�t dj!|
���YnXy|
j|�Wn&tk
�r�t dj!|
|���YnXt
|d��}|j"|
�|j#|j$��WdQRX|�r@|j%�q|�r*|j%�|j|�|j&||�qWtj'dk�r�xh|D]`}|j�rptjd|�nDtj(|�t)d@}|dBd@}||k�rVtjd|||�tj*||��qVW||fS)a"Copy each script listed in 'self.scripts'; if it's marked as a
        Python script in the Unix way (first line matches 'first_line_re',
        ie. starts with "\#!" and contains "python"), then adjust the first
        line to refer to the current Python interpreter as we copy.
        Fznot copying %s (up-to-date)�rbNrz%s is an empty file (skipping)T��zcopying and adjusting %s -> %s�BINDIRz
python%s%s�VERSION�EXEs#!�
zutf-8z.The shebang ({!r}) is not decodable from utf-8zAThe shebang ({!r}) is not decodable from the script encoding ({})�wb�posixzchanging mode of %si�imz!changing mode of %s from %o to %o)+Zmkpathrrr�os�path�join�basename�appendr
rr�debug�open�OSError�dry_run�tokenize�detect_encoding�readline�seek�warn�
first_line_re�match�group�inforZpython_buildr�get_config_var�fsencode�decode�UnicodeDecodeError�
ValueError�format�write�
writelines�	readlines�closeZ	copy_file�name�statr�chmod)rr�
updated_filesZscriptZadjustZoutfiler�encoding�linesZ
first_liner7Zpost_interprZshebangZoutf�fileZoldmodeZnewmoderrrr5s�












zbuild_scripts.copy_scriptsN)r
rr)r
rr)rrr)�__name__�
__module__�__qualname__ZdescriptionZuser_optionsZboolean_optionsrrrrrrrrrr	sr	c@seZdZdd�ZdS)�build_scripts_2to3cCs&tj|�\}}|js|j|�||fS)N)r	rr0Zrun_2to3)rrrGrrrr�s
zbuild_scripts_2to3.copy_scriptsN)rKrLrMrrrrrrN�srN)�__doc__r(�rerErZ	distutilsrZdistutils.corerZdistutils.dep_utilrZdistutils.utilrrrr1�compiler6r	rNrrrr�<module>s

PKV[I0�TJ(J(/command/__pycache__/config.cpython-36.opt-1.pycnu�[���3


 \3�@sldZddlZddlZddlmZddlmZddlmZddl	m
Z
ddd	�ZGd
d�de�Zddd
�Z
dS)a�distutils.command.config

Implements the Distutils 'config' command, a (mostly) empty command class
that exists mainly to be sub-classed by specific module distributions and
applications.  The idea is that while every "config" command is different,
at least they're all named the same, and users always see "config" in the
list of standard commands.  Also, this is a good place to put common
configure-like tasks: "try to compile this C code", or "figure out where
this header file lives".
�N)�Command)�DistutilsExecError)�customize_compiler)�logz.cz.cxx)�czc++c@s�eZdZdZd>d?d@dAdBdCdDdEdFg	Zdd�Zdd�Zdd�Zd d!�Zd"d#�Z	d$d%�Z
d&d'�Zd(d)�Zd*d+�Z
dGd-d.�ZdHd/d0�ZdId1d2�ZdJd3d4�ZdKd5d6�ZdLd8d9�Zdddgfd:d;�ZdMd<d=�ZdS)N�configzprepare to build�	compiler=N�specify the compiler type�cc=�specify the compiler executable�
include-dirs=�I�.list of directories to search for header files�define=�D�C preprocessor macros to define�undef=�U�!C preprocessor macros to undefine�
libraries=�l�!external C libraries to link with�
library-dirs=�L�.directories to search for external C libraries�noisy�1show every action (compile, link, run, ...) taken�dump-source�=dump generated source files before attempting to compile themcCs4d|_d|_d|_d|_d|_d|_d|_g|_dS)N�)�compilerZcc�include_dirs�	libraries�library_dirsr�dump_source�
temp_files)�self�r'�0/usr/lib64/python3.6/distutils/command/config.py�initialize_options3szconfig.initialize_optionscCs�|jdkr|jjpg|_nt|jt�r6|jjtj�|_|jdkrHg|_nt|jt�r^|jg|_|jdkrpg|_nt|jt�r�|jjtj�|_dS)N)	r!Zdistribution�
isinstance�str�split�os�pathsepr"r#)r&r'r'r(�finalize_optionsBs



zconfig.finalize_optionscCsdS)Nr')r&r'r'r(�runRsz
config.runcCszddlm}m}t|j|�sv||j|jdd�|_t|j�|jrN|jj|j�|j	rb|jj
|j	�|jrv|jj|j�dS)z^Check that 'self.compiler' really is a CCompiler object;
        if not, make it one.
        r)�	CCompiler�new_compilerr)r �dry_runZforceN)
�distutils.ccompilerr1r2r*r r3rr!Zset_include_dirsr"Z
set_librariesr#Zset_library_dirs)r&r1r2r'r'r(�_check_compilerYs
zconfig._check_compilercCsldt|}t|d�}|r@x|D]}|jd|�q W|jd�|j|�|ddkr`|jd�|j�|S)NZ_configtest�wz#include <%s>
�
r���)�LANG_EXT�open�write�close)r&�body�headers�lang�filename�file�headerr'r'r(�_gen_temp_sourcefileks




zconfig._gen_temp_sourcefilecCs<|j|||�}d}|jj||g�|jj|||d�||fS)Nz
_configtest.i)r!)rCr%�extendr Z
preprocess)r&r=r>r!r?�src�outr'r'r(�_preprocessxs
zconfig._preprocesscCs\|j|||�}|jr"t|d|�|jj|g�\}|jj||g�|jj|g|d�||fS)Nzcompiling '%s':)r!)rCr$�	dump_filer Zobject_filenamesr%rD�compile)r&r=r>r!r?rE�objr'r'r(�_compileszconfig._compilec
Csr|j||||�\}}tjjtjj|��d}	|jj|g|	|||d�|jjdk	r\|	|jj}	|jj	|	�|||	fS)Nr)r"r#Ztarget_lang)
rKr-�path�splitext�basenamer Zlink_executableZ
exe_extensionr%�append)
r&r=r>r!r"r#r?rErJ�progr'r'r(�_link�szconfig._linkcGsX|s|j}g|_tjddj|��x0|D](}ytj|�Wq(tk
rNYq(Xq(WdS)Nzremoving: %s� )r%r�info�joinr-�remove�OSError)r&�	filenamesr@r'r'r(�_clean�s
z
config._cleanrcCsRddlm}|j�d}y|j||||�Wn|k
rDd}YnX|j�|S)aQConstruct a source file from 'body' (a string containing lines
        of C/C++ code) and 'headers' (a list of header files to include)
        and run it through the preprocessor.  Return true if the
        preprocessor succeeded, false if there were any errors.
        ('body' probably isn't of much use, but what the heck.)
        r)�CompileErrorTF)r4rYr5rGrX)r&r=r>r!r?rY�okr'r'r(�try_cpp�s
zconfig.try_cppcCsx|j�|j||||�\}}t|t�r0tj|�}t|�}d}	x&|j�}
|
dkrPP|j|
�r>d}	Pq>W|j	�|j
�|	S)a�Construct a source file (just like 'try_cpp()'), run it through
        the preprocessor, and return true if any line of the output matches
        'pattern'.  'pattern' should either be a compiled regex object or a
        string containing a regex.  If both 'body' and 'headers' are None,
        preprocesses an empty file -- which can be useful to determine the
        symbols the preprocessor and compiler set by default.
        F�T)r5rGr*r+�rerIr:�readline�searchr<rX)r&�patternr=r>r!r?rErFrA�match�liner'r'r(�
search_cpp�s 	


zconfig.search_cppcCsdddlm}|j�y|j||||�d}Wn|k
rDd}YnXtj|rRdpTd�|j�|S)zwTry to compile a source file built from 'body' and 'headers'.
        Return true on success, false otherwise.
        r)rYTFzsuccess!zfailure.)r4rYr5rKrrSrX)r&r=r>r!r?rYrZr'r'r(�try_compile�s
zconfig.try_compilec

Cspddlm}m}|j�y|j||||||�d}	Wn||fk
rPd}	YnXtj|	r^dp`d�|j�|	S)z�Try to compile and link a source file, built from 'body' and
        'headers', to executable form.  Return true on success, false
        otherwise.
        r)rY�	LinkErrorTFzsuccess!zfailure.)r4rYrer5rQrrSrX)
r&r=r>r!r"r#r?rYrerZr'r'r(�try_link�s


zconfig.try_linkc

Cs�ddlm}m}|j�y.|j||||||�\}	}
}|j|g�d}Wn||tfk
rdd}YnXtj|rrdptd�|j	�|S)z�Try to compile, link to an executable, and run a program
        built from 'body' and 'headers'.  Return true on success, false
        otherwise.
        r)rYreTFzsuccess!zfailure.)
r4rYrer5rQZspawnrrrSrX)
r&r=r>r!r"r#r?rYrerErJZexerZr'r'r(�try_run�s

zconfig.try_runrc	Cst|j�g}|r|jd|�|jd�|r<|jd|�n|jd|�|jd�dj|�d}|j|||||�S)a�Determine if function 'func' is available by constructing a
        source file that refers to 'func', and compiles and links it.
        If everything succeeds, returns true; otherwise returns false.

        The constructed source file starts out by including the header
        files listed in 'headers'.  If 'decl' is true, it then declares
        'func' (as "int func()"); you probably shouldn't supply 'headers'
        and set 'decl' true in the same call, or you might get errors about
        a conflicting declarations for 'func'.  Finally, the constructed
        'main()' function either references 'func' or (if 'call' is true)
        calls it.  'libraries' and 'library_dirs' are used when
        linking.
        z
int %s ();z
int main () {z  %s();z  %s;�}r7)r5rOrTrf)	r&�funcr>r!r"r#ZdeclZcallr=r'r'r(�
check_funcs


zconfig.check_funccCs |j�|jd|||g||�S)a�Determine if 'library' is available to be linked against,
        without actually checking that any particular symbols are provided
        by it.  'headers' will be used in constructing the source file to
        be compiled, but the only effect of this is to check if all the
        header files listed are available.  Any libraries listed in
        'other_libraries' will be included in the link, in case 'library'
        has symbols that depend on other libraries.
        zint main (void) { })r5rf)r&Zlibraryr#r>r!Zother_librariesr'r'r(�	check_lib6s

zconfig.check_libcCs|jd|g|d�S)z�Determine if the system header file named by 'header_file'
        exists and can be found by the preprocessor; return true if so,
        false otherwise.
        z
/* No body */)r=r>r!)r[)r&rBr!r#r?r'r'r(�check_headerDs
zconfig.check_header)rNr	)r
Nr)rr
r)rrr)rrr)rrr)rrr)rNr)rNr)NNNr)NNNr)NNr)NNNNr)NNNNr)NNNNrr)NNr)�__name__�
__module__�__qualname__ZdescriptionZuser_optionsr)r/r0r5rCrGrKrQrXr[rcrdrfrgrjrkrlr'r'r'r(rsT
	






rc
CsJ|dkrtjd|�n
tj|�t|�}ztj|j��Wd|j�XdS)zjDumps a file content into log.info.

    If head is not None, will be dumped before the file content.
    Nz%s)rrSr:�readr<)r@�headrAr'r'r(rHNs
rH)N)�__doc__r-r]Zdistutils.corerZdistutils.errorsrZdistutils.sysconfigrZ	distutilsrr9rrHr'r'r'r(�<module>
s
;PKV[��i�VV/command/__pycache__/config.cpython-36.opt-2.pycnu�[���3


 \3�@shddlZddlZddlmZddlmZddlmZddlm	Z	ddd�Z
Gd	d
�d
e�Zd
dd�ZdS)�N)�Command)�DistutilsExecError)�customize_compiler)�logz.cz.cxx)�czc++c@s�eZdZdZd>d?d@dAdBdCdDdEdFg	Zdd�Zdd�Zdd�Zd d!�Zd"d#�Z	d$d%�Z
d&d'�Zd(d)�Zd*d+�Z
dGd-d.�ZdHd/d0�ZdId1d2�ZdJd3d4�ZdKd5d6�ZdLd8d9�Zdddgfd:d;�ZdMd<d=�ZdS)N�configzprepare to build�	compiler=N�specify the compiler type�cc=�specify the compiler executable�
include-dirs=�I�.list of directories to search for header files�define=�D�C preprocessor macros to define�undef=�U�!C preprocessor macros to undefine�
libraries=�l�!external C libraries to link with�
library-dirs=�L�.directories to search for external C libraries�noisy�1show every action (compile, link, run, ...) taken�dump-source�=dump generated source files before attempting to compile themcCs4d|_d|_d|_d|_d|_d|_d|_g|_dS)N�)�compilerZcc�include_dirs�	libraries�library_dirsr�dump_source�
temp_files)�self�r'�0/usr/lib64/python3.6/distutils/command/config.py�initialize_options3szconfig.initialize_optionscCs�|jdkr|jjpg|_nt|jt�r6|jjtj�|_|jdkrHg|_nt|jt�r^|jg|_|jdkrpg|_nt|jt�r�|jjtj�|_dS)N)	r!Zdistribution�
isinstance�str�split�os�pathsepr"r#)r&r'r'r(�finalize_optionsBs



zconfig.finalize_optionscCsdS)Nr')r&r'r'r(�runRsz
config.runcCszddlm}m}t|j|�sv||j|jdd�|_t|j�|jrN|jj|j�|j	rb|jj
|j	�|jrv|jj|j�dS)Nr)�	CCompiler�new_compilerr)r �dry_runZforce)
�distutils.ccompilerr1r2r*r r3rr!Zset_include_dirsr"Z
set_librariesr#Zset_library_dirs)r&r1r2r'r'r(�_check_compilerYs
zconfig._check_compilercCsldt|}t|d�}|r@x|D]}|jd|�q W|jd�|j|�|ddkr`|jd�|j�|S)NZ_configtest�wz#include <%s>
�
r���)�LANG_EXT�open�write�close)r&�body�headers�lang�filename�file�headerr'r'r(�_gen_temp_sourcefileks




zconfig._gen_temp_sourcefilecCs<|j|||�}d}|jj||g�|jj|||d�||fS)Nz
_configtest.i)r!)rCr%�extendr Z
preprocess)r&r=r>r!r?�src�outr'r'r(�_preprocessxs
zconfig._preprocesscCs\|j|||�}|jr"t|d|�|jj|g�\}|jj||g�|jj|g|d�||fS)Nzcompiling '%s':)r!)rCr$�	dump_filer Zobject_filenamesr%rD�compile)r&r=r>r!r?rE�objr'r'r(�_compileszconfig._compilec
Csr|j||||�\}}tjjtjj|��d}	|jj|g|	|||d�|jjdk	r\|	|jj}	|jj	|	�|||	fS)Nr)r"r#Ztarget_lang)
rKr-�path�splitext�basenamer Zlink_executableZ
exe_extensionr%�append)
r&r=r>r!r"r#r?rErJ�progr'r'r(�_link�szconfig._linkcGsX|s|j}g|_tjddj|��x0|D](}ytj|�Wq(tk
rNYq(Xq(WdS)Nzremoving: %s� )r%r�info�joinr-�remove�OSError)r&�	filenamesr@r'r'r(�_clean�s
z
config._cleanrcCsRddlm}|j�d}y|j||||�Wn|k
rDd}YnX|j�|S)Nr)�CompileErrorTF)r4rYr5rGrX)r&r=r>r!r?rY�okr'r'r(�try_cpp�s
zconfig.try_cppcCsx|j�|j||||�\}}t|t�r0tj|�}t|�}d}	x&|j�}
|
dkrPP|j|
�r>d}	Pq>W|j	�|j
�|	S)NF�T)r5rGr*r+�rerIr:�readline�searchr<rX)r&�patternr=r>r!r?rErFrA�match�liner'r'r(�
search_cpp�s 	


zconfig.search_cppcCsdddlm}|j�y|j||||�d}Wn|k
rDd}YnXtj|rRdpTd�|j�|S)Nr)rYTFzsuccess!zfailure.)r4rYr5rKrrSrX)r&r=r>r!r?rYrZr'r'r(�try_compile�s
zconfig.try_compilec

Cspddlm}m}|j�y|j||||||�d}	Wn||fk
rPd}	YnXtj|	r^dp`d�|j�|	S)Nr)rY�	LinkErrorTFzsuccess!zfailure.)r4rYrer5rQrrSrX)
r&r=r>r!r"r#r?rYrerZr'r'r(�try_link�s


zconfig.try_linkc

Cs�ddlm}m}|j�y.|j||||||�\}	}
}|j|g�d}Wn||tfk
rdd}YnXtj|rrdptd�|j	�|S)Nr)rYreTFzsuccess!zfailure.)
r4rYrer5rQZspawnrrrSrX)
r&r=r>r!r"r#r?rYrerErJZexerZr'r'r(�try_run�s

zconfig.try_runrc	Cst|j�g}|r|jd|�|jd�|r<|jd|�n|jd|�|jd�dj|�d}|j|||||�S)Nz
int %s ();z
int main () {z  %s();z  %s;�}r7)r5rOrTrf)	r&�funcr>r!r"r#ZdeclZcallr=r'r'r(�
check_funcs


zconfig.check_funccCs |j�|jd|||g||�S)Nzint main (void) { })r5rf)r&Zlibraryr#r>r!Zother_librariesr'r'r(�	check_lib6s

zconfig.check_libcCs|jd|g|d�S)Nz
/* No body */)r=r>r!)r[)r&rBr!r#r?r'r'r(�check_headerDs
zconfig.check_header)rNr	)r
Nr)rr
r)rrr)rrr)rrr)rrr)rNr)rNr)NNNr)NNNr)NNr)NNNNr)NNNNr)NNNNrr)NNr)�__name__�
__module__�__qualname__ZdescriptionZuser_optionsr)r/r0r5rCrGrKrQrXr[rcrdrfrgrjrkrlr'r'r'r(rsT
	






rc
CsJ|dkrtjd|�n
tj|�t|�}ztj|j��Wd|j�XdS)Nz%s)rrSr:�readr<)r@�headrAr'r'r(rHNs
rH)N)
r-r]Zdistutils.corerZdistutils.errorsrZdistutils.sysconfigrZ	distutilsrr9rrHr'r'r'r(�<module>s
;PKV[B.�5		/command/__pycache__/install_data.cpython-36.pycnu�[���3


 \�@s<dZddlZddlmZddlmZmZGdd�de�ZdS)z�distutils.command.install_data

Implements the Distutils 'install_data' command, for installing
platform-independent data files.�N)�Command)�change_root�convert_pathc@sHeZdZdZdddgZdgZdd�Zd
d�Zdd�Zdd�Z	dd�Z
dS)�install_datazinstall data files�install-dir=�d�Ibase directory for installing data files (default: installation base dir)�root=N�<install everything relative to this alternate root directory�force�f�-force installation (overwrite existing files)cCs,d|_g|_d|_d|_|jj|_d|_dS)Nr�)�install_dir�outfiles�rootrZdistribution�
data_files�warn_dir)�self�r�6/usr/lib64/python3.6/distutils/command/install_data.py�initialize_optionss
zinstall_data.initialize_optionscCs|jdddd�dS)	NZinstallrrrr)rr)rr)rr)Zset_undefined_options)rrrr�finalize_options#szinstall_data.finalize_optionscCs|j|j�x�|jD]�}t|t�rdt|�}|jrD|jd||jf�|j||j�\}}|j	j
|�qt|d�}tjj
|�s�tjj|j|�}n|jr�t|j|�}|j|�|dgkr�|j	j
|�qx4|dD](}t|�}|j||�\}}|j	j
|�q�WqWdS)NzMsetup script did not provide a directory for '%s' -- installing right in '%s'rr)Zmkpathrr�
isinstance�strrr�warnZ	copy_filer�append�os�path�isabs�joinrr)rr�out�_�dir�datarrr�run*s*

zinstall_data.runcCs
|jpgS)N)r)rrrr�
get_inputsKszinstall_data.get_inputscCs|jS)N)r)rrrr�get_outputsNszinstall_data.get_outputs)rrr)r	Nr
)rrr
)�__name__�
__module__�__qualname__ZdescriptionZuser_optionsZboolean_optionsrrr%r&r'rrrrrs!r)�__doc__rZdistutils.corerZdistutils.utilrrrrrrr�<module>sPKV[�@w.command/__pycache__/bdist.cpython-36.opt-2.pycnu�[���3


 \��@sDddlZddlmZddlTddlmZdd�ZGdd�de�ZdS)	�N)�Command)�*)�get_platformcCsTddlm}g}x,tjD]"}|jd|dtj|df�qW||�}|jd�dS)Nr)�FancyGetoptzformats=�z'List of available distribution formats:)Zdistutils.fancy_getoptr�bdist�format_commands�append�format_commandZ
print_help)r�formats�formatZpretty_printer�r
�//usr/lib64/python3.6/distutils/command/bdist.py�show_formatssrc
@s�eZdZdZd6ddde�fd7d8d9d:d;gZdgZdd	defgZd<Z	ddd�Z
dddddd d!dd"g	Zd=d>d?d@dAdBdCdDdEd/�	Zd0d1�Z
d2d3�Zd4d5�Zd	S)Frz$create a built (binary) distribution�bdist-base=�b�4temporary directory for creating built distributionsz
plat-name=�pz;platform name to embed in generated filenames (default: %s)�formats=N�/formats for distribution (comma-separated list)�	dist-dir=�d�=directory to put final built distributions in [default: dist]�
skip-build�2skip rebuilding everything (for testing/debugging)�owner=�u�@Owner name used when creating a tar file [default: current user]�group=�g�AGroup name used when creating a tar file [default: current group]zhelp-formatsz$lists available distribution formats�	bdist_rpm�gztar�zip)�posix�nt�rpm�bztar�xztar�ztar�tar�wininst�msi�RPM distribution�
bdist_dumb�gzip'ed tar file�bzip2'ed tar file�xz'ed tar file�compressed tar file�tar file�
bdist_wininst�Windows executable installer�ZIP file�	bdist_msi�Microsoft Installer)	r&r"r'r(r)r*r+r#r,cCs.d|_d|_d|_d|_d|_d|_d|_dS)Nr)�
bdist_base�	plat_namer�dist_dir�
skip_build�group�owner)�selfr
r
r�initialize_optionsQszbdist.initialize_optionscCs�|jdkr(|jrt�|_n|jd�j|_|jdkrT|jd�j}tjj|d|j�|_|j	d�|j
dkr�y|jtjg|_
Wn"t
k
r�tdtj��YnX|jdkr�d|_dS)NZbuildzbdist.rz;don't know how to create built distributions on platform %sZdist)r:r<rZget_finalized_commandr9�
build_base�os�path�joinZensure_string_listr�default_format�name�KeyErrorZDistutilsPlatformErrorr;)r?rAr
r
r�finalize_optionsZs$





zbdist.finalize_optionscCs�g}xH|jD]>}y|j|j|d�Wqtk
rHtd|��YqXqWxztt|j��D]h}||}|j|�}||jkr�|j||_	|dkr�|j
|_
|j|_|||dd�kr�d|_|j
|�q^WdS)Nrzinvalid format '%s'r.r)rr	r
rGZDistutilsOptionError�range�lenZreinitialize_command�no_format_optionrr>r=Z	keep_tempZrun_command)r?Zcommandsr�iZcmd_nameZsub_cmdr
r
r�runvs"

z	bdist.run)rrr)rNr)rrr)rNr)rrr)rrr )r!)r!r-)r.r/)r.r0)r.r1)r.r2)r.r3)r4r5)r.r6)r7r8)�__name__�
__module__�__qualname__ZdescriptionrZuser_optionsZboolean_optionsrZhelp_optionsrKrErr
r@rHrMr
r
r
rrsJ

	r)rBZdistutils.corerZdistutils.errorsZdistutils.utilrrrr
r
r
r�<module>s
PKV[�)��4command/__pycache__/install_lib.cpython-36.opt-2.pycnu�[���3


 \� �@sHddlZddlZddlZddlmZddlmZdZGdd�de�Z	dS)�N)�Command)�DistutilsOptionErrorz.pyc	@s�eZdZdZd*d+d,d-d.d/d0gZdddgZddiZdd�Zdd�Zdd�Z	dd�Z
dd�Zd d!�Zd"d#�Z
d$d%�Zd&d'�Zd(d)�ZdS)1�install_libz7install all Python modules (extensions and pure Python)�install-dir=�d�directory to install to�
build-dir=�b�'build directory (where to install from)�force�f�-force installation (overwrite existing files)�compile�c�compile .py to .pyc [default]�
no-compileN�don't compile .py files�	optimize=�O�lalso compile with optimization: -O1 for "python -O", -O2 for "python -OO", and -O0 to disable [default: -O0]�
skip-build�skip the build stepscCs(d|_d|_d|_d|_d|_d|_dS)Nr)�install_dir�	build_dirrr�optimize�
skip_build)�self�r�5/usr/lib64/python3.6/distutils/command/install_lib.py�initialize_options3szinstall_lib.initialize_optionscCs�|jddddddd�|jdkr&d
|_|jdkr6d|_t|jt�s�yt|j�|_|jdkr^t�Wn ttfk
r�td��YnXdS)N�install�	build_librrrrrrrTFr��zoptimize must be 0, 1, or 2)r!r)rr)rr)rr)rr)rr)rr"r#)Zset_undefined_optionsrr�
isinstance�int�AssertionError�
ValueErrorr)rrrr�finalize_options<s$


zinstall_lib.finalize_optionscCs0|j�|j�}|dk	r,|jj�r,|j|�dS)N)�buildr �distribution�has_pure_modules�byte_compile)r�outfilesrrr�runVszinstall_lib.runcCs2|js.|jj�r|jd�|jj�r.|jd�dS)N�build_py�	build_ext)rr*r+Zrun_command�has_ext_modules)rrrrr)fs



zinstall_lib.buildcCs8tjj|j�r |j|j|j�}n|jd|j�dS|S)Nz3'%s' does not exist -- no Python modules to install)�os�path�isdirrZ	copy_treer�warn)rr-rrrr ms
zinstall_lib.installcCsrtjr|jd�dSddlm}|jd�j}|jrH||d|j||j	d�|j
dkrn|||j
|j||j|j	d�dS)Nz%byte-compiling is disabled, skipping.r)r,r )rr�prefix�dry_run)rrr6�verboser7)�sys�dont_write_bytecoder5Zdistutils.utilr,�get_finalized_command�rootrrr7rr8)r�filesr,Zinstall_rootrrrr,vs


zinstall_lib.byte_compilec
Csh|sgS|j|�}|j�}t||�}t|�ttj�}g}x(|D] }	|jtjj||	|d���q@W|S)N)	r;�get_outputs�getattr�lenr2�sep�appendr3�join)
rZhas_anyZ	build_cmdZ
cmd_optionZ
output_dirZbuild_filesrZ
prefix_lenZoutputs�filerrr�_mutate_outputs�s


 zinstall_lib._mutate_outputscCsvg}xl|D]d}tjjtjj|��d}|tkr0q
|jrL|jtjj	|dd��|j
dkr
|jtjj	||j
d��q
W|S)Nr"�)�optimizationr)r2r3�splitext�normcase�PYTHON_SOURCE_EXTENSIONrrB�	importlib�util�cache_from_sourcer)rZpy_filenamesZbytecode_filesZpy_fileZextrrr�_bytecode_filenames�s



zinstall_lib._bytecode_filenamescCsR|j|jj�dd|j�}|jr*|j|�}ng}|j|jj�dd|j�}|||S)Nr/r!r0)rEr*r+rrrNr1)rZpure_outputsZbytecode_outputsZext_outputsrrrr>�szinstall_lib.get_outputscCsLg}|jj�r&|jd�}|j|j��|jj�rH|jd�}|j|j��|S)Nr/r0)r*r+r;�extendr>r1)rZinputsr/r0rrr�
get_inputs�s



zinstall_lib.get_inputs)rrr)rr	r
)rrr
)rrr)rNr)rrr)rNr)�__name__�
__module__�__qualname__ZdescriptionZuser_optionsZboolean_optionsZnegative_optrr(r.r)r r,rErNr>rPrrrrrs*
		r)
r2�importlib.utilrKr9Zdistutils.corerZdistutils.errorsrrJrrrrr�<module>sPKV[�Fy�L�L2command/__pycache__/bdist_msi.cpython-36.opt-1.pycnu�[���3


 \���@s�dZddlZddlZddlmZddlmZddlmZddl	m
Z
ddlmZddl
mZdd	lmZddlZdd
lmZmZmZddlmZmZmZmZGdd
�d
e�ZGdd�de�ZdS)z#
Implements the bdist_msi command.
�N)�Command)�remove_tree)�get_python_version)�
StrictVersion)�DistutilsOptionError)�get_platform)�log)�schema�sequence�text)�	Directory�Feature�Dialog�add_datac@sFeZdZdZdd�Zdd�Zddd	�Zddd�Zddd�Zdd�Z	dS)�PyDialogz�Dialog class with a fixed layout: controls at the top, then a ruler,
    then a list of buttons: back, next, cancel. Optionally a bitmap at the
    left.cOs>tj|f|��|jd}d|d}|jdd||jd�dS)zbDialog(database, name, x, y, w, h, attributes, title, first,
        default, cancel, bitmap=true)�$�iHZ
BottomLinerN)r�__init__�h�line�w)�self�args�kwZrulerZbmwidth�r�3/usr/lib64/python3.6/distutils/command/bdist_msi.pyrs
zPyDialog.__init__c	Cs|jddddddd|�dS)	z,Set the title text of the dialog at the top.�Title��
i@�<iz{\VerdanaBold10}%sN)r)r�titlerrrr #szPyDialog.title�Back�c	Cs,|r
d}nd}|j|d|jddd|||�S)z�Add a back button with a given title, the tab-next button,
        its name in the Control table, possibly initially disabled.

        Return the button, so that events can be associated�r"���8�)�
pushbuttonr)rr �next�name�active�flagsrrr�back*sz
PyDialog.back�Cancelc	Cs,|r
d}nd}|j|d|jddd|||�S)z�Add a cancel button with a given title, the tab-next button,
        its name in the Control table, possibly initially disabled.

        Return the button, so that events can be associatedr#r"i0r%r&r')r(r)rr r)r*r+r,rrr�cancel5szPyDialog.cancel�Nextc	Cs,|r
d}nd}|j|d|jddd|||�S)z�Add a Next button with a given title, the tab-next button,
        its name in the Control table, possibly initially disabled.

        Return the button, so that events can be associatedr#r"��r%r&r')r(r)rr r)r*r+r,rrrr)@sz
PyDialog.nextc	Cs,|j|t|j|d�|jdddd||�S)z�Add a button with a given title, the tab-next button,
        its name in the Control table, giving its x position; the
        y-position is aligned with the other buttons.

        Return the button, so that events can be associated�r%r&r'r#)r(�intrr)rr*r r)Zxposrrr�xbuttonKszPyDialog.xbuttonN)r!r")r.r")r0r")
�__name__�
__module__�__qualname__�__doc__rr r-r/r)r4rrrrrs



rc@s�eZdZdZdCddde�fdEdGdHdIdJdKdLdMg
ZddddgZddd d!d"d#d$d%d&d'd(d)d*d+d,d-d.d/d0d1gZd2Zd3d4�Z	d5d6�Z
d7d8�Zd9d:�Zd;d<�Z
d=d>�Zd?d@�ZdAdB�ZdS)N�	bdist_msiz7create a Microsoft Installer (.msi) binary distribution�
bdist-dir=N�1temporary directory for creating the distributionz
plat-name=�pz;platform name to embed in generated filenames (default: %s)�	keep-temp�kz/keep the pseudo-installation tree around after z!creating the distribution archive�target-version=z!require a specific python versionz on the target system�no-target-compile�c�/do not compile .py to .pyc on the target system�no-target-optimize�o�;do not compile .py to .pyo (optimized) on the target system�	dist-dir=�d�-directory to put final built distributions in�
skip-build�2skip rebuilding everything (for testing/debugging)�install-script=�Ubasename of installation script to be run after installation or before deinstallation�pre-install-script=�{Fully qualified filename of a script to be run before any files are installed.  This script need not be in the distributionz2.0z2.1z2.2z2.3z2.4z2.5z2.6z2.7z2.8z2.9z3.0z3.1z3.2z3.3z3.4z3.5z3.6z3.7z3.8z3.9�XcCsFd|_d|_d|_d|_d|_d|_d|_d|_d|_d|_	d|_
dS)Nr)�	bdist_dir�	plat_name�	keep_tempZno_target_compileZno_target_optimize�target_version�dist_dir�
skip_build�install_script�pre_install_script�versions)rrrr�initialize_options}szbdist_msi.initialize_optionscCs�|jdd	�|jdkr2|jd�j}tjj|d�|_t�}|jrP|j	j
�rP||_|jr�|jg|_|jr�|j	j
�r�|j|kr�t
d|f��nt|j�|_|jdd
d�|jr�t
d��|jr�x2|j	jD]}|jtjj|�kr�Pq�Wt
d|j��d|_dS)NZbdistrUZmsizMtarget version can only be %s, or the '--skip-build' option must be specifiedrTrQz5the pre-install-script feature is not yet implementedz(install_script '%s' not found in scripts)rUrU)rTrT)rQrQ)Zset_undefined_optionsrP�get_finalized_command�
bdist_base�os�path�joinrrS�distribution�has_ext_modulesrXrUr�list�all_versionsrWrV�scripts�basename�install_script_key)rr[Z
short_versionZscriptrrr�finalize_options�s:



zbdist_msi.finalize_optionscCsz|js|jd�|jddd�}|j|_|j|_d|_|jd�}d|_d|_|jj	�r�|j
}|spdtjdd�}d	|j
|f}|jd�}tjj|jd
|�|_tjd|j�|j�tjjdtjj|jd��|j�tjd=|j|j�|jj�}|j|�}tjj|�}tjj|��r"tj|�|jj }|j!}	|	�s<|j"}	|	�sFd
}	|j#�}
dt$|
�j%}|jj�}|j
�r~d|j
|f}nd|}t&j'|t(|t&j)�||	�|_*t&j+|j*t,�d|
fg}
|j-�p�|j.}|�r�|
j/d|f�|j0�r�|
j/d|j0f�|
�rt1|j*d|
�|j2�|j3�|j4�|j5�|j*j6�t7|jd��r^d|j
�pJd|f}|jj8j/|�|j9�svt:|j|j;d�dS)N�build�installr")Zreinit_subcommandsr�install_libz%d.%d�z.%s-%s�libzinstalling to %sZPURELIBZUNKNOWNz%d.%d.%dzPython %s %sz	Python %sZDistVersionZ
ARPCONTACTZARPURLINFOABOUT�Property�
dist_filesr9�any)�dry_run)<rUZrun_commandZreinitialize_commandrP�prefixZwarn_dir�compile�optimizer_r`rS�sys�version_inforQrZr\r]r^Z
build_baseZ	build_libr�infoZensure_finalized�insert�runZmkpathrT�get_fullname�get_installer_filename�abspath�exists�unlink�metadata�authorZ
maintainerZget_versionr�version�msilibZ
init_databaser	Zgen_uuid�dbZ
add_tablesr
Zauthor_emailZmaintainer_email�appendZurlr�add_find_python�	add_files�add_scripts�add_ui�Commit�hasattrrmrRrro)rrhrirSZplat_specifierrg�fullname�installer_namer}r~rZsversionZproduct_nameZpropsZemail�tuprrrrw�s|











z
bdist_msi.runc
Cs*|j}tjd�}tjj|j�}t||d|dd�}t|ddddddd�}||d	fg}x�|j	|j
gD]t}d|}d|}	}
d}||j
kr�d
}d}
nd|}d}
t||	||d|
|d�}t||||||
�}|j|||f�qbW|j�i}�x2|D�](\}}}|g}�x|�r|j
�}x�tj|j�D]�}tjj|j|�}tjj|��rzd
|j|�|f}||}
t|||||
|�}|j|�n�|j�s�|j|j|d�||k�r�|j|�}||<||jk�r|j�r�td|��d||_n*||}t|jd|||j|d|jfg��q W�qW|j�q�W|j|�dS)NZ	distfiles�	TARGETDIRZ	SourceDir�PythonZ
Everythingrr")Z	directory�zPython from another locationrjzPython %s from registryz%s|%szMultiple files with name %sz[#%s]Z
DuplicateFile)r�r�ZCABr\r]rzrPrr
rX�
other_versionr�r��pop�listdirZabsoluter^�isdirZ
make_shortZ	componentZstart_componentZlogicalZadd_filerVrerrZcommit)rr�ZcabZrootdir�root�f�itemsr�targetr*�defaultZdescr �level�dir�seenZfeatureZtodo�fileZafileZshortZnewdir�keyrrrr�
s\





&zbdist_msi.add_filescCs�d}�xv|jD�]j}d|}d|}d|}d|}d|}d|}d|}	d	|}
d
|}d|}tjrpd}
nd}
t|jd|d|d|
f|d|d|
fg�t|jd||f||fg�t|jd|d |d|df|	d!|d|df|
d"|d|dfg�t|jd|||f|	||df|
d|dfg�t|jd|||f|	||df|
d|dfg�t|jdd|dd|fg�|d7}qWdS)#asAdds code to the installer to compute the location of Python.

        Properties PYTHON.MACHINE.X.Y and PYTHON.USER.X.Y will be set from the
        registry for each version of Python.

        Properties TARGETDIRX.Y will be set from PYTHON.USER.X.Y if defined,
        else from PYTHON.MACHINE.X.Y.

        Properties PYTHONX.Y will be set to TARGETDIRX.Y\python.exei�z)SOFTWARE\Python\PythonCore\%s\InstallPathzpython.machine.zpython.user.zPYTHON.MACHINE.zPYTHON.USER.ZPythonFromMachineZPythonFromUserZ	PythonExer��PYTHONrj�Z
RegLocatorNr"Z	AppSearch�CustomAction�3��[�]z]\python.exe�InstallExecuteSequence�InstallUISequenceZ	Conditionr�rz
NOT TARGETDIR��i3i3i3)rXr�ZWin64rr�)r�start�verZinstall_pathZmachine_regZuser_regZmachine_propZ	user_propZmachine_actionZuser_actionZ
exe_actionZtarget_dir_prop�exe_propZTyperrrr�CsJzbdist_msi.add_find_pythoncCs�|jrnd}xb|j|jgD]P}d|}d|}t|jd|d||jfg�t|jd|d||fg�|d7}qW|jr�tjj	|j
d	�}t|d
�}|jd�|jt|j�j
��|j�t|jdd
tj|�fg�t|jddg�t|jddg�dS)Ni�zinstall_script.r�r��2r�z&Python%s=3r"zpreinstall.batrzrem ="""
%1 %0
exit
"""
�Binary�
PreInstallrj�
NOT Installed��)r�rjr�N)r�r�r�)rVrXr�rr�rerWr\r]r^rP�open�write�read�closer�r�)rr�r�Zinstall_actionr�Zscriptfnr�rrrr�ys,
	
zbdist_msi.add_scriptscCs�
|j}d}}d}d}d}d}d}d}	t|dd�d�d�d�d�d�g�t|dd�d�d�d�g�t|d d�d�d�d��dg�t|d/tj�t|d0tj�t|d1||||||d2d2d2�}
|
jd3�|
jd4d2dd5�|
jd6d7dd5�|
jd8d9d:d;d<d=d>�|
jd?d9d@d;dAd=dB�|
j	d2d6d2dC�}|j
dDdE�t|dF||||||d2d2d2�}|jdG�|jd4d2dd5�|jd6d7dd5�|jd8d9d:d;d<d=dH�|jd?d9d@d;dAd=dB�|j	d2d6d2dC�}|j
dDdE�t|dI||||||d2d2d2�}
|
jdJ�|
jd4d2dd5�|
jd6d7dd5�|
jdKd9dLd;dAd=dB�|
j	d2d6d2dC�}|j
dDdM�t|dN||||dO|dPdPdPdQdR�}|jdSd9dTdUd9d=dV�|jdKdAdWdXdAd=dY�|jdZdAd[d\ddd]�|jd^d_dAd`d\dadbdcddd�|jdEdddEdC�}|j
dDdE�|j	dddPdddC�}|j
dDdd�|jdPdEdPdC�}|j
dDdP�t|dddd\dedf|dgdd�}|jdgdddXdhddi�|j
djdkdldmdnddod�j
dDdp�|j
dqdrdldmdnddsd�j
dDdt�|j
duddldmdnddvd�j
dDdw�|j
dxdydldmdndd6d�j
dDdz�|j
d{dmdldmdndddd�j
dDd|�|j
d}d~dldmdnddd�j
dDd��|j
d�d�dldmdnddPd�j
dDd��t|d�ddd�d�d|dododo�}|jdZdhd9d�d�dd��|j
dsdld�d�d�ddsdo�}|j
dDdE�|j
dod�d�d�d�ddods�}|j
dDdM�t|d�ddd�d�||dMdMdM�}|jdZdhd9d�d�dd��|j
dMd�d�d�d�ddMd�}|j
dDdE�t|d!||||||d6d6d6�}|jdKd9d:d;d�d=d��|jd��|jd/d9d�d;dAd=d��}|jd/dZ�|jd�d9d�d;d�d=d�}|jd�dZ�|jd7ddd5�|j	d�ddd5�|jd6d�}|j
d�d��t|d'||||||d�d�d6�}|jd��|jd�d9d�ddAdd�|jj��|jd4ddd5�|j	d�d6�}d}|j
d�d�|d��x:|j|jgD](}|d7}|j
d�d�|d�||d���qW|j
d�d�|dd��|j
dDdM|d�d��|jd6d��}|j
d�d��|jd�d�d9d�ddkdd�dd�d�}|j
d�d��|j}d�|}d�|}|jd�d9dUdd9dd��}|jd�|�|jd�|�|jd�|�|jd�|�|jd�d�d9d�dd�dd�|dd�d�}|jd�|�|jd�|�|jd�|�|jd�|�t|d�||||||d�d�d�dQdR�}|jdSd9dTdUd9d=d��|jdKdAdAdXdAd=d��|jdZdAd�d\d�dd��|jd�d�dAd�d\d�d�dd�dd�|jd�dddƒj
dDdM�t|d$||||||d�d�d6�}|jdă|jd�d9d�d�ddddid��	}|jddd�d�dAdƃ|jd�dd�d�dAdɃ|jd7ddd5�|j	d�d6�}|j
d�d�d�d�|j
dDdMd�d��|jd6dÃ}|j
d�d��t|d-||||||d6d6d6dQdR�}|jdSdAd9dUd9d=d̃|jdZd�d�dd�ddσ|jd�d�d�d�dAddу|jd/d:d�|d:dAdd��}|jd/dZ�|jd�d�d�dkddd�dd�dd�}|jd�dփ|jd4d�dQd5�|j	d�d6dQd5�|jd6d7�j
d�d��t|d*||||||d�d�d6�}|jd׃|jd�d9d�d\dyddڃ|jd�d9d�d\d�dddid��	}|jddd�dUd�dރ|jd�dd�dUd�d�|jd4ddQd5�|j	d2d6�}|j
d�dd�dŃ|j
d�d�d�dT�|j
d�d�d�db�|j
d�dd�d�|j
d�dd�d�|j
d�d�d�d�|j
d�d�d�d�|j
d�dd�d�|j
dDdMd�dA�|jd6dۃj
d�d��dS(Nr�iri,z[ProductName] Setupr#r"� rl�
DefaultUIFont�DlgFont8�ErrorDialog�ErrorDlg�	Progress1�Install�	Progress2�installs�MaintenanceForm_Action�Repair�
WhichUsers�ALLZ	TextStyle�Tahoma�	r�DlgFontBold8��
VerdanaBold10�Verdanar�VerdanaRed9�r��
PrepareDlg�(Not Privileged or Windows9x or Installed��
WhichUsersDlg�.Privileged and not Windows9x and not Installed��SelectFeaturesDlg�
Not Installed���MaintenanceTypeDlg�,Installed AND NOT RESUME AND NOT Preselected���ProgressDlg��
ActionText�UITextZ
FatalErrorZFinishz)[ProductName] Installer ended prematurelyz< Back)r+r.r!ZDescription1r�Fi@�Piz�[ProductName] setup ended prematurely because of an error.  Your system has not been modified.  To install this program at a later time, please run the installation again.ZDescription2��z.Click the Finish button to exit the Installer.)r*Z	EndDialogZExitZUserExitz'[ProductName] Installer was interruptedz�[ProductName] setup was interrupted.  Your system has not been modified.  To install this program at a later time, please run the installation again.Z
ExitDialogz&Completing the [ProductName] InstallerZDescription��ZReturnZ
FilesInUse�ZRetryF)Zbitmapr���z{\DlgFontBold8}Files in Use�iz8Some files that need to be updated are currently in use.ZText�7iJz�The following applications are using files that need to be updated by this setup. Close these applications and then click Retry to continue the installation or Cancel to exit it.ZListZListBox�k��ZFileInUseProcess�Ignore�eiZ	ErrorText�0r��N�x�H�Q�ZNoZErrorNo�Y��ZYesZErrorYes�AZAbortZ
ErrorAbort�C�*ZErrorCancel�IZErrorIgnore�O�ZOkZErrorOk�R��Z
ErrorRetryZ	CancelDlgi�U���z;Are you sure you want to cancel [ProductName] installation?�9r&r'�ZWaitForCostingDlgzRPlease wait while the installer finishes determining your disk space requirements.�f�(zOPlease wait while the Installer prepares to guide you through the installation.z&Welcome to the [ProductName] Installer�nzPondering...Z
ActionData�r0ZSpawnDialogzSelect Python InstallationsZHintz9Select the Python locations where %s should be installed.zNext >z[TARGETDIR]z[SourceDir])Zorderingz
[TARGETDIR%s]z FEATURE_SELECTED AND &Python%s=3ZSpawnWaitDialogrjZFeaturesZ
SelectionTreerZFEATUREZPathEditz[FEATURE_SELECTED]�1z!FEATURE_SELECTED AND &Python%s<>3ZOtherz$Provide an alternate Python locationZEnableZShowZDisableZHide��r�r�ZDiskCostDlgZOKz&{\DlgFontBold8}Disk Space RequirementszFThe disk space required for the installation of the selected features.�5aThe highlighted volumes (if any) do not have enough disk space available for the currently selected features.  You can either remove some files from the highlighted volumes, or choose to install less features onto local drive(s), or select different destination drive(s).Z
VolumeListZVolumeCostList�d�iz{120}{70}{70}{70}{70}g�?ZAdminInstallzGSelect whether to install [ProductName] for all users of this computer.�zInstall for all usersZJUSTME�zInstall just for mez
[ALLUSERS]zWhichUsers="ALL"z({\DlgFontBold8}[Progress1] [ProductName]�#�AzYPlease wait while the Installer [Progress2] [ProductName]. This may take several minutes.ZStatusLabelzStatus:ZProgressBariz
Progress doneZSetProgressZProgressz)Welcome to the [ProductName] Setup WizardZBodyText�?z:Select whether you want to repair or remove [ProductName].ZRepairRadioGroup�lr�z&Repair [ProductName]ZRemoverzRe&move [ProductName]z[REINSTALL]zMaintenanceForm_Action="Repair"z[Progress1]Z	Repairingz[Progress2]ZrepairsZ	Reinstallz[REMOVE]zMaintenanceForm_Action="Remove"�ZRemoving�Zremoves�
�z MaintenanceForm_Action<>"Change")r�r�)r�r�)r�r�)r�r�)r�r�)r�r�)r�r�r�Nr)r�r�r�Nr")r�r�rNr")r�r�r�r�r)r�r�r�)r�r�r�)r�r�r�)r�r�r�)r�Nr�)r�rrr�r�rr r-r/r)ZeventZcontrolrr(�mappingr_rxrXr�Z	conditionr4Z
radiogroup�add)rr��x�yrrr ZmodalZmodelessZtrack_disk_spaceZfatalrAZ	user_exitZexit_dialogZinuse�errorr/ZcostingZprepZseldlg�orderrr�Zinstall_other_condZdont_install_other_condZcostZ
whichusers�gZprogressZmaintrrrr��s�








       












zbdist_msi.add_uicCs<|jrd||j|jf}nd||jf}tjj|j|�}|S)Nz%s.%s-py%s.msiz	%s.%s.msi)rSrQr\r]r^rT)rr�Z	base_namer�rrrry�sz bdist_msi.get_installer_filename)r:Nr;�Pkeep the pseudo-installation tree around after creating the distribution archive)r=r>r�6require a specific python version on the target system)r?Nr)r@rArB)rCrDrE)rFrGrH)rINrJ)rKNrL)rMNrN)r5r6r7ZdescriptionrZuser_optionsZboolean_optionsrbr�rYrfrwr�r�r�r�ryrrrrr9SsR



([66&@r9)r8rsr\Zdistutils.corerZdistutils.dir_utilrZdistutils.sysconfigrZdistutils.versionrZdistutils.errorsrZdistutils.utilrZ	distutilsrr�r	r
rrr
rrrr9rrrr�<module>s>PKV[}5|���.command/__pycache__/build.cpython-36.opt-2.pycnu�[���3


 \t�@sPddlZddlZddlmZddlmZddlmZdd�ZGdd�de�Z	dS)	�N)�Command)�DistutilsOptionError)�get_platformcCsddlm}|�dS)Nr)�show_compilers)Zdistutils.ccompilerr)r�r�//usr/lib64/python3.6/distutils/command/build.pyrsrc@s�eZdZdZd8d9d:d<d=d>ddde�fd?d@dAdBdCgZddgZd$dd%efgZd&d'�Z	d(d)�Z
d*d+�Zd,d-�Zd.d/�Z
d0d1�Zd2d3�Zd4efd5e
fd6efd7efgZdS)D�buildz"build everything needed to install�build-base=�b� base directory for build library�build-purelib=N�2build directory for platform-neutral distributions�build-platlib=�3build directory for platform-specific distributions�
build-lib=z9build directory for all distribution (defaults to either zbuild-purelib or build-platlib�build-scripts=�build directory for scripts�build-temp=�t�temporary build directoryz
plat-name=�pz6platform name to build for, if supported (default: %s)�	compiler=�c�specify the compiler type�	parallel=�j�number of parallel build jobs�debug�g�;compile extensions and libraries with debugging information�force�f�2forcibly build everything (ignore file timestamps)�executable=�e�5specify final destination interpreter path (build.py)z
help-compilerzlist available compilerscCsLd|_d|_d|_d|_d|_d|_d|_d|_d|_d|_	d|_
d|_dS)Nrr)�
build_base�
build_purelib�
build_platlib�	build_lib�
build_temp�
build_scriptsZcompiler�	plat_namerr �
executable�parallel)�selfrrr�initialize_options8szbuild.initialize_optionscCsZ|jdkrt�|_ntjdkr&td��d|jftjdd��}ttd�rR|d7}|jdkrntj	j
|jd�|_|jdkr�tj	j
|jd|�|_|j
dkr�|jjr�|j|_
n|j|_
|jdkr�tj	j
|jd|�|_|jdkr�tj	j
|jd	tjdd��|_|jdk�rtj	jtj�|_t|jt��rVyt|j�|_Wntk
�rTtd
��YnXdS)N�ntzW--plat-name only supported on Windows (try using './configure --help' on your platform)z	.%s-%d.%d��gettotalrefcountz-pydebug�libZtempz
scripts-%d.%dzparallel should be an integer)r,r�os�namer�sys�version_info�hasattrr'�path�joinr&r(r)�distributionZext_modulesr*r+r-�normpath�
isinstancer.�str�int�
ValueError)r/Zplat_specifierrrr�finalize_optionsHs<












zbuild.finalize_optionscCs x|j�D]}|j|�q
WdS)N)Zget_sub_commandsZrun_command)r/Zcmd_namerrr�run�sz	build.runcCs
|jj�S)N)r<�has_pure_modules)r/rrrrD�szbuild.has_pure_modulescCs
|jj�S)N)r<�has_c_libraries)r/rrrrE�szbuild.has_c_librariescCs
|jj�S)N)r<�has_ext_modules)r/rrrrF�szbuild.has_ext_modulescCs
|jj�S)N)r<�has_scripts)r/rrrrG�szbuild.has_scriptsZbuild_pyZ
build_clibZ	build_extr+)r	r
r)rNr
)rNr�Wbuild directory for all distribution (defaults to either build-purelib or build-platlib)rNrH)rNr)rrr)rrr)rrr)rrr)r r!r")r#r$r%)�__name__�
__module__�__qualname__ZdescriptionrZuser_optionsZboolean_optionsrZhelp_optionsr0rBrCrDrErFrGZsub_commandsrrrrrsR
8r)
r7r5Zdistutils.corerZdistutils.errorsrZdistutils.utilrrrrrrr�<module>s
PKV[�
���.command/__pycache__/build.cpython-36.opt-1.pycnu�[���3


 \t�@sTdZddlZddlZddlmZddlmZddlmZdd�Z	Gdd	�d	e�Z
dS)
zBdistutils.command.build

Implements the Distutils 'build' command.�N)�Command)�DistutilsOptionError)�get_platformcCsddlm}|�dS)Nr)�show_compilers)Zdistutils.ccompilerr)r�r�//usr/lib64/python3.6/distutils/command/build.pyrsrc@s�eZdZdZd8d9d:d<d=d>ddde�fd?d@dAdBdCgZddgZd$dd%efgZd&d'�Z	d(d)�Z
d*d+�Zd,d-�Zd.d/�Z
d0d1�Zd2d3�Zd4efd5e
fd6efd7efgZdS)D�buildz"build everything needed to install�build-base=�b� base directory for build library�build-purelib=N�2build directory for platform-neutral distributions�build-platlib=�3build directory for platform-specific distributions�
build-lib=z9build directory for all distribution (defaults to either zbuild-purelib or build-platlib�build-scripts=�build directory for scripts�build-temp=�t�temporary build directoryz
plat-name=�pz6platform name to build for, if supported (default: %s)�	compiler=�c�specify the compiler type�	parallel=�j�number of parallel build jobs�debug�g�;compile extensions and libraries with debugging information�force�f�2forcibly build everything (ignore file timestamps)�executable=�e�5specify final destination interpreter path (build.py)z
help-compilerzlist available compilerscCsLd|_d|_d|_d|_d|_d|_d|_d|_d|_d|_	d|_
d|_dS)Nrr)�
build_base�
build_purelib�
build_platlib�	build_lib�
build_temp�
build_scriptsZcompiler�	plat_namerr �
executable�parallel)�selfrrr�initialize_options8szbuild.initialize_optionscCsZ|jdkrt�|_ntjdkr&td��d|jftjdd��}ttd�rR|d7}|jdkrntj	j
|jd�|_|jdkr�tj	j
|jd|�|_|j
dkr�|jjr�|j|_
n|j|_
|jdkr�tj	j
|jd|�|_|jdkr�tj	j
|jd	tjdd��|_|jdk�rtj	jtj�|_t|jt��rVyt|j�|_Wntk
�rTtd
��YnXdS)N�ntzW--plat-name only supported on Windows (try using './configure --help' on your platform)z	.%s-%d.%d��gettotalrefcountz-pydebug�libZtempz
scripts-%d.%dzparallel should be an integer)r,r�os�namer�sys�version_info�hasattrr'�path�joinr&r(r)�distributionZext_modulesr*r+r-�normpath�
isinstancer.�str�int�
ValueError)r/Zplat_specifierrrr�finalize_optionsHs<












zbuild.finalize_optionscCs x|j�D]}|j|�q
WdS)N)Zget_sub_commandsZrun_command)r/Zcmd_namerrr�run�sz	build.runcCs
|jj�S)N)r<�has_pure_modules)r/rrrrD�szbuild.has_pure_modulescCs
|jj�S)N)r<�has_c_libraries)r/rrrrE�szbuild.has_c_librariescCs
|jj�S)N)r<�has_ext_modules)r/rrrrF�szbuild.has_ext_modulescCs
|jj�S)N)r<�has_scripts)r/rrrrG�szbuild.has_scriptsZbuild_pyZ
build_clibZ	build_extr+)r	r
r)rNr
)rNr�Wbuild directory for all distribution (defaults to either build-purelib or build-platlib)rNrH)rNr)rrr)rrr)rrr)rrr)r r!r")r#r$r%)�__name__�
__module__�__qualname__ZdescriptionrZuser_optionsZboolean_optionsrZhelp_optionsr0rBrCrDrErFrGZsub_commandsrrrrrsR
8r)�__doc__r7r5Zdistutils.corerZdistutils.errorsrZdistutils.utilrrrrrrr�<module>sPKV[��)�AA3command/__pycache__/build_clib.cpython-36.opt-2.pycnu�[���3


 \V�@sPddlZddlmZddlTddlmZddlmZdd�ZGdd	�d	e�Z	dS)
�N)�Command)�*)�customize_compiler)�logcCsddlm}|�dS)Nr)�show_compilers)�distutils.ccompilerr)r�r�4/usr/lib64/python3.6/distutils/command/build_clib.pyrsrc@sleZdZdZd"d#d$d%d&gZddgZdddefgZdd�Zdd�Z	dd�Z
dd�Zdd�Zdd�Z
d d!�ZdS)'�
build_clibz/build C/C++ libraries used by Python extensions�build-clib=�b�%directory to build C/C++ libraries to�build-temp=�t�,directory to put temporary build by-products�debug�g�"compile with debugging information�force�f�2forcibly build everything (ignore file timestamps)�	compiler=�c�specify the compiler typez
help-compilerNzlist available compilerscCs:d|_d|_d|_d|_d|_d|_d|_d|_d|_dS)Nr)	r
�
build_temp�	libraries�include_dirs�define�undefrr�compiler)�selfrrr	�initialize_options4szbuild_clib.initialize_optionscCsh|jdddd	d
d�|jj|_|jr0|j|j�|jdkrH|jjpDg|_t|jt�rd|jjtj	�|_dS)NZbuildrr
rrr)rr
)rr)rr)rr)rr)
Zset_undefined_optionsZdistributionr�check_library_listr�
isinstance�str�split�os�pathsep)r rrr	�finalize_optionsDs

zbuild_clib.finalize_optionscCs�|js
dSddlm}||j|j|jd�|_t|j�|jdk	rN|jj|j�|j	dk	rzx |j	D]\}}|jj
||�q`W|jdk	r�x|jD]}|jj|�q�W|j
|j�dS)Nr)�new_compiler)r�dry_runr)rrr)rr*rrrZset_include_dirsrZdefine_macrorZundefine_macro�build_libraries)r r)�name�valueZmacrorrr	�run^s 



zbuild_clib.runcCs�t|t�std��x�|D]|}t|t�r<t|�dkr<td��|\}}t|t�sVtd��d|ksrtjdkr�tj|kr�td|d��t|t�std��qWdS)	Nz+'libraries' option must be a list of tuples�z*each element of 'libraries' must a 2-tuplezNfirst element of each tuple in 'libraries' must be a string (the library name)�/z;bad library name '%s': may not contain directory separatorsrzMsecond element of each tuple in 'libraries' must be a dictionary (build info))	r#�list�DistutilsSetupError�tuple�lenr$r&�sep�dict)r r�libr,�
build_inforrr	r"vs"




zbuild_clib.check_library_listcCs0|js
dSg}x|jD]\}}|j|�qW|S)N)r�append)r Z	lib_names�lib_namer8rrr	�get_library_names�szbuild_clib.get_library_namescCs`|j|j�g}xJ|jD]@\}}|jd�}|dksBt|ttf�rNtd|��|j|�qW|S)N�sourceszfin 'libraries' option (library '%s'), 'sources' must be present and must be a list of source filenames)r"r�getr#r1r3r2�extend)r �	filenamesr:r8r<rrr	�get_source_files�s
zbuild_clib.get_source_filescCs�x�|D]�\}}|jd�}|dks0t|ttf�r<td|��t|�}tjd|�|jd�}|jd�}|jj||j	|||j
d�}|jj|||j|j
d�qWdS)Nr<zfin 'libraries' option (library '%s'), 'sources' must be present and must be a list of source filenameszbuilding '%s' library�macrosr)�
output_dirrArr)rBr)
r=r#r1r3r2r�infor�compilerrZcreate_static_libr
)r rr:r8r<rArZobjectsrrr	r+�s$




zbuild_clib.build_libraries)rrr
)rrr)rrr)rrr)rrr)�__name__�
__module__�__qualname__ZdescriptionZuser_optionsZboolean_optionsrZhelp_optionsr!r(r.r"r;r@r+rrrr	r
s*
$r
)
r&Zdistutils.corerZdistutils.errorsZdistutils.sysconfigrZ	distutilsrrr
rrrr	�<module>sPKV[��x��9command/__pycache__/install_egg_info.cpython-36.opt-1.pycnu�[���3


 \+
�@sddZddlmZddlmZmZddlZddlZddlZGdd�de�Z	dd�Z
d	d
�Zdd�ZdS)
z�distutils.command.install_egg_info

Implements the Distutils 'install_egg_info' command, for installing
a package's PKG-INFO metadata.�)�Command)�log�dir_utilNc@s:eZdZdZdZdgZdd�Zdd	�Zd
d�Zdd
�Z	dS)�install_egg_infoz)Install an .egg-info file for the packagez8Install package's PKG-INFO metadata as an .egg-info file�install-dir=�d�directory to install tocCs
d|_dS)N)�install_dir)�self�r�:/usr/lib64/python3.6/distutils/command/install_egg_info.py�initialize_optionssz#install_egg_info.initialize_optionscCsb|jdd�dtt|jj���tt|jj���ftjdd��}t	j
j|j|�|_
|j
g|_dS)NZinstall_libr	z%s-%s-py%d.%d.egg-info�)r	r	)Zset_undefined_options�to_filename�	safe_name�distributionZget_name�safe_versionZget_version�sys�version_info�os�path�joinr	�target�outputs)r
�basenamerrr�finalize_optionssz!install_egg_info.finalize_optionsc	Cs�|j}tjj|�r2tjj|�r2tj||jd�nNtjj|�rX|j	tj
|jfd|�n(tjj|j�s�|j	tj|jfd|j�t
jd|�|js�t|ddd��}|jjj|�WdQRXdS)N)�dry_runz	Removing z	Creating z
Writing %s�wzUTF-8)�encoding)rrr�isdir�islinkrZremove_treer�existsZexecute�unlinkr	�makedirsr�info�openrZmetadataZwrite_pkg_file)r
r�frrr�run szinstall_egg_info.runcCs|jS)N)r)r
rrr�get_outputs.szinstall_egg_info.get_outputsN)rrr)
�__name__�
__module__�__qualname__�__doc__ZdescriptionZuser_optionsr
rr'r(rrrrrs
rcCstjdd|�S)z�Convert an arbitrary string to a standard distribution name

    Any runs of non-alphanumeric/. characters are replaced with a single '-'.
    z[^A-Za-z0-9.]+�-)�re�sub)�namerrrr6srcCs|jdd�}tjdd|�S)z�Convert an arbitrary string to a standard version string

    Spaces become dots, and all other non-alphanumeric characters become
    dashes, with runs of multiple dashes condensed to a single dash.
    � �.z[^A-Za-z0-9.]+r-)�replacer.r/)�versionrrrr>srcCs|jdd�S)z|Convert a project or version name to its filename-escaped form

    Any '-' characters are currently replaced with '_'.
    r-�_)r3)r0rrrrHsr)
r,Z
distutils.cmdrZ	distutilsrrrrr.rrrrrrrr�<module>s+
PKV[�
���(command/__pycache__/build.cpython-36.pycnu�[���3


 \t�@sTdZddlZddlZddlmZddlmZddlmZdd�Z	Gdd	�d	e�Z
dS)
zBdistutils.command.build

Implements the Distutils 'build' command.�N)�Command)�DistutilsOptionError)�get_platformcCsddlm}|�dS)Nr)�show_compilers)Zdistutils.ccompilerr)r�r�//usr/lib64/python3.6/distutils/command/build.pyrsrc@s�eZdZdZd8d9d:d<d=d>ddde�fd?d@dAdBdCgZddgZd$dd%efgZd&d'�Z	d(d)�Z
d*d+�Zd,d-�Zd.d/�Z
d0d1�Zd2d3�Zd4efd5e
fd6efd7efgZdS)D�buildz"build everything needed to install�build-base=�b� base directory for build library�build-purelib=N�2build directory for platform-neutral distributions�build-platlib=�3build directory for platform-specific distributions�
build-lib=z9build directory for all distribution (defaults to either zbuild-purelib or build-platlib�build-scripts=�build directory for scripts�build-temp=�t�temporary build directoryz
plat-name=�pz6platform name to build for, if supported (default: %s)�	compiler=�c�specify the compiler type�	parallel=�j�number of parallel build jobs�debug�g�;compile extensions and libraries with debugging information�force�f�2forcibly build everything (ignore file timestamps)�executable=�e�5specify final destination interpreter path (build.py)z
help-compilerzlist available compilerscCsLd|_d|_d|_d|_d|_d|_d|_d|_d|_d|_	d|_
d|_dS)Nrr)�
build_base�
build_purelib�
build_platlib�	build_lib�
build_temp�
build_scriptsZcompiler�	plat_namerr �
executable�parallel)�selfrrr�initialize_options8szbuild.initialize_optionscCsZ|jdkrt�|_ntjdkr&td��d|jftjdd��}ttd�rR|d7}|jdkrntj	j
|jd�|_|jdkr�tj	j
|jd|�|_|j
dkr�|jjr�|j|_
n|j|_
|jdkr�tj	j
|jd|�|_|jdkr�tj	j
|jd	tjdd��|_|jdk�rtj	jtj�|_t|jt��rVyt|j�|_Wntk
�rTtd
��YnXdS)N�ntzW--plat-name only supported on Windows (try using './configure --help' on your platform)z	.%s-%d.%d��gettotalrefcountz-pydebug�libZtempz
scripts-%d.%dzparallel should be an integer)r,r�os�namer�sys�version_info�hasattrr'�path�joinr&r(r)�distributionZext_modulesr*r+r-�normpath�
isinstancer.�str�int�
ValueError)r/Zplat_specifierrrr�finalize_optionsHs<












zbuild.finalize_optionscCs x|j�D]}|j|�q
WdS)N)Zget_sub_commandsZrun_command)r/Zcmd_namerrr�run�sz	build.runcCs
|jj�S)N)r<�has_pure_modules)r/rrrrD�szbuild.has_pure_modulescCs
|jj�S)N)r<�has_c_libraries)r/rrrrE�szbuild.has_c_librariescCs
|jj�S)N)r<�has_ext_modules)r/rrrrF�szbuild.has_ext_modulescCs
|jj�S)N)r<�has_scripts)r/rrrrG�szbuild.has_scriptsZbuild_pyZ
build_clibZ	build_extr+)r	r
r)rNr
)rNr�Wbuild directory for all distribution (defaults to either build-purelib or build-platlib)rNrH)rNr)rrr)rrr)rrr)rrr)r r!r")r#r$r%)�__name__�
__module__�__qualname__ZdescriptionrZuser_optionsZboolean_optionsrZhelp_optionsr0rBrCrDrErFrGZsub_commandsrrrrrsR
8r)�__doc__r7r5Zdistutils.corerZdistutils.errorsrZdistutils.utilrrrrrrr�<module>sPKV[�FEZ11.command/__pycache__/check.cpython-36.opt-2.pycnu�[���3


 \x�@s�ddlmZddlmZyTddlmZddlmZddlm	Z	ddlm
Z
ddlmZGdd	�d	e�Z
d
ZWnek
r�dZYnXGdd
�d
e�ZdS)�)�Command)�DistutilsSetupError)�Reporter)�Parser)�frontend)�nodes)�StringIOc@seZdZd	dd�Zdd�ZdS)
�SilentReporterNr�ascii�replacec	Cs"g|_tj||||||||�dS)N)�messagesr�__init__)�self�source�report_level�
halt_level�stream�debug�encoding�
error_handler�r�//usr/lib64/python3.6/distutils/command/check.pyr
szSilentReporter.__init__cOs6|jj||||f�tj|f|�||j|d�|��S)N)�level�type)r�appendr�system_messageZlevels)rr�messageZchildren�kwargsrrrrszSilentReporter.system_message)Nrr
r)�__name__�
__module__�__qualname__r
rrrrrr	s
r	TFc@s\eZdZdZdddgZdddgZdd�Zd
d�Zdd�Zdd�Z	dd�Z
dd�Zdd�ZdS)�checkz"perform some checks on the package�metadata�m�Verify meta-data�restructuredtext�r�EChecks if long string meta-data syntax are reStructuredText-compliant�strict�s�(Will exit with an error if a check failscCsd|_d|_d|_d|_dS)Nr�)r%r"r(�	_warnings)rrrr�initialize_options1szcheck.initialize_optionscCsdS)Nr)rrrr�finalize_options8szcheck.finalize_optionscCs|jd7_tj||�S)Nr+)r,r�warn)r�msgrrrr/;sz
check.warncCsL|jr|j�|jr0tr"|j�n|jr0td��|jrH|jdkrHtd��dS)NzThe docutils package is needed.rzPlease correct your package.)r"�check_metadatar%�HAS_DOCUTILS�check_restructuredtextr(rr,)rrrr�run@s
z	check.runcCs�|jj}g}x*d
D]"}t||�o(t||�s|j|�qW|rP|jddj|��|jrh|js�|jd�n"|j	r�|j
s�|jd�n
|jd�dS)N�name�version�urlzmissing required meta-data: %sz, z)missing meta-data: if 'author' supplied, z#'author_email' must be supplied tooz-missing meta-data: if 'maintainer' supplied, z''maintainer_email' must be supplied tooz4missing meta-data: either (author and author_email) z%or (maintainer and maintainer_email) zmust be supplied)r5r6r7zLmissing meta-data: if 'author' supplied, 'author_email' must be supplied toozTmissing meta-data: if 'maintainer' supplied, 'maintainer_email' must be supplied toozYmissing meta-data: either (author and author_email) or (maintainer and maintainer_email) zimissing meta-data: either (author and author_email) or (maintainer and maintainer_email) must be supplied)�distributionr"�hasattr�getattrrr/�joinZauthorZauthor_emailZ
maintainerZmaintainer_email)rr"Zmissing�attrrrrr1Ps$
zcheck.check_metadatacCs\|jj�}xL|j|�D]>}|djd�}|dkr:|d}nd|d|f}|j|�qWdS)Nr+�linez%s (line %s)���)r8Zget_long_description�_check_rst_data�getr/)r�dataZwarningr=rrrr3ns

zcheck.check_restructuredtextcCs�t�}t�}tjtfd�j�}d|_d|_d|_t||j	|j
|j|j|j
|jd�}tj|||d�}|j|d�y|j||�Wn:tk
r�}z|jjd	d|dif�WYdd}~XnX|jS)
N)Z
components�)rrrr)rr+z!Could not finish the parsing: %s.�r>r>)rrrZOptionParserZget_default_valuesZ	tab_widthZpep_referencesZrfc_referencesr	rrZwarning_streamrZerror_encodingZerror_encoding_error_handlerr�documentZnote_source�parse�AttributeErrorrr)rrA�source_path�parserZsettingsZreporterrD�errrr?ys*
$zcheck._check_rst_dataN)r"r#r$)r%r&r')r(r)r*)
rrr ZdescriptionZuser_optionsZboolean_optionsr-r.r/r4r1r3r?rrrrr!$s
r!N)Zdistutils.corerZdistutils.errorsrZdocutils.utilsrZdocutils.parsers.rstrZdocutilsrr�iorr	r2�	Exceptionr!rrrr�<module>s
PKV[��x��3command/__pycache__/install_egg_info.cpython-36.pycnu�[���3


 \+
�@sddZddlmZddlmZmZddlZddlZddlZGdd�de�Z	dd�Z
d	d
�Zdd�ZdS)
z�distutils.command.install_egg_info

Implements the Distutils 'install_egg_info' command, for installing
a package's PKG-INFO metadata.�)�Command)�log�dir_utilNc@s:eZdZdZdZdgZdd�Zdd	�Zd
d�Zdd
�Z	dS)�install_egg_infoz)Install an .egg-info file for the packagez8Install package's PKG-INFO metadata as an .egg-info file�install-dir=�d�directory to install tocCs
d|_dS)N)�install_dir)�self�r�:/usr/lib64/python3.6/distutils/command/install_egg_info.py�initialize_optionssz#install_egg_info.initialize_optionscCsb|jdd�dtt|jj���tt|jj���ftjdd��}t	j
j|j|�|_
|j
g|_dS)NZinstall_libr	z%s-%s-py%d.%d.egg-info�)r	r	)Zset_undefined_options�to_filename�	safe_name�distributionZget_name�safe_versionZget_version�sys�version_info�os�path�joinr	�target�outputs)r
�basenamerrr�finalize_optionssz!install_egg_info.finalize_optionsc	Cs�|j}tjj|�r2tjj|�r2tj||jd�nNtjj|�rX|j	tj
|jfd|�n(tjj|j�s�|j	tj|jfd|j�t
jd|�|js�t|ddd��}|jjj|�WdQRXdS)N)�dry_runz	Removing z	Creating z
Writing %s�wzUTF-8)�encoding)rrr�isdir�islinkrZremove_treer�existsZexecute�unlinkr	�makedirsr�info�openrZmetadataZwrite_pkg_file)r
r�frrr�run szinstall_egg_info.runcCs|jS)N)r)r
rrr�get_outputs.szinstall_egg_info.get_outputsN)rrr)
�__name__�
__module__�__qualname__�__doc__ZdescriptionZuser_optionsr
rr'r(rrrrrs
rcCstjdd|�S)z�Convert an arbitrary string to a standard distribution name

    Any runs of non-alphanumeric/. characters are replaced with a single '-'.
    z[^A-Za-z0-9.]+�-)�re�sub)�namerrrr6srcCs|jdd�}tjdd|�S)z�Convert an arbitrary string to a standard version string

    Spaces become dots, and all other non-alphanumeric characters become
    dashes, with runs of multiple dashes condensed to a single dash.
    � �.z[^A-Za-z0-9.]+r-)�replacer.r/)�versionrrrr>srcCs|jdd�S)z|Convert a project or version name to its filename-escaped form

    Any '-' characters are currently replaced with '_'.
    r-�_)r3)r0rrrrHsr)
r,Z
distutils.cmdrZ	distutilsrrrrr.rrrrrrrr�<module>s+
PKV[	�*�dd6command/__pycache__/build_scripts.cpython-36.opt-2.pycnu�[���3


 \X�@s�ddlZddlZddlmZddlmZddlmZddlm	Z	ddl
mZmZddlm
Z
ddlZejd�ZGd	d
�d
e�ZGdd�dee�ZdS)
�N)�ST_MODE)�	sysconfig)�Command)�newer)�convert_path�	Mixin2to3)�logs^#!.*python[0-9.]*([ 	].*)?$c@sHeZdZdZdddgZdgZdd�Zd
d�Zdd�Zdd�Z	dd�Z
dS)�
build_scriptsz("build" scripts (copy and fixup #! line)�
build-dir=�d�directory to "build" (copy) to�force�f�1forcibly build everything (ignore file timestamps�executable=�e�*specify final destination interpreter pathcCs"d|_d|_d|_d|_d|_dS)N)�	build_dir�scriptsr
�
executable�outfiles)�self�r�7/usr/lib64/python3.6/distutils/command/build_scripts.py�initialize_optionss
z build_scripts.initialize_optionscCs|jdddd�|jj|_dS)	NZbuildr	rr
r)r	r)r
r
)rr)Zset_undefined_optionsZdistributionr)rrrr�finalize_options%s
zbuild_scripts.finalize_optionscCs|jS)N)r)rrrr�get_source_files,szbuild_scripts.get_source_filescCs|js
dS|j�dS)N)r�copy_scripts)rrrr�run/szbuild_scripts.runc"Cs�|j|j�g}g}�x,|jD�] }d}t|�}tjj|jtjj|��}|j|�|j	rtt
||�rttjd|�qyt
|d�}Wn tk
r�|js��d}YnXXtj|j�\}}|jd�|j�}	|	s�|jd|�qtj|	�}
|
r�d}|
jd�p�d}|�rtjd	||j�|j|�|j�stj�s2|j}n(tjjtjd
�dtjd�tjd
�f�}tj|�}d||d}
y|
jd�Wn$tk
�r�t dj!|
���YnXy|
j|�Wn&tk
�r�t dj!|
|���YnXt
|d��}|j"|
�|j#|j$��WdQRX|�r@|j%�q|�r*|j%�|j|�|j&||�qWtj'dk�r�xh|D]`}|j�rptjd|�nDtj(|�t)d@}|dBd@}||k�rVtjd|||�tj*||��qVW||fS)NFznot copying %s (up-to-date)�rbrz%s is an empty file (skipping)T��zcopying and adjusting %s -> %s�BINDIRz
python%s%s�VERSION�EXEs#!�
zutf-8z.The shebang ({!r}) is not decodable from utf-8zAThe shebang ({!r}) is not decodable from the script encoding ({})�wb�posixzchanging mode of %si�imz!changing mode of %s from %o to %o)+Zmkpathrrr�os�path�join�basename�appendr
rr�debug�open�OSError�dry_run�tokenize�detect_encoding�readline�seek�warn�
first_line_re�match�group�inforZpython_buildr�get_config_var�fsencode�decode�UnicodeDecodeError�
ValueError�format�write�
writelines�	readlines�closeZ	copy_file�name�statr�chmod)rr�
updated_filesZscriptZadjustZoutfiler�encoding�linesZ
first_liner7Zpost_interprZshebangZoutf�fileZoldmodeZnewmoderrrr5s�












zbuild_scripts.copy_scriptsN)r
rr)r
rr)rrr)�__name__�
__module__�__qualname__ZdescriptionZuser_optionsZboolean_optionsrrrrrrrrrr	sr	c@seZdZdd�ZdS)�build_scripts_2to3cCs&tj|�\}}|js|j|�||fS)N)r	rr0Zrun_2to3)rrrGrrrr�s
zbuild_scripts_2to3.copy_scriptsN)rKrLrMrrrrrrN�srN)r(�rerErZ	distutilsrZdistutils.corerZdistutils.dep_utilrZdistutils.utilrrrr1�compiler6r	rNrrrr�<module>s

PKV[I0�TJ(J()command/__pycache__/config.cpython-36.pycnu�[���3


 \3�@sldZddlZddlZddlmZddlmZddlmZddl	m
Z
ddd	�ZGd
d�de�Zddd
�Z
dS)a�distutils.command.config

Implements the Distutils 'config' command, a (mostly) empty command class
that exists mainly to be sub-classed by specific module distributions and
applications.  The idea is that while every "config" command is different,
at least they're all named the same, and users always see "config" in the
list of standard commands.  Also, this is a good place to put common
configure-like tasks: "try to compile this C code", or "figure out where
this header file lives".
�N)�Command)�DistutilsExecError)�customize_compiler)�logz.cz.cxx)�czc++c@s�eZdZdZd>d?d@dAdBdCdDdEdFg	Zdd�Zdd�Zdd�Zd d!�Zd"d#�Z	d$d%�Z
d&d'�Zd(d)�Zd*d+�Z
dGd-d.�ZdHd/d0�ZdId1d2�ZdJd3d4�ZdKd5d6�ZdLd8d9�Zdddgfd:d;�ZdMd<d=�ZdS)N�configzprepare to build�	compiler=N�specify the compiler type�cc=�specify the compiler executable�
include-dirs=�I�.list of directories to search for header files�define=�D�C preprocessor macros to define�undef=�U�!C preprocessor macros to undefine�
libraries=�l�!external C libraries to link with�
library-dirs=�L�.directories to search for external C libraries�noisy�1show every action (compile, link, run, ...) taken�dump-source�=dump generated source files before attempting to compile themcCs4d|_d|_d|_d|_d|_d|_d|_g|_dS)N�)�compilerZcc�include_dirs�	libraries�library_dirsr�dump_source�
temp_files)�self�r'�0/usr/lib64/python3.6/distutils/command/config.py�initialize_options3szconfig.initialize_optionscCs�|jdkr|jjpg|_nt|jt�r6|jjtj�|_|jdkrHg|_nt|jt�r^|jg|_|jdkrpg|_nt|jt�r�|jjtj�|_dS)N)	r!Zdistribution�
isinstance�str�split�os�pathsepr"r#)r&r'r'r(�finalize_optionsBs



zconfig.finalize_optionscCsdS)Nr')r&r'r'r(�runRsz
config.runcCszddlm}m}t|j|�sv||j|jdd�|_t|j�|jrN|jj|j�|j	rb|jj
|j	�|jrv|jj|j�dS)z^Check that 'self.compiler' really is a CCompiler object;
        if not, make it one.
        r)�	CCompiler�new_compilerr)r �dry_runZforceN)
�distutils.ccompilerr1r2r*r r3rr!Zset_include_dirsr"Z
set_librariesr#Zset_library_dirs)r&r1r2r'r'r(�_check_compilerYs
zconfig._check_compilercCsldt|}t|d�}|r@x|D]}|jd|�q W|jd�|j|�|ddkr`|jd�|j�|S)NZ_configtest�wz#include <%s>
�
r���)�LANG_EXT�open�write�close)r&�body�headers�lang�filename�file�headerr'r'r(�_gen_temp_sourcefileks




zconfig._gen_temp_sourcefilecCs<|j|||�}d}|jj||g�|jj|||d�||fS)Nz
_configtest.i)r!)rCr%�extendr Z
preprocess)r&r=r>r!r?�src�outr'r'r(�_preprocessxs
zconfig._preprocesscCs\|j|||�}|jr"t|d|�|jj|g�\}|jj||g�|jj|g|d�||fS)Nzcompiling '%s':)r!)rCr$�	dump_filer Zobject_filenamesr%rD�compile)r&r=r>r!r?rE�objr'r'r(�_compileszconfig._compilec
Csr|j||||�\}}tjjtjj|��d}	|jj|g|	|||d�|jjdk	r\|	|jj}	|jj	|	�|||	fS)Nr)r"r#Ztarget_lang)
rKr-�path�splitext�basenamer Zlink_executableZ
exe_extensionr%�append)
r&r=r>r!r"r#r?rErJ�progr'r'r(�_link�szconfig._linkcGsX|s|j}g|_tjddj|��x0|D](}ytj|�Wq(tk
rNYq(Xq(WdS)Nzremoving: %s� )r%r�info�joinr-�remove�OSError)r&�	filenamesr@r'r'r(�_clean�s
z
config._cleanrcCsRddlm}|j�d}y|j||||�Wn|k
rDd}YnX|j�|S)aQConstruct a source file from 'body' (a string containing lines
        of C/C++ code) and 'headers' (a list of header files to include)
        and run it through the preprocessor.  Return true if the
        preprocessor succeeded, false if there were any errors.
        ('body' probably isn't of much use, but what the heck.)
        r)�CompileErrorTF)r4rYr5rGrX)r&r=r>r!r?rY�okr'r'r(�try_cpp�s
zconfig.try_cppcCsx|j�|j||||�\}}t|t�r0tj|�}t|�}d}	x&|j�}
|
dkrPP|j|
�r>d}	Pq>W|j	�|j
�|	S)a�Construct a source file (just like 'try_cpp()'), run it through
        the preprocessor, and return true if any line of the output matches
        'pattern'.  'pattern' should either be a compiled regex object or a
        string containing a regex.  If both 'body' and 'headers' are None,
        preprocesses an empty file -- which can be useful to determine the
        symbols the preprocessor and compiler set by default.
        F�T)r5rGr*r+�rerIr:�readline�searchr<rX)r&�patternr=r>r!r?rErFrA�match�liner'r'r(�
search_cpp�s 	


zconfig.search_cppcCsdddlm}|j�y|j||||�d}Wn|k
rDd}YnXtj|rRdpTd�|j�|S)zwTry to compile a source file built from 'body' and 'headers'.
        Return true on success, false otherwise.
        r)rYTFzsuccess!zfailure.)r4rYr5rKrrSrX)r&r=r>r!r?rYrZr'r'r(�try_compile�s
zconfig.try_compilec

Cspddlm}m}|j�y|j||||||�d}	Wn||fk
rPd}	YnXtj|	r^dp`d�|j�|	S)z�Try to compile and link a source file, built from 'body' and
        'headers', to executable form.  Return true on success, false
        otherwise.
        r)rY�	LinkErrorTFzsuccess!zfailure.)r4rYrer5rQrrSrX)
r&r=r>r!r"r#r?rYrerZr'r'r(�try_link�s


zconfig.try_linkc

Cs�ddlm}m}|j�y.|j||||||�\}	}
}|j|g�d}Wn||tfk
rdd}YnXtj|rrdptd�|j	�|S)z�Try to compile, link to an executable, and run a program
        built from 'body' and 'headers'.  Return true on success, false
        otherwise.
        r)rYreTFzsuccess!zfailure.)
r4rYrer5rQZspawnrrrSrX)
r&r=r>r!r"r#r?rYrerErJZexerZr'r'r(�try_run�s

zconfig.try_runrc	Cst|j�g}|r|jd|�|jd�|r<|jd|�n|jd|�|jd�dj|�d}|j|||||�S)a�Determine if function 'func' is available by constructing a
        source file that refers to 'func', and compiles and links it.
        If everything succeeds, returns true; otherwise returns false.

        The constructed source file starts out by including the header
        files listed in 'headers'.  If 'decl' is true, it then declares
        'func' (as "int func()"); you probably shouldn't supply 'headers'
        and set 'decl' true in the same call, or you might get errors about
        a conflicting declarations for 'func'.  Finally, the constructed
        'main()' function either references 'func' or (if 'call' is true)
        calls it.  'libraries' and 'library_dirs' are used when
        linking.
        z
int %s ();z
int main () {z  %s();z  %s;�}r7)r5rOrTrf)	r&�funcr>r!r"r#ZdeclZcallr=r'r'r(�
check_funcs


zconfig.check_funccCs |j�|jd|||g||�S)a�Determine if 'library' is available to be linked against,
        without actually checking that any particular symbols are provided
        by it.  'headers' will be used in constructing the source file to
        be compiled, but the only effect of this is to check if all the
        header files listed are available.  Any libraries listed in
        'other_libraries' will be included in the link, in case 'library'
        has symbols that depend on other libraries.
        zint main (void) { })r5rf)r&Zlibraryr#r>r!Zother_librariesr'r'r(�	check_lib6s

zconfig.check_libcCs|jd|g|d�S)z�Determine if the system header file named by 'header_file'
        exists and can be found by the preprocessor; return true if so,
        false otherwise.
        z
/* No body */)r=r>r!)r[)r&rBr!r#r?r'r'r(�check_headerDs
zconfig.check_header)rNr	)r
Nr)rr
r)rrr)rrr)rrr)rrr)rNr)rNr)NNNr)NNNr)NNr)NNNNr)NNNNr)NNNNrr)NNr)�__name__�
__module__�__qualname__ZdescriptionZuser_optionsr)r/r0r5rCrGrKrQrXr[rcrdrfrgrjrkrlr'r'r'r(rsT
	






rc
CsJ|dkrtjd|�n
tj|�t|�}ztj|j��Wd|j�XdS)zjDumps a file content into log.info.

    If head is not None, will be dumped before the file content.
    Nz%s)rrSr:�readr<)r@�headrAr'r'r(rHNs
rH)N)�__doc__r-r]Zdistutils.corerZdistutils.errorsrZdistutils.sysconfigrZ	distutilsrr9rrHr'r'r'r(�<module>
s
;PKV[�YY]33,command/__pycache__/bdist_rpm.cpython-36.pycnu�[���3


 \�T�@s�dZddlZddlZddlZddlmZddlmZddlm	Z	ddl
mZddlTddl
mZdd	lmZGd
d�de�ZdS)zwdistutils.command.bdist_rpm

Implements the Distutils 'bdist_rpm' command (create RPM source and binary
distributions).�N)�Command)�DEBUG)�get_platform)�
write_file)�*)�get_python_version)�logc+@s�eZdZdZdgdhdidjdkdldmdndodpdqdrdsdtdudvdwdxdydzd{d|d}d~dd�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�g)Zd4d9d=d2dUgZd4d9d=dX�ZdYdZ�Zd[d\�Zd]d^�Z	d_d`�Z
dadb�Zdcdd�Zdedf�Z
dS)��	bdist_rpmzcreate an RPM distribution�bdist-base=N�/base directory for creating built distributions�	rpm-base=�dbase directory for creating RPMs (defaults to "rpm" under --bdist-base; must be specified for RPM 2)�	dist-dir=�d�Ddirectory to put final RPM files in (and .spec files if --spec-only)�python=�Mpath to Python interpreter to hard-code in the .spec file (default: "python")�
fix-python�Lhard-code the exact path to the current Python interpreter in the .spec file�	spec-only�only regenerate spec file�source-only�only generate source RPM�binary-only�only generate binary RPM�	use-bzip2�7use bzip2 instead of gzip to create source distribution�distribution-name=�gname of the (Linux) distribution to which this RPM applies (*not* the name of the module distribution!)�group=�9package classification [default: "Development/Libraries"]�release=�RPM release number�serial=�RPM serial number�vendor=�aRPM "vendor" (eg. "Joe Blow <joe@example.com>") [default: maintainer or author from setup script]�	packager=�BRPM packager (eg. "Jane Doe <jane@example.net>") [default: vendor]�
doc-files=�6list of documentation files (space or comma-separated)�
changelog=�
RPM changelog�icon=�name of icon file�	provides=�%capabilities provided by this package�	requires=�%capabilities required by this package�
conflicts=�-capabilities which conflict with this package�build-requires=�+capabilities required to build this package�
obsoletes=�*capabilities made obsolete by this package�
no-autoreq�+do not automatically calculate dependencies�	keep-temp�k�"don't clean up RPM build directory�no-keep-temp�&clean up RPM build directory [default]�use-rpm-opt-flags�8compile with RPM_OPT_FLAGS when building from source RPM�no-rpm-opt-flags�&do not pass any RPM CFLAGS to compiler�	rpm3-mode�"RPM 3 compatibility mode (default)�	rpm2-mode�RPM 2 compatibility mode�prep-script=�3Specify a script for the PREP phase of RPM building�
build-script=�4Specify a script for the BUILD phase of RPM building�pre-install=�:Specify a script for the pre-INSTALL phase of RPM building�install-script=�6Specify a script for the INSTALL phase of RPM building�
post-install=�;Specify a script for the post-INSTALL phase of RPM building�pre-uninstall=�<Specify a script for the pre-UNINSTALL phase of RPM building�post-uninstall=�=Specify a script for the post-UNINSTALL phase of RPM building�
clean-script=�4Specify a script for the CLEAN phase of RPM building�verify-script=�6Specify a script for the VERIFY phase of the RPM build�force-arch=�0Force an architecture onto the RPM build process�quiet�q�3Run the INSTALL phase of RPM building in quiet mode)zno-keep-tempzno-rpm-opt-flagsz	rpm2-modecCs�d|_d|_d|_d|_d|_d|_d|_d|_d|_d|_	d|_
d|_d|_d|_
d|_d|_d|_d|_d|_d|_d|_d|_d|_d|_d|_d|_d|_d|_d|_d|_d|_d|_d|_ d|_!d|_"d|_#d|_$d|_%d|_&dS)Nr�)'�
bdist_base�rpm_base�dist_dir�python�
fix_python�	spec_only�binary_only�source_only�	use_bzip2�distribution_name�group�release�serial�vendor�packager�	doc_files�	changelog�icon�prep_script�build_script�install_script�clean_script�
verify_script�pre_install�post_install�
pre_uninstall�post_uninstall�prep�provides�requires�	conflicts�build_requires�	obsoletes�	keep_temp�use_rpm_opt_flags�	rpm3_mode�
no_autoreq�
force_archr\)�self�r��3/usr/lib64/python3.6/distutils/command/bdist_rpm.py�initialize_options�sNzbdist_rpm.initialize_optionscCs�|jdd�|jdkr6|js$td��tjj|jd�|_|jdkrX|j	rPt
j|_qfd|_n|j	rftd��tjdkr~t
dtj��|jr�|jr�td	��|jj�s�d
|_|jdd
�|j�dS)NZbdistr`z)you must specify --rpm-base in RPM 2 mode�rpmZpython3z8--python and --fix-python are mutually exclusive options�posixz9don't know how to create RPM distributions on platform %sz6cannot supply both '--source-only' and '--binary-only'rrb)r`r`)rbrb)Zset_undefined_optionsrar�ZDistutilsOptionError�os�path�joinr`rcrd�sys�
executable�nameZDistutilsPlatformErrorrfrg�distribution�has_ext_modulesr��finalize_package_data)r�r�r�r��finalize_options�s.





zbdist_rpm.finalize_optionscCsX|jdd�|jdd|jj�|jj�f�|jd�|jd�t|jt�r|x.dD]&}tj	j
|�rR||jkrR|jj|�qRW|jd	d
�|jd�|jd�|jd
�|j|j
�|_
|jd�|jd�|jd�|jd�|jd�|jd�|jd�|jd�|jd�|jd�|jd�|jd�|jd�|jd�|jd�|jd�dS)NrjzDevelopment/Librariesrmz%s <%s>rnro�README�
README.txtrk�1rlrirprqrrrsrtrurvrwrxryrzr|r}r~rr�r�)r�r�)Z
ensure_stringr�Zget_contactZget_contact_emailZensure_string_list�
isinstancero�listr�r��exists�append�_format_changelogrpZensure_filename)r�Zreadmer�r�r�r��s>





















zbdist_rpm.finalize_package_datac
Cs�tr<td�td|j�td|j�td|j�td|j�|jrT|j}|j|�n<i}x.d)D]&}t	j
j|j|�||<|j||�q^W|d}t	j
j|d|j
j��}|jt||j�fd|�|jr�dS|j
jdd�}|jd
�}|j�r�dg|_ndg|_|jd
�||j
_|j�d}|d}|j||�|j�rht	j
j|j��rZ|j|j|�ntd|j��tjd�dg}	t	j
jd��s�t	j
jd��r�dg}	|j�r�|	jd�n|j �r�|	jd�n
|	jd�|	j!dd|j"g�|j#�r|	j!ddt	j
j$|j�g�|j%�s|	jd�|j&�r(|	jd�|	j|�d}
|
d }d!|
d"}d#|||f}
t	j'|
�}z�g}d}xT|j(�}|�s~P|j)�j*�}t+|�d$k�s�t,�|j|d%�|dk�rn|d}�qnW|j-�}|�r�t.d&t/|
���Wd|j-�X|j0|	�|j1�s�|j
j2��rt3�}nd'}|j �svt	j
j|d
|�}t	j
j|��sDt,�|j4||j�t	j
j|j|�}|j
jjd(||f�|j�s�xh|D]`}t	j
j|d	|�}t	j
j|��r�|j4||j�t	j
j|jt	j
j5|��}|j
jjd(||f��q�WdS)*Nzbefore _get_package_data():zvendor =z
packager =zdoc_files =zchangelog =�SOURCES�SPECS�BUILD�RPMS�SRPMSz%s.speczwriting '%s'�sdistZbztarZgztarrzicon file '%s' does not existz
building RPMsr�z/usr/bin/rpmbuildz
/bin/rpmbuildZrpmbuildz-bsz-bbz-baz--definez__python %sz
_topdir %sz--cleanz--quietz%{name}-%{version}-%{release}z.src.rpmz%{arch}/z.%{arch}.rpmz%rpm -q --qf '%s %s\n' --specfile '%s'�r_zFailed to execute: %s�anyr	)r�r�r�r�r�)6r�printrmrnrorprerbZmkpathr�r�r�rar��get_nameZexecuter�_make_spec_fileZ
dist_filesZreinitialize_commandrhZformatsZrun_commandZget_archive_filesZ	copy_filerqr�ZDistutilsFileErrorr�inforgr�rf�extendrcr��abspathr�r\�popen�readline�strip�split�len�AssertionError�closeZDistutilsExecError�reprZspawnZdry_runr�rZ	move_file�basename)r�Zspec_dirZrpm_dirrZ	spec_pathZsaved_dist_filesr��sourceZ
source_dirZrpm_cmdZ
nvr_stringZsrc_rpmZnon_src_rpmZq_cmd�outZbinary_rpmsZ
source_rpm�line�lZstatusZ	pyversionZsrpm�filenamer�r�r�r��runs�















z
bdist_rpm.runcCstjj|jtjj|��S)N)r�r�r�rbr�)r�r�r�r�r��
_dist_path�szbdist_rpm._dist_pathcCsDd|jj�d|jj�jdd�d|jj�d|jjdd�dd|jj�g}tjd	�}d
jdd�|j	�D��}d
}d}|j||�}||kr�|j
d�|j
d|d
�|jdddg�|jr�|j
d�n
|j
d�|jd|jj
�d|jddg�|j�s|jj��s&|j
d�n|j
d|j�x^dKD]V}t||j��}t|t��rd|j
d"|d#j|�f�n|d$k	�r,|j
d"||f��q,W|jj�d%k�r�|j
d&|jj��|j�r�|j
d'|j�|j�r�|j
d(d#j|j��|j�r|j
d)tjj|j��|j�r|j
d*�|jdd+|jj�g�d,|jtjjtj d-�f}d.|}	|j!�r\d/|	}	d0|}
dLd4d5|	fd6d7|
fdMdNdOdPdQdRg	}xh|D]`\}}
}t||
�}|�s�|�r�|jddE|g�|�r�|jt"|dF�j#�j$d
��n
|j
|��q�W|jddGdHg�|j%�r|j
dId#j|j%��|j&�r@|jddJg�|j|j&�|S)SziGenerate the text of an RPM spec file and return it as a
        list of strings (one per line).
        z
%define name z%define version �-�_z%define unmangled_version z%define release �z	Summary: zrpm --eval %{__os_install_post}�
cSsg|]}d|j��qS)z  %s \)r�)�.0r�r�r�r��
<listcomp>�sz-bdist_rpm._make_spec_file.<locals>.<listcomp>zbrp-python-bytecompile \
z%brp-python-bytecompile %{__python} \
z2# Workaround for http://bugs.python.org/issue14443z%define __os_install_post z
Name: %{name}zVersion: %{version}zRelease: %{release}z-Source0: %{name}-%{unmangled_version}.tar.bz2z,Source0: %{name}-%{unmangled_version}.tar.gzz	License: zGroup: z>BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildrootzPrefix: %{_prefix}zBuildArch: noarchz
BuildArch: %s�Vendor�Packager�Provides�Requires�	Conflicts�	Obsoletesz%s: %s� NZUNKNOWNzUrl: zDistribution: zBuildRequires: zIcon: z
AutoReq: 0z%descriptionz%s %srz%s buildzenv CFLAGS="$RPM_OPT_FLAGS" z>%s install -O1 --root=$RPM_BUILD_ROOT --record=INSTALLED_FILESr{rr�&%setup -n %{name}-%{unmangled_version}ZbuildrsZinstallrt�cleanru�rm -rf $RPM_BUILD_ROOT�verifyscriptrv�prerw�postrx�preunry�postunrz�%�rz%files -f INSTALLED_FILESz%defattr(-,root,root)z%doc z
%changelog)r�r�r�r�r�r�)r{rrr�)r�rur�)r�rvN)r�rwN)r�rxN)r�ryN)r�rzN)'r�r�Zget_version�replacerkZget_description�
subprocessZ	getoutputr��
splitlinesr�r�rhZget_licenserjr�r��getattr�lowerr�r�Zget_urlrirrqr�r�r�r�Zget_long_descriptionrcr��argvr��open�readr�rorp)r�Z	spec_fileZvendor_hookZproblemZfixedZ
fixed_hookZfield�valZdef_setup_callZ	def_buildZinstall_cmdZscript_optionsZrpm_opt�attr�defaultr�r�r�r��s�


	



zbdist_rpm._make_spec_filecCs�|s|Sg}x`|j�jd�D]N}|j�}|ddkrD|jd|g�q|ddkr\|j|�q|jd|�qW|ds||d=|S)zKFormat the changelog correctly and convert it to a list of strings
        r�rrr�r�z  )r�r�r�r�)r�rpZ
new_changelogr�r�r�r�r�3szbdist_rpm._format_changelog)r
Nr)rNr
)rrr)rNr)rNr)rNr)rNr)rNr)rNr)rNr)rNr )r!Nr")r#Nr$)r%Nr&)r'Nr()r)Nr*)r+Nr,)r-Nr.)r/Nr0)r1Nr2)r3Nr4)r5Nr6)r7Nr8)r9Nr:)r;r<r=)r>Nr?)r@NrA)rBNrC)rDNrE)rFNrG)rHNrI)rJNrK)rLNrM)rNNrO)rPNrQ)rRNrS)rTNrU)rVNrW)rXNrY)rZNr[)r\r]r^)�__name__�
__module__�__qualname__ZdescriptionZuser_optionsZboolean_optionsZnegative_optr�r�r�r�r�r�r�r�r�r�r�r	s�--)r	)�__doc__r�r�r�Zdistutils.corerZdistutils.debugrZdistutils.utilrZdistutils.file_utilrZdistutils.errorsZdistutils.sysconfigrZ	distutilsrr	r�r�r�r��<module>sPKV[�����1command/__pycache__/__init__.cpython-36.opt-2.pycnu�[���3


 \�@s.dddddddddd	d
ddd
dddddgZdS)ZbuildZbuild_pyZ	build_extZ
build_clibZ
build_scriptsZcleanZinstallZinstall_libZinstall_headersZinstall_scriptsZinstall_dataZsdist�registerZbdistZ
bdist_dumbZ	bdist_rpmZ
bdist_wininstZcheckZuploadN)�__all__�rr�2/usr/lib64/python3.6/distutils/command/__init__.py�<module>s$PKV[�B����8command/__pycache__/install_headers.cpython-36.opt-1.pycnu�[���3


 \�@s$dZddlmZGdd�de�ZdS)z�distutils.command.install_headers

Implements the Distutils 'install_headers' command, to install C/C++ header
files to the Python include directory.�)�Commandc@sFeZdZdZddgZdgZdd	�Zd
d�Zdd
�Zdd�Z	dd�Z
dS)�install_headerszinstall C/C++ header files�install-dir=�d�$directory to install header files to�force�f�-force installation (overwrite existing files)cCsd|_d|_g|_dS)Nr)�install_dirr�outfiles)�self�r
�9/usr/lib64/python3.6/distutils/command/install_headers.py�initialize_optionssz"install_headers.initialize_optionscCs|jddd�dS)NZinstallrr
r)rr
)rr)Zset_undefined_options)rr
r
r�finalize_optionssz install_headers.finalize_optionscCsL|jj}|sdS|j|j�x*|D]"}|j||j�\}}|jj|�q"WdS)N)�distribution�headersZmkpathr
Z	copy_filer�append)rr�header�out�_r
r
r�run!s
zinstall_headers.runcCs|jjp
gS)N)rr)rr
r
r�
get_inputs+szinstall_headers.get_inputscCs|jS)N)r)rr
r
r�get_outputs.szinstall_headers.get_outputsN)rrr)rrr	)�__name__�
__module__�__qualname__ZdescriptionZuser_optionsZboolean_optionsrrrrrr
r
r
rr
s
rN)�__doc__Zdistutils.corerrr
r
r
r�<module>sPKV[�Ƹ<�7�7*command/__pycache__/install.cpython-36.pycnu�[���3

�\dh�j�@sdZddlZddlZddlmZddlmZddlmZddl	m
Z
ddlmZddl
mZdd	lmZmZmZdd
lmZddlmZddlmZdd
lmZdZdddddd�Zdddddd�dddddd�ed�Ze�rdddddd�ed <ddd!d"dd�ed#<d+ZGd)d*�d*e�ZdS),zFdistutils.command.install

Implements the Distutils 'install' command.�N)�log)�Command)�DEBUG)�get_config_vars)�DistutilsPlatformError)�
write_file)�convert_path�
subst_vars�change_root)�get_platform)�DistutilsOptionError)�	USER_BASE)�	USER_SITETz$base/Lib/site-packagesz$base/Include/$dist_namez
$base/Scriptsz$base)�purelib�platlib�headers�scripts�dataz/$base/lib/python$py_version_short/site-packagesz5$platbase/lib64/python$py_version_short/site-packagesz9$base/include/python$py_version_short$abiflags/$dist_namez	$base/binz$base/lib/pythonz$base/lib64/pythonz$base/include/python/$dist_name)�unix_prefix�	unix_home�ntz	$usersitez4$userbase/Python$py_version_nodot/Include/$dist_namez)$userbase/Python$py_version_nodot/Scriptsz	$userbase�nt_userz=$userbase/include/python$py_version_short$abiflags/$dist_namez
$userbase/bin�	unix_userrrrrrc@s:eZdZdZd_d`dadbdddedfdgdidjdkdldmdndodpdqdrgZdd%d(gZer`ejd,dd-ef�ejd,�d diZ	d.d/�Z
d0d1�Zd2d3�Zd4d5�Z
d6d7�Zd8d9�Zd:d;�Zd<d=�Zd>d?�Zd@dA�ZdBdC�ZdDdE�ZdFdG�ZdHdI�ZdJdK�ZdLdM�ZdNdO�ZdPdQ�ZdRdS�ZdTdU�ZdVdW�ZdXefdYefdZefd[efd\d]d^�fgZdS)s�installz'install everything from build directory�prefix=N�installation prefix�exec-prefix=�.(Unix only) prefix for platform-specific files�home=�+(Unix only) home directory to install under�
install-base=�;base installation directory (instead of --prefix or --home)�install-platbase=z8base installation directory for platform-specific files z$(instead of --exec-prefix or --home)�root=�<install everything relative to this alternate root directory�install-purelib=�;installation directory for pure Python module distributions�install-platlib=�8installation directory for non-pure module distributions�install-lib=z4installation directory for all module distributions z3(overrides --install-purelib and --install-platlib)�install-headers=�(installation directory for C/C++ headers�install-scripts=�)installation directory for Python scripts�
install-data=�%installation directory for data files�compile�c�compile .py to .pyc [default]�
no-compile�don't compile .py files�	optimize=�O�lalso compile with optimization: -O1 for "python -O", -O2 for "python -OO", and -O0 to disable [default: -O0]�force�f�1force installation (overwrite any existing files)�
skip-build�2skip rebuilding everything (for testing/debugging)�record=�3filename in which to record list of installed files�userz!install in user site-package '%s'cCs�d|_d|_d|_d|_d|_d|_d|_d|_d|_d|_	d|_
d|_d|_t
|_t|_d|_d|_d|_d|_d|_d|_d|_d|_d|_d|_dS)zInitializes options.Nr�)�prefix�exec_prefix�homer?�install_base�install_platbase�root�install_purelib�install_platlib�install_headers�install_lib�install_scripts�install_datar
�install_userbaser�install_usersiter0�optimize�
extra_path�install_path_filer8�
skip_build�warn_dir�
build_base�	build_lib�record)�self�rX�1/usr/lib64/python3.6/distutils/command/install.py�initialize_options�s2zinstall.initialize_optionscCsx|js|js|jr&|js|jr&td%��|jr@|js8|jr@td��|jrl|jsd|jsd|jsd|jsd|jrltd��tjdkr�|jr�|j	d�d|_|j
d�tjdkr�|j�n|j�|j
d	�t
jj�d
}tdd�\}}y
t
j}Wntk
r�d
}YnX|jj�|jj�|jj�|dt
jdd�dt
jdd�|||||d�|_t�rf|j|jd<|j|jd<|j�|j
d�|j|jd<|j|jd<t�r�d
dlm}td�||j�|j �|j
d�|j�r�|j!�|j"dk�r�|jj#�r�|j$|_"n|j%|_"|j&dddddddd�|j'�|j"|_(tj)j*|j"|j+�|_"|j,dk	�r\|j-d dddddd�|j
d!�|j.d"d&d'�dS)(zFinalizes options.z.must supply either prefix/exec-prefix/home or z)install-base/install-platbase -- not bothz9must supply either home or prefix/exec-prefix -- not bothzGcan't combine user with prefix, exec_prefix/home, or install_(plat)base�posixz+exec-prefix option ignored on this platformNzpre-finalize_{unix,other}zpost-finalize_{unix,other}()rrArB�z%d.%d�z%d%d)Z	dist_nameZdist_versionZ
dist_fullname�
py_version�py_version_short�py_version_nodotZ
sys_prefixrAZsys_exec_prefixrB�abiflags�userbaseZusersitezpost-expand_basedirs()�base�platbase)�pprintzconfig vars:zpost-expand_dirs()�librrrrrZlibbasezafter prepending root�buildrTrUzWmust supply either prefix/exec-prefix/home or install-base/install-platbase -- not both)rTrT)rUrU)/rArBrCrDrErr?�os�name�warn�	dump_dirs�
finalize_unix�finalize_other�sys�version�splitrra�AttributeError�distributionZget_nameZget_versionZget_fullname�version_info�config_vars�
HAS_USER_SITErMrN�expand_basedirsrre�print�expand_dirs�create_home_pathrJZext_modulesrHrG�
convert_paths�handle_extra_path�install_libbase�path�join�
extra_dirsrF�change_rootsZset_undefined_options)rWr^rArBrarerXrXrY�finalize_options�s�

















zinstall.finalize_optionscCs�tsdSddlm}tj|d�x||jD]r}|d}|ddkrN|dd	�}||jkrz|j|}|j|�}t||�}n|j|�}t||�}tjd||�q*WdS)
zDumps the list of user options.Nr)�
longopt_xlate�:r@�=z  %s: %s���r�)	rZdistutils.fancy_getoptr�r�debug�user_options�negative_opt�	translate�getattr)rW�msgr��optZopt_name�valrXrXrYrkus




zinstall.dump_dirscCsX|jdk	s|jdk	r\|jdkr2|jdkr2|jdksP|jdksP|jdksP|jdkrXtd��dS|j	r�|j
dkrttd��|j
|_|_|jd�n�|j
dk	r�|j
|_|_|jd�n�|jdk�r&|jdk	r�td��ttd�p�tjtjkr�dtjkr�d	}nd
}tjjtj�||_tjjtj�||_n|jdk�r:|j|_|j|_|j|_|jd�dS)z&Finalizes options for posix platforms.NzPinstall-base or install-platbase supplied, but installation scheme is incompletez$User base directory is not specifiedrrz*must not supply exec-prefix without prefixZreal_prefix�RPM_BUILD_ROOTz/localr\r)rDrErJrGrHrIrKrLrr?rMr�
select_schemerCrArB�hasattrrn�base_prefixrh�environr}�normpath)rWZadditionrXrXrYrl�sF










zinstall.finalize_unixcCs�|jr8|jdkrtd��|j|_|_|jtjd�n�|jdk	r\|j|_|_|jd�n\|j	dkrvtj
jtj	�|_	|j	|_|_y|jtj�Wn"t
k
r�tdtj��YnXdS)z)Finalizes options for non-posix platformsNz$User base directory is not specifiedZ_userrz)I don't know how to install stuff on '%s')r?rMrrDrEr�rhrirCrAr}r�rn�KeyError)rWrXrXrYrm�s"


zinstall.finalize_othercCs@t|}x2tD]*}d|}t||�dkrt||||�qWdS)z=Sets the install directories by applying the install schemes.�install_N)�INSTALL_SCHEMES�SCHEME_KEYSr��setattr)rWri�scheme�keyZattrnamerXrXrYr��s

zinstall.select_schemecCs\xV|D]N}t||�}|dk	rtjdks0tjdkr<tjj|�}t||j�}t|||�qWdS)Nr[r)r�rhrir}�
expanduserr	rtr�)rW�attrs�attrr�rXrXrY�
_expand_attrs�s

zinstall._expand_attrscCs|jdddg�dS)zNCalls `os.path.expanduser` on install_base, install_platbase and
        root.rDrErFN)r�)rWrXrXrYrv�szinstall.expand_basedirscCs|jddddddg�dS)z+Calls `os.path.expanduser` on install dirs.rGrHrJrIrKrLN)r�)rWrXrXrYrx�szinstall.expand_dirscGs0x*|D]"}d|}t||tt||���qWdS)z!Call `convert_path` over `names`.r�N)r�rr�)rW�namesrir�rXrXrYrz�s
zinstall.convert_pathscCs�|jdkr|jj|_|jdk	r�tjd�t|jt�rB|jjd�|_t|j�dkr`|jd}}n"t|j�dkrz|j\}}ntd��t	|�}nd}d}||_
||_dS)	z4Set `path_file` and `extra_dirs` using `extra_path`.NzIDistribution option extra_path is deprecated. See issue27919 for details.�,r@rr]zY'extra_path' option must be a list, tuple, or comma-separated string with 1 or 2 elementsr\)rPrrrrj�
isinstance�strrp�lenrr�	path_filer)rWr�rrXrXrYr{�s$



zinstall.handle_extra_pathc	Gs4x.|D]&}d|}t||t|jt||���qWdS)z:Change the install directories pointed by name using root.r�N)r�r
rFr�)rWr�rir�rXrXrYr�s
zinstall.change_rootscCsh|js
dSttjjd��}xH|jj�D]:\}}|j|�r&tjj|�r&|j	d|�tj
|d�q&WdS)zCreate directories under ~.N�~zos.makedirs('%s', 0o700)i�)r?rrhr}r�rt�items�
startswith�isdirZdebug_print�makedirs)rWrCrir}rXrXrYryszinstall.create_home_pathcCs,|js6|jd�|jjd�j}|jr6|t�kr6td��x|j�D]}|j|�q@W|j	r`|j
�|jr�|j�}|j
r�t|j
�}x(tt|��D]}|||d�||<q�W|jt|j|fd|j�ttjjtj�}ttjj|�}tjjtjj|j��}|j�r(|j	�o
|j�r(||k�r(tjd|j�dS)zRuns the command.rgz"Can't install when cross-compilingNz'writing list of installed files to '%s'z�modules installed to '%s', which is not in Python's module search path (sys.path) -- you'll have to change the search path yourself)rRZrun_commandrrZget_command_objZ	plat_namerSrr�get_sub_commandsr��create_path_filerV�get_outputsrFr��range�executer�maprhr}r�rn�normcaserJrQrr�)rWZ
build_plat�cmd_name�outputsZroot_lenZcounterZsys_pathrJrXrXrY�run(s6



zinstall.runcCsJtjj|j|jd�}|jr8|jt||jgfd|�n|j	d|�dS)zCreates the .pth filez.pthzcreating %szpath file '%s' not createdN)
rhr}r~r|r�rQr�rrrj)rW�filenamerXrXrYr�Ts

zinstall.create_path_filecCspg}x>|j�D]2}|j|�}x"|j�D]}||kr&|j|�q&WqW|jrl|jrl|jtjj|j	|jd��|S)z.Assembles the outputs of all the sub-commands.z.pth)
r��get_finalized_commandr��appendr�rQrhr}r~r|)rWr�r��cmdr�rXrXrYr�bs
zinstall.get_outputscCs2g}x(|j�D]}|j|�}|j|j��qW|S)z*Returns the inputs of all the sub-commands)r�r��extend�
get_inputs)rWZinputsr�r�rXrXrYr�ss

zinstall.get_inputscCs|jj�p|jj�S)zSReturns true if the current distribution has any Python
        modules to install.)rrZhas_pure_modulesZhas_ext_modules)rWrXrXrY�has_libs
zinstall.has_libcCs
|jj�S)zLReturns true if the current distribution has any headers to
        install.)rr�has_headers)rWrXrXrYr��szinstall.has_headerscCs
|jj�S)zMReturns true if the current distribution has any scripts to.
        install.)rr�has_scripts)rWrXrXrYr��szinstall.has_scriptscCs
|jj�S)zJReturns true if the current distribution has any data to.
        install.)rrZhas_data_files)rWrXrXrY�has_data�szinstall.has_datarJrIrKrLZinstall_egg_infocCsdS)NTrX)rWrXrXrY�<lambda>�szinstall.<lambda>)rNr)rNr)rNr)r Nr!�\base installation directory for platform-specific files (instead of --exec-prefix or --home))r"Nr�)r#Nr$)r%Nr&)r'Nr(�ginstallation directory for all module distributions (overrides --install-purelib and --install-platlib))r)Nr�)r*Nr+)r,Nr-)r.Nr/)r0r1r2)r3Nr4)r5r6r7)r8r9r:)r;Nr<)r=Nr>) �__name__�
__module__�__qualname__Zdescriptionr�Zboolean_optionsrur�rr�rZr�rkrlrmr�r�rvrxrzr{r�ryr�r�r�r�r�r�r�r�Zsub_commandsrXrXrXrYrIs�

N3		",r)rrrrr)�__doc__rnrhZ	distutilsrZdistutils.corerZdistutils.debugrZdistutils.sysconfigrZdistutils.errorsrZdistutils.file_utilrZdistutils.utilrr	r
rrZsiter
rruZWINDOWS_SCHEMEr�r�rrXrXrXrY�<module>sVPKV[�+command/__pycache__/__init__.cpython-36.pycnu�[���3


 \�@s2dZddddddddd	d
ddd
ddddddgZdS)z\distutils.command

Package containing implementation of all the standard Distutils
commands.ZbuildZbuild_pyZ	build_extZ
build_clibZ
build_scriptsZcleanZinstallZinstall_libZinstall_headersZinstall_scriptsZinstall_dataZsdist�registerZbdistZ
bdist_dumbZ	bdist_rpmZ
bdist_wininstZcheckZuploadN)�__doc__�__all__�rr�2/usr/lib64/python3.6/distutils/command/__init__.py�<module>s&PKV[B.�5		5command/__pycache__/install_data.cpython-36.opt-1.pycnu�[���3


 \�@s<dZddlZddlmZddlmZmZGdd�de�ZdS)z�distutils.command.install_data

Implements the Distutils 'install_data' command, for installing
platform-independent data files.�N)�Command)�change_root�convert_pathc@sHeZdZdZdddgZdgZdd�Zd
d�Zdd�Zdd�Z	dd�Z
dS)�install_datazinstall data files�install-dir=�d�Ibase directory for installing data files (default: installation base dir)�root=N�<install everything relative to this alternate root directory�force�f�-force installation (overwrite existing files)cCs,d|_g|_d|_d|_|jj|_d|_dS)Nr�)�install_dir�outfiles�rootrZdistribution�
data_files�warn_dir)�self�r�6/usr/lib64/python3.6/distutils/command/install_data.py�initialize_optionss
zinstall_data.initialize_optionscCs|jdddd�dS)	NZinstallrrrr)rr)rr)rr)Zset_undefined_options)rrrr�finalize_options#szinstall_data.finalize_optionscCs|j|j�x�|jD]�}t|t�rdt|�}|jrD|jd||jf�|j||j�\}}|j	j
|�qt|d�}tjj
|�s�tjj|j|�}n|jr�t|j|�}|j|�|dgkr�|j	j
|�qx4|dD](}t|�}|j||�\}}|j	j
|�q�WqWdS)NzMsetup script did not provide a directory for '%s' -- installing right in '%s'rr)Zmkpathrr�
isinstance�strrr�warnZ	copy_filer�append�os�path�isabs�joinrr)rr�out�_�dir�datarrr�run*s*

zinstall_data.runcCs
|jpgS)N)r)rrrr�
get_inputsKszinstall_data.get_inputscCs|jS)N)r)rrrr�get_outputsNszinstall_data.get_outputs)rrr)r	Nr
)rrr
)�__name__�
__module__�__qualname__ZdescriptionZuser_optionsZboolean_optionsrrr%r&r'rrrrrs!r)�__doc__rZdistutils.corerZdistutils.utilrrrrrrr�<module>sPKV[k���2command/__pycache__/install_scripts.cpython-36.pycnu�[���3


 \��@sDdZddlZddlmZddlmZddlmZGdd�de�ZdS)zudistutils.command.install_scripts

Implements the Distutils 'install_scripts' command, for installing
Python scripts.�N)�Command)�log)�ST_MODEc@sLeZdZdZddddgZddgZdd�Zdd�Zdd�Zdd�Z	dd�Z
dS)�install_scriptsz%install scripts (Python or otherwise)�install-dir=�d�directory to install scripts to�
build-dir=�b�'build directory (where to install from)�force�f�-force installation (overwrite existing files)�
skip-buildN�skip the build stepscCsd|_d|_d|_d|_dS)Nr)�install_dirr�	build_dir�
skip_build)�self�r�9/usr/lib64/python3.6/distutils/command/install_scripts.py�initialize_optionssz"install_scripts.initialize_optionscCs |jdd	�|jdd
dd�dS)
NZbuild�
build_scriptsrZinstallrrrr)rr)rr)rr)rr)Zset_undefined_options)rrrr�finalize_options!s
z install_scripts.finalize_optionscCs�|js|jd�|j|j|j�|_tjdkr�xT|j�D]H}|j	rNt
jd|�q6tj|�t
dBd@}t
jd||�tj||�q6WdS)Nr�posixzchanging mode of %simi�zchanging mode of %s to %o)rZrun_commandZ	copy_treerr�outfiles�os�name�get_outputsZdry_runr�info�statr�chmod)r�file�moderrr�run)s

zinstall_scripts.runcCs|jjp
gS)N)Zdistribution�scripts)rrrr�
get_inputs8szinstall_scripts.get_inputscCs
|jpgS)N)r)rrrrr;szinstall_scripts.get_outputs)rrr)r	r
r)rr
r)rNr)�__name__�
__module__�__qualname__ZdescriptionZuser_optionsZboolean_optionsrrr$r&rrrrrrsr)	�__doc__rZdistutils.corerZ	distutilsrr rrrrrr�<module>s
PKV[�B����2command/__pycache__/install_headers.cpython-36.pycnu�[���3


 \�@s$dZddlmZGdd�de�ZdS)z�distutils.command.install_headers

Implements the Distutils 'install_headers' command, to install C/C++ header
files to the Python include directory.�)�Commandc@sFeZdZdZddgZdgZdd	�Zd
d�Zdd
�Zdd�Z	dd�Z
dS)�install_headerszinstall C/C++ header files�install-dir=�d�$directory to install header files to�force�f�-force installation (overwrite existing files)cCsd|_d|_g|_dS)Nr)�install_dirr�outfiles)�self�r
�9/usr/lib64/python3.6/distutils/command/install_headers.py�initialize_optionssz"install_headers.initialize_optionscCs|jddd�dS)NZinstallrr
r)rr
)rr)Zset_undefined_options)rr
r
r�finalize_optionssz install_headers.finalize_optionscCsL|jj}|sdS|j|j�x*|D]"}|j||j�\}}|jj|�q"WdS)N)�distribution�headersZmkpathr
Z	copy_filer�append)rr�header�out�_r
r
r�run!s
zinstall_headers.runcCs|jjp
gS)N)rr)rr
r
r�
get_inputs+szinstall_headers.get_inputscCs|jS)N)r)rr
r
r�get_outputs.szinstall_headers.get_outputsN)rrr)rrr	)�__name__�
__module__�__qualname__ZdescriptionZuser_optionsZboolean_optionsrrrrrr
r
r
rr
s
rN)�__doc__Zdistutils.corerrr
r
r
r�<module>sPKV[2l��///command/__pycache__/upload.cpython-36.opt-2.pycnu�[���3

�\dh��@s�ddlZddlZddlZddlZddlmZddlmZmZm	Z	ddl
mZddlm
Z
mZddlmZddlmZddlmZGd	d
�d
e�ZdS)�N)�standard_b64encode)�urlopen�Request�	HTTPError)�urlparse)�DistutilsError�DistutilsOptionError)�
PyPIRCCommand)�spawn)�logc@sJeZdZdZejddgZejdgZdd	�Zd
d�Zdd
�Z	dd�Z
dS)�uploadzupload binary package to PyPI�sign�s�sign files to upload using gpg�	identity=�i�GPG identity used to sign filescCs,tj|�d|_d|_d|_d|_d|_dS)N�rF)r	�initialize_options�username�password�
show_responser
�identity)�self�r�0/usr/lib64/python3.6/distutils/command/upload.pyr s
zupload.initialize_optionscCsvtj|�|jr |jr td��|j�}|ikrX|d|_|d|_|d|_|d|_	|jrr|j
jrr|j
j|_dS)Nz.Must use --sign for --identity to have meaningrr�
repository�realm)r	�finalize_optionsrr
rZ_read_pypircrrrr�distribution)r�configrrrr(s




zupload.finalize_optionscCs>|jjsd}t|��x$|jjD]\}}}|j|||�qWdS)NzHMust create and upload files in one command (e.g. setup.py sdist upload))rZ
dist_filesr�upload_file)r�msg�command�	pyversion�filenamerrr�run:s
z
upload.runc&)Cs^t|j�\}}}}}}	|s"|s"|	r0td|j��|d2krDtd|��|jr|ddd|g}
|jrnd|jg|
d	d	�<t|
|jd
�t|d�}z|j�}Wd|j	�X|j
j}
dd
|
j�|
j
�tjj|�|f||tj|�j�d|
j�|
j�|
j�|
j�|
j�|
j�|
j�|
j�|
j�|
j�|
j�|
j�|
j �d�}ytj!|�j�}WnPt"k
�r�}z2d|}|j#|t$j%�ddl&m'}|��s|�WYdd}~Xn
X||d<d}|dk�r�t(j)�\}}}|�r�d||f}n|dk�r�dt(j(dd�}||d<|j�rtjj|�dt|dd�j�f|d<|j*d|j+j,d�}d t-|�j.d�}d!}d"|j,d�}|d#}t/j0�}x�|j1�D]�\}}d$|}t2|t3��s�|g}xr|D]j}t4|�t5k�r�|d%|d7}|d}nt6|�j,d&�}|j7|�|j7|j,d&��|j7d'�|j7|��q�W�qjW|j7|�|j8�}d(||jf}|j#|t$j%�d)|t6t9|��|d*�} t:|j|| d+�}!yt;|!�}"|"j<�}#|"j=}$Wnft>k
�r�}z|j?}#|j=}$WYdd}~Xn8t@k
�r�}z|j#t6|�t$jA��WYdd}~XnX|#d,k�r8|j#d-|#|$ft$j%�|jB�rZ|jC|"�}%d.jDd/d0|%d/d0f�}|j#|t$j%�n"d1|#|$f}|j#|t$jA�tE|��dS)3NzIncompatible url %s�http�httpszunsupported schema Zgpgz
--detach-signz-az--local-user�)�dry_run�rbZfile_upload�1z1.0)z:actionZprotocol_version�name�version�contentZfiletyper$Z
sha256_digestZmetadata_versionZsummaryZ	home_pageZauthorZauthor_email�license�description�keywords�platformZclassifiersZdownload_urlZprovidesZrequiresZ	obsoletesz#calculating md5 checksum failed: %sr)�
get_fips_modeZ
md5_digestrZ	bdist_rpmzbuilt for %s %sZ
bdist_dumbzbuilt for %s�)Zterse�commentz.ascZ
gpg_signature�:�asciizBasic z3--------------GHSKFJDLGDS7543FJKLFHRE75642756743254s
--s--
z+
Content-Disposition: form-data; name="%s"z; filename="%s"zutf-8s

zSubmitting %s to %sz multipart/form-data; boundary=%s)zContent-typezContent-lengthZ
Authorization)�data�headers��zServer response (%s): %s�
�-�KzUpload failed (%s): %s)r'r()Frr�AssertionErrorr
rr
r*�open�read�closerZmetadataZget_nameZget_version�os�path�basename�hashlibZsha256Z	hexdigestZget_descriptionZget_urlZget_contactZget_contact_emailZget_licenceZget_long_descriptionZget_keywordsZ
get_platformsZget_classifiersZget_download_urlZget_providesZget_requiresZ
get_obsoletesZmd5�
ValueErrorZannouncer�INFOZ_hashlibr4r3�distrr�encoder�decode�io�BytesIO�items�
isinstance�list�type�tuple�str�write�getvalue�lenrrZgetcoder"r�code�OSErrorZERRORrZ_read_pypi_response�joinr)&rr#r$r%ZschemaZnetlocZurlZparamsZqueryZ	fragmentsZgpg_args�fr/�metar9Zdigest�er"r4r6rIr.�idZ	user_passZauth�boundaryZsep_boundaryZend_boundaryZbody�key�value�titler:Zrequest�resultZstatus�reason�textrrrr!Bs�













zupload.upload_fileN)r
rr)rrr)�__name__�
__module__�__qualname__r1r	Zuser_optionsZboolean_optionsrrr&r!rrrrrsr)rCrLr3rF�base64rZurllib.requestrrrZurllib.parserZdistutils.errorsrrZdistutils.corer	Zdistutils.spawnr
Z	distutilsrrrrrr�<module>sPKV[a�)�7�70command/__pycache__/install.cpython-36.opt-1.pycnu�[���3

�\dh�j�@sdZddlZddlZddlmZddlmZddlmZddl	m
Z
ddlmZddl
mZdd	lmZmZmZdd
lmZddlmZddlmZdd
lmZdZdddddd�Zdddddd�dddddd�ed�Ze�rdddddd�ed <ddd!d"dd�ed#<d+ZGd)d*�d*e�ZdS),zFdistutils.command.install

Implements the Distutils 'install' command.�N)�log)�Command)�DEBUG)�get_config_vars)�DistutilsPlatformError)�
write_file)�convert_path�
subst_vars�change_root)�get_platform)�DistutilsOptionError)�	USER_BASE)�	USER_SITETz$base/Lib/site-packagesz$base/Include/$dist_namez
$base/Scriptsz$base)�purelib�platlib�headers�scripts�dataz/$base/lib/python$py_version_short/site-packagesz5$platbase/lib64/python$py_version_short/site-packagesz9$base/include/python$py_version_short$abiflags/$dist_namez	$base/binz$base/lib/pythonz$base/lib64/pythonz$base/include/python/$dist_name)�unix_prefix�	unix_home�ntz	$usersitez4$userbase/Python$py_version_nodot/Include/$dist_namez)$userbase/Python$py_version_nodot/Scriptsz	$userbase�nt_userz=$userbase/include/python$py_version_short$abiflags/$dist_namez
$userbase/bin�	unix_userrrrrrc@s:eZdZdZd_d`dadbdddedfdgdidjdkdldmdndodpdqdrgZdd%d(gZer`ejd,dd-ef�ejd,�d diZ	d.d/�Z
d0d1�Zd2d3�Zd4d5�Z
d6d7�Zd8d9�Zd:d;�Zd<d=�Zd>d?�Zd@dA�ZdBdC�ZdDdE�ZdFdG�ZdHdI�ZdJdK�ZdLdM�ZdNdO�ZdPdQ�ZdRdS�ZdTdU�ZdVdW�ZdXefdYefdZefd[efd\d]d^�fgZdS)s�installz'install everything from build directory�prefix=N�installation prefix�exec-prefix=�.(Unix only) prefix for platform-specific files�home=�+(Unix only) home directory to install under�
install-base=�;base installation directory (instead of --prefix or --home)�install-platbase=z8base installation directory for platform-specific files z$(instead of --exec-prefix or --home)�root=�<install everything relative to this alternate root directory�install-purelib=�;installation directory for pure Python module distributions�install-platlib=�8installation directory for non-pure module distributions�install-lib=z4installation directory for all module distributions z3(overrides --install-purelib and --install-platlib)�install-headers=�(installation directory for C/C++ headers�install-scripts=�)installation directory for Python scripts�
install-data=�%installation directory for data files�compile�c�compile .py to .pyc [default]�
no-compile�don't compile .py files�	optimize=�O�lalso compile with optimization: -O1 for "python -O", -O2 for "python -OO", and -O0 to disable [default: -O0]�force�f�1force installation (overwrite any existing files)�
skip-build�2skip rebuilding everything (for testing/debugging)�record=�3filename in which to record list of installed files�userz!install in user site-package '%s'cCs�d|_d|_d|_d|_d|_d|_d|_d|_d|_d|_	d|_
d|_d|_t
|_t|_d|_d|_d|_d|_d|_d|_d|_d|_d|_d|_dS)zInitializes options.Nr�)�prefix�exec_prefix�homer?�install_base�install_platbase�root�install_purelib�install_platlib�install_headers�install_lib�install_scripts�install_datar
�install_userbaser�install_usersiter0�optimize�
extra_path�install_path_filer8�
skip_build�warn_dir�
build_base�	build_lib�record)�self�rX�1/usr/lib64/python3.6/distutils/command/install.py�initialize_options�s2zinstall.initialize_optionscCsx|js|js|jr&|js|jr&td%��|jr@|js8|jr@td��|jrl|jsd|jsd|jsd|jsd|jrltd��tjdkr�|jr�|j	d�d|_|j
d�tjdkr�|j�n|j�|j
d	�t
jj�d
}tdd�\}}y
t
j}Wntk
r�d
}YnX|jj�|jj�|jj�|dt
jdd�dt
jdd�|||||d�|_t�rf|j|jd<|j|jd<|j�|j
d�|j|jd<|j|jd<t�r�d
dlm}td�||j�|j �|j
d�|j�r�|j!�|j"dk�r�|jj#�r�|j$|_"n|j%|_"|j&dddddddd�|j'�|j"|_(tj)j*|j"|j+�|_"|j,dk	�r\|j-d dddddd�|j
d!�|j.d"d&d'�dS)(zFinalizes options.z.must supply either prefix/exec-prefix/home or z)install-base/install-platbase -- not bothz9must supply either home or prefix/exec-prefix -- not bothzGcan't combine user with prefix, exec_prefix/home, or install_(plat)base�posixz+exec-prefix option ignored on this platformNzpre-finalize_{unix,other}zpost-finalize_{unix,other}()rrArB�z%d.%d�z%d%d)Z	dist_nameZdist_versionZ
dist_fullname�
py_version�py_version_short�py_version_nodotZ
sys_prefixrAZsys_exec_prefixrB�abiflags�userbaseZusersitezpost-expand_basedirs()�base�platbase)�pprintzconfig vars:zpost-expand_dirs()�librrrrrZlibbasezafter prepending root�buildrTrUzWmust supply either prefix/exec-prefix/home or install-base/install-platbase -- not both)rTrT)rUrU)/rArBrCrDrErr?�os�name�warn�	dump_dirs�
finalize_unix�finalize_other�sys�version�splitrra�AttributeError�distributionZget_nameZget_versionZget_fullname�version_info�config_vars�
HAS_USER_SITErMrN�expand_basedirsrre�print�expand_dirs�create_home_pathrJZext_modulesrHrG�
convert_paths�handle_extra_path�install_libbase�path�join�
extra_dirsrF�change_rootsZset_undefined_options)rWr^rArBrarerXrXrY�finalize_options�s�

















zinstall.finalize_optionscCs�tsdSddlm}tj|d�x||jD]r}|d}|ddkrN|dd	�}||jkrz|j|}|j|�}t||�}n|j|�}t||�}tjd||�q*WdS)
zDumps the list of user options.Nr)�
longopt_xlate�:r@�=z  %s: %s���r�)	rZdistutils.fancy_getoptr�r�debug�user_options�negative_opt�	translate�getattr)rW�msgr��optZopt_name�valrXrXrYrkus




zinstall.dump_dirscCsX|jdk	s|jdk	r\|jdkr2|jdkr2|jdksP|jdksP|jdksP|jdkrXtd��dS|j	r�|j
dkrttd��|j
|_|_|jd�n�|j
dk	r�|j
|_|_|jd�n�|jdk�r&|jdk	r�td��ttd�p�tjtjkr�dtjkr�d	}nd
}tjjtj�||_tjjtj�||_n|jdk�r:|j|_|j|_|j|_|jd�dS)z&Finalizes options for posix platforms.NzPinstall-base or install-platbase supplied, but installation scheme is incompletez$User base directory is not specifiedrrz*must not supply exec-prefix without prefixZreal_prefix�RPM_BUILD_ROOTz/localr\r)rDrErJrGrHrIrKrLrr?rMr�
select_schemerCrArB�hasattrrn�base_prefixrh�environr}�normpath)rWZadditionrXrXrYrl�sF










zinstall.finalize_unixcCs�|jr8|jdkrtd��|j|_|_|jtjd�n�|jdk	r\|j|_|_|jd�n\|j	dkrvtj
jtj	�|_	|j	|_|_y|jtj�Wn"t
k
r�tdtj��YnXdS)z)Finalizes options for non-posix platformsNz$User base directory is not specifiedZ_userrz)I don't know how to install stuff on '%s')r?rMrrDrEr�rhrirCrAr}r�rn�KeyError)rWrXrXrYrm�s"


zinstall.finalize_othercCs@t|}x2tD]*}d|}t||�dkrt||||�qWdS)z=Sets the install directories by applying the install schemes.�install_N)�INSTALL_SCHEMES�SCHEME_KEYSr��setattr)rWri�scheme�keyZattrnamerXrXrYr��s

zinstall.select_schemecCs\xV|D]N}t||�}|dk	rtjdks0tjdkr<tjj|�}t||j�}t|||�qWdS)Nr[r)r�rhrir}�
expanduserr	rtr�)rWZattrs�attrr�rXrXrY�
_expand_attrs�s

zinstall._expand_attrscCs|jdddg�dS)zNCalls `os.path.expanduser` on install_base, install_platbase and
        root.rDrErFN)r�)rWrXrXrYrv�szinstall.expand_basedirscCs|jddddddg�dS)z+Calls `os.path.expanduser` on install dirs.rGrHrJrIrKrLN)r�)rWrXrXrYrx�szinstall.expand_dirscGs0x*|D]"}d|}t||tt||���qWdS)z!Call `convert_path` over `names`.r�N)r�rr�)rW�namesrir�rXrXrYrz�s
zinstall.convert_pathscCs�|jdkr|jj|_|jdk	r�tjd�t|jt�rB|jjd�|_t|j�dkr`|jd}}n"t|j�dkrz|j\}}ntd��t	|�}nd}d}||_
||_dS)	z4Set `path_file` and `extra_dirs` using `extra_path`.NzIDistribution option extra_path is deprecated. See issue27919 for details.�,r@rr]zY'extra_path' option must be a list, tuple, or comma-separated string with 1 or 2 elementsr\)rPrrrrj�
isinstance�strrp�lenrr�	path_filer)rWr�rrXrXrYr{�s$



zinstall.handle_extra_pathc	Gs4x.|D]&}d|}t||t|jt||���qWdS)z:Change the install directories pointed by name using root.r�N)r�r
rFr�)rWr�rir�rXrXrYr�s
zinstall.change_rootscCsh|js
dSttjjd��}xH|jj�D]:\}}|j|�r&tjj|�r&|j	d|�tj
|d�q&WdS)zCreate directories under ~.N�~zos.makedirs('%s', 0o700)i�)r?rrhr}r�rt�items�
startswith�isdirZdebug_print�makedirs)rWrCrir}rXrXrYryszinstall.create_home_pathcCs,|js6|jd�|jjd�j}|jr6|t�kr6td��x|j�D]}|j|�q@W|j	r`|j
�|jr�|j�}|j
r�t|j
�}x(tt|��D]}|||d�||<q�W|jt|j|fd|j�ttjjtj�}ttjj|�}tjjtjj|j��}|j�r(|j	�o
|j�r(||k�r(tjd|j�dS)zRuns the command.rgz"Can't install when cross-compilingNz'writing list of installed files to '%s'z�modules installed to '%s', which is not in Python's module search path (sys.path) -- you'll have to change the search path yourself)rRZrun_commandrrZget_command_objZ	plat_namerSrr�get_sub_commandsr��create_path_filerV�get_outputsrFr��range�executer�maprhr}r�rn�normcaserJrQrr�)rWZ
build_plat�cmd_name�outputsZroot_lenZcounterZsys_pathrJrXrXrY�run(s6



zinstall.runcCsJtjj|j|jd�}|jr8|jt||jgfd|�n|j	d|�dS)zCreates the .pth filez.pthzcreating %szpath file '%s' not createdN)
rhr}r~r|r�rQr�rrrj)rW�filenamerXrXrYr�Ts

zinstall.create_path_filecCspg}x>|j�D]2}|j|�}x"|j�D]}||kr&|j|�q&WqW|jrl|jrl|jtjj|j	|jd��|S)z.Assembles the outputs of all the sub-commands.z.pth)
r��get_finalized_commandr��appendr�rQrhr}r~r|)rWr�r��cmdr�rXrXrYr�bs
zinstall.get_outputscCs2g}x(|j�D]}|j|�}|j|j��qW|S)z*Returns the inputs of all the sub-commands)r�r��extend�
get_inputs)rWZinputsr�r�rXrXrYr�ss

zinstall.get_inputscCs|jj�p|jj�S)zSReturns true if the current distribution has any Python
        modules to install.)rrZhas_pure_modulesZhas_ext_modules)rWrXrXrY�has_libs
zinstall.has_libcCs
|jj�S)zLReturns true if the current distribution has any headers to
        install.)rr�has_headers)rWrXrXrYr��szinstall.has_headerscCs
|jj�S)zMReturns true if the current distribution has any scripts to.
        install.)rr�has_scripts)rWrXrXrYr��szinstall.has_scriptscCs
|jj�S)zJReturns true if the current distribution has any data to.
        install.)rrZhas_data_files)rWrXrXrY�has_data�szinstall.has_datarJrIrKrLZinstall_egg_infocCsdS)NTrX)rWrXrXrY�<lambda>�szinstall.<lambda>)rNr)rNr)rNr)r Nr!�\base installation directory for platform-specific files (instead of --exec-prefix or --home))r"Nr�)r#Nr$)r%Nr&)r'Nr(�ginstallation directory for all module distributions (overrides --install-purelib and --install-platlib))r)Nr�)r*Nr+)r,Nr-)r.Nr/)r0r1r2)r3Nr4)r5r6r7)r8r9r:)r;Nr<)r=Nr>) �__name__�
__module__�__qualname__Zdescriptionr�Zboolean_optionsrur�rr�rZr�rkrlrmr�r�rvrxrzr{r�ryr�r�r�r�r�r�r�r�Zsub_commandsrXrXrXrYrIs�

N3		",r)rrrrr)�__doc__rnrhZ	distutilsrZdistutils.corerZdistutils.debugrZdistutils.sysconfigrZdistutils.errorsrZdistutils.file_utilrZdistutils.utilrr	r
rrZsiter
rruZWINDOWS_SCHEMEr�r�rrXrXrXrY�<module>sVPKV[�ل8command/__pycache__/install_headers.cpython-36.opt-2.pycnu�[���3


 \�@s ddlmZGdd�de�ZdS)�)�Commandc@sFeZdZdZddgZdgZdd	�Zd
d�Zdd
�Zdd�Z	dd�Z
dS)�install_headerszinstall C/C++ header files�install-dir=�d�$directory to install header files to�force�f�-force installation (overwrite existing files)cCsd|_d|_g|_dS)Nr)�install_dirr�outfiles)�self�r
�9/usr/lib64/python3.6/distutils/command/install_headers.py�initialize_optionssz"install_headers.initialize_optionscCs|jddd�dS)NZinstallrr
r)rr
)rr)Zset_undefined_options)rr
r
r�finalize_optionssz install_headers.finalize_optionscCsL|jj}|sdS|j|j�x*|D]"}|j||j�\}}|jj|�q"WdS)N)�distribution�headersZmkpathr
Z	copy_filer�append)rr�header�out�_r
r
r�run!s
zinstall_headers.runcCs|jjp
gS)N)rr)rr
r
r�
get_inputs+szinstall_headers.get_inputscCs|jS)N)r)rr
r
r�get_outputs.szinstall_headers.get_outputsN)rrr)rrr	)�__name__�
__module__�__qualname__ZdescriptionZuser_optionsZboolean_optionsrrrrrr
r
r
rr
s
rN)Zdistutils.corerrr
r
r
r�<module>sPKV[q����(�(1command/__pycache__/build_py.cpython-36.opt-1.pycnu�[���3


 \C�@s~dZddlZddlZddlZddlmZddlmZddlTddl	m
Z
mZddlm
Z
Gdd	�d	e�ZGd
d�dee�ZdS)zHdistutils.command.build_py

Implements the Distutils 'build_py' command.�N)�glob)�Command)�*)�convert_path�	Mixin2to3)�logc@s�eZdZdZd8d9d:d;d<gZddgZddiZdd�Zdd�Zdd�Z	dd�Z
dd�Zdd�Zdd�Z
dd �Zd!d"�Zd#d$�Zd%d&�Zd'd(�Zd)d*�Zd+d,�Zd=d.d/�Zd0d1�Zd2d3�Zd4d5�Zd6d7�Zd	S)>�build_pyz5"build" pure Python modules (copy to build directory)�
build-lib=�d�directory to "build" (copy) to�compile�c�compile .py to .pyc�
no-compileN�!don't compile .py files [default]�	optimize=�O�lalso compile with optimization: -O1 for "python -O", -O2 for "python -OO", and -O0 to disable [default: -O0]�force�f�2forcibly build everything (ignore file timestamps)cCs4d|_d|_d|_d|_d|_d|_d|_d|_dS)Nr)�	build_lib�
py_modules�package�package_data�package_dirr�optimizer)�self�r�2/usr/lib64/python3.6/distutils/command/build_py.py�initialize_options szbuild_py.initialize_optionscCs�|jddd�|jj|_|jj|_|jj|_i|_|jjrbx&|jjj�D]\}}t|�|j|<qHW|j�|_	t
|jt�s�yt|j�|_Wn t
tfk
r�td��YnXdS)NZbuildrrzoptimize must be 0, 1, or 2)rr)rr)Zset_undefined_options�distribution�packagesrrr�itemsr�get_data_files�
data_files�
isinstancer�int�
ValueError�AssertionErrorZDistutilsOptionError)r�name�pathrrr�finalize_options*s"



zbuild_py.finalize_optionscCs:|jr|j�|jr$|j�|j�|j|jdd��dS)Nr)�include_bytecode)r�
build_modulesr"�build_packages�build_package_data�byte_compile�get_outputs)rrrr�runCszbuild_py.runcs�g}|js|Sxr|jD]h}|j|�}tjj|jg|jd��}d�|rRt|�d��fdd�|j||�D�}|j	||||f�qW|S)z?Generate list of '(package,src_dir,build_dir,filenames)' tuples�.r�csg|]}|�d��qS)Nr)�.0�file)�plenrr�
<listcomp>tsz+build_py.get_data_files.<locals>.<listcomp>)
r"�get_package_dir�osr+�joinr�split�len�find_data_files�append)r�datar�src_dir�	build_dir�	filenamesr)r8rr$as
zbuild_py.get_data_filescs`|jjdg�|jj|g�}g�x:|D]2}ttjj|t|���}�j�fdd�|D��q&W�S)z6Return filenames for package's data files in 'src_dir'�cs$g|]}|�krtjj|�r|�qSr)r;r+�isfile)r6�fn)�filesrrr9�s
z,build_py.find_data_files.<locals>.<listcomp>)r�getrr;r+r<r�extend)rrrBZglobs�patternZfilelistr)rHrr?ys
zbuild_py.find_data_filescCshd}x^|jD]T\}}}}xF|D]>}tjj||�}|jtjj|��|jtjj||�|dd�qWqWdS)z$Copy data files into build directoryNF)�
preserve_mode)r%r;r+r<�mkpath�dirname�	copy_file)rZlastdirrrBrCrD�filename�targetrrrr0�s
zbuild_py.build_package_datacCs�|jd�}|js&|r tjj|�SdSn�g}x�|r�y|jdj|�}Wn*tk
rn|jd|d�|d=Yq,X|jd|�tjj|�Sq,W|jjd�}|dk	r�|jd|�|r�tjj|�SdSdS)z�Return the directory, relative to the top of the source
           distribution, where package 'package' should be found
           (at least according to the 'package_dir' option, if any).r4rErr5N���rR)r=rr;r+r<�KeyError�insertrI)rrr+�tailZpdirrrrr:�s(
	zbuild_py.get_package_dircCsj|dkr8tjj|�s td|��tjj|�s8td|��|rftjj|d�}tjj|�rZ|Stjd|�dS)NrEz%package directory '%s' does not existz>supposed package directory '%s' exists, but is not a directoryz__init__.pyz!package init file '%s' not found z(or not a regular file)z8package init file '%s' not found (or not a regular file))	r;r+�existsZDistutilsFileError�isdirr<rFr�warn)rrr�init_pyrrr�
check_package�s
zbuild_py.check_packagecCs&tjj|�stjd||�dSdSdS)Nz!file %s (for module %s) not foundFT)r;r+rFrrX)r�module�module_filerrr�check_module�szbuild_py.check_modulec	Cs�|j||�ttjj|d��}g}tjj|jj�}xX|D]P}tjj|�}||krztjjtjj	|��d}|j
|||f�q8|jd|�q8W|S)Nz*.pyrzexcluding %s)rZrr;r+r<�abspathr!Zscript_name�splitext�basenamer@Zdebug_print)	rrrZmodule_files�modulesZsetup_scriptrZabs_fr[rrr�find_package_modules�s
zbuild_py.find_package_modulesc
Cs�i}g}x�|jD]�}|jd�}dj|dd��}|d}y||\}}Wn"tk
rj|j|�}d}YnX|s�|j||�}	|df||<|	r�|j|d|	f�tjj||d�}
|j	||
�s�q|j|||
f�qW|S)a�Finds individually-specified Python modules, ie. those listed by
        module name in 'self.py_modules'.  Returns a list of tuples (package,
        module_base, filename): 'package' is a tuple of the path through
        package-space to the module; 'module_base' is the bare (no
        packages, no dots) module name, and 'filename' is the path to the
        ".py" file (relative to the distribution root) that implements the
        module.
        r4rr5�__init__z.pyrRrR)
rr=r<rSr:rZr@r;r+r])rr"rar[r+rZmodule_baserZcheckedrYr\rrr�find_modules�s*


zbuild_py.find_modulescCsRg}|jr|j|j��|jrNx.|jD]$}|j|�}|j||�}|j|�q&W|S)a4Compute the list of all modules that will be built, whether
        they are specified one-module-at-a-time ('self.py_modules') or
        by whole packages ('self.packages').  Return a list of tuples
        (package, module, module_file), just like 'find_modules()' and
        'find_package_modules()' do.)rrJrdr"r:rb)rrarr�mrrr�find_all_moduless
zbuild_py.find_all_modulescCsdd�|j�D�S)NcSsg|]}|d�qS)r5rRr)r6r[rrrr9-sz-build_py.get_source_files.<locals>.<listcomp>)rf)rrrr�get_source_files,szbuild_py.get_source_filescCs$|gt|�|dg}tjj|�S)Nz.py)�listr;r+r<)rrCrr[Zoutfile_pathrrr�get_module_outfile/szbuild_py.get_module_outfiler5cCs�|j�}g}xx|D]p\}}}|jd�}|j|j||�}|j|�|r|jr`|jtjj|dd��|j	dkr|jtjj||j	d��qW|dd�|j
D�7}|S)Nr4rE)�optimizationrcSs,g|]$\}}}}|D]}tjj||��qqSr)r;r+r<)r6rrBrCrDrPrrrr9Cs
z(build_py.get_outputs.<locals>.<listcomp>)rfr=rirr@r�	importlib�util�cache_from_sourcerr%)rr-raZoutputsrr[r\rPrrrr23s"




zbuild_py.get_outputscCsbt|t�r|jd�}nt|ttf�s,td��|j|j||�}tj	j
|�}|j|�|j||dd�S)Nr4z:'package' must be a string (dot-separated), list, or tupler)rL)
r&�strr=rh�tuple�	TypeErrorrirr;r+rNrMrO)rr[r\rZoutfile�dirrrr�build_moduleJs

zbuild_py.build_modulecCs.|j�}x |D]\}}}|j|||�qWdS)N)rdrr)rrarr[r\rrrr.Yszbuild_py.build_modulescCsLxF|jD]<}|j|�}|j||�}x |D]\}}}|j|||�q(WqWdS)N)r"r:rbrr)rrrraZpackage_r[r\rrrr/bs


zbuild_py.build_packagescCs�tjr|jd�dSddlm}|j}|dtjkr>|tj}|jrZ||d|j	||j
d�|jdkr||||j|j	||j
d�dS)Nz%byte-compiling is disabled, skipping.r)r1r5)rr�prefix�dry_runrR)�sys�dont_write_bytecoderX�distutils.utilr1rr;�seprrrtr)rrHr1rsrrrr1vs


zbuild_py.byte_compile)r	r
r)rr
r)rNr)rrr)rrr)r5)�__name__�
__module__�__qualname__ZdescriptionZuser_optionsZboolean_optionsZnegative_optr r,r3r$r?r0r:rZr]rbrdrfrgrir2rrr.r/r1rrrrrs8


'4
	rc@seZdZdd�Zdd�ZdS)�
build_py_2to3cCsLg|_|jr|j�|jr*|j�|j�|j|j�|j|jdd��dS)Nr)r-)	�
updated_filesrr.r"r/r0Zrun_2to3r1r2)rrrrr3�szbuild_py_2to3.runcCs,tj||||�}|dr(|jj|d�|S)Nr5r)rrrr}r@)rr[r\r�resrrrrr�szbuild_py_2to3.build_moduleN)ryrzr{r3rrrrrrr|�sr|)�__doc__r;�importlib.utilrkrurZdistutils.corerZdistutils.errorsrwrrZ	distutilsrrr|rrrr�<module>s}PKV[�����1command/__pycache__/register.cpython-36.opt-2.pycnu�[���3


 \�-�@s`ddlZddlZddlZddlZddlmZddlmZddl	Tddl
mZGdd�de�ZdS)�N)�warn)�
PyPIRCCommand)�*)�logc@s�eZdZdZejdd gZejdddgZdd	d
�fgZdd�Zd
d�Z	dd�Z
dd�Zdd�Zdd�Z
dd�Zdd�Zdd�Zd!dd�ZdS)"�registerz7register the distribution with the Python package index�list-classifiersN� list the valid Trove classifiers�strict�BWill stop the registering if the meta-data are not fully compliant�verify�checkcCsdS)NT�)�selfr
r
�2/usr/lib64/python3.6/distutils/command/register.py�<lambda>szregister.<lambda>cCstj|�d|_d|_dS)Nr)r�initialize_options�list_classifiersr	)rr
r
rrs
zregister.initialize_optionscCs*tj|�d|jfdd�}||jjd<dS)Nr�)r	�restructuredtextr)rr)r�finalize_optionsr	�distributionZcommand_options)rZ
check_optionsr
r
rr$s
zregister.finalize_optionscCsX|j�|j�x|j�D]}|j|�qW|jr<|j�n|jrL|j�n|j�dS)N)	r�_set_configZget_sub_commandsZrun_commandZdry_run�verify_metadatar�classifiers�
send_metadata)rZcmd_namer
r
r�run+s

zregister.runcCs8tdt�|jjd�}|j�|j|_d|_|j�dS)Nzddistutils.command.register.check_metadata is deprecated,               use the check command insteadrr)r�PendingDeprecationWarningrZget_command_objZensure_finalizedr	rr)rrr
r
r�check_metadata:szregister.check_metadatacCsz|j�}|ikr@|d|_|d|_|d|_|d|_d|_n6|jd|jfkr^td|j��|jdkrp|j|_d|_dS)	N�username�password�
repository�realmTZpypiz%s not found in .pypircF)Z_read_pypircrrr r!�
has_configZDEFAULT_REPOSITORY�
ValueError)r�configr
r
rrDs




zregister._set_configcCs*|jd}tjj|�}tj|j|��dS)Nz?:action=list_classifiers)r �urllib�requestZurlopenr�info�_read_pypi_response)rZurlZresponser
r
rrUs
zregister.classifierscCs&|j|jd��\}}tjd||�dS)NrzServer response (%s): %s)�post_to_server�build_post_datarr')r�code�resultr
r
rr\szregister.verify_metadatac
Cs|jrd}|j}|j}nd}d}}dj�}x:||krf|jdtj�t�}|sTd}q.||kr.td�q.W|dk�r|x|s�td�}qtWx|s�t	j	d�}q�Wt
jj�}t
j
j|j�d	}|j|j|||�|j|jd
�|�\}}|jd||ftj�|dk�r|j�r||j_nj|jd
tj�|jd|j�tj�d}x&|j�dk�r\td�}|�s8d}�q8W|j�dk�r|j||��n�|dk�r�ddi}	d|	d<|	d<|	d<d|	d<x|	d�s�td�|	d<�q�Wx�|	d|	dk�rNx|	d�s�t	j	d�|	d<�q�Wx|	d�st	j	d�|	d<�qW|	d|	dk�r�d|	d<d|	d<td��q�Wx|	d�sltd�|	d<�qRW|j|	�\}}|dk�r�tjd||�ntjd�tjd�nT|d k�rdd!i}	d|	d<x|	d�s�td"�|	d<�q�W|j|	�\}}tjd||�dS)#N�1�x�z1 2 3 4z�We need to know who you are, so please choose either:
 1. use your existing login,
 2. register as a new user,
 3. have the server generate a new password for you (and email it to you), or
 4. quit
Your selection [default 1]: z&Please choose one of the four options!z
Username: z
Password: rZsubmitzServer response (%s): %s��zAI can store your PyPI login so future submissions will be faster.z (the login will be stored in %s)�XZynzSave your login (y/N)?�n�y�2z:action�user�namerZemailZconfirmz
 Confirm: z!Password and confirm don't match!z
   EMail: z"You will receive an email shortly.z7Follow the instructions in it to complete registration.�3Zpassword_resetzYour email address: )r"rr�split�announcer�INFO�input�print�getpassr%r&ZHTTPPasswordMgr�parseZurlparser Zadd_passwordr!r)r*rZ_get_rc_file�lowerZ
_store_pypircr')
rZchoicerr�choices�auth�hostr+r,�datar
r
rrcs�











zregister.send_metadatacCs�|jj}|d|j�|j�|j�|j�|j�|j�|j�|j	�|j
�|j�|j�|j
�|j�|j�|j�d�}|ds�|ds�|dr�d|d<|S)Nz1.0)z:action�metadata_versionr6�versionZsummaryZ	home_pageZauthorZauthor_email�license�description�keywords�platformrZdownload_url�provides�requires�	obsoletesrJrKrLz1.1rD)rZmetadataZget_nameZget_versionZget_descriptionZget_urlZget_contactZget_contact_emailZget_licenceZget_long_descriptionZget_keywordsZ
get_platformsZget_classifiersZget_download_urlZget_providesZget_requiresZ
get_obsoletes)r�action�metarCr
r
rr*�s*zregister.build_post_datacCsd|kr$|jd|d|jftj�d}d|}|d}tj�}x�|j�D]�\}}t|�tg�tf�fkrp|g}xZ|D]R}t|�}|j	|�|j	d|�|j	d�|j	|�|rv|dd	krv|j	d
�qvWqJW|j	|�|j	d
�|j
�jd�}d|tt|��d
�}	t
jj|j||	�}
t
jjt
jj|d��}d}y|j|
�}Wnxt
jjk
�r�}
z$|j�rl|
jj�}|
j|
jf}WYdd}
~
XnJt
jjk
�r�}
zdt|
�f}WYdd}
~
XnX|j�r�|j|�}d}|j�rd
jdd|ddf�}|j|tj�|S)Nr6zRegistering %s to %sz3--------------GHSKFJDLGDS7543FJKLFHRE75642756743254z
--z--z*
Content-Disposition: form-data; name="%s"z

r�
�
zutf-8z/multipart/form-data; boundary=%s; charset=utf-8)zContent-typezContent-length)Zpassword_mgrr/i�r0�OK�-�K���)r0rQ)r9r rr:�io�StringIO�items�type�str�write�getvalue�encode�lenr%r&ZRequestZbuild_openerZHTTPBasicAuthHandler�open�errorZ	HTTPErrorZ
show_response�fp�readr+�msgZURLErrorr(�join)rrCrA�boundaryZsep_boundaryZend_boundaryZbody�key�valueZheadersZreq�openerr,�erbr
r
rr)�sV







zregister.post_to_server)rNr)r	Nr
)N)�__name__�
__module__�__qualname__rGrZuser_optionsZboolean_optionsZsub_commandsrrrrrrrrr*r)r
r
r
rrs&
zr)
r=rUZurllib.parser%Zurllib.request�warningsrZdistutils.corerZdistutils.errorsZ	distutilsrrr
r
r
r�<module>sPKV[`�"H��3command/__pycache__/bdist_dumb.cpython-36.opt-1.pycnu�[���3


 \1�@shdZddlZddlmZddlmZddlmZmZddl	Tddl
mZddlm
Z
Gd	d
�d
e�ZdS)z�distutils.command.bdist_dumb

Implements the Distutils 'bdist_dumb' command (create a "dumb" built
distribution -- i.e., just an archive to be unpacked under $prefix or
$exec_prefix).�N)�Command)�get_platform)�remove_tree�ensure_relative)�*)�get_python_version)�logc@s^eZdZdZd%ddde�fd&d(d)d*d+d,d-g	ZdddgZddd�Zdd �Zd!d"�Z	d#d$�Z
dS).�
bdist_dumbz"create a "dumb" built distribution�
bdist-dir=�d�1temporary directory for creating the distributionz
plat-name=�pz;platform name to embed in generated filenames (default: %s)�format=�f�>archive format to create (tar, gztar, bztar, xztar, ztar, zip)�	keep-temp�kz/keep the pseudo-installation tree around after z!creating the distribution archive�	dist-dir=�-directory to put final built distributions in�
skip-buildN�2skip rebuilding everything (for testing/debugging)�relative�7build the archive using relative paths (default: false)�owner=�u�@Owner name used when creating a tar file [default: current user]�group=�g�AGroup name used when creating a tar file [default: current group]Zgztar�zip)�posix�ntcCs:d|_d|_d|_d|_d|_d|_d|_d|_d|_dS)Nr)	�	bdist_dir�	plat_name�format�	keep_temp�dist_dir�
skip_buildr�owner�group)�self�r+�4/usr/lib64/python3.6/distutils/command/bdist_dumb.py�initialize_options2szbdist_dumb.initialize_optionscCsz|jdkr&|jd�j}tjj|d�|_|jdkrfy|jtj|_Wn"t	k
rdt
dtj��YnX|jdddd	�dS)
NZbdistZdumbz@don't know how to create dumb built distributions on platform %sr&r#r')r&r&)r#r#)r'r')r"Zget_finalized_command�
bdist_base�os�path�joinr$�default_format�name�KeyError�DistutilsPlatformErrorZset_undefined_options)r*r.r+r+r,�finalize_options=s

zbdist_dumb.finalize_optionscCs(|js|jd�|jddd�}|j|_|j|_d|_tjd|j�|jd�d|jj	�|j
f}tjj
|j|�}|js~|j}nJ|jj�r�|j|jkr�tdt|j�t|j�f��ntjj
|jt|j��}|j||j||j|jd	�}|jj�r�t�}nd
}|jjjd||f�|j�s$t|j|jd�dS)
NZbuild�install�)Zreinit_subcommandsrzinstalling to %sz%s.%szScan't make a dumb built distribution where base and platbase are different (%s, %s))Zroot_dirr(r)�anyr	)�dry_run) r'Zrun_commandZreinitialize_commandr"�rootZwarn_dirr�infoZdistributionZget_fullnamer#r/r0r1r&rZhas_ext_modulesZinstall_baseZinstall_platbaser5�reprrZmake_archiver$r(r)rZ
dist_files�appendr%rr:)r*r7Zarchive_basenameZpseudoinstall_rootZarchive_root�filenameZ	pyversionr+r+r,�runOs>






zbdist_dumb.run)r
rr)rrr�Pkeep the pseudo-installation tree around after creating the distribution archive)rrrA)rrr)rNr)rNr)rrr)rrr)�__name__�
__module__�__qualname__ZdescriptionrZuser_optionsZboolean_optionsr2r-r6r@r+r+r+r,r	s6
r	)�__doc__r/Zdistutils.corerZdistutils.utilrZdistutils.dir_utilrrZdistutils.errorsZdistutils.sysconfigrZ	distutilsrr	r+r+r+r,�<module>sPKV[�j�992command/__pycache__/build_ext.cpython-36.opt-2.pycnu�[���3


 \�z�@s�ddlZddlZddlZddlZddlmZddlTddlmZm	Z	ddlm
Z
ddlmZddl
mZddlmZdd	lmZdd
lmZejd�Zdd
�ZGdd�de�ZdS)�N)�Command)�*)�customize_compiler�get_python_version)�get_config_h_filename)�newer_group)�	Extension)�get_platform)�log)�	USER_BASEz3^[a-zA-Z_][a-zA-Z_0-9]*(\.[a-zA-Z_][a-zA-Z_0-9]*)*$cCsddlm}|�dS)Nr)�show_compilers)�distutils.ccompilerr)r�r�3/usr/lib64/python3.6/distutils/command/build_ext.pyrsrc@seZdZdZdejZd`dad	d
de�fdcdddefdddedfdddefdgdhdidjdkdldmdndodpgZdd%d(d1d8gZ	d:d2d;e
fgZd<d=�Zd>d?�Z
d@dA�ZdBdC�ZdDdE�ZdFdG�ZdHdI�ZdJdK�ZdLdM�ZejdNdO��ZdPdQ�ZdRdS�ZdTdU�ZdVdW�ZdXdY�ZdZd[�Zd\d]�Zd^d_�Zd2S)q�	build_extz8build C/C++ extensions (compile/link to build directory)z (separated by '%s')�
build-lib=�b�(directory for compiled extension modules�build-temp=�t�1directory for temporary files (build by-products)z
plat-name=�pz>platform name to cross-compile for, if supported (default: %s)�inplace�iz=ignore build-lib and put compiled extensions into the source z,directory alongside your pure Python modulesz
include-dirs=�Iz.list of directories to search for header files�define=�D�C preprocessor macros to define�undef=�U�!C preprocessor macros to undefine�
libraries=�l�!external C libraries to link withz
library-dirs=�Lz.directories to search for external C libraries�rpath=�R�7directories to search for shared C libraries at runtime�
link-objects=�O�2extra explicit link objects to include in the link�debug�g�'compile/link with debugging information�force�f�2forcibly build everything (ignore file timestamps)�	compiler=�c�specify the compiler type�	parallel=�j�number of parallel build jobs�swig-cppN�)make SWIG create C++ files (default is C)�
swig-opts=�!list of SWIG command line options�swig=�path to the SWIG executable�user�#add user include, library and rpathz
help-compilerzlist available compilerscCs�d|_d|_d|_d|_d|_d|_d|_d|_d|_d|_	d|_
d|_d|_d|_
d|_d|_d|_d|_d|_d|_d|_dS)Nr)�
extensions�	build_lib�	plat_name�
build_tempr�package�include_dirs�define�undef�	libraries�library_dirs�rpath�link_objectsr+r.�compiler�swig�swig_cpp�	swig_optsr=�parallel)�selfrrr�initialize_optionsjs*zbuild_ext.initialize_optionsc
Cs�ddlm}|jdd'd(d)d*d+d,d-�|jdkr8|jj|_|jj|_|j�}|jdd�}|j	dkrn|jj	pjg|_	t
|j	t�r�|j	jt
j�|_	tjtjkr�|j	jt
jjtjd
��|j	j|�||kr�|j	j|�|jd�|jd�|jdk�r�g|_|jdk�rg|_nt
|jt��r&|jjt
j�|_|jdk�r:g|_nt
|jt��rX|jjt
j�|_t
jdk�rT|jjt
jjtjd��tjtjk�r�|jjt
jjtjd��|j�r�t
jj|jd�|_nt
jj|jd�|_|j	jt
jjt���ttdd�}|�r|jj|�|j dk�rd}n|j dd�}t
jjtjd�}|�rHt
jj||�}|jj|�tj!dd�dk�s|tj!dd�dk�r�tj"j#t
jjtjd���r�|jjt
jjtjddt$�d��n|jjd�|j%d ��r�|j&�s�|jj|j%d!��n|jjd�|j'�r|j'jd"�}d#d$�|D�|_'|j(�r4|j(jd"�|_(|j)dk�rHg|_)n|j)jd%�|_)|j*�r�t
jjt+d
�}t
jjt+d�}	t
jj,|��r�|j	j|�t
jj,|	��r�|jj|	�|jj|	�t
|j-t��r�yt.|j-�|_-Wnt/k
�r�t0d&��YnXdS).Nr)�	sysconfigZbuildr@rBrKr+r.rOrA�)Z
plat_specific�includerGrJ�ntZlibsZDebugZRelease�_home�win32�ZPCbuild��cygwin�atheos�bin�lib�python�config�.�Py_ENABLE_SHARED�LIBDIR�,cSsg|]}|df�qS)�1r)�.0Zsymbolrrr�
<listcomp>�sz.build_ext.finalize_options.<locals>.<listcomp>� zparallel should be an integer)r@r@)rBrB)rKrK)r+r+)r.r.)rOrO)rArA)1�	distutilsrRZset_undefined_optionsrC�distributionZext_packageZext_modulesr?Zget_python_incrD�
isinstance�str�split�os�pathsep�sys�exec_prefix�base_exec_prefix�append�path�joinZensure_string_listrGrHrI�name�prefixr+rB�dirnamer�getattrrA�platform�
executable�
startswithr�get_config_varZpython_buildrErFrNr=r�isdirrO�int�
ValueErrorZDistutilsOptionError)
rPrRZ
py_includeZplat_py_include�	_sys_home�suffixZnew_libZdefinesZuser_includeZuser_librrr�finalize_options�s�





(
zbuild_ext.finalize_optionscCstddlm}|jsdS|jj�rL|jd�}|jj|j�p:g�|j	j
|j�||j|j
|j|jd�|_t|j�tjdkr�|jt�kr�|jj|j�|jdk	r�|jj|j�|jdk	r�x |jD]\}}|jj||�q�W|jdk	�rx|jD]}|jj|�q�W|jdk	�r|jj|j�|j	dk	�r4|jj|j	�|jdk	�rN|jj|j�|j dk	�rh|jj!|j �|j"�dS)Nr)�new_compiler�
build_clib)rK�verbose�dry_runr.rU)#r
r�r?riZhas_c_libraries�get_finalized_commandrG�extendZget_library_namesrHrrr�rKr�r�r.rrmrurAr	Z
initializerDZset_include_dirsrEZdefine_macrorFZundefine_macroZ
set_librariesZset_library_dirsrIZset_runtime_library_dirsrJZset_link_objects�build_extensions)rPr�r�ru�value�macrorrr�runs>




z
build_ext.runc
Cs�t|t�std���xnt|�D�]`\}}t|t�r4qt|t�sLt|�dkrTtd��|\}}tjd|�t|t	�ozt
j|�s�td��t|t�s�td��t||d�}x*dD]"}|j
|�}|dk	r�t|||�q�W|j
d�|_d|k�r�tjd�|j
d�}|�rxg|_g|_xj|D]b}	t|	t��o,t|	�dk�s8td��t|	�dk�rX|jj|	d�nt|	�dk�r|jj|	��qW|||<qWdS)Nz:'ext_modules' option must be a list of Extension instances�zMeach element of 'ext_modules' option must be an Extension instance or 2-tuplezvold-style (ext_name, build_info) tuple found in ext_modules for extension '%s' -- please convert to Extension instancezRfirst element of each tuple in 'ext_modules' must be the extension name (a string)zOsecond element of each tuple in 'ext_modules' must be a dictionary (build info)�sourcesrDrHrG�
extra_objects�extra_compile_args�extra_link_argsrIZdef_filez9'def_file' element of build info dict no longer supported�macrosrSz9'macros' element of build info dict must be 1- or 2-tupler)rDrHrGr�r�r�)rSr�)rj�list�DistutilsSetupError�	enumerater�tuple�lenr
�warnrk�extension_name_re�match�dict�get�setattr�runtime_library_dirs�
define_macros�undef_macrosrr)
rPr?r�ext�ext_nameZ
build_info�key�valr�r�rrr�check_extensions_listUsT










zbuild_ext.check_extensions_listcCs0|j|j�g}x|jD]}|j|j�qW|S)N)r�r?r�r�)rP�	filenamesr�rrr�get_source_files�s
zbuild_ext.get_source_filescCs6|j|j�g}x |jD]}|j|j|j��qW|S)N)r�r?rr�get_ext_fullpathru)rPZoutputsr�rrr�get_outputs�s
zbuild_ext.get_outputscCs(|j|j�|jr|j�n|j�dS)N)r�r?rO�_build_extensions_parallel�_build_extensions_serial)rPrrrr��s
zbuild_ext.build_extensionscs��j}�jdkrtj�}yddlm}Wntk
r@d}YnX|dkrV�j�dS||d��T���fdd��jD�}x6t�j|�D]&\}}�j	|��|j
�WdQRXq�WWdQRXdS)NTr)�ThreadPoolExecutor)Zmax_workerscsg|]}�j�j|��qSr)Zsubmit�build_extension)rer�)�executorrPrrrf�sz8build_ext._build_extensions_parallel.<locals>.<listcomp>)rOrm�	cpu_countZconcurrent.futuresr��ImportErrorr�r?�zip�_filter_build_errors�result)rPZworkersr�Zfuturesr�Zfutr)r�rPrr��s 


z$build_ext._build_extensions_parallelc
Cs4x.|jD]$}|j|��|j|�WdQRXqWdS)N)r?r�r�)rPr�rrrr��sz"build_ext._build_extensions_serialccsTy
dVWnDtttfk
rN}z"|js*�|jd|j|f�WYdd}~XnXdS)Nz"building extension "%s" failed: %s)ZCCompilerErrorZDistutilsErrorZCompileErrorZoptionalr�ru)rPr��errrr��s
zbuild_ext._filter_build_errorsc
CsX|j}|dkst|ttf�r,td|j��t|�}|j|j�}||j}|jpZt	||d�snt
jd|j�dSt
jd|j�|j
||�}|jp�g}|jdd�}x|jD]}|j|f�q�W|jj||j||j|j||jd�}|dd�|_|j�r|j|j�|j�p
g}|j�p|jj|�}	|jj|||j|�|j|j||j |�|j|j|	d�
dS)Nzjin 'ext_modules' option (extension '%s'), 'sources' must be present and must be a list of source filenamesZnewerz$skipping '%s' extension (up-to-date)zbuilding '%s' extension)Z
output_dirr�rDr+�extra_postargs�depends)rGrHr�r��export_symbolsr+rBZtarget_lang)!r�rjr�r�r�rur�r�r.rr
r+�info�swig_sourcesr�r�r�rrrK�compilerBrDZ_built_objectsr�r�r��languageZdetect_languageZlink_shared_object�
get_librariesrHr��get_export_symbols)
rPr�r��ext_pathr�Z
extra_argsr�rFZobjectsr�rrrr��sN



zbuild_ext.build_extensioncCs2g}g}i}|jrtjd�|js6d|jks6d|jkr<d}nd}xX|D]P}tjj|�\}}	|	dkr�|j|d|�|j|�|d||<qF|j|�qFW|s�|S|jp�|j	�}
|
dg}|j
|j�|jr�|jd�|js�x|jD]}|j|�q�Wx8|D]0}||}
tjd	||
�|j|d
|
|g��q�W|S)Nz/--swig-cpp is deprecated - use --swig-opts=-c++z-c++z.cppz.cz.i�_wraprSz-pythonzswigging %s to %sz-o���)
rMr
r�rNrmrs�splitextrrrL�	find_swigr�r�Zspawn)rPr��	extensionZnew_sourcesr�Zswig_targetsZ
target_ext�source�baser�rLZswig_cmd�o�targetrrrr�0s>





zbuild_ext.swig_sourcescCs`tjdkrdStjdkrNxBd
D]&}tjjd|d�}tjj|�r|SqWdSntd	tj��dS)N�posixrLrU�1.3�1.2�1.1z	c:\swig%szswig.exez>I don't know how to find (much less run) SWIG on platform '%s')r�r�r�)rmrursrt�isfileZDistutilsPlatformError)rPZvers�fnrrrr�fs


zbuild_ext.find_swigcCs�|j|�}|jd�}|j|d�}|jsRtjj|dd�|g�}tjj|j|�Sdj|dd��}|jd�}tjj	|j
|��}tjj||�S)Nr`rSr�build_pyr�r�r�)�get_ext_fullnamerl�get_ext_filenamerrmrsrtr@r��abspathZget_package_dir)rPr��fullnameZmodpath�filenamerCr�Zpackage_dirrrrr�~s


zbuild_ext.get_ext_fullpathcCs |jdkr|S|jd|SdS)Nr`)rC)rPr�rrrr��s
zbuild_ext.get_ext_fullnamecCs.ddlm}|jd�}|d�}tjj|�|S)Nr)r|r`�
EXT_SUFFIX)�distutils.sysconfigr|rlrmrsrt)rPr�r|r�Z
ext_suffixrrrr��s
zbuild_ext.get_ext_filenamecCs0d|jjd�d}||jkr*|jj|�|jS)NZPyInit_r`rSr�)rurlr�rr)rPr�Z
initfunc_namerrrr��s
zbuild_ext.get_export_symbolscCs�tjdkrfddlm}t|j|�s\d}|jr4|d}|tjd?tjd?d@f}|j|gS|jS�nRtjdd	�d
kr�d}|tjd?tjd?d@f}|j|gStjdd	�dk�r>dd
l	m
}d}|tjd?tjd?d@f}g}xB|jd�j�D]0}|j
d��r|j|dd��n
|j|��q�W|j|dg|Stjdk�rP|jStjdd�dk�rj|jSdd
l	m
}|jd��r�djtjd?tjd?d@|jd��}|j|gS|jSdS)NrWr)�MSVCCompilerz
python%d%dZ_d���rYrZzpython%d.%dr[)rR�SHLIBSz-lr��m�darwin��aixraz
python{}.{}{}�ABIFLAGS)roryZdistutils._msvccompilerr�rjrKr+�
hexversionrGrhrRr|rlr{rr�format)rPr�r��templateZ	pythonlibrRZextrar]rrrr��sJ


zbuild_ext.get_libraries)rrr)rrr�iignore build-lib and put compiled extensions into the source directory alongside your pure Python modules)rrr�)rrr)rrr )r!r"r#)r%r&r')r(r)r*)r+r,r-)r.r/r0)r1r2r3)r4r5r6)r7Nr8)r9Nr:)r;Nr<)r=Nr>) �__name__�
__module__�__qualname__ZdescriptionrmrnZsep_byr	Zuser_optionsZboolean_optionsrZhelp_optionsrQr�r�r�r�r�r�r�r��
contextlib�contextmanagerr�r�r�r�r�r�r�r�r�rrrrr!s�

@N	
K6	
r)r�rm�reroZdistutils.corerZdistutils.errorsr�rrrZdistutils.dep_utilrZdistutils.extensionrZdistutils.utilr	rhr
Zsiterr�r�rrrrrr�<module>s PKV[v/())+command/__pycache__/build_py.cpython-36.pycnu�[���3


 \C�@s~dZddlZddlZddlZddlmZddlmZddlTddl	m
Z
mZddlm
Z
Gdd	�d	e�ZGd
d�dee�ZdS)zHdistutils.command.build_py

Implements the Distutils 'build_py' command.�N)�glob)�Command)�*)�convert_path�	Mixin2to3)�logc@s�eZdZdZd8d9d:d;d<gZddgZddiZdd�Zdd�Zdd�Z	dd�Z
dd�Zdd�Zdd�Z
dd �Zd!d"�Zd#d$�Zd%d&�Zd'd(�Zd)d*�Zd+d,�Zd=d.d/�Zd0d1�Zd2d3�Zd4d5�Zd6d7�Zd	S)>�build_pyz5"build" pure Python modules (copy to build directory)�
build-lib=�d�directory to "build" (copy) to�compile�c�compile .py to .pyc�
no-compileN�!don't compile .py files [default]�	optimize=�O�lalso compile with optimization: -O1 for "python -O", -O2 for "python -OO", and -O0 to disable [default: -O0]�force�f�2forcibly build everything (ignore file timestamps)cCs4d|_d|_d|_d|_d|_d|_d|_d|_dS)Nr)�	build_lib�
py_modules�package�package_data�package_dirr�optimizer)�self�r�2/usr/lib64/python3.6/distutils/command/build_py.py�initialize_options szbuild_py.initialize_optionscCs�|jddd�|jj|_|jj|_|jj|_i|_|jjrbx&|jjj�D]\}}t|�|j|<qHW|j�|_	t
|jt�s�y.t|j�|_d|jko�dkns�t
�Wn tt
fk
r�td��YnXdS)	NZbuildrrr�zoptimize must be 0, 1, or 2)rr)rr)Zset_undefined_options�distribution�packagesrrr�itemsr�get_data_files�
data_files�
isinstancer�int�AssertionError�
ValueErrorZDistutilsOptionError)r�name�pathrrr�finalize_options*s"



"zbuild_py.finalize_optionscCs:|jr|j�|jr$|j�|j�|j|jdd��dS)Nr)�include_bytecode)r�
build_modulesr#�build_packages�build_package_data�byte_compile�get_outputs)rrrr�runCszbuild_py.runcs�g}|js|Sxr|jD]h}|j|�}tjj|jg|jd��}d�|rRt|�d��fdd�|j||�D�}|j	||||f�qW|S)z?Generate list of '(package,src_dir,build_dir,filenames)' tuples�.r�csg|]}|�d��qS)Nr)�.0�file)�plenrr�
<listcomp>tsz+build_py.get_data_files.<locals>.<listcomp>)
r#�get_package_dir�osr,�joinr�split�len�find_data_files�append)r�datar�src_dir�	build_dir�	filenamesr)r9rr%as
zbuild_py.get_data_filescs`|jjdg�|jj|g�}g�x:|D]2}ttjj|t|���}�j�fdd�|D��q&W�S)z6Return filenames for package's data files in 'src_dir'�cs$g|]}|�krtjj|�r|�qSr)r<r,�isfile)r7�fn)�filesrrr:�s
z,build_py.find_data_files.<locals>.<listcomp>)r�getrr<r,r=r�extend)rrrCZglobs�patternZfilelistr)rIrr@ys
zbuild_py.find_data_filescCshd}x^|jD]T\}}}}xF|D]>}tjj||�}|jtjj|��|jtjj||�|dd�qWqWdS)z$Copy data files into build directoryNF)�
preserve_mode)r&r<r,r=�mkpath�dirname�	copy_file)rZlastdirrrCrDrE�filename�targetrrrr1�s
zbuild_py.build_package_datacCs�|jd�}|js&|r tjj|�SdSn�g}x�|r�y|jdj|�}Wn*tk
rn|jd|d�|d=Yq,X|jd|�tjj|�Sq,W|jjd�}|dk	r�|jd|�|r�tjj|�SdSdS)z�Return the directory, relative to the top of the source
           distribution, where package 'package' should be found
           (at least according to the 'package_dir' option, if any).r5rFrr6N���rS)r>rr<r,r=�KeyError�insertrJ)rrr,�tailZpdirrrrr;�s(
	zbuild_py.get_package_dircCsj|dkr8tjj|�s td|��tjj|�s8td|��|rftjj|d�}tjj|�rZ|Stjd|�dS)NrFz%package directory '%s' does not existz>supposed package directory '%s' exists, but is not a directoryz__init__.pyz!package init file '%s' not found z(or not a regular file)z8package init file '%s' not found (or not a regular file))	r<r,�existsZDistutilsFileError�isdirr=rGr�warn)rrr�init_pyrrr�
check_package�s
zbuild_py.check_packagecCs&tjj|�stjd||�dSdSdS)Nz!file %s (for module %s) not foundFT)r<r,rGrrY)r�module�module_filerrr�check_module�szbuild_py.check_modulec	Cs�|j||�ttjj|d��}g}tjj|jj�}xX|D]P}tjj|�}||krztjjtjj	|��d}|j
|||f�q8|jd|�q8W|S)Nz*.pyrzexcluding %s)r[rr<r,r=�abspathr"Zscript_name�splitext�basenamerAZdebug_print)	rrrZmodule_files�modulesZsetup_scriptrZabs_fr\rrr�find_package_modules�s
zbuild_py.find_package_modulesc
Cs�i}g}x�|jD]�}|jd�}dj|dd��}|d}y||\}}Wn"tk
rj|j|�}d}YnX|s�|j||�}	|df||<|	r�|j|d|	f�tjj||d�}
|j	||
�s�q|j|||
f�qW|S)a�Finds individually-specified Python modules, ie. those listed by
        module name in 'self.py_modules'.  Returns a list of tuples (package,
        module_base, filename): 'package' is a tuple of the path through
        package-space to the module; 'module_base' is the bare (no
        packages, no dots) module name, and 'filename' is the path to the
        ".py" file (relative to the distribution root) that implements the
        module.
        r5rr6�__init__z.pyrSrS)
rr>r=rTr;r[rAr<r,r^)rr#rbr\r,rZmodule_baserZcheckedrZr]rrr�find_modules�s*


zbuild_py.find_modulescCsRg}|jr|j|j��|jrNx.|jD]$}|j|�}|j||�}|j|�q&W|S)a4Compute the list of all modules that will be built, whether
        they are specified one-module-at-a-time ('self.py_modules') or
        by whole packages ('self.packages').  Return a list of tuples
        (package, module, module_file), just like 'find_modules()' and
        'find_package_modules()' do.)rrKrer#r;rc)rrbrr�mrrr�find_all_moduless
zbuild_py.find_all_modulescCsdd�|j�D�S)NcSsg|]}|d�qS)r6rSr)r7r\rrrr:-sz-build_py.get_source_files.<locals>.<listcomp>)rg)rrrr�get_source_files,szbuild_py.get_source_filescCs$|gt|�|dg}tjj|�S)Nz.py)�listr<r,r=)rrDrr\Zoutfile_pathrrr�get_module_outfile/szbuild_py.get_module_outfiler6cCs�|j�}g}xx|D]p\}}}|jd�}|j|j||�}|j|�|r|jr`|jtjj|dd��|j	dkr|jtjj||j	d��qW|dd�|j
D�7}|S)Nr5rF)�optimizationrcSs,g|]$\}}}}|D]}tjj||��qqSr)r<r,r=)r7rrCrDrErQrrrr:Cs
z(build_py.get_outputs.<locals>.<listcomp>)rgr>rjrrAr�	importlib�util�cache_from_sourcerr&)rr.rbZoutputsrr\r]rQrrrr33s"




zbuild_py.get_outputscCsbt|t�r|jd�}nt|ttf�s,td��|j|j||�}tj	j
|�}|j|�|j||dd�S)Nr5z:'package' must be a string (dot-separated), list, or tupler)rM)
r'�strr>ri�tuple�	TypeErrorrjrr<r,rOrNrP)rr\r]rZoutfile�dirrrr�build_moduleJs

zbuild_py.build_modulecCs.|j�}x |D]\}}}|j|||�qWdS)N)rers)rrbrr\r]rrrr/Yszbuild_py.build_modulescCsXxR|jD]H}|j|�}|j||�}x,|D]$\}}}||ks>t�|j|||�q(WqWdS)N)r#r;rcr)rs)rrrrbZpackage_r\r]rrrr0bs

zbuild_py.build_packagescCs�tjr|jd�dSddlm}|j}|dtjkr>|tj}|jrZ||d|j	||j
d�|jdkr||||j|j	||j
d�dS)Nz%byte-compiling is disabled, skipping.r)r2r6)rr�prefix�dry_runrS)�sys�dont_write_bytecoderY�distutils.utilr2rr<�seprrrur)rrIr2rtrrrr2vs


zbuild_py.byte_compile)r	r
r)rr
r)rNr)rrr)rrr)r6)�__name__�
__module__�__qualname__ZdescriptionZuser_optionsZboolean_optionsZnegative_optr r-r4r%r@r1r;r[r^rcrergrhrjr3rsr/r0r2rrrrrs8


'4
	rc@seZdZdd�Zdd�ZdS)�
build_py_2to3cCsLg|_|jr|j�|jr*|j�|j�|j|j�|j|jdd��dS)Nr)r.)	�
updated_filesrr/r#r0r1Zrun_2to3r2r3)rrrrr4�szbuild_py_2to3.runcCs,tj||||�}|dr(|jj|d�|S)Nr6r)rrsr~rA)rr\r]r�resrrrrs�szbuild_py_2to3.build_moduleN)rzr{r|r4rsrrrrr}�sr})�__doc__r<�importlib.utilrlrvrZdistutils.corerZdistutils.errorsrxrrZ	distutilsrrr}rrrr�<module>s}PKV[�zL��(command/__pycache__/bdist.cpython-36.pycnu�[���3


 \��@sHdZddlZddlmZddlTddlmZdd�ZGdd	�d	e�ZdS)
zidistutils.command.bdist

Implements the Distutils 'bdist' command (create a built [binary]
distribution).�N)�Command)�*)�get_platformcCsTddlm}g}x,tjD]"}|jd|dtj|df�qW||�}|jd�dS)zFPrint list of available formats (arguments to "--format" option).
    r)�FancyGetoptzformats=N�z'List of available distribution formats:)Zdistutils.fancy_getoptr�bdist�format_commands�append�format_commandZ
print_help)r�formats�formatZpretty_printer�r
�//usr/lib64/python3.6/distutils/command/bdist.py�show_formatssrc
@s�eZdZdZd6ddde�fd7d8d9d:d;gZdgZdd	defgZd<Z	ddd�Z
dddddd d!dd"g	Zd=d>d?d@dAdBdCdDdEd/�	Zd0d1�Z
d2d3�Zd4d5�Zd	S)Frz$create a built (binary) distribution�bdist-base=�b�4temporary directory for creating built distributionsz
plat-name=�pz;platform name to embed in generated filenames (default: %s)�formats=N�/formats for distribution (comma-separated list)�	dist-dir=�d�=directory to put final built distributions in [default: dist]�
skip-build�2skip rebuilding everything (for testing/debugging)�owner=�u�@Owner name used when creating a tar file [default: current user]�group=�g�AGroup name used when creating a tar file [default: current group]zhelp-formatsz$lists available distribution formats�	bdist_rpm�gztar�zip)�posix�nt�rpm�bztar�xztar�ztar�tar�wininst�msi�RPM distribution�
bdist_dumb�gzip'ed tar file�bzip2'ed tar file�xz'ed tar file�compressed tar file�tar file�
bdist_wininst�Windows executable installer�ZIP file�	bdist_msi�Microsoft Installer)	r&r"r'r(r)r*r+r#r,cCs.d|_d|_d|_d|_d|_d|_d|_dS)Nr)�
bdist_base�	plat_namer�dist_dir�
skip_build�group�owner)�selfr
r
r�initialize_optionsQszbdist.initialize_optionscCs�|jdkr(|jrt�|_n|jd�j|_|jdkrT|jd�j}tjj|d|j�|_|j	d�|j
dkr�y|jtjg|_
Wn"t
k
r�tdtj��YnX|jdkr�d|_dS)NZbuildzbdist.rz;don't know how to create built distributions on platform %sZdist)r:r<rZget_finalized_commandr9�
build_base�os�path�joinZensure_string_listr�default_format�name�KeyErrorZDistutilsPlatformErrorr;)r?rAr
r
r�finalize_optionsZs$





zbdist.finalize_optionscCs�g}xH|jD]>}y|j|j|d�Wqtk
rHtd|��YqXqWxztt|j��D]h}||}|j|�}||jkr�|j||_	|dkr�|j
|_
|j|_|||dd�kr�d|_|j
|�q^WdS)Nrzinvalid format '%s'r.r)rr	r
rGZDistutilsOptionError�range�lenZreinitialize_command�no_format_optionrr>r=Z	keep_tempZrun_command)r?Zcommandsr�iZcmd_nameZsub_cmdr
r
r�runvs"

z	bdist.run)rrr)rNr)rrr)rNr)rrr)rrr )r!)r!r-)r.r/)r.r0)r.r1)r.r2)r.r3)r4r5)r.r6)r7r8)�__name__�
__module__�__qualname__ZdescriptionrZuser_optionsZboolean_optionsrZhelp_optionsrKrErr
r@rHrMr
r
r
rrsJ

	r)	�__doc__rBZdistutils.corerZdistutils.errorsZdistutils.utilrrrr
r
r
r�<module>sPKV[�t5353.command/__pycache__/sdist.cpython-36.opt-1.pycnu�[���3


 \�E�@s�dZddlZddlZddlTddlmZddlmZddlmZddl	m
Z
mZmZm
Z
ddlmZddlTdd	lmZdd
l	mZddlmZdd
�ZGdd�de�ZdS)zadistutils.command.sdist

Implements the Distutils 'sdist' command (create a source distribution).�N)�*)�glob)�warn)�Command)�dir_util�dep_util�	file_util�archive_util)�TextFile)�FileList)�log)�convert_pathcCsdddlm}ddlm}g}x,|j�D] }|jd|d||df�q&W|j�||�jd�dS)zoPrint all possible values for the 'formats' option (used by
    the "--help-formats" command-line option).
    r)�FancyGetopt)�ARCHIVE_FORMATSzformats=N�z.List of available source distribution formats:)Zdistutils.fancy_getoptrZdistutils.archive_utilr�keys�append�sortZ
print_help)rr�formats�format�r�//usr/lib64/python3.6/distutils/command/sdist.py�show_formatssrc@s�eZdZdZdd�ZdJdKdLdMdNdOdPdQdRdTdUdVdWdXgZd
ddddd"gZd*dd+efgZd
dd,�Z	d-efgZ
d.d/�Zd0d1�Zd2d3�Z
d4d5�Zd6d7�Zd8d9�Zd:d;�Zd<d=�Zd>d?�Zd@dA�ZdBdC�ZdDdE�ZdFdG�ZdHdI�ZdS)Y�sdistz6create a source distribution (tarball, zip file, etc.)cCs|jS)zYCallable used for the check sub-command.

        Placed here so user_options can view it)�metadata_check)�selfrrr�checking_metadata%szsdist.checking_metadata�	template=�t�5name of manifest template file [default: MANIFEST.in]�	manifest=�m�)name of manifest file [default: MANIFEST]�use-defaultsN�Rinclude the default file set in the manifest [default; disable with --no-defaults]�no-defaults�"don't include the default file set�prune��specifically exclude files/directories that should not be distributed (build tree, RCS/CVS dirs, etc.) [default; disable with --no-prune]�no-prune�$don't automatically exclude anything�
manifest-only�o�Ejust regenerate the manifest and then stop (implies --force-manifest)�force-manifest�f�kforcibly regenerate the manifest and carry on as usual. Deprecated: now the manifest is always regenerated.�formats=�6formats for source distribution (comma-separated list)�	keep-temp�kz1keep the distribution tree around after creating zarchive file(s)�	dist-dir=�d�Fdirectory to put the source distribution archive(s) in [default: dist]�metadata-check�[Ensure that all required elements of meta-data are supplied. Warn if any missing. [default]�owner=�u�@Owner name used when creating a tar file [default: current user]�group=�g�AGroup name used when creating a tar file [default: current group]zhelp-formatsz#list available distribution formats)zno-defaultszno-prune�checkcCsTd|_d|_d|_d|_d|_d|_dg|_d|_d|_d|_	d|_
d|_d|_dS)N�rZgztar)
�template�manifest�use_defaultsr'�
manifest_onlyZforce_manifestr�	keep_temp�dist_dir�
archive_filesr�owner�group)rrrr�initialize_options`szsdist.initialize_optionscCsZ|jdkrd|_|jdkr d|_|jd�tj|j�}|rFtd|��|jdkrVd|_dS)NZMANIFESTzMANIFEST.inrzunknown archive format '%s'Zdist)rCrBZensure_string_listr	Zcheck_archive_formatsrZDistutilsOptionErrorrG)rZ
bad_formatrrr�finalize_optionsws




zsdist.finalize_optionscCsBt�|_x|j�D]}|j|�qW|j�|jr6dS|j�dS)N)r�filelistZget_sub_commandsZrun_command�
get_file_listrE�make_distribution)rZcmd_namerrr�run�sz	sdist.runcCs*tdt�|jjd�}|j�|j�dS)zDeprecated API.zadistutils.command.sdist.check_metadata is deprecated,               use the check command insteadr@N)r�PendingDeprecationWarning�distributionZget_command_objZensure_finalizedrP)rr@rrr�check_metadata�s
zsdist.check_metadatacCs�tjj|j�}|r<|j�r<|j�|jj�|jj�dS|sP|j	d|j�|jj
�|jrh|j�|rt|j
�|jr�|j�|jj�|jj�|j�dS)aCFigure out the list of files to include in the source
        distribution, and put it in 'self.filelist'.  This might involve
        reading the manifest template (and writing the manifest), or just
        reading the manifest, or just using the default file set -- it all
        depends on the user's options.
        Nz&manifest template '%s' does not exist z(using default file list)z?manifest template '%s' does not exist (using default file list))�os�path�isfilerB�_manifest_is_not_generated�
read_manifestrMrZremove_duplicatesr�findallrD�add_defaults�
read_templater'�prune_file_list�write_manifest)rZtemplate_existsrrrrN�s(





zsdist.get_file_listcCs2d|jjg}x�|D]�}t|t�rn|}d}x*|D]"}tjj|�r.d}|jj|�Pq.W|s�|j	ddj
|��qtjj|�r�|jj|�q|j	d|�qWdd	g}x*|D]"}ttjjt
|��}|jj|�q�W|jd
�}|jj�r�|jj|j��x>|jD]4\}	}
}}x$|D]}
|jjtjj
|
|
���qW�q�W|jj��r�x||jjD]p}t|t��r|t|�}tjj|��r�|jj|�n:|\}}x0|D](}t|�}tjj|��r�|jj|��q�W�qHW|jj��r�|jd�}|jj|j��|jj��r|jd�}|jj|j��|jj��r.|jd
�}|jj|j��dS)a9Add all the default files to self.filelist:
          - README or README.txt
          - setup.py
          - test/test*.py
          - all pure Python modules mentioned in setup script
          - all files pointed by package_data (build_py)
          - all files defined in data_files.
          - all files defined as scripts.
          - all C sources listed as part of extensions or C libraries
            in the setup script (doesn't catch C headers!)
        Warns if (README or README.txt) or setup.py are missing; everything
        else is optional.
        �README�
README.txtFTz,standard file not found: should have one of z, zstandard file '%s' not foundz
test/test*.pyz	setup.cfg�build_py�	build_ext�
build_clib�
build_scriptsN)r^r_)rRZscript_name�
isinstance�tuplerTrU�existsrMrr�join�filterrVr�extend�get_finalized_commandZhas_pure_modulesZget_source_filesZ
data_filesZhas_data_files�strr
Zhas_ext_modulesZhas_c_librariesZhas_scripts)rZ	standards�fnZaltsZgot_itZoptional�pattern�filesr`ZpkgZsrc_dirZ	build_dir�	filenames�filename�item�dirnamer/rarbrcrrrrZ�s\






"



zsdist.add_defaultscCs�tjd|j�t|jddddddd�}zlxf|j�}|dkr<Py|jj|�Wq*ttfk
r�}z|j	d|j
|j|f�WYdd}~Xq*Xq*WWd|j�XdS)z�Read and parse manifest template file named by self.template.

        (usually "MANIFEST.in") The parsing and processing is done by
        'self.filelist', which updates itself accordingly.
        zreading manifest template '%s'rA)Zstrip_commentsZskip_blanksZ
join_linesZ	lstrip_wsZ	rstrip_wsZ
collapse_joinNz%s, line %d: %s)
r�inforBr
�readlinerMZprocess_template_lineZDistutilsTemplateError�
ValueErrorrrpZcurrent_line�close)rrB�line�msgrrrr[s 

$zsdist.read_templatecCs�|jd�}|jj�}|jjd|jd�|jjd|d�tjdkrFd}nd}ddd	d
ddd
g}d|dj|�|f}|jj|dd�dS)avPrune off branches that might slip into the file list as created
        by 'read_template()', but really don't belong there:
          * the build tree (typically "build")
          * the release tree itself (only an issue if we ran "sdist"
            previously with --keep-temp, or it aborted)
          * any RCS, CVS, .svn, .hg, .git, .bzr, _darcs directories
        �buildN)�prefixZwin32z/|\\�/ZRCSZCVSz\.svnz\.hgz\.gitz\.bzrZ_darcsz(^|%s)(%s)(%s).*�|rA)Zis_regex)	rjrR�get_fullnamerMZexclude_patternZ
build_base�sys�platformrg)rry�base_dirZsepsZvcs_dirsZvcs_ptrnrrrr\:s


zsdist.prune_file_listcCsX|j�rtjd|j�dS|jjdd�}|jdd�|jtj	|j|fd|j�dS)z�Write the file list in 'self.filelist' (presumably as filled in
        by 'add_defaults()' and 'read_template()') to the manifest file
        named by 'self.manifest'.
        z5not writing to manually maintained manifest file '%s'Nrz*# file GENERATED by distutils, do NOT editzwriting manifest file '%s')
rWrrsrCrMrn�insertZexecuterZ
write_file)rZcontentrrrr]Rs
zsdist.write_manifestc
Cs<tjj|j�sdSt|j�}z|j�}Wd|j�X|dkS)NFz+# file GENERATED by distutils, do NOT edit
)rTrUrVrC�openrtrv)r�fpZ
first_linerrrrWas

z sdist._manifest_is_not_generatedcCsXtjd|j�t|j�}x2|D]*}|j�}|jd�s|r<q|jj|�qW|j�dS)z�Read the manifest file (named by 'self.manifest') and use it to
        fill in 'self.filelist', the list of files to include in the source
        distribution.
        zreading manifest file '%s'�#N)	rrsrCr��strip�
startswithrMrrv)rrCrwrrrrXms

zsdist.read_manifestcCs�|j|�tj|||jd�ttd�r4d}d|}nd}d|}|sPtjd�n
tj|�xD|D]<}tj	j
|�s~tjd|�q`tj	j||�}|j|||d	�q`W|j
jj|�dS)
a�Create the directory tree that will become the source
        distribution archive.  All directories implied by the filenames in
        'files' are created under 'base_dir', and then we hard link or copy
        (if hard linking is unavailable) those files into place.
        Essentially, this duplicates the developer's source tree, but in a
        directory named after the distribution, containing only the files
        to be distributed.
        )�dry_run�linkZhardzmaking hard links in %s...Nzcopying files to %s...z)no files to distribute -- empty manifest?z#'%s' not a regular file -- skipping)r�)ZmkpathrZcreate_treer��hasattrrTrrrsrUrVrgZ	copy_filerRZmetadataZwrite_pkg_info)rr�rnr�rx�file�destrrr�make_release_tree|s 
	



zsdist.make_release_treecCs�|jj�}tjj|j|�}|j||jj�g}d|j	krT|j	j
|j	j|j	jd���xD|j	D]:}|j
||||j|jd�}|j
|�|jjj
dd|f�q\W||_|js�tj||jd�dS)a�Create the source distribution(s).  First, we create the release
        tree with 'make_release_tree()'; then, we create all required
        archive files (according to 'self.formats') from the release tree.
        Finally, we clean up by blowing away the release tree (unless
        'self.keep_temp' is true).  The list of archive files created is
        stored so it can be retrieved later by 'get_archive_files()'.
        Ztar)r�rIrJr�)r�N)rRr}rTrUrgrGr�rMrnrr�pop�indexZmake_archiverIrJZ
dist_filesrHrFrZremove_treer�)rr�Z	base_namerHZfmtr�rrrrO�s




zsdist.make_distributioncCs|jS)zzReturn the list of archive files created when the command
        was run, or None if the command hasn't run yet.
        )rH)rrrr�get_archive_files�szsdist.get_archive_files)rrr)r r!r")r#Nr$)r%Nr&)r'Nr()r)Nr*)r+r,r-)r.r/r0)r1Nr2�@keep the distribution tree around after creating archive file(s))r3r4r�)r5r6r7)r8Nr9)r:r;r<)r=r>r?)�__name__�
__module__�__qualname__ZdescriptionrZuser_optionsZboolean_optionsrZhelp_optionsZnegative_optZsub_commandsrKrLrPrSrNrZr[r\r]rWrXr�rOr�rrrrr!sj

(P*r)�__doc__rTr~�typesr�warningsrZdistutils.corerZ	distutilsrrrr	Zdistutils.text_filer
Zdistutils.errorsZdistutils.filelistrrZdistutils.utilr
rrrrrr�<module>sPKV[$3�Y		9command/__pycache__/install_egg_info.cpython-36.opt-2.pycnu�[���3


 \+
�@s`ddlmZddlmZmZddlZddlZddlZGdd�de�Zdd�Z	dd	�Z
d
d�ZdS)�)�Command)�log�dir_utilNc@s6eZdZdZdgZdd�Zdd�Zd	d
�Zdd�Zd
S)�install_egg_infoz8Install package's PKG-INFO metadata as an .egg-info file�install-dir=�d�directory to install tocCs
d|_dS)N)�install_dir)�self�r�:/usr/lib64/python3.6/distutils/command/install_egg_info.py�initialize_optionssz#install_egg_info.initialize_optionscCsb|jdd�dtt|jj���tt|jj���ftjdd��}t	j
j|j|�|_
|j
g|_dS)NZinstall_libr	z%s-%s-py%d.%d.egg-info�)r	r	)Zset_undefined_options�to_filename�	safe_name�distributionZget_name�safe_versionZget_version�sys�version_info�os�path�joinr	�target�outputs)r
�basenamerrr�finalize_optionssz!install_egg_info.finalize_optionsc	Cs�|j}tjj|�r2tjj|�r2tj||jd�nNtjj|�rX|j	tj
|jfd|�n(tjj|j�s�|j	tj|jfd|j�t
jd|�|js�t|ddd��}|jjj|�WdQRXdS)N)�dry_runz	Removing z	Creating z
Writing %s�wzUTF-8)�encoding)rrr�isdir�islinkrZremove_treer�existsZexecute�unlinkr	�makedirsr�info�openrZmetadataZwrite_pkg_file)r
r�frrr�run szinstall_egg_info.runcCs|jS)N)r)r
rrr�get_outputs.szinstall_egg_info.get_outputsN)rrr)	�__name__�
__module__�__qualname__ZdescriptionZuser_optionsr
rr'r(rrrrrs
rcCstjdd|�S)Nz[^A-Za-z0-9.]+�-)�re�sub)�namerrrr6srcCs|jdd�}tjdd|�S)N� �.z[^A-Za-z0-9.]+r,)�replacer-r.)�versionrrrr>srcCs|jdd�S)Nr,�_)r2)r/rrrrHsr)Z
distutils.cmdrZ	distutilsrrrrr-rrrrrrrr�<module>s+
PKV[`�"H��-command/__pycache__/bdist_dumb.cpython-36.pycnu�[���3


 \1�@shdZddlZddlmZddlmZddlmZmZddl	Tddl
mZddlm
Z
Gd	d
�d
e�ZdS)z�distutils.command.bdist_dumb

Implements the Distutils 'bdist_dumb' command (create a "dumb" built
distribution -- i.e., just an archive to be unpacked under $prefix or
$exec_prefix).�N)�Command)�get_platform)�remove_tree�ensure_relative)�*)�get_python_version)�logc@s^eZdZdZd%ddde�fd&d(d)d*d+d,d-g	ZdddgZddd�Zdd �Zd!d"�Z	d#d$�Z
dS).�
bdist_dumbz"create a "dumb" built distribution�
bdist-dir=�d�1temporary directory for creating the distributionz
plat-name=�pz;platform name to embed in generated filenames (default: %s)�format=�f�>archive format to create (tar, gztar, bztar, xztar, ztar, zip)�	keep-temp�kz/keep the pseudo-installation tree around after z!creating the distribution archive�	dist-dir=�-directory to put final built distributions in�
skip-buildN�2skip rebuilding everything (for testing/debugging)�relative�7build the archive using relative paths (default: false)�owner=�u�@Owner name used when creating a tar file [default: current user]�group=�g�AGroup name used when creating a tar file [default: current group]Zgztar�zip)�posix�ntcCs:d|_d|_d|_d|_d|_d|_d|_d|_d|_dS)Nr)	�	bdist_dir�	plat_name�format�	keep_temp�dist_dir�
skip_buildr�owner�group)�self�r+�4/usr/lib64/python3.6/distutils/command/bdist_dumb.py�initialize_options2szbdist_dumb.initialize_optionscCsz|jdkr&|jd�j}tjj|d�|_|jdkrfy|jtj|_Wn"t	k
rdt
dtj��YnX|jdddd	�dS)
NZbdistZdumbz@don't know how to create dumb built distributions on platform %sr&r#r')r&r&)r#r#)r'r')r"Zget_finalized_command�
bdist_base�os�path�joinr$�default_format�name�KeyError�DistutilsPlatformErrorZset_undefined_options)r*r.r+r+r,�finalize_options=s

zbdist_dumb.finalize_optionscCs(|js|jd�|jddd�}|j|_|j|_d|_tjd|j�|jd�d|jj	�|j
f}tjj
|j|�}|js~|j}nJ|jj�r�|j|jkr�tdt|j�t|j�f��ntjj
|jt|j��}|j||j||j|jd	�}|jj�r�t�}nd
}|jjjd||f�|j�s$t|j|jd�dS)
NZbuild�install�)Zreinit_subcommandsrzinstalling to %sz%s.%szScan't make a dumb built distribution where base and platbase are different (%s, %s))Zroot_dirr(r)�anyr	)�dry_run) r'Zrun_commandZreinitialize_commandr"�rootZwarn_dirr�infoZdistributionZget_fullnamer#r/r0r1r&rZhas_ext_modulesZinstall_baseZinstall_platbaser5�reprrZmake_archiver$r(r)rZ
dist_files�appendr%rr:)r*r7Zarchive_basenameZpseudoinstall_rootZarchive_root�filenameZ	pyversionr+r+r,�runOs>






zbdist_dumb.run)r
rr)rrr�Pkeep the pseudo-installation tree around after creating the distribution archive)rrrA)rrr)rNr)rNr)rrr)rrr)�__name__�
__module__�__qualname__ZdescriptionrZuser_optionsZboolean_optionsr2r-r6r@r+r+r+r,r	s6
r	)�__doc__r/Zdistutils.corerZdistutils.utilrZdistutils.dir_utilrrZdistutils.errorsZdistutils.sysconfigrZ	distutilsrr	r+r+r+r,�<module>sPKV[�k!H�1�12command/__pycache__/bdist_rpm.cpython-36.opt-2.pycnu�[���3


 \�T�@s|ddlZddlZddlZddlmZddlmZddlmZddl	m
Z
ddlTddlm
Z
ddlmZGd	d
�d
e�ZdS)�N)�Command)�DEBUG)�get_platform)�
write_file)�*)�get_python_version)�logc+@s�eZdZdZdgdhdidjdkdldmdndodpdqdrdsdtdudvdwdxdydzd{d|d}d~dd�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�g)Zd4d9d=d2dUgZd4d9d=dX�ZdYdZ�Zd[d\�Zd]d^�Z	d_d`�Z
dadb�Zdcdd�Zdedf�Z
dS)��	bdist_rpmzcreate an RPM distribution�bdist-base=N�/base directory for creating built distributions�	rpm-base=�dbase directory for creating RPMs (defaults to "rpm" under --bdist-base; must be specified for RPM 2)�	dist-dir=�d�Ddirectory to put final RPM files in (and .spec files if --spec-only)�python=�Mpath to Python interpreter to hard-code in the .spec file (default: "python")�
fix-python�Lhard-code the exact path to the current Python interpreter in the .spec file�	spec-only�only regenerate spec file�source-only�only generate source RPM�binary-only�only generate binary RPM�	use-bzip2�7use bzip2 instead of gzip to create source distribution�distribution-name=�gname of the (Linux) distribution to which this RPM applies (*not* the name of the module distribution!)�group=�9package classification [default: "Development/Libraries"]�release=�RPM release number�serial=�RPM serial number�vendor=�aRPM "vendor" (eg. "Joe Blow <joe@example.com>") [default: maintainer or author from setup script]�	packager=�BRPM packager (eg. "Jane Doe <jane@example.net>") [default: vendor]�
doc-files=�6list of documentation files (space or comma-separated)�
changelog=�
RPM changelog�icon=�name of icon file�	provides=�%capabilities provided by this package�	requires=�%capabilities required by this package�
conflicts=�-capabilities which conflict with this package�build-requires=�+capabilities required to build this package�
obsoletes=�*capabilities made obsolete by this package�
no-autoreq�+do not automatically calculate dependencies�	keep-temp�k�"don't clean up RPM build directory�no-keep-temp�&clean up RPM build directory [default]�use-rpm-opt-flags�8compile with RPM_OPT_FLAGS when building from source RPM�no-rpm-opt-flags�&do not pass any RPM CFLAGS to compiler�	rpm3-mode�"RPM 3 compatibility mode (default)�	rpm2-mode�RPM 2 compatibility mode�prep-script=�3Specify a script for the PREP phase of RPM building�
build-script=�4Specify a script for the BUILD phase of RPM building�pre-install=�:Specify a script for the pre-INSTALL phase of RPM building�install-script=�6Specify a script for the INSTALL phase of RPM building�
post-install=�;Specify a script for the post-INSTALL phase of RPM building�pre-uninstall=�<Specify a script for the pre-UNINSTALL phase of RPM building�post-uninstall=�=Specify a script for the post-UNINSTALL phase of RPM building�
clean-script=�4Specify a script for the CLEAN phase of RPM building�verify-script=�6Specify a script for the VERIFY phase of the RPM build�force-arch=�0Force an architecture onto the RPM build process�quiet�q�3Run the INSTALL phase of RPM building in quiet mode)zno-keep-tempzno-rpm-opt-flagsz	rpm2-modecCs�d|_d|_d|_d|_d|_d|_d|_d|_d|_d|_	d|_
d|_d|_d|_
d|_d|_d|_d|_d|_d|_d|_d|_d|_d|_d|_d|_d|_d|_d|_d|_d|_d|_d|_ d|_!d|_"d|_#d|_$d|_%d|_&dS)Nr�)'�
bdist_base�rpm_base�dist_dir�python�
fix_python�	spec_only�binary_only�source_only�	use_bzip2�distribution_name�group�release�serial�vendor�packager�	doc_files�	changelog�icon�prep_script�build_script�install_script�clean_script�
verify_script�pre_install�post_install�
pre_uninstall�post_uninstall�prep�provides�requires�	conflicts�build_requires�	obsoletes�	keep_temp�use_rpm_opt_flags�	rpm3_mode�
no_autoreq�
force_archr\)�self�r��3/usr/lib64/python3.6/distutils/command/bdist_rpm.py�initialize_options�sNzbdist_rpm.initialize_optionscCs�|jdd�|jdkr6|js$td��tjj|jd�|_|jdkrX|j	rPt
j|_qfd|_n|j	rftd��tjdkr~t
dtj��|jr�|jr�td	��|jj�s�d
|_|jdd
�|j�dS)NZbdistr`z)you must specify --rpm-base in RPM 2 mode�rpmZpython3z8--python and --fix-python are mutually exclusive options�posixz9don't know how to create RPM distributions on platform %sz6cannot supply both '--source-only' and '--binary-only'rrb)r`r`)rbrb)Zset_undefined_optionsrar�ZDistutilsOptionError�os�path�joinr`rcrd�sys�
executable�nameZDistutilsPlatformErrorrfrg�distribution�has_ext_modulesr��finalize_package_data)r�r�r�r��finalize_options�s.





zbdist_rpm.finalize_optionscCsX|jdd�|jdd|jj�|jj�f�|jd�|jd�t|jt�r|x.dD]&}tj	j
|�rR||jkrR|jj|�qRW|jd	d
�|jd�|jd�|jd
�|j|j
�|_
|jd�|jd�|jd�|jd�|jd�|jd�|jd�|jd�|jd�|jd�|jd�|jd�|jd�|jd�|jd�|jd�dS)NrjzDevelopment/Librariesrmz%s <%s>rnro�README�
README.txtrk�1rlrirprqrrrsrtrurvrwrxryrzr|r}r~rr�r�)r�r�)Z
ensure_stringr�Zget_contactZget_contact_emailZensure_string_list�
isinstancero�listr�r��exists�append�_format_changelogrpZensure_filename)r�Zreadmer�r�r�r��s>





















zbdist_rpm.finalize_package_datac
Cs�tr<td�td|j�td|j�td|j�td|j�|jrT|j}|j|�n<i}x.d(D]&}t	j
j|j|�||<|j||�q^W|d}t	j
j|d|j
j��}|jt||j�fd|�|jr�dS|j
jdd�}|jd
�}|j�r�dg|_ndg|_|jd
�||j
_|j�d}|d}|j||�|j�rht	j
j|j��rZ|j|j|�ntd|j��tjd�dg}	t	j
jd��s�t	j
jd��r�dg}	|j�r�|	jd�n|j �r�|	jd�n
|	jd�|	j!dd|j"g�|j#�r|	j!ddt	j
j$|j�g�|j%�s|	jd�|j&�r(|	jd�|	j|�d}
|
d }d!|
d"}d#|||f}
t	j'|
�}zng}d}xB|j(�}|�s~P|j)�j*�}|j|d$�|dk�rn|d}�qnW|j+�}|�r�t,d%t-|
���Wd|j+�X|j.|	�|j/�s�|j
j0��rt1�}nd&}|j �sRt	j
j|d
|�}|j2||j�t	j
j|j|�}|j
jjd'||f�|j�s�xh|D]`}t	j
j|d	|�}t	j
j|��r`|j2||j�t	j
j|jt	j
j3|��}|j
jjd'||f��q`WdS))Nzbefore _get_package_data():zvendor =z
packager =zdoc_files =zchangelog =�SOURCES�SPECS�BUILD�RPMS�SRPMSz%s.speczwriting '%s'�sdistZbztarZgztarrzicon file '%s' does not existz
building RPMsr�z/usr/bin/rpmbuildz
/bin/rpmbuildZrpmbuildz-bsz-bbz-baz--definez__python %sz
_topdir %sz--cleanz--quietz%{name}-%{version}-%{release}z.src.rpmz%{arch}/z.%{arch}.rpmz%rpm -q --qf '%s %s\n' --specfile '%s'r_zFailed to execute: %s�anyr	)r�r�r�r�r�)4r�printrmrnrorprerbZmkpathr�r�r�rar��get_nameZexecuter�_make_spec_fileZ
dist_filesZreinitialize_commandrhZformatsZrun_commandZget_archive_filesZ	copy_filerqr�ZDistutilsFileErrorr�inforgr�rf�extendrcr��abspathr�r\�popen�readline�strip�split�closeZDistutilsExecError�reprZspawnZdry_runr�rZ	move_file�basename)r�Zspec_dirZrpm_dirrZ	spec_pathZsaved_dist_filesr��sourceZ
source_dirZrpm_cmdZ
nvr_stringZsrc_rpmZnon_src_rpmZq_cmd�outZbinary_rpmsZ
source_rpm�line�lZstatusZ	pyversionZsrpm�filenamer�r�r�r��runs�















z
bdist_rpm.runcCstjj|jtjj|��S)N)r�r�r�rbr�)r�r�r�r�r��
_dist_path�szbdist_rpm._dist_pathcCsDd|jj�d|jj�jdd�d|jj�d|jjdd�dd|jj�g}tjd	�}d
jdd�|j	�D��}d
}d}|j||�}||kr�|j
d�|j
d|d
�|jdddg�|jr�|j
d�n
|j
d�|jd|jj
�d|jddg�|j�s|jj��s&|j
d�n|j
d|j�x^dJD]V}t||j��}t|t��rd|j
d"|d#j|�f�n|dk	�r,|j
d"||f��q,W|jj�d$k�r�|j
d%|jj��|j�r�|j
d&|j�|j�r�|j
d'd#j|j��|j�r|j
d(tjj|j��|j�r|j
d)�|jdd*|jj�g�d+|jtjjtj d,�f}d-|}	|j!�r\d.|	}	d/|}
dKd3d4|	fd5d6|
fdLdMdNdOdPdQg	}xh|D]`\}}
}t||
�}|�s�|�r�|jddD|g�|�r�|jt"|dE�j#�j$d
��n
|j
|��q�W|jddFdGg�|j%�r|j
dHd#j|j%��|j&�r@|jddIg�|j|j&�|S)RNz
%define name z%define version �-�_z%define unmangled_version z%define release �z	Summary: zrpm --eval %{__os_install_post}�
cSsg|]}d|j��qS)z  %s \)r�)�.0r�r�r�r��
<listcomp>�sz-bdist_rpm._make_spec_file.<locals>.<listcomp>zbrp-python-bytecompile \
z%brp-python-bytecompile %{__python} \
z2# Workaround for http://bugs.python.org/issue14443z%define __os_install_post z
Name: %{name}zVersion: %{version}zRelease: %{release}z-Source0: %{name}-%{unmangled_version}.tar.bz2z,Source0: %{name}-%{unmangled_version}.tar.gzz	License: zGroup: z>BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildrootzPrefix: %{_prefix}zBuildArch: noarchz
BuildArch: %s�Vendor�Packager�Provides�Requires�	Conflicts�	Obsoletesz%s: %s� ZUNKNOWNzUrl: zDistribution: zBuildRequires: zIcon: z
AutoReq: 0z%descriptionz%s %srz%s buildzenv CFLAGS="$RPM_OPT_FLAGS" z>%s install -O1 --root=$RPM_BUILD_ROOT --record=INSTALLED_FILESr{rr�&%setup -n %{name}-%{unmangled_version}ZbuildrsZinstallrt�cleanru�rm -rf $RPM_BUILD_ROOT�verifyscriptrv�prerw�postrx�preunry�postunrz�%�rz%files -f INSTALLED_FILESz%defattr(-,root,root)z%doc z
%changelog)r�r�r�r�r�r�)r{rrr�)r�rur�)r�rvN)r�rwN)r�rxN)r�ryN)r�rzN)'r�r�Zget_version�replacerkZget_description�
subprocessZ	getoutputr��
splitlinesr�r�rhZget_licenserjr�r��getattr�lowerr�r�Zget_urlrirrqr�r�r�r�Zget_long_descriptionrcr��argvr��open�readr�rorp)r�Z	spec_fileZvendor_hookZproblemZfixedZ
fixed_hookZfield�valZdef_setup_callZ	def_buildZinstall_cmdZscript_optionsZrpm_opt�attr�defaultr�r�r�r��s�


	



zbdist_rpm._make_spec_filecCs�|s|Sg}x`|j�jd�D]N}|j�}|ddkrD|jd|g�q|ddkr\|j|�q|jd|�qW|ds||d=|S)Nr�rrr�r�z  )r�r�r�r�)r�rpZ
new_changelogr�r�r�r�r�3szbdist_rpm._format_changelog)r
Nr)rNr
)rrr)rNr)rNr)rNr)rNr)rNr)rNr)rNr)rNr )r!Nr")r#Nr$)r%Nr&)r'Nr()r)Nr*)r+Nr,)r-Nr.)r/Nr0)r1Nr2)r3Nr4)r5Nr6)r7Nr8)r9Nr:)r;r<r=)r>Nr?)r@NrA)rBNrC)rDNrE)rFNrG)rHNrI)rJNrK)rLNrM)rNNrO)rPNrQ)rRNrS)rTNrU)rVNrW)rXNrY)rZNr[)r\r]r^)�__name__�
__module__�__qualname__ZdescriptionZuser_optionsZboolean_optionsZnegative_optr�r�r�r�r�r�r�r�r�r�r�r	s�--)r	)r�r�r�Zdistutils.corerZdistutils.debugrZdistutils.utilrZdistutils.file_utilrZdistutils.errorsZdistutils.sysconfigrZ	distutilsrr	r�r�r�r��<module>sPKV[[' �@�@,command/__pycache__/build_ext.cpython-36.pycnu�[���3


 \�z�@s�dZddlZddlZddlZddlZddlmZddlTddlm	Z	m
Z
ddlmZddlm
Z
ddlmZdd	lmZdd
lmZddlmZejd�Zd
d�ZGdd�de�ZdS)z�distutils.command.build_ext

Implements the Distutils 'build_ext' command, for building extension
modules (currently limited to C extensions, should accommodate C++
extensions ASAP).�N)�Command)�*)�customize_compiler�get_python_version)�get_config_h_filename)�newer_group)�	Extension)�get_platform)�log)�	USER_BASEz3^[a-zA-Z_][a-zA-Z_0-9]*(\.[a-zA-Z_][a-zA-Z_0-9]*)*$cCsddlm}|�dS)Nr)�show_compilers)�distutils.ccompilerr)r�r�3/usr/lib64/python3.6/distutils/command/build_ext.pyrsrc@seZdZdZdejZd`dad	d
de�fdcdddefdddedfdddefdgdhdidjdkdldmdndodpgZdd%d(d1d8gZ	d:d2d;e
fgZd<d=�Zd>d?�Z
d@dA�ZdBdC�ZdDdE�ZdFdG�ZdHdI�ZdJdK�ZdLdM�ZejdNdO��ZdPdQ�ZdRdS�ZdTdU�ZdVdW�ZdXdY�ZdZd[�Zd\d]�Zd^d_�Zd2S)q�	build_extz8build C/C++ extensions (compile/link to build directory)z (separated by '%s')�
build-lib=�b�(directory for compiled extension modules�build-temp=�t�1directory for temporary files (build by-products)z
plat-name=�pz>platform name to cross-compile for, if supported (default: %s)�inplace�iz=ignore build-lib and put compiled extensions into the source z,directory alongside your pure Python modulesz
include-dirs=�Iz.list of directories to search for header files�define=�D�C preprocessor macros to define�undef=�U�!C preprocessor macros to undefine�
libraries=�l�!external C libraries to link withz
library-dirs=�Lz.directories to search for external C libraries�rpath=�R�7directories to search for shared C libraries at runtime�
link-objects=�O�2extra explicit link objects to include in the link�debug�g�'compile/link with debugging information�force�f�2forcibly build everything (ignore file timestamps)�	compiler=�c�specify the compiler type�	parallel=�j�number of parallel build jobs�swig-cppN�)make SWIG create C++ files (default is C)�
swig-opts=�!list of SWIG command line options�swig=�path to the SWIG executable�user�#add user include, library and rpathz
help-compilerzlist available compilerscCs�d|_d|_d|_d|_d|_d|_d|_d|_d|_d|_	d|_
d|_d|_d|_
d|_d|_d|_d|_d|_d|_d|_dS)Nr)�
extensions�	build_lib�	plat_name�
build_tempr�package�include_dirs�define�undef�	libraries�library_dirs�rpath�link_objectsr+r.�compiler�swig�swig_cpp�	swig_optsr=�parallel)�selfrrr�initialize_optionsjs*zbuild_ext.initialize_optionsc
Cs�ddlm}|jdd'd(d)d*d+d,d-�|jdkr8|jj|_|jj|_|j�}|jdd�}|j	dkrn|jj	pjg|_	t
|j	t�r�|j	jt
j�|_	tjtjkr�|j	jt
jjtjd
��|j	j|�||kr�|j	j|�|jd�|jd�|jdk�r�g|_|jdk�rg|_nt
|jt��r&|jjt
j�|_|jdk�r:g|_nt
|jt��rX|jjt
j�|_t
jdk�rT|jjt
jjtjd��tjtjk�r�|jjt
jjtjd��|j�r�t
jj|jd�|_nt
jj|jd�|_|j	jt
jjt���ttdd�}|�r|jj|�|j dk�rd}n|j dd�}t
jjtjd�}|�rHt
jj||�}|jj|�tj!dd�dk�s|tj!dd�dk�r�tj"j#t
jjtjd���r�|jjt
jjtjddt$�d��n|jjd�|j%d ��r�|j&�s�|jj|j%d!��n|jjd�|j'�r|j'jd"�}d#d$�|D�|_'|j(�r4|j(jd"�|_(|j)dk�rHg|_)n|j)jd%�|_)|j*�r�t
jjt+d
�}t
jjt+d�}	t
jj,|��r�|j	j|�t
jj,|	��r�|jj|	�|jj|	�t
|j-t��r�yt.|j-�|_-Wnt/k
�r�t0d&��YnXdS).Nr)�	sysconfigZbuildr@rBrKr+r.rOrA�)Z
plat_specific�includerGrJ�ntZlibsZDebugZRelease�_home�win32�ZPCbuild��cygwin�atheos�bin�lib�python�config�.�Py_ENABLE_SHARED�LIBDIR�,cSsg|]}|df�qS)�1r)�.0Zsymbolrrr�
<listcomp>�sz.build_ext.finalize_options.<locals>.<listcomp>� zparallel should be an integer)r@r@)rBrB)rKrK)r+r+)r.r.)rOrO)rArA)1�	distutilsrRZset_undefined_optionsrC�distributionZext_packageZext_modulesr?Zget_python_incrD�
isinstance�str�split�os�pathsep�sys�exec_prefix�base_exec_prefix�append�path�joinZensure_string_listrGrHrI�name�prefixr+rB�dirnamer�getattrrA�platform�
executable�
startswithr�get_config_varZpython_buildrErFrNr=r�isdirrO�int�
ValueErrorZDistutilsOptionError)
rPrRZ
py_includeZplat_py_include�	_sys_home�suffixZnew_libZdefinesZuser_includeZuser_librrr�finalize_options�s�





(
zbuild_ext.finalize_optionscCstddlm}|jsdS|jj�rL|jd�}|jj|j�p:g�|j	j
|j�||j|j
|j|jd�|_t|j�tjdkr�|jt�kr�|jj|j�|jdk	r�|jj|j�|jdk	r�x |jD]\}}|jj||�q�W|jdk	�rx|jD]}|jj|�q�W|jdk	�r|jj|j�|j	dk	�r4|jj|j	�|jdk	�rN|jj|j�|j dk	�rh|jj!|j �|j"�dS)Nr)�new_compiler�
build_clib)rK�verbose�dry_runr.rU)#r
r�r?riZhas_c_libraries�get_finalized_commandrG�extendZget_library_namesrHrrr�rKr�r�r.rrmrurAr	Z
initializerDZset_include_dirsrEZdefine_macrorFZundefine_macroZ
set_librariesZset_library_dirsrIZset_runtime_library_dirsrJZset_link_objects�build_extensions)rPr�r�ru�value�macrorrr�runs>




z
build_ext.runc
Cs�t|t�std���xnt|�D�]`\}}t|t�r4qt|t�sLt|�dkrTtd��|\}}tjd|�t|t	�ozt
j|�s�td��t|t�s�td��t||d�}x*dD]"}|j
|�}|dk	r�t|||�q�W|j
d�|_d|k�r�tjd�|j
d�}|�rxg|_g|_xj|D]b}	t|	t��o,t|	�dk�s8td��t|	�dk�rX|jj|	d�nt|	�dk�r|jj|	��qW|||<qWdS)a�Ensure that the list of extensions (presumably provided as a
        command option 'extensions') is valid, i.e. it is a list of
        Extension objects.  We also support the old-style list of 2-tuples,
        where the tuples are (ext_name, build_info), which are converted to
        Extension instances here.

        Raise DistutilsSetupError if the structure is invalid anywhere;
        just returns otherwise.
        z:'ext_modules' option must be a list of Extension instances�zMeach element of 'ext_modules' option must be an Extension instance or 2-tuplezvold-style (ext_name, build_info) tuple found in ext_modules for extension '%s' -- please convert to Extension instancezRfirst element of each tuple in 'ext_modules' must be the extension name (a string)zOsecond element of each tuple in 'ext_modules' must be a dictionary (build info)�sourcesrDrHrG�
extra_objects�extra_compile_args�extra_link_argsNrIZdef_filez9'def_file' element of build info dict no longer supported�macrosrSz9'macros' element of build info dict must be 1- or 2-tupler)rDrHrGr�r�r�)rSr�)rj�list�DistutilsSetupError�	enumerater�tuple�lenr
�warnrk�extension_name_re�match�dict�get�setattr�runtime_library_dirs�
define_macros�undef_macrosrr)
rPr?r�ext�ext_nameZ
build_info�key�valr�r�rrr�check_extensions_listUsT










zbuild_ext.check_extensions_listcCs0|j|j�g}x|jD]}|j|j�qW|S)N)r�r?r�r�)rP�	filenamesr�rrr�get_source_files�s
zbuild_ext.get_source_filescCs6|j|j�g}x |jD]}|j|j|j��qW|S)N)r�r?rr�get_ext_fullpathru)rPZoutputsr�rrr�get_outputs�s
zbuild_ext.get_outputscCs(|j|j�|jr|j�n|j�dS)N)r�r?rO�_build_extensions_parallel�_build_extensions_serial)rPrrrr��s
zbuild_ext.build_extensionscs��j}�jdkrtj�}yddlm}Wntk
r@d}YnX|dkrV�j�dS||d��T���fdd��jD�}x6t�j|�D]&\}}�j	|��|j
�WdQRXq�WWdQRXdS)NTr)�ThreadPoolExecutor)Zmax_workerscsg|]}�j�j|��qSr)Zsubmit�build_extension)rer�)�executorrPrrrf�sz8build_ext._build_extensions_parallel.<locals>.<listcomp>)rOrm�	cpu_countZconcurrent.futuresr��ImportErrorr�r?�zip�_filter_build_errors�result)rPZworkersr�Zfuturesr�Zfutr)r�rPrr��s 


z$build_ext._build_extensions_parallelc
Cs4x.|jD]$}|j|��|j|�WdQRXqWdS)N)r?r�r�)rPr�rrrr��sz"build_ext._build_extensions_serialccsTy
dVWnDtttfk
rN}z"|js*�|jd|j|f�WYdd}~XnXdS)Nz"building extension "%s" failed: %s)ZCCompilerErrorZDistutilsErrorZCompileErrorZoptionalr�ru)rPr��errrr��s
zbuild_ext._filter_build_errorsc
CsX|j}|dkst|ttf�r,td|j��t|�}|j|j�}||j}|jpZt	||d�snt
jd|j�dSt
jd|j�|j
||�}|jp�g}|jdd�}x|jD]}|j|f�q�W|jj||j||j|j||jd�}|dd�|_|j�r|j|j�|j�p
g}|j�p|jj|�}	|jj|||j|�|j|j||j |�|j|j|	d�
dS)Nzjin 'ext_modules' option (extension '%s'), 'sources' must be present and must be a list of source filenamesZnewerz$skipping '%s' extension (up-to-date)zbuilding '%s' extension)Z
output_dirr�rDr+�extra_postargs�depends)rGrHr�r��export_symbolsr+rBZtarget_lang)!r�rjr�r�r�rur�r�r.rr
r+�info�swig_sourcesr�r�r�rrrK�compilerBrDZ_built_objectsr�r�r��languageZdetect_languageZlink_shared_object�
get_librariesrHr��get_export_symbols)
rPr�r��ext_pathr�Z
extra_argsr�rFZobjectsr�rrrr��sN



zbuild_ext.build_extensioncCs2g}g}i}|jrtjd�|js6d|jks6d|jkr<d}nd}xX|D]P}tjj|�\}}	|	dkr�|j|d|�|j|�|d||<qF|j|�qFW|s�|S|jp�|j	�}
|
dg}|j
|j�|jr�|jd�|js�x|jD]}|j|�q�Wx8|D]0}||}
tjd	||
�|j|d
|
|g��q�W|S)z�Walk the list of source files in 'sources', looking for SWIG
        interface (.i) files.  Run SWIG on all that are found, and
        return a modified 'sources' list with SWIG source files replaced
        by the generated C (or C++) files.
        z/--swig-cpp is deprecated - use --swig-opts=-c++z-c++z.cppz.cz.i�_wraprSz-pythonzswigging %s to %sz-o���)
rMr
r�rNrmrs�splitextrrrL�	find_swigr�r�Zspawn)rPr��	extensionZnew_sourcesr�Zswig_targetsZ
target_ext�source�baser�rLZswig_cmd�o�targetrrrr�0s>





zbuild_ext.swig_sourcescCs`tjdkrdStjdkrNxBdD]&}tjjd|d�}tjj|�r|SqWdSntd	tj��d
S)z�Return the name of the SWIG executable.  On Unix, this is
        just "swig" -- it should be in the PATH.  Tries a bit harder on
        Windows.
        �posixrLrU�1.3�1.2�1.1z	c:\swig%szswig.exez>I don't know how to find (much less run) SWIG on platform '%s'N)r�r�r�)rmrursrt�isfileZDistutilsPlatformError)rPZvers�fnrrrr�fs


zbuild_ext.find_swigcCs�|j|�}|jd�}|j|d�}|jsRtjj|dd�|g�}tjj|j|�Sdj|dd��}|jd�}tjj	|j
|��}tjj||�S)	z�Returns the path of the filename for a given extension.

        The file is located in `build_lib` or directly in the package
        (inplace option).
        r`rSNr�build_pyr�r�r�)�get_ext_fullnamerl�get_ext_filenamerrmrsrtr@r��abspathZget_package_dir)rPr��fullnameZmodpath�filenamerCr�Zpackage_dirrrrr�~s


zbuild_ext.get_ext_fullpathcCs |jdkr|S|jd|SdS)zSReturns the fullname of a given extension name.

        Adds the `package.` prefixNr`)rC)rPr�rrrr��s
zbuild_ext.get_ext_fullnamecCs.ddlm}|jd�}|d�}tjj|�|S)z�Convert the name of an extension (eg. "foo.bar") into the name
        of the file from which it will be loaded (eg. "foo/bar.so", or
        "foo\bar.pyd").
        r)r|r`�
EXT_SUFFIX)�distutils.sysconfigr|rlrmrsrt)rPr�r|r�Z
ext_suffixrrrr��s
zbuild_ext.get_ext_filenamecCs0d|jjd�d}||jkr*|jj|�|jS)aReturn the list of symbols that a shared extension has to
        export.  This either uses 'ext.export_symbols' or, if it's not
        provided, "PyInit_" + module_name.  Only relevant on Windows, where
        the .pyd file (DLL) must export the module "PyInit_" function.
        ZPyInit_r`rSr�)rurlr�rr)rPr�Z
initfunc_namerrrr��s
zbuild_ext.get_export_symbolscCs�tjdkrfddlm}t|j|�s\d}|jr4|d}|tjd?tjd?d@f}|j|gS|jS�nRtjd	d
�dkr�d}|tjd?tjd?d@f}|j|gStjd	d
�d
k�r>ddl	m
}d}|tjd?tjd?d@f}g}xB|jd�j�D]0}|j
d��r|j|dd	��n
|j|��q�W|j|dg|Stjdk�rP|jStjd	d�dk�rj|jSddl	m
}|jd��r�djtjd?tjd?d@|jd��}|j|gS|jSd	S)z�Return the list of libraries to link against when building a
        shared extension.  On most platforms, this is just 'ext.libraries';
        on Windows, we add the Python library (eg. python20.dll).
        rWr)�MSVCCompilerz
python%d%dZ_d���NrYrZzpython%d.%dr[)rR�SHLIBSz-lr��m�darwin��aixraz
python{}.{}{}�ABIFLAGS)roryZdistutils._msvccompilerr�rjrKr+�
hexversionrGrhrRr|rlr{rr�format)rPr�r��templateZ	pythonlibrRZextrar]rrrr��sJ


zbuild_ext.get_libraries)rrr)rrr�iignore build-lib and put compiled extensions into the source directory alongside your pure Python modules)rrr�)rrr)rrr )r!r"r#)r%r&r')r(r)r*)r+r,r-)r.r/r0)r1r2r3)r4r5r6)r7Nr8)r9Nr:)r;Nr<)r=Nr>) �__name__�
__module__�__qualname__ZdescriptionrmrnZsep_byr	Zuser_optionsZboolean_optionsrZhelp_optionsrQr�r�r�r�r�r�r�r��
contextlib�contextmanagerr�r�r�r�r�r�r�r�r�rrrrr!s�

@N	
K6	
r)�__doc__r�rm�reroZdistutils.corerZdistutils.errorsr�rrrZdistutils.dep_utilrZdistutils.extensionrZdistutils.utilr	rhr
Zsiterr�r�rrrrrr�<module>s"PKV[p���&�&.command/__pycache__/sdist.cpython-36.opt-2.pycnu�[���3


 \�E�@s�ddlZddlZddlTddlmZddlmZddlmZddlm	Z	m
Z
mZmZddl
mZddlTddlmZdd	lmZdd
lmZdd�ZGd
d�de�ZdS)�N)�*)�glob)�warn)�Command)�dir_util�dep_util�	file_util�archive_util)�TextFile)�FileList)�log)�convert_pathcCsdddlm}ddlm}g}x,|j�D] }|jd|d||df�q&W|j�||�jd�dS)Nr)�FancyGetopt)�ARCHIVE_FORMATSzformats=�z.List of available source distribution formats:)Zdistutils.fancy_getoptrZdistutils.archive_utilr�keys�append�sortZ
print_help)rr�formats�format�r�//usr/lib64/python3.6/distutils/command/sdist.py�show_formatssrc@s�eZdZdZdd�ZdJdKdLdMdNdOdPdQdRdTdUdVdWdXgZd
ddddd"gZd*dd+efgZd
dd,�Z	d-efgZ
d.d/�Zd0d1�Zd2d3�Z
d4d5�Zd6d7�Zd8d9�Zd:d;�Zd<d=�Zd>d?�Zd@dA�ZdBdC�ZdDdE�ZdFdG�ZdHdI�ZdS)Y�sdistz6create a source distribution (tarball, zip file, etc.)cCs|jS)N)�metadata_check)�selfrrr�checking_metadata%szsdist.checking_metadata�	template=�t�5name of manifest template file [default: MANIFEST.in]�	manifest=�m�)name of manifest file [default: MANIFEST]�use-defaultsN�Rinclude the default file set in the manifest [default; disable with --no-defaults]�no-defaults�"don't include the default file set�prune��specifically exclude files/directories that should not be distributed (build tree, RCS/CVS dirs, etc.) [default; disable with --no-prune]�no-prune�$don't automatically exclude anything�
manifest-only�o�Ejust regenerate the manifest and then stop (implies --force-manifest)�force-manifest�f�kforcibly regenerate the manifest and carry on as usual. Deprecated: now the manifest is always regenerated.�formats=�6formats for source distribution (comma-separated list)�	keep-temp�kz1keep the distribution tree around after creating zarchive file(s)�	dist-dir=�d�Fdirectory to put the source distribution archive(s) in [default: dist]�metadata-check�[Ensure that all required elements of meta-data are supplied. Warn if any missing. [default]�owner=�u�@Owner name used when creating a tar file [default: current user]�group=�g�AGroup name used when creating a tar file [default: current group]zhelp-formatsz#list available distribution formats)zno-defaultszno-prune�checkcCsTd|_d|_d|_d|_d|_d|_dg|_d|_d|_d|_	d|_
d|_d|_dS)N�rZgztar)
�template�manifest�use_defaultsr'�
manifest_onlyZforce_manifestr�	keep_temp�dist_dir�
archive_filesr�owner�group)rrrr�initialize_options`szsdist.initialize_optionscCsZ|jdkrd|_|jdkr d|_|jd�tj|j�}|rFtd|��|jdkrVd|_dS)NZMANIFESTzMANIFEST.inrzunknown archive format '%s'Zdist)rCrBZensure_string_listr	Zcheck_archive_formatsrZDistutilsOptionErrorrG)rZ
bad_formatrrr�finalize_optionsws




zsdist.finalize_optionscCsBt�|_x|j�D]}|j|�qW|j�|jr6dS|j�dS)N)r�filelistZget_sub_commandsZrun_command�
get_file_listrE�make_distribution)rZcmd_namerrr�run�sz	sdist.runcCs*tdt�|jjd�}|j�|j�dS)Nzadistutils.command.sdist.check_metadata is deprecated,               use the check command insteadr@)r�PendingDeprecationWarning�distributionZget_command_objZensure_finalizedrP)rr@rrr�check_metadata�s
zsdist.check_metadatacCs�tjj|j�}|r<|j�r<|j�|jj�|jj�dS|sP|j	d|j�|jj
�|jrh|j�|rt|j
�|jr�|j�|jj�|jj�|j�dS)Nz&manifest template '%s' does not exist z(using default file list)z?manifest template '%s' does not exist (using default file list))�os�path�isfilerB�_manifest_is_not_generated�
read_manifestrMrZremove_duplicatesr�findallrD�add_defaults�
read_templater'�prune_file_list�write_manifest)rZtemplate_existsrrrrN�s(





zsdist.get_file_listcCs2d|jjg}x�|D]�}t|t�rn|}d}x*|D]"}tjj|�r.d}|jj|�Pq.W|s�|j	ddj
|��qtjj|�r�|jj|�q|j	d|�qWdd	g}x*|D]"}ttjjt
|��}|jj|�q�W|jd
�}|jj�r�|jj|j��x>|jD]4\}	}
}}x$|D]}
|jjtjj
|
|
���qW�q�W|jj��r�x||jjD]p}t|t��r|t|�}tjj|��r�|jj|�n:|\}}x0|D](}t|�}tjj|��r�|jj|��q�W�qHW|jj��r�|jd�}|jj|j��|jj��r|jd�}|jj|j��|jj��r.|jd
�}|jj|j��dS)N�README�
README.txtFTz,standard file not found: should have one of z, zstandard file '%s' not foundz
test/test*.pyz	setup.cfg�build_py�	build_ext�
build_clib�
build_scripts)r^r_)rRZscript_name�
isinstance�tuplerTrU�existsrMrr�join�filterrVr�extend�get_finalized_commandZhas_pure_modulesZget_source_filesZ
data_filesZhas_data_files�strr
Zhas_ext_modulesZhas_c_librariesZhas_scripts)rZ	standards�fnZaltsZgot_itZoptional�pattern�filesr`ZpkgZsrc_dirZ	build_dir�	filenames�filename�item�dirnamer/rarbrcrrrrZ�s\






"



zsdist.add_defaultscCs�tjd|j�t|jddddddd�}zlxf|j�}|dkr<Py|jj|�Wq*ttfk
r�}z|j	d|j
|j|f�WYdd}~Xq*Xq*WWd|j�XdS)Nzreading manifest template '%s'rA)Zstrip_commentsZskip_blanksZ
join_linesZ	lstrip_wsZ	rstrip_wsZ
collapse_joinz%s, line %d: %s)
r�inforBr
�readlinerMZprocess_template_lineZDistutilsTemplateError�
ValueErrorrrpZcurrent_line�close)rrB�line�msgrrrr[s 

$zsdist.read_templatecCs�|jd�}|jj�}|jjd|jd�|jjd|d�tjdkrFd}nd}dddd	d
ddg}d
|dj|�|f}|jj|dd�dS)N�build)�prefixZwin32z/|\\�/ZRCSZCVSz\.svnz\.hgz\.gitz\.bzrZ_darcsz(^|%s)(%s)(%s).*�|rA)Zis_regex)	rjrR�get_fullnamerMZexclude_patternZ
build_base�sys�platformrg)rry�base_dirZsepsZvcs_dirsZvcs_ptrnrrrr\:s


zsdist.prune_file_listcCsX|j�rtjd|j�dS|jjdd�}|jdd�|jtj	|j|fd|j�dS)Nz5not writing to manually maintained manifest file '%s'rz*# file GENERATED by distutils, do NOT editzwriting manifest file '%s')
rWrrsrCrMrn�insertZexecuterZ
write_file)rZcontentrrrr]Rs
zsdist.write_manifestc
Cs<tjj|j�sdSt|j�}z|j�}Wd|j�X|dkS)NFz+# file GENERATED by distutils, do NOT edit
)rTrUrVrC�openrtrv)r�fpZ
first_linerrrrWas

z sdist._manifest_is_not_generatedcCsXtjd|j�t|j�}x2|D]*}|j�}|jd�s|r<q|jj|�qW|j�dS)Nzreading manifest file '%s'�#)	rrsrCr��strip�
startswithrMrrv)rrCrwrrrrXms

zsdist.read_manifestcCs�|j|�tj|||jd�ttd�r4d}d|}nd}d|}|sPtjd�n
tj|�xD|D]<}tj	j
|�s~tjd|�q`tj	j||�}|j|||d�q`W|j
jj|�dS)	N)�dry_run�linkZhardzmaking hard links in %s...zcopying files to %s...z)no files to distribute -- empty manifest?z#'%s' not a regular file -- skipping)r�)ZmkpathrZcreate_treer��hasattrrTrrrsrUrVrgZ	copy_filerRZmetadataZwrite_pkg_info)rr�rnr�rx�file�destrrr�make_release_tree|s 
	



zsdist.make_release_treecCs�|jj�}tjj|j|�}|j||jj�g}d|j	krT|j	j
|j	j|j	jd���xD|j	D]:}|j
||||j|jd�}|j
|�|jjj
dd|f�q\W||_|js�tj||jd�dS)NZtar)r�rIrJr�)r�)rRr}rTrUrgrGr�rMrnrr�pop�indexZmake_archiverIrJZ
dist_filesrHrFrZremove_treer�)rr�Z	base_namerHZfmtr�rrrrO�s




zsdist.make_distributioncCs|jS)N)rH)rrrr�get_archive_files�szsdist.get_archive_files)rrr)r r!r")r#Nr$)r%Nr&)r'Nr()r)Nr*)r+r,r-)r.r/r0)r1Nr2�@keep the distribution tree around after creating archive file(s))r3r4r�)r5r6r7)r8Nr9)r:r;r<)r=r>r?)�__name__�
__module__�__qualname__ZdescriptionrZuser_optionsZboolean_optionsrZhelp_optionsZnegative_optZsub_commandsrKrLrPrSrNrZr[r\r]rWrXr�rOr�rrrrr!sj

(P*r)rTr~�typesr�warningsrZdistutils.corerZ	distutilsrrrr	Zdistutils.text_filer
Zdistutils.errorsZdistutils.filelistrrZdistutils.utilr
rrrrrr�<module>sPKV[�Sn��
�
3command/__pycache__/bdist_dumb.cpython-36.opt-2.pycnu�[���3


 \1�@sdddlZddlmZddlmZddlmZmZddlTddl	m
Z
ddlmZGdd	�d	e�Z
dS)
�N)�Command)�get_platform)�remove_tree�ensure_relative)�*)�get_python_version)�logc@s^eZdZdZd%ddde�fd&d(d)d*d+d,d-g	ZdddgZddd�Zdd �Zd!d"�Z	d#d$�Z
dS).�
bdist_dumbz"create a "dumb" built distribution�
bdist-dir=�d�1temporary directory for creating the distributionz
plat-name=�pz;platform name to embed in generated filenames (default: %s)�format=�f�>archive format to create (tar, gztar, bztar, xztar, ztar, zip)�	keep-temp�kz/keep the pseudo-installation tree around after z!creating the distribution archive�	dist-dir=�-directory to put final built distributions in�
skip-buildN�2skip rebuilding everything (for testing/debugging)�relative�7build the archive using relative paths (default: false)�owner=�u�@Owner name used when creating a tar file [default: current user]�group=�g�AGroup name used when creating a tar file [default: current group]Zgztar�zip)�posix�ntcCs:d|_d|_d|_d|_d|_d|_d|_d|_d|_dS)Nr)	�	bdist_dir�	plat_name�format�	keep_temp�dist_dir�
skip_buildr�owner�group)�self�r+�4/usr/lib64/python3.6/distutils/command/bdist_dumb.py�initialize_options2szbdist_dumb.initialize_optionscCsz|jdkr&|jd�j}tjj|d�|_|jdkrfy|jtj|_Wn"t	k
rdt
dtj��YnX|jdddd	�dS)
NZbdistZdumbz@don't know how to create dumb built distributions on platform %sr&r#r')r&r&)r#r#)r'r')r"Zget_finalized_command�
bdist_base�os�path�joinr$�default_format�name�KeyError�DistutilsPlatformErrorZset_undefined_options)r*r.r+r+r,�finalize_options=s

zbdist_dumb.finalize_optionscCs(|js|jd�|jddd�}|j|_|j|_d|_tjd|j�|jd�d|jj	�|j
f}tjj
|j|�}|js~|j}nJ|jj�r�|j|jkr�tdt|j�t|j�f��ntjj
|jt|j��}|j||j||j|jd	�}|jj�r�t�}nd
}|jjjd||f�|j�s$t|j|jd�dS)
NZbuild�install�)Zreinit_subcommandsrzinstalling to %sz%s.%szScan't make a dumb built distribution where base and platbase are different (%s, %s))Zroot_dirr(r)�anyr	)�dry_run) r'Zrun_commandZreinitialize_commandr"�rootZwarn_dirr�infoZdistributionZget_fullnamer#r/r0r1r&rZhas_ext_modulesZinstall_baseZinstall_platbaser5�reprrZmake_archiver$r(r)rZ
dist_files�appendr%rr:)r*r7Zarchive_basenameZpseudoinstall_rootZarchive_root�filenameZ	pyversionr+r+r,�runOs>






zbdist_dumb.run)r
rr)rrr�Pkeep the pseudo-installation tree around after creating the distribution archive)rrrA)rrr)rNr)rNr)rrr)rrr)�__name__�
__module__�__qualname__ZdescriptionrZuser_optionsZboolean_optionsr2r-r6r@r+r+r+r,r	s6
r	)r/Zdistutils.corerZdistutils.utilrZdistutils.dir_utilrrZdistutils.errorsZdistutils.sysconfigrZ	distutilsrr	r+r+r+r,�<module>sPKV[g��2�22command/__pycache__/bdist_rpm.cpython-36.opt-1.pycnu�[���3


 \�T�@s�dZddlZddlZddlZddlmZddlmZddlm	Z	ddl
mZddlTddl
mZdd	lmZGd
d�de�ZdS)zwdistutils.command.bdist_rpm

Implements the Distutils 'bdist_rpm' command (create RPM source and binary
distributions).�N)�Command)�DEBUG)�get_platform)�
write_file)�*)�get_python_version)�logc+@s�eZdZdZdgdhdidjdkdldmdndodpdqdrdsdtdudvdwdxdydzd{d|d}d~dd�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�g)Zd4d9d=d2dUgZd4d9d=dX�ZdYdZ�Zd[d\�Zd]d^�Z	d_d`�Z
dadb�Zdcdd�Zdedf�Z
dS)��	bdist_rpmzcreate an RPM distribution�bdist-base=N�/base directory for creating built distributions�	rpm-base=�dbase directory for creating RPMs (defaults to "rpm" under --bdist-base; must be specified for RPM 2)�	dist-dir=�d�Ddirectory to put final RPM files in (and .spec files if --spec-only)�python=�Mpath to Python interpreter to hard-code in the .spec file (default: "python")�
fix-python�Lhard-code the exact path to the current Python interpreter in the .spec file�	spec-only�only regenerate spec file�source-only�only generate source RPM�binary-only�only generate binary RPM�	use-bzip2�7use bzip2 instead of gzip to create source distribution�distribution-name=�gname of the (Linux) distribution to which this RPM applies (*not* the name of the module distribution!)�group=�9package classification [default: "Development/Libraries"]�release=�RPM release number�serial=�RPM serial number�vendor=�aRPM "vendor" (eg. "Joe Blow <joe@example.com>") [default: maintainer or author from setup script]�	packager=�BRPM packager (eg. "Jane Doe <jane@example.net>") [default: vendor]�
doc-files=�6list of documentation files (space or comma-separated)�
changelog=�
RPM changelog�icon=�name of icon file�	provides=�%capabilities provided by this package�	requires=�%capabilities required by this package�
conflicts=�-capabilities which conflict with this package�build-requires=�+capabilities required to build this package�
obsoletes=�*capabilities made obsolete by this package�
no-autoreq�+do not automatically calculate dependencies�	keep-temp�k�"don't clean up RPM build directory�no-keep-temp�&clean up RPM build directory [default]�use-rpm-opt-flags�8compile with RPM_OPT_FLAGS when building from source RPM�no-rpm-opt-flags�&do not pass any RPM CFLAGS to compiler�	rpm3-mode�"RPM 3 compatibility mode (default)�	rpm2-mode�RPM 2 compatibility mode�prep-script=�3Specify a script for the PREP phase of RPM building�
build-script=�4Specify a script for the BUILD phase of RPM building�pre-install=�:Specify a script for the pre-INSTALL phase of RPM building�install-script=�6Specify a script for the INSTALL phase of RPM building�
post-install=�;Specify a script for the post-INSTALL phase of RPM building�pre-uninstall=�<Specify a script for the pre-UNINSTALL phase of RPM building�post-uninstall=�=Specify a script for the post-UNINSTALL phase of RPM building�
clean-script=�4Specify a script for the CLEAN phase of RPM building�verify-script=�6Specify a script for the VERIFY phase of the RPM build�force-arch=�0Force an architecture onto the RPM build process�quiet�q�3Run the INSTALL phase of RPM building in quiet mode)zno-keep-tempzno-rpm-opt-flagsz	rpm2-modecCs�d|_d|_d|_d|_d|_d|_d|_d|_d|_d|_	d|_
d|_d|_d|_
d|_d|_d|_d|_d|_d|_d|_d|_d|_d|_d|_d|_d|_d|_d|_d|_d|_d|_d|_ d|_!d|_"d|_#d|_$d|_%d|_&dS)Nr�)'�
bdist_base�rpm_base�dist_dir�python�
fix_python�	spec_only�binary_only�source_only�	use_bzip2�distribution_name�group�release�serial�vendor�packager�	doc_files�	changelog�icon�prep_script�build_script�install_script�clean_script�
verify_script�pre_install�post_install�
pre_uninstall�post_uninstall�prep�provides�requires�	conflicts�build_requires�	obsoletes�	keep_temp�use_rpm_opt_flags�	rpm3_mode�
no_autoreq�
force_archr\)�self�r��3/usr/lib64/python3.6/distutils/command/bdist_rpm.py�initialize_options�sNzbdist_rpm.initialize_optionscCs�|jdd�|jdkr6|js$td��tjj|jd�|_|jdkrX|j	rPt
j|_qfd|_n|j	rftd��tjdkr~t
dtj��|jr�|jr�td	��|jj�s�d
|_|jdd
�|j�dS)NZbdistr`z)you must specify --rpm-base in RPM 2 mode�rpmZpython3z8--python and --fix-python are mutually exclusive options�posixz9don't know how to create RPM distributions on platform %sz6cannot supply both '--source-only' and '--binary-only'rrb)r`r`)rbrb)Zset_undefined_optionsrar�ZDistutilsOptionError�os�path�joinr`rcrd�sys�
executable�nameZDistutilsPlatformErrorrfrg�distribution�has_ext_modulesr��finalize_package_data)r�r�r�r��finalize_options�s.





zbdist_rpm.finalize_optionscCsX|jdd�|jdd|jj�|jj�f�|jd�|jd�t|jt�r|x.dD]&}tj	j
|�rR||jkrR|jj|�qRW|jd	d
�|jd�|jd�|jd
�|j|j
�|_
|jd�|jd�|jd�|jd�|jd�|jd�|jd�|jd�|jd�|jd�|jd�|jd�|jd�|jd�|jd�|jd�dS)NrjzDevelopment/Librariesrmz%s <%s>rnro�README�
README.txtrk�1rlrirprqrrrsrtrurvrwrxryrzr|r}r~rr�r�)r�r�)Z
ensure_stringr�Zget_contactZget_contact_emailZensure_string_list�
isinstancero�listr�r��exists�append�_format_changelogrpZensure_filename)r�Zreadmer�r�r�r��s>





















zbdist_rpm.finalize_package_datac
Cs�tr<td�td|j�td|j�td|j�td|j�|jrT|j}|j|�n<i}x.d(D]&}t	j
j|j|�||<|j||�q^W|d}t	j
j|d|j
j��}|jt||j�fd|�|jr�dS|j
jdd�}|jd
�}|j�r�dg|_ndg|_|jd
�||j
_|j�d}|d}|j||�|j�rht	j
j|j��rZ|j|j|�ntd|j��tjd�dg}	t	j
jd��s�t	j
jd��r�dg}	|j�r�|	jd�n|j �r�|	jd�n
|	jd�|	j!dd|j"g�|j#�r|	j!ddt	j
j$|j�g�|j%�s|	jd�|j&�r(|	jd�|	j|�d}
|
d }d!|
d"}d#|||f}
t	j'|
�}zng}d}xB|j(�}|�s~P|j)�j*�}|j|d$�|dk�rn|d}�qnW|j+�}|�r�t,d%t-|
���Wd|j+�X|j.|	�|j/�s�|j
j0��rt1�}nd&}|j �sRt	j
j|d
|�}|j2||j�t	j
j|j|�}|j
jjd'||f�|j�s�xh|D]`}t	j
j|d	|�}t	j
j|��r`|j2||j�t	j
j|jt	j
j3|��}|j
jjd'||f��q`WdS))Nzbefore _get_package_data():zvendor =z
packager =zdoc_files =zchangelog =�SOURCES�SPECS�BUILD�RPMS�SRPMSz%s.speczwriting '%s'�sdistZbztarZgztarrzicon file '%s' does not existz
building RPMsr�z/usr/bin/rpmbuildz
/bin/rpmbuildZrpmbuildz-bsz-bbz-baz--definez__python %sz
_topdir %sz--cleanz--quietz%{name}-%{version}-%{release}z.src.rpmz%{arch}/z.%{arch}.rpmz%rpm -q --qf '%s %s\n' --specfile '%s'r_zFailed to execute: %s�anyr	)r�r�r�r�r�)4r�printrmrnrorprerbZmkpathr�r�r�rar��get_nameZexecuter�_make_spec_fileZ
dist_filesZreinitialize_commandrhZformatsZrun_commandZget_archive_filesZ	copy_filerqr�ZDistutilsFileErrorr�inforgr�rf�extendrcr��abspathr�r\�popen�readline�strip�split�closeZDistutilsExecError�reprZspawnZdry_runr�rZ	move_file�basename)r�Zspec_dirZrpm_dirrZ	spec_pathZsaved_dist_filesr��sourceZ
source_dirZrpm_cmdZ
nvr_stringZsrc_rpmZnon_src_rpmZq_cmd�outZbinary_rpmsZ
source_rpm�line�lZstatusZ	pyversionZsrpm�filenamer�r�r�r��runs�















z
bdist_rpm.runcCstjj|jtjj|��S)N)r�r�r�rbr�)r�r�r�r�r��
_dist_path�szbdist_rpm._dist_pathcCsDd|jj�d|jj�jdd�d|jj�d|jjdd�dd|jj�g}tjd	�}d
jdd�|j	�D��}d
}d}|j||�}||kr�|j
d�|j
d|d
�|jdddg�|jr�|j
d�n
|j
d�|jd|jj
�d|jddg�|j�s|jj��s&|j
d�n|j
d|j�x^dKD]V}t||j��}t|t��rd|j
d"|d#j|�f�n|d$k	�r,|j
d"||f��q,W|jj�d%k�r�|j
d&|jj��|j�r�|j
d'|j�|j�r�|j
d(d#j|j��|j�r|j
d)tjj|j��|j�r|j
d*�|jdd+|jj�g�d,|jtjjtj d-�f}d.|}	|j!�r\d/|	}	d0|}
dLd4d5|	fd6d7|
fdMdNdOdPdQdRg	}xh|D]`\}}
}t||
�}|�s�|�r�|jddE|g�|�r�|jt"|dF�j#�j$d
��n
|j
|��q�W|jddGdHg�|j%�r|j
dId#j|j%��|j&�r@|jddJg�|j|j&�|S)SziGenerate the text of an RPM spec file and return it as a
        list of strings (one per line).
        z
%define name z%define version �-�_z%define unmangled_version z%define release �z	Summary: zrpm --eval %{__os_install_post}�
cSsg|]}d|j��qS)z  %s \)r�)�.0r�r�r�r��
<listcomp>�sz-bdist_rpm._make_spec_file.<locals>.<listcomp>zbrp-python-bytecompile \
z%brp-python-bytecompile %{__python} \
z2# Workaround for http://bugs.python.org/issue14443z%define __os_install_post z
Name: %{name}zVersion: %{version}zRelease: %{release}z-Source0: %{name}-%{unmangled_version}.tar.bz2z,Source0: %{name}-%{unmangled_version}.tar.gzz	License: zGroup: z>BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildrootzPrefix: %{_prefix}zBuildArch: noarchz
BuildArch: %s�Vendor�Packager�Provides�Requires�	Conflicts�	Obsoletesz%s: %s� NZUNKNOWNzUrl: zDistribution: zBuildRequires: zIcon: z
AutoReq: 0z%descriptionz%s %srz%s buildzenv CFLAGS="$RPM_OPT_FLAGS" z>%s install -O1 --root=$RPM_BUILD_ROOT --record=INSTALLED_FILESr{rr�&%setup -n %{name}-%{unmangled_version}ZbuildrsZinstallrt�cleanru�rm -rf $RPM_BUILD_ROOT�verifyscriptrv�prerw�postrx�preunry�postunrz�%�rz%files -f INSTALLED_FILESz%defattr(-,root,root)z%doc z
%changelog)r�r�r�r�r�r�)r{rrr�)r�rur�)r�rvN)r�rwN)r�rxN)r�ryN)r�rzN)'r�r�Zget_version�replacerkZget_description�
subprocessZ	getoutputr��
splitlinesr�r�rhZget_licenserjr�r��getattr�lowerr�r�Zget_urlrirrqr�r�r�r�Zget_long_descriptionrcr��argvr��open�readr�rorp)r�Z	spec_fileZvendor_hookZproblemZfixedZ
fixed_hookZfield�valZdef_setup_callZ	def_buildZinstall_cmdZscript_optionsZrpm_opt�attr�defaultr�r�r�r��s�


	



zbdist_rpm._make_spec_filecCs�|s|Sg}x`|j�jd�D]N}|j�}|ddkrD|jd|g�q|ddkr\|j|�q|jd|�qW|ds||d=|S)zKFormat the changelog correctly and convert it to a list of strings
        r�rrr�r�z  )r�r�r�r�)r�rpZ
new_changelogr�r�r�r�r�3szbdist_rpm._format_changelog)r
Nr)rNr
)rrr)rNr)rNr)rNr)rNr)rNr)rNr)rNr)rNr )r!Nr")r#Nr$)r%Nr&)r'Nr()r)Nr*)r+Nr,)r-Nr.)r/Nr0)r1Nr2)r3Nr4)r5Nr6)r7Nr8)r9Nr:)r;r<r=)r>Nr?)r@NrA)rBNrC)rDNrE)rFNrG)rHNrI)rJNrK)rLNrM)rNNrO)rPNrQ)rRNrS)rTNrU)rVNrW)rXNrY)rZNr[)r\r]r^)�__name__�
__module__�__qualname__ZdescriptionZuser_optionsZboolean_optionsZnegative_optr�r�r�r�r�r�r�r�r�r�r�r	s�--)r	)�__doc__r�r�r�Zdistutils.corerZdistutils.debugrZdistutils.utilrZdistutils.file_utilrZdistutils.errorsZdistutils.sysconfigrZ	distutilsrr	r�r�r�r��<module>sPKV[���>ii(command/__pycache__/check.cpython-36.pycnu�[���3


 \x�@s�dZddlmZddlmZyTddlmZddlmZddl	m
Z
ddl	mZddlm
Z
Gd	d
�d
e�ZdZWnek
r�dZYnXGd
d�de�ZdS)zCdistutils.command.check

Implements the Distutils 'check' command.
�)�Command)�DistutilsSetupError)�Reporter)�Parser)�frontend)�nodes)�StringIOc@seZdZd	dd�Zdd�ZdS)
�SilentReporterNr�ascii�replacec	Cs"g|_tj||||||||�dS)N)�messagesr�__init__)�self�source�report_level�
halt_level�stream�debug�encoding�
error_handler�r�//usr/lib64/python3.6/distutils/command/check.pyr
szSilentReporter.__init__cOs6|jj||||f�tj|f|�||j|d�|��S)N)�level�type)r�appendr�system_messageZlevels)rr�messageZchildren�kwargsrrrrszSilentReporter.system_message)Nrr
r)�__name__�
__module__�__qualname__r
rrrrrr	s
r	TFc@s`eZdZdZdZdddgZddd	gZdd
�Zdd�Zdd�Z	dd�Z
dd�Zdd�Zdd�Z
dS)�checkz6This command checks the meta-data of the package.
    z"perform some checks on the package�metadata�m�Verify meta-data�restructuredtext�r�EChecks if long string meta-data syntax are reStructuredText-compliant�strict�s�(Will exit with an error if a check failscCsd|_d|_d|_d|_dS)z Sets default values for options.r�N)r%r"r(�	_warnings)rrrr�initialize_options1szcheck.initialize_optionscCsdS)Nr)rrrr�finalize_options8szcheck.finalize_optionscCs|jd7_tj||�S)z*Counts the number of warnings that occurs.r+)r,r�warn)r�msgrrrr/;sz
check.warncCsL|jr|j�|jr0tr"|j�n|jr0td��|jrH|jdkrHtd��dS)zRuns the command.zThe docutils package is needed.rzPlease correct your package.N)r"�check_metadatar%�HAS_DOCUTILS�check_restructuredtextr(rr,)rrrr�run@s
z	check.runcCs�|jj}g}x*dD]"}t||�o(t||�s|j|�qW|rP|jddj|��|jrh|js�|jd�n"|j	r�|j
s�|jd�n
|jd�d
S)z�Ensures that all required elements of meta-data are supplied.

        name, version, URL, (author and author_email) or
        (maintainer and maintainer_email)).

        Warns if any are missing.
        �name�version�urlzmissing required meta-data: %sz, z)missing meta-data: if 'author' supplied, z#'author_email' must be supplied tooz-missing meta-data: if 'maintainer' supplied, z''maintainer_email' must be supplied tooz4missing meta-data: either (author and author_email) z%or (maintainer and maintainer_email) zmust be suppliedN)r5r6r7zLmissing meta-data: if 'author' supplied, 'author_email' must be supplied toozTmissing meta-data: if 'maintainer' supplied, 'maintainer_email' must be supplied toozYmissing meta-data: either (author and author_email) or (maintainer and maintainer_email) zimissing meta-data: either (author and author_email) or (maintainer and maintainer_email) must be supplied)�distributionr"�hasattr�getattrrr/�joinZauthorZauthor_emailZ
maintainerZmaintainer_email)rr"Zmissing�attrrrrr1Ps$
zcheck.check_metadatacCs\|jj�}xL|j|�D]>}|djd�}|dkr:|d}nd|d|f}|j|�qWdS)z4Checks if the long string fields are reST-compliant.r+�lineNz%s (line %s)���)r8Zget_long_description�_check_rst_data�getr/)r�dataZwarningr=rrrr3ns

zcheck.check_restructuredtextcCs�t�}t�}tjtfd�j�}d|_d|_d|_t||j	|j
|j|j|j
|jd�}tj|||d�}|j|d	�y|j||�Wn:tk
r�}z|jjd
d|dif�WYdd}~XnX|jS)z8Returns warnings when the provided data doesn't compile.)Z
components�N)rrrr)rr+z!Could not finish the parsing: %s.�r>r>)rrrZOptionParserZget_default_valuesZ	tab_widthZpep_referencesZrfc_referencesr	rrZwarning_streamrZerror_encodingZerror_encoding_error_handlerr�documentZnote_source�parse�AttributeErrorrr)rrA�source_path�parserZsettingsZreporterrD�errrr?ys*
$zcheck._check_rst_dataN)r"r#r$)r%r&r')r(r)r*)rrr �__doc__ZdescriptionZuser_optionsZboolean_optionsr-r.r/r4r1r3r?rrrrr!$s
r!N)rJZdistutils.corerZdistutils.errorsrZdocutils.utilsrZdocutils.parsers.rstrZdocutilsrr�iorr	r2�	Exceptionr!rrrr�<module>s
PKV[�� � 0command/__pycache__/bdist_wininst.cpython-36.pycnu�[���3

�\dh�<�@spdZddlZddlZddlmZddlmZddlmZm	Z	ddl
TddlmZddl
mZGd	d
�d
e�ZdS)zzdistutils.command.bdist_wininst

Implements the Distutils 'bdist_wininst' command: create a windows installer
exe-program.�N)�Command)�get_platform)�create_tree�remove_tree)�*)�get_python_version)�logc@s�eZdZdZd5ddde�fd7d9d:d;d<d=d>d?d@dAdBg
ZddddgZejd&kZ	d'd(�Z
d)d*�Zd+d,�Zd-d.�Z
dCd/d0�Zd1d2�Zd3d4�ZdS)D�
bdist_wininstz-create an executable installer for MS Windows�
bdist-dir=N�1temporary directory for creating the distributionz
plat-name=�pz;platform name to embed in generated filenames (default: %s)�	keep-temp�kz/keep the pseudo-installation tree around after z!creating the distribution archive�target-version=z!require a specific python versionz on the target system�no-target-compile�c�/do not compile .py to .pyc on the target system�no-target-optimize�o�;do not compile .py to .pyo (optimized) on the target system�	dist-dir=�d�-directory to put final built distributions in�bitmap=�b�>bitmap to use for the installer instead of python-powered logo�title=�t�?title to display on the installer background instead of default�
skip-build�2skip rebuilding everything (for testing/debugging)�install-script=�Ubasename of installation script to be run after installation or before deinstallation�pre-install-script=�{Fully qualified filename of a script to be run before any files are installed.  This script need not be in the distribution�user-access-control=��specify Vista's UAC handling - 'none'/default=no handling, 'auto'=use UAC if target Python installed for all users, 'force'=always use UAC�win32cCsRd|_d|_d|_d|_d|_d|_d|_d|_d|_d|_	d|_
d|_d|_dS)Nr)
�	bdist_dir�	plat_name�	keep_temp�no_target_compile�no_target_optimize�target_version�dist_dir�bitmap�title�
skip_build�install_script�pre_install_script�user_access_control)�self�r6�7/usr/lib64/python3.6/distutils/command/bdist_wininst.py�initialize_options=sz bdist_wininst.initialize_optionscCs�|jdd	�|jdkrR|jr6|jr6|jjd�}|j|_|jd�j}tj	j
|d�|_|js^d|_|jr�|jj�r�t
�}|jr�|j|kr�td|f��||_|jdd
d�|jr�x2|jjD]}|jtj	j|�kr�Pq�Wtd|j��dS)N�bdistr1Zwininst�zMtarget version can only be %s, or the '--skip-build' option must be specifiedr.r)z(install_script '%s' not found in scripts)r1r1)r.r.)r)r))Zset_undefined_optionsr(r1r)�distributionZget_command_obj�get_finalized_command�
bdist_base�os�path�joinr-�has_ext_modulesrZDistutilsOptionErrorr2�scripts�basename)r5r9r=Z
short_version�scriptr6r6r7�finalize_optionsMs4

zbdist_wininst.finalize_optionsc
Cs�tjdkr&|jj�s|jj�r&td��|js6|jd�|jddd�}|j	|_
|j|_d|_|j|_|jd�}d|_
d|_|jj�r�|j}|s�|js�td	��d
tjdd�}d|j|f}|jd�}tjj|jd
|�|_x6dD].}|j�}|dk�r�|d}t|d||�q�Wtjd|j	�|j�tjjdtjj|j	d��|j�tjd=ddlm }|�}	|jj!�}
|j"|	d|j	d�}|j#||
|j$�|jj��r�t%�}nd}|jj&j'd||j(|
�f�tj)d|�tj*|�|j+�s�t,|j	|j-d�dS)Nr'z^distribution contains extensions and/or C libraries; must be compiled on a Windows 32 platform�build�install�)Zreinit_subcommandsr�install_libz Should have already checked thisz%d.%d�z.%s-%s�lib�purelib�platlib�headersrB�dataz/Include/$dist_nameZinstall_zinstalling to %sZPURELIB)�mktemp�zip)Zroot_dir�anyr	zremoving temporary file '%s')�dry_run)rLrMrNrBrO).�sys�platformr;rAZhas_c_librariesZDistutilsPlatformErrorr1Zrun_commandZreinitialize_commandr(�rootZwarn_dirr)�compile�optimizer-�AssertionError�version_infor<r>r?r@Z
build_baseZ	build_lib�upper�setattrr�infoZensure_finalized�insert�runZtempfilerP�get_fullnameZmake_archive�
create_exer/rZ
dist_files�append�get_installer_filename�debug�remover*rrS)
r5rGrIr-Zplat_specifierrF�key�valuerPZarchive_basename�fullname�arcnameZ	pyversionr6r6r7r_ssf













zbdist_wininst.runcCs`g}|jj}|jd�|jpdd}dd�}xJdD]B}t||d�}|r2|d|j�||�f}|jd|||�f�q2W|jd�|jr�|jd|j�|jd||��|jd|j�|jd|j�|j	r�|jd|j	�|j
�r�|jd|j
�|j�p|jj�}|jd||��ddl
}ddl}	d|j|j
��|	jf}
|jd|
�dj|�S)Nz
[metadata]r:�
cSs|jdd�S)Nrjz\n)�replace)�sr6r6r7�escape�sz)bdist_wininst.get_inidata.<locals>.escape�author�author_email�description�
maintainer�maintainer_email�name�url�versionz
    %s: %sz%s=%sz
[Setup]zinstall_script=%szinfo=%sztarget_compile=%dztarget_optimize=%dztarget_version=%szuser_access_control=%sztitle=%srzBuilt %s with distutils-%sz
build_info=%s)rnrorprqrrrsrtru)r;�metadatarbZlong_description�getattr�
capitalizer2r+r,r-r4r0r`�time�	distutilsZctime�__version__r@)r5�linesrvr]rmrsrOr0ryrzZ
build_infor6r6r7�get_inidata�s<

zbdist_wininst.get_inidatac
Csddl}|j|j�|j�}|j|�}|jd|�|rPt|d�j�}t|�}nd}t|d�}	|	j	|j
��|rz|	j	|�t|t�r�|j
d�}|d}|jr�t|jddd	��}
|
j�j
d�}WdQRX||d
}n|d}|	j	|�|jddt|�|�}|	j	|�|	j	t|d�j��dS)
Nrzcreating %s�rb�wb�mbcs��rzlatin-1)�encodings
z<iiii{V4)�structZmkpathr.r}rcZannounce�open�read�len�write�
get_exe_bytes�
isinstance�str�encoder3Zpack)
r5rirhr/r�Zcfgdata�installer_nameZ
bitmapdataZ	bitmaplen�filerDZscript_data�headerr6r6r7ra�s:








zbdist_wininst.create_execCsD|jr&tjj|jd||j|jf�}ntjj|jd||jf�}|S)Nz%s.%s-py%s.exez	%s.%s.exe)r-r>r?r@r.r))r5rhr�r6r6r7rc's

z$bdist_wininst.get_installer_filenamec	Cs t�}|jrl|j|krl|jdkr&d}q�|jdkr6d}q�|jdkrFd}q�|jdkrVd}q�|jdkrfd	}q�d
}n@yddlm}Wntk
r�d
}YnX|jd
�d}|d}tjjt	�}|j
dkr�|j
dd�dkr�|j
dd�}nd}tjj|d||f�}t|d�}z|j
�S|j�XdS)Nz2.4z6.0z7.1z2.5z8.0z3.2z9.0z3.4z10.0z14.0r)�CRT_ASSEMBLY_VERSION�.z.0r'��winr:zwininst-%s%s.exer~)rr-Zmsvcrtr��ImportError�	partitionr>r?�dirname�__file__r)r@r�r��close)	r5Zcur_versionZbvr��majorZ	directoryZsfix�filename�fr6r6r7r�4s8	






zbdist_wininst.get_exe_bytes)r
Nr�Pkeep the pseudo-installation tree around after creating the distribution archive)r
rr��6require a specific python version on the target system)rNr�)rrr)rrr)rrr)rrr)rrr)rNr )r!Nr")r#Nr$)r%Nr&)N)�__name__�
__module__�__qualname__rprZuser_optionsZboolean_optionsrTrUZ_unsupportedr8rEr_r}rarcr�r6r6r6r7r	sP
&Q.
5
r	)�__doc__rTr>Zdistutils.corerZdistutils.utilrZdistutils.dir_utilrrZdistutils.errorsZdistutils.sysconfigrrzrr	r6r6r6r7�<module>sPKV[$0�00.command/__pycache__/clean.cpython-36.opt-2.pycnu�[���3


 \�
�@s@ddlZddlmZddlmZddlmZGdd�de�ZdS)�N)�Command)�remove_tree)�logc@s>eZdZdZddddddgZdgZdd�Zdd�Zdd�ZdS)�cleanz-clean up temporary files from 'build' command�build-base=�b�2base build directory (default: 'build.build-base')�
build-lib=N�<build directory for all modules (default: 'build.build-lib')�build-temp=�t�7temporary build directory (default: 'build.build-temp')�build-scripts=�<build directory for scripts (default: 'build.build-scripts')�bdist-base=�+temporary directory for built distributions�all�a�7remove all build output, not just temporary by-productscCs(d|_d|_d|_d|_d|_d|_dS)N)�
build_base�	build_lib�
build_temp�
build_scripts�
bdist_baser)�self�r�//usr/lib64/python3.6/distutils/command/clean.py�initialize_options szclean.initialize_optionscCs"|jddd	d
d�|jdd�dS)
NZbuildrrrrZbdistr)rr)rr)rr)rr)rr)Zset_undefined_options)rrrr�finalize_options(szclean.finalize_optionscCs�tjj|j�r t|j|jd�ntjd|j�|jrvx@|j	|j
|jfD],}tjj|�rft||jd�qFtjd|�qFW|js�ytj
|j�tjd|j�Wntk
r�YnXdS)N)�dry_runz%'%s' does not exist -- can't clean itz
removing '%s')�os�path�existsrrrr�debugrrrr�warn�rmdirr�info�OSError)rZ	directoryrrr�run1s$
z	clean.run)rrr)r	Nr
)rrr
)rNr)rNr)rrr)	�__name__�
__module__�__qualname__ZdescriptionZuser_optionsZboolean_optionsrrr(rrrrrs"	r)r Zdistutils.corerZdistutils.dir_utilrZ	distutilsrrrrrr�<module>sPKV[���>ii.command/__pycache__/check.cpython-36.opt-1.pycnu�[���3


 \x�@s�dZddlmZddlmZyTddlmZddlmZddl	m
Z
ddl	mZddlm
Z
Gd	d
�d
e�ZdZWnek
r�dZYnXGd
d�de�ZdS)zCdistutils.command.check

Implements the Distutils 'check' command.
�)�Command)�DistutilsSetupError)�Reporter)�Parser)�frontend)�nodes)�StringIOc@seZdZd	dd�Zdd�ZdS)
�SilentReporterNr�ascii�replacec	Cs"g|_tj||||||||�dS)N)�messagesr�__init__)�self�source�report_level�
halt_level�stream�debug�encoding�
error_handler�r�//usr/lib64/python3.6/distutils/command/check.pyr
szSilentReporter.__init__cOs6|jj||||f�tj|f|�||j|d�|��S)N)�level�type)r�appendr�system_messageZlevels)rr�messageZchildren�kwargsrrrrszSilentReporter.system_message)Nrr
r)�__name__�
__module__�__qualname__r
rrrrrr	s
r	TFc@s`eZdZdZdZdddgZddd	gZdd
�Zdd�Zdd�Z	dd�Z
dd�Zdd�Zdd�Z
dS)�checkz6This command checks the meta-data of the package.
    z"perform some checks on the package�metadata�m�Verify meta-data�restructuredtext�r�EChecks if long string meta-data syntax are reStructuredText-compliant�strict�s�(Will exit with an error if a check failscCsd|_d|_d|_d|_dS)z Sets default values for options.r�N)r%r"r(�	_warnings)rrrr�initialize_options1szcheck.initialize_optionscCsdS)Nr)rrrr�finalize_options8szcheck.finalize_optionscCs|jd7_tj||�S)z*Counts the number of warnings that occurs.r+)r,r�warn)r�msgrrrr/;sz
check.warncCsL|jr|j�|jr0tr"|j�n|jr0td��|jrH|jdkrHtd��dS)zRuns the command.zThe docutils package is needed.rzPlease correct your package.N)r"�check_metadatar%�HAS_DOCUTILS�check_restructuredtextr(rr,)rrrr�run@s
z	check.runcCs�|jj}g}x*dD]"}t||�o(t||�s|j|�qW|rP|jddj|��|jrh|js�|jd�n"|j	r�|j
s�|jd�n
|jd�d
S)z�Ensures that all required elements of meta-data are supplied.

        name, version, URL, (author and author_email) or
        (maintainer and maintainer_email)).

        Warns if any are missing.
        �name�version�urlzmissing required meta-data: %sz, z)missing meta-data: if 'author' supplied, z#'author_email' must be supplied tooz-missing meta-data: if 'maintainer' supplied, z''maintainer_email' must be supplied tooz4missing meta-data: either (author and author_email) z%or (maintainer and maintainer_email) zmust be suppliedN)r5r6r7zLmissing meta-data: if 'author' supplied, 'author_email' must be supplied toozTmissing meta-data: if 'maintainer' supplied, 'maintainer_email' must be supplied toozYmissing meta-data: either (author and author_email) or (maintainer and maintainer_email) zimissing meta-data: either (author and author_email) or (maintainer and maintainer_email) must be supplied)�distributionr"�hasattr�getattrrr/�joinZauthorZauthor_emailZ
maintainerZmaintainer_email)rr"Zmissing�attrrrrr1Ps$
zcheck.check_metadatacCs\|jj�}xL|j|�D]>}|djd�}|dkr:|d}nd|d|f}|j|�qWdS)z4Checks if the long string fields are reST-compliant.r+�lineNz%s (line %s)���)r8Zget_long_description�_check_rst_data�getr/)r�dataZwarningr=rrrr3ns

zcheck.check_restructuredtextcCs�t�}t�}tjtfd�j�}d|_d|_d|_t||j	|j
|j|j|j
|jd�}tj|||d�}|j|d	�y|j||�Wn:tk
r�}z|jjd
d|dif�WYdd}~XnX|jS)z8Returns warnings when the provided data doesn't compile.)Z
components�N)rrrr)rr+z!Could not finish the parsing: %s.�r>r>)rrrZOptionParserZget_default_valuesZ	tab_widthZpep_referencesZrfc_referencesr	rrZwarning_streamrZerror_encodingZerror_encoding_error_handlerr�documentZnote_source�parse�AttributeErrorrr)rrA�source_path�parserZsettingsZreporterrD�errrr?ys*
$zcheck._check_rst_dataN)r"r#r$)r%r&r')r(r)r*)rrr �__doc__ZdescriptionZuser_optionsZboolean_optionsr-r.r/r4r1r3r?rrrrr!$s
r!N)rJZdistutils.corerZdistutils.errorsrZdocutils.utilsrZdocutils.parsers.rstrZdocutilsrr�iorr	r2�	Exceptionr!rrrr�<module>s
PKV[�2��7M7M,command/__pycache__/bdist_msi.cpython-36.pycnu�[���3


 \���@s�dZddlZddlZddlmZddlmZddlmZddl	m
Z
ddlmZddl
mZdd	lmZddlZdd
lmZmZmZddlmZmZmZmZGdd
�d
e�ZGdd�de�ZdS)z#
Implements the bdist_msi command.
�N)�Command)�remove_tree)�get_python_version)�
StrictVersion)�DistutilsOptionError)�get_platform)�log)�schema�sequence�text)�	Directory�Feature�Dialog�add_datac@sFeZdZdZdd�Zdd�Zddd	�Zddd�Zddd�Zdd�Z	dS)�PyDialogz�Dialog class with a fixed layout: controls at the top, then a ruler,
    then a list of buttons: back, next, cancel. Optionally a bitmap at the
    left.cOs>tj|f|��|jd}d|d}|jdd||jd�dS)zbDialog(database, name, x, y, w, h, attributes, title, first,
        default, cancel, bitmap=true)�$�iHZ
BottomLinerN)r�__init__�h�line�w)�self�args�kwZrulerZbmwidth�r�3/usr/lib64/python3.6/distutils/command/bdist_msi.pyrs
zPyDialog.__init__c	Cs|jddddddd|�dS)	z,Set the title text of the dialog at the top.�Title��
i@�<iz{\VerdanaBold10}%sN)r)r�titlerrrr #szPyDialog.title�Back�c	Cs,|r
d}nd}|j|d|jddd|||�S)z�Add a back button with a given title, the tab-next button,
        its name in the Control table, possibly initially disabled.

        Return the button, so that events can be associated�r"���8�)�
pushbuttonr)rr �next�name�active�flagsrrr�back*sz
PyDialog.back�Cancelc	Cs,|r
d}nd}|j|d|jddd|||�S)z�Add a cancel button with a given title, the tab-next button,
        its name in the Control table, possibly initially disabled.

        Return the button, so that events can be associatedr#r"i0r%r&r')r(r)rr r)r*r+r,rrr�cancel5szPyDialog.cancel�Nextc	Cs,|r
d}nd}|j|d|jddd|||�S)z�Add a Next button with a given title, the tab-next button,
        its name in the Control table, possibly initially disabled.

        Return the button, so that events can be associatedr#r"��r%r&r')r(r)rr r)r*r+r,rrrr)@sz
PyDialog.nextc	Cs,|j|t|j|d�|jdddd||�S)z�Add a button with a given title, the tab-next button,
        its name in the Control table, giving its x position; the
        y-position is aligned with the other buttons.

        Return the button, so that events can be associated�r%r&r'r#)r(�intrr)rr*r r)Zxposrrr�xbuttonKszPyDialog.xbuttonN)r!r")r.r")r0r")
�__name__�
__module__�__qualname__�__doc__rr r-r/r)r4rrrrrs



rc@s�eZdZdZdCddde�fdEdGdHdIdJdKdLdMg
ZddddgZddd d!d"d#d$d%d&d'd(d)d*d+d,d-d.d/d0d1gZd2Zd3d4�Z	d5d6�Z
d7d8�Zd9d:�Zd;d<�Z
d=d>�Zd?d@�ZdAdB�ZdS)N�	bdist_msiz7create a Microsoft Installer (.msi) binary distribution�
bdist-dir=N�1temporary directory for creating the distributionz
plat-name=�pz;platform name to embed in generated filenames (default: %s)�	keep-temp�kz/keep the pseudo-installation tree around after z!creating the distribution archive�target-version=z!require a specific python versionz on the target system�no-target-compile�c�/do not compile .py to .pyc on the target system�no-target-optimize�o�;do not compile .py to .pyo (optimized) on the target system�	dist-dir=�d�-directory to put final built distributions in�
skip-build�2skip rebuilding everything (for testing/debugging)�install-script=�Ubasename of installation script to be run after installation or before deinstallation�pre-install-script=�{Fully qualified filename of a script to be run before any files are installed.  This script need not be in the distributionz2.0z2.1z2.2z2.3z2.4z2.5z2.6z2.7z2.8z2.9z3.0z3.1z3.2z3.3z3.4z3.5z3.6z3.7z3.8z3.9�XcCsFd|_d|_d|_d|_d|_d|_d|_d|_d|_d|_	d|_
dS)Nr)�	bdist_dir�	plat_name�	keep_tempZno_target_compileZno_target_optimize�target_version�dist_dir�
skip_build�install_script�pre_install_script�versions)rrrr�initialize_options}szbdist_msi.initialize_optionscCs�|jdd	�|jdkr2|jd�j}tjj|d�|_t�}|jrP|j	j
�rP||_|jr�|jg|_|jr�|j	j
�r�|j|kr�t
d|f��nt|j�|_|jdd
d�|jr�t
d��|jr�x2|j	jD]}|jtjj|�kr�Pq�Wt
d|j��d|_dS)NZbdistrUZmsizMtarget version can only be %s, or the '--skip-build' option must be specifiedrTrQz5the pre-install-script feature is not yet implementedz(install_script '%s' not found in scripts)rUrU)rTrT)rQrQ)Zset_undefined_optionsrP�get_finalized_command�
bdist_base�os�path�joinrrS�distribution�has_ext_modulesrXrUr�list�all_versionsrWrV�scripts�basename�install_script_key)rr[Z
short_versionZscriptrrr�finalize_options�s:



zbdist_msi.finalize_optionscCs�|js|jd�|jddd�}|j|_|j|_d|_|jd�}d|_d|_|jj	�r�|j
}|s~|jsltd��dtj
dd	�}d
|j|f}|jd�}tjj|jd|�|_tjd|j�|j�tjjdtjj|jd
��|j�tjd=|j|j�|jj�}|j|�}tjj|�}tjj|��r0tj |�|jj!}|j"}	|	�sJ|j#}	|	�sTd}	|j$�}
dt%|
�j&}|jj�}|j
�r�d|j
|f}nd|}t'j(|t)|t'j*�||	�|_+t'j,|j+t-�d|
fg}
|j.�p�|j/}|�r�|
j0d|f�|j1�r|
j0d|j1f�|
�rt2|j+d|
�|j3�|j4�|j5�|j6�|j+j7�t8|jd��rld|j
�pXd|f}|jj9j0|�|j:�s�t;|j|j<d�dS)N�build�installr")Zreinit_subcommandsr�install_libz Should have already checked thisz%d.%d�z.%s-%s�libzinstalling to %sZPURELIBZUNKNOWNz%d.%d.%dzPython %s %sz	Python %sZDistVersionZ
ARPCONTACTZARPURLINFOABOUT�Property�
dist_filesr9�any)�dry_run)=rUZrun_commandZreinitialize_commandrP�prefixZwarn_dir�compile�optimizer_r`rS�AssertionError�sys�version_inforQrZr\r]r^Z
build_baseZ	build_libr�infoZensure_finalized�insert�runZmkpathrT�get_fullname�get_installer_filename�abspath�exists�unlink�metadata�authorZ
maintainerZget_versionr�version�msilibZ
init_databaser	Zgen_uuid�dbZ
add_tablesr
Zauthor_emailZmaintainer_email�appendZurlr�add_find_python�	add_files�add_scripts�add_ui�Commit�hasattrrmrRrro)rrhrirSZplat_specifierrg�fullname�installer_namer~rr�ZsversionZproduct_nameZpropsZemail�tuprrrrx�s~











z
bdist_msi.runc
Cs*|j}tjd�}tjj|j�}t||d|dd�}t|ddddddd�}||d	fg}x�|j	|j
gD]t}d|}d|}	}
d}||j
kr�d
}d}
nd|}d}
t||	||d|
|d�}t||||||
�}|j|||f�qbW|j�i}�x2|D�](\}}}|g}�x|�r|j
�}x�tj|j�D]�}tjj|j|�}tjj|��rzd
|j|�|f}||}
t|||||
|�}|j|�n�|j�s�|j|j|d�||k�r�|j|�}||<||jk�r|j�r�td|��d||_n*||}t|jd|||j|d|jfg��q W�qW|j�q�W|j|�dS)NZ	distfiles�	TARGETDIRZ	SourceDir�PythonZ
Everythingrr")Z	directory�zPython from another locationrjzPython %s from registryz%s|%szMultiple files with name %sz[#%s]Z
DuplicateFile)r�r�ZCABr\r]r{rPrr
rX�
other_versionr�r��pop�listdirZabsoluter^�isdirZ
make_shortZ	componentZstart_componentZlogicalZadd_filerVrerrZcommit)rr�ZcabZrootdir�root�f�itemsr��targetr*�defaultZdescr �level�dir�seenZfeatureZtodo�fileZafileZshortZnewdir�keyrrrr�
s\





&zbdist_msi.add_filescCs�d}�x�|jD�]v}d|}d|}d|}d|}d|}d|}d|}	d	|}
d
|}d|}tjrpd }
nd}
t|jd|d|d|
f|d|d|
fg�t|jd||f||fg�t|jd|d!|d|df|	d"|d|df|
d#|d|dfg�t|jd|||f|	||df|
d|dfg�t|jd|||f|	||df|
d|dfg�t|jdd|dd|fg�|d7}|dkst�qWdS)$asAdds code to the installer to compute the location of Python.

        Properties PYTHON.MACHINE.X.Y and PYTHON.USER.X.Y will be set from the
        registry for each version of Python.

        Properties TARGETDIRX.Y will be set from PYTHON.USER.X.Y if defined,
        else from PYTHON.MACHINE.X.Y.

        Properties PYTHONX.Y will be set to TARGETDIRX.Y\python.exei�z)SOFTWARE\Python\PythonCore\%s\InstallPathzpython.machine.zpython.user.zPYTHON.MACHINE.zPYTHON.USER.ZPythonFromMachineZPythonFromUserZ	PythonExer��PYTHONrj�Z
RegLocatorNr"Z	AppSearch�CustomAction�3��[�]z]\python.exe�InstallExecuteSequence�InstallUISequenceZ	Conditionr�rz
NOT TARGETDIR�i��i3i3i3)rXr�ZWin64rr�rs)r�start�verZinstall_pathZmachine_regZuser_regZmachine_propZ	user_propZmachine_actionZuser_actionZ
exe_actionZtarget_dir_prop�exe_propZTyperrrr�CsJzbdist_msi.add_find_pythoncCs�|jrnd}xb|j|jgD]P}d|}d|}t|jd|d||jfg�t|jd|d||fg�|d7}qW|jr�tjj	|j
d	�}t|d
�}|jd�|jt|j�j
��|j�t|jdd
tj|�fg�t|jddg�t|jddg�dS)Ni�zinstall_script.r�r��2r�z&Python%s=3r"zpreinstall.batrzrem ="""
%1 %0
exit
"""
�Binary�
PreInstallrj�
NOT Installed��)r�rjr�N)r�r�r�)rVrXr�rr�rerWr\r]r^rP�open�write�read�closer�r�)rr�r�Zinstall_actionr�Zscriptfnr�rrrr�ys,
	
zbdist_msi.add_scriptscCs�
|j}d}}d}d}d}d}d}d}	t|dd�d�d�d�d�d�g�t|dd�d�d�d�g�t|d d�d�d�d��dg�t|d/tj�t|d0tj�t|d1||||||d2d2d2�}
|
jd3�|
jd4d2dd5�|
jd6d7dd5�|
jd8d9d:d;d<d=d>�|
jd?d9d@d;dAd=dB�|
j	d2d6d2dC�}|j
dDdE�t|dF||||||d2d2d2�}|jdG�|jd4d2dd5�|jd6d7dd5�|jd8d9d:d;d<d=dH�|jd?d9d@d;dAd=dB�|j	d2d6d2dC�}|j
dDdE�t|dI||||||d2d2d2�}
|
jdJ�|
jd4d2dd5�|
jd6d7dd5�|
jdKd9dLd;dAd=dB�|
j	d2d6d2dC�}|j
dDdM�t|dN||||dO|dPdPdPdQdR�}|jdSd9dTdUd9d=dV�|jdKdAdWdXdAd=dY�|jdZdAd[d\ddd]�|jd^d_dAd`d\dadbdcddd�|jdEdddEdC�}|j
dDdE�|j	dddPdddC�}|j
dDdd�|jdPdEdPdC�}|j
dDdP�t|dddd\dedf|dgdd�}|jdgdddXdhddi�|j
djdkdldmdnddod�j
dDdp�|j
dqdrdldmdnddsd�j
dDdt�|j
duddldmdnddvd�j
dDdw�|j
dxdydldmdndd6d�j
dDdz�|j
d{dmdldmdndddd�j
dDd|�|j
d}d~dldmdnddd�j
dDd��|j
d�d�dldmdnddPd�j
dDd��t|d�ddd�d�d|dododo�}|jdZdhd9d�d�dd��|j
dsdld�d�d�ddsdo�}|j
dDdE�|j
dod�d�d�d�ddods�}|j
dDdM�t|d�ddd�d�||dMdMdM�}|jdZdhd9d�d�dd��|j
dMd�d�d�d�ddMd�}|j
dDdE�t|d!||||||d6d6d6�}|jdKd9d:d;d�d=d��|jd��|jd/d9d�d;dAd=d��}|jd/dZ�|jd�d9d�d;d�d=d�}|jd�dZ�|jd7ddd5�|j	d�ddd5�|jd6d�}|j
d�d��t|d'||||||d�d�d6�}|jd��|jd�d9d�ddAdd�|jj��|jd4ddd5�|j	d�d6�}d}|j
d�d�|d��x:|j|jgD](}|d7}|j
d�d�|d�||d���qW|j
d�d�|dd��|j
dDdM|d�d��|jd6d��}|j
d�d��|jd�d�d9d�ddkdd�dd�d�}|j
d�d��|j}d�|}d�|}|jd�d9dUdd9dd��}|jd�|�|jd�|�|jd�|�|jd�|�|jd�d�d9d�dd�dd�|dd�d�}|jd�|�|jd�|�|jd�|�|jd�|�t|d�||||||d�d�d�dQdR�}|jdSd9dTdUd9d=d��|jdKdAdAdXdAd=d��|jdZdAd�d\d�dd��|jd�d�dAd�d\d�d�dd�dd�|jd�dddƒj
dDdM�t|d$||||||d�d�d6�}|jdă|jd�d9d�d�ddddid��	}|jddd�d�dAdƃ|jd�dd�d�dAdɃ|jd7ddd5�|j	d�d6�}|j
d�d�d�d�|j
dDdMd�d��|jd6dÃ}|j
d�d��t|d-||||||d6d6d6dQdR�}|jdSdAd9dUd9d=d̃|jdZd�d�dd�ddσ|jd�d�d�d�dAddу|jd/d:d�|d:dAdd��}|jd/dZ�|jd�d�d�dkddd�dd�dd�}|jd�dփ|jd4d�dQd5�|j	d�d6dQd5�|jd6d7�j
d�d��t|d*||||||d�d�d6�}|jd׃|jd�d9d�d\dyddڃ|jd�d9d�d\d�dddid��	}|jddd�dUd�dރ|jd�dd�dUd�d�|jd4ddQd5�|j	d2d6�}|j
d�dd�dŃ|j
d�d�d�dT�|j
d�d�d�db�|j
d�dd�d�|j
d�dd�d�|j
d�d�d�d�|j
d�d�d�d�|j
d�dd�d�|j
dDdMd�dA�|jd6dۃj
d�d��dS(Nr�iri,z[ProductName] Setupr#r"� rl�
DefaultUIFont�DlgFont8�ErrorDialog�ErrorDlg�	Progress1�Install�	Progress2�installs�MaintenanceForm_Action�Repair�
WhichUsers�ALLZ	TextStyle�Tahoma�	r�DlgFontBold8��
VerdanaBold10�Verdanar�VerdanaRed9�r��
PrepareDlg�(Not Privileged or Windows9x or Installed��
WhichUsersDlg�.Privileged and not Windows9x and not Installed��SelectFeaturesDlg�
Not Installed���MaintenanceTypeDlg�,Installed AND NOT RESUME AND NOT Preselected���ProgressDlg��
ActionText�UITextZ
FatalErrorZFinishz)[ProductName] Installer ended prematurelyz< Back)r+r.r!ZDescription1r�Fi@�Piz�[ProductName] setup ended prematurely because of an error.  Your system has not been modified.  To install this program at a later time, please run the installation again.ZDescription2��z.Click the Finish button to exit the Installer.)r*Z	EndDialogZExitZUserExitz'[ProductName] Installer was interruptedz�[ProductName] setup was interrupted.  Your system has not been modified.  To install this program at a later time, please run the installation again.Z
ExitDialogz&Completing the [ProductName] InstallerZDescription��ZReturnZ
FilesInUse�ZRetryF)Zbitmapr���z{\DlgFontBold8}Files in Use�iz8Some files that need to be updated are currently in use.ZText�7iJz�The following applications are using files that need to be updated by this setup. Close these applications and then click Retry to continue the installation or Cancel to exit it.ZListZListBox�k��ZFileInUseProcess�Ignore�eiZ	ErrorText�0r��N�x�H�Q�ZNoZErrorNo�Y��ZYesZErrorYes�AZAbortZ
ErrorAbort�C�*ZErrorCancel�IZErrorIgnore�O�ZOkZErrorOk�R��Z
ErrorRetryZ	CancelDlgi�U���z;Are you sure you want to cancel [ProductName] installation?�9r&r'�ZWaitForCostingDlgzRPlease wait while the installer finishes determining your disk space requirements.�f�(zOPlease wait while the Installer prepares to guide you through the installation.z&Welcome to the [ProductName] Installer�nzPondering...Z
ActionData�r0ZSpawnDialogzSelect Python InstallationsZHintz9Select the Python locations where %s should be installed.zNext >z[TARGETDIR]z[SourceDir])Zorderingz
[TARGETDIR%s]z FEATURE_SELECTED AND &Python%s=3ZSpawnWaitDialogrjZFeaturesZ
SelectionTreerZFEATUREZPathEditz[FEATURE_SELECTED]�1z!FEATURE_SELECTED AND &Python%s<>3ZOtherz$Provide an alternate Python locationZEnableZShowZDisableZHide��r�r�ZDiskCostDlgZOKz&{\DlgFontBold8}Disk Space RequirementszFThe disk space required for the installation of the selected features.�5aThe highlighted volumes (if any) do not have enough disk space available for the currently selected features.  You can either remove some files from the highlighted volumes, or choose to install less features onto local drive(s), or select different destination drive(s).Z
VolumeListZVolumeCostList�d�iz{120}{70}{70}{70}{70}g�?ZAdminInstallzGSelect whether to install [ProductName] for all users of this computer.�zInstall for all usersZJUSTME�zInstall just for mez
[ALLUSERS]zWhichUsers="ALL"z({\DlgFontBold8}[Progress1] [ProductName]�#�AzYPlease wait while the Installer [Progress2] [ProductName]. This may take several minutes.ZStatusLabelzStatus:ZProgressBariz
Progress doneZSetProgressZProgressz)Welcome to the [ProductName] Setup WizardZBodyText�?z:Select whether you want to repair or remove [ProductName].ZRepairRadioGroup�lr�z&Repair [ProductName]ZRemoverzRe&move [ProductName]z[REINSTALL]zMaintenanceForm_Action="Repair"z[Progress1]Z	Repairingz[Progress2]ZrepairsZ	Reinstallz[REMOVE]zMaintenanceForm_Action="Remove"�ZRemoving�Zremoves�
�z MaintenanceForm_Action<>"Change")r�r�)r�r�)r�r�)r�r�)r�r�)r�r�)r�r�r�Nr)r�r�r�Nr")r�r�rNr")r�r�r�r�r)r�r�r�)r�r�r�)r�r�r�)r�r�r�)r�Nr�)r�rrr�r�rr r-r/r)ZeventZcontrolrr(�mappingr_ryrXr�Z	conditionr4Z
radiogroup�add)rr��x�yrrr ZmodalZmodelessZtrack_disk_spaceZfatalrAZ	user_exitZexit_dialogZinuse�errorr/ZcostingZprepZseldlg�orderr�r�Zinstall_other_condZdont_install_other_condZcostZ
whichusers�gZprogressZmaintrrrr��s�








       












zbdist_msi.add_uicCs<|jrd||j|jf}nd||jf}tjj|j|�}|S)Nz%s.%s-py%s.msiz	%s.%s.msi)rSrQr\r]r^rT)rr�Z	base_namer�rrrrz�sz bdist_msi.get_installer_filename)r:Nr;�Pkeep the pseudo-installation tree around after creating the distribution archive)r=r>r�6require a specific python version on the target system)r?Nr)r@rArB)rCrDrE)rFrGrH)rINrJ)rKNrL)rMNrN)r5r6r7ZdescriptionrZuser_optionsZboolean_optionsrbr�rYrfrxr�r�r�r�rzrrrrr9SsR



([66&@r9)r8rtr\Zdistutils.corerZdistutils.dir_utilrZdistutils.sysconfigrZdistutils.versionrZdistutils.errorsrZdistutils.utilrZ	distutilsrr�r	r
rrr
rrrr9rrrr�<module>s>PKV[=��#8command/__pycache__/install_scripts.cpython-36.opt-2.pycnu�[���3


 \��@s@ddlZddlmZddlmZddlmZGdd�de�ZdS)�N)�Command)�log)�ST_MODEc@sLeZdZdZddddgZddgZdd�Zdd�Zdd�Zdd�Z	dd�Z
dS)�install_scriptsz%install scripts (Python or otherwise)�install-dir=�d�directory to install scripts to�
build-dir=�b�'build directory (where to install from)�force�f�-force installation (overwrite existing files)�
skip-buildN�skip the build stepscCsd|_d|_d|_d|_dS)Nr)�install_dirr�	build_dir�
skip_build)�self�r�9/usr/lib64/python3.6/distutils/command/install_scripts.py�initialize_optionssz"install_scripts.initialize_optionscCs |jdd	�|jdd
dd�dS)
NZbuild�
build_scriptsrZinstallrrrr)rr)rr)rr)rr)Zset_undefined_options)rrrr�finalize_options!s
z install_scripts.finalize_optionscCs�|js|jd�|j|j|j�|_tjdkr�xT|j�D]H}|j	rNt
jd|�q6tj|�t
dBd@}t
jd||�tj||�q6WdS)Nr�posixzchanging mode of %simi�zchanging mode of %s to %o)rZrun_commandZ	copy_treerr�outfiles�os�name�get_outputsZdry_runr�info�statr�chmod)r�file�moderrr�run)s

zinstall_scripts.runcCs|jjp
gS)N)Zdistribution�scripts)rrrr�
get_inputs8szinstall_scripts.get_inputscCs
|jpgS)N)r)rrrrr;szinstall_scripts.get_outputs)rrr)r	r
r)rr
r)rNr)�__name__�
__module__�__qualname__ZdescriptionZuser_optionsZboolean_optionsrrr$r&rrrrrrsr)rZdistutils.corerZ	distutilsrr rrrrrr�<module>sPKV[X����6command/__pycache__/bdist_wininst.cpython-36.opt-2.pycnu�[���3

�\dh�<�@slddlZddlZddlmZddlmZddlmZmZddl	Tddl
mZddlm
Z
Gdd	�d	e�ZdS)
�N)�Command)�get_platform)�create_tree�remove_tree)�*)�get_python_version)�logc@s�eZdZdZd5ddde�fd7d9d:d;d<d=d>d?d@dAdBg
ZddddgZejd&kZ	d'd(�Z
d)d*�Zd+d,�Zd-d.�Z
dCd/d0�Zd1d2�Zd3d4�ZdS)D�
bdist_wininstz-create an executable installer for MS Windows�
bdist-dir=N�1temporary directory for creating the distributionz
plat-name=�pz;platform name to embed in generated filenames (default: %s)�	keep-temp�kz/keep the pseudo-installation tree around after z!creating the distribution archive�target-version=z!require a specific python versionz on the target system�no-target-compile�c�/do not compile .py to .pyc on the target system�no-target-optimize�o�;do not compile .py to .pyo (optimized) on the target system�	dist-dir=�d�-directory to put final built distributions in�bitmap=�b�>bitmap to use for the installer instead of python-powered logo�title=�t�?title to display on the installer background instead of default�
skip-build�2skip rebuilding everything (for testing/debugging)�install-script=�Ubasename of installation script to be run after installation or before deinstallation�pre-install-script=�{Fully qualified filename of a script to be run before any files are installed.  This script need not be in the distribution�user-access-control=��specify Vista's UAC handling - 'none'/default=no handling, 'auto'=use UAC if target Python installed for all users, 'force'=always use UAC�win32cCsRd|_d|_d|_d|_d|_d|_d|_d|_d|_d|_	d|_
d|_d|_dS)Nr)
�	bdist_dir�	plat_name�	keep_temp�no_target_compile�no_target_optimize�target_version�dist_dir�bitmap�title�
skip_build�install_script�pre_install_script�user_access_control)�self�r6�7/usr/lib64/python3.6/distutils/command/bdist_wininst.py�initialize_options=sz bdist_wininst.initialize_optionscCs�|jdd	�|jdkrR|jr6|jr6|jjd�}|j|_|jd�j}tj	j
|d�|_|js^d|_|jr�|jj�r�t
�}|jr�|j|kr�td|f��||_|jdd
d�|jr�x2|jjD]}|jtj	j|�kr�Pq�Wtd|j��dS)N�bdistr1Zwininst�zMtarget version can only be %s, or the '--skip-build' option must be specifiedr.r)z(install_script '%s' not found in scripts)r1r1)r.r.)r)r))Zset_undefined_optionsr(r1r)�distributionZget_command_obj�get_finalized_command�
bdist_base�os�path�joinr-�has_ext_modulesrZDistutilsOptionErrorr2�scripts�basename)r5r9r=Z
short_version�scriptr6r6r7�finalize_optionsMs4

zbdist_wininst.finalize_optionsc
Cs�tjdkr&|jj�s|jj�r&td��|js6|jd�|jddd�}|j	|_
|j|_d|_|j|_|jd�}d|_
d|_|jj�r�|j}|s�d	tjdd
�}d|j|f}|jd�}tjj|jd|�|_x4dD],}|j�}|dkr�|d}t|d||�q�Wtjd|j	�|j�tjjdtjj|j	d��|j�tjd=ddlm}|�}	|jj �}
|j!|	d|j	d�}|j"||
|j#�|jj��r�t$�}nd}|jj%j&d||j'|
�f�tj(d|�tj)|�|j*�s�t+|j	|j,d�dS)Nr'z^distribution contains extensions and/or C libraries; must be compiled on a Windows 32 platform�build�install�)Zreinit_subcommandsr�install_libz%d.%d�z.%s-%s�lib�purelib�platlib�headersrB�dataz/Include/$dist_nameZinstall_zinstalling to %sZPURELIB)�mktemp�zip)Zroot_dir�anyr	zremoving temporary file '%s')�dry_run)rLrMrNrBrO)-�sys�platformr;rAZhas_c_librariesZDistutilsPlatformErrorr1Zrun_commandZreinitialize_commandr(�rootZwarn_dirr)�compile�optimizer-�version_infor<r>r?r@Z
build_baseZ	build_lib�upper�setattrr�infoZensure_finalized�insert�runZtempfilerP�get_fullnameZmake_archive�
create_exer/rZ
dist_files�append�get_installer_filename�debug�remover*rrS)
r5rGrIr-Zplat_specifierrF�key�valuerPZarchive_basename�fullname�arcnameZ	pyversionr6r6r7r^ssd












zbdist_wininst.runcCs`g}|jj}|jd�|jpdd}dd�}xJdD]B}t||d�}|r2|d|j�||�f}|jd|||�f�q2W|jd�|jr�|jd|j�|jd||��|jd|j�|jd|j�|j	r�|jd|j	�|j
�r�|jd|j
�|j�p|jj�}|jd||��ddl
}ddl}	d|j|j
��|	jf}
|jd|
�dj|�S)Nz
[metadata]r:�
cSs|jdd�S)Nriz\n)�replace)�sr6r6r7�escape�sz)bdist_wininst.get_inidata.<locals>.escape�author�author_email�description�
maintainer�maintainer_email�name�url�versionz
    %s: %sz%s=%sz
[Setup]zinstall_script=%szinfo=%sztarget_compile=%dztarget_optimize=%dztarget_version=%szuser_access_control=%sztitle=%srzBuilt %s with distutils-%sz
build_info=%s)rmrnrorprqrrrsrt)r;�metadataraZlong_description�getattr�
capitalizer2r+r,r-r4r0r_�time�	distutilsZctime�__version__r@)r5�linesrur\rlrrrOr0rxryZ
build_infor6r6r7�get_inidata�s<

zbdist_wininst.get_inidatac
Csddl}|j|j�|j�}|j|�}|jd|�|rPt|d�j�}t|�}nd}t|d�}	|	j	|j
��|rz|	j	|�t|t�r�|j
d�}|d}|jr�t|jddd	��}
|
j�j
d�}WdQRX||d
}n|d}|	j	|�|jddt|�|�}|	j	|�|	j	t|d�j��dS)
Nrzcreating %s�rb�wb�mbcs��rzlatin-1)�encodings
z<iiii{V4)�structZmkpathr.r|rbZannounce�open�read�len�write�
get_exe_bytes�
isinstance�str�encoder3Zpack)
r5rhrgr/r�Zcfgdata�installer_nameZ
bitmapdataZ	bitmaplen�filerDZscript_data�headerr6r6r7r`�s:








zbdist_wininst.create_execCsD|jr&tjj|jd||j|jf�}ntjj|jd||jf�}|S)Nz%s.%s-py%s.exez	%s.%s.exe)r-r>r?r@r.r))r5rgr�r6r6r7rb's

z$bdist_wininst.get_installer_filenamec	Cs t�}|jrl|j|krl|jdkr&d}q�|jdkr6d}q�|jdkrFd}q�|jdkrVd}q�|jdkrfd	}q�d
}n@yddlm}Wntk
r�d
}YnX|jd
�d}|d}tjjt	�}|j
dkr�|j
dd�dkr�|j
dd�}nd}tjj|d||f�}t|d�}z|j
�S|j�XdS)Nz2.4z6.0z7.1z2.5z8.0z3.2z9.0z3.4z10.0z14.0r)�CRT_ASSEMBLY_VERSION�.z.0r'��winr:zwininst-%s%s.exer})rr-Zmsvcrtr��ImportError�	partitionr>r?�dirname�__file__r)r@r�r��close)	r5Zcur_versionZbvr��majorZ	directoryZsfix�filename�fr6r6r7r�4s8	






zbdist_wininst.get_exe_bytes)r
Nr�Pkeep the pseudo-installation tree around after creating the distribution archive)r
rr��6require a specific python version on the target system)rNr�)rrr)rrr)rrr)rrr)rrr)rNr )r!Nr")r#Nr$)r%Nr&)N)�__name__�
__module__�__qualname__rorZuser_optionsZboolean_optionsrTrUZ_unsupportedr8rEr^r|r`rbr�r6r6r6r7r	sP
&Q.
5
r	)rTr>Zdistutils.corerZdistutils.utilrZdistutils.dir_utilrrZdistutils.errorsZdistutils.sysconfigrryrr	r6r6r6r7�<module>sPKV[��kk-command/__pycache__/build_clib.cpython-36.pycnu�[���3


 \V�@sTdZddlZddlmZddlTddlmZddlmZdd�Z	Gd	d
�d
e�Z
dS)z�distutils.command.build_clib

Implements the Distutils 'build_clib' command, to build a C/C++ library
that is included in the module distribution and needed by an extension
module.�N)�Command)�*)�customize_compiler)�logcCsddlm}|�dS)Nr)�show_compilers)�distutils.ccompilerr)r�r�4/usr/lib64/python3.6/distutils/command/build_clib.pyrsrc@sleZdZdZd"d#d$d%d&gZddgZdddefgZdd�Zdd�Z	dd�Z
dd�Zdd�Zdd�Z
d d!�ZdS)'�
build_clibz/build C/C++ libraries used by Python extensions�build-clib=�b�%directory to build C/C++ libraries to�build-temp=�t�,directory to put temporary build by-products�debug�g�"compile with debugging information�force�f�2forcibly build everything (ignore file timestamps)�	compiler=�c�specify the compiler typez
help-compilerNzlist available compilerscCs:d|_d|_d|_d|_d|_d|_d|_d|_d|_dS)Nr)	r
�
build_temp�	libraries�include_dirs�define�undefrr�compiler)�selfrrr	�initialize_options4szbuild_clib.initialize_optionscCsh|jdddd	d
d�|jj|_|jr0|j|j�|jdkrH|jjpDg|_t|jt�rd|jjtj	�|_dS)NZbuildrr
rrr)rr
)rr)rr)rr)rr)
Zset_undefined_optionsZdistributionr�check_library_listr�
isinstance�str�split�os�pathsep)r rrr	�finalize_optionsDs

zbuild_clib.finalize_optionscCs�|js
dSddlm}||j|j|jd�|_t|j�|jdk	rN|jj|j�|j	dk	rzx |j	D]\}}|jj
||�q`W|jdk	r�x|jD]}|jj|�q�W|j
|j�dS)Nr)�new_compiler)r�dry_runr)rrr)rr*rrrZset_include_dirsrZdefine_macrorZundefine_macro�build_libraries)r r)�name�valueZmacrorrr	�run^s 



zbuild_clib.runcCs�t|t�std��x�|D]|}t|t�r<t|�dkr<td��|\}}t|t�sVtd��d|ksrtjdkr�tj|kr�td|d��t|t�std��qWd	S)
a`Ensure that the list of libraries is valid.

        `library` is presumably provided as a command option 'libraries'.
        This method checks that it is a list of 2-tuples, where the tuples
        are (library_name, build_info_dict).

        Raise DistutilsSetupError if the structure is invalid anywhere;
        just returns otherwise.
        z+'libraries' option must be a list of tuples�z*each element of 'libraries' must a 2-tuplezNfirst element of each tuple in 'libraries' must be a string (the library name)�/z;bad library name '%s': may not contain directory separatorsrzMsecond element of each tuple in 'libraries' must be a dictionary (build info)N)	r#�list�DistutilsSetupError�tuple�lenr$r&�sep�dict)r r�libr,�
build_inforrr	r"vs"




zbuild_clib.check_library_listcCs0|js
dSg}x|jD]\}}|j|�qW|S)N)r�append)r Z	lib_names�lib_namer8rrr	�get_library_names�szbuild_clib.get_library_namescCs`|j|j�g}xJ|jD]@\}}|jd�}|dksBt|ttf�rNtd|��|j|�qW|S)N�sourceszfin 'libraries' option (library '%s'), 'sources' must be present and must be a list of source filenames)r"r�getr#r1r3r2�extend)r �	filenamesr:r8r<rrr	�get_source_files�s
zbuild_clib.get_source_filescCs�x�|D]�\}}|jd�}|dks0t|ttf�r<td|��t|�}tjd|�|jd�}|jd�}|jj||j	|||j
d�}|jj|||j|j
d�qWdS)Nr<zfin 'libraries' option (library '%s'), 'sources' must be present and must be a list of source filenameszbuilding '%s' library�macrosr)�
output_dirrArr)rBr)
r=r#r1r3r2r�infor�compilerrZcreate_static_libr
)r rr:r8r<rArZobjectsrrr	r+�s$




zbuild_clib.build_libraries)rrr
)rrr)rrr)rrr)rrr)�__name__�
__module__�__qualname__ZdescriptionZuser_optionsZboolean_optionsrZhelp_optionsr!r(r.r"r;r@r+rrrr	r
s*
$r
)�__doc__r&Zdistutils.corerZdistutils.errorsZdistutils.sysconfigrZ	distutilsrrr
rrrr	�<module>sPKV[Fq�� � +command/__pycache__/register.cpython-36.pycnu�[���3


 \�-�@sddZddlZddlZddlZddlZddlmZddlm	Z	ddl
TddlmZGdd�de	�Z
dS)	zhdistutils.command.register

Implements the Distutils 'register' command (register with the repository).
�N)�warn)�
PyPIRCCommand)�*)�logc@s�eZdZdZejdd gZejdddgZdd	d
�fgZdd�Zd
d�Z	dd�Z
dd�Zdd�Zdd�Z
dd�Zdd�Zdd�Zd!dd�ZdS)"�registerz7register the distribution with the Python package index�list-classifiersN� list the valid Trove classifiers�strict�BWill stop the registering if the meta-data are not fully compliant�verify�checkcCsdS)NT�)�selfr
r
�2/usr/lib64/python3.6/distutils/command/register.py�<lambda>szregister.<lambda>cCstj|�d|_d|_dS)Nr)r�initialize_options�list_classifiersr	)rr
r
rrs
zregister.initialize_optionscCs*tj|�d|jfdd�}||jjd<dS)Nr�)r	�restructuredtextr)rr)r�finalize_optionsr	�distributionZcommand_options)rZ
check_optionsr
r
rr$s
zregister.finalize_optionscCsX|j�|j�x|j�D]}|j|�qW|jr<|j�n|jrL|j�n|j�dS)N)	r�_set_configZget_sub_commandsZrun_commandZdry_run�verify_metadatar�classifiers�
send_metadata)rZcmd_namer
r
r�run+s

zregister.runcCs8tdt�|jjd�}|j�|j|_d|_|j�dS)zDeprecated API.zddistutils.command.register.check_metadata is deprecated,               use the check command insteadrrN)r�PendingDeprecationWarningrZget_command_objZensure_finalizedr	rr)rrr
r
r�check_metadata:szregister.check_metadatacCsz|j�}|ikr@|d|_|d|_|d|_|d|_d|_n6|jd|jfkr^td|j��|jdkrp|j|_d|_d	S)
z: Reads the configuration file and set attributes.
        �username�password�
repository�realmTZpypiz%s not found in .pypircFN)Z_read_pypircrrr r!�
has_configZDEFAULT_REPOSITORY�
ValueError)r�configr
r
rrDs




zregister._set_configcCs*|jd}tjj|�}tj|j|��dS)z8 Fetch the list of classifiers from the server.
        z?:action=list_classifiersN)r �urllib�requestZurlopenr�info�_read_pypi_response)rZurlZresponser
r
rrUs
zregister.classifierscCs&|j|jd��\}}tjd||�dS)zF Send the metadata to the package index server to be checked.
        rzServer response (%s): %sN)�post_to_server�build_post_datarr')r�code�resultr
r
rr\szregister.verify_metadatac
Cs|jrd}|j}|j}nd}d}}dj�}x:||krf|jdtj�t�}|sTd}q.||kr.td�q.W|dk�r|x|s�td�}qtWx|s�t	j	d�}q�Wt
jj�}t
j
j|j�d	}|j|j|||�|j|jd
�|�\}}|jd||ftj�|dk�r|j�r||j_nj|jd
tj�|jd|j�tj�d}x&|j�dk�r\td�}|�s8d}�q8W|j�dk�r|j||��n�|dk�r�ddi}	d|	d<|	d<|	d<d|	d<x|	d�s�td�|	d<�q�Wx�|	d|	dk�rNx|	d�s�t	j	d�|	d<�q�Wx|	d�st	j	d�|	d<�qW|	d|	dk�r�d|	d<d|	d<td��q�Wx|	d�sltd�|	d<�qRW|j|	�\}}|dk�r�tjd||�ntjd�tjd �nT|d!k�rdd"i}	d|	d<x|	d�s�td#�|	d<�q�W|j|	�\}}tjd||�dS)$a_ Send the metadata to the package index server.

            Well, do the following:
            1. figure who the user is, and then
            2. send the data as a Basic auth'ed POST.

            First we try to read the username/password from $HOME/.pypirc,
            which is a ConfigParser-formatted file with a section
            [distutils] containing username and password entries (both
            in clear text). Eg:

                [distutils]
                index-servers =
                    pypi

                [pypi]
                username: fred
                password: sekrit

            Otherwise, to figure who the user is, we offer the user three
            choices:

             1. use existing login,
             2. register as a new user, or
             3. set the password to a random string and email the user.

        �1�x�z1 2 3 4z�We need to know who you are, so please choose either:
 1. use your existing login,
 2. register as a new user,
 3. have the server generate a new password for you (and email it to you), or
 4. quit
Your selection [default 1]: z&Please choose one of the four options!z
Username: z
Password: rZsubmitzServer response (%s): %s��zAI can store your PyPI login so future submissions will be faster.z (the login will be stored in %s)�XZynzSave your login (y/N)?�n�y�2z:action�user�namerZemailNZconfirmz
 Confirm: z!Password and confirm don't match!z
   EMail: z"You will receive an email shortly.z7Follow the instructions in it to complete registration.�3Zpassword_resetzYour email address: )r"rr�split�announcer�INFO�input�print�getpassr%r&ZHTTPPasswordMgr�parseZurlparser Zadd_passwordr!r)r*rZ_get_rc_file�lowerZ
_store_pypircr')
rZchoicerr�choices�auth�hostr+r,�datar
r
rrcs�











zregister.send_metadatacCs�|jj}|d|j�|j�|j�|j�|j�|j�|j�|j	�|j
�|j�|j�|j
�|j�|j�|j�d�}|ds�|ds�|dr�d|d<|S)Nz1.0)z:action�metadata_versionr6�versionZsummaryZ	home_pageZauthorZauthor_email�license�description�keywords�platformrZdownload_url�provides�requires�	obsoletesrJrKrLz1.1rD)rZmetadataZget_nameZget_versionZget_descriptionZget_urlZget_contactZget_contact_emailZget_licenceZget_long_descriptionZget_keywordsZ
get_platformsZget_classifiersZget_download_urlZget_providesZget_requiresZ
get_obsoletes)r�action�metarCr
r
rr*�s*zregister.build_post_datacCsd|kr$|jd|d|jftj�d}d|}|d}tj�}x�|j�D]�\}}t|�tg�tf�fkrp|g}xZ|D]R}t|�}|j	|�|j	d|�|j	d�|j	|�|rv|dd	krv|j	d
�qvWqJW|j	|�|j	d
�|j
�jd�}d|tt|��d
�}	t
jj|j||	�}
t
jjt
jj|d��}d}y|j|
�}Wnxt
jjk
�r�}
z$|j�rl|
jj�}|
j|
jf}WYdd}
~
XnJt
jjk
�r�}
zdt|
�f}WYdd}
~
XnX|j�r�|j|�}d}|j�rd
jdd|ddf�}|j|tj�|S)zC Post a query to the server, and return a string response.
        r6zRegistering %s to %sz3--------------GHSKFJDLGDS7543FJKLFHRE75642756743254z
--z--z*
Content-Disposition: form-data; name="%s"z

r�
�
zutf-8z/multipart/form-data; boundary=%s; charset=utf-8)zContent-typezContent-length)Zpassword_mgrr/Ni�r0�OK�-�K���)r0rQ)r9r rr:�io�StringIO�items�type�str�write�getvalue�encode�lenr%r&ZRequestZbuild_openerZHTTPBasicAuthHandler�open�errorZ	HTTPErrorZ
show_response�fp�readr+�msgZURLErrorr(�join)rrCrA�boundaryZsep_boundaryZend_boundaryZbody�key�valueZheadersZreq�openerr,�erbr
r
rr)�sV







zregister.post_to_server)rNr)r	Nr
)N)�__name__�
__module__�__qualname__rGrZuser_optionsZboolean_optionsZsub_commandsrrrrrrrrr*r)r
r
r
rrs&
zr)�__doc__r=rUZurllib.parser%Zurllib.request�warningsrZdistutils.corerZdistutils.errorsZ	distutilsrrr
r
r
r�<module>sPKV['5�5��0command/__pycache__/build_scripts.cpython-36.pycnu�[���3


 \X�@s�dZddlZddlZddlmZddlmZddlmZddl	m
Z
ddlmZm
Z
ddlmZddlZejd	�ZGd
d�de�ZGdd
�d
ee
�ZdS)zRdistutils.command.build_scripts

Implements the Distutils 'build_scripts' command.�N)�ST_MODE)�	sysconfig)�Command)�newer)�convert_path�	Mixin2to3)�logs^#!.*python[0-9.]*([ 	].*)?$c@sHeZdZdZdddgZdgZdd�Zd
d�Zdd�Zdd�Z	dd�Z
dS)�
build_scriptsz("build" scripts (copy and fixup #! line)�
build-dir=�d�directory to "build" (copy) to�force�f�1forcibly build everything (ignore file timestamps�executable=�e�*specify final destination interpreter pathcCs"d|_d|_d|_d|_d|_dS)N)�	build_dir�scriptsr
�
executable�outfiles)�self�r�7/usr/lib64/python3.6/distutils/command/build_scripts.py�initialize_optionss
z build_scripts.initialize_optionscCs|jdddd�|jj|_dS)	NZbuildr	rr
r)r	r)r
r
)rr)Zset_undefined_optionsZdistributionr)rrrr�finalize_options%s
zbuild_scripts.finalize_optionscCs|jS)N)r)rrrr�get_source_files,szbuild_scripts.get_source_filescCs|js
dS|j�dS)N)r�copy_scripts)rrrr�run/szbuild_scripts.runc"Cs�|j|j�g}g}�x,|jD�] }d}t|�}tjj|jtjj|��}|j|�|j	rtt
||�rttjd|�qyt
|d�}Wn tk
r�|js��d}YnXXtj|j�\}}|jd�|j�}	|	s�|jd|�qtj|	�}
|
r�d}|
jd�p�d	}|�rtjd
||j�|j|�|j�stj�s2|j}n(tjjtjd�dtjd
�tjd�f�}tj|�}d||d}
y|
jd�Wn$tk
�r�t dj!|
���YnXy|
j|�Wn&tk
�r�t dj!|
|���YnXt
|d��}|j"|
�|j#|j$��WdQRX|�r@|j%�q|�r*|j%�|j|�|j&||�qWtj'dk�r�xh|D]`}|j�rptjd|�nDtj(|�t)d@}|dBd@}||k�rVtjd|||�tj*||��qVW||fS)a"Copy each script listed in 'self.scripts'; if it's marked as a
        Python script in the Unix way (first line matches 'first_line_re',
        ie. starts with "\#!" and contains "python"), then adjust the first
        line to refer to the current Python interpreter as we copy.
        Fznot copying %s (up-to-date)�rbNrz%s is an empty file (skipping)T��zcopying and adjusting %s -> %s�BINDIRz
python%s%s�VERSION�EXEs#!�
zutf-8z.The shebang ({!r}) is not decodable from utf-8zAThe shebang ({!r}) is not decodable from the script encoding ({})�wb�posixzchanging mode of %si�imz!changing mode of %s from %o to %o)+Zmkpathrrr�os�path�join�basename�appendr
rr�debug�open�OSError�dry_run�tokenize�detect_encoding�readline�seek�warn�
first_line_re�match�group�inforZpython_buildr�get_config_var�fsencode�decode�UnicodeDecodeError�
ValueError�format�write�
writelines�	readlines�closeZ	copy_file�name�statr�chmod)rr�
updated_filesZscriptZadjustZoutfiler�encoding�linesZ
first_liner7Zpost_interprZshebangZoutf�fileZoldmodeZnewmoderrrr5s�












zbuild_scripts.copy_scriptsN)r
rr)r
rr)rrr)�__name__�
__module__�__qualname__ZdescriptionZuser_optionsZboolean_optionsrrrrrrrrrr	sr	c@seZdZdd�ZdS)�build_scripts_2to3cCs&tj|�\}}|js|j|�||fS)N)r	rr0Zrun_2to3)rrrGrrrr�s
zbuild_scripts_2to3.copy_scriptsN)rKrLrMrrrrrrN�srN)�__doc__r(�rerErZ	distutilsrZdistutils.corerZdistutils.dep_utilrZdistutils.utilrrrr1�compiler6r	rNrrrr�<module>s

PKV[���884command/__pycache__/install_lib.cpython-36.opt-1.pycnu�[���3


 \� �@sLdZddlZddlZddlZddlmZddlmZdZ	Gdd�de�Z
dS)zkdistutils.command.install_lib

Implements the Distutils 'install_lib' command
(install all Python modules).�N)�Command)�DistutilsOptionErrorz.pyc	@s�eZdZdZd*d+d,d-d.d/d0gZdddgZddiZdd�Zdd�Zdd�Z	dd�Z
dd�Zd d!�Zd"d#�Z
d$d%�Zd&d'�Zd(d)�ZdS)1�install_libz7install all Python modules (extensions and pure Python)�install-dir=�d�directory to install to�
build-dir=�b�'build directory (where to install from)�force�f�-force installation (overwrite existing files)�compile�c�compile .py to .pyc [default]�
no-compileN�don't compile .py files�	optimize=�O�lalso compile with optimization: -O1 for "python -O", -O2 for "python -OO", and -O0 to disable [default: -O0]�
skip-build�skip the build stepscCs(d|_d|_d|_d|_d|_d|_dS)Nr)�install_dir�	build_dirrr�optimize�
skip_build)�self�r�5/usr/lib64/python3.6/distutils/command/install_lib.py�initialize_options3szinstall_lib.initialize_optionscCs�|jddddddd�|jdkr&d
|_|jdkr6d|_t|jt�s�yt|j�|_|jdkr^t�Wn ttfk
r�td��YnXdS)N�install�	build_librrrrrrrTFr��zoptimize must be 0, 1, or 2)r!r)rr)rr)rr)rr)rr)rr"r#)Zset_undefined_optionsrr�
isinstance�int�AssertionError�
ValueErrorr)rrrr�finalize_options<s$


zinstall_lib.finalize_optionscCs0|j�|j�}|dk	r,|jj�r,|j|�dS)N)�buildr �distribution�has_pure_modules�byte_compile)r�outfilesrrr�runVszinstall_lib.runcCs2|js.|jj�r|jd�|jj�r.|jd�dS)N�build_py�	build_ext)rr*r+Zrun_command�has_ext_modules)rrrrr)fs



zinstall_lib.buildcCs8tjj|j�r |j|j|j�}n|jd|j�dS|S)Nz3'%s' does not exist -- no Python modules to install)�os�path�isdirrZ	copy_treer�warn)rr-rrrr ms
zinstall_lib.installcCsrtjr|jd�dSddlm}|jd�j}|jrH||d|j||j	d�|j
dkrn|||j
|j||j|j	d�dS)Nz%byte-compiling is disabled, skipping.r)r,r )rr�prefix�dry_run)rrr6�verboser7)�sys�dont_write_bytecoder5Zdistutils.utilr,�get_finalized_command�rootrrr7rr8)r�filesr,Zinstall_rootrrrr,vs


zinstall_lib.byte_compilec
Csh|sgS|j|�}|j�}t||�}t|�ttj�}g}x(|D] }	|jtjj||	|d���q@W|S)N)	r;�get_outputs�getattr�lenr2�sep�appendr3�join)
rZhas_anyZ	build_cmdZ
cmd_optionZ
output_dirZbuild_filesrZ
prefix_lenZoutputs�filerrr�_mutate_outputs�s


 zinstall_lib._mutate_outputscCsvg}xl|D]d}tjjtjj|��d}|tkr0q
|jrL|jtjj	|dd��|j
dkr
|jtjj	||j
d��q
W|S)Nr"�)�optimizationr)r2r3�splitext�normcase�PYTHON_SOURCE_EXTENSIONrrB�	importlib�util�cache_from_sourcer)rZpy_filenamesZbytecode_filesZpy_fileZextrrr�_bytecode_filenames�s



zinstall_lib._bytecode_filenamescCsR|j|jj�dd|j�}|jr*|j|�}ng}|j|jj�dd|j�}|||S)z�Return the list of files that would be installed if this command
        were actually run.  Not affected by the "dry-run" flag or whether
        modules have actually been built yet.
        r/r!r0)rEr*r+rrrNr1)rZpure_outputsZbytecode_outputsZext_outputsrrrr>�szinstall_lib.get_outputscCsLg}|jj�r&|jd�}|j|j��|jj�rH|jd�}|j|j��|S)z�Get the list of files that are input to this command, ie. the
        files that get installed as they are named in the build tree.
        The files in this list correspond one-to-one to the output
        filenames returned by 'get_outputs()'.
        r/r0)r*r+r;�extendr>r1)rZinputsr/r0rrr�
get_inputs�s



zinstall_lib.get_inputs)rrr)rr	r
)rrr
)rrr)rNr)rrr)rNr)�__name__�
__module__�__qualname__ZdescriptionZuser_optionsZboolean_optionsZnegative_optrr(r.r)r r,rErNr>rPrrrrrs*
		r)�__doc__r2�importlib.utilrKr9Zdistutils.corerZdistutils.errorsrrJrrrrr�<module>sPKV[y�Mi��5command/__pycache__/install_data.cpython-36.opt-2.pycnu�[���3


 \�@s8ddlZddlmZddlmZmZGdd�de�ZdS)�N)�Command)�change_root�convert_pathc@sHeZdZdZdddgZdgZdd�Zd
d�Zdd�Zdd�Z	dd�Z
dS)�install_datazinstall data files�install-dir=�d�Ibase directory for installing data files (default: installation base dir)�root=N�<install everything relative to this alternate root directory�force�f�-force installation (overwrite existing files)cCs,d|_g|_d|_d|_|jj|_d|_dS)Nr�)�install_dir�outfiles�rootrZdistribution�
data_files�warn_dir)�self�r�6/usr/lib64/python3.6/distutils/command/install_data.py�initialize_optionss
zinstall_data.initialize_optionscCs|jdddd�dS)	NZinstallrrrr)rr)rr)rr)Zset_undefined_options)rrrr�finalize_options#szinstall_data.finalize_optionscCs|j|j�x�|jD]�}t|t�rdt|�}|jrD|jd||jf�|j||j�\}}|j	j
|�qt|d�}tjj
|�s�tjj|j|�}n|jr�t|j|�}|j|�|dgkr�|j	j
|�qx4|dD](}t|�}|j||�\}}|j	j
|�q�WqWdS)NzMsetup script did not provide a directory for '%s' -- installing right in '%s'rr)Zmkpathrr�
isinstance�strrr�warnZ	copy_filer�append�os�path�isabs�joinrr)rr�out�_�dir�datarrr�run*s*

zinstall_data.runcCs
|jpgS)N)r)rrrr�
get_inputsKszinstall_data.get_inputscCs|jS)N)r)rrrr�get_outputsNszinstall_data.get_outputs)rrr)r	Nr
)rrr
)�__name__�
__module__�__qualname__ZdescriptionZuser_optionsZboolean_optionsrrr%r&r'rrrrrs!r)rZdistutils.corerZdistutils.utilrrrrrrr�<module>sPKV[�W��|3|30command/__pycache__/install.cpython-36.opt-2.pycnu�[���3

�\dh�j�@sddlZddlZddlmZddlmZddlmZddlm	Z	ddl
mZddlm
Z
ddlmZmZmZdd	lmZdd
l
mZddlmZddlmZd
Zdddddd�Zdddddd�dddddd�ed�Ze�rdddddd�ed<ddd d!dd�ed"<d*ZGd(d)�d)e�ZdS)+�N)�log)�Command)�DEBUG)�get_config_vars)�DistutilsPlatformError)�
write_file)�convert_path�
subst_vars�change_root)�get_platform)�DistutilsOptionError)�	USER_BASE)�	USER_SITETz$base/Lib/site-packagesz$base/Include/$dist_namez
$base/Scriptsz$base)�purelib�platlib�headers�scripts�dataz/$base/lib/python$py_version_short/site-packagesz5$platbase/lib64/python$py_version_short/site-packagesz9$base/include/python$py_version_short$abiflags/$dist_namez	$base/binz$base/lib/pythonz$base/lib64/pythonz$base/include/python/$dist_name)�unix_prefix�	unix_home�ntz	$usersitez4$userbase/Python$py_version_nodot/Include/$dist_namez)$userbase/Python$py_version_nodot/Scriptsz	$userbase�nt_userz=$userbase/include/python$py_version_short$abiflags/$dist_namez
$userbase/bin�	unix_userrrrrrc@s:eZdZdZd_d`dadbdddedfdgdidjdkdldmdndodpdqdrgZdd%d(gZer`ejd,dd-ef�ejd,�d diZ	d.d/�Z
d0d1�Zd2d3�Zd4d5�Z
d6d7�Zd8d9�Zd:d;�Zd<d=�Zd>d?�Zd@dA�ZdBdC�ZdDdE�ZdFdG�ZdHdI�ZdJdK�ZdLdM�ZdNdO�ZdPdQ�ZdRdS�ZdTdU�ZdVdW�ZdXefdYefdZefd[efd\d]d^�fgZdS)s�installz'install everything from build directory�prefix=N�installation prefix�exec-prefix=�.(Unix only) prefix for platform-specific files�home=�+(Unix only) home directory to install under�
install-base=�;base installation directory (instead of --prefix or --home)�install-platbase=z8base installation directory for platform-specific files z$(instead of --exec-prefix or --home)�root=�<install everything relative to this alternate root directory�install-purelib=�;installation directory for pure Python module distributions�install-platlib=�8installation directory for non-pure module distributions�install-lib=z4installation directory for all module distributions z3(overrides --install-purelib and --install-platlib)�install-headers=�(installation directory for C/C++ headers�install-scripts=�)installation directory for Python scripts�
install-data=�%installation directory for data files�compile�c�compile .py to .pyc [default]�
no-compile�don't compile .py files�	optimize=�O�lalso compile with optimization: -O1 for "python -O", -O2 for "python -OO", and -O0 to disable [default: -O0]�force�f�1force installation (overwrite any existing files)�
skip-build�2skip rebuilding everything (for testing/debugging)�record=�3filename in which to record list of installed files�userz!install in user site-package '%s'cCs�d|_d|_d|_d|_d|_d|_d|_d|_d|_d|_	d|_
d|_d|_t
|_t|_d|_d|_d|_d|_d|_d|_d|_d|_d|_d|_dS)Nr�)�prefix�exec_prefix�homer?�install_base�install_platbase�root�install_purelib�install_platlib�install_headers�install_lib�install_scripts�install_datar
�install_userbaser�install_usersiter0�optimize�
extra_path�install_path_filer8�
skip_build�warn_dir�
build_base�	build_lib�record)�self�rX�1/usr/lib64/python3.6/distutils/command/install.py�initialize_options�s2zinstall.initialize_optionscCsx|js|js|jr&|js|jr&td$��|jr@|js8|jr@td��|jrl|jsd|jsd|jsd|jsd|jrltd��tjdkr�|jr�|j	d�d|_|j
d�tjdkr�|j�n|j�|j
d�t
jj�d	}td
d�\}}y
t
j}Wntk
r�d}YnX|jj�|jj�|jj�|d
t
jdd�dt
jdd�|||||d�|_t�rf|j|jd<|j|jd<|j�|j
d�|j|jd<|j|jd<t�r�d	dlm}td�||j�|j �|j
d�|j�r�|j!�|j"dk�r�|jj#�r�|j$|_"n|j%|_"|j&dddddddd�|j'�|j"|_(tj)j*|j"|j+�|_"|j,dk	�r\|j-ddddddd�|j
d �|j.d!d%d&�dS)'Nz.must supply either prefix/exec-prefix/home or z)install-base/install-platbase -- not bothz9must supply either home or prefix/exec-prefix -- not bothzGcan't combine user with prefix, exec_prefix/home, or install_(plat)base�posixz+exec-prefix option ignored on this platformzpre-finalize_{unix,other}zpost-finalize_{unix,other}()rrArB�z%d.%d�z%d%d)Z	dist_nameZdist_versionZ
dist_fullname�
py_version�py_version_short�py_version_nodotZ
sys_prefixrAZsys_exec_prefixrB�abiflags�userbaseZusersitezpost-expand_basedirs()�base�platbase)�pprintzconfig vars:zpost-expand_dirs()�librrrrrZlibbasezafter prepending root�buildrTrUzWmust supply either prefix/exec-prefix/home or install-base/install-platbase -- not both)rTrT)rUrU)/rArBrCrDrErr?�os�name�warn�	dump_dirs�
finalize_unix�finalize_other�sys�version�splitrra�AttributeError�distributionZget_nameZget_versionZget_fullname�version_info�config_vars�
HAS_USER_SITErMrN�expand_basedirsrre�print�expand_dirs�create_home_pathrJZext_modulesrHrG�
convert_paths�handle_extra_path�install_libbase�path�join�
extra_dirsrF�change_rootsZset_undefined_options)rWr^rArBrarerXrXrY�finalize_options�s�

















zinstall.finalize_optionscCs�tsdSddlm}tj|d�x||jD]r}|d}|ddkrN|dd�}||jkrz|j|}|j|�}t||�}n|j|�}t||�}tjd||�q*WdS)	Nr)�
longopt_xlate�:r@�=z  %s: %s���r�)	rZdistutils.fancy_getoptr�r�debug�user_options�negative_opt�	translate�getattr)rW�msgr��optZopt_name�valrXrXrYrkus




zinstall.dump_dirscCsX|jdk	s|jdk	r\|jdkr2|jdkr2|jdksP|jdksP|jdksP|jdkrXtd��dS|j	r�|j
dkrttd��|j
|_|_|jd�n�|j
dk	r�|j
|_|_|jd�n�|jdk�r&|jdk	r�td��ttd�p�tjtjkr�dtjkr�d}nd	}tjjtj�||_tjjtj�||_n|jdk�r:|j|_|j|_|j|_|jd
�dS)NzPinstall-base or install-platbase supplied, but installation scheme is incompletez$User base directory is not specifiedrrz*must not supply exec-prefix without prefixZreal_prefix�RPM_BUILD_ROOTz/localr\r)rDrErJrGrHrIrKrLrr?rMr�
select_schemerCrArB�hasattrrn�base_prefixrh�environr}�normpath)rWZadditionrXrXrYrl�sF










zinstall.finalize_unixcCs�|jr8|jdkrtd��|j|_|_|jtjd�n�|jdk	r\|j|_|_|jd�n\|j	dkrvtj
jtj	�|_	|j	|_|_y|jtj�Wn"t
k
r�tdtj��YnXdS)Nz$User base directory is not specifiedZ_userrz)I don't know how to install stuff on '%s')r?rMrrDrEr�rhrirCrAr}r�rn�KeyError)rWrXrXrYrm�s"


zinstall.finalize_othercCs@t|}x2tD]*}d|}t||�dkrt||||�qWdS)N�install_)�INSTALL_SCHEMES�SCHEME_KEYSr��setattr)rWri�scheme�keyZattrnamerXrXrYr��s

zinstall.select_schemecCs\xV|D]N}t||�}|dk	rtjdks0tjdkr<tjj|�}t||j�}t|||�qWdS)Nr[r)r�rhrir}�
expanduserr	rtr�)rWZattrs�attrr�rXrXrY�
_expand_attrs�s

zinstall._expand_attrscCs|jdddg�dS)NrDrErF)r�)rWrXrXrYrv�szinstall.expand_basedirscCs|jddddddg�dS)NrGrHrJrIrKrL)r�)rWrXrXrYrx�szinstall.expand_dirscGs0x*|D]"}d|}t||tt||���qWdS)Nr�)r�rr�)rW�namesrir�rXrXrYrz�s
zinstall.convert_pathscCs�|jdkr|jj|_|jdk	r�tjd�t|jt�rB|jjd�|_t|j�dkr`|jd}}n"t|j�dkrz|j\}}ntd��t	|�}nd}d}||_
||_dS)NzIDistribution option extra_path is deprecated. See issue27919 for details.�,r@rr]zY'extra_path' option must be a list, tuple, or comma-separated string with 1 or 2 elementsr\)rPrrrrj�
isinstance�strrp�lenrr�	path_filer)rWr�rrXrXrYr{�s$



zinstall.handle_extra_pathc	Gs4x.|D]&}d|}t||t|jt||���qWdS)Nr�)r�r
rFr�)rWr�rir�rXrXrYr�s
zinstall.change_rootscCsh|js
dSttjjd��}xH|jj�D]:\}}|j|�r&tjj|�r&|j	d|�tj
|d�q&WdS)N�~zos.makedirs('%s', 0o700)i�)r?rrhr}r�rt�items�
startswith�isdirZdebug_print�makedirs)rWrCrir}rXrXrYryszinstall.create_home_pathcCs,|js6|jd�|jjd�j}|jr6|t�kr6td��x|j�D]}|j|�q@W|j	r`|j
�|jr�|j�}|j
r�t|j
�}x(tt|��D]}|||d�||<q�W|jt|j|fd|j�ttjjtj�}ttjj|�}tjjtjj|j��}|j�r(|j	�o
|j�r(||k�r(tjd|j�dS)Nrgz"Can't install when cross-compilingz'writing list of installed files to '%s'z�modules installed to '%s', which is not in Python's module search path (sys.path) -- you'll have to change the search path yourself)rRZrun_commandrrZget_command_objZ	plat_namerSrr�get_sub_commandsr��create_path_filerV�get_outputsrFr��range�executer�maprhr}r�rn�normcaserJrQrr�)rWZ
build_plat�cmd_name�outputsZroot_lenZcounterZsys_pathrJrXrXrY�run(s6



zinstall.runcCsJtjj|j|jd�}|jr8|jt||jgfd|�n|j	d|�dS)Nz.pthzcreating %szpath file '%s' not created)
rhr}r~r|r�rQr�rrrj)rW�filenamerXrXrYr�Ts

zinstall.create_path_filecCspg}x>|j�D]2}|j|�}x"|j�D]}||kr&|j|�q&WqW|jrl|jrl|jtjj|j	|jd��|S)Nz.pth)
r��get_finalized_commandr��appendr�rQrhr}r~r|)rWr�r��cmdr�rXrXrYr�bs
zinstall.get_outputscCs2g}x(|j�D]}|j|�}|j|j��qW|S)N)r�r��extend�
get_inputs)rWZinputsr�r�rXrXrYr�ss

zinstall.get_inputscCs|jj�p|jj�S)N)rrZhas_pure_modulesZhas_ext_modules)rWrXrXrY�has_libs
zinstall.has_libcCs
|jj�S)N)rr�has_headers)rWrXrXrYr��szinstall.has_headerscCs
|jj�S)N)rr�has_scripts)rWrXrXrYr��szinstall.has_scriptscCs
|jj�S)N)rrZhas_data_files)rWrXrXrY�has_data�szinstall.has_datarJrIrKrLZinstall_egg_infocCsdS)NTrX)rWrXrXrY�<lambda>�szinstall.<lambda>)rNr)rNr)rNr)r Nr!�\base installation directory for platform-specific files (instead of --exec-prefix or --home))r"Nr�)r#Nr$)r%Nr&)r'Nr(�ginstallation directory for all module distributions (overrides --install-purelib and --install-platlib))r)Nr�)r*Nr+)r,Nr-)r.Nr/)r0r1r2)r3Nr4)r5r6r7)r8r9r:)r;Nr<)r=Nr>) �__name__�
__module__�__qualname__Zdescriptionr�Zboolean_optionsrur�rr�rZr�rkrlrmr�r�rvrxrzr{r�ryr�r�r�r�r�r�r�r�Zsub_commandsrXrXrXrYrIs�

N3		",r)rrrrr)rnrhZ	distutilsrZdistutils.corerZdistutils.debugrZdistutils.sysconfigrZdistutils.errorsrZdistutils.file_utilrZdistutils.utilrr	r
rrZsiter
rruZWINDOWS_SCHEMEr�r�rrXrXrXrY�<module>sTPKV[�J%�"$"$1command/__pycache__/build_py.cpython-36.opt-2.pycnu�[���3


 \C�@szddlZddlZddlZddlmZddlmZddlTddlm	Z	m
Z
ddlmZGdd�de�Z
Gd	d
�d
e
e
�ZdS)�N)�glob)�Command)�*)�convert_path�	Mixin2to3)�logc@s�eZdZdZd8d9d:d;d<gZddgZddiZdd�Zdd�Zdd�Z	dd�Z
dd�Zdd�Zdd�Z
dd �Zd!d"�Zd#d$�Zd%d&�Zd'd(�Zd)d*�Zd+d,�Zd=d.d/�Zd0d1�Zd2d3�Zd4d5�Zd6d7�Zd	S)>�build_pyz5"build" pure Python modules (copy to build directory)�
build-lib=�d�directory to "build" (copy) to�compile�c�compile .py to .pyc�
no-compileN�!don't compile .py files [default]�	optimize=�O�lalso compile with optimization: -O1 for "python -O", -O2 for "python -OO", and -O0 to disable [default: -O0]�force�f�2forcibly build everything (ignore file timestamps)cCs4d|_d|_d|_d|_d|_d|_d|_d|_dS)Nr)�	build_lib�
py_modules�package�package_data�package_dirr�optimizer)�self�r�2/usr/lib64/python3.6/distutils/command/build_py.py�initialize_options szbuild_py.initialize_optionscCs�|jddd�|jj|_|jj|_|jj|_i|_|jjrbx&|jjj�D]\}}t|�|j|<qHW|j�|_	t
|jt�s�yt|j�|_Wn t
tfk
r�td��YnXdS)NZbuildrrzoptimize must be 0, 1, or 2)rr)rr)Zset_undefined_options�distribution�packagesrrr�itemsr�get_data_files�
data_files�
isinstancer�int�
ValueError�AssertionErrorZDistutilsOptionError)r�name�pathrrr�finalize_options*s"



zbuild_py.finalize_optionscCs:|jr|j�|jr$|j�|j�|j|jdd��dS)Nr)�include_bytecode)r�
build_modulesr"�build_packages�build_package_data�byte_compile�get_outputs)rrrr�runCszbuild_py.runcs�g}|js|Sxr|jD]h}|j|�}tjj|jg|jd��}d�|rRt|�d��fdd�|j||�D�}|j	||||f�qW|S)N�.r�csg|]}|�d��qS)Nr)�.0�file)�plenrr�
<listcomp>tsz+build_py.get_data_files.<locals>.<listcomp>)
r"�get_package_dir�osr+�joinr�split�len�find_data_files�append)r�datar�src_dir�	build_dir�	filenamesr)r8rr$as
zbuild_py.get_data_filescs`|jjdg�|jj|g�}g�x:|D]2}ttjj|t|���}�j�fdd�|D��q&W�S)N�cs$g|]}|�krtjj|�r|�qSr)r;r+�isfile)r6�fn)�filesrrr9�s
z,build_py.find_data_files.<locals>.<listcomp>)r�getrr;r+r<r�extend)rrrBZglobs�patternZfilelistr)rHrr?ys
zbuild_py.find_data_filescCshd}x^|jD]T\}}}}xF|D]>}tjj||�}|jtjj|��|jtjj||�|dd�qWqWdS)NF)�
preserve_mode)r%r;r+r<�mkpath�dirname�	copy_file)rZlastdirrrBrCrD�filename�targetrrrr0�s
zbuild_py.build_package_datacCs�|jd�}|js&|r tjj|�SdSn�g}x�|r�y|jdj|�}Wn*tk
rn|jd|d�|d=Yq,X|jd|�tjj|�Sq,W|jjd�}|dk	r�|jd|�|r�tjj|�SdSdS)Nr4rErr5���rR)r=rr;r+r<�KeyError�insertrI)rrr+�tailZpdirrrrr:�s(
	zbuild_py.get_package_dircCsj|dkr8tjj|�s td|��tjj|�s8td|��|rftjj|d�}tjj|�rZ|Stjd|�dS)NrEz%package directory '%s' does not existz>supposed package directory '%s' exists, but is not a directoryz__init__.pyz!package init file '%s' not found z(or not a regular file)z8package init file '%s' not found (or not a regular file))	r;r+�existsZDistutilsFileError�isdirr<rFr�warn)rrr�init_pyrrr�
check_package�s
zbuild_py.check_packagecCs&tjj|�stjd||�dSdSdS)Nz!file %s (for module %s) not foundFT)r;r+rFrrX)r�module�module_filerrr�check_module�szbuild_py.check_modulec	Cs�|j||�ttjj|d��}g}tjj|jj�}xX|D]P}tjj|�}||krztjjtjj	|��d}|j
|||f�q8|jd|�q8W|S)Nz*.pyrzexcluding %s)rZrr;r+r<�abspathr!Zscript_name�splitext�basenamer@Zdebug_print)	rrrZmodule_files�modulesZsetup_scriptrZabs_fr[rrr�find_package_modules�s
zbuild_py.find_package_modulesc
Cs�i}g}x�|jD]�}|jd�}dj|dd��}|d}y||\}}Wn"tk
rj|j|�}d}YnX|s�|j||�}	|df||<|	r�|j|d|	f�tjj||d�}
|j	||
�s�q|j|||
f�qW|S)Nr4rr5�__init__z.pyrRrR)
rr=r<rSr:rZr@r;r+r])rr"rar[r+rZmodule_baserZcheckedrYr\rrr�find_modules�s*


zbuild_py.find_modulescCsRg}|jr|j|j��|jrNx.|jD]$}|j|�}|j||�}|j|�q&W|S)N)rrJrdr"r:rb)rrarr�mrrr�find_all_moduless
zbuild_py.find_all_modulescCsdd�|j�D�S)NcSsg|]}|d�qS)r5rRr)r6r[rrrr9-sz-build_py.get_source_files.<locals>.<listcomp>)rf)rrrr�get_source_files,szbuild_py.get_source_filescCs$|gt|�|dg}tjj|�S)Nz.py)�listr;r+r<)rrCrr[Zoutfile_pathrrr�get_module_outfile/szbuild_py.get_module_outfiler5cCs�|j�}g}xx|D]p\}}}|jd�}|j|j||�}|j|�|r|jr`|jtjj|dd��|j	dkr|jtjj||j	d��qW|dd�|j
D�7}|S)Nr4rE)�optimizationrcSs,g|]$\}}}}|D]}tjj||��qqSr)r;r+r<)r6rrBrCrDrPrrrr9Cs
z(build_py.get_outputs.<locals>.<listcomp>)rfr=rirr@r�	importlib�util�cache_from_sourcerr%)rr-raZoutputsrr[r\rPrrrr23s"




zbuild_py.get_outputscCsbt|t�r|jd�}nt|ttf�s,td��|j|j||�}tj	j
|�}|j|�|j||dd�S)Nr4z:'package' must be a string (dot-separated), list, or tupler)rL)
r&�strr=rh�tuple�	TypeErrorrirr;r+rNrMrO)rr[r\rZoutfile�dirrrr�build_moduleJs

zbuild_py.build_modulecCs.|j�}x |D]\}}}|j|||�qWdS)N)rdrr)rrarr[r\rrrr.Yszbuild_py.build_modulescCsLxF|jD]<}|j|�}|j||�}x |D]\}}}|j|||�q(WqWdS)N)r"r:rbrr)rrrraZpackage_r[r\rrrr/bs


zbuild_py.build_packagescCs�tjr|jd�dSddlm}|j}|dtjkr>|tj}|jrZ||d|j	||j
d�|jdkr||||j|j	||j
d�dS)Nz%byte-compiling is disabled, skipping.r)r1r5)rr�prefix�dry_runrR)�sys�dont_write_bytecoderX�distutils.utilr1rr;�seprrrtr)rrHr1rsrrrr1vs


zbuild_py.byte_compile)r	r
r)rr
r)rNr)rrr)rrr)r5)�__name__�
__module__�__qualname__ZdescriptionZuser_optionsZboolean_optionsZnegative_optr r,r3r$r?r0r:rZr]rbrdrfrgrir2rrr.r/r1rrrrrs8


'4
	rc@seZdZdd�Zdd�ZdS)�
build_py_2to3cCsLg|_|jr|j�|jr*|j�|j�|j|j�|j|jdd��dS)Nr)r-)	�
updated_filesrr.r"r/r0Zrun_2to3r1r2)rrrrr3�szbuild_py_2to3.runcCs,tj||||�}|dr(|jj|d�|S)Nr5r)rrrr}r@)rr[r\r�resrrrrr�szbuild_py_2to3.build_moduleN)ryrzr{r3rrrrrrr|�sr|)r;�importlib.utilrkrurZdistutils.corerZdistutils.errorsrwrrZ	distutilsrrr|rrrr�<module>s}PKV[2	a׃�.command/__pycache__/clean.cpython-36.opt-1.pycnu�[���3


 \�
�@sDdZddlZddlmZddlmZddlmZGdd�de�ZdS)zBdistutils.command.clean

Implements the Distutils 'clean' command.�N)�Command)�remove_tree)�logc@s>eZdZdZddddddgZdgZdd�Zdd�Zdd�ZdS)�cleanz-clean up temporary files from 'build' command�build-base=�b�2base build directory (default: 'build.build-base')�
build-lib=N�<build directory for all modules (default: 'build.build-lib')�build-temp=�t�7temporary build directory (default: 'build.build-temp')�build-scripts=�<build directory for scripts (default: 'build.build-scripts')�bdist-base=�+temporary directory for built distributions�all�a�7remove all build output, not just temporary by-productscCs(d|_d|_d|_d|_d|_d|_dS)N)�
build_base�	build_lib�
build_temp�
build_scripts�
bdist_baser)�self�r�//usr/lib64/python3.6/distutils/command/clean.py�initialize_options szclean.initialize_optionscCs"|jddd	d
d�|jdd�dS)
NZbuildrrrrZbdistr)rr)rr)rr)rr)rr)Zset_undefined_options)rrrr�finalize_options(szclean.finalize_optionscCs�tjj|j�r t|j|jd�ntjd|j�|jrvx@|j	|j
|jfD],}tjj|�rft||jd�qFtjd|�qFW|js�ytj
|j�tjd|j�Wntk
r�YnXdS)N)�dry_runz%'%s' does not exist -- can't clean itz
removing '%s')�os�path�existsrrrr�debugrrrr�warn�rmdirr�info�OSError)rZ	directoryrrr�run1s$
z	clean.run)rrr)r	Nr
)rrr
)rNr)rNr)rrr)	�__name__�
__module__�__qualname__ZdescriptionZuser_optionsZboolean_optionsrrr(rrrrrs"	r)	�__doc__r Zdistutils.corerZdistutils.dir_utilrZ	distutilsrrrrrr�<module>s
PKV[XX!��/command/__pycache__/upload.cpython-36.opt-1.pycnu�[���3

�\dh��@s�dZddlZddlZddlZddlZddlmZddlmZm	Z	m
Z
ddlmZddl
mZmZddlmZddlmZdd	lmZGd
d�de�ZdS)zm
distutils.command.upload

Implements the Distutils 'upload' subcommand (upload package to a package
index).
�N)�standard_b64encode)�urlopen�Request�	HTTPError)�urlparse)�DistutilsError�DistutilsOptionError)�
PyPIRCCommand)�spawn)�logc@sJeZdZdZejddgZejdgZdd	�Zd
d�Zdd
�Z	dd�Z
dS)�uploadzupload binary package to PyPI�sign�s�sign files to upload using gpg�	identity=�i�GPG identity used to sign filescCs,tj|�d|_d|_d|_d|_d|_dS)N�rF)r	�initialize_options�username�password�
show_responser
�identity)�self�r�0/usr/lib64/python3.6/distutils/command/upload.pyr s
zupload.initialize_optionscCsvtj|�|jr |jr td��|j�}|ikrX|d|_|d|_|d|_|d|_	|jrr|j
jrr|j
j|_dS)Nz.Must use --sign for --identity to have meaningrr�
repository�realm)r	�finalize_optionsrr
rZ_read_pypircrrrr�distribution)r�configrrrr(s




zupload.finalize_optionscCs>|jjsd}t|��x$|jjD]\}}}|j|||�qWdS)NzHMust create and upload files in one command (e.g. setup.py sdist upload))rZ
dist_filesr�upload_file)r�msg�command�	pyversion�filenamerrr�run:s
z
upload.runc&)Cs^t|j�\}}}}}}	|s"|s"|	r0td|j��|d2krDtd|��|jr|ddd|g}
|jrnd|jg|
d	d	�<t|
|jd
�t|d�}z|j�}Wd|j	�X|j
j}
dd
|
j�|
j
�tjj|�|f||tj|�j�d|
j�|
j�|
j�|
j�|
j�|
j�|
j�|
j�|
j�|
j�|
j�|
j�|
j �d�}ytj!|�j�}WnPt"k
�r�}z2d|}|j#|t$j%�ddl&m'}|��s|�WYdd}~Xn
X||d<d}|dk�r�t(j)�\}}}|�r�d||f}n|dk�r�dt(j(dd�}||d<|j�rtjj|�dt|dd�j�f|d<|j*d|j+j,d�}d t-|�j.d�}d!}d"|j,d�}|d#}t/j0�}x�|j1�D]�\}}d$|}t2|t3��s�|g}xr|D]j}t4|�t5k�r�|d%|d7}|d}nt6|�j,d&�}|j7|�|j7|j,d&��|j7d'�|j7|��q�W�qjW|j7|�|j8�}d(||jf}|j#|t$j%�d)|t6t9|��|d*�} t:|j|| d+�}!yt;|!�}"|"j<�}#|"j=}$Wnft>k
�r�}z|j?}#|j=}$WYdd}~Xn8t@k
�r�}z|j#t6|�t$jA��WYdd}~XnX|#d,k�r8|j#d-|#|$ft$j%�|jB�rZ|jC|"�}%d.jDd/d0|%d/d0f�}|j#|t$j%�n"d1|#|$f}|j#|t$jA�tE|��dS)3NzIncompatible url %s�http�httpszunsupported schema Zgpgz
--detach-signz-az--local-user�)�dry_run�rbZfile_upload�1z1.0)z:actionZprotocol_version�name�version�contentZfiletyper$Z
sha256_digestZmetadata_versionZsummaryZ	home_pageZauthorZauthor_email�license�description�keywords�platformZclassifiersZdownload_urlZprovidesZrequiresZ	obsoletesz#calculating md5 checksum failed: %sr)�
get_fips_modeZ
md5_digestrZ	bdist_rpmzbuilt for %s %sZ
bdist_dumbzbuilt for %s�)Zterse�commentz.ascZ
gpg_signature�:�asciizBasic z3--------------GHSKFJDLGDS7543FJKLFHRE75642756743254s
--s--
z+
Content-Disposition: form-data; name="%s"z; filename="%s"zutf-8s

zSubmitting %s to %sz multipart/form-data; boundary=%s)zContent-typezContent-lengthZ
Authorization)�data�headers��zServer response (%s): %s�
�-�KzUpload failed (%s): %s)r'r()Frr�AssertionErrorr
rr
r*�open�read�closerZmetadataZget_nameZget_version�os�path�basename�hashlibZsha256Z	hexdigestZget_descriptionZget_urlZget_contactZget_contact_emailZget_licenceZget_long_descriptionZget_keywordsZ
get_platformsZget_classifiersZget_download_urlZget_providesZget_requiresZ
get_obsoletesZmd5�
ValueErrorZannouncer�INFOZ_hashlibr4r3�distrr�encoder�decode�io�BytesIO�items�
isinstance�list�type�tuple�str�write�getvalue�lenrrZgetcoder"r�code�OSErrorZERRORrZ_read_pypi_response�joinr)&rr#r$r%ZschemaZnetlocZurlZparamsZqueryZ	fragmentsZgpg_args�fr/�metar9Zdigest�er"r4r6rIr.�idZ	user_passZauth�boundaryZsep_boundaryZend_boundaryZbody�key�value�titler:Zrequest�resultZstatus�reason�textrrrr!Bs�













zupload.upload_fileN)r
rr)rrr)�__name__�
__module__�__qualname__r1r	Zuser_optionsZboolean_optionsrrr&r!rrrrrsr)�__doc__rCrLr3rF�base64rZurllib.requestrrrZurllib.parserZdistutils.errorsrrZdistutils.corer	Zdistutils.spawnr
Z	distutilsrrrrrr�<module>sPKV[��kk3command/__pycache__/build_clib.cpython-36.opt-1.pycnu�[���3


 \V�@sTdZddlZddlmZddlTddlmZddlmZdd�Z	Gd	d
�d
e�Z
dS)z�distutils.command.build_clib

Implements the Distutils 'build_clib' command, to build a C/C++ library
that is included in the module distribution and needed by an extension
module.�N)�Command)�*)�customize_compiler)�logcCsddlm}|�dS)Nr)�show_compilers)�distutils.ccompilerr)r�r�4/usr/lib64/python3.6/distutils/command/build_clib.pyrsrc@sleZdZdZd"d#d$d%d&gZddgZdddefgZdd�Zdd�Z	dd�Z
dd�Zdd�Zdd�Z
d d!�ZdS)'�
build_clibz/build C/C++ libraries used by Python extensions�build-clib=�b�%directory to build C/C++ libraries to�build-temp=�t�,directory to put temporary build by-products�debug�g�"compile with debugging information�force�f�2forcibly build everything (ignore file timestamps)�	compiler=�c�specify the compiler typez
help-compilerNzlist available compilerscCs:d|_d|_d|_d|_d|_d|_d|_d|_d|_dS)Nr)	r
�
build_temp�	libraries�include_dirs�define�undefrr�compiler)�selfrrr	�initialize_options4szbuild_clib.initialize_optionscCsh|jdddd	d
d�|jj|_|jr0|j|j�|jdkrH|jjpDg|_t|jt�rd|jjtj	�|_dS)NZbuildrr
rrr)rr
)rr)rr)rr)rr)
Zset_undefined_optionsZdistributionr�check_library_listr�
isinstance�str�split�os�pathsep)r rrr	�finalize_optionsDs

zbuild_clib.finalize_optionscCs�|js
dSddlm}||j|j|jd�|_t|j�|jdk	rN|jj|j�|j	dk	rzx |j	D]\}}|jj
||�q`W|jdk	r�x|jD]}|jj|�q�W|j
|j�dS)Nr)�new_compiler)r�dry_runr)rrr)rr*rrrZset_include_dirsrZdefine_macrorZundefine_macro�build_libraries)r r)�name�valueZmacrorrr	�run^s 



zbuild_clib.runcCs�t|t�std��x�|D]|}t|t�r<t|�dkr<td��|\}}t|t�sVtd��d|ksrtjdkr�tj|kr�td|d��t|t�std��qWd	S)
a`Ensure that the list of libraries is valid.

        `library` is presumably provided as a command option 'libraries'.
        This method checks that it is a list of 2-tuples, where the tuples
        are (library_name, build_info_dict).

        Raise DistutilsSetupError if the structure is invalid anywhere;
        just returns otherwise.
        z+'libraries' option must be a list of tuples�z*each element of 'libraries' must a 2-tuplezNfirst element of each tuple in 'libraries' must be a string (the library name)�/z;bad library name '%s': may not contain directory separatorsrzMsecond element of each tuple in 'libraries' must be a dictionary (build info)N)	r#�list�DistutilsSetupError�tuple�lenr$r&�sep�dict)r r�libr,�
build_inforrr	r"vs"




zbuild_clib.check_library_listcCs0|js
dSg}x|jD]\}}|j|�qW|S)N)r�append)r Z	lib_names�lib_namer8rrr	�get_library_names�szbuild_clib.get_library_namescCs`|j|j�g}xJ|jD]@\}}|jd�}|dksBt|ttf�rNtd|��|j|�qW|S)N�sourceszfin 'libraries' option (library '%s'), 'sources' must be present and must be a list of source filenames)r"r�getr#r1r3r2�extend)r �	filenamesr:r8r<rrr	�get_source_files�s
zbuild_clib.get_source_filescCs�x�|D]�\}}|jd�}|dks0t|ttf�r<td|��t|�}tjd|�|jd�}|jd�}|jj||j	|||j
d�}|jj|||j|j
d�qWdS)Nr<zfin 'libraries' option (library '%s'), 'sources' must be present and must be a list of source filenameszbuilding '%s' library�macrosr)�
output_dirrArr)rBr)
r=r#r1r3r2r�infor�compilerrZcreate_static_libr
)r rr:r8r<rArZobjectsrrr	r+�s$




zbuild_clib.build_libraries)rrr
)rrr)rrr)rrr)rrr)�__name__�
__module__�__qualname__ZdescriptionZuser_optionsZboolean_optionsrZhelp_optionsr!r(r.r"r;r@r+rrrr	r
s*
$r
)�__doc__r&Zdistutils.corerZdistutils.errorsZdistutils.sysconfigrZ	distutilsrrr
rrrr	�<module>sPKV[�t5353(command/__pycache__/sdist.cpython-36.pycnu�[���3


 \�E�@s�dZddlZddlZddlTddlmZddlmZddlmZddl	m
Z
mZmZm
Z
ddlmZddlTdd	lmZdd
l	mZddlmZdd
�ZGdd�de�ZdS)zadistutils.command.sdist

Implements the Distutils 'sdist' command (create a source distribution).�N)�*)�glob)�warn)�Command)�dir_util�dep_util�	file_util�archive_util)�TextFile)�FileList)�log)�convert_pathcCsdddlm}ddlm}g}x,|j�D] }|jd|d||df�q&W|j�||�jd�dS)zoPrint all possible values for the 'formats' option (used by
    the "--help-formats" command-line option).
    r)�FancyGetopt)�ARCHIVE_FORMATSzformats=N�z.List of available source distribution formats:)Zdistutils.fancy_getoptrZdistutils.archive_utilr�keys�append�sortZ
print_help)rr�formats�format�r�//usr/lib64/python3.6/distutils/command/sdist.py�show_formatssrc@s�eZdZdZdd�ZdJdKdLdMdNdOdPdQdRdTdUdVdWdXgZd
ddddd"gZd*dd+efgZd
dd,�Z	d-efgZ
d.d/�Zd0d1�Zd2d3�Z
d4d5�Zd6d7�Zd8d9�Zd:d;�Zd<d=�Zd>d?�Zd@dA�ZdBdC�ZdDdE�ZdFdG�ZdHdI�ZdS)Y�sdistz6create a source distribution (tarball, zip file, etc.)cCs|jS)zYCallable used for the check sub-command.

        Placed here so user_options can view it)�metadata_check)�selfrrr�checking_metadata%szsdist.checking_metadata�	template=�t�5name of manifest template file [default: MANIFEST.in]�	manifest=�m�)name of manifest file [default: MANIFEST]�use-defaultsN�Rinclude the default file set in the manifest [default; disable with --no-defaults]�no-defaults�"don't include the default file set�prune��specifically exclude files/directories that should not be distributed (build tree, RCS/CVS dirs, etc.) [default; disable with --no-prune]�no-prune�$don't automatically exclude anything�
manifest-only�o�Ejust regenerate the manifest and then stop (implies --force-manifest)�force-manifest�f�kforcibly regenerate the manifest and carry on as usual. Deprecated: now the manifest is always regenerated.�formats=�6formats for source distribution (comma-separated list)�	keep-temp�kz1keep the distribution tree around after creating zarchive file(s)�	dist-dir=�d�Fdirectory to put the source distribution archive(s) in [default: dist]�metadata-check�[Ensure that all required elements of meta-data are supplied. Warn if any missing. [default]�owner=�u�@Owner name used when creating a tar file [default: current user]�group=�g�AGroup name used when creating a tar file [default: current group]zhelp-formatsz#list available distribution formats)zno-defaultszno-prune�checkcCsTd|_d|_d|_d|_d|_d|_dg|_d|_d|_d|_	d|_
d|_d|_dS)N�rZgztar)
�template�manifest�use_defaultsr'�
manifest_onlyZforce_manifestr�	keep_temp�dist_dir�
archive_filesr�owner�group)rrrr�initialize_options`szsdist.initialize_optionscCsZ|jdkrd|_|jdkr d|_|jd�tj|j�}|rFtd|��|jdkrVd|_dS)NZMANIFESTzMANIFEST.inrzunknown archive format '%s'Zdist)rCrBZensure_string_listr	Zcheck_archive_formatsrZDistutilsOptionErrorrG)rZ
bad_formatrrr�finalize_optionsws




zsdist.finalize_optionscCsBt�|_x|j�D]}|j|�qW|j�|jr6dS|j�dS)N)r�filelistZget_sub_commandsZrun_command�
get_file_listrE�make_distribution)rZcmd_namerrr�run�sz	sdist.runcCs*tdt�|jjd�}|j�|j�dS)zDeprecated API.zadistutils.command.sdist.check_metadata is deprecated,               use the check command insteadr@N)r�PendingDeprecationWarning�distributionZget_command_objZensure_finalizedrP)rr@rrr�check_metadata�s
zsdist.check_metadatacCs�tjj|j�}|r<|j�r<|j�|jj�|jj�dS|sP|j	d|j�|jj
�|jrh|j�|rt|j
�|jr�|j�|jj�|jj�|j�dS)aCFigure out the list of files to include in the source
        distribution, and put it in 'self.filelist'.  This might involve
        reading the manifest template (and writing the manifest), or just
        reading the manifest, or just using the default file set -- it all
        depends on the user's options.
        Nz&manifest template '%s' does not exist z(using default file list)z?manifest template '%s' does not exist (using default file list))�os�path�isfilerB�_manifest_is_not_generated�
read_manifestrMrZremove_duplicatesr�findallrD�add_defaults�
read_templater'�prune_file_list�write_manifest)rZtemplate_existsrrrrN�s(





zsdist.get_file_listcCs2d|jjg}x�|D]�}t|t�rn|}d}x*|D]"}tjj|�r.d}|jj|�Pq.W|s�|j	ddj
|��qtjj|�r�|jj|�q|j	d|�qWdd	g}x*|D]"}ttjjt
|��}|jj|�q�W|jd
�}|jj�r�|jj|j��x>|jD]4\}	}
}}x$|D]}
|jjtjj
|
|
���qW�q�W|jj��r�x||jjD]p}t|t��r|t|�}tjj|��r�|jj|�n:|\}}x0|D](}t|�}tjj|��r�|jj|��q�W�qHW|jj��r�|jd�}|jj|j��|jj��r|jd�}|jj|j��|jj��r.|jd
�}|jj|j��dS)a9Add all the default files to self.filelist:
          - README or README.txt
          - setup.py
          - test/test*.py
          - all pure Python modules mentioned in setup script
          - all files pointed by package_data (build_py)
          - all files defined in data_files.
          - all files defined as scripts.
          - all C sources listed as part of extensions or C libraries
            in the setup script (doesn't catch C headers!)
        Warns if (README or README.txt) or setup.py are missing; everything
        else is optional.
        �README�
README.txtFTz,standard file not found: should have one of z, zstandard file '%s' not foundz
test/test*.pyz	setup.cfg�build_py�	build_ext�
build_clib�
build_scriptsN)r^r_)rRZscript_name�
isinstance�tuplerTrU�existsrMrr�join�filterrVr�extend�get_finalized_commandZhas_pure_modulesZget_source_filesZ
data_filesZhas_data_files�strr
Zhas_ext_modulesZhas_c_librariesZhas_scripts)rZ	standards�fnZaltsZgot_itZoptional�pattern�filesr`ZpkgZsrc_dirZ	build_dir�	filenames�filename�item�dirnamer/rarbrcrrrrZ�s\






"



zsdist.add_defaultscCs�tjd|j�t|jddddddd�}zlxf|j�}|dkr<Py|jj|�Wq*ttfk
r�}z|j	d|j
|j|f�WYdd}~Xq*Xq*WWd|j�XdS)z�Read and parse manifest template file named by self.template.

        (usually "MANIFEST.in") The parsing and processing is done by
        'self.filelist', which updates itself accordingly.
        zreading manifest template '%s'rA)Zstrip_commentsZskip_blanksZ
join_linesZ	lstrip_wsZ	rstrip_wsZ
collapse_joinNz%s, line %d: %s)
r�inforBr
�readlinerMZprocess_template_lineZDistutilsTemplateError�
ValueErrorrrpZcurrent_line�close)rrB�line�msgrrrr[s 

$zsdist.read_templatecCs�|jd�}|jj�}|jjd|jd�|jjd|d�tjdkrFd}nd}ddd	d
ddd
g}d|dj|�|f}|jj|dd�dS)avPrune off branches that might slip into the file list as created
        by 'read_template()', but really don't belong there:
          * the build tree (typically "build")
          * the release tree itself (only an issue if we ran "sdist"
            previously with --keep-temp, or it aborted)
          * any RCS, CVS, .svn, .hg, .git, .bzr, _darcs directories
        �buildN)�prefixZwin32z/|\\�/ZRCSZCVSz\.svnz\.hgz\.gitz\.bzrZ_darcsz(^|%s)(%s)(%s).*�|rA)Zis_regex)	rjrR�get_fullnamerMZexclude_patternZ
build_base�sys�platformrg)rry�base_dirZsepsZvcs_dirsZvcs_ptrnrrrr\:s


zsdist.prune_file_listcCsX|j�rtjd|j�dS|jjdd�}|jdd�|jtj	|j|fd|j�dS)z�Write the file list in 'self.filelist' (presumably as filled in
        by 'add_defaults()' and 'read_template()') to the manifest file
        named by 'self.manifest'.
        z5not writing to manually maintained manifest file '%s'Nrz*# file GENERATED by distutils, do NOT editzwriting manifest file '%s')
rWrrsrCrMrn�insertZexecuterZ
write_file)rZcontentrrrr]Rs
zsdist.write_manifestc
Cs<tjj|j�sdSt|j�}z|j�}Wd|j�X|dkS)NFz+# file GENERATED by distutils, do NOT edit
)rTrUrVrC�openrtrv)r�fpZ
first_linerrrrWas

z sdist._manifest_is_not_generatedcCsXtjd|j�t|j�}x2|D]*}|j�}|jd�s|r<q|jj|�qW|j�dS)z�Read the manifest file (named by 'self.manifest') and use it to
        fill in 'self.filelist', the list of files to include in the source
        distribution.
        zreading manifest file '%s'�#N)	rrsrCr��strip�
startswithrMrrv)rrCrwrrrrXms

zsdist.read_manifestcCs�|j|�tj|||jd�ttd�r4d}d|}nd}d|}|sPtjd�n
tj|�xD|D]<}tj	j
|�s~tjd|�q`tj	j||�}|j|||d	�q`W|j
jj|�dS)
a�Create the directory tree that will become the source
        distribution archive.  All directories implied by the filenames in
        'files' are created under 'base_dir', and then we hard link or copy
        (if hard linking is unavailable) those files into place.
        Essentially, this duplicates the developer's source tree, but in a
        directory named after the distribution, containing only the files
        to be distributed.
        )�dry_run�linkZhardzmaking hard links in %s...Nzcopying files to %s...z)no files to distribute -- empty manifest?z#'%s' not a regular file -- skipping)r�)ZmkpathrZcreate_treer��hasattrrTrrrsrUrVrgZ	copy_filerRZmetadataZwrite_pkg_info)rr�rnr�rx�file�destrrr�make_release_tree|s 
	



zsdist.make_release_treecCs�|jj�}tjj|j|�}|j||jj�g}d|j	krT|j	j
|j	j|j	jd���xD|j	D]:}|j
||||j|jd�}|j
|�|jjj
dd|f�q\W||_|js�tj||jd�dS)a�Create the source distribution(s).  First, we create the release
        tree with 'make_release_tree()'; then, we create all required
        archive files (according to 'self.formats') from the release tree.
        Finally, we clean up by blowing away the release tree (unless
        'self.keep_temp' is true).  The list of archive files created is
        stored so it can be retrieved later by 'get_archive_files()'.
        Ztar)r�rIrJr�)r�N)rRr}rTrUrgrGr�rMrnrr�pop�indexZmake_archiverIrJZ
dist_filesrHrFrZremove_treer�)rr�Z	base_namerHZfmtr�rrrrO�s




zsdist.make_distributioncCs|jS)zzReturn the list of archive files created when the command
        was run, or None if the command hasn't run yet.
        )rH)rrrr�get_archive_files�szsdist.get_archive_files)rrr)r r!r")r#Nr$)r%Nr&)r'Nr()r)Nr*)r+r,r-)r.r/r0)r1Nr2�@keep the distribution tree around after creating archive file(s))r3r4r�)r5r6r7)r8Nr9)r:r;r<)r=r>r?)�__name__�
__module__�__qualname__ZdescriptionrZuser_optionsZboolean_optionsrZhelp_optionsZnegative_optZsub_commandsrKrLrPrSrNrZr[r\r]rWrXr�rOr�rrrrr!sj

(P*r)�__doc__rTr~�typesr�warningsrZdistutils.corerZ	distutilsrrrr	Zdistutils.text_filer
Zdistutils.errorsZdistutils.filelistrrZdistutils.utilr
rrrrrr�<module>sPKV[��o o 6command/__pycache__/bdist_wininst.cpython-36.opt-1.pycnu�[���3

�\dh�<�@spdZddlZddlZddlmZddlmZddlmZm	Z	ddl
TddlmZddl
mZGd	d
�d
e�ZdS)zzdistutils.command.bdist_wininst

Implements the Distutils 'bdist_wininst' command: create a windows installer
exe-program.�N)�Command)�get_platform)�create_tree�remove_tree)�*)�get_python_version)�logc@s�eZdZdZd5ddde�fd7d9d:d;d<d=d>d?d@dAdBg
ZddddgZejd&kZ	d'd(�Z
d)d*�Zd+d,�Zd-d.�Z
dCd/d0�Zd1d2�Zd3d4�ZdS)D�
bdist_wininstz-create an executable installer for MS Windows�
bdist-dir=N�1temporary directory for creating the distributionz
plat-name=�pz;platform name to embed in generated filenames (default: %s)�	keep-temp�kz/keep the pseudo-installation tree around after z!creating the distribution archive�target-version=z!require a specific python versionz on the target system�no-target-compile�c�/do not compile .py to .pyc on the target system�no-target-optimize�o�;do not compile .py to .pyo (optimized) on the target system�	dist-dir=�d�-directory to put final built distributions in�bitmap=�b�>bitmap to use for the installer instead of python-powered logo�title=�t�?title to display on the installer background instead of default�
skip-build�2skip rebuilding everything (for testing/debugging)�install-script=�Ubasename of installation script to be run after installation or before deinstallation�pre-install-script=�{Fully qualified filename of a script to be run before any files are installed.  This script need not be in the distribution�user-access-control=��specify Vista's UAC handling - 'none'/default=no handling, 'auto'=use UAC if target Python installed for all users, 'force'=always use UAC�win32cCsRd|_d|_d|_d|_d|_d|_d|_d|_d|_d|_	d|_
d|_d|_dS)Nr)
�	bdist_dir�	plat_name�	keep_temp�no_target_compile�no_target_optimize�target_version�dist_dir�bitmap�title�
skip_build�install_script�pre_install_script�user_access_control)�self�r6�7/usr/lib64/python3.6/distutils/command/bdist_wininst.py�initialize_options=sz bdist_wininst.initialize_optionscCs�|jdd	�|jdkrR|jr6|jr6|jjd�}|j|_|jd�j}tj	j
|d�|_|js^d|_|jr�|jj�r�t
�}|jr�|j|kr�td|f��||_|jdd
d�|jr�x2|jjD]}|jtj	j|�kr�Pq�Wtd|j��dS)N�bdistr1Zwininst�zMtarget version can only be %s, or the '--skip-build' option must be specifiedr.r)z(install_script '%s' not found in scripts)r1r1)r.r.)r)r))Zset_undefined_optionsr(r1r)�distributionZget_command_obj�get_finalized_command�
bdist_base�os�path�joinr-�has_ext_modulesrZDistutilsOptionErrorr2�scripts�basename)r5r9r=Z
short_version�scriptr6r6r7�finalize_optionsMs4

zbdist_wininst.finalize_optionsc
Cs�tjdkr&|jj�s|jj�r&td��|js6|jd�|jddd�}|j	|_
|j|_d|_|j|_|jd�}d|_
d|_|jj�r�|j}|s�d	tjdd
�}d|j|f}|jd�}tjj|jd|�|_x4dD],}|j�}|dkr�|d}t|d||�q�Wtjd|j	�|j�tjjdtjj|j	d��|j�tjd=ddlm}|�}	|jj �}
|j!|	d|j	d�}|j"||
|j#�|jj��r�t$�}nd}|jj%j&d||j'|
�f�tj(d|�tj)|�|j*�s�t+|j	|j,d�dS)Nr'z^distribution contains extensions and/or C libraries; must be compiled on a Windows 32 platform�build�install�)Zreinit_subcommandsr�install_libz%d.%d�z.%s-%s�lib�purelib�platlib�headersrB�dataz/Include/$dist_nameZinstall_zinstalling to %sZPURELIB)�mktemp�zip)Zroot_dir�anyr	zremoving temporary file '%s')�dry_run)rLrMrNrBrO)-�sys�platformr;rAZhas_c_librariesZDistutilsPlatformErrorr1Zrun_commandZreinitialize_commandr(�rootZwarn_dirr)�compile�optimizer-�version_infor<r>r?r@Z
build_baseZ	build_lib�upper�setattrr�infoZensure_finalized�insert�runZtempfilerP�get_fullnameZmake_archive�
create_exer/rZ
dist_files�append�get_installer_filename�debug�remover*rrS)
r5rGrIr-Zplat_specifierrF�key�valuerPZarchive_basename�fullname�arcnameZ	pyversionr6r6r7r^ssd












zbdist_wininst.runcCs`g}|jj}|jd�|jpdd}dd�}xJdD]B}t||d�}|r2|d|j�||�f}|jd|||�f�q2W|jd�|jr�|jd|j�|jd||��|jd|j�|jd|j�|j	r�|jd|j	�|j
�r�|jd|j
�|j�p|jj�}|jd||��ddl
}ddl}	d|j|j
��|	jf}
|jd|
�dj|�S)Nz
[metadata]r:�
cSs|jdd�S)Nriz\n)�replace)�sr6r6r7�escape�sz)bdist_wininst.get_inidata.<locals>.escape�author�author_email�description�
maintainer�maintainer_email�name�url�versionz
    %s: %sz%s=%sz
[Setup]zinstall_script=%szinfo=%sztarget_compile=%dztarget_optimize=%dztarget_version=%szuser_access_control=%sztitle=%srzBuilt %s with distutils-%sz
build_info=%s)rmrnrorprqrrrsrt)r;�metadataraZlong_description�getattr�
capitalizer2r+r,r-r4r0r_�time�	distutilsZctime�__version__r@)r5�linesrur\rlrrrOr0rxryZ
build_infor6r6r7�get_inidata�s<

zbdist_wininst.get_inidatac
Csddl}|j|j�|j�}|j|�}|jd|�|rPt|d�j�}t|�}nd}t|d�}	|	j	|j
��|rz|	j	|�t|t�r�|j
d�}|d}|jr�t|jddd	��}
|
j�j
d�}WdQRX||d
}n|d}|	j	|�|jddt|�|�}|	j	|�|	j	t|d�j��dS)
Nrzcreating %s�rb�wb�mbcs��rzlatin-1)�encodings
z<iiii{V4)�structZmkpathr.r|rbZannounce�open�read�len�write�
get_exe_bytes�
isinstance�str�encoder3Zpack)
r5rhrgr/r�Zcfgdata�installer_nameZ
bitmapdataZ	bitmaplen�filerDZscript_data�headerr6r6r7r`�s:








zbdist_wininst.create_execCsD|jr&tjj|jd||j|jf�}ntjj|jd||jf�}|S)Nz%s.%s-py%s.exez	%s.%s.exe)r-r>r?r@r.r))r5rgr�r6r6r7rb's

z$bdist_wininst.get_installer_filenamec	Cs t�}|jrl|j|krl|jdkr&d}q�|jdkr6d}q�|jdkrFd}q�|jdkrVd}q�|jdkrfd	}q�d
}n@yddlm}Wntk
r�d
}YnX|jd
�d}|d}tjjt	�}|j
dkr�|j
dd�dkr�|j
dd�}nd}tjj|d||f�}t|d�}z|j
�S|j�XdS)Nz2.4z6.0z7.1z2.5z8.0z3.2z9.0z3.4z10.0z14.0r)�CRT_ASSEMBLY_VERSION�.z.0r'��winr:zwininst-%s%s.exer})rr-Zmsvcrtr��ImportError�	partitionr>r?�dirname�__file__r)r@r�r��close)	r5Zcur_versionZbvr��majorZ	directoryZsfix�filename�fr6r6r7r�4s8	






zbdist_wininst.get_exe_bytes)r
Nr�Pkeep the pseudo-installation tree around after creating the distribution archive)r
rr��6require a specific python version on the target system)rNr�)rrr)rrr)rrr)rrr)rrr)rNr )r!Nr")r#Nr$)r%Nr&)N)�__name__�
__module__�__qualname__rorZuser_optionsZboolean_optionsrTrUZ_unsupportedr8rEr^r|r`rbr�r6r6r6r7r	sP
&Q.
5
r	)�__doc__rTr>Zdistutils.corerZdistutils.utilrZdistutils.dir_utilrrZdistutils.errorsZdistutils.sysconfigrryrr	r6r6r6r7�<module>sPKV[Fq�� � 1command/__pycache__/register.cpython-36.opt-1.pycnu�[���3


 \�-�@sddZddlZddlZddlZddlZddlmZddlm	Z	ddl
TddlmZGdd�de	�Z
dS)	zhdistutils.command.register

Implements the Distutils 'register' command (register with the repository).
�N)�warn)�
PyPIRCCommand)�*)�logc@s�eZdZdZejdd gZejdddgZdd	d
�fgZdd�Zd
d�Z	dd�Z
dd�Zdd�Zdd�Z
dd�Zdd�Zdd�Zd!dd�ZdS)"�registerz7register the distribution with the Python package index�list-classifiersN� list the valid Trove classifiers�strict�BWill stop the registering if the meta-data are not fully compliant�verify�checkcCsdS)NT�)�selfr
r
�2/usr/lib64/python3.6/distutils/command/register.py�<lambda>szregister.<lambda>cCstj|�d|_d|_dS)Nr)r�initialize_options�list_classifiersr	)rr
r
rrs
zregister.initialize_optionscCs*tj|�d|jfdd�}||jjd<dS)Nr�)r	�restructuredtextr)rr)r�finalize_optionsr	�distributionZcommand_options)rZ
check_optionsr
r
rr$s
zregister.finalize_optionscCsX|j�|j�x|j�D]}|j|�qW|jr<|j�n|jrL|j�n|j�dS)N)	r�_set_configZget_sub_commandsZrun_commandZdry_run�verify_metadatar�classifiers�
send_metadata)rZcmd_namer
r
r�run+s

zregister.runcCs8tdt�|jjd�}|j�|j|_d|_|j�dS)zDeprecated API.zddistutils.command.register.check_metadata is deprecated,               use the check command insteadrrN)r�PendingDeprecationWarningrZget_command_objZensure_finalizedr	rr)rrr
r
r�check_metadata:szregister.check_metadatacCsz|j�}|ikr@|d|_|d|_|d|_|d|_d|_n6|jd|jfkr^td|j��|jdkrp|j|_d|_d	S)
z: Reads the configuration file and set attributes.
        �username�password�
repository�realmTZpypiz%s not found in .pypircFN)Z_read_pypircrrr r!�
has_configZDEFAULT_REPOSITORY�
ValueError)r�configr
r
rrDs




zregister._set_configcCs*|jd}tjj|�}tj|j|��dS)z8 Fetch the list of classifiers from the server.
        z?:action=list_classifiersN)r �urllib�requestZurlopenr�info�_read_pypi_response)rZurlZresponser
r
rrUs
zregister.classifierscCs&|j|jd��\}}tjd||�dS)zF Send the metadata to the package index server to be checked.
        rzServer response (%s): %sN)�post_to_server�build_post_datarr')r�code�resultr
r
rr\szregister.verify_metadatac
Cs|jrd}|j}|j}nd}d}}dj�}x:||krf|jdtj�t�}|sTd}q.||kr.td�q.W|dk�r|x|s�td�}qtWx|s�t	j	d�}q�Wt
jj�}t
j
j|j�d	}|j|j|||�|j|jd
�|�\}}|jd||ftj�|dk�r|j�r||j_nj|jd
tj�|jd|j�tj�d}x&|j�dk�r\td�}|�s8d}�q8W|j�dk�r|j||��n�|dk�r�ddi}	d|	d<|	d<|	d<d|	d<x|	d�s�td�|	d<�q�Wx�|	d|	dk�rNx|	d�s�t	j	d�|	d<�q�Wx|	d�st	j	d�|	d<�qW|	d|	dk�r�d|	d<d|	d<td��q�Wx|	d�sltd�|	d<�qRW|j|	�\}}|dk�r�tjd||�ntjd�tjd �nT|d!k�rdd"i}	d|	d<x|	d�s�td#�|	d<�q�W|j|	�\}}tjd||�dS)$a_ Send the metadata to the package index server.

            Well, do the following:
            1. figure who the user is, and then
            2. send the data as a Basic auth'ed POST.

            First we try to read the username/password from $HOME/.pypirc,
            which is a ConfigParser-formatted file with a section
            [distutils] containing username and password entries (both
            in clear text). Eg:

                [distutils]
                index-servers =
                    pypi

                [pypi]
                username: fred
                password: sekrit

            Otherwise, to figure who the user is, we offer the user three
            choices:

             1. use existing login,
             2. register as a new user, or
             3. set the password to a random string and email the user.

        �1�x�z1 2 3 4z�We need to know who you are, so please choose either:
 1. use your existing login,
 2. register as a new user,
 3. have the server generate a new password for you (and email it to you), or
 4. quit
Your selection [default 1]: z&Please choose one of the four options!z
Username: z
Password: rZsubmitzServer response (%s): %s��zAI can store your PyPI login so future submissions will be faster.z (the login will be stored in %s)�XZynzSave your login (y/N)?�n�y�2z:action�user�namerZemailNZconfirmz
 Confirm: z!Password and confirm don't match!z
   EMail: z"You will receive an email shortly.z7Follow the instructions in it to complete registration.�3Zpassword_resetzYour email address: )r"rr�split�announcer�INFO�input�print�getpassr%r&ZHTTPPasswordMgr�parseZurlparser Zadd_passwordr!r)r*rZ_get_rc_file�lowerZ
_store_pypircr')
rZchoicerr�choices�auth�hostr+r,�datar
r
rrcs�











zregister.send_metadatacCs�|jj}|d|j�|j�|j�|j�|j�|j�|j�|j	�|j
�|j�|j�|j
�|j�|j�|j�d�}|ds�|ds�|dr�d|d<|S)Nz1.0)z:action�metadata_versionr6�versionZsummaryZ	home_pageZauthorZauthor_email�license�description�keywords�platformrZdownload_url�provides�requires�	obsoletesrJrKrLz1.1rD)rZmetadataZget_nameZget_versionZget_descriptionZget_urlZget_contactZget_contact_emailZget_licenceZget_long_descriptionZget_keywordsZ
get_platformsZget_classifiersZget_download_urlZget_providesZget_requiresZ
get_obsoletes)r�action�metarCr
r
rr*�s*zregister.build_post_datacCsd|kr$|jd|d|jftj�d}d|}|d}tj�}x�|j�D]�\}}t|�tg�tf�fkrp|g}xZ|D]R}t|�}|j	|�|j	d|�|j	d�|j	|�|rv|dd	krv|j	d
�qvWqJW|j	|�|j	d
�|j
�jd�}d|tt|��d
�}	t
jj|j||	�}
t
jjt
jj|d��}d}y|j|
�}Wnxt
jjk
�r�}
z$|j�rl|
jj�}|
j|
jf}WYdd}
~
XnJt
jjk
�r�}
zdt|
�f}WYdd}
~
XnX|j�r�|j|�}d}|j�rd
jdd|ddf�}|j|tj�|S)zC Post a query to the server, and return a string response.
        r6zRegistering %s to %sz3--------------GHSKFJDLGDS7543FJKLFHRE75642756743254z
--z--z*
Content-Disposition: form-data; name="%s"z

r�
�
zutf-8z/multipart/form-data; boundary=%s; charset=utf-8)zContent-typezContent-length)Zpassword_mgrr/Ni�r0�OK�-�K���)r0rQ)r9r rr:�io�StringIO�items�type�str�write�getvalue�encode�lenr%r&ZRequestZbuild_openerZHTTPBasicAuthHandler�open�errorZ	HTTPErrorZ
show_response�fp�readr+�msgZURLErrorr(�join)rrCrA�boundaryZsep_boundaryZend_boundaryZbody�key�valueZheadersZreq�openerr,�erbr
r
rr)�sV







zregister.post_to_server)rNr)r	Nr
)N)�__name__�
__module__�__qualname__rGrZuser_optionsZboolean_optionsZsub_commandsrrrrrrrrr*r)r
r
r
rrs&
zr)�__doc__r=rUZurllib.parser%Zurllib.request�warningsrZdistutils.corerZdistutils.errorsZ	distutilsrrr
r
r
r�<module>sPKV[;PoS�F�F2command/__pycache__/bdist_msi.cpython-36.opt-2.pycnu�[���3


 \���@s�ddlZddlZddlmZddlmZddlmZddlm	Z	ddl
mZddlm
Z
ddlmZddlZdd	lmZmZmZdd
lmZmZmZmZGdd�de�ZGd
d�de�ZdS)�N)�Command)�remove_tree)�get_python_version)�
StrictVersion)�DistutilsOptionError)�get_platform)�log)�schema�sequence�text)�	Directory�Feature�Dialog�add_datac@sBeZdZdd�Zdd�Zddd�Zdd
d�Zdd
d�Zdd�ZdS)�PyDialogcOs>tj|f|��|jd}d|d}|jdd||jd�dS)N�$�iHZ
BottomLiner)r�__init__�h�line�w)�self�args�kwZrulerZbmwidth�r�3/usr/lib64/python3.6/distutils/command/bdist_msi.pyrs
zPyDialog.__init__c	Cs|jddddddd|�dS)N�Title��
i@�<iz{\VerdanaBold10}%s)r)r�titlerrrr #szPyDialog.title�Back�c	Cs,|r
d}nd}|j|d|jddd|||�S)N�r"���8�)�
pushbuttonr)rr �next�name�active�flagsrrr�back*sz
PyDialog.back�Cancelc	Cs,|r
d}nd}|j|d|jddd|||�S)Nr#r"i0r%r&r')r(r)rr r)r*r+r,rrr�cancel5szPyDialog.cancel�Nextc	Cs,|r
d}nd}|j|d|jddd|||�S)Nr#r"��r%r&r')r(r)rr r)r*r+r,rrrr)@sz
PyDialog.nextc	Cs,|j|t|j|d�|jdddd||�S)N�r%r&r'r#)r(�intrr)rr*r r)Zxposrrr�xbuttonKszPyDialog.xbuttonN)r!r")r.r")r0r")	�__name__�
__module__�__qualname__rr r-r/r)r4rrrrrs



rc@s�eZdZdZdCddde�fdEdGdHdIdJdKdLdMg
ZddddgZddd d!d"d#d$d%d&d'd(d)d*d+d,d-d.d/d0d1gZd2Zd3d4�Z	d5d6�Z
d7d8�Zd9d:�Zd;d<�Z
d=d>�Zd?d@�ZdAdB�ZdS)N�	bdist_msiz7create a Microsoft Installer (.msi) binary distribution�
bdist-dir=N�1temporary directory for creating the distributionz
plat-name=�pz;platform name to embed in generated filenames (default: %s)�	keep-temp�kz/keep the pseudo-installation tree around after z!creating the distribution archive�target-version=z!require a specific python versionz on the target system�no-target-compile�c�/do not compile .py to .pyc on the target system�no-target-optimize�o�;do not compile .py to .pyo (optimized) on the target system�	dist-dir=�d�-directory to put final built distributions in�
skip-build�2skip rebuilding everything (for testing/debugging)�install-script=�Ubasename of installation script to be run after installation or before deinstallation�pre-install-script=�{Fully qualified filename of a script to be run before any files are installed.  This script need not be in the distributionz2.0z2.1z2.2z2.3z2.4z2.5z2.6z2.7z2.8z2.9z3.0z3.1z3.2z3.3z3.4z3.5z3.6z3.7z3.8z3.9�XcCsFd|_d|_d|_d|_d|_d|_d|_d|_d|_d|_	d|_
dS)Nr)�	bdist_dir�	plat_name�	keep_tempZno_target_compileZno_target_optimize�target_version�dist_dir�
skip_build�install_script�pre_install_script�versions)rrrr�initialize_options}szbdist_msi.initialize_optionscCs�|jdd	�|jdkr2|jd�j}tjj|d�|_t�}|jrP|j	j
�rP||_|jr�|jg|_|jr�|j	j
�r�|j|kr�t
d|f��nt|j�|_|jdd
d�|jr�t
d��|jr�x2|j	jD]}|jtjj|�kr�Pq�Wt
d|j��d|_dS)NZbdistrTZmsizMtarget version can only be %s, or the '--skip-build' option must be specifiedrSrPz5the pre-install-script feature is not yet implementedz(install_script '%s' not found in scripts)rTrT)rSrS)rPrP)Zset_undefined_optionsrO�get_finalized_command�
bdist_base�os�path�joinrrR�distribution�has_ext_modulesrWrTr�list�all_versionsrVrU�scripts�basename�install_script_key)rrZZ
short_versionZscriptrrr�finalize_options�s:



zbdist_msi.finalize_optionscCsz|js|jd�|jddd�}|j|_|j|_d|_|jd�}d|_d|_|jj	�r�|j
}|spdtjdd�}d	|j
|f}|jd�}tjj|jd
|�|_tjd|j�|j�tjjdtjj|jd��|j�tjd=|j|j�|jj�}|j|�}tjj|�}tjj|��r"tj|�|jj }|j!}	|	�s<|j"}	|	�sFd
}	|j#�}
dt$|
�j%}|jj�}|j
�r~d|j
|f}nd|}t&j'|t(|t&j)�||	�|_*t&j+|j*t,�d|
fg}
|j-�p�|j.}|�r�|
j/d|f�|j0�r�|
j/d|j0f�|
�rt1|j*d|
�|j2�|j3�|j4�|j5�|j*j6�t7|jd��r^d|j
�pJd|f}|jj8j/|�|j9�svt:|j|j;d�dS)N�build�installr")Zreinit_subcommandsr�install_libz%d.%d�z.%s-%s�libzinstalling to %sZPURELIBZUNKNOWNz%d.%d.%dzPython %s %sz	Python %sZDistVersionZ
ARPCONTACTZARPURLINFOABOUT�Property�
dist_filesr8�any)�dry_run)<rTZrun_commandZreinitialize_commandrO�prefixZwarn_dir�compile�optimizer^r_rR�sys�version_inforPrYr[r\r]Z
build_baseZ	build_libr�infoZensure_finalized�insert�runZmkpathrS�get_fullname�get_installer_filename�abspath�exists�unlink�metadata�authorZ
maintainerZget_versionr�version�msilibZ
init_databaser	Zgen_uuid�dbZ
add_tablesr
Zauthor_emailZmaintainer_email�appendZurlr�add_find_python�	add_files�add_scripts�add_ui�Commit�hasattrrlrQrrn)rrgrhrRZplat_specifierrf�fullname�installer_namer|r}r~ZsversionZproduct_nameZpropsZemail�tuprrrrv�s|











z
bdist_msi.runc
Cs*|j}tjd�}tjj|j�}t||d|dd�}t|ddddddd�}||d	fg}x�|j	|j
gD]t}d|}d|}	}
d}||j
kr�d
}d}
nd|}d}
t||	||d|
|d�}t||||||
�}|j|||f�qbW|j�i}�x2|D�](\}}}|g}�x|�r|j
�}x�tj|j�D]�}tjj|j|�}tjj|��rzd
|j|�|f}||}
t|||||
|�}|j|�n�|j�s�|j|j|d�||k�r�|j|�}||<||jk�r|j�r�td|��d||_n*||}t|jd|||j|d|jfg��q W�qW|j�q�W|j|�dS)NZ	distfiles�	TARGETDIRZ	SourceDir�PythonZ
Everythingrr")Z	directory�zPython from another locationrizPython %s from registryz%s|%szMultiple files with name %sz[#%s]Z
DuplicateFile)r�rZCABr[r\ryrOrr
rW�
other_versionr�r��pop�listdirZabsoluter]�isdirZ
make_shortZ	componentZstart_componentZlogicalZadd_filerUrdrrZcommit)rr�ZcabZrootdir�root�f�itemsr~�targetr*�defaultZdescr �level�dir�seenZfeatureZtodo�fileZafileZshortZnewdir�keyrrrr�
s\





&zbdist_msi.add_filescCs�d}�xv|jD�]j}d|}d|}d|}d|}d|}d|}d|}	d	|}
d
|}d|}tjrpd}
nd}
t|jd|d|d|
f|d|d|
fg�t|jd||f||fg�t|jd|d|d|df|	d |d|df|
d!|d|dfg�t|jd|||f|	||df|
d|dfg�t|jd|||f|	||df|
d|dfg�t|jdd|dd|fg�|d7}qWdS)"Ni�z)SOFTWARE\Python\PythonCore\%s\InstallPathzpython.machine.zpython.user.zPYTHON.MACHINE.zPYTHON.USER.ZPythonFromMachineZPythonFromUserZ	PythonExer��PYTHONri�Z
RegLocatorr"Z	AppSearch�CustomAction�3��[�]z]\python.exe�InstallExecuteSequence�InstallUISequenceZ	Conditionr�rz
NOT TARGETDIR��i3i3i3)rWrZWin64rr�)r�start�verZinstall_pathZmachine_regZuser_regZmachine_propZ	user_propZmachine_actionZuser_actionZ
exe_actionZtarget_dir_prop�exe_propZTyperrrr�CsJzbdist_msi.add_find_pythoncCs�|jrnd}xb|j|jgD]P}d|}d|}t|jd|d||jfg�t|jd|d||fg�|d7}qW|jr�tjj	|j
d	�}t|d
�}|jd�|jt|j�j
��|j�t|jdd
tj|�fg�t|jddg�t|jddg�dS)Ni�zinstall_script.r�r��2r�z&Python%s=3r"zpreinstall.batrzrem ="""
%1 %0
exit
"""
�Binary�
PreInstallri�
NOT Installed��)r�rir�N)r�r�r�)rUrWr�rr�rdrVr[r\r]rO�open�write�read�closerr�)rr�r�Zinstall_actionr�Zscriptfnr�rrrr�ys,
	
zbdist_msi.add_scriptscCs�
|j}d}}d}d}d}d}d}d}	t|dd�d�d�d�d�d�g�t|dd�d�d�d�g�t|d d�d�d�d��dg�t|d/tj�t|d0tj�t|d1||||||d2d2d2�}
|
jd3�|
jd4d2dd5�|
jd6d7dd5�|
jd8d9d:d;d<d=d>�|
jd?d9d@d;dAd=dB�|
j	d2d6d2dC�}|j
dDdE�t|dF||||||d2d2d2�}|jdG�|jd4d2dd5�|jd6d7dd5�|jd8d9d:d;d<d=dH�|jd?d9d@d;dAd=dB�|j	d2d6d2dC�}|j
dDdE�t|dI||||||d2d2d2�}
|
jdJ�|
jd4d2dd5�|
jd6d7dd5�|
jdKd9dLd;dAd=dB�|
j	d2d6d2dC�}|j
dDdM�t|dN||||dO|dPdPdPdQdR�}|jdSd9dTdUd9d=dV�|jdKdAdWdXdAd=dY�|jdZdAd[d\ddd]�|jd^d_dAd`d\dadbdcddd�|jdEdddEdC�}|j
dDdE�|j	dddPdddC�}|j
dDdd�|jdPdEdPdC�}|j
dDdP�t|dddd\dedf|dgdd�}|jdgdddXdhddi�|j
djdkdldmdnddod�j
dDdp�|j
dqdrdldmdnddsd�j
dDdt�|j
duddldmdnddvd�j
dDdw�|j
dxdydldmdndd6d�j
dDdz�|j
d{dmdldmdndddd�j
dDd|�|j
d}d~dldmdnddd�j
dDd��|j
d�d�dldmdnddPd�j
dDd��t|d�ddd�d�d|dododo�}|jdZdhd9d�d�dd��|j
dsdld�d�d�ddsdo�}|j
dDdE�|j
dod�d�d�d�ddods�}|j
dDdM�t|d�ddd�d�||dMdMdM�}|jdZdhd9d�d�dd��|j
dMd�d�d�d�ddMd�}|j
dDdE�t|d!||||||d6d6d6�}|jdKd9d:d;d�d=d��|jd��|jd/d9d�d;dAd=d��}|jd/dZ�|jd�d9d�d;d�d=d�}|jd�dZ�|jd7ddd5�|j	d�ddd5�|jd6d�}|j
d�d��t|d'||||||d�d�d6�}|jd��|jd�d9d�ddAdd�|jj��|jd4ddd5�|j	d�d6�}d}|j
d�d�|d��x:|j|jgD](}|d7}|j
d�d�|d�||d���qW|j
d�d�|dd��|j
dDdM|d�d��|jd6d��}|j
d�d��|jd�d�d9d�ddkdd�dd�d�}|j
d�d��|j}d�|}d�|}|jd�d9dUdd9dd��}|jd�|�|jd�|�|jd�|�|jd�|�|jd�d�d9d�dd�dd�|dd�d�}|jd�|�|jd�|�|jd�|�|jd�|�t|d�||||||d�d�d�dQdR�}|jdSd9dTdUd9d=d��|jdKdAdAdXdAd=d��|jdZdAd�d\d�dd��|jd�d�dAd�d\d�d�dd�dd�|jd�dddƒj
dDdM�t|d$||||||d�d�d6�}|jdă|jd�d9d�d�ddddid��	}|jddd�d�dAdƃ|jd�dd�d�dAdɃ|jd7ddd5�|j	d�d6�}|j
d�d�d�d�|j
dDdMd�d��|jd6dÃ}|j
d�d��t|d-||||||d6d6d6dQdR�}|jdSdAd9dUd9d=d̃|jdZd�d�dd�ddσ|jd�d�d�d�dAddу|jd/d:d�|d:dAdd��}|jd/dZ�|jd�d�d�dkddd�dd�dd�}|jd�dփ|jd4d�dQd5�|j	d�d6dQd5�|jd6d7�j
d�d��t|d*||||||d�d�d6�}|jd׃|jd�d9d�d\dyddڃ|jd�d9d�d\d�dddid��	}|jddd�dUd�dރ|jd�dd�dUd�d�|jd4ddQd5�|j	d2d6�}|j
d�dd�dŃ|j
d�d�d�dT�|j
d�d�d�db�|j
d�dd�d�|j
d�dd�d�|j
d�d�d�d�|j
d�d�d�d�|j
d�dd�d�|j
dDdMd�dA�|jd6dۃj
d�d��dS(Nr�iri,z[ProductName] Setupr#r"� rk�
DefaultUIFont�DlgFont8�ErrorDialog�ErrorDlg�	Progress1�Install�	Progress2�installs�MaintenanceForm_Action�Repair�
WhichUsers�ALLZ	TextStyle�Tahoma�	r�DlgFontBold8��
VerdanaBold10�Verdanar�VerdanaRed9�r��
PrepareDlg�(Not Privileged or Windows9x or Installed��
WhichUsersDlg�.Privileged and not Windows9x and not Installed��SelectFeaturesDlg�
Not Installed���MaintenanceTypeDlg�,Installed AND NOT RESUME AND NOT Preselected���ProgressDlg��
ActionText�UITextZ
FatalErrorZFinishz)[ProductName] Installer ended prematurelyz< Back)r+r.r!ZDescription1r�Fi@�Piz�[ProductName] setup ended prematurely because of an error.  Your system has not been modified.  To install this program at a later time, please run the installation again.ZDescription2��z.Click the Finish button to exit the Installer.)r*Z	EndDialogZExitZUserExitz'[ProductName] Installer was interruptedz�[ProductName] setup was interrupted.  Your system has not been modified.  To install this program at a later time, please run the installation again.Z
ExitDialogz&Completing the [ProductName] InstallerZDescription��ZReturnZ
FilesInUse�ZRetryF)Zbitmapr���z{\DlgFontBold8}Files in Use�iz8Some files that need to be updated are currently in use.ZText�7iJz�The following applications are using files that need to be updated by this setup. Close these applications and then click Retry to continue the installation or Cancel to exit it.ZListZListBox�k��ZFileInUseProcess�Ignore�eiZ	ErrorText�0r��N�x�H�Q�ZNoZErrorNo�Y��ZYesZErrorYes�AZAbortZ
ErrorAbort�C�*ZErrorCancel�IZErrorIgnore�O�ZOkZErrorOk�R��Z
ErrorRetryZ	CancelDlgi�U���z;Are you sure you want to cancel [ProductName] installation?�9r&r'�ZWaitForCostingDlgzRPlease wait while the installer finishes determining your disk space requirements.�f�(zOPlease wait while the Installer prepares to guide you through the installation.z&Welcome to the [ProductName] Installer�nzPondering...Z
ActionData�r0ZSpawnDialogzSelect Python InstallationsZHintz9Select the Python locations where %s should be installed.zNext >z[TARGETDIR]z[SourceDir])Zorderingz
[TARGETDIR%s]z FEATURE_SELECTED AND &Python%s=3ZSpawnWaitDialogriZFeaturesZ
SelectionTreerZFEATUREZPathEditz[FEATURE_SELECTED]�1z!FEATURE_SELECTED AND &Python%s<>3ZOtherz$Provide an alternate Python locationZEnableZShowZDisableZHide��r�r�ZDiskCostDlgZOKz&{\DlgFontBold8}Disk Space RequirementszFThe disk space required for the installation of the selected features.�5aThe highlighted volumes (if any) do not have enough disk space available for the currently selected features.  You can either remove some files from the highlighted volumes, or choose to install less features onto local drive(s), or select different destination drive(s).Z
VolumeListZVolumeCostList�d�iz{120}{70}{70}{70}{70}g�?ZAdminInstallzGSelect whether to install [ProductName] for all users of this computer.�zInstall for all usersZJUSTME�zInstall just for mez
[ALLUSERS]zWhichUsers="ALL"z({\DlgFontBold8}[Progress1] [ProductName]�#�AzYPlease wait while the Installer [Progress2] [ProductName]. This may take several minutes.ZStatusLabelzStatus:ZProgressBariz
Progress doneZSetProgressZProgressz)Welcome to the [ProductName] Setup WizardZBodyText�?z:Select whether you want to repair or remove [ProductName].ZRepairRadioGroup�lr�z&Repair [ProductName]ZRemoverzRe&move [ProductName]z[REINSTALL]zMaintenanceForm_Action="Repair"z[Progress1]Z	Repairingz[Progress2]ZrepairsZ	Reinstallz[REMOVE]zMaintenanceForm_Action="Remove"�ZRemoving�Zremoves�
�z MaintenanceForm_Action<>"Change")r�r�)r�r�)r�r�)r�r�)r�r�)r�r�)r�r�r�Nr)r�r�r�Nr")r�r�rNr")r�r�r�r�r)r�r�r�)r�r�r�)r�r�r�)r�r�r�)r�Nr�)r�rrr�r�rr r-r/r)ZeventZcontrolrr(�mappingr^rwrWr�Z	conditionr4Z
radiogroup�add)rr��x�yrrr ZmodalZmodelessZtrack_disk_spaceZfatalr@Z	user_exitZexit_dialogZinuse�errorr/ZcostingZprepZseldlg�orderr~r�Zinstall_other_condZdont_install_other_condZcostZ
whichusers�gZprogressZmaintrrrr��s�








       












zbdist_msi.add_uicCs<|jrd||j|jf}nd||jf}tjj|j|�}|S)Nz%s.%s-py%s.msiz	%s.%s.msi)rRrPr[r\r]rS)rr�Z	base_namer�rrrrx�sz bdist_msi.get_installer_filename)r9Nr:�Pkeep the pseudo-installation tree around after creating the distribution archive)r<r=r�6require a specific python version on the target system)r>Nr)r?r@rA)rBrCrD)rErFrG)rHNrI)rJNrK)rLNrM)r5r6r7ZdescriptionrZuser_optionsZboolean_optionsrar�rXrervr�r�r�r�rxrrrrr8SsR



([66&@r8)rrr[Zdistutils.corerZdistutils.dir_utilrZdistutils.sysconfigrZdistutils.versionrZdistutils.errorsrZdistutils.utilrZ	distutilsrrr	r
rrr
rrrr8rrrr�<module>	s>PKV[XX!��)command/__pycache__/upload.cpython-36.pycnu�[���3

�\dh��@s�dZddlZddlZddlZddlZddlmZddlmZm	Z	m
Z
ddlmZddl
mZmZddlmZddlmZdd	lmZGd
d�de�ZdS)zm
distutils.command.upload

Implements the Distutils 'upload' subcommand (upload package to a package
index).
�N)�standard_b64encode)�urlopen�Request�	HTTPError)�urlparse)�DistutilsError�DistutilsOptionError)�
PyPIRCCommand)�spawn)�logc@sJeZdZdZejddgZejdgZdd	�Zd
d�Zdd
�Z	dd�Z
dS)�uploadzupload binary package to PyPI�sign�s�sign files to upload using gpg�	identity=�i�GPG identity used to sign filescCs,tj|�d|_d|_d|_d|_d|_dS)N�rF)r	�initialize_options�username�password�
show_responser
�identity)�self�r�0/usr/lib64/python3.6/distutils/command/upload.pyr s
zupload.initialize_optionscCsvtj|�|jr |jr td��|j�}|ikrX|d|_|d|_|d|_|d|_	|jrr|j
jrr|j
j|_dS)Nz.Must use --sign for --identity to have meaningrr�
repository�realm)r	�finalize_optionsrr
rZ_read_pypircrrrr�distribution)r�configrrrr(s




zupload.finalize_optionscCs>|jjsd}t|��x$|jjD]\}}}|j|||�qWdS)NzHMust create and upload files in one command (e.g. setup.py sdist upload))rZ
dist_filesr�upload_file)r�msg�command�	pyversion�filenamerrr�run:s
z
upload.runc&)Cs^t|j�\}}}}}}	|s"|s"|	r0td|j��|d2krDtd|��|jr|ddd|g}
|jrnd|jg|
d	d	�<t|
|jd
�t|d�}z|j�}Wd|j	�X|j
j}
dd
|
j�|
j
�tjj|�|f||tj|�j�d|
j�|
j�|
j�|
j�|
j�|
j�|
j�|
j�|
j�|
j�|
j�|
j�|
j �d�}ytj!|�j�}WnPt"k
�r�}z2d|}|j#|t$j%�ddl&m'}|��s|�WYdd}~Xn
X||d<d}|dk�r�t(j)�\}}}|�r�d||f}n|dk�r�dt(j(dd�}||d<|j�rtjj|�dt|dd�j�f|d<|j*d|j+j,d�}d t-|�j.d�}d!}d"|j,d�}|d#}t/j0�}x�|j1�D]�\}}d$|}t2|t3��s�|g}xr|D]j}t4|�t5k�r�|d%|d7}|d}nt6|�j,d&�}|j7|�|j7|j,d&��|j7d'�|j7|��q�W�qjW|j7|�|j8�}d(||jf}|j#|t$j%�d)|t6t9|��|d*�} t:|j|| d+�}!yt;|!�}"|"j<�}#|"j=}$Wnft>k
�r�}z|j?}#|j=}$WYdd}~Xn8t@k
�r�}z|j#t6|�t$jA��WYdd}~XnX|#d,k�r8|j#d-|#|$ft$j%�|jB�rZ|jC|"�}%d.jDd/d0|%d/d0f�}|j#|t$j%�n"d1|#|$f}|j#|t$jA�tE|��dS)3NzIncompatible url %s�http�httpszunsupported schema Zgpgz
--detach-signz-az--local-user�)�dry_run�rbZfile_upload�1z1.0)z:actionZprotocol_version�name�version�contentZfiletyper$Z
sha256_digestZmetadata_versionZsummaryZ	home_pageZauthorZauthor_email�license�description�keywords�platformZclassifiersZdownload_urlZprovidesZrequiresZ	obsoletesz#calculating md5 checksum failed: %sr)�
get_fips_modeZ
md5_digestrZ	bdist_rpmzbuilt for %s %sZ
bdist_dumbzbuilt for %s�)Zterse�commentz.ascZ
gpg_signature�:�asciizBasic z3--------------GHSKFJDLGDS7543FJKLFHRE75642756743254s
--s--
z+
Content-Disposition: form-data; name="%s"z; filename="%s"zutf-8s

zSubmitting %s to %sz multipart/form-data; boundary=%s)zContent-typezContent-lengthZ
Authorization)�data�headers��zServer response (%s): %s�
�-�KzUpload failed (%s): %s)r'r()Frr�AssertionErrorr
rr
r*�open�read�closerZmetadataZget_nameZget_version�os�path�basename�hashlibZsha256Z	hexdigestZget_descriptionZget_urlZget_contactZget_contact_emailZget_licenceZget_long_descriptionZget_keywordsZ
get_platformsZget_classifiersZget_download_urlZget_providesZget_requiresZ
get_obsoletesZmd5�
ValueErrorZannouncer�INFOZ_hashlibr4r3�distrr�encoder�decode�io�BytesIO�items�
isinstance�list�type�tuple�str�write�getvalue�lenrrZgetcoder"r�code�OSErrorZERRORrZ_read_pypi_response�joinr)&rr#r$r%ZschemaZnetlocZurlZparamsZqueryZ	fragmentsZgpg_args�fr/�metar9Zdigest�er"r4r6rIr.�idZ	user_passZauth�boundaryZsep_boundaryZend_boundaryZbody�key�value�titler:Zrequest�resultZstatus�reason�textrrrr!Bs�













zupload.upload_fileN)r
rr)rrr)�__name__�
__module__�__qualname__r1r	Zuser_optionsZboolean_optionsrrr&r!rrrrrsr)�__doc__rCrLr3rF�base64rZurllib.requestrrrZurllib.parserZdistutils.errorsrrZdistutils.corer	Zdistutils.spawnr
Z	distutilsrrrrrr�<module>sPKV[[' �@�@2command/__pycache__/build_ext.cpython-36.opt-1.pycnu�[���3


 \�z�@s�dZddlZddlZddlZddlZddlmZddlTddlm	Z	m
Z
ddlmZddlm
Z
ddlmZdd	lmZdd
lmZddlmZejd�Zd
d�ZGdd�de�ZdS)z�distutils.command.build_ext

Implements the Distutils 'build_ext' command, for building extension
modules (currently limited to C extensions, should accommodate C++
extensions ASAP).�N)�Command)�*)�customize_compiler�get_python_version)�get_config_h_filename)�newer_group)�	Extension)�get_platform)�log)�	USER_BASEz3^[a-zA-Z_][a-zA-Z_0-9]*(\.[a-zA-Z_][a-zA-Z_0-9]*)*$cCsddlm}|�dS)Nr)�show_compilers)�distutils.ccompilerr)r�r�3/usr/lib64/python3.6/distutils/command/build_ext.pyrsrc@seZdZdZdejZd`dad	d
de�fdcdddefdddedfdddefdgdhdidjdkdldmdndodpgZdd%d(d1d8gZ	d:d2d;e
fgZd<d=�Zd>d?�Z
d@dA�ZdBdC�ZdDdE�ZdFdG�ZdHdI�ZdJdK�ZdLdM�ZejdNdO��ZdPdQ�ZdRdS�ZdTdU�ZdVdW�ZdXdY�ZdZd[�Zd\d]�Zd^d_�Zd2S)q�	build_extz8build C/C++ extensions (compile/link to build directory)z (separated by '%s')�
build-lib=�b�(directory for compiled extension modules�build-temp=�t�1directory for temporary files (build by-products)z
plat-name=�pz>platform name to cross-compile for, if supported (default: %s)�inplace�iz=ignore build-lib and put compiled extensions into the source z,directory alongside your pure Python modulesz
include-dirs=�Iz.list of directories to search for header files�define=�D�C preprocessor macros to define�undef=�U�!C preprocessor macros to undefine�
libraries=�l�!external C libraries to link withz
library-dirs=�Lz.directories to search for external C libraries�rpath=�R�7directories to search for shared C libraries at runtime�
link-objects=�O�2extra explicit link objects to include in the link�debug�g�'compile/link with debugging information�force�f�2forcibly build everything (ignore file timestamps)�	compiler=�c�specify the compiler type�	parallel=�j�number of parallel build jobs�swig-cppN�)make SWIG create C++ files (default is C)�
swig-opts=�!list of SWIG command line options�swig=�path to the SWIG executable�user�#add user include, library and rpathz
help-compilerzlist available compilerscCs�d|_d|_d|_d|_d|_d|_d|_d|_d|_d|_	d|_
d|_d|_d|_
d|_d|_d|_d|_d|_d|_d|_dS)Nr)�
extensions�	build_lib�	plat_name�
build_tempr�package�include_dirs�define�undef�	libraries�library_dirs�rpath�link_objectsr+r.�compiler�swig�swig_cpp�	swig_optsr=�parallel)�selfrrr�initialize_optionsjs*zbuild_ext.initialize_optionsc
Cs�ddlm}|jdd'd(d)d*d+d,d-�|jdkr8|jj|_|jj|_|j�}|jdd�}|j	dkrn|jj	pjg|_	t
|j	t�r�|j	jt
j�|_	tjtjkr�|j	jt
jjtjd
��|j	j|�||kr�|j	j|�|jd�|jd�|jdk�r�g|_|jdk�rg|_nt
|jt��r&|jjt
j�|_|jdk�r:g|_nt
|jt��rX|jjt
j�|_t
jdk�rT|jjt
jjtjd��tjtjk�r�|jjt
jjtjd��|j�r�t
jj|jd�|_nt
jj|jd�|_|j	jt
jjt���ttdd�}|�r|jj|�|j dk�rd}n|j dd�}t
jjtjd�}|�rHt
jj||�}|jj|�tj!dd�dk�s|tj!dd�dk�r�tj"j#t
jjtjd���r�|jjt
jjtjddt$�d��n|jjd�|j%d ��r�|j&�s�|jj|j%d!��n|jjd�|j'�r|j'jd"�}d#d$�|D�|_'|j(�r4|j(jd"�|_(|j)dk�rHg|_)n|j)jd%�|_)|j*�r�t
jjt+d
�}t
jjt+d�}	t
jj,|��r�|j	j|�t
jj,|	��r�|jj|	�|jj|	�t
|j-t��r�yt.|j-�|_-Wnt/k
�r�t0d&��YnXdS).Nr)�	sysconfigZbuildr@rBrKr+r.rOrA�)Z
plat_specific�includerGrJ�ntZlibsZDebugZRelease�_home�win32�ZPCbuild��cygwin�atheos�bin�lib�python�config�.�Py_ENABLE_SHARED�LIBDIR�,cSsg|]}|df�qS)�1r)�.0Zsymbolrrr�
<listcomp>�sz.build_ext.finalize_options.<locals>.<listcomp>� zparallel should be an integer)r@r@)rBrB)rKrK)r+r+)r.r.)rOrO)rArA)1�	distutilsrRZset_undefined_optionsrC�distributionZext_packageZext_modulesr?Zget_python_incrD�
isinstance�str�split�os�pathsep�sys�exec_prefix�base_exec_prefix�append�path�joinZensure_string_listrGrHrI�name�prefixr+rB�dirnamer�getattrrA�platform�
executable�
startswithr�get_config_varZpython_buildrErFrNr=r�isdirrO�int�
ValueErrorZDistutilsOptionError)
rPrRZ
py_includeZplat_py_include�	_sys_home�suffixZnew_libZdefinesZuser_includeZuser_librrr�finalize_options�s�





(
zbuild_ext.finalize_optionscCstddlm}|jsdS|jj�rL|jd�}|jj|j�p:g�|j	j
|j�||j|j
|j|jd�|_t|j�tjdkr�|jt�kr�|jj|j�|jdk	r�|jj|j�|jdk	r�x |jD]\}}|jj||�q�W|jdk	�rx|jD]}|jj|�q�W|jdk	�r|jj|j�|j	dk	�r4|jj|j	�|jdk	�rN|jj|j�|j dk	�rh|jj!|j �|j"�dS)Nr)�new_compiler�
build_clib)rK�verbose�dry_runr.rU)#r
r�r?riZhas_c_libraries�get_finalized_commandrG�extendZget_library_namesrHrrr�rKr�r�r.rrmrurAr	Z
initializerDZset_include_dirsrEZdefine_macrorFZundefine_macroZ
set_librariesZset_library_dirsrIZset_runtime_library_dirsrJZset_link_objects�build_extensions)rPr�r�ru�value�macrorrr�runs>




z
build_ext.runc
Cs�t|t�std���xnt|�D�]`\}}t|t�r4qt|t�sLt|�dkrTtd��|\}}tjd|�t|t	�ozt
j|�s�td��t|t�s�td��t||d�}x*dD]"}|j
|�}|dk	r�t|||�q�W|j
d�|_d|k�r�tjd�|j
d�}|�rxg|_g|_xj|D]b}	t|	t��o,t|	�dk�s8td��t|	�dk�rX|jj|	d�nt|	�dk�r|jj|	��qW|||<qWdS)a�Ensure that the list of extensions (presumably provided as a
        command option 'extensions') is valid, i.e. it is a list of
        Extension objects.  We also support the old-style list of 2-tuples,
        where the tuples are (ext_name, build_info), which are converted to
        Extension instances here.

        Raise DistutilsSetupError if the structure is invalid anywhere;
        just returns otherwise.
        z:'ext_modules' option must be a list of Extension instances�zMeach element of 'ext_modules' option must be an Extension instance or 2-tuplezvold-style (ext_name, build_info) tuple found in ext_modules for extension '%s' -- please convert to Extension instancezRfirst element of each tuple in 'ext_modules' must be the extension name (a string)zOsecond element of each tuple in 'ext_modules' must be a dictionary (build info)�sourcesrDrHrG�
extra_objects�extra_compile_args�extra_link_argsNrIZdef_filez9'def_file' element of build info dict no longer supported�macrosrSz9'macros' element of build info dict must be 1- or 2-tupler)rDrHrGr�r�r�)rSr�)rj�list�DistutilsSetupError�	enumerater�tuple�lenr
�warnrk�extension_name_re�match�dict�get�setattr�runtime_library_dirs�
define_macros�undef_macrosrr)
rPr?r�ext�ext_nameZ
build_info�key�valr�r�rrr�check_extensions_listUsT










zbuild_ext.check_extensions_listcCs0|j|j�g}x|jD]}|j|j�qW|S)N)r�r?r�r�)rP�	filenamesr�rrr�get_source_files�s
zbuild_ext.get_source_filescCs6|j|j�g}x |jD]}|j|j|j��qW|S)N)r�r?rr�get_ext_fullpathru)rPZoutputsr�rrr�get_outputs�s
zbuild_ext.get_outputscCs(|j|j�|jr|j�n|j�dS)N)r�r?rO�_build_extensions_parallel�_build_extensions_serial)rPrrrr��s
zbuild_ext.build_extensionscs��j}�jdkrtj�}yddlm}Wntk
r@d}YnX|dkrV�j�dS||d��T���fdd��jD�}x6t�j|�D]&\}}�j	|��|j
�WdQRXq�WWdQRXdS)NTr)�ThreadPoolExecutor)Zmax_workerscsg|]}�j�j|��qSr)Zsubmit�build_extension)rer�)�executorrPrrrf�sz8build_ext._build_extensions_parallel.<locals>.<listcomp>)rOrm�	cpu_countZconcurrent.futuresr��ImportErrorr�r?�zip�_filter_build_errors�result)rPZworkersr�Zfuturesr�Zfutr)r�rPrr��s 


z$build_ext._build_extensions_parallelc
Cs4x.|jD]$}|j|��|j|�WdQRXqWdS)N)r?r�r�)rPr�rrrr��sz"build_ext._build_extensions_serialccsTy
dVWnDtttfk
rN}z"|js*�|jd|j|f�WYdd}~XnXdS)Nz"building extension "%s" failed: %s)ZCCompilerErrorZDistutilsErrorZCompileErrorZoptionalr�ru)rPr��errrr��s
zbuild_ext._filter_build_errorsc
CsX|j}|dkst|ttf�r,td|j��t|�}|j|j�}||j}|jpZt	||d�snt
jd|j�dSt
jd|j�|j
||�}|jp�g}|jdd�}x|jD]}|j|f�q�W|jj||j||j|j||jd�}|dd�|_|j�r|j|j�|j�p
g}|j�p|jj|�}	|jj|||j|�|j|j||j |�|j|j|	d�
dS)Nzjin 'ext_modules' option (extension '%s'), 'sources' must be present and must be a list of source filenamesZnewerz$skipping '%s' extension (up-to-date)zbuilding '%s' extension)Z
output_dirr�rDr+�extra_postargs�depends)rGrHr�r��export_symbolsr+rBZtarget_lang)!r�rjr�r�r�rur�r�r.rr
r+�info�swig_sourcesr�r�r�rrrK�compilerBrDZ_built_objectsr�r�r��languageZdetect_languageZlink_shared_object�
get_librariesrHr��get_export_symbols)
rPr�r��ext_pathr�Z
extra_argsr�rFZobjectsr�rrrr��sN



zbuild_ext.build_extensioncCs2g}g}i}|jrtjd�|js6d|jks6d|jkr<d}nd}xX|D]P}tjj|�\}}	|	dkr�|j|d|�|j|�|d||<qF|j|�qFW|s�|S|jp�|j	�}
|
dg}|j
|j�|jr�|jd�|js�x|jD]}|j|�q�Wx8|D]0}||}
tjd	||
�|j|d
|
|g��q�W|S)z�Walk the list of source files in 'sources', looking for SWIG
        interface (.i) files.  Run SWIG on all that are found, and
        return a modified 'sources' list with SWIG source files replaced
        by the generated C (or C++) files.
        z/--swig-cpp is deprecated - use --swig-opts=-c++z-c++z.cppz.cz.i�_wraprSz-pythonzswigging %s to %sz-o���)
rMr
r�rNrmrs�splitextrrrL�	find_swigr�r�Zspawn)rPr��	extensionZnew_sourcesr�Zswig_targetsZ
target_ext�source�baser�rLZswig_cmd�o�targetrrrr�0s>





zbuild_ext.swig_sourcescCs`tjdkrdStjdkrNxBdD]&}tjjd|d�}tjj|�r|SqWdSntd	tj��d
S)z�Return the name of the SWIG executable.  On Unix, this is
        just "swig" -- it should be in the PATH.  Tries a bit harder on
        Windows.
        �posixrLrU�1.3�1.2�1.1z	c:\swig%szswig.exez>I don't know how to find (much less run) SWIG on platform '%s'N)r�r�r�)rmrursrt�isfileZDistutilsPlatformError)rPZvers�fnrrrr�fs


zbuild_ext.find_swigcCs�|j|�}|jd�}|j|d�}|jsRtjj|dd�|g�}tjj|j|�Sdj|dd��}|jd�}tjj	|j
|��}tjj||�S)	z�Returns the path of the filename for a given extension.

        The file is located in `build_lib` or directly in the package
        (inplace option).
        r`rSNr�build_pyr�r�r�)�get_ext_fullnamerl�get_ext_filenamerrmrsrtr@r��abspathZget_package_dir)rPr��fullnameZmodpath�filenamerCr�Zpackage_dirrrrr�~s


zbuild_ext.get_ext_fullpathcCs |jdkr|S|jd|SdS)zSReturns the fullname of a given extension name.

        Adds the `package.` prefixNr`)rC)rPr�rrrr��s
zbuild_ext.get_ext_fullnamecCs.ddlm}|jd�}|d�}tjj|�|S)z�Convert the name of an extension (eg. "foo.bar") into the name
        of the file from which it will be loaded (eg. "foo/bar.so", or
        "foo\bar.pyd").
        r)r|r`�
EXT_SUFFIX)�distutils.sysconfigr|rlrmrsrt)rPr�r|r�Z
ext_suffixrrrr��s
zbuild_ext.get_ext_filenamecCs0d|jjd�d}||jkr*|jj|�|jS)aReturn the list of symbols that a shared extension has to
        export.  This either uses 'ext.export_symbols' or, if it's not
        provided, "PyInit_" + module_name.  Only relevant on Windows, where
        the .pyd file (DLL) must export the module "PyInit_" function.
        ZPyInit_r`rSr�)rurlr�rr)rPr�Z
initfunc_namerrrr��s
zbuild_ext.get_export_symbolscCs�tjdkrfddlm}t|j|�s\d}|jr4|d}|tjd?tjd?d@f}|j|gS|jS�nRtjd	d
�dkr�d}|tjd?tjd?d@f}|j|gStjd	d
�d
k�r>ddl	m
}d}|tjd?tjd?d@f}g}xB|jd�j�D]0}|j
d��r|j|dd	��n
|j|��q�W|j|dg|Stjdk�rP|jStjd	d�dk�rj|jSddl	m
}|jd��r�djtjd?tjd?d@|jd��}|j|gS|jSd	S)z�Return the list of libraries to link against when building a
        shared extension.  On most platforms, this is just 'ext.libraries';
        on Windows, we add the Python library (eg. python20.dll).
        rWr)�MSVCCompilerz
python%d%dZ_d���NrYrZzpython%d.%dr[)rR�SHLIBSz-lr��m�darwin��aixraz
python{}.{}{}�ABIFLAGS)roryZdistutils._msvccompilerr�rjrKr+�
hexversionrGrhrRr|rlr{rr�format)rPr�r��templateZ	pythonlibrRZextrar]rrrr��sJ


zbuild_ext.get_libraries)rrr)rrr�iignore build-lib and put compiled extensions into the source directory alongside your pure Python modules)rrr�)rrr)rrr )r!r"r#)r%r&r')r(r)r*)r+r,r-)r.r/r0)r1r2r3)r4r5r6)r7Nr8)r9Nr:)r;Nr<)r=Nr>) �__name__�
__module__�__qualname__ZdescriptionrmrnZsep_byr	Zuser_optionsZboolean_optionsrZhelp_optionsrQr�r�r�r�r�r�r�r��
contextlib�contextmanagerr�r�r�r�r�r�r�r�r�rrrrr!s�

@N	
K6	
r)�__doc__r�rm�reroZdistutils.corerZdistutils.errorsr�rrrZdistutils.dep_utilrZdistutils.extensionrZdistutils.utilr	rhr
Zsiterr�r�rrrrrr�<module>s"PKV[�s�&C&Ccommand/build_py.pynu�[���"""distutils.command.build_py

Implements the Distutils 'build_py' command."""

import os
import importlib.util
import sys
import glob

from distutils.core import Command
from distutils.errors import *
from distutils.util import convert_path, Mixin2to3
from distutils import log

class build_py (Command):

    description = "\"build\" pure Python modules (copy to build directory)"

    user_options = [
        ('build-lib=', 'd', "directory to \"build\" (copy) to"),
        ('compile', 'c', "compile .py to .pyc"),
        ('no-compile', None, "don't compile .py files [default]"),
        ('optimize=', 'O',
         "also compile with optimization: -O1 for \"python -O\", "
         "-O2 for \"python -OO\", and -O0 to disable [default: -O0]"),
        ('force', 'f', "forcibly build everything (ignore file timestamps)"),
        ]

    boolean_options = ['compile', 'force']
    negative_opt = {'no-compile' : 'compile'}

    def initialize_options(self):
        self.build_lib = None
        self.py_modules = None
        self.package = None
        self.package_data = None
        self.package_dir = None
        self.compile = 0
        self.optimize = 0
        self.force = None

    def finalize_options(self):
        self.set_undefined_options('build',
                                   ('build_lib', 'build_lib'),
                                   ('force', 'force'))

        # Get the distribution options that are aliases for build_py
        # options -- list of packages and list of modules.
        self.packages = self.distribution.packages
        self.py_modules = self.distribution.py_modules
        self.package_data = self.distribution.package_data
        self.package_dir = {}
        if self.distribution.package_dir:
            for name, path in self.distribution.package_dir.items():
                self.package_dir[name] = convert_path(path)
        self.data_files = self.get_data_files()

        # Ick, copied straight from install_lib.py (fancy_getopt needs a
        # type system!  Hell, *everything* needs a type system!!!)
        if not isinstance(self.optimize, int):
            try:
                self.optimize = int(self.optimize)
                assert 0 <= self.optimize <= 2
            except (ValueError, AssertionError):
                raise DistutilsOptionError("optimize must be 0, 1, or 2")

    def run(self):
        # XXX copy_file by default preserves atime and mtime.  IMHO this is
        # the right thing to do, but perhaps it should be an option -- in
        # particular, a site administrator might want installed files to
        # reflect the time of installation rather than the last
        # modification time before the installed release.

        # XXX copy_file by default preserves mode, which appears to be the
        # wrong thing to do: if a file is read-only in the working
        # directory, we want it to be installed read/write so that the next
        # installation of the same module distribution can overwrite it
        # without problems.  (This might be a Unix-specific issue.)  Thus
        # we turn off 'preserve_mode' when copying to the build directory,
        # since the build directory is supposed to be exactly what the
        # installation will look like (ie. we preserve mode when
        # installing).

        # Two options control which modules will be installed: 'packages'
        # and 'py_modules'.  The former lets us work with whole packages, not
        # specifying individual modules at all; the latter is for
        # specifying modules one-at-a-time.

        if self.py_modules:
            self.build_modules()
        if self.packages:
            self.build_packages()
            self.build_package_data()

        self.byte_compile(self.get_outputs(include_bytecode=0))

    def get_data_files(self):
        """Generate list of '(package,src_dir,build_dir,filenames)' tuples"""
        data = []
        if not self.packages:
            return data
        for package in self.packages:
            # Locate package source directory
            src_dir = self.get_package_dir(package)

            # Compute package build directory
            build_dir = os.path.join(*([self.build_lib] + package.split('.')))

            # Length of path to strip from found files
            plen = 0
            if src_dir:
                plen = len(src_dir)+1

            # Strip directory from globbed filenames
            filenames = [
                file[plen:] for file in self.find_data_files(package, src_dir)
                ]
            data.append((package, src_dir, build_dir, filenames))
        return data

    def find_data_files(self, package, src_dir):
        """Return filenames for package's data files in 'src_dir'"""
        globs = (self.package_data.get('', [])
                 + self.package_data.get(package, []))
        files = []
        for pattern in globs:
            # Each pattern has to be converted to a platform-specific path
            filelist = glob.glob(os.path.join(glob.escape(src_dir), convert_path(pattern)))
            # Files that match more than one pattern are only added once
            files.extend([fn for fn in filelist if fn not in files
                and os.path.isfile(fn)])
        return files

    def build_package_data(self):
        """Copy data files into build directory"""
        lastdir = None
        for package, src_dir, build_dir, filenames in self.data_files:
            for filename in filenames:
                target = os.path.join(build_dir, filename)
                self.mkpath(os.path.dirname(target))
                self.copy_file(os.path.join(src_dir, filename), target,
                               preserve_mode=False)

    def get_package_dir(self, package):
        """Return the directory, relative to the top of the source
           distribution, where package 'package' should be found
           (at least according to the 'package_dir' option, if any)."""
        path = package.split('.')

        if not self.package_dir:
            if path:
                return os.path.join(*path)
            else:
                return ''
        else:
            tail = []
            while path:
                try:
                    pdir = self.package_dir['.'.join(path)]
                except KeyError:
                    tail.insert(0, path[-1])
                    del path[-1]
                else:
                    tail.insert(0, pdir)
                    return os.path.join(*tail)
            else:
                # Oops, got all the way through 'path' without finding a
                # match in package_dir.  If package_dir defines a directory
                # for the root (nameless) package, then fallback on it;
                # otherwise, we might as well have not consulted
                # package_dir at all, as we just use the directory implied
                # by 'tail' (which should be the same as the original value
                # of 'path' at this point).
                pdir = self.package_dir.get('')
                if pdir is not None:
                    tail.insert(0, pdir)

                if tail:
                    return os.path.join(*tail)
                else:
                    return ''

    def check_package(self, package, package_dir):
        # Empty dir name means current directory, which we can probably
        # assume exists.  Also, os.path.exists and isdir don't know about
        # my "empty string means current dir" convention, so we have to
        # circumvent them.
        if package_dir != "":
            if not os.path.exists(package_dir):
                raise DistutilsFileError(
                      "package directory '%s' does not exist" % package_dir)
            if not os.path.isdir(package_dir):
                raise DistutilsFileError(
                       "supposed package directory '%s' exists, "
                       "but is not a directory" % package_dir)

        # Require __init__.py for all but the "root package"
        if package:
            init_py = os.path.join(package_dir, "__init__.py")
            if os.path.isfile(init_py):
                return init_py
            else:
                log.warn(("package init file '%s' not found " +
                          "(or not a regular file)"), init_py)

        # Either not in a package at all (__init__.py not expected), or
        # __init__.py doesn't exist -- so don't return the filename.
        return None

    def check_module(self, module, module_file):
        if not os.path.isfile(module_file):
            log.warn("file %s (for module %s) not found", module_file, module)
            return False
        else:
            return True

    def find_package_modules(self, package, package_dir):
        self.check_package(package, package_dir)
        module_files = glob.glob(os.path.join(glob.escape(package_dir), "*.py"))
        modules = []
        setup_script = os.path.abspath(self.distribution.script_name)

        for f in module_files:
            abs_f = os.path.abspath(f)
            if abs_f != setup_script:
                module = os.path.splitext(os.path.basename(f))[0]
                modules.append((package, module, f))
            else:
                self.debug_print("excluding %s" % setup_script)
        return modules

    def find_modules(self):
        """Finds individually-specified Python modules, ie. those listed by
        module name in 'self.py_modules'.  Returns a list of tuples (package,
        module_base, filename): 'package' is a tuple of the path through
        package-space to the module; 'module_base' is the bare (no
        packages, no dots) module name, and 'filename' is the path to the
        ".py" file (relative to the distribution root) that implements the
        module.
        """
        # Map package names to tuples of useful info about the package:
        #    (package_dir, checked)
        # package_dir - the directory where we'll find source files for
        #   this package
        # checked - true if we have checked that the package directory
        #   is valid (exists, contains __init__.py, ... ?)
        packages = {}

        # List of (package, module, filename) tuples to return
        modules = []

        # We treat modules-in-packages almost the same as toplevel modules,
        # just the "package" for a toplevel is empty (either an empty
        # string or empty list, depending on context).  Differences:
        #   - don't check for __init__.py in directory for empty package
        for module in self.py_modules:
            path = module.split('.')
            package = '.'.join(path[0:-1])
            module_base = path[-1]

            try:
                (package_dir, checked) = packages[package]
            except KeyError:
                package_dir = self.get_package_dir(package)
                checked = 0

            if not checked:
                init_py = self.check_package(package, package_dir)
                packages[package] = (package_dir, 1)
                if init_py:
                    modules.append((package, "__init__", init_py))

            # XXX perhaps we should also check for just .pyc files
            # (so greedy closed-source bastards can distribute Python
            # modules too)
            module_file = os.path.join(package_dir, module_base + ".py")
            if not self.check_module(module, module_file):
                continue

            modules.append((package, module_base, module_file))

        return modules

    def find_all_modules(self):
        """Compute the list of all modules that will be built, whether
        they are specified one-module-at-a-time ('self.py_modules') or
        by whole packages ('self.packages').  Return a list of tuples
        (package, module, module_file), just like 'find_modules()' and
        'find_package_modules()' do."""
        modules = []
        if self.py_modules:
            modules.extend(self.find_modules())
        if self.packages:
            for package in self.packages:
                package_dir = self.get_package_dir(package)
                m = self.find_package_modules(package, package_dir)
                modules.extend(m)
        return modules

    def get_source_files(self):
        return [module[-1] for module in self.find_all_modules()]

    def get_module_outfile(self, build_dir, package, module):
        outfile_path = [build_dir] + list(package) + [module + ".py"]
        return os.path.join(*outfile_path)

    def get_outputs(self, include_bytecode=1):
        modules = self.find_all_modules()
        outputs = []
        for (package, module, module_file) in modules:
            package = package.split('.')
            filename = self.get_module_outfile(self.build_lib, package, module)
            outputs.append(filename)
            if include_bytecode:
                if self.compile:
                    outputs.append(importlib.util.cache_from_source(
                        filename, optimization=''))
                if self.optimize > 0:
                    outputs.append(importlib.util.cache_from_source(
                        filename, optimization=self.optimize))

        outputs += [
            os.path.join(build_dir, filename)
            for package, src_dir, build_dir, filenames in self.data_files
            for filename in filenames
            ]

        return outputs

    def build_module(self, module, module_file, package):
        if isinstance(package, str):
            package = package.split('.')
        elif not isinstance(package, (list, tuple)):
            raise TypeError(
                  "'package' must be a string (dot-separated), list, or tuple")

        # Now put the module source file into the "build" area -- this is
        # easy, we just copy it somewhere under self.build_lib (the build
        # directory for Python source).
        outfile = self.get_module_outfile(self.build_lib, package, module)
        dir = os.path.dirname(outfile)
        self.mkpath(dir)
        return self.copy_file(module_file, outfile, preserve_mode=0)

    def build_modules(self):
        modules = self.find_modules()
        for (package, module, module_file) in modules:
            # Now "build" the module -- ie. copy the source file to
            # self.build_lib (the build directory for Python source).
            # (Actually, it gets copied to the directory for this package
            # under self.build_lib.)
            self.build_module(module, module_file, package)

    def build_packages(self):
        for package in self.packages:
            # Get list of (package, module, module_file) tuples based on
            # scanning the package directory.  'package' is only included
            # in the tuple so that 'find_modules()' and
            # 'find_package_tuples()' have a consistent interface; it's
            # ignored here (apart from a sanity check).  Also, 'module' is
            # the *unqualified* module name (ie. no dots, no package -- we
            # already know its package!), and 'module_file' is the path to
            # the .py file, relative to the current directory
            # (ie. including 'package_dir').
            package_dir = self.get_package_dir(package)
            modules = self.find_package_modules(package, package_dir)

            # Now loop over the modules we found, "building" each one (just
            # copy it to self.build_lib).
            for (package_, module, module_file) in modules:
                assert package == package_
                self.build_module(module, module_file, package)

    def byte_compile(self, files):
        if sys.dont_write_bytecode:
            self.warn('byte-compiling is disabled, skipping.')
            return

        from distutils.util import byte_compile
        prefix = self.build_lib
        if prefix[-1] != os.sep:
            prefix = prefix + os.sep

        # XXX this code is essentially the same as the 'byte_compile()
        # method of the "install_lib" command, except for the determination
        # of the 'prefix' string.  Hmmm.
        if self.compile:
            byte_compile(files, optimize=0,
                         force=self.force, prefix=prefix, dry_run=self.dry_run)
        if self.optimize > 0:
            byte_compile(files, optimize=self.optimize,
                         force=self.force, prefix=prefix, dry_run=self.dry_run)

class build_py_2to3(build_py, Mixin2to3):
    def run(self):
        self.updated_files = []

        # Base class code
        if self.py_modules:
            self.build_modules()
        if self.packages:
            self.build_packages()
            self.build_package_data()

        # 2to3
        self.run_2to3(self.updated_files)

        # Remaining base class code
        self.byte_compile(self.get_outputs(include_bytecode=0))

    def build_module(self, module, module_file, package):
        res = build_py.build_module(self, module, module_file, package)
        if res[1]:
            # file was copied
            self.updated_files.append(res[0])
        return res
PKV[9R)S+
+
command/install_egg_info.pynu�[���"""distutils.command.install_egg_info

Implements the Distutils 'install_egg_info' command, for installing
a package's PKG-INFO metadata."""


from distutils.cmd import Command
from distutils import log, dir_util
import os, sys, re

class install_egg_info(Command):
    """Install an .egg-info file for the package"""

    description = "Install package's PKG-INFO metadata as an .egg-info file"
    user_options = [
        ('install-dir=', 'd', "directory to install to"),
    ]

    def initialize_options(self):
        self.install_dir = None

    def finalize_options(self):
        self.set_undefined_options('install_lib',('install_dir','install_dir'))
        basename = "%s-%s-py%d.%d.egg-info" % (
            to_filename(safe_name(self.distribution.get_name())),
            to_filename(safe_version(self.distribution.get_version())),
            *sys.version_info[:2]
        )
        self.target = os.path.join(self.install_dir, basename)
        self.outputs = [self.target]

    def run(self):
        target = self.target
        if os.path.isdir(target) and not os.path.islink(target):
            dir_util.remove_tree(target, dry_run=self.dry_run)
        elif os.path.exists(target):
            self.execute(os.unlink,(self.target,),"Removing "+target)
        elif not os.path.isdir(self.install_dir):
            self.execute(os.makedirs, (self.install_dir,),
                         "Creating "+self.install_dir)
        log.info("Writing %s", target)
        if not self.dry_run:
            with open(target, 'w', encoding='UTF-8') as f:
                self.distribution.metadata.write_pkg_file(f)

    def get_outputs(self):
        return self.outputs


# The following routines are taken from setuptools' pkg_resources module and
# can be replaced by importing them from pkg_resources once it is included
# in the stdlib.

def safe_name(name):
    """Convert an arbitrary string to a standard distribution name

    Any runs of non-alphanumeric/. characters are replaced with a single '-'.
    """
    return re.sub('[^A-Za-z0-9.]+', '-', name)


def safe_version(version):
    """Convert an arbitrary string to a standard version string

    Spaces become dots, and all other non-alphanumeric characters become
    dashes, with runs of multiple dashes condensed to a single dash.
    """
    version = version.replace(' ','.')
    return re.sub('[^A-Za-z0-9.]+', '-', version)


def to_filename(name):
    """Convert a project or version name to its filename-escaped form

    Any '-' characters are currently replaced with '_'.
    """
    return name.replace('-','_')
PKV[v3;�VVcommand/build_clib.pynu�[���"""distutils.command.build_clib

Implements the Distutils 'build_clib' command, to build a C/C++ library
that is included in the module distribution and needed by an extension
module."""


# XXX this module has *lots* of code ripped-off quite transparently from
# build_ext.py -- not surprisingly really, as the work required to build
# a static library from a collection of C source files is not really all
# that different from what's required to build a shared object file from
# a collection of C source files.  Nevertheless, I haven't done the
# necessary refactoring to account for the overlap in code between the
# two modules, mainly because a number of subtle details changed in the
# cut 'n paste.  Sigh.

import os
from distutils.core import Command
from distutils.errors import *
from distutils.sysconfig import customize_compiler
from distutils import log

def show_compilers():
    from distutils.ccompiler import show_compilers
    show_compilers()


class build_clib(Command):

    description = "build C/C++ libraries used by Python extensions"

    user_options = [
        ('build-clib=', 'b',
         "directory to build C/C++ libraries to"),
        ('build-temp=', 't',
         "directory to put temporary build by-products"),
        ('debug', 'g',
         "compile with debugging information"),
        ('force', 'f',
         "forcibly build everything (ignore file timestamps)"),
        ('compiler=', 'c',
         "specify the compiler type"),
        ]

    boolean_options = ['debug', 'force']

    help_options = [
        ('help-compiler', None,
         "list available compilers", show_compilers),
        ]

    def initialize_options(self):
        self.build_clib = None
        self.build_temp = None

        # List of libraries to build
        self.libraries = None

        # Compilation options for all libraries
        self.include_dirs = None
        self.define = None
        self.undef = None
        self.debug = None
        self.force = 0
        self.compiler = None


    def finalize_options(self):
        # This might be confusing: both build-clib and build-temp default
        # to build-temp as defined by the "build" command.  This is because
        # I think that C libraries are really just temporary build
        # by-products, at least from the point of view of building Python
        # extensions -- but I want to keep my options open.
        self.set_undefined_options('build',
                                   ('build_temp', 'build_clib'),
                                   ('build_temp', 'build_temp'),
                                   ('compiler', 'compiler'),
                                   ('debug', 'debug'),
                                   ('force', 'force'))

        self.libraries = self.distribution.libraries
        if self.libraries:
            self.check_library_list(self.libraries)

        if self.include_dirs is None:
            self.include_dirs = self.distribution.include_dirs or []
        if isinstance(self.include_dirs, str):
            self.include_dirs = self.include_dirs.split(os.pathsep)

        # XXX same as for build_ext -- what about 'self.define' and
        # 'self.undef' ?


    def run(self):
        if not self.libraries:
            return

        # Yech -- this is cut 'n pasted from build_ext.py!
        from distutils.ccompiler import new_compiler
        self.compiler = new_compiler(compiler=self.compiler,
                                     dry_run=self.dry_run,
                                     force=self.force)
        customize_compiler(self.compiler)

        if self.include_dirs is not None:
            self.compiler.set_include_dirs(self.include_dirs)
        if self.define is not None:
            # 'define' option is a list of (name,value) tuples
            for (name,value) in self.define:
                self.compiler.define_macro(name, value)
        if self.undef is not None:
            for macro in self.undef:
                self.compiler.undefine_macro(macro)

        self.build_libraries(self.libraries)


    def check_library_list(self, libraries):
        """Ensure that the list of libraries is valid.

        `library` is presumably provided as a command option 'libraries'.
        This method checks that it is a list of 2-tuples, where the tuples
        are (library_name, build_info_dict).

        Raise DistutilsSetupError if the structure is invalid anywhere;
        just returns otherwise.
        """
        if not isinstance(libraries, list):
            raise DistutilsSetupError(
                  "'libraries' option must be a list of tuples")

        for lib in libraries:
            if not isinstance(lib, tuple) and len(lib) != 2:
                raise DistutilsSetupError(
                      "each element of 'libraries' must a 2-tuple")

            name, build_info = lib

            if not isinstance(name, str):
                raise DistutilsSetupError(
                      "first element of each tuple in 'libraries' "
                      "must be a string (the library name)")

            if '/' in name or (os.sep != '/' and os.sep in name):
                raise DistutilsSetupError("bad library name '%s': "
                       "may not contain directory separators" % lib[0])

            if not isinstance(build_info, dict):
                raise DistutilsSetupError(
                      "second element of each tuple in 'libraries' "
                      "must be a dictionary (build info)")


    def get_library_names(self):
        # Assume the library list is valid -- 'check_library_list()' is
        # called from 'finalize_options()', so it should be!
        if not self.libraries:
            return None

        lib_names = []
        for (lib_name, build_info) in self.libraries:
            lib_names.append(lib_name)
        return lib_names


    def get_source_files(self):
        self.check_library_list(self.libraries)
        filenames = []
        for (lib_name, build_info) in self.libraries:
            sources = build_info.get('sources')
            if sources is None or not isinstance(sources, (list, tuple)):
                raise DistutilsSetupError(
                       "in 'libraries' option (library '%s'), "
                       "'sources' must be present and must be "
                       "a list of source filenames" % lib_name)

            filenames.extend(sources)
        return filenames


    def build_libraries(self, libraries):
        for (lib_name, build_info) in libraries:
            sources = build_info.get('sources')
            if sources is None or not isinstance(sources, (list, tuple)):
                raise DistutilsSetupError(
                       "in 'libraries' option (library '%s'), "
                       "'sources' must be present and must be "
                       "a list of source filenames" % lib_name)
            sources = list(sources)

            log.info("building '%s' library", lib_name)

            # First, compile the source code to object files in the library
            # directory.  (This should probably change to putting object
            # files in a temporary build directory.)
            macros = build_info.get('macros')
            include_dirs = build_info.get('include_dirs')
            objects = self.compiler.compile(sources,
                                            output_dir=self.build_temp,
                                            macros=macros,
                                            include_dirs=include_dirs,
                                            debug=self.debug)

            # Now "link" the object files together into a static library.
            # (On Unix at least, this isn't really linking -- it just
            # builds an archive.  Whatever.)
            self.compiler.create_static_lib(objects, lib_name,
                                            output_dir=self.build_clib,
                                            debug=self.debug)
PKV[��فj�jcommand/install.pynu�[���"""distutils.command.install

Implements the Distutils 'install' command."""

import sys
import os

from distutils import log
from distutils.core import Command
from distutils.debug import DEBUG
from distutils.sysconfig import get_config_vars
from distutils.errors import DistutilsPlatformError
from distutils.file_util import write_file
from distutils.util import convert_path, subst_vars, change_root
from distutils.util import get_platform
from distutils.errors import DistutilsOptionError

from site import USER_BASE
from site import USER_SITE
HAS_USER_SITE = True

WINDOWS_SCHEME = {
    'purelib': '$base/Lib/site-packages',
    'platlib': '$base/Lib/site-packages',
    'headers': '$base/Include/$dist_name',
    'scripts': '$base/Scripts',
    'data'   : '$base',
}

INSTALL_SCHEMES = {
    'unix_prefix': {
        'purelib': '$base/lib/python$py_version_short/site-packages',
        'platlib': '$platbase/lib64/python$py_version_short/site-packages',
        'headers': '$base/include/python$py_version_short$abiflags/$dist_name',
        'scripts': '$base/bin',
        'data'   : '$base',
        },
    'unix_home': {
        'purelib': '$base/lib/python',
        'platlib': '$base/lib64/python',
        'headers': '$base/include/python/$dist_name',
        'scripts': '$base/bin',
        'data'   : '$base',
        },
    'nt': WINDOWS_SCHEME,
    }

# user site schemes
if HAS_USER_SITE:
    INSTALL_SCHEMES['nt_user'] = {
        'purelib': '$usersite',
        'platlib': '$usersite',
        'headers': '$userbase/Python$py_version_nodot/Include/$dist_name',
        'scripts': '$userbase/Python$py_version_nodot/Scripts',
        'data'   : '$userbase',
        }

    INSTALL_SCHEMES['unix_user'] = {
        'purelib': '$usersite',
        'platlib': '$usersite',
        'headers':
            '$userbase/include/python$py_version_short$abiflags/$dist_name',
        'scripts': '$userbase/bin',
        'data'   : '$userbase',
        }

# The keys to an installation scheme; if any new types of files are to be
# installed, be sure to add an entry to every installation scheme above,
# and to SCHEME_KEYS here.
SCHEME_KEYS = ('purelib', 'platlib', 'headers', 'scripts', 'data')


class install(Command):

    description = "install everything from build directory"

    user_options = [
        # Select installation scheme and set base director(y|ies)
        ('prefix=', None,
         "installation prefix"),
        ('exec-prefix=', None,
         "(Unix only) prefix for platform-specific files"),
        ('home=', None,
         "(Unix only) home directory to install under"),

        # Or, just set the base director(y|ies)
        ('install-base=', None,
         "base installation directory (instead of --prefix or --home)"),
        ('install-platbase=', None,
         "base installation directory for platform-specific files " +
         "(instead of --exec-prefix or --home)"),
        ('root=', None,
         "install everything relative to this alternate root directory"),

        # Or, explicitly set the installation scheme
        ('install-purelib=', None,
         "installation directory for pure Python module distributions"),
        ('install-platlib=', None,
         "installation directory for non-pure module distributions"),
        ('install-lib=', None,
         "installation directory for all module distributions " +
         "(overrides --install-purelib and --install-platlib)"),

        ('install-headers=', None,
         "installation directory for C/C++ headers"),
        ('install-scripts=', None,
         "installation directory for Python scripts"),
        ('install-data=', None,
         "installation directory for data files"),

        # Byte-compilation options -- see install_lib.py for details, as
        # these are duplicated from there (but only install_lib does
        # anything with them).
        ('compile', 'c', "compile .py to .pyc [default]"),
        ('no-compile', None, "don't compile .py files"),
        ('optimize=', 'O',
         "also compile with optimization: -O1 for \"python -O\", "
         "-O2 for \"python -OO\", and -O0 to disable [default: -O0]"),

        # Miscellaneous control options
        ('force', 'f',
         "force installation (overwrite any existing files)"),
        ('skip-build', None,
         "skip rebuilding everything (for testing/debugging)"),

        # Where to install documentation (eventually!)
        #('doc-format=', None, "format of documentation to generate"),
        #('install-man=', None, "directory for Unix man pages"),
        #('install-html=', None, "directory for HTML documentation"),
        #('install-info=', None, "directory for GNU info files"),

        ('record=', None,
         "filename in which to record list of installed files"),
        ]

    boolean_options = ['compile', 'force', 'skip-build']

    if HAS_USER_SITE:
        user_options.append(('user', None,
                             "install in user site-package '%s'" % USER_SITE))
        boolean_options.append('user')

    negative_opt = {'no-compile' : 'compile'}


    def initialize_options(self):
        """Initializes options."""
        # High-level options: these select both an installation base
        # and scheme.
        self.prefix = None
        self.exec_prefix = None
        self.home = None
        self.user = 0

        # These select only the installation base; it's up to the user to
        # specify the installation scheme (currently, that means supplying
        # the --install-{platlib,purelib,scripts,data} options).
        self.install_base = None
        self.install_platbase = None
        self.root = None

        # These options are the actual installation directories; if not
        # supplied by the user, they are filled in using the installation
        # scheme implied by prefix/exec-prefix/home and the contents of
        # that installation scheme.
        self.install_purelib = None     # for pure module distributions
        self.install_platlib = None     # non-pure (dists w/ extensions)
        self.install_headers = None     # for C/C++ headers
        self.install_lib = None         # set to either purelib or platlib
        self.install_scripts = None
        self.install_data = None
        self.install_userbase = USER_BASE
        self.install_usersite = USER_SITE

        self.compile = None
        self.optimize = None

        # Deprecated
        # These two are for putting non-packagized distributions into their
        # own directory and creating a .pth file if it makes sense.
        # 'extra_path' comes from the setup file; 'install_path_file' can
        # be turned off if it makes no sense to install a .pth file.  (But
        # better to install it uselessly than to guess wrong and not
        # install it when it's necessary and would be used!)  Currently,
        # 'install_path_file' is always true unless some outsider meddles
        # with it.
        self.extra_path = None
        self.install_path_file = 1

        # 'force' forces installation, even if target files are not
        # out-of-date.  'skip_build' skips running the "build" command,
        # handy if you know it's not necessary.  'warn_dir' (which is *not*
        # a user option, it's just there so the bdist_* commands can turn
        # it off) determines whether we warn about installing to a
        # directory not in sys.path.
        self.force = 0
        self.skip_build = 0
        self.warn_dir = 1

        # These are only here as a conduit from the 'build' command to the
        # 'install_*' commands that do the real work.  ('build_base' isn't
        # actually used anywhere, but it might be useful in future.)  They
        # are not user options, because if the user told the install
        # command where the build directory is, that wouldn't affect the
        # build command.
        self.build_base = None
        self.build_lib = None

        # Not defined yet because we don't know anything about
        # documentation yet.
        #self.install_man = None
        #self.install_html = None
        #self.install_info = None

        self.record = None


    # -- Option finalizing methods -------------------------------------
    # (This is rather more involved than for most commands,
    # because this is where the policy for installing third-
    # party Python modules on various platforms given a wide
    # array of user input is decided.  Yes, it's quite complex!)

    def finalize_options(self):
        """Finalizes options."""
        # This method (and its helpers, like 'finalize_unix()',
        # 'finalize_other()', and 'select_scheme()') is where the default
        # installation directories for modules, extension modules, and
        # anything else we care to install from a Python module
        # distribution.  Thus, this code makes a pretty important policy
        # statement about how third-party stuff is added to a Python
        # installation!  Note that the actual work of installation is done
        # by the relatively simple 'install_*' commands; they just take
        # their orders from the installation directory options determined
        # here.

        # Check for errors/inconsistencies in the options; first, stuff
        # that's wrong on any platform.

        if ((self.prefix or self.exec_prefix or self.home) and
            (self.install_base or self.install_platbase)):
            raise DistutilsOptionError(
                   "must supply either prefix/exec-prefix/home or " +
                   "install-base/install-platbase -- not both")

        if self.home and (self.prefix or self.exec_prefix):
            raise DistutilsOptionError(
                  "must supply either home or prefix/exec-prefix -- not both")

        if self.user and (self.prefix or self.exec_prefix or self.home or
                self.install_base or self.install_platbase):
            raise DistutilsOptionError("can't combine user with prefix, "
                                       "exec_prefix/home, or install_(plat)base")

        # Next, stuff that's wrong (or dubious) only on certain platforms.
        if os.name != "posix":
            if self.exec_prefix:
                self.warn("exec-prefix option ignored on this platform")
                self.exec_prefix = None

        # Now the interesting logic -- so interesting that we farm it out
        # to other methods.  The goal of these methods is to set the final
        # values for the install_{lib,scripts,data,...}  options, using as
        # input a heady brew of prefix, exec_prefix, home, install_base,
        # install_platbase, user-supplied versions of
        # install_{purelib,platlib,lib,scripts,data,...}, and the
        # INSTALL_SCHEME dictionary above.  Phew!

        self.dump_dirs("pre-finalize_{unix,other}")

        if os.name == 'posix':
            self.finalize_unix()
        else:
            self.finalize_other()

        self.dump_dirs("post-finalize_{unix,other}()")

        # Expand configuration variables, tilde, etc. in self.install_base
        # and self.install_platbase -- that way, we can use $base or
        # $platbase in the other installation directories and not worry
        # about needing recursive variable expansion (shudder).

        py_version = sys.version.split()[0]
        (prefix, exec_prefix) = get_config_vars('prefix', 'exec_prefix')
        try:
            abiflags = sys.abiflags
        except AttributeError:
            # sys.abiflags may not be defined on all platforms.
            abiflags = ''
        self.config_vars = {'dist_name': self.distribution.get_name(),
                            'dist_version': self.distribution.get_version(),
                            'dist_fullname': self.distribution.get_fullname(),
                            'py_version': py_version,
                            'py_version_short': '%d.%d' % sys.version_info[:2],
                            'py_version_nodot': '%d%d' % sys.version_info[:2],
                            'sys_prefix': prefix,
                            'prefix': prefix,
                            'sys_exec_prefix': exec_prefix,
                            'exec_prefix': exec_prefix,
                            'abiflags': abiflags,
                           }

        if HAS_USER_SITE:
            self.config_vars['userbase'] = self.install_userbase
            self.config_vars['usersite'] = self.install_usersite

        self.expand_basedirs()

        self.dump_dirs("post-expand_basedirs()")

        # Now define config vars for the base directories so we can expand
        # everything else.
        self.config_vars['base'] = self.install_base
        self.config_vars['platbase'] = self.install_platbase

        if DEBUG:
            from pprint import pprint
            print("config vars:")
            pprint(self.config_vars)

        # Expand "~" and configuration variables in the installation
        # directories.
        self.expand_dirs()

        self.dump_dirs("post-expand_dirs()")

        # Create directories in the home dir:
        if self.user:
            self.create_home_path()

        # Pick the actual directory to install all modules to: either
        # install_purelib or install_platlib, depending on whether this
        # module distribution is pure or not.  Of course, if the user
        # already specified install_lib, use their selection.
        if self.install_lib is None:
            if self.distribution.ext_modules: # has extensions: non-pure
                self.install_lib = self.install_platlib
            else:
                self.install_lib = self.install_purelib


        # Convert directories from Unix /-separated syntax to the local
        # convention.
        self.convert_paths('lib', 'purelib', 'platlib',
                           'scripts', 'data', 'headers',
                           'userbase', 'usersite')

        # Deprecated
        # Well, we're not actually fully completely finalized yet: we still
        # have to deal with 'extra_path', which is the hack for allowing
        # non-packagized module distributions (hello, Numerical Python!) to
        # get their own directories.
        self.handle_extra_path()
        self.install_libbase = self.install_lib # needed for .pth file
        self.install_lib = os.path.join(self.install_lib, self.extra_dirs)

        # If a new root directory was supplied, make all the installation
        # dirs relative to it.
        if self.root is not None:
            self.change_roots('libbase', 'lib', 'purelib', 'platlib',
                              'scripts', 'data', 'headers')

        self.dump_dirs("after prepending root")

        # Find out the build directories, ie. where to install from.
        self.set_undefined_options('build',
                                   ('build_base', 'build_base'),
                                   ('build_lib', 'build_lib'))

        # Punt on doc directories for now -- after all, we're punting on
        # documentation completely!

    def dump_dirs(self, msg):
        """Dumps the list of user options."""
        if not DEBUG:
            return
        from distutils.fancy_getopt import longopt_xlate
        log.debug(msg + ":")
        for opt in self.user_options:
            opt_name = opt[0]
            if opt_name[-1] == "=":
                opt_name = opt_name[0:-1]
            if opt_name in self.negative_opt:
                opt_name = self.negative_opt[opt_name]
                opt_name = opt_name.translate(longopt_xlate)
                val = not getattr(self, opt_name)
            else:
                opt_name = opt_name.translate(longopt_xlate)
                val = getattr(self, opt_name)
            log.debug("  %s: %s", opt_name, val)

    def finalize_unix(self):
        """Finalizes options for posix platforms."""
        if self.install_base is not None or self.install_platbase is not None:
            if ((self.install_lib is None and
                 self.install_purelib is None and
                 self.install_platlib is None) or
                self.install_headers is None or
                self.install_scripts is None or
                self.install_data is None):
                raise DistutilsOptionError(
                      "install-base or install-platbase supplied, but "
                      "installation scheme is incomplete")
            return

        if self.user:
            if self.install_userbase is None:
                raise DistutilsPlatformError(
                    "User base directory is not specified")
            self.install_base = self.install_platbase = self.install_userbase
            self.select_scheme("unix_user")
        elif self.home is not None:
            self.install_base = self.install_platbase = self.home
            self.select_scheme("unix_home")
        else:
            if self.prefix is None:
                if self.exec_prefix is not None:
                    raise DistutilsOptionError(
                          "must not supply exec-prefix without prefix")

                # self.prefix is set to sys.prefix + /local/
                # if neither RPM build nor virtual environment is
                # detected to make pip and distutils install packages
                # into the separate location.
                if (not (hasattr(sys, 'real_prefix') or
                    sys.prefix != sys.base_prefix) and
                    'RPM_BUILD_ROOT' not in os.environ):
                    addition = "/local"
                else:
                    addition = ""

                self.prefix = os.path.normpath(sys.prefix) + addition
                self.exec_prefix = os.path.normpath(sys.exec_prefix) + addition

            else:
                if self.exec_prefix is None:
                    self.exec_prefix = self.prefix

            self.install_base = self.prefix
            self.install_platbase = self.exec_prefix
            self.select_scheme("unix_prefix")

    def finalize_other(self):
        """Finalizes options for non-posix platforms"""
        if self.user:
            if self.install_userbase is None:
                raise DistutilsPlatformError(
                    "User base directory is not specified")
            self.install_base = self.install_platbase = self.install_userbase
            self.select_scheme(os.name + "_user")
        elif self.home is not None:
            self.install_base = self.install_platbase = self.home
            self.select_scheme("unix_home")
        else:
            if self.prefix is None:
                self.prefix = os.path.normpath(sys.prefix)

            self.install_base = self.install_platbase = self.prefix
            try:
                self.select_scheme(os.name)
            except KeyError:
                raise DistutilsPlatformError(
                      "I don't know how to install stuff on '%s'" % os.name)

    def select_scheme(self, name):
        """Sets the install directories by applying the install schemes."""
        # it's the caller's problem if they supply a bad name!
        scheme = INSTALL_SCHEMES[name]
        for key in SCHEME_KEYS:
            attrname = 'install_' + key
            if getattr(self, attrname) is None:
                setattr(self, attrname, scheme[key])

    def _expand_attrs(self, attrs):
        for attr in attrs:
            val = getattr(self, attr)
            if val is not None:
                if os.name == 'posix' or os.name == 'nt':
                    val = os.path.expanduser(val)
                val = subst_vars(val, self.config_vars)
                setattr(self, attr, val)

    def expand_basedirs(self):
        """Calls `os.path.expanduser` on install_base, install_platbase and
        root."""
        self._expand_attrs(['install_base', 'install_platbase', 'root'])

    def expand_dirs(self):
        """Calls `os.path.expanduser` on install dirs."""
        self._expand_attrs(['install_purelib', 'install_platlib',
                            'install_lib', 'install_headers',
                            'install_scripts', 'install_data',])

    def convert_paths(self, *names):
        """Call `convert_path` over `names`."""
        for name in names:
            attr = "install_" + name
            setattr(self, attr, convert_path(getattr(self, attr)))

    def handle_extra_path(self):
        """Set `path_file` and `extra_dirs` using `extra_path`."""
        if self.extra_path is None:
            self.extra_path = self.distribution.extra_path

        if self.extra_path is not None:
            log.warn(
                "Distribution option extra_path is deprecated. "
                "See issue27919 for details."
            )
            if isinstance(self.extra_path, str):
                self.extra_path = self.extra_path.split(',')

            if len(self.extra_path) == 1:
                path_file = extra_dirs = self.extra_path[0]
            elif len(self.extra_path) == 2:
                path_file, extra_dirs = self.extra_path
            else:
                raise DistutilsOptionError(
                      "'extra_path' option must be a list, tuple, or "
                      "comma-separated string with 1 or 2 elements")

            # convert to local form in case Unix notation used (as it
            # should be in setup scripts)
            extra_dirs = convert_path(extra_dirs)
        else:
            path_file = None
            extra_dirs = ''

        # XXX should we warn if path_file and not extra_dirs? (in which
        # case the path file would be harmless but pointless)
        self.path_file = path_file
        self.extra_dirs = extra_dirs

    def change_roots(self, *names):
        """Change the install directories pointed by name using root."""
        for name in names:
            attr = "install_" + name
            setattr(self, attr, change_root(self.root, getattr(self, attr)))

    def create_home_path(self):
        """Create directories under ~."""
        if not self.user:
            return
        home = convert_path(os.path.expanduser("~"))
        for name, path in self.config_vars.items():
            if path.startswith(home) and not os.path.isdir(path):
                self.debug_print("os.makedirs('%s', 0o700)" % path)
                os.makedirs(path, 0o700)

    # -- Command execution methods -------------------------------------

    def run(self):
        """Runs the command."""
        # Obviously have to build before we can install
        if not self.skip_build:
            self.run_command('build')
            # If we built for any other platform, we can't install.
            build_plat = self.distribution.get_command_obj('build').plat_name
            # check warn_dir - it is a clue that the 'install' is happening
            # internally, and not to sys.path, so we don't check the platform
            # matches what we are running.
            if self.warn_dir and build_plat != get_platform():
                raise DistutilsPlatformError("Can't install when "
                                             "cross-compiling")

        # Run all sub-commands (at least those that need to be run)
        for cmd_name in self.get_sub_commands():
            self.run_command(cmd_name)

        if self.path_file:
            self.create_path_file()

        # write list of installed files, if requested.
        if self.record:
            outputs = self.get_outputs()
            if self.root:               # strip any package prefix
                root_len = len(self.root)
                for counter in range(len(outputs)):
                    outputs[counter] = outputs[counter][root_len:]
            self.execute(write_file,
                         (self.record, outputs),
                         "writing list of installed files to '%s'" %
                         self.record)

        sys_path = map(os.path.normpath, sys.path)
        sys_path = map(os.path.normcase, sys_path)
        install_lib = os.path.normcase(os.path.normpath(self.install_lib))
        if (self.warn_dir and
            not (self.path_file and self.install_path_file) and
            install_lib not in sys_path):
            log.debug(("modules installed to '%s', which is not in "
                       "Python's module search path (sys.path) -- "
                       "you'll have to change the search path yourself"),
                       self.install_lib)

    def create_path_file(self):
        """Creates the .pth file"""
        filename = os.path.join(self.install_libbase,
                                self.path_file + ".pth")
        if self.install_path_file:
            self.execute(write_file,
                         (filename, [self.extra_dirs]),
                         "creating %s" % filename)
        else:
            self.warn("path file '%s' not created" % filename)


    # -- Reporting methods ---------------------------------------------

    def get_outputs(self):
        """Assembles the outputs of all the sub-commands."""
        outputs = []
        for cmd_name in self.get_sub_commands():
            cmd = self.get_finalized_command(cmd_name)
            # Add the contents of cmd.get_outputs(), ensuring
            # that outputs doesn't contain duplicate entries
            for filename in cmd.get_outputs():
                if filename not in outputs:
                    outputs.append(filename)

        if self.path_file and self.install_path_file:
            outputs.append(os.path.join(self.install_libbase,
                                        self.path_file + ".pth"))

        return outputs

    def get_inputs(self):
        """Returns the inputs of all the sub-commands"""
        # XXX gee, this looks familiar ;-(
        inputs = []
        for cmd_name in self.get_sub_commands():
            cmd = self.get_finalized_command(cmd_name)
            inputs.extend(cmd.get_inputs())

        return inputs

    # -- Predicates for sub-command list -------------------------------

    def has_lib(self):
        """Returns true if the current distribution has any Python
        modules to install."""
        return (self.distribution.has_pure_modules() or
                self.distribution.has_ext_modules())

    def has_headers(self):
        """Returns true if the current distribution has any headers to
        install."""
        return self.distribution.has_headers()

    def has_scripts(self):
        """Returns true if the current distribution has any scripts to.
        install."""
        return self.distribution.has_scripts()

    def has_data(self):
        """Returns true if the current distribution has any data to.
        install."""
        return self.distribution.has_data_files()

    # 'sub_commands': a list of commands this command might have to run to
    # get its work done.  See cmd.py for more info.
    sub_commands = [('install_lib',     has_lib),
                    ('install_headers', has_headers),
                    ('install_scripts', has_scripts),
                    ('install_data',    has_data),
                    ('install_egg_info', lambda self:True),
                   ]
PKV[��n1��command/bdist.pynu�[���"""distutils.command.bdist

Implements the Distutils 'bdist' command (create a built [binary]
distribution)."""

import os
from distutils.core import Command
from distutils.errors import *
from distutils.util import get_platform


def show_formats():
    """Print list of available formats (arguments to "--format" option).
    """
    from distutils.fancy_getopt import FancyGetopt
    formats = []
    for format in bdist.format_commands:
        formats.append(("formats=" + format, None,
                        bdist.format_command[format][1]))
    pretty_printer = FancyGetopt(formats)
    pretty_printer.print_help("List of available distribution formats:")


class bdist(Command):

    description = "create a built (binary) distribution"

    user_options = [('bdist-base=', 'b',
                     "temporary directory for creating built distributions"),
                    ('plat-name=', 'p',
                     "platform name to embed in generated filenames "
                     "(default: %s)" % get_platform()),
                    ('formats=', None,
                     "formats for distribution (comma-separated list)"),
                    ('dist-dir=', 'd',
                     "directory to put final built distributions in "
                     "[default: dist]"),
                    ('skip-build', None,
                     "skip rebuilding everything (for testing/debugging)"),
                    ('owner=', 'u',
                     "Owner name used when creating a tar file"
                     " [default: current user]"),
                    ('group=', 'g',
                     "Group name used when creating a tar file"
                     " [default: current group]"),
                   ]

    boolean_options = ['skip-build']

    help_options = [
        ('help-formats', None,
         "lists available distribution formats", show_formats),
        ]

    # The following commands do not take a format option from bdist
    no_format_option = ('bdist_rpm',)

    # This won't do in reality: will need to distinguish RPM-ish Linux,
    # Debian-ish Linux, Solaris, FreeBSD, ..., Windows, Mac OS.
    default_format = {'posix': 'gztar',
                      'nt': 'zip'}

    # Establish the preferred order (for the --help-formats option).
    format_commands = ['rpm', 'gztar', 'bztar', 'xztar', 'ztar', 'tar',
                       'wininst', 'zip', 'msi']

    # And the real information.
    format_command = {'rpm':   ('bdist_rpm',  "RPM distribution"),
                      'gztar': ('bdist_dumb', "gzip'ed tar file"),
                      'bztar': ('bdist_dumb', "bzip2'ed tar file"),
                      'xztar': ('bdist_dumb', "xz'ed tar file"),
                      'ztar':  ('bdist_dumb', "compressed tar file"),
                      'tar':   ('bdist_dumb', "tar file"),
                      'wininst': ('bdist_wininst',
                                  "Windows executable installer"),
                      'zip':   ('bdist_dumb', "ZIP file"),
                      'msi':   ('bdist_msi',  "Microsoft Installer")
                      }


    def initialize_options(self):
        self.bdist_base = None
        self.plat_name = None
        self.formats = None
        self.dist_dir = None
        self.skip_build = 0
        self.group = None
        self.owner = None

    def finalize_options(self):
        # have to finalize 'plat_name' before 'bdist_base'
        if self.plat_name is None:
            if self.skip_build:
                self.plat_name = get_platform()
            else:
                self.plat_name = self.get_finalized_command('build').plat_name

        # 'bdist_base' -- parent of per-built-distribution-format
        # temporary directories (eg. we'll probably have
        # "build/bdist.<plat>/dumb", "build/bdist.<plat>/rpm", etc.)
        if self.bdist_base is None:
            build_base = self.get_finalized_command('build').build_base
            self.bdist_base = os.path.join(build_base,
                                           'bdist.' + self.plat_name)

        self.ensure_string_list('formats')
        if self.formats is None:
            try:
                self.formats = [self.default_format[os.name]]
            except KeyError:
                raise DistutilsPlatformError(
                      "don't know how to create built distributions "
                      "on platform %s" % os.name)

        if self.dist_dir is None:
            self.dist_dir = "dist"

    def run(self):
        # Figure out which sub-commands we need to run.
        commands = []
        for format in self.formats:
            try:
                commands.append(self.format_command[format][0])
            except KeyError:
                raise DistutilsOptionError("invalid format '%s'" % format)

        # Reinitialize and run each command.
        for i in range(len(self.formats)):
            cmd_name = commands[i]
            sub_cmd = self.reinitialize_command(cmd_name)
            if cmd_name not in self.no_format_option:
                sub_cmd.format = self.formats[i]

            # passing the owner and group names for tar archiving
            if cmd_name == 'bdist_dumb':
                sub_cmd.owner = self.owner
                sub_cmd.group = self.group

            # If we're going to need to run this command again, tell it to
            # keep its temporary files around so subsequent runs go faster.
            if cmd_name in commands[i+1:]:
                sub_cmd.keep_temp = 1
            self.run_command(cmd_name)
PKV[;��command/__init__.pynu�[���"""distutils.command

Package containing implementation of all the standard Distutils
commands."""

__all__ = ['build',
           'build_py',
           'build_ext',
           'build_clib',
           'build_scripts',
           'clean',
           'install',
           'install_lib',
           'install_headers',
           'install_scripts',
           'install_data',
           'sdist',
           'register',
           'bdist',
           'bdist_dumb',
           'bdist_rpm',
           'bdist_wininst',
           'check',
           'upload',
           # These two are reserved for future use:
           #'bdist_sdux',
           #'bdist_pkgtool',
           # Note:
           # bdist_packager is not included because it only provides
           # an abstract base class
          ]
PKV[�=[���command/upload.pynu�[���"""
distutils.command.upload

Implements the Distutils 'upload' subcommand (upload package to a package
index).
"""

import os
import io
import platform
import hashlib
from base64 import standard_b64encode
from urllib.request import urlopen, Request, HTTPError
from urllib.parse import urlparse
from distutils.errors import DistutilsError, DistutilsOptionError
from distutils.core import PyPIRCCommand
from distutils.spawn import spawn
from distutils import log

class upload(PyPIRCCommand):

    description = "upload binary package to PyPI"

    user_options = PyPIRCCommand.user_options + [
        ('sign', 's',
         'sign files to upload using gpg'),
        ('identity=', 'i', 'GPG identity used to sign files'),
        ]

    boolean_options = PyPIRCCommand.boolean_options + ['sign']

    def initialize_options(self):
        PyPIRCCommand.initialize_options(self)
        self.username = ''
        self.password = ''
        self.show_response = 0
        self.sign = False
        self.identity = None

    def finalize_options(self):
        PyPIRCCommand.finalize_options(self)
        if self.identity and not self.sign:
            raise DistutilsOptionError(
                "Must use --sign for --identity to have meaning"
            )
        config = self._read_pypirc()
        if config != {}:
            self.username = config['username']
            self.password = config['password']
            self.repository = config['repository']
            self.realm = config['realm']

        # getting the password from the distribution
        # if previously set by the register command
        if not self.password and self.distribution.password:
            self.password = self.distribution.password

    def run(self):
        if not self.distribution.dist_files:
            msg = ("Must create and upload files in one command "
                   "(e.g. setup.py sdist upload)")
            raise DistutilsOptionError(msg)
        for command, pyversion, filename in self.distribution.dist_files:
            self.upload_file(command, pyversion, filename)

    def upload_file(self, command, pyversion, filename):
        # Makes sure the repository URL is compliant
        schema, netloc, url, params, query, fragments = \
            urlparse(self.repository)
        if params or query or fragments:
            raise AssertionError("Incompatible url %s" % self.repository)

        if schema not in ('http', 'https'):
            raise AssertionError("unsupported schema " + schema)

        # Sign if requested
        if self.sign:
            gpg_args = ["gpg", "--detach-sign", "-a", filename]
            if self.identity:
                gpg_args[2:2] = ["--local-user", self.identity]
            spawn(gpg_args,
                  dry_run=self.dry_run)

        # Fill in the data - send all the meta-data in case we need to
        # register a new release
        f = open(filename,'rb')
        try:
            content = f.read()
        finally:
            f.close()
        meta = self.distribution.metadata
        data = {
            # action
            ':action': 'file_upload',
            'protocol_version': '1',

            # identify release
            'name': meta.get_name(),
            'version': meta.get_version(),

            # file content
            'content': (os.path.basename(filename),content),
            'filetype': command,
            'pyversion': pyversion,
            'sha256_digest': hashlib.sha256(content).hexdigest(),

            # additional meta-data
            'metadata_version': '1.0',
            'summary': meta.get_description(),
            'home_page': meta.get_url(),
            'author': meta.get_contact(),
            'author_email': meta.get_contact_email(),
            'license': meta.get_licence(),
            'description': meta.get_long_description(),
            'keywords': meta.get_keywords(),
            'platform': meta.get_platforms(),
            'classifiers': meta.get_classifiers(),
            'download_url': meta.get_download_url(),
            # PEP 314
            'provides': meta.get_provides(),
            'requires': meta.get_requires(),
            'obsoletes': meta.get_obsoletes(),
            }

        try:
            digest = hashlib.md5(content).hexdigest()
        except ValueError as e:
            msg = 'calculating md5 checksum failed: %s' % e
            self.announce(msg, log.INFO)
            from _hashlib import get_fips_mode
            if not get_fips_mode():
                # this really shouldn't fail
                raise
        else:
            data['md5_digest'] = digest

        data['comment'] = ''

        if self.sign:
            with open(filename + ".asc", "rb") as f:
                data['gpg_signature'] = (os.path.basename(filename) + ".asc",
                                         f.read())

        # set up the authentication
        user_pass = (self.username + ":" + self.password).encode('ascii')
        # The exact encoding of the authentication string is debated.
        # Anyway PyPI only accepts ascii for both username or password.
        auth = "Basic " + standard_b64encode(user_pass).decode('ascii')

        # Build up the MIME payload for the POST data
        boundary = '--------------GHSKFJDLGDS7543FJKLFHRE75642756743254'
        sep_boundary = b'\r\n--' + boundary.encode('ascii')
        end_boundary = sep_boundary + b'--\r\n'
        body = io.BytesIO()
        for key, value in data.items():
            title = '\r\nContent-Disposition: form-data; name="%s"' % key
            # handle multiple entries for the same name
            if not isinstance(value, list):
                value = [value]
            for value in value:
                if type(value) is tuple:
                    title += '; filename="%s"' % value[0]
                    value = value[1]
                else:
                    value = str(value).encode('utf-8')
                body.write(sep_boundary)
                body.write(title.encode('utf-8'))
                body.write(b"\r\n\r\n")
                body.write(value)
        body.write(end_boundary)
        body = body.getvalue()

        msg = "Submitting %s to %s" % (filename, self.repository)
        self.announce(msg, log.INFO)

        # build the Request
        headers = {
            'Content-type': 'multipart/form-data; boundary=%s' % boundary,
            'Content-length': str(len(body)),
            'Authorization': auth,
        }

        request = Request(self.repository, data=body,
                          headers=headers)
        # send the data
        try:
            result = urlopen(request)
            status = result.getcode()
            reason = result.msg
        except HTTPError as e:
            status = e.code
            reason = e.msg
        except OSError as e:
            self.announce(str(e), log.ERROR)
            raise

        if status == 200:
            self.announce('Server response (%s): %s' % (status, reason),
                          log.INFO)
            if self.show_response:
                text = self._read_pypi_response(result)
                msg = '\n'.join(('-' * 75, text, '-' * 75))
                self.announce(msg, log.INFO)
        else:
            msg = 'Upload failed (%s): %s' % (status, reason)
            self.announce(msg, log.ERROR)
            raise DistutilsError(msg)
PKV[*Rj&command/install_headers.pynu�[���"""distutils.command.install_headers

Implements the Distutils 'install_headers' command, to install C/C++ header
files to the Python include directory."""

from distutils.core import Command


# XXX force is never used
class install_headers(Command):

    description = "install C/C++ header files"

    user_options = [('install-dir=', 'd',
                     "directory to install header files to"),
                    ('force', 'f',
                     "force installation (overwrite existing files)"),
                   ]

    boolean_options = ['force']

    def initialize_options(self):
        self.install_dir = None
        self.force = 0
        self.outfiles = []

    def finalize_options(self):
        self.set_undefined_options('install',
                                   ('install_headers', 'install_dir'),
                                   ('force', 'force'))


    def run(self):
        headers = self.distribution.headers
        if not headers:
            return

        self.mkpath(self.install_dir)
        for header in headers:
            (out, _) = self.copy_file(header, self.install_dir)
            self.outfiles.append(out)

    def get_inputs(self):
        return self.distribution.headers or []

    def get_outputs(self):
        return self.outfiles
PKV[r|��yycommand/command_templatenu�[���"""distutils.command.x

Implements the Distutils 'x' command.
"""

# created 2000/mm/dd, John Doe

__revision__ = "$Id$"

from distutils.core import Command


class x(Command):

    # Brief (40-50 characters) description of the command
    description = ""

    # List of option tuples: long name, short name (None if no short
    # name), and help string.
    user_options = [('', '',
                     ""),
                   ]

    def initialize_options(self):
        self. = None
        self. = None
        self. = None

    def finalize_options(self):
        if self.x is None:
            self.x = 

    def run(self):
PKV[���`�>�>command/bdist_wininst.pynu�[���"""distutils.command.bdist_wininst

Implements the Distutils 'bdist_wininst' command: create a windows installer
exe-program."""

import os
import sys
import warnings
from distutils.core import Command
from distutils.util import get_platform
from distutils.dir_util import create_tree, remove_tree
from distutils.errors import *
from distutils.sysconfig import get_python_version
from distutils import log

class bdist_wininst(Command):

    description = "create an executable installer for MS Windows"

    user_options = [('bdist-dir=', None,
                     "temporary directory for creating the distribution"),
                    ('plat-name=', 'p',
                     "platform name to embed in generated filenames "
                     "(default: %s)" % get_platform()),
                    ('keep-temp', 'k',
                     "keep the pseudo-installation tree around after " +
                     "creating the distribution archive"),
                    ('target-version=', None,
                     "require a specific python version" +
                     " on the target system"),
                    ('no-target-compile', 'c',
                     "do not compile .py to .pyc on the target system"),
                    ('no-target-optimize', 'o',
                     "do not compile .py to .pyo (optimized) "
                     "on the target system"),
                    ('dist-dir=', 'd',
                     "directory to put final built distributions in"),
                    ('bitmap=', 'b',
                     "bitmap to use for the installer instead of python-powered logo"),
                    ('title=', 't',
                     "title to display on the installer background instead of default"),
                    ('skip-build', None,
                     "skip rebuilding everything (for testing/debugging)"),
                    ('install-script=', None,
                     "basename of installation script to be run after "
                     "installation or before deinstallation"),
                    ('pre-install-script=', None,
                     "Fully qualified filename of a script to be run before "
                     "any files are installed.  This script need not be in the "
                     "distribution"),
                    ('user-access-control=', None,
                     "specify Vista's UAC handling - 'none'/default=no "
                     "handling, 'auto'=use UAC if target Python installed for "
                     "all users, 'force'=always use UAC"),
                   ]

    boolean_options = ['keep-temp', 'no-target-compile', 'no-target-optimize',
                       'skip-build']

    # bpo-10945: bdist_wininst requires mbcs encoding only available on Windows
    _unsupported = (sys.platform != "win32")

    def __init__(self, *args, **kw):
        super().__init__(*args, **kw)
        warnings.warn("bdist_wininst command is deprecated since Python 3.8, "
                      "use bdist_wheel (wheel packages) instead",
                      DeprecationWarning, 2)

    def initialize_options(self):
        self.bdist_dir = None
        self.plat_name = None
        self.keep_temp = 0
        self.no_target_compile = 0
        self.no_target_optimize = 0
        self.target_version = None
        self.dist_dir = None
        self.bitmap = None
        self.title = None
        self.skip_build = None
        self.install_script = None
        self.pre_install_script = None
        self.user_access_control = None


    def finalize_options(self):
        self.set_undefined_options('bdist', ('skip_build', 'skip_build'))

        if self.bdist_dir is None:
            if self.skip_build and self.plat_name:
                # If build is skipped and plat_name is overridden, bdist will
                # not see the correct 'plat_name' - so set that up manually.
                bdist = self.distribution.get_command_obj('bdist')
                bdist.plat_name = self.plat_name
                # next the command will be initialized using that name
            bdist_base = self.get_finalized_command('bdist').bdist_base
            self.bdist_dir = os.path.join(bdist_base, 'wininst')

        if not self.target_version:
            self.target_version = ""

        if not self.skip_build and self.distribution.has_ext_modules():
            short_version = get_python_version()
            if self.target_version and self.target_version != short_version:
                raise DistutilsOptionError(
                      "target version can only be %s, or the '--skip-build'" \
                      " option must be specified" % (short_version,))
            self.target_version = short_version

        self.set_undefined_options('bdist',
                                   ('dist_dir', 'dist_dir'),
                                   ('plat_name', 'plat_name'),
                                  )

        if self.install_script:
            for script in self.distribution.scripts:
                if self.install_script == os.path.basename(script):
                    break
            else:
                raise DistutilsOptionError(
                      "install_script '%s' not found in scripts"
                      % self.install_script)

    def run(self):
        if (sys.platform != "win32" and
            (self.distribution.has_ext_modules() or
             self.distribution.has_c_libraries())):
            raise DistutilsPlatformError \
                  ("distribution contains extensions and/or C libraries; "
                   "must be compiled on a Windows 32 platform")

        if not self.skip_build:
            self.run_command('build')

        install = self.reinitialize_command('install', reinit_subcommands=1)
        install.root = self.bdist_dir
        install.skip_build = self.skip_build
        install.warn_dir = 0
        install.plat_name = self.plat_name

        install_lib = self.reinitialize_command('install_lib')
        # we do not want to include pyc or pyo files
        install_lib.compile = 0
        install_lib.optimize = 0

        if self.distribution.has_ext_modules():
            # If we are building an installer for a Python version other
            # than the one we are currently running, then we need to ensure
            # our build_lib reflects the other Python version rather than ours.
            # Note that for target_version!=sys.version, we must have skipped the
            # build step, so there is no issue with enforcing the build of this
            # version.
            target_version = self.target_version
            if not target_version:
                assert self.skip_build, "Should have already checked this"
                target_version = '%d.%d' % sys.version_info[:2]
            plat_specifier = ".%s-%s" % (self.plat_name, target_version)
            build = self.get_finalized_command('build')
            build.build_lib = os.path.join(build.build_base,
                                           'lib' + plat_specifier)

        # Use a custom scheme for the zip-file, because we have to decide
        # at installation time which scheme to use.
        for key in ('purelib', 'platlib', 'headers', 'scripts', 'data'):
            value = key.upper()
            if key == 'headers':
                value = value + '/Include/$dist_name'
            setattr(install,
                    'install_' + key,
                    value)

        log.info("installing to %s", self.bdist_dir)
        install.ensure_finalized()

        # avoid warning of 'install_lib' about installing
        # into a directory not in sys.path
        sys.path.insert(0, os.path.join(self.bdist_dir, 'PURELIB'))

        install.run()

        del sys.path[0]

        # And make an archive relative to the root of the
        # pseudo-installation tree.
        from tempfile import mktemp
        archive_basename = mktemp()
        fullname = self.distribution.get_fullname()
        arcname = self.make_archive(archive_basename, "zip",
                                    root_dir=self.bdist_dir)
        # create an exe containing the zip-file
        self.create_exe(arcname, fullname, self.bitmap)
        if self.distribution.has_ext_modules():
            pyversion = get_python_version()
        else:
            pyversion = 'any'
        self.distribution.dist_files.append(('bdist_wininst', pyversion,
                                             self.get_installer_filename(fullname)))
        # remove the zip-file again
        log.debug("removing temporary file '%s'", arcname)
        os.remove(arcname)

        if not self.keep_temp:
            remove_tree(self.bdist_dir, dry_run=self.dry_run)

    def get_inidata(self):
        # Return data describing the installation.
        lines = []
        metadata = self.distribution.metadata

        # Write the [metadata] section.
        lines.append("[metadata]")

        # 'info' will be displayed in the installer's dialog box,
        # describing the items to be installed.
        info = (metadata.long_description or '') + '\n'

        # Escape newline characters
        def escape(s):
            return s.replace("\n", "\\n")

        for name in ["author", "author_email", "description", "maintainer",
                     "maintainer_email", "name", "url", "version"]:
            data = getattr(metadata, name, "")
            if data:
                info = info + ("\n    %s: %s" % \
                               (name.capitalize(), escape(data)))
                lines.append("%s=%s" % (name, escape(data)))

        # The [setup] section contains entries controlling
        # the installer runtime.
        lines.append("\n[Setup]")
        if self.install_script:
            lines.append("install_script=%s" % self.install_script)
        lines.append("info=%s" % escape(info))
        lines.append("target_compile=%d" % (not self.no_target_compile))
        lines.append("target_optimize=%d" % (not self.no_target_optimize))
        if self.target_version:
            lines.append("target_version=%s" % self.target_version)
        if self.user_access_control:
            lines.append("user_access_control=%s" % self.user_access_control)

        title = self.title or self.distribution.get_fullname()
        lines.append("title=%s" % escape(title))
        import time
        import distutils
        build_info = "Built %s with distutils-%s" % \
                     (time.ctime(time.time()), distutils.__version__)
        lines.append("build_info=%s" % build_info)
        return "\n".join(lines)

    def create_exe(self, arcname, fullname, bitmap=None):
        import struct

        self.mkpath(self.dist_dir)

        cfgdata = self.get_inidata()

        installer_name = self.get_installer_filename(fullname)
        self.announce("creating %s" % installer_name)

        if bitmap:
            with open(bitmap, "rb") as f:
                bitmapdata = f.read()
            bitmaplen = len(bitmapdata)
        else:
            bitmaplen = 0

        with open(installer_name, "wb") as file:
            file.write(self.get_exe_bytes())
            if bitmap:
                file.write(bitmapdata)

            # Convert cfgdata from unicode to ascii, mbcs encoded
            if isinstance(cfgdata, str):
                cfgdata = cfgdata.encode("mbcs")

            # Append the pre-install script
            cfgdata = cfgdata + b"\0"
            if self.pre_install_script:
                # We need to normalize newlines, so we open in text mode and
                # convert back to bytes. "latin-1" simply avoids any possible
                # failures.
                with open(self.pre_install_script, "r",
                          encoding="latin-1") as script:
                    script_data = script.read().encode("latin-1")
                cfgdata = cfgdata + script_data + b"\n\0"
            else:
                # empty pre-install script
                cfgdata = cfgdata + b"\0"
            file.write(cfgdata)

            # The 'magic number' 0x1234567B is used to make sure that the
            # binary layout of 'cfgdata' is what the wininst.exe binary
            # expects.  If the layout changes, increment that number, make
            # the corresponding changes to the wininst.exe sources, and
            # recompile them.
            header = struct.pack("<iii",
                                0x1234567B,       # tag
                                len(cfgdata),     # length
                                bitmaplen,        # number of bytes in bitmap
                                )
            file.write(header)
            with open(arcname, "rb") as f:
                file.write(f.read())

    def get_installer_filename(self, fullname):
        # Factored out to allow overriding in subclasses
        if self.target_version:
            # if we create an installer for a specific python version,
            # it's better to include this in the name
            installer_name = os.path.join(self.dist_dir,
                                          "%s.%s-py%s.exe" %
                                           (fullname, self.plat_name, self.target_version))
        else:
            installer_name = os.path.join(self.dist_dir,
                                          "%s.%s.exe" % (fullname, self.plat_name))
        return installer_name

    def get_exe_bytes(self):
        # If a target-version other than the current version has been
        # specified, then using the MSVC version from *this* build is no good.
        # Without actually finding and executing the target version and parsing
        # its sys.version, we just hard-code our knowledge of old versions.
        # NOTE: Possible alternative is to allow "--target-version" to
        # specify a Python executable rather than a simple version string.
        # We can then execute this program to obtain any info we need, such
        # as the real sys.version string for the build.
        cur_version = get_python_version()

        # If the target version is *later* than us, then we assume they
        # use what we use
        # string compares seem wrong, but are what sysconfig.py itself uses
        if self.target_version and self.target_version < cur_version:
            if self.target_version < "2.4":
                bv = '6.0'
            elif self.target_version == "2.4":
                bv = '7.1'
            elif self.target_version == "2.5":
                bv = '8.0'
            elif self.target_version <= "3.2":
                bv = '9.0'
            elif self.target_version <= "3.4":
                bv = '10.0'
            else:
                bv = '14.0'
        else:
            # for current version - use authoritative check.
            try:
                from msvcrt import CRT_ASSEMBLY_VERSION
            except ImportError:
                # cross-building, so assume the latest version
                bv = '14.0'
            else:
                # as far as we know, CRT is binary compatible based on
                # the first field, so assume 'x.0' until proven otherwise
                major = CRT_ASSEMBLY_VERSION.partition('.')[0]
                bv = major + '.0'


        # wininst-x.y.exe is in the same directory as this file
        directory = os.path.dirname(__file__)
        # we must use a wininst-x.y.exe built with the same C compiler
        # used for python.  XXX What about mingw, borland, and so on?

        # if plat_name starts with "win" but is not "win32"
        # we want to strip "win" and leave the rest (e.g. -amd64)
        # for all other cases, we don't want any suffix
        if self.plat_name != 'win32' and self.plat_name[:3] == 'win':
            sfix = self.plat_name[3:]
        else:
            sfix = ''

        filename = os.path.join(directory, "wininst-%s%s.exe" % (bv, sfix))
        f = open(filename, "rb")
        try:
            return f.read()
        finally:
            f.close()
PKV[�w11command/bdist_dumb.pynu�[���"""distutils.command.bdist_dumb

Implements the Distutils 'bdist_dumb' command (create a "dumb" built
distribution -- i.e., just an archive to be unpacked under $prefix or
$exec_prefix)."""

import os
from distutils.core import Command
from distutils.util import get_platform
from distutils.dir_util import remove_tree, ensure_relative
from distutils.errors import *
from distutils.sysconfig import get_python_version
from distutils import log

class bdist_dumb(Command):

    description = "create a \"dumb\" built distribution"

    user_options = [('bdist-dir=', 'd',
                     "temporary directory for creating the distribution"),
                    ('plat-name=', 'p',
                     "platform name to embed in generated filenames "
                     "(default: %s)" % get_platform()),
                    ('format=', 'f',
                     "archive format to create (tar, gztar, bztar, xztar, "
                     "ztar, zip)"),
                    ('keep-temp', 'k',
                     "keep the pseudo-installation tree around after " +
                     "creating the distribution archive"),
                    ('dist-dir=', 'd',
                     "directory to put final built distributions in"),
                    ('skip-build', None,
                     "skip rebuilding everything (for testing/debugging)"),
                    ('relative', None,
                     "build the archive using relative paths "
                     "(default: false)"),
                    ('owner=', 'u',
                     "Owner name used when creating a tar file"
                     " [default: current user]"),
                    ('group=', 'g',
                     "Group name used when creating a tar file"
                     " [default: current group]"),
                   ]

    boolean_options = ['keep-temp', 'skip-build', 'relative']

    default_format = { 'posix': 'gztar',
                       'nt': 'zip' }

    def initialize_options(self):
        self.bdist_dir = None
        self.plat_name = None
        self.format = None
        self.keep_temp = 0
        self.dist_dir = None
        self.skip_build = None
        self.relative = 0
        self.owner = None
        self.group = None

    def finalize_options(self):
        if self.bdist_dir is None:
            bdist_base = self.get_finalized_command('bdist').bdist_base
            self.bdist_dir = os.path.join(bdist_base, 'dumb')

        if self.format is None:
            try:
                self.format = self.default_format[os.name]
            except KeyError:
                raise DistutilsPlatformError(
                       "don't know how to create dumb built distributions "
                       "on platform %s" % os.name)

        self.set_undefined_options('bdist',
                                   ('dist_dir', 'dist_dir'),
                                   ('plat_name', 'plat_name'),
                                   ('skip_build', 'skip_build'))

    def run(self):
        if not self.skip_build:
            self.run_command('build')

        install = self.reinitialize_command('install', reinit_subcommands=1)
        install.root = self.bdist_dir
        install.skip_build = self.skip_build
        install.warn_dir = 0

        log.info("installing to %s", self.bdist_dir)
        self.run_command('install')

        # And make an archive relative to the root of the
        # pseudo-installation tree.
        archive_basename = "%s.%s" % (self.distribution.get_fullname(),
                                      self.plat_name)

        pseudoinstall_root = os.path.join(self.dist_dir, archive_basename)
        if not self.relative:
            archive_root = self.bdist_dir
        else:
            if (self.distribution.has_ext_modules() and
                (install.install_base != install.install_platbase)):
                raise DistutilsPlatformError(
                       "can't make a dumb built distribution where "
                       "base and platbase are different (%s, %s)"
                       % (repr(install.install_base),
                          repr(install.install_platbase)))
            else:
                archive_root = os.path.join(self.bdist_dir,
                                   ensure_relative(install.install_base))

        # Make the archive
        filename = self.make_archive(pseudoinstall_root,
                                     self.format, root_dir=archive_root,
                                     owner=self.owner, group=self.group)
        if self.distribution.has_ext_modules():
            pyversion = get_python_version()
        else:
            pyversion = 'any'
        self.distribution.dist_files.append(('bdist_dumb', pyversion,
                                             filename))

        if not self.keep_temp:
            remove_tree(self.bdist_dir, dry_run=self.dry_run)
PKV[;�R���command/check.pynu�[���"""distutils.command.check

Implements the Distutils 'check' command.
"""
from distutils.core import Command
from distutils.errors import DistutilsSetupError

try:
    # docutils is installed
    from docutils.utils import Reporter
    from docutils.parsers.rst import Parser
    from docutils import frontend
    from docutils import nodes
    from io import StringIO

    class SilentReporter(Reporter):

        def __init__(self, source, report_level, halt_level, stream=None,
                     debug=0, encoding='ascii', error_handler='replace'):
            self.messages = []
            Reporter.__init__(self, source, report_level, halt_level, stream,
                              debug, encoding, error_handler)

        def system_message(self, level, message, *children, **kwargs):
            self.messages.append((level, message, children, kwargs))
            return nodes.system_message(message, level=level,
                                        type=self.levels[level],
                                        *children, **kwargs)

    HAS_DOCUTILS = True
except Exception:
    # Catch all exceptions because exceptions besides ImportError probably
    # indicate that docutils is not ported to Py3k.
    HAS_DOCUTILS = False

class check(Command):
    """This command checks the meta-data of the package.
    """
    description = ("perform some checks on the package")
    user_options = [('metadata', 'm', 'Verify meta-data'),
                    ('restructuredtext', 'r',
                     ('Checks if long string meta-data syntax '
                      'are reStructuredText-compliant')),
                    ('strict', 's',
                     'Will exit with an error if a check fails')]

    boolean_options = ['metadata', 'restructuredtext', 'strict']

    def initialize_options(self):
        """Sets default values for options."""
        self.restructuredtext = 0
        self.metadata = 1
        self.strict = 0
        self._warnings = 0

    def finalize_options(self):
        pass

    def warn(self, msg):
        """Counts the number of warnings that occurs."""
        self._warnings += 1
        return Command.warn(self, msg)

    def run(self):
        """Runs the command."""
        # perform the various tests
        if self.metadata:
            self.check_metadata()
        if self.restructuredtext:
            if HAS_DOCUTILS:
                self.check_restructuredtext()
            elif self.strict:
                raise DistutilsSetupError('The docutils package is needed.')

        # let's raise an error in strict mode, if we have at least
        # one warning
        if self.strict and self._warnings > 0:
            raise DistutilsSetupError('Please correct your package.')

    def check_metadata(self):
        """Ensures that all required elements of meta-data are supplied.

        name, version, URL, (author and author_email) or
        (maintainer and maintainer_email)).

        Warns if any are missing.
        """
        metadata = self.distribution.metadata

        missing = []
        for attr in ('name', 'version', 'url'):
            if not (hasattr(metadata, attr) and getattr(metadata, attr)):
                missing.append(attr)

        if missing:
            self.warn("missing required meta-data: %s"  % ', '.join(missing))
        if metadata.author:
            if not metadata.author_email:
                self.warn("missing meta-data: if 'author' supplied, " +
                          "'author_email' must be supplied too")
        elif metadata.maintainer:
            if not metadata.maintainer_email:
                self.warn("missing meta-data: if 'maintainer' supplied, " +
                          "'maintainer_email' must be supplied too")
        else:
            self.warn("missing meta-data: either (author and author_email) " +
                      "or (maintainer and maintainer_email) " +
                      "must be supplied")

    def check_restructuredtext(self):
        """Checks if the long string fields are reST-compliant."""
        data = self.distribution.get_long_description()
        for warning in self._check_rst_data(data):
            line = warning[-1].get('line')
            if line is None:
                warning = warning[1]
            else:
                warning = '%s (line %s)' % (warning[1], line)
            self.warn(warning)

    def _check_rst_data(self, data):
        """Returns warnings when the provided data doesn't compile."""
        # the include and csv_table directives need this to be a path
        source_path = self.distribution.script_name or 'setup.py'
        parser = Parser()
        settings = frontend.OptionParser(components=(Parser,)).get_default_values()
        settings.tab_width = 4
        settings.pep_references = None
        settings.rfc_references = None
        reporter = SilentReporter(source_path,
                          settings.report_level,
                          settings.halt_level,
                          stream=settings.warning_stream,
                          debug=settings.debug,
                          encoding=settings.error_encoding,
                          error_handler=settings.error_encoding_error_handler)

        document = nodes.document(settings, reporter, source=source_path)
        document.note_source(source_path, -1)
        try:
            parser.parse(data, document)
        except AttributeError as e:
            reporter.messages.append(
                (-1, 'Could not finish the parsing: %s.' % e, '', {}))

        return reporter.messages
PKV[c+�9090
version.pynu�[���#
# distutils/version.py
#
# Implements multiple version numbering conventions for the
# Python Module Distribution Utilities.
#
# $Id$
#

"""Provides classes to represent module version numbers (one class for
each style of version numbering).  There are currently two such classes
implemented: StrictVersion and LooseVersion.

Every version number class implements the following interface:
  * the 'parse' method takes a string and parses it to some internal
    representation; if the string is an invalid version number,
    'parse' raises a ValueError exception
  * the class constructor takes an optional string argument which,
    if supplied, is passed to 'parse'
  * __str__ reconstructs the string that was passed to 'parse' (or
    an equivalent string -- ie. one that will generate an equivalent
    version number instance)
  * __repr__ generates Python code to recreate the version number instance
  * _cmp compares the current instance with either another instance
    of the same class or a string (which will be parsed to an instance
    of the same class, thus must follow the same rules)
"""

import re

class Version:
    """Abstract base class for version numbering classes.  Just provides
    constructor (__init__) and reproducer (__repr__), because those
    seem to be the same for all version numbering classes; and route
    rich comparisons to _cmp.
    """

    def __init__ (self, vstring=None):
        if vstring:
            self.parse(vstring)

    def __repr__ (self):
        return "%s ('%s')" % (self.__class__.__name__, str(self))

    def __eq__(self, other):
        c = self._cmp(other)
        if c is NotImplemented:
            return c
        return c == 0

    def __lt__(self, other):
        c = self._cmp(other)
        if c is NotImplemented:
            return c
        return c < 0

    def __le__(self, other):
        c = self._cmp(other)
        if c is NotImplemented:
            return c
        return c <= 0

    def __gt__(self, other):
        c = self._cmp(other)
        if c is NotImplemented:
            return c
        return c > 0

    def __ge__(self, other):
        c = self._cmp(other)
        if c is NotImplemented:
            return c
        return c >= 0


# Interface for version-number classes -- must be implemented
# by the following classes (the concrete ones -- Version should
# be treated as an abstract class).
#    __init__ (string) - create and take same action as 'parse'
#                        (string parameter is optional)
#    parse (string)    - convert a string representation to whatever
#                        internal representation is appropriate for
#                        this style of version numbering
#    __str__ (self)    - convert back to a string; should be very similar
#                        (if not identical to) the string supplied to parse
#    __repr__ (self)   - generate Python code to recreate
#                        the instance
#    _cmp (self, other) - compare two version numbers ('other' may
#                        be an unparsed version string, or another
#                        instance of your version class)


class StrictVersion (Version):

    """Version numbering for anal retentives and software idealists.
    Implements the standard interface for version number classes as
    described above.  A version number consists of two or three
    dot-separated numeric components, with an optional "pre-release" tag
    on the end.  The pre-release tag consists of the letter 'a' or 'b'
    followed by a number.  If the numeric components of two version
    numbers are equal, then one with a pre-release tag will always
    be deemed earlier (lesser) than one without.

    The following are valid version numbers (shown in the order that
    would be obtained by sorting according to the supplied cmp function):

        0.4       0.4.0  (these two are equivalent)
        0.4.1
        0.5a1
        0.5b3
        0.5
        0.9.6
        1.0
        1.0.4a3
        1.0.4b1
        1.0.4

    The following are examples of invalid version numbers:

        1
        2.7.2.2
        1.3.a4
        1.3pl1
        1.3c4

    The rationale for this version numbering system will be explained
    in the distutils documentation.
    """

    version_re = re.compile(r'^(\d+) \. (\d+) (\. (\d+))? ([ab](\d+))?$',
                            re.VERBOSE | re.ASCII)


    def parse (self, vstring):
        match = self.version_re.match(vstring)
        if not match:
            raise ValueError("invalid version number '%s'" % vstring)

        (major, minor, patch, prerelease, prerelease_num) = \
            match.group(1, 2, 4, 5, 6)

        if patch:
            self.version = tuple(map(int, [major, minor, patch]))
        else:
            self.version = tuple(map(int, [major, minor])) + (0,)

        if prerelease:
            self.prerelease = (prerelease[0], int(prerelease_num))
        else:
            self.prerelease = None


    def __str__ (self):

        if self.version[2] == 0:
            vstring = '.'.join(map(str, self.version[0:2]))
        else:
            vstring = '.'.join(map(str, self.version))

        if self.prerelease:
            vstring = vstring + self.prerelease[0] + str(self.prerelease[1])

        return vstring


    def _cmp (self, other):
        if isinstance(other, str):
            other = StrictVersion(other)

        if self.version != other.version:
            # numeric versions don't match
            # prerelease stuff doesn't matter
            if self.version < other.version:
                return -1
            else:
                return 1

        # have to compare prerelease
        # case 1: neither has prerelease; they're equal
        # case 2: self has prerelease, other doesn't; other is greater
        # case 3: self doesn't have prerelease, other does: self is greater
        # case 4: both have prerelease: must compare them!

        if (not self.prerelease and not other.prerelease):
            return 0
        elif (self.prerelease and not other.prerelease):
            return -1
        elif (not self.prerelease and other.prerelease):
            return 1
        elif (self.prerelease and other.prerelease):
            if self.prerelease == other.prerelease:
                return 0
            elif self.prerelease < other.prerelease:
                return -1
            else:
                return 1
        else:
            assert False, "never get here"

# end class StrictVersion


# The rules according to Greg Stein:
# 1) a version number has 1 or more numbers separated by a period or by
#    sequences of letters. If only periods, then these are compared
#    left-to-right to determine an ordering.
# 2) sequences of letters are part of the tuple for comparison and are
#    compared lexicographically
# 3) recognize the numeric components may have leading zeroes
#
# The LooseVersion class below implements these rules: a version number
# string is split up into a tuple of integer and string components, and
# comparison is a simple tuple comparison.  This means that version
# numbers behave in a predictable and obvious way, but a way that might
# not necessarily be how people *want* version numbers to behave.  There
# wouldn't be a problem if people could stick to purely numeric version
# numbers: just split on period and compare the numbers as tuples.
# However, people insist on putting letters into their version numbers;
# the most common purpose seems to be:
#   - indicating a "pre-release" version
#     ('alpha', 'beta', 'a', 'b', 'pre', 'p')
#   - indicating a post-release patch ('p', 'pl', 'patch')
# but of course this can't cover all version number schemes, and there's
# no way to know what a programmer means without asking him.
#
# The problem is what to do with letters (and other non-numeric
# characters) in a version number.  The current implementation does the
# obvious and predictable thing: keep them as strings and compare
# lexically within a tuple comparison.  This has the desired effect if
# an appended letter sequence implies something "post-release":
# eg. "0.99" < "0.99pl14" < "1.0", and "5.001" < "5.001m" < "5.002".
#
# However, if letters in a version number imply a pre-release version,
# the "obvious" thing isn't correct.  Eg. you would expect that
# "1.5.1" < "1.5.2a2" < "1.5.2", but under the tuple/lexical comparison
# implemented here, this just isn't so.
#
# Two possible solutions come to mind.  The first is to tie the
# comparison algorithm to a particular set of semantic rules, as has
# been done in the StrictVersion class above.  This works great as long
# as everyone can go along with bondage and discipline.  Hopefully a
# (large) subset of Python module programmers will agree that the
# particular flavour of bondage and discipline provided by StrictVersion
# provides enough benefit to be worth using, and will submit their
# version numbering scheme to its domination.  The free-thinking
# anarchists in the lot will never give in, though, and something needs
# to be done to accommodate them.
#
# Perhaps a "moderately strict" version class could be implemented that
# lets almost anything slide (syntactically), and makes some heuristic
# assumptions about non-digits in version number strings.  This could
# sink into special-case-hell, though; if I was as talented and
# idiosyncratic as Larry Wall, I'd go ahead and implement a class that
# somehow knows that "1.2.1" < "1.2.2a2" < "1.2.2" < "1.2.2pl3", and is
# just as happy dealing with things like "2g6" and "1.13++".  I don't
# think I'm smart enough to do it right though.
#
# In any case, I've coded the test suite for this module (see
# ../test/test_version.py) specifically to fail on things like comparing
# "1.2a2" and "1.2".  That's not because the *code* is doing anything
# wrong, it's because the simple, obvious design doesn't match my
# complicated, hairy expectations for real-world version numbers.  It
# would be a snap to fix the test suite to say, "Yep, LooseVersion does
# the Right Thing" (ie. the code matches the conception).  But I'd rather
# have a conception that matches common notions about version numbers.

class LooseVersion (Version):

    """Version numbering for anarchists and software realists.
    Implements the standard interface for version number classes as
    described above.  A version number consists of a series of numbers,
    separated by either periods or strings of letters.  When comparing
    version numbers, the numeric components will be compared
    numerically, and the alphabetic components lexically.  The following
    are all valid version numbers, in no particular order:

        1.5.1
        1.5.2b2
        161
        3.10a
        8.02
        3.4j
        1996.07.12
        3.2.pl0
        3.1.1.6
        2g6
        11g
        0.960923
        2.2beta29
        1.13++
        5.5.kw
        2.0b1pl0

    In fact, there is no such thing as an invalid version number under
    this scheme; the rules for comparison are simple and predictable,
    but may not always give the results you want (for some definition
    of "want").
    """

    component_re = re.compile(r'(\d+ | [a-z]+ | \.)', re.VERBOSE)

    def __init__ (self, vstring=None):
        if vstring:
            self.parse(vstring)


    def parse (self, vstring):
        # I've given up on thinking I can reconstruct the version string
        # from the parsed tuple -- so I just store the string here for
        # use by __str__
        self.vstring = vstring
        components = [x for x in self.component_re.split(vstring)
                              if x and x != '.']
        for i, obj in enumerate(components):
            try:
                components[i] = int(obj)
            except ValueError:
                pass

        self.version = components


    def __str__ (self):
        return self.vstring


    def __repr__ (self):
        return "LooseVersion ('%s')" % str(self)


    def _cmp (self, other):
        if isinstance(other, str):
            other = LooseVersion(other)

        if self.version == other.version:
            return 0
        if self.version < other.version:
            return -1
        if self.version > other.version:
            return 1


# end class LooseVersion
PKV[[�����__init__.pynu�[���"""distutils

The main package for the Python Module Distribution Utilities.  Normally
used from a setup script as

   from distutils.core import setup

   setup (...)
"""

import sys

__version__ = sys.version[:sys.version.index(' ')]
PKV[IS^�"�"core.pynu�[���"""distutils.core

The only module that needs to be imported to use the Distutils; provides
the 'setup' function (which is to be called from the setup script).  Also
indirectly provides the Distribution and Command classes, although they are
really defined in distutils.dist and distutils.cmd.
"""

import os
import sys

from distutils.debug import DEBUG
from distutils.errors import *

# Mainly import these so setup scripts can "from distutils.core import" them.
from distutils.dist import Distribution
from distutils.cmd import Command
from distutils.config import PyPIRCCommand
from distutils.extension import Extension

# This is a barebones help message generated displayed when the user
# runs the setup script with no arguments at all.  More useful help
# is generated with various --help options: global help, list commands,
# and per-command help.
USAGE = """\
usage: %(script)s [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]
   or: %(script)s --help [cmd1 cmd2 ...]
   or: %(script)s --help-commands
   or: %(script)s cmd --help
"""

def gen_usage (script_name):
    script = os.path.basename(script_name)
    return USAGE % vars()


# Some mild magic to control the behaviour of 'setup()' from 'run_setup()'.
_setup_stop_after = None
_setup_distribution = None

# Legal keyword arguments for the setup() function
setup_keywords = ('distclass', 'script_name', 'script_args', 'options',
                  'name', 'version', 'author', 'author_email',
                  'maintainer', 'maintainer_email', 'url', 'license',
                  'description', 'long_description', 'keywords',
                  'platforms', 'classifiers', 'download_url',
                  'requires', 'provides', 'obsoletes',
                  )

# Legal keyword arguments for the Extension constructor
extension_keywords = ('name', 'sources', 'include_dirs',
                      'define_macros', 'undef_macros',
                      'library_dirs', 'libraries', 'runtime_library_dirs',
                      'extra_objects', 'extra_compile_args', 'extra_link_args',
                      'swig_opts', 'export_symbols', 'depends', 'language')

def setup (**attrs):
    """The gateway to the Distutils: do everything your setup script needs
    to do, in a highly flexible and user-driven way.  Briefly: create a
    Distribution instance; find and parse config files; parse the command
    line; run each Distutils command found there, customized by the options
    supplied to 'setup()' (as keyword arguments), in config files, and on
    the command line.

    The Distribution instance might be an instance of a class supplied via
    the 'distclass' keyword argument to 'setup'; if no such class is
    supplied, then the Distribution class (in dist.py) is instantiated.
    All other arguments to 'setup' (except for 'cmdclass') are used to set
    attributes of the Distribution instance.

    The 'cmdclass' argument, if supplied, is a dictionary mapping command
    names to command classes.  Each command encountered on the command line
    will be turned into a command class, which is in turn instantiated; any
    class found in 'cmdclass' is used in place of the default, which is
    (for command 'foo_bar') class 'foo_bar' in module
    'distutils.command.foo_bar'.  The command class must provide a
    'user_options' attribute which is a list of option specifiers for
    'distutils.fancy_getopt'.  Any command-line options between the current
    and the next command are used to set attributes of the current command
    object.

    When the entire command-line has been successfully parsed, calls the
    'run()' method on each command object in turn.  This method will be
    driven entirely by the Distribution object (which each command object
    has a reference to, thanks to its constructor), and the
    command-specific options that became attributes of each command
    object.
    """

    global _setup_stop_after, _setup_distribution

    # Determine the distribution class -- either caller-supplied or
    # our Distribution (see below).
    klass = attrs.get('distclass')
    if klass:
        del attrs['distclass']
    else:
        klass = Distribution

    if 'script_name' not in attrs:
        attrs['script_name'] = os.path.basename(sys.argv[0])
    if 'script_args'  not in attrs:
        attrs['script_args'] = sys.argv[1:]

    # Create the Distribution instance, using the remaining arguments
    # (ie. everything except distclass) to initialize it
    try:
        _setup_distribution = dist = klass(attrs)
    except DistutilsSetupError as msg:
        if 'name' not in attrs:
            raise SystemExit("error in setup command: %s" % msg)
        else:
            raise SystemExit("error in %s setup command: %s" % \
                  (attrs['name'], msg))

    if _setup_stop_after == "init":
        return dist

    # Find and parse the config file(s): they will override options from
    # the setup script, but be overridden by the command line.
    dist.parse_config_files()

    if DEBUG:
        print("options (after parsing config files):")
        dist.dump_option_dicts()

    if _setup_stop_after == "config":
        return dist

    # Parse the command line and override config files; any
    # command-line errors are the end user's fault, so turn them into
    # SystemExit to suppress tracebacks.
    try:
        ok = dist.parse_command_line()
    except DistutilsArgError as msg:
        raise SystemExit(gen_usage(dist.script_name) + "\nerror: %s" % msg)

    if DEBUG:
        print("options (after parsing command line):")
        dist.dump_option_dicts()

    if _setup_stop_after == "commandline":
        return dist

    # And finally, run all the commands found on the command line.
    if ok:
        try:
            dist.run_commands()
        except KeyboardInterrupt:
            raise SystemExit("interrupted")
        except OSError as exc:
            if DEBUG:
                sys.stderr.write("error: %s\n" % (exc,))
                raise
            else:
                raise SystemExit("error: %s" % (exc,))

        except (DistutilsError,
                CCompilerError) as msg:
            if DEBUG:
                raise
            else:
                raise SystemExit("error: " + str(msg))

    return dist

# setup ()


def run_setup (script_name, script_args=None, stop_after="run"):
    """Run a setup script in a somewhat controlled environment, and
    return the Distribution instance that drives things.  This is useful
    if you need to find out the distribution meta-data (passed as
    keyword args from 'script' to 'setup()', or the contents of the
    config files or command-line.

    'script_name' is a file that will be read and run with 'exec()';
    'sys.argv[0]' will be replaced with 'script' for the duration of the
    call.  'script_args' is a list of strings; if supplied,
    'sys.argv[1:]' will be replaced by 'script_args' for the duration of
    the call.

    'stop_after' tells 'setup()' when to stop processing; possible
    values:
      init
        stop after the Distribution instance has been created and
        populated with the keyword arguments to 'setup()'
      config
        stop after config files have been parsed (and their data
        stored in the Distribution instance)
      commandline
        stop after the command-line ('sys.argv[1:]' or 'script_args')
        have been parsed (and the data stored in the Distribution)
      run [default]
        stop after all commands have been run (the same as if 'setup()'
        had been called in the usual way

    Returns the Distribution instance, which provides all information
    used to drive the Distutils.
    """
    if stop_after not in ('init', 'config', 'commandline', 'run'):
        raise ValueError("invalid value for 'stop_after': %r" % (stop_after,))

    global _setup_stop_after, _setup_distribution
    _setup_stop_after = stop_after

    save_argv = sys.argv.copy()
    g = {'__file__': script_name}
    try:
        try:
            sys.argv[0] = script_name
            if script_args is not None:
                sys.argv[1:] = script_args
            with open(script_name, 'rb') as f:
                exec(f.read(), g)
        finally:
            sys.argv = save_argv
            _setup_stop_after = None
    except SystemExit:
        # Hmm, should we do something if exiting with a non-zero code
        # (ie. error)?
        pass

    if _setup_distribution is None:
        raise RuntimeError(("'distutils.core.setup()' was never called -- "
               "perhaps '%s' is not a Distutils setup script?") % \
              script_name)

    # I wonder if the setup script's namespace -- g and l -- would be of
    # any interest to callers?
    #print "_setup_distribution:", _setup_distribution
    return _setup_distribution

# run_setup ()
PKV[Uy����READMEnu�[���This directory contains the Distutils package.

There's a full documentation available at:

    http://docs.python.org/distutils/

The Distutils-SIG web page is also a good starting point:

    http://www.python.org/sigs/distutils-sig/

$Id$
PKV[��B�\\msvccompiler.pynu�[���"""distutils.msvccompiler

Contains MSVCCompiler, an implementation of the abstract CCompiler class
for the Microsoft Visual Studio.
"""

# Written by Perry Stoll
# hacked by Robin Becker and Thomas Heller to do a better job of
#   finding DevStudio (through the registry)

import sys, os
from distutils.errors import \
     DistutilsExecError, DistutilsPlatformError, \
     CompileError, LibError, LinkError
from distutils.ccompiler import \
     CCompiler, gen_preprocess_options, gen_lib_options
from distutils import log

_can_read_reg = False
try:
    import winreg

    _can_read_reg = True
    hkey_mod = winreg

    RegOpenKeyEx = winreg.OpenKeyEx
    RegEnumKey = winreg.EnumKey
    RegEnumValue = winreg.EnumValue
    RegError = winreg.error

except ImportError:
    try:
        import win32api
        import win32con
        _can_read_reg = True
        hkey_mod = win32con

        RegOpenKeyEx = win32api.RegOpenKeyEx
        RegEnumKey = win32api.RegEnumKey
        RegEnumValue = win32api.RegEnumValue
        RegError = win32api.error
    except ImportError:
        log.info("Warning: Can't read registry to find the "
                 "necessary compiler setting\n"
                 "Make sure that Python modules winreg, "
                 "win32api or win32con are installed.")
        pass

if _can_read_reg:
    HKEYS = (hkey_mod.HKEY_USERS,
             hkey_mod.HKEY_CURRENT_USER,
             hkey_mod.HKEY_LOCAL_MACHINE,
             hkey_mod.HKEY_CLASSES_ROOT)

def read_keys(base, key):
    """Return list of registry keys."""
    try:
        handle = RegOpenKeyEx(base, key)
    except RegError:
        return None
    L = []
    i = 0
    while True:
        try:
            k = RegEnumKey(handle, i)
        except RegError:
            break
        L.append(k)
        i += 1
    return L

def read_values(base, key):
    """Return dict of registry keys and values.

    All names are converted to lowercase.
    """
    try:
        handle = RegOpenKeyEx(base, key)
    except RegError:
        return None
    d = {}
    i = 0
    while True:
        try:
            name, value, type = RegEnumValue(handle, i)
        except RegError:
            break
        name = name.lower()
        d[convert_mbcs(name)] = convert_mbcs(value)
        i += 1
    return d

def convert_mbcs(s):
    dec = getattr(s, "decode", None)
    if dec is not None:
        try:
            s = dec("mbcs")
        except UnicodeError:
            pass
    return s

class MacroExpander:
    def __init__(self, version):
        self.macros = {}
        self.load_macros(version)

    def set_macro(self, macro, path, key):
        for base in HKEYS:
            d = read_values(base, path)
            if d:
                self.macros["$(%s)" % macro] = d[key]
                break

    def load_macros(self, version):
        vsbase = r"Software\Microsoft\VisualStudio\%0.1f" % version
        self.set_macro("VCInstallDir", vsbase + r"\Setup\VC", "productdir")
        self.set_macro("VSInstallDir", vsbase + r"\Setup\VS", "productdir")
        net = r"Software\Microsoft\.NETFramework"
        self.set_macro("FrameworkDir", net, "installroot")
        try:
            if version > 7.0:
                self.set_macro("FrameworkSDKDir", net, "sdkinstallrootv1.1")
            else:
                self.set_macro("FrameworkSDKDir", net, "sdkinstallroot")
        except KeyError as exc: #
            raise DistutilsPlatformError(
            """Python was built with Visual Studio 2003;
extensions must be built with a compiler than can generate compatible binaries.
Visual Studio 2003 was not found on this system. If you have Cygwin installed,
you can try compiling with MingW32, by passing "-c mingw32" to setup.py.""")

        p = r"Software\Microsoft\NET Framework Setup\Product"
        for base in HKEYS:
            try:
                h = RegOpenKeyEx(base, p)
            except RegError:
                continue
            key = RegEnumKey(h, 0)
            d = read_values(base, r"%s\%s" % (p, key))
            self.macros["$(FrameworkVersion)"] = d["version"]

    def sub(self, s):
        for k, v in self.macros.items():
            s = s.replace(k, v)
        return s

def get_build_version():
    """Return the version of MSVC that was used to build Python.

    For Python 2.3 and up, the version number is included in
    sys.version.  For earlier versions, assume the compiler is MSVC 6.
    """
    prefix = "MSC v."
    i = sys.version.find(prefix)
    if i == -1:
        return 6
    i = i + len(prefix)
    s, rest = sys.version[i:].split(" ", 1)
    majorVersion = int(s[:-2]) - 6
    if majorVersion >= 13:
        # v13 was skipped and should be v14
        majorVersion += 1
    minorVersion = int(s[2:3]) / 10.0
    # I don't think paths are affected by minor version in version 6
    if majorVersion == 6:
        minorVersion = 0
    if majorVersion >= 6:
        return majorVersion + minorVersion
    # else we don't know what version of the compiler this is
    return None

def get_build_architecture():
    """Return the processor architecture.

    Possible results are "Intel" or "AMD64".
    """

    prefix = " bit ("
    i = sys.version.find(prefix)
    if i == -1:
        return "Intel"
    j = sys.version.find(")", i)
    return sys.version[i+len(prefix):j]

def normalize_and_reduce_paths(paths):
    """Return a list of normalized paths with duplicates removed.

    The current order of paths is maintained.
    """
    # Paths are normalized so things like:  /a and /a/ aren't both preserved.
    reduced_paths = []
    for p in paths:
        np = os.path.normpath(p)
        # XXX(nnorwitz): O(n**2), if reduced_paths gets long perhaps use a set.
        if np not in reduced_paths:
            reduced_paths.append(np)
    return reduced_paths


class MSVCCompiler(CCompiler) :
    """Concrete class that implements an interface to Microsoft Visual C++,
       as defined by the CCompiler abstract class."""

    compiler_type = 'msvc'

    # Just set this so CCompiler's constructor doesn't barf.  We currently
    # don't use the 'set_executables()' bureaucracy provided by CCompiler,
    # as it really isn't necessary for this sort of single-compiler class.
    # Would be nice to have a consistent interface with UnixCCompiler,
    # though, so it's worth thinking about.
    executables = {}

    # Private class data (need to distinguish C from C++ source for compiler)
    _c_extensions = ['.c']
    _cpp_extensions = ['.cc', '.cpp', '.cxx']
    _rc_extensions = ['.rc']
    _mc_extensions = ['.mc']

    # Needed for the filename generation methods provided by the
    # base class, CCompiler.
    src_extensions = (_c_extensions + _cpp_extensions +
                      _rc_extensions + _mc_extensions)
    res_extension = '.res'
    obj_extension = '.obj'
    static_lib_extension = '.lib'
    shared_lib_extension = '.dll'
    static_lib_format = shared_lib_format = '%s%s'
    exe_extension = '.exe'

    def __init__(self, verbose=0, dry_run=0, force=0):
        CCompiler.__init__ (self, verbose, dry_run, force)
        self.__version = get_build_version()
        self.__arch = get_build_architecture()
        if self.__arch == "Intel":
            # x86
            if self.__version >= 7:
                self.__root = r"Software\Microsoft\VisualStudio"
                self.__macros = MacroExpander(self.__version)
            else:
                self.__root = r"Software\Microsoft\Devstudio"
            self.__product = "Visual Studio version %s" % self.__version
        else:
            # Win64. Assume this was built with the platform SDK
            self.__product = "Microsoft SDK compiler %s" % (self.__version + 6)

        self.initialized = False

    def initialize(self):
        self.__paths = []
        if "DISTUTILS_USE_SDK" in os.environ and "MSSdk" in os.environ and self.find_exe("cl.exe"):
            # Assume that the SDK set up everything alright; don't try to be
            # smarter
            self.cc = "cl.exe"
            self.linker = "link.exe"
            self.lib = "lib.exe"
            self.rc = "rc.exe"
            self.mc = "mc.exe"
        else:
            self.__paths = self.get_msvc_paths("path")

            if len(self.__paths) == 0:
                raise DistutilsPlatformError("Python was built with %s, "
                       "and extensions need to be built with the same "
                       "version of the compiler, but it isn't installed."
                       % self.__product)

            self.cc = self.find_exe("cl.exe")
            self.linker = self.find_exe("link.exe")
            self.lib = self.find_exe("lib.exe")
            self.rc = self.find_exe("rc.exe")   # resource compiler
            self.mc = self.find_exe("mc.exe")   # message compiler
            self.set_path_env_var('lib')
            self.set_path_env_var('include')

        # extend the MSVC path with the current path
        try:
            for p in os.environ['path'].split(';'):
                self.__paths.append(p)
        except KeyError:
            pass
        self.__paths = normalize_and_reduce_paths(self.__paths)
        os.environ['path'] = ";".join(self.__paths)

        self.preprocess_options = None
        if self.__arch == "Intel":
            self.compile_options = [ '/nologo', '/Ox', '/MD', '/W3', '/GX' ,
                                     '/DNDEBUG']
            self.compile_options_debug = ['/nologo', '/Od', '/MDd', '/W3', '/GX',
                                          '/Z7', '/D_DEBUG']
        else:
            # Win64
            self.compile_options = [ '/nologo', '/Ox', '/MD', '/W3', '/GS-' ,
                                     '/DNDEBUG']
            self.compile_options_debug = ['/nologo', '/Od', '/MDd', '/W3', '/GS-',
                                          '/Z7', '/D_DEBUG']

        self.ldflags_shared = ['/DLL', '/nologo', '/INCREMENTAL:NO']
        if self.__version >= 7:
            self.ldflags_shared_debug = [
                '/DLL', '/nologo', '/INCREMENTAL:no', '/DEBUG'
                ]
        else:
            self.ldflags_shared_debug = [
                '/DLL', '/nologo', '/INCREMENTAL:no', '/pdb:None', '/DEBUG'
                ]
        self.ldflags_static = [ '/nologo']

        self.initialized = True

    # -- Worker methods ------------------------------------------------

    def object_filenames(self,
                         source_filenames,
                         strip_dir=0,
                         output_dir=''):
        # Copied from ccompiler.py, extended to return .res as 'object'-file
        # for .rc input file
        if output_dir is None: output_dir = ''
        obj_names = []
        for src_name in source_filenames:
            (base, ext) = os.path.splitext (src_name)
            base = os.path.splitdrive(base)[1] # Chop off the drive
            base = base[os.path.isabs(base):]  # If abs, chop off leading /
            if ext not in self.src_extensions:
                # Better to raise an exception instead of silently continuing
                # and later complain about sources and targets having
                # different lengths
                raise CompileError ("Don't know how to compile %s" % src_name)
            if strip_dir:
                base = os.path.basename (base)
            if ext in self._rc_extensions:
                obj_names.append (os.path.join (output_dir,
                                                base + self.res_extension))
            elif ext in self._mc_extensions:
                obj_names.append (os.path.join (output_dir,
                                                base + self.res_extension))
            else:
                obj_names.append (os.path.join (output_dir,
                                                base + self.obj_extension))
        return obj_names


    def compile(self, sources,
                output_dir=None, macros=None, include_dirs=None, debug=0,
                extra_preargs=None, extra_postargs=None, depends=None):

        if not self.initialized:
            self.initialize()
        compile_info = self._setup_compile(output_dir, macros, include_dirs,
                                           sources, depends, extra_postargs)
        macros, objects, extra_postargs, pp_opts, build = compile_info

        compile_opts = extra_preargs or []
        compile_opts.append ('/c')
        if debug:
            compile_opts.extend(self.compile_options_debug)
        else:
            compile_opts.extend(self.compile_options)

        for obj in objects:
            try:
                src, ext = build[obj]
            except KeyError:
                continue
            if debug:
                # pass the full pathname to MSVC in debug mode,
                # this allows the debugger to find the source file
                # without asking the user to browse for it
                src = os.path.abspath(src)

            if ext in self._c_extensions:
                input_opt = "/Tc" + src
            elif ext in self._cpp_extensions:
                input_opt = "/Tp" + src
            elif ext in self._rc_extensions:
                # compile .RC to .RES file
                input_opt = src
                output_opt = "/fo" + obj
                try:
                    self.spawn([self.rc] + pp_opts +
                               [output_opt] + [input_opt])
                except DistutilsExecError as msg:
                    raise CompileError(msg)
                continue
            elif ext in self._mc_extensions:
                # Compile .MC to .RC file to .RES file.
                #   * '-h dir' specifies the directory for the
                #     generated include file
                #   * '-r dir' specifies the target directory of the
                #     generated RC file and the binary message resource
                #     it includes
                #
                # For now (since there are no options to change this),
                # we use the source-directory for the include file and
                # the build directory for the RC file and message
                # resources. This works at least for win32all.
                h_dir = os.path.dirname(src)
                rc_dir = os.path.dirname(obj)
                try:
                    # first compile .MC to .RC and .H file
                    self.spawn([self.mc] +
                               ['-h', h_dir, '-r', rc_dir] + [src])
                    base, _ = os.path.splitext (os.path.basename (src))
                    rc_file = os.path.join (rc_dir, base + '.rc')
                    # then compile .RC to .RES file
                    self.spawn([self.rc] +
                               ["/fo" + obj] + [rc_file])

                except DistutilsExecError as msg:
                    raise CompileError(msg)
                continue
            else:
                # how to handle this file?
                raise CompileError("Don't know how to compile %s to %s"
                                   % (src, obj))

            output_opt = "/Fo" + obj
            try:
                self.spawn([self.cc] + compile_opts + pp_opts +
                           [input_opt, output_opt] +
                           extra_postargs)
            except DistutilsExecError as msg:
                raise CompileError(msg)

        return objects


    def create_static_lib(self,
                          objects,
                          output_libname,
                          output_dir=None,
                          debug=0,
                          target_lang=None):

        if not self.initialized:
            self.initialize()
        (objects, output_dir) = self._fix_object_args(objects, output_dir)
        output_filename = self.library_filename(output_libname,
                                                output_dir=output_dir)

        if self._need_link(objects, output_filename):
            lib_args = objects + ['/OUT:' + output_filename]
            if debug:
                pass # XXX what goes here?
            try:
                self.spawn([self.lib] + lib_args)
            except DistutilsExecError as msg:
                raise LibError(msg)
        else:
            log.debug("skipping %s (up-to-date)", output_filename)


    def link(self,
             target_desc,
             objects,
             output_filename,
             output_dir=None,
             libraries=None,
             library_dirs=None,
             runtime_library_dirs=None,
             export_symbols=None,
             debug=0,
             extra_preargs=None,
             extra_postargs=None,
             build_temp=None,
             target_lang=None):

        if not self.initialized:
            self.initialize()
        (objects, output_dir) = self._fix_object_args(objects, output_dir)
        fixed_args = self._fix_lib_args(libraries, library_dirs,
                                        runtime_library_dirs)
        (libraries, library_dirs, runtime_library_dirs) = fixed_args

        if runtime_library_dirs:
            self.warn ("I don't know what to do with 'runtime_library_dirs': "
                       + str (runtime_library_dirs))

        lib_opts = gen_lib_options(self,
                                   library_dirs, runtime_library_dirs,
                                   libraries)
        if output_dir is not None:
            output_filename = os.path.join(output_dir, output_filename)

        if self._need_link(objects, output_filename):
            if target_desc == CCompiler.EXECUTABLE:
                if debug:
                    ldflags = self.ldflags_shared_debug[1:]
                else:
                    ldflags = self.ldflags_shared[1:]
            else:
                if debug:
                    ldflags = self.ldflags_shared_debug
                else:
                    ldflags = self.ldflags_shared

            export_opts = []
            for sym in (export_symbols or []):
                export_opts.append("/EXPORT:" + sym)

            ld_args = (ldflags + lib_opts + export_opts +
                       objects + ['/OUT:' + output_filename])

            # The MSVC linker generates .lib and .exp files, which cannot be
            # suppressed by any linker switches. The .lib files may even be
            # needed! Make sure they are generated in the temporary build
            # directory. Since they have different names for debug and release
            # builds, they can go into the same directory.
            if export_symbols is not None:
                (dll_name, dll_ext) = os.path.splitext(
                    os.path.basename(output_filename))
                implib_file = os.path.join(
                    os.path.dirname(objects[0]),
                    self.library_filename(dll_name))
                ld_args.append ('/IMPLIB:' + implib_file)

            if extra_preargs:
                ld_args[:0] = extra_preargs
            if extra_postargs:
                ld_args.extend(extra_postargs)

            self.mkpath(os.path.dirname(output_filename))
            try:
                self.spawn([self.linker] + ld_args)
            except DistutilsExecError as msg:
                raise LinkError(msg)

        else:
            log.debug("skipping %s (up-to-date)", output_filename)


    # -- Miscellaneous methods -----------------------------------------
    # These are all used by the 'gen_lib_options() function, in
    # ccompiler.py.

    def library_dir_option(self, dir):
        return "/LIBPATH:" + dir

    def runtime_library_dir_option(self, dir):
        raise DistutilsPlatformError(
              "don't know how to set runtime library search path for MSVC++")

    def library_option(self, lib):
        return self.library_filename(lib)


    def find_library_file(self, dirs, lib, debug=0):
        # Prefer a debugging library if found (and requested), but deal
        # with it if we don't have one.
        if debug:
            try_names = [lib + "_d", lib]
        else:
            try_names = [lib]
        for dir in dirs:
            for name in try_names:
                libfile = os.path.join(dir, self.library_filename (name))
                if os.path.exists(libfile):
                    return libfile
        else:
            # Oops, didn't find it in *any* of 'dirs'
            return None

    # Helper methods for using the MSVC registry settings

    def find_exe(self, exe):
        """Return path to an MSVC executable program.

        Tries to find the program in several places: first, one of the
        MSVC program search paths from the registry; next, the directories
        in the PATH environment variable.  If any of those work, return an
        absolute path that is known to exist.  If none of them work, just
        return the original program name, 'exe'.
        """
        for p in self.__paths:
            fn = os.path.join(os.path.abspath(p), exe)
            if os.path.isfile(fn):
                return fn

        # didn't find it; try existing path
        for p in os.environ['Path'].split(';'):
            fn = os.path.join(os.path.abspath(p),exe)
            if os.path.isfile(fn):
                return fn

        return exe

    def get_msvc_paths(self, path, platform='x86'):
        """Get a list of devstudio directories (include, lib or path).

        Return a list of strings.  The list will be empty if unable to
        access the registry or appropriate registry keys not found.
        """
        if not _can_read_reg:
            return []

        path = path + " dirs"
        if self.__version >= 7:
            key = (r"%s\%0.1f\VC\VC_OBJECTS_PLATFORM_INFO\Win32\Directories"
                   % (self.__root, self.__version))
        else:
            key = (r"%s\6.0\Build System\Components\Platforms"
                   r"\Win32 (%s)\Directories" % (self.__root, platform))

        for base in HKEYS:
            d = read_values(base, key)
            if d:
                if self.__version >= 7:
                    return self.__macros.sub(d[path]).split(";")
                else:
                    return d[path].split(";")
        # MSVC 6 seems to create the registry entries we need only when
        # the GUI is run.
        if self.__version == 6:
            for base in HKEYS:
                if read_values(base, r"%s\6.0" % self.__root) is not None:
                    self.warn("It seems you have Visual Studio 6 installed, "
                        "but the expected registry settings are not present.\n"
                        "You must at least run the Visual Studio GUI once "
                        "so that these entries are created.")
                    break
        return []

    def set_path_env_var(self, name):
        """Set environment variable 'name' to an MSVC path type value.

        This is equivalent to a SET command prior to execution of spawned
        commands.
        """

        if name == "lib":
            p = self.get_msvc_paths("library")
        else:
            p = self.get_msvc_paths(name)
        if p:
            os.environ[name] = ';'.join(p)


if get_build_version() >= 8.0:
    log.debug("Importing new compiler from distutils.msvc9compiler")
    OldMSVCCompiler = MSVCCompiler
    from distutils.msvc9compiler import MSVCCompiler
    # get_build_architecture not really relevant now we support cross-compile
    from distutils.msvc9compiler import MacroExpander
PKV[�3�bbdir_util.pynu�[���"""distutils.dir_util

Utility functions for manipulating directories and directory trees."""

import os
import errno
from distutils.errors import DistutilsFileError, DistutilsInternalError
from distutils import log

# cache for by mkpath() -- in addition to cheapening redundant calls,
# eliminates redundant "creating /foo/bar/baz" messages in dry-run mode
_path_created = {}

# I don't use os.makedirs because a) it's new to Python 1.5.2, and
# b) it blows up if the directory already exists (I want to silently
# succeed in that case).
def mkpath(name, mode=0o777, verbose=1, dry_run=0):
    """Create a directory and any missing ancestor directories.

    If the directory already exists (or if 'name' is the empty string, which
    means the current directory, which of course exists), then do nothing.
    Raise DistutilsFileError if unable to create some directory along the way
    (eg. some sub-path exists, but is a file rather than a directory).
    If 'verbose' is true, print a one-line summary of each mkdir to stdout.
    Return the list of directories actually created.
    """

    global _path_created

    # Detect a common bug -- name is None
    if not isinstance(name, str):
        raise DistutilsInternalError(
              "mkpath: 'name' must be a string (got %r)" % (name,))

    # XXX what's the better way to handle verbosity? print as we create
    # each directory in the path (the current behaviour), or only announce
    # the creation of the whole path? (quite easy to do the latter since
    # we're not using a recursive algorithm)

    name = os.path.normpath(name)
    created_dirs = []
    if os.path.isdir(name) or name == '':
        return created_dirs
    if _path_created.get(os.path.abspath(name)):
        return created_dirs

    (head, tail) = os.path.split(name)
    tails = [tail]                      # stack of lone dirs to create

    while head and tail and not os.path.isdir(head):
        (head, tail) = os.path.split(head)
        tails.insert(0, tail)          # push next higher dir onto stack

    # now 'head' contains the deepest directory that already exists
    # (that is, the child of 'head' in 'name' is the highest directory
    # that does *not* exist)
    for d in tails:
        #print "head = %s, d = %s: " % (head, d),
        head = os.path.join(head, d)
        abs_head = os.path.abspath(head)

        if _path_created.get(abs_head):
            continue

        if verbose >= 1:
            log.info("creating %s", head)

        if not dry_run:
            try:
                os.mkdir(head, mode)
            except OSError as exc:
                if not (exc.errno == errno.EEXIST and os.path.isdir(head)):
                    raise DistutilsFileError(
                          "could not create '%s': %s" % (head, exc.args[-1]))
            created_dirs.append(head)

        _path_created[abs_head] = 1
    return created_dirs

def create_tree(base_dir, files, mode=0o777, verbose=1, dry_run=0):
    """Create all the empty directories under 'base_dir' needed to put 'files'
    there.

    'base_dir' is just the name of a directory which doesn't necessarily
    exist yet; 'files' is a list of filenames to be interpreted relative to
    'base_dir'.  'base_dir' + the directory portion of every file in 'files'
    will be created if it doesn't already exist.  'mode', 'verbose' and
    'dry_run' flags are as for 'mkpath()'.
    """
    # First get the list of directories to create
    need_dir = set()
    for file in files:
        need_dir.add(os.path.join(base_dir, os.path.dirname(file)))

    # Now create them
    for dir in sorted(need_dir):
        mkpath(dir, mode, verbose=verbose, dry_run=dry_run)

def copy_tree(src, dst, preserve_mode=1, preserve_times=1,
              preserve_symlinks=0, update=0, verbose=1, dry_run=0):
    """Copy an entire directory tree 'src' to a new location 'dst'.

    Both 'src' and 'dst' must be directory names.  If 'src' is not a
    directory, raise DistutilsFileError.  If 'dst' does not exist, it is
    created with 'mkpath()'.  The end result of the copy is that every
    file in 'src' is copied to 'dst', and directories under 'src' are
    recursively copied to 'dst'.  Return the list of files that were
    copied or might have been copied, using their output name.  The
    return value is unaffected by 'update' or 'dry_run': it is simply
    the list of all files under 'src', with the names changed to be
    under 'dst'.

    'preserve_mode' and 'preserve_times' are the same as for
    'copy_file'; note that they only apply to regular files, not to
    directories.  If 'preserve_symlinks' is true, symlinks will be
    copied as symlinks (on platforms that support them!); otherwise
    (the default), the destination of the symlink will be copied.
    'update' and 'verbose' are the same as for 'copy_file'.
    """
    from distutils.file_util import copy_file

    if not dry_run and not os.path.isdir(src):
        raise DistutilsFileError(
              "cannot copy tree '%s': not a directory" % src)
    try:
        names = os.listdir(src)
    except OSError as e:
        if dry_run:
            names = []
        else:
            raise DistutilsFileError(
                  "error listing files in '%s': %s" % (src, e.strerror))

    if not dry_run:
        mkpath(dst, verbose=verbose)

    outputs = []

    for n in names:
        src_name = os.path.join(src, n)
        dst_name = os.path.join(dst, n)

        if n.startswith('.nfs'):
            # skip NFS rename files
            continue

        if preserve_symlinks and os.path.islink(src_name):
            link_dest = os.readlink(src_name)
            if verbose >= 1:
                log.info("linking %s -> %s", dst_name, link_dest)
            if not dry_run:
                os.symlink(link_dest, dst_name)
            outputs.append(dst_name)

        elif os.path.isdir(src_name):
            outputs.extend(
                copy_tree(src_name, dst_name, preserve_mode,
                          preserve_times, preserve_symlinks, update,
                          verbose=verbose, dry_run=dry_run))
        else:
            copy_file(src_name, dst_name, preserve_mode,
                      preserve_times, update, verbose=verbose,
                      dry_run=dry_run)
            outputs.append(dst_name)

    return outputs

def _build_cmdtuple(path, cmdtuples):
    """Helper for remove_tree()."""
    for f in os.listdir(path):
        real_f = os.path.join(path,f)
        if os.path.isdir(real_f) and not os.path.islink(real_f):
            _build_cmdtuple(real_f, cmdtuples)
        else:
            cmdtuples.append((os.remove, real_f))
    cmdtuples.append((os.rmdir, path))

def remove_tree(directory, verbose=1, dry_run=0):
    """Recursively remove an entire directory tree.

    Any errors are ignored (apart from being reported to stdout if 'verbose'
    is true).
    """
    global _path_created

    if verbose >= 1:
        log.info("removing '%s' (and everything under it)", directory)
    if dry_run:
        return
    cmdtuples = []
    _build_cmdtuple(directory, cmdtuples)
    for cmd in cmdtuples:
        try:
            cmd[0](cmd[1])
            # remove dir from cache if it's already there
            abspath = os.path.abspath(cmd[1])
            if abspath in _path_created:
                del _path_created[abspath]
        except OSError as exc:
            log.warn("error removing %s: %s", directory, exc)

def ensure_relative(path):
    """Take the full path 'path', and make it a relative path.

    This is useful to make 'path' the second argument to os.path.join().
    """
    drive, path = os.path.splitdrive(path)
    if path[0:1] == os.sep:
        path = drive + path[1:]
    return path
PKW[U�cڍ�
errors.pycnu�[����
{fc@s�dZdZdefd��YZdefd��YZdefd��YZdefd	��YZd
efd��YZdefd
��YZdefd��YZ	defd��YZ
defd��YZdefd��YZdefd��YZ
defd��YZdefd��YZdefd��YZdefd��YZd efd!��YZd"efd#��YZd$efd%��YZd&efd'��YZd(S()s�distutils.errors

Provides exceptions used by the Distutils modules.  Note that Distutils
modules may raise standard exceptions; in particular, SystemExit is
usually raised for errors that are obviously the end-user's fault
(eg. bad command-line arguments).

This module is safe to use in "from ... import *" mode; it only exports
symbols whose names start with "Distutils" and end with "Error".s$Id$tDistutilsErrorcBseZdZRS(sThe root of all Distutils evil.(t__name__t
__module__t__doc__(((s(/usr/lib64/python2.7/distutils/errors.pyR
stDistutilsModuleErrorcBseZdZRS(s�Unable to load an expected module, or to find an expected class
    within some module (in particular, command modules and classes).(RRR(((s(/usr/lib64/python2.7/distutils/errors.pyRstDistutilsClassErrorcBseZdZRS(s�Some command class (or possibly distribution class, if anyone
    feels a need to subclass Distribution) is found not to be holding
    up its end of the bargain, ie. implementing some part of the
    "command "interface.(RRR(((s(/usr/lib64/python2.7/distutils/errors.pyRstDistutilsGetoptErrorcBseZdZRS(s7The option table provided to 'fancy_getopt()' is bogus.(RRR(((s(/usr/lib64/python2.7/distutils/errors.pyRstDistutilsArgErrorcBseZdZRS(saRaised by fancy_getopt in response to getopt.error -- ie. an
    error in the command line usage.(RRR(((s(/usr/lib64/python2.7/distutils/errors.pyRstDistutilsFileErrorcBseZdZRS(s�Any problems in the filesystem: expected file not found, etc.
    Typically this is for problems that we detect before IOError or
    OSError could be raised.(RRR(((s(/usr/lib64/python2.7/distutils/errors.pyR!stDistutilsOptionErrorcBseZdZRS(s�Syntactic/semantic errors in command options, such as use of
    mutually conflicting options, or inconsistent options,
    badly-spelled values, etc.  No distinction is made between option
    values originating in the setup script, the command line, config
    files, or what-have-you -- but if we *know* something originated in
    the setup script, we'll raise DistutilsSetupError instead.(RRR(((s(/usr/lib64/python2.7/distutils/errors.pyR	&stDistutilsSetupErrorcBseZdZRS(sqFor errors that can be definitely blamed on the setup script,
    such as invalid keyword arguments to 'setup()'.(RRR(((s(/usr/lib64/python2.7/distutils/errors.pyR
.stDistutilsPlatformErrorcBseZdZRS(s�We don't know how to do something on the current platform (but
    we do know how to do it on some platform) -- eg. trying to compile
    C files on a platform not supported by a CCompiler subclass.(RRR(((s(/usr/lib64/python2.7/distutils/errors.pyR2stDistutilsExecErrorcBseZdZRS(s`Any problems executing an external program (such as the C
    compiler, when compiling C files).(RRR(((s(/usr/lib64/python2.7/distutils/errors.pyR7stDistutilsInternalErrorcBseZdZRS(soInternal inconsistencies or impossibilities (obviously, this
    should never be seen if the code is working!).(RRR(((s(/usr/lib64/python2.7/distutils/errors.pyR
;stDistutilsTemplateErrorcBseZdZRS(s%Syntax error in a file list template.(RRR(((s(/usr/lib64/python2.7/distutils/errors.pyR?stDistutilsByteCompileErrorcBseZdZRS(sByte compile error.(RRR(((s(/usr/lib64/python2.7/distutils/errors.pyRBstCCompilerErrorcBseZdZRS(s#Some compile/link operation failed.(RRR(((s(/usr/lib64/python2.7/distutils/errors.pyRFstPreprocessErrorcBseZdZRS(s.Failure to preprocess one or more C/C++ files.(RRR(((s(/usr/lib64/python2.7/distutils/errors.pyRIstCompileErrorcBseZdZRS(s2Failure to compile one or more C/C++ source files.(RRR(((s(/usr/lib64/python2.7/distutils/errors.pyRLstLibErrorcBseZdZRS(sKFailure to create a static library from one or more C/C++ object
    files.(RRR(((s(/usr/lib64/python2.7/distutils/errors.pyROst	LinkErrorcBseZdZRS(s]Failure to link one or more C/C++ object files into an executable
    or shared library file.(RRR(((s(/usr/lib64/python2.7/distutils/errors.pyRSstUnknownFileErrorcBseZdZRS(s(Attempt to process an unknown file type.(RRR(((s(/usr/lib64/python2.7/distutils/errors.pyRWsN(Rt__revision__t	ExceptionRRRRRRR	R
RRR
RRRRRRRR(((s(/usr/lib64/python2.7/distutils/errors.pyt<module>	s(PKW[x"�..fancy_getopt.pyonu�[����
{fc@s�dZdZddlZddlZddlZddlZddlmZmZdZ	ej
de	�Zej
de	e	f�Zej
dd	�Zd
fd��YZd�Zej
ejd
eej��Zd�Zd�Zdfd��YZdS(s6distutils.fancy_getopt

Wrapper around the standard getopt module that provides the following
additional features:
  * short and long options are tied together
  * options have help strings, so fancy_getopt could potentially
    create a complete usage summary
  * options set attributes of a passed-in object
s$Id$i����N(tDistutilsGetoptErrortDistutilsArgErrors[a-zA-Z](?:[a-zA-Z0-9-]*)s^%s$s^(%s)=!(%s)$t-t_tFancyGetoptcBs�eZdZdd�Zd�Zd�Zddd�Zd�Zd�Z	d�Z
d�Zd	�Zd
�Z
ddd�Zd�Zdd
�Zddd�ZRS(s�Wrapper around the standard 'getopt()' module that provides some
    handy extra functionality:
      * short and long options are tied together
      * options have help strings, and help text can be assembled
        from them
      * options set attributes of a passed-in object
      * boolean options can have "negative aliases" -- eg. if
        --quiet is the "negative alias" of --verbose, then "--quiet"
        on the command line sets 'verbose' to false
    cCst||_i|_|jr(|j�ni|_i|_g|_g|_i|_i|_i|_	g|_
dS(N(toption_tabletoption_indext_build_indextaliastnegative_aliast
short_optst	long_optst
short2longt	attr_namet	takes_argtoption_order(tselfR((s./usr/lib64/python2.7/distutils/fancy_getopt.pyt__init__-s
			
							cCs6|jj�x"|jD]}||j|d<qWdS(Ni(RtclearR(Rtoption((s./usr/lib64/python2.7/distutils/fancy_getopt.pyRYs
cCs||_|j�dS(N(RR(RR((s./usr/lib64/python2.7/distutils/fancy_getopt.pytset_option_table^s	cCsO||jkrtd|�n,|||f}|jj|�||j|<dS(Ns'option conflict: already an option '%s'(RRRtappend(Rtlong_optiontshort_optionthelp_stringR((s./usr/lib64/python2.7/distutils/fancy_getopt.pyt
add_optionbs
cCs
||jkS(scReturn true if the option table for this parser has an
        option with long name 'long_option'.(R(RR((s./usr/lib64/python2.7/distutils/fancy_getopt.pyt
has_optionlscCstj|t�S(s�Translate long option name 'long_option' to the form it
        has as an attribute of some object: ie., translate hyphens
        to underscores.(tstringt	translatet
longopt_xlate(RR((s./usr/lib64/python2.7/distutils/fancy_getopt.pyt
get_attr_nameqscCsqxj|j�D]\\}}||jkrAtd|||f�n||jkr
td|||f�q
q
WdS(Ns(invalid %s '%s': option '%s' not defineds0invalid %s '%s': aliased option '%s' not defined(titemsRR(RtaliasestwhatRtopt((s./usr/lib64/python2.7/distutils/fancy_getopt.pyt_check_alias_dictxscCs|j|d�||_dS(s'Set the aliases for this option parser.RN(R#R(RR((s./usr/lib64/python2.7/distutils/fancy_getopt.pytset_aliases�scCs|j|d�||_dS(s�Set the negative aliases for this option parser.
        'negative_alias' should be a dictionary mapping option names to
        option names, both the key and value must already be defined
        in the option table.snegative aliasN(R#R	(RR	((s./usr/lib64/python2.7/distutils/fancy_getopt.pytset_negative_aliases�scCs�g|_g|_|jj�i|_x]|jD]R}t|�dkrb|\}}}d}n7t|�dkr�|\}}}}ntd|f�t|t	�s�t|�dkr�t
d|�n|dkp�t|t	�o�t|�dkst
d|�n||j|<|jj|�|d	d
kre|rH|d}n|dd	!}d|j
|<nk|jj|�}|dk	r�|j
|r�t
d||f�n||jd	<d|j
|<n
d|j
|<|jj|�}|dk	r!|j
||j
|kr!t
d
||f�q!ntj|�sDt
dd|�n|j|�|j|<|r2|jj|�||j|d<q2q2WdS(s�Populate the various data structures that keep tabs on the
        option table.  Called by 'getopt()' before it can do anything
        worthwhile.
        iiisinvalid option tuple: %ris9invalid long option '%s': must be a string of length >= 2is:invalid short option '%s': must a single character or Nonei����t=t:s>invalid negative alias '%s': aliased option '%s' takes a valuesginvalid alias '%s': inconsistent with aliased option '%s' (one of them takes a value, the other doesn'tsinvalid long option name '%s' s'(must be letters, numbers, hyphens onlyN(RR
RRtrepeatRtlent
ValueErrort
isinstancetstrRtNoneRRR	tgetRt
longopt_retmatchRR
(RRtlongtshortthelpR(talias_to((s./usr/lib64/python2.7/distutils/fancy_getopt.pyt_grok_option_table�sd		
		"
!






cCs�|dkrtjd}n|dkr:t�}d}nd}|j�tj|j�}y"tj|||j	�\}}Wntj
k
r�}t|�nXx|D]\}}t|�dkr�|ddkr�|j
|d}n
|d}|jj|�}	|	r|	}n|j|sQ|jj|�}	|	rH|	}d}qQd}n|j|}
|r�|jj|
�dk	r�t||
d�d}nt||
|�|jj||f�q�W|r�||fS|SdS(sParse command-line options in args. Store as attributes on object.

        If 'args' is None or not supplied, uses 'sys.argv[1:]'.  If
        'object' is None or not supplied, creates a new OptionDummy
        object, stores option values there, and returns a tuple (args,
        object).  If 'object' is supplied, it is modified in place and
        'getopt()' just returns 'args'; in both cases, the returned
        'args' is a modified copy of the passed-in 'args' list, which
        is left untouched.
        iiiRN(R-tsystargvtOptionDummyR5RtjoinR
tgetoptRterrorRR)RRR.RR	R
R(tgetattrtsetattrRR(Rtargstobjecttcreated_objectR
toptstmsgR"tvalRtattr((s./usr/lib64/python2.7/distutils/fancy_getopt.pyR:�sB		
"
"
	
		

cCs&|jdkrtd�n|jSdS(s�Returns the list of (option, value) tuples processed by the
        previous run of 'getopt()'.  Raises RuntimeError if
        'getopt()' hasn't been called yet.
        s!'getopt()' hasn't been called yetN(RR-tRuntimeError(R((s./usr/lib64/python2.7/distutils/fancy_getopt.pytget_option_order*scCs�d}x||jD]q}|d}|d}t|�}|ddkrS|d}n|dk	rl|d}n||kr|}qqW|ddd}d}||}	d|}
|r�|g}n	d	g}x|jD]}|d
 \}}}t||	�}
|ddkr|dd!}n|dkrk|
rQ|jd|||
df�q�|jd||f�nHd
||f}|
r�|jd|||
df�n|jd|�x#|
dD]}|j|
|�q�Wq�W|S(s�Generate help text (a list of strings, one per suggested line of
        output) from the option table for this FancyGetopt object.
        iii����R&iiiNt sOption summary:is  --%-*s  %ss
  --%-*s  s%s (-%s)s  --%-*sN(RR)R-t	wrap_textR(Rtheadertmax_optRR1R2tlt	opt_widtht
line_widtht
text_widtht
big_indenttlinesR3ttextt	opt_names((s./usr/lib64/python2.7/distutils/fancy_getopt.pyt
generate_help5sF






	!	cCsG|dkrtj}nx(|j|�D]}|j|d�q(WdS(Ns
(R-R6tstdoutRStwrite(RRItfiletline((s./usr/lib64/python2.7/distutils/fancy_getopt.pyt
print_help�sN(t__name__t
__module__t__doc__R-RRRRRRR#R$R%R5R:RFRSRX(((s./usr/lib64/python2.7/distutils/fancy_getopt.pyR!s
,		
							X@	TcCs)t|�}|j|�|j||�S(N(RR%R:(toptionstnegative_optR?R>tparser((s./usr/lib64/python2.7/distutils/fancy_getopt.pytfancy_getopt�s
RGcCs~|dkrgSt|�|kr)|gStj|�}tj|t�}tjd|�}td|�}g}x|ryg}d}xt|r�t|d�}|||kr�|j	|d�|d=||}q�|r�|dddkr�|d=nPq�W|r]|dkr<|j	|dd|!�|d||d<n|dddkr]|d=q]n|j	tj
|d��qtW|S(s�wrap_text(text : string, width : int) -> [string]

    Split 'text' into multiple lines of no more than 'width' characters
    each, and return the list of strings that results.
    s( +|-+)ii����RGtN(R-R)Rt
expandtabsRtWS_TRANStretsplittfilterRR9(RQtwidthtchunksRPtcur_linetcur_lenRK((s./usr/lib64/python2.7/distutils/fancy_getopt.pyRH�s:		


cCstj|t�S(sXConvert a long option name to a valid Python identifier by
    changing "-" to "_".
    (RRR(R"((s./usr/lib64/python2.7/distutils/fancy_getopt.pyttranslate_longopt�sR8cBseZdZgd�ZRS(s_Dummy class just used as a place to hold command-line option
    values as instance attributes.cCs%x|D]}t||d�qWdS(skCreate a new OptionDummy instance.  The attributes listed in
        'options' will be initialized to None.N(R=R-(RR\R"((s./usr/lib64/python2.7/distutils/fancy_getopt.pyR�s
(RYRZR[R(((s./usr/lib64/python2.7/distutils/fancy_getopt.pyR8�s(R[t__revision__R6RRcR:tdistutils.errorsRRtlongopt_pattcompileR/tneg_alias_ret	maketransRRR_t
whitespaceR)RbRHRjR8(((s./usr/lib64/python2.7/distutils/fancy_getopt.pyt<module>	s"�r	"	;	PKW[5㑂�dir_util.pycnu�[����
{fc@s�dZdZddlZddlZddlmZmZddlmZia	dddd	�Z
dddd
�Zddddddd�Zd�Z
ddd
�Zd�ZdS(sWdistutils.dir_util

Utility functions for manipulating directories and directory trees.s$Id$i����N(tDistutilsFileErrortDistutilsInternalError(tlogi�iicCs�t|t�s"td|f�ntjj|�}g}tjj|�sX|dkr\|Stjtjj	|��r{|Stjj
|�\}}|g}xK|r�|r�tjj|�r�tjj
|�\}}|jd|�q�Wx�|D]�}tjj||�}tjj	|�}	tj|	�r3q�n|dkrRt
jd|�n|s�ytj||�WnWtk
r�}
|
jtjko�tjj|�s�td||
jdf��q�nX|j|�ndt|	<q�W|S(s�Create a directory and any missing ancestor directories.

    If the directory already exists (or if 'name' is the empty string, which
    means the current directory, which of course exists), then do nothing.
    Raise DistutilsFileError if unable to create some directory along the way
    (eg. some sub-path exists, but is a file rather than a directory).
    If 'verbose' is true, print a one-line summary of each mkdir to stdout.
    Return the list of directories actually created.
    s(mkpath: 'name' must be a string (got %r)tiiscreating %sscould not create '%s': %si����(t
isinstancet
basestringRtostpathtnormpathtisdirt
_path_createdtgettabspathtsplittinserttjoinRtinfotmkdirtOSErrorterrnotEEXISTRtargstappend(tnametmodetverbosetdry_runtcreated_dirstheadttailttailstdtabs_headtexc((s*/usr/lib64/python2.7/distutils/dir_util.pytmkpaths>	"
$!c	Cs�i}x3|D]+}d|tjj|tjj|��<q
W|j�}|j�x'|D]}t||d|d|�qYWdS(s�Create all the empty directories under 'base_dir' needed to put 'files'
    there.

    'base_dir' is just the name of a directory which doesn't necessarily
    exist yet; 'files' is a list of filenames to be interpreted relative to
    'base_dir'.  'base_dir' + the directory portion of every file in 'files'
    will be created if it doesn't already exist.  'mode', 'verbose' and
    'dry_run' flags are as for 'mkpath()'.
    iRRN(RRRtdirnametkeystsortR"(	tbase_dirtfilesRRRtneed_dirtfilet	need_dirstdir((s*/usr/lib64/python2.7/distutils/dir_util.pytcreate_treeRs
)

c
Cs�ddlm}|r:tjj|�r:td|�nytj|�}	Wn>tjk
r�\}
}|rwg}	q�td||f�nX|s�t|d|�ng}x1|	D])}
tjj	||
�}tjj	||
�}|
j
d�r�q�n|rktjj|�rktj|�}|dkrBt
jd||�n|s[tj||�n|j|�q�tjj|�r�|jt||||||d|d	|��q�||||||d|d	|�|j|�q�W|S(
sCopy an entire directory tree 'src' to a new location 'dst'.

    Both 'src' and 'dst' must be directory names.  If 'src' is not a
    directory, raise DistutilsFileError.  If 'dst' does not exist, it is
    created with 'mkpath()'.  The end result of the copy is that every
    file in 'src' is copied to 'dst', and directories under 'src' are
    recursively copied to 'dst'.  Return the list of files that were
    copied or might have been copied, using their output name.  The
    return value is unaffected by 'update' or 'dry_run': it is simply
    the list of all files under 'src', with the names changed to be
    under 'dst'.

    'preserve_mode' and 'preserve_times' are the same as for
    'copy_file'; note that they only apply to regular files, not to
    directories.  If 'preserve_symlinks' is true, symlinks will be
    copied as symlinks (on platforms that support them!); otherwise
    (the default), the destination of the symlink will be copied.
    'update' and 'verbose' are the same as for 'copy_file'.
    i����(t	copy_files&cannot copy tree '%s': not a directoryserror listing files in '%s': %sRs.nfsislinking %s -> %sR(tdistutils.file_utilR-RRR	RtlistdirterrorR"Rt
startswithtislinktreadlinkRRtsymlinkRtextendt	copy_tree(tsrctdstt
preserve_modetpreserve_timestpreserve_symlinkstupdateRRR-tnamesRterrstrtoutputstntsrc_nametdst_namet	link_dest((s*/usr/lib64/python2.7/distutils/dir_util.pyR6gsH
	
cCs�xwtj|�D]f}tjj||�}tjj|�r`tjj|�r`t||�q|jtj|f�qW|jtj	|f�dS(sHelper for remove_tree().N(
RR/RRR	R2t_build_cmdtupleRtremovetrmdir(Rt	cmdtuplestftreal_f((s*/usr/lib64/python2.7/distutils/dir_util.pyRD�s%cCs�|dkrtjd|�n|r)dSg}t||�x|D]w}yB|d|d�tjj|d�}|tkr�t|=nWqCttfk
r�}tj	d||�qCXqCWdS(s�Recursively remove an entire directory tree.

    Any errors are ignored (apart from being reported to stdout if 'verbose'
    is true).
    is'removing '%s' (and everything under it)Niserror removing %s: %s(
RRRDRRRR
tIOErrorRtwarn(t	directoryRRRGtcmdRR!((s*/usr/lib64/python2.7/distutils/dir_util.pytremove_tree�s

cCsCtjj|�\}}|dd!tjkr?||d}n|S(s�Take the full path 'path', and make it a relative path.

    This is useful to make 'path' the second argument to os.path.join().
    ii(RRt
splitdrivetsep(Rtdrive((s*/usr/lib64/python2.7/distutils/dir_util.pytensure_relative�s(t__doc__t__revision__RRtdistutils.errorsRRt	distutilsRR
R"R,R6RDRNRR(((s*/usr/lib64/python2.7/distutils/dir_util.pyt<module>s?D	
PKW[��p���versionpredicate.pycnu�[����
{fc@s�dZddlZddlZddlZejd�Zejd�Zejd�Zd�Z	iej
d6ejd6ejd	6ej
d
6ejd6ejd6Zd
dd��YZdad�ZdS(sBModule for parsing and testing package version predicate strings.
i����Ns'(?i)^\s*([a-z_]\w*(?:\.[a-z_]\w*)*)(.*)s^\s*\((.*)\)\s*$s%^\s*(<=|>=|<|>|!=|==)\s*([^\s,]+)\s*$cCsPtj|�}|s(td|��n|j�\}}|tjj|�fS(sVParse a single version comparison.

    Return (comparison string, StrictVersion)
    s"bad package restriction syntax: %r(tre_splitComparisontmatcht
ValueErrortgroupst	distutilstversiont
StrictVersion(tpredtrestcomptverStr((s2/usr/lib64/python2.7/distutils/versionpredicate.pytsplitUps
t<s<=s==t>s>=s!=tVersionPredicatecBs)eZdZd�Zd�Zd�ZRS(s�Parse and test package version predicates.

    >>> v = VersionPredicate('pyepat.abc (>1.0, <3333.3a1, !=1555.1b3)')

    The `name` attribute provides the full dotted name that is given::

    >>> v.name
    'pyepat.abc'

    The str() of a `VersionPredicate` provides a normalized
    human-readable version of the expression::

    >>> print v
    pyepat.abc (> 1.0, < 3333.3a1, != 1555.1b3)

    The `satisfied_by()` method can be used to determine with a given
    version number is included in the set described by the version
    restrictions::

    >>> v.satisfied_by('1.1')
    True
    >>> v.satisfied_by('1.4')
    True
    >>> v.satisfied_by('1.0')
    False
    >>> v.satisfied_by('4444.4')
    False
    >>> v.satisfied_by('1555.1b3')
    False

    `VersionPredicate` is flexible in accepting extra whitespace::

    >>> v = VersionPredicate(' pat( ==  0.1  )  ')
    >>> v.name
    'pat'
    >>> v.satisfied_by('0.1')
    True
    >>> v.satisfied_by('0.2')
    False

    If any version numbers passed in do not conform to the
    restrictions of `StrictVersion`, a `ValueError` is raised::

    >>> v = VersionPredicate('p1.p2.p3.p4(>=1.0, <=1.3a1, !=1.2zb3)')
    Traceback (most recent call last):
      ...
    ValueError: invalid version number '1.2zb3'

    It the module or package name given does not conform to what's
    allowed as a legal module or package name, `ValueError` is
    raised::

    >>> v = VersionPredicate('foo-bar')
    Traceback (most recent call last):
      ...
    ValueError: expected parenthesized list: '-bar'

    >>> v = VersionPredicate('foo bar (12.21)')
    Traceback (most recent call last):
      ...
    ValueError: expected parenthesized list: 'bar (12.21)'

    cCs�|j�}|s!td��ntj|�}|sItd|��n|j�\|_}|j�}|r�tj|�}|s�td|��n|j�d}g|jd�D]}t|�^q�|_	|j	s�td|��q�n	g|_	dS(s*Parse a version predicate string.
        sempty package restrictionsbad package name in %rsexpected parenthesized list: %rit,sempty parenthesized list in %rN(
tstripRtre_validPackageRRtnametre_parentsplitRR(tselftversionPredicateStrRtparentstrtaPred((s2/usr/lib64/python2.7/distutils/versionpredicate.pyt__init___s$+	cCs`|jrUg|jD] \}}|dt|�^q}|jddj|�dS|jSdS(Nt s (s, t)(RRRtjoin(Rtcondtvertseq((s2/usr/lib64/python2.7/distutils/versionpredicate.pyt__str__zs	0cCs5x.|jD]#\}}t|||�s
tSq
WtS(s�True if version is compatible with all the predicates in self.
        The parameter version must be acceptable to the StrictVersion
        constructor.  It may be either a string or StrictVersion.
        (RtcompmaptFalsetTrue(RRRR((s2/usr/lib64/python2.7/distutils/versionpredicate.pytsatisfied_by�s(t__name__t
__module__t__doc__RR!R%(((s2/usr/lib64/python2.7/distutils/versionpredicate.pyRs?		cCs�tdkrtjd�an|j�}tj|�}|sRtd|��n|jd�pdd}|r�tj	j
|�}n|jd�|fS(s9Return the name and optional version number of a provision.

    The version number, if given, will be returned as a `StrictVersion`
    instance, otherwise it will be `None`.

    >>> split_provision('mypkg')
    ('mypkg', None)
    >>> split_provision(' mypkg( 1.2 ) ')
    ('mypkg', StrictVersion ('1.2'))
    s=([a-zA-Z_]\w*(?:\.[a-zA-Z_]\w*)*)(?:\s*\(\s*([^)\s]+)\s*\))?$s"illegal provides specification: %riiN(t
_provision_rxtNonetretcompileRRRtgroupRRR(tvaluetmR((s2/usr/lib64/python2.7/distutils/versionpredicate.pytsplit_provision�s((R(R+tdistutils.versionRtoperatorR,RRRRtlttleteqtgttgetneR"RR*R)R0(((s2/usr/lib64/python2.7/distutils/versionpredicate.pyt<module>s	!!nPKW[;�(�2828util.pyonu�[����
{fc@s1dZdZddlZddlZddlZddlZddlmZddlm	Z	ddl
mZddlm
Z
ddlmZd	�Zd
�Zd�Zdad
�Zd�Zdd�Zdaaad�Zd�Zdddd�Zd�Zdddddddd�Zd�ZdS(sudistutils.util

Miscellaneous utility functions -- anything that doesn't fit into
one of the other *util.py modules.
s$Id$i����N(tDistutilsPlatformError(tnewer(tspawn(tlog(tDistutilsByteCompileErrorcCs�tjdkr�d}tjtj|�}|dkr=tjStjtjd|�}tj|t|�|!j�}|dkr�dS|dkr�dStjSd	tj	kr�tj	d	Stjd
ks�t
td�r�tjStj�\}}}}}tj|�}tj|dd
�}tj|dd�}tj|dd�}|d dkrcd||fS|d dkr�|ddkr�d}dt
|d�d|df}idd6dd6}	|d|	tj7}q�n�|d  d!kr�d||fS|d d"krd#|||fS|d$ d%kred%}tjd&�}
|
j|�}|r�|j�}q�nU|d$ d'kr�dd(l}dd(l}
|j|
jj�|||�\}}}nd)|||fS(*s�Return a string that identifies the current platform.  This is used
    mainly to distinguish platform-specific build directories and
    platform-specific built distributions.  Typically includes the OS name
    and version and the architecture (as supplied by 'os.uname()'),
    although the exact information included depends on the OS; eg. for IRIX
    the architecture isn't particularly important (IRIX only runs on SGI
    hardware), but for Linux the kernel version isn't particularly
    important.

    Examples of returned values:
       linux-i586
       linux-alpha (?)
       solaris-2.6-sun4u
       irix-5.3
       irix64-6.2

    Windows will return one of:
       win-amd64 (64bit Windows on AMD64 (aka x86_64, Intel64, EM64T, etc)
       win-ia64 (64bit Windows on Itanium)
       win32 (all others - specifically, sys.platform is returned)

    For other non-POSIX platforms, currently just returns 'sys.platform'.
    tnts bit (i����t)tamd64s	win-amd64titaniumswin-ia64t_PYTHON_HOST_PLATFORMtposixtunamet/tt t_t-itlinuxs%s-%stsunosit5tsolariss%d.%siit32biti���t64bitI�������s.%sitirixtaixs%s-%s.%sitcygwins[\d.]+tdarwinNs%s-%s-%s(tostnametstringtfindtsystversiontplatformtlentlowertenvironthasattrRtreplacetinttmaxinttretcompiletmatchtgroupt_osx_supporttdistutils.sysconfigtget_platform_osxt	sysconfigtget_config_vars(tprefixtitjtlooktosnamethosttreleaseR tmachinetbitnesstrel_retmR-t	distutils((s&/usr/lib64/python2.7/distutils/util.pytget_platformsZ "cCs�tjdkr|S|s|S|ddkr=td|�n|ddkr]td|�ntj|d�}xd|kr�|jd�qrW|s�tjStjj|�S(s�Return 'pathname' as a name that will work on the native filesystem,
    i.e. split it on '/' and put it back together again using the current
    directory separator.  Needed because filenames in the setup script are
    always supplied in Unix style, and have to be converted to the local
    convention before we can actually use them in the filesystem.  Raises
    ValueError on non-Unix-ish systems if 'pathname' either starts or
    ends with a slash.
    Rispath '%s' cannot be absolutei����spath '%s' cannot end with '/'t.(	Rtsept
ValueErrorRtsplittremovetcurdirtpathtjoin(tpathnametpaths((s&/usr/lib64/python2.7/distutils/util.pytconvert_pathns	cCstjdkrNtjj|�s4tjj||�Stjj||d�Sn�tjdkr�tjj|�\}}|ddkr�|d}ntjj||�Stjdkr�tjj|�\}}|dtjkr�|d}ntjj||�Stdtj�dS(	s	Return 'pathname' with 'new_root' prepended.  If 'pathname' is
    relative, this is equivalent to "os.path.join(new_root,pathname)".
    Otherwise, it requires making 'pathname' relative and then joining the
    two, which is tricky on DOS/Windows and Mac OS.
    R
iRis\tos2s!nothing known about platform '%s'N(RRREtisabsRFt
splitdriveR@R(tnew_rootRGtdriveRE((s&/usr/lib64/python2.7/distutils/util.pytchange_root�s 

icCs�tr
dStjdkrudtjkruy0ddl}|jtj��dtjd<Wquttfk
rqquXndtjkr�t	�tjd<ndadS(sLEnsure that 'os.environ' has all the environment variables we
    guarantee that users can use in config files, command-line options,
    etc.  Currently this includes:
      HOME - user's home directory (Unix only)
      PLAT - description of the current platform, including hardware
             and OS (see 'get_platform()')
    NR
tHOMEi����itPLATi(
t_environ_checkedRRR$tpwdtgetpwuidtgetuidtImportErrortKeyErrorR>(RS((s&/usr/lib64/python2.7/distutils/util.pyt
check_environ�s	$cCsQt�|d�}ytjd||�SWn tk
rL}td|�nXdS(s�Perform shell/Perl-style variable substitution on 'string'.  Every
    occurrence of '$' followed by a name is considered a variable, and
    variable is substituted by the value found in the 'local_vars'
    dictionary, or in 'os.environ' if it's not in 'local_vars'.
    'os.environ' is first checked/augmented to guarantee that it contains
    certain values: see 'check_environ()'.  Raise ValueError for any
    variables not found in either 'local_vars' or 'os.environ'.
    cSs8|jd�}||kr)t||�Stj|SdS(Ni(R,tstrRR$(R+t
local_varstvar_name((s&/usr/lib64/python2.7/distutils/util.pyt_subst�ss\$([a-zA-Z_][a-zA-Z_0-9]*)sinvalid variable '$%s'N(RXR)tsubRWRA(tsRZR\tvar((s&/usr/lib64/python2.7/distutils/util.pyt
subst_vars�s	serror: cCs|t|�S(N(RY(texcR2((s&/usr/lib64/python2.7/distutils/util.pytgrok_environment_error�scCs8tjdtj�atjd�atjd�adS(Ns
[^\\\'\"%s ]*s'(?:[^'\\]|\\.)*'s"(?:[^"\\]|\\.)*"(R)R*Rt
whitespacet
_wordchars_ret
_squote_ret
_dquote_re(((s&/usr/lib64/python2.7/distutils/util.pyt_init_regex�scCs�td	krt�ntj|�}g}d}x�|r�tj||�}|j�}|t|�kr|j|| �Pn||tj	kr�|j|| �tj
||�}d}n�||dkr�|| ||d}|d}n�||dkrtj||�}n6||dkr<tj||�}nt
d||�|d	krmtd||�n|j�\}}|| ||d|d!||}|j�d}|t|�kr4|j|�Pq4q4W|S(
sSplit a string up according to Unix shell-like rules for quotes and
    backslashes.  In short: words are delimited by spaces, as long as those
    spaces are not escaped by a backslash, or inside a quoted string.
    Single and double quotes are equivalent, and the quote characters can
    be backslash-escaped.  The backslash is stripped from any two-character
    escape sequence, leaving only the escaped character.  The quote
    characters are stripped from any quoted string.  Returns a list of
    words.
    is\it't"s!this can't happen (bad char '%c')s"bad string (mismatched %s quotes?)iN(RdtNoneRgRtstripR+tendR"tappendRctlstripReRftRuntimeErrorRAtspan(R^twordstposR<Rltbeg((s&/usr/lib64/python2.7/distutils/util.pytsplit_quoted�sD
		
%
cCsj|dkrFd|j|f}|ddkrF|dd!d}qFntj|�|sf||�ndS(s�Perform some action that affects the outside world (eg.  by
    writing to the filesystem).  Such actions are special because they
    are disabled by the 'dry_run' flag.  This method takes care of all
    that bureaucracy for you; all you have to do is supply the
    function to call and an argument tuple for it (to embody the
    "external action" being performed), and an optional message to
    print.
    s%s%ri����s,)iRN(Rjt__name__Rtinfo(tfunctargstmsgtverbosetdry_run((s&/usr/lib64/python2.7/distutils/util.pytexecute*s	
cCsCtj|�}|dkrdS|dkr/dStd|f�dS(s�Convert a string representation of truth to true (1) or false (0).

    True values are 'y', 'yes', 't', 'true', 'on', and '1'; false values
    are 'n', 'no', 'f', 'false', 'off', and '0'.  Raises ValueError if
    'val' is anything else.
    tytyesttttruetont1itntnotftfalsetofft0isinvalid truth value %rN(R}R~RR�R�R�(R�R�R�R�R�R�(RR#RA(tval((s&/usr/lib64/python2.7/distutils/util.pyt	strtobool=sicCs�tjrtd��n|dkr9to3|dk}n|s�y&ddlm}|d�\}	}
Wn4tk
r�ddlm}d|d�}	}
nXt	j
d|
�|sB|	dk	r�tj|	d�}nt
|
d�}|jd	�|jtjtt|�d
�d�|jd|||||f�|j�ntj|
g}
|d
krp|
jd
d�n|dkr�|
jd
d�nt|
d|�ttj|
fd|
d|�n(ddlm}x|D]
}|ddkr�q�n|trdpd}|}|rV|t|� |krCtd||f�n|t|�}n|rttjj||�}ntjj|�}|r�|s�t||�r�t	j
d||�|s�||||�q�q�t	j d||�q�q�WdS(s�Byte-compile a collection of Python source files to either .pyc
    or .pyo files in the same directory.  'py_files' is a list of files
    to compile; any files that don't end in ".py" are silently skipped.
    'optimize' must be one of the following:
      0 - don't optimize (generate .pyc)
      1 - normal optimization (like "python -O")
      2 - extra optimization (like "python -OO")
    If 'force' is true, all files are recompiled regardless of
    timestamps.

    The source filename encoded in each bytecode file defaults to the
    filenames listed in 'py_files'; you can modify these with 'prefix' and
    'basedir'.  'prefix' is a string that will be stripped off of each
    source filename, and 'base_dir' is a directory name that will be
    prepended (after 'prefix' is stripped).  You can supply either or both
    (or neither) of 'prefix' and 'base_dir', as you wish.

    If 'dry_run' is true, doesn't actually do anything that would
    affect the filesystem.

    Byte-compilation is either done directly in this interpreter process
    with the standard py_compile module, or indirectly by writing a
    temporary script and executing it.  Normally, you should let
    'byte_compile()' figure out to use direct compilation or not (see
    the source for details).  The 'direct' flag is used by the script
    generated in indirect mode; unless you know what you're doing, leave
    it set to None.
    sbyte-compiling is disabled.ii����(tmkstemps.py(tmktemps$writing byte-compilation script '%s'tws2from distutils.util import byte_compile
files = [
s,
s]
s�
byte_compile(files, optimize=%r, force=%r,
             prefix=%r, base_dir=%r,
             verbose=%r, dry_run=0,
             direct=1)
is-Ois-OOR{sremoving %s(R*i����tctos1invalid prefix: filename %r doesn't start with %rsbyte-compiling %s to %ss%skipping byte-compilation of %s to %sN(!Rtdont_write_bytecodeRRjt	__debug__ttempfileR�RVR�RRvRtfdopentopentwriteRRFtmaptreprtcloset
executabletinsertRR|RCt
py_compileR*R"RAREtbasenameRtdebug(tpy_filestoptimizetforceR2tbase_dirRzR{tdirectR�t	script_fdtscript_nameR�tscripttcmdR*tfiletcfiletdfilet
cfile_base((s&/usr/lib64/python2.7/distutils/util.pytbyte_compileMsh"	
&


	cCs,tj|d�}tj|dd�}|S(s�Return a version of the string escaped for inclusion in an
    RFC-822 header, by ensuring there are 8 spaces space after each newline.
    s
iRs        (RRBRF(theadertlines((s&/usr/lib64/python2.7/distutils/util.pyt
rfc822_escape�s( t__doc__t__revision__RRRR)tdistutils.errorsRtdistutils.dep_utilRtdistutils.spawnRR=RRR>RIRORRRXR`RbRjRdReRfRgRtR|R�R�R�(((s&/usr/lib64/python2.7/distutils/util.pyt<module>s00	^						?	�PKW[�!Q�
�

config.pycnu�[����
{fc@sRdZddlZddlmZddlmZdZdefd��YZdS(s�distutils.pypirc

Provides the PyPIRCCommand class, the base class for the command classes
that uses .pypirc in the distutils.command package.
i����N(tConfigParser(tCommandsE[distutils]
index-servers =
    pypi

[pypi]
username:%s
password:%s
t
PyPIRCCommandcBsueZdZdZdZd
Zd
ZdddefdgZdgZ	d�Z
d	�Zd
�Zd�Z
d�ZRS(s;Base command that knows how to handle the .pypirc file
    shttps://upload.pypi.org/legacy/tpypisrepository=trsurl of repository [default: %s]s
show-responses&display full response text from servercCstjjtjjd�d�S(sReturns rc file path.t~s.pypirc(tostpathtjoint
expanduser(tself((s(/usr/lib64/python2.7/distutils/config.pyt_get_rc_file&scCsd|j�}tjtj|tjtjBd�d�}z|jt||f�Wd|j�XdS(sCreates a default .pypirc file.i�twN(	RRtfdopentopentO_CREATtO_WRONLYtwritetDEFAULT_PYPIRCtclose(R
tusernametpasswordtrctf((s(/usr/lib64/python2.7/distutils/config.pyt
_store_pypirc*s
+cCs3|j�}tjj|�r/|jd|�|jp>|j}t�}|j|�|j	�}d|kr�|j
dd�}g|jd�D]$}|j�dkr�|j�^q�}|gkr�d|kr�dg}q�iSnxC|D]�}i|d6}|j
|d�|d<xdd	|jfd
|j
fdfD]A\}	}
|j||	�ro|j
||	�||	<q8|
||	<q8W|d|ks�|d	|kr�|Sq�Wq/d|kr/d}|j|d	�r�|j
|d	�}n	|j}i|j
|d�d6|j
|d�d6|d	6|d6|j
d
6SniS(sReads the .pypirc file.sUsing PyPI login from %st	distutilss
index-serverss
tRtserverRt
repositorytrealmRsserver-loginN(RN(RRRtexiststannounceRtDEFAULT_REPOSITORYRtreadtsectionstgettsplittstript
DEFAULT_REALMtNonet
has_option(R
RRtconfigR"t
index_serversRt_serverstcurrenttkeytdefault((s(/usr/lib64/python2.7/distutils/config.pyt_read_pypirc3sP	
$

		cCsd|_d|_d|_dS(sInitialize options.iN(R'RRt
show_response(R
((s(/usr/lib64/python2.7/distutils/config.pytinitialize_optionsis		cCs@|jdkr|j|_n|jdkr<|j|_ndS(sFinalizes options.N(RR'R RR&(R
((s(/usr/lib64/python2.7/distutils/config.pytfinalize_optionsosN(s
show-responseNs&display full response text from server(t__name__t
__module__t__doc__R R&R'RRtuser_optionstboolean_optionsRRR/R1R2(((s(/usr/lib64/python2.7/distutils/config.pyRs 						6	(R5RRt
distutils.cmdRRR(((s(/usr/lib64/python2.7/distutils/config.pyt<module>s

PKW[�R��
�
log.pycnu�[����
{fc@s�dZdZdZdZdZdZddlZddd	��YZe�Zej	Z	ej
Z
ejZejZej
Z
ejZd
�Zd�ZdS(
s,A simple log mechanism styled after PEP 282.iiiiii����NtLogcBsSeZed�Zd�Zd�Zd�Zd�Zd�Zd�Z	d�Z
RS(cCs
||_dS(N(t	threshold(tselfR((s%/usr/lib64/python2.7/distutils/log.pyt__init__scCs�|tttttfkr4tdt|���n||jkr�|rV||}n|tttfkrwtj	}n	tj
}|jd|�|j�ndS(Ns%s wrong log levels%s
(
tDEBUGtINFOtWARNtERRORtFATALt
ValueErrortstrRtsyststderrtstdouttwritetflush(Rtleveltmsgtargststream((s%/usr/lib64/python2.7/distutils/log.pyt_logs
	cGs|j|||�dS(N(R(RRRR((s%/usr/lib64/python2.7/distutils/log.pytlog!scGs|jt||�dS(N(RR(RRR((s%/usr/lib64/python2.7/distutils/log.pytdebug$scGs|jt||�dS(N(RR(RRR((s%/usr/lib64/python2.7/distutils/log.pytinfo'scGs|jt||�dS(N(RR(RRR((s%/usr/lib64/python2.7/distutils/log.pytwarn*scGs|jt||�dS(N(RR(RRR((s%/usr/lib64/python2.7/distutils/log.pyterror-scGs|jt||�dS(N(RR(RRR((s%/usr/lib64/python2.7/distutils/log.pytfatal0s(t__name__t
__module__RRRRRRRRR(((s%/usr/lib64/python2.7/distutils/log.pyRs						cCstj}|t_|S(N(t_global_logR(Rtold((s%/usr/lib64/python2.7/distutils/log.pyt
set_threshold;s		cCsO|dkrtt�n2|dkr2tt�n|dkrKtt�ndS(Niii(RRRR(tv((s%/usr/lib64/python2.7/distutils/log.pyt
set_verbosityAs

((t__doc__RRRRRRRRRRRRRRRR!(((s%/usr/lib64/python2.7/distutils/log.pyt<module>s %								PKW[#��˱�archive_util.pycnu�[����
{fc@s�dZdZddlZddlmZddlZddlmZddlm	Z	ddl
mZddlm
Z
ydd	lmZWnek
r�dZnXydd
lmZWnek
r�dZnXd�Zd�Zd
ddddd�Zddd�Ziedgdfd6ed gdfd6ed!gdfd6ed"gdfd6egdfd6Zd�Zddddddd�ZdS(#sodistutils.archive_util

Utility functions for creating archive files (tarballs, zip files,
that sort of thing).s$Id$i����N(twarn(tDistutilsExecError(tspawn(tmkpath(tlog(tgetpwnam(tgetgrnamcCs^tdks|dkrdSyt|�}Wntk
rEd}nX|dk	rZ|dSdS(s"Returns a gid, given a group name.iN(RtNonetKeyError(tnametresult((s./usr/lib64/python2.7/distutils/archive_util.pyt_get_gids

cCs^tdks|dkrdSyt|�}Wntk
rEd}nX|dk	rZ|dSdS(s"Returns an uid, given a user name.iN(RRR(R	R
((s./usr/lib64/python2.7/distutils/archive_util.pyt_get_uid's

tgzipics�idd6dd6dd6dd6}idd6dd6d	d6}|dk	rg||j�krgtd
�n|d}	|dkr�|	|j|d�7}	nttjj|	�d|�d
dl}
t	j
d�t���t�������fd�}|sC|
j
|	d||�}z|j|d|�Wd|j�Xn|dkr�tdt�|	||}
tjdkr�||	|
g}n|d|	g}t|d|�|
S|	S(s-Create a (possibly compressed) tar file from all the files under
    'base_dir'.

    'compress' must be "gzip" (the default), "compress", "bzip2", or None.
    (compress will be deprecated in Python 3.2)

    'owner' and 'group' can be used to define an owner and a group for the
    archive that is being built. If not provided, the current owner and group
    will be used.

    The output tar file will be named 'base_dir' +  ".tar", possibly plus
    the appropriate compression extension (".gz", ".bz2" or ".Z").

    Returns the output filename.
    tgzR
tbz2tbzip2ttcompresss.gzs.bz2s.ZsEbad value for 'compress': must be None, 'gzip', 'bzip2' or 'compress's.tartdry_runi����NsCreating tar archivecsF�dk	r!�|_�|_n�dk	rB�|_�|_n|S(N(Rtgidtgnametuidtuname(ttarinfo(RtgrouptownerR(s./usr/lib64/python2.7/distutils/archive_util.pyt_set_uid_gid[s		sw|%stfilters'compress' will be deprecated.twin32s-f(Rtkeyst
ValueErrortgetRtostpathtdirnamettarfileRtinfoRRtopentaddtcloseRtPendingDeprecationWarningtsystplatformR(t	base_nametbase_dirRtverboseRRRttar_compressiontcompress_exttarchive_nameR$Rttartcompressed_nametcmd((RRRRs./usr/lib64/python2.7/distutils/archive_util.pytmake_tarball3s8"	

	
c
Cs-yddl}Wntk
r)d}nX|d}ttjj|�d|�|dkr�|rkd}nd}y td|||gd|�Wq)tk
r�td|�q)Xntt	j
d	||�|s)|j|d
d|j�}|tj
kr<tjjtjj|d��}|j||�t	j
d
|�nx�tj|�D]�\}	}
}xR|
D]J}tjjtjj|	|d��}|j||�t	j
d
|�qbWxe|D]]}tjjtjj|	|��}tjj|�r�|j||�t	j
d
|�q�q�WqLW|j�n|S(svCreate a zip file from all the files under 'base_dir'.

    The output zip file will be named 'base_name' + ".zip".  Uses either the
    "zipfile" Python module (if available) or the InfoZIP "zip" utility
    (if installed and found on the default search path).  If neither tool is
    available, raises DistutilsExecError.  Returns the name of the output zip
    file.
    i����Ns.zipRs-rs-rqtzipskunable to create zip file '%s': could neither import the 'zipfile' module nor find a standalone zip utilitys#creating '%s' and adding '%s' to ittwtcompressionRsadding '%s'(tzipfiletImportErrorRRR!R"R#RRRR%tZipFiletZIP_DEFLATEDtcurdirtnormpathtjointwritetwalktisfileR((
R,R-R.RR9tzip_filenamet
zipoptionsR6R"tdirpathtdirnamest	filenamesR	((s./usr/lib64/python2.7/distutils/archive_util.pytmake_zipfileysL	


	
	
!
$
!
Rsgzip'ed tar-filetgztarRsbzip2'ed tar-filetbztarscompressed tar filetztarsuncompressed tar fileR2sZIP fileR6cCs%x|D]}|tkr|SqWdS(sqReturns the first format from the 'format' list that is unknown.

    If all formats are known, returns None
    N(tARCHIVE_FORMATSR(tformatstformat((s./usr/lib64/python2.7/distutils/archive_util.pytcheck_archive_formats�s
cCsCtj�}|d	k	rStjd|�tjj|�}|sStj|�qSn|d	krktj}ni|d6}	yt	|}
Wnt
k
r�td|�nX|
d}x"|
dD]\}}
|
|	|<q�W|dkr�||	d<||	d<nz||||	�}Wd	|d	k	r>tjd
|�tj|�nX|S(s�Create an archive file (eg. zip or tar).

    'base_name' is the name of the file to create, minus any format-specific
    extension; 'format' is the archive format: one of "zip", "tar", "ztar",
    or "gztar".

    'root_dir' is a directory that will be the root directory of the
    archive; ie. we typically chdir into 'root_dir' before creating the
    archive.  'base_dir' is the directory where we start archiving from;
    ie. 'base_dir' will be the common prefix of all files and
    directories in the archive.  'root_dir' and 'base_dir' both default
    to the current directory.  Returns the name of the archive file.

    'owner' and 'group' are used when creating a tar archive. By default,
    uses the current owner and group.
    schanging into '%s'Rsunknown archive format '%s'iiR6RRNschanging back to '%s'(R!tgetcwdRRtdebugR"tabspathtchdirR=RLRR(R,RNtroot_dirR-R.RRRtsave_cwdtkwargstformat_infotfunctargtvaltfilename((s./usr/lib64/python2.7/distutils/archive_util.pytmake_archive�s2




(RR
(RR(RR(RN(t__doc__t__revision__R!twarningsRR*tdistutils.errorsRtdistutils.spawnRtdistutils.dir_utilRt	distutilsRtpwdRR:RtgrpRRRR5RHRLROR\(((s./usr/lib64/python2.7/distutils/archive_util.pyt<module>s<



			E>	
	PKW[���k�.�.emxccompiler.pynu�[���"""distutils.emxccompiler

Provides the EMXCCompiler class, a subclass of UnixCCompiler that
handles the EMX port of the GNU C compiler to OS/2.
"""

# issues:
#
# * OS/2 insists that DLLs can have names no longer than 8 characters
#   We put export_symbols in a def-file, as though the DLL can have
#   an arbitrary length name, but truncate the output filename.
#
# * only use OMF objects and use LINK386 as the linker (-Zomf)
#
# * always build for multithreading (-Zmt) as the accompanying OS/2 port
#   of Python is only distributed with threads enabled.
#
# tested configurations:
#
# * EMX gcc 2.81/EMX 0.9d fix03

__revision__ = "$Id$"

import os,sys,copy
from distutils.ccompiler import gen_preprocess_options, gen_lib_options
from distutils.unixccompiler import UnixCCompiler
from distutils.file_util import write_file
from distutils.errors import DistutilsExecError, CompileError, UnknownFileError
from distutils import log

class EMXCCompiler (UnixCCompiler):

    compiler_type = 'emx'
    obj_extension = ".obj"
    static_lib_extension = ".lib"
    shared_lib_extension = ".dll"
    static_lib_format = "%s%s"
    shared_lib_format = "%s%s"
    res_extension = ".res"      # compiled resource file
    exe_extension = ".exe"

    def __init__ (self,
                  verbose=0,
                  dry_run=0,
                  force=0):

        UnixCCompiler.__init__ (self, verbose, dry_run, force)

        (status, details) = check_config_h()
        self.debug_print("Python's GCC status: %s (details: %s)" %
                         (status, details))
        if status is not CONFIG_H_OK:
            self.warn(
                "Python's pyconfig.h doesn't seem to support your compiler.  " +
                ("Reason: %s." % details) +
                "Compiling may fail because of undefined preprocessor macros.")

        (self.gcc_version, self.ld_version) = \
            get_versions()
        self.debug_print(self.compiler_type + ": gcc %s, ld %s\n" %
                         (self.gcc_version,
                          self.ld_version) )

        # Hard-code GCC because that's what this is all about.
        # XXX optimization, warnings etc. should be customizable.
        self.set_executables(compiler='gcc -Zomf -Zmt -O3 -fomit-frame-pointer -mprobe -Wall',
                             compiler_so='gcc -Zomf -Zmt -O3 -fomit-frame-pointer -mprobe -Wall',
                             linker_exe='gcc -Zomf -Zmt -Zcrtdll',
                             linker_so='gcc -Zomf -Zmt -Zcrtdll -Zdll')

        # want the gcc library statically linked (so that we don't have
        # to distribute a version dependent on the compiler we have)
        self.dll_libraries=["gcc"]

    # __init__ ()

    def _compile(self, obj, src, ext, cc_args, extra_postargs, pp_opts):
        if ext == '.rc':
            # gcc requires '.rc' compiled to binary ('.res') files !!!
            try:
                self.spawn(["rc", "-r", src])
            except DistutilsExecError, msg:
                raise CompileError, msg
        else: # for other files use the C-compiler
            try:
                self.spawn(self.compiler_so + cc_args + [src, '-o', obj] +
                           extra_postargs)
            except DistutilsExecError, msg:
                raise CompileError, msg

    def link (self,
              target_desc,
              objects,
              output_filename,
              output_dir=None,
              libraries=None,
              library_dirs=None,
              runtime_library_dirs=None,
              export_symbols=None,
              debug=0,
              extra_preargs=None,
              extra_postargs=None,
              build_temp=None,
              target_lang=None):

        # use separate copies, so we can modify the lists
        extra_preargs = copy.copy(extra_preargs or [])
        libraries = copy.copy(libraries or [])
        objects = copy.copy(objects or [])

        # Additional libraries
        libraries.extend(self.dll_libraries)

        # handle export symbols by creating a def-file
        # with executables this only works with gcc/ld as linker
        if ((export_symbols is not None) and
            (target_desc != self.EXECUTABLE)):
            # (The linker doesn't do anything if output is up-to-date.
            # So it would probably better to check if we really need this,
            # but for this we had to insert some unchanged parts of
            # UnixCCompiler, and this is not what we want.)

            # we want to put some files in the same directory as the
            # object files are, build_temp doesn't help much
            # where are the object files
            temp_dir = os.path.dirname(objects[0])
            # name of dll to give the helper files the same base name
            (dll_name, dll_extension) = os.path.splitext(
                os.path.basename(output_filename))

            # generate the filenames for these files
            def_file = os.path.join(temp_dir, dll_name + ".def")

            # Generate .def file
            contents = [
                "LIBRARY %s INITINSTANCE TERMINSTANCE" % \
                os.path.splitext(os.path.basename(output_filename))[0],
                "DATA MULTIPLE NONSHARED",
                "EXPORTS"]
            for sym in export_symbols:
                contents.append('  "%s"' % sym)
            self.execute(write_file, (def_file, contents),
                         "writing %s" % def_file)

            # next add options for def-file and to creating import libraries
            # for gcc/ld the def-file is specified as any other object files
            objects.append(def_file)

        #end: if ((export_symbols is not None) and
        #        (target_desc != self.EXECUTABLE or self.linker_dll == "gcc")):

        # who wants symbols and a many times larger output file
        # should explicitly switch the debug mode on
        # otherwise we let dllwrap/ld strip the output file
        # (On my machine: 10KB < stripped_file < ??100KB
        #   unstripped_file = stripped_file + XXX KB
        #  ( XXX=254 for a typical python extension))
        if not debug:
            extra_preargs.append("-s")

        UnixCCompiler.link(self,
                           target_desc,
                           objects,
                           output_filename,
                           output_dir,
                           libraries,
                           library_dirs,
                           runtime_library_dirs,
                           None, # export_symbols, we do this in our def-file
                           debug,
                           extra_preargs,
                           extra_postargs,
                           build_temp,
                           target_lang)

    # link ()

    # -- Miscellaneous methods -----------------------------------------

    # override the object_filenames method from CCompiler to
    # support rc and res-files
    def object_filenames (self,
                          source_filenames,
                          strip_dir=0,
                          output_dir=''):
        if output_dir is None: output_dir = ''
        obj_names = []
        for src_name in source_filenames:
            # use normcase to make sure '.rc' is really '.rc' and not '.RC'
            (base, ext) = os.path.splitext (os.path.normcase(src_name))
            if ext not in (self.src_extensions + ['.rc']):
                raise UnknownFileError, \
                      "unknown file type '%s' (from '%s')" % \
                      (ext, src_name)
            if strip_dir:
                base = os.path.basename (base)
            if ext == '.rc':
                # these need to be compiled to object files
                obj_names.append (os.path.join (output_dir,
                                            base + self.res_extension))
            else:
                obj_names.append (os.path.join (output_dir,
                                            base + self.obj_extension))
        return obj_names

    # object_filenames ()

    # override the find_library_file method from UnixCCompiler
    # to deal with file naming/searching differences
    def find_library_file(self, dirs, lib, debug=0):
        shortlib = '%s.lib' % lib
        longlib = 'lib%s.lib' % lib    # this form very rare

        # get EMX's default library directory search path
        try:
            emx_dirs = os.environ['LIBRARY_PATH'].split(';')
        except KeyError:
            emx_dirs = []

        for dir in dirs + emx_dirs:
            shortlibp = os.path.join(dir, shortlib)
            longlibp = os.path.join(dir, longlib)
            if os.path.exists(shortlibp):
                return shortlibp
            elif os.path.exists(longlibp):
                return longlibp

        # Oops, didn't find it in *any* of 'dirs'
        return None

# class EMXCCompiler


# Because these compilers aren't configured in Python's pyconfig.h file by
# default, we should at least warn the user if he is using a unmodified
# version.

CONFIG_H_OK = "ok"
CONFIG_H_NOTOK = "not ok"
CONFIG_H_UNCERTAIN = "uncertain"

def check_config_h():

    """Check if the current Python installation (specifically, pyconfig.h)
    appears amenable to building extensions with GCC.  Returns a tuple
    (status, details), where 'status' is one of the following constants:
      CONFIG_H_OK
        all is well, go ahead and compile
      CONFIG_H_NOTOK
        doesn't look good
      CONFIG_H_UNCERTAIN
        not sure -- unable to read pyconfig.h
    'details' is a human-readable string explaining the situation.

    Note there are two ways to conclude "OK": either 'sys.version' contains
    the string "GCC" (implying that this Python was built with GCC), or the
    installed "pyconfig.h" contains the string "__GNUC__".
    """

    # XXX since this function also checks sys.version, it's not strictly a
    # "pyconfig.h" check -- should probably be renamed...

    from distutils import sysconfig
    import string
    # if sys.version contains GCC then python was compiled with
    # GCC, and the pyconfig.h file should be OK
    if string.find(sys.version,"GCC") >= 0:
        return (CONFIG_H_OK, "sys.version mentions 'GCC'")

    fn = sysconfig.get_config_h_filename()
    try:
        # It would probably better to read single lines to search.
        # But we do this only once, and it is fast enough
        f = open(fn)
        try:
            s = f.read()
        finally:
            f.close()

    except IOError, exc:
        # if we can't read this file, we cannot say it is wrong
        # the compiler will complain later about this file as missing
        return (CONFIG_H_UNCERTAIN,
                "couldn't read '%s': %s" % (fn, exc.strerror))

    else:
        # "pyconfig.h" contains an "#ifdef __GNUC__" or something similar
        if string.find(s,"__GNUC__") >= 0:
            return (CONFIG_H_OK, "'%s' mentions '__GNUC__'" % fn)
        else:
            return (CONFIG_H_NOTOK, "'%s' does not mention '__GNUC__'" % fn)


def get_versions():
    """ Try to find out the versions of gcc and ld.
        If not possible it returns None for it.
    """
    from distutils.version import StrictVersion
    from distutils.spawn import find_executable
    import re

    gcc_exe = find_executable('gcc')
    if gcc_exe:
        out = os.popen(gcc_exe + ' -dumpversion','r')
        try:
            out_string = out.read()
        finally:
            out.close()
        result = re.search('(\d+\.\d+\.\d+)',out_string)
        if result:
            gcc_version = StrictVersion(result.group(1))
        else:
            gcc_version = None
    else:
        gcc_version = None
    # EMX ld has no way of reporting version number, and we use GCC
    # anyway - so we can link OMF DLLs
    ld_version = None
    return (gcc_version, ld_version)
PKW[�!Q�
�

config.pyonu�[����
{fc@sRdZddlZddlmZddlmZdZdefd��YZdS(s�distutils.pypirc

Provides the PyPIRCCommand class, the base class for the command classes
that uses .pypirc in the distutils.command package.
i����N(tConfigParser(tCommandsE[distutils]
index-servers =
    pypi

[pypi]
username:%s
password:%s
t
PyPIRCCommandcBsueZdZdZdZd
Zd
ZdddefdgZdgZ	d�Z
d	�Zd
�Zd�Z
d�ZRS(s;Base command that knows how to handle the .pypirc file
    shttps://upload.pypi.org/legacy/tpypisrepository=trsurl of repository [default: %s]s
show-responses&display full response text from servercCstjjtjjd�d�S(sReturns rc file path.t~s.pypirc(tostpathtjoint
expanduser(tself((s(/usr/lib64/python2.7/distutils/config.pyt_get_rc_file&scCsd|j�}tjtj|tjtjBd�d�}z|jt||f�Wd|j�XdS(sCreates a default .pypirc file.i�twN(	RRtfdopentopentO_CREATtO_WRONLYtwritetDEFAULT_PYPIRCtclose(R
tusernametpasswordtrctf((s(/usr/lib64/python2.7/distutils/config.pyt
_store_pypirc*s
+cCs3|j�}tjj|�r/|jd|�|jp>|j}t�}|j|�|j	�}d|kr�|j
dd�}g|jd�D]$}|j�dkr�|j�^q�}|gkr�d|kr�dg}q�iSnxC|D]�}i|d6}|j
|d�|d<xdd	|jfd
|j
fdfD]A\}	}
|j||	�ro|j
||	�||	<q8|
||	<q8W|d|ks�|d	|kr�|Sq�Wq/d|kr/d}|j|d	�r�|j
|d	�}n	|j}i|j
|d�d6|j
|d�d6|d	6|d6|j
d
6SniS(sReads the .pypirc file.sUsing PyPI login from %st	distutilss
index-serverss
tRtserverRt
repositorytrealmRsserver-loginN(RN(RRRtexiststannounceRtDEFAULT_REPOSITORYRtreadtsectionstgettsplittstript
DEFAULT_REALMtNonet
has_option(R
RRtconfigR"t
index_serversRt_serverstcurrenttkeytdefault((s(/usr/lib64/python2.7/distutils/config.pyt_read_pypirc3sP	
$

		cCsd|_d|_d|_dS(sInitialize options.iN(R'RRt
show_response(R
((s(/usr/lib64/python2.7/distutils/config.pytinitialize_optionsis		cCs@|jdkr|j|_n|jdkr<|j|_ndS(sFinalizes options.N(RR'R RR&(R
((s(/usr/lib64/python2.7/distutils/config.pytfinalize_optionsosN(s
show-responseNs&display full response text from server(t__name__t
__module__t__doc__R R&R'RRtuser_optionstboolean_optionsRRR/R1R2(((s(/usr/lib64/python2.7/distutils/config.pyRs 						6	(R5RRt
distutils.cmdRRR(((s(/usr/lib64/python2.7/distutils/config.pyt<module>s

PKW[m��lldep_util.pyonu�[����
{fc@sZdZdZddlZddlmZddlmZd�Zd�Zdd	�Z	dS(
s�distutils.dep_util

Utility functions for simple, timestamp-based dependency of files
and groups of files; also, function based entirely on such
timestamp dependency analysis.s$Id$i����N(tST_MTIME(tDistutilsFileErrorcCsktjj|�s1tdtjj|���ntjj|�sGtStj|�ttj|�tkS(s�Tells if the target is newer than the source.

    Return true if 'source' exists and is more recently modified than
    'target', or if 'source' exists and 'target' doesn't.

    Return false if both exist and 'target' is the same age or younger
    than 'source'. Raise DistutilsFileError if 'source' does not exist.

    Note that this test is not very accurate: files created in the same second
    will have the same "age".
    sfile '%s' does not exist(tostpathtexistsRtabspathtTruetstatR(tsourcettarget((s*/usr/lib64/python2.7/distutils/dep_util.pytnewer
scCs�t|�t|�kr$td�ng}g}xIt||�D]8\}}t||�r@|j|�|j|�q@q@W||fS(s�Walk two filename lists in parallel, testing if each source is newer
    than its corresponding target.  Return a pair of lists (sources,
    targets) where source is newer than target, according to the semantics
    of 'newer()'.
    s+'sources' and 'targets' must be same length(tlent
ValueErrortzipR
tappend(tsourcesttargetst	n_sourcest	n_targetsRR	((s*/usr/lib64/python2.7/distutils/dep_util.pytnewer_pairwise!s
terrorcCs�tjj|�stStj|�t}xq|D]i}tjj|�s||dkrWq||dkriq0q||dkr|tSntj|�t|kr0tSq0WtS(s�Return true if 'target' is out-of-date with respect to any file
    listed in 'sources'.

    In other words, if 'target' exists and is newer
    than every file in 'sources', return false; otherwise return true.
    'missing' controls what we do when a source file is missing; the
    default ("error") is to blow up with an OSError from inside 'stat()';
    if it is "ignore", we silently drop any missing source files; if it is
    "newer", any missing source files make us assume that 'target' is
    out-of-date (this is handy in "dry-run" mode: it'll make you pretend to
    carry out commands that wouldn't work because inputs are missing, but
    that doesn't matter because you're not actually going to run the
    commands).
    RtignoreR
(RRRRRRtFalse(RR	tmissingttarget_mtimeR((s*/usr/lib64/python2.7/distutils/dep_util.pytnewer_group4s
(
t__doc__t__revision__RRRtdistutils.errorsRR
RR(((s*/usr/lib64/python2.7/distutils/dep_util.pyt<module>s		PKW[s�L^^
file_util.pyonu�[����
{fc@s�dZdZddlZddlmZddlmZidd6dd6d	d
6Zdd
�Z	ddddddd�Z
ddd�Zd�ZdS(sFdistutils.file_util

Utility functions for operating on single files.
s$Id$i����N(tDistutilsFileError(tlogtcopyingshard linkingthardssymbolically linkingtsymiicCs�d}d}z�yt|d�}Wn2tjk
rV\}}td||f��nXtjj|�r�ytj|�Wq�tjk
r�\}}td||f��q�Xnyt|d�}Wn2tjk
r�\}}td||f��nXx�y|j|�}Wn2tjk
rD\}}td||f��nX|sOPny|j	|�Wq�tjk
r�\}}td||f��q�Xq�WWd|r�|j
�n|r�|j
�nXdS(	s5Copy the file 'src' to 'dst'.

    Both must be filenames. Any error opening either file, reading from
    'src', or writing to 'dst', raises DistutilsFileError.  Data is
    read/written in chunks of 'buffer_size' bytes (default 16k).  No attempt
    is made to handle anything apart from regular files.
    trbscould not open '%s': %sscould not delete '%s': %stwbscould not create '%s': %sscould not read from '%s': %sscould not write to '%s': %sN(tNonetopentosterrorRtpathtexiststunlinktreadtwritetclose(tsrctdsttbuffer_sizetfsrctfdstterrnoterrstrtbuf((s+/usr/lib64/python2.7/distutils/file_util.pyt_copy_file_contentssF

iicCs�ddlm}ddlm}	m}
m}m}tjj	|�sWt
d|��ntjj|�r�|}
tjj|tjj
|��}ntjj|�}
|r�|||�r�|dkr�tjd|�n|dfSyt|}Wn!tk
rtd|��nX|dkrxtjj
|�tjj
|�kr_tjd	|||
�qxtjd	|||�n|r�|dfS|d
kr�tjj|�o�tjj||�sCytj||�|dfSWq�tk
r�q�XqCnP|dkrCtjj|�o#tjj||�sCtj||�|dfSnt||�|s\|r�tj|�}|r�tj|||	||
f�n|r�tj||||��q�n|dfS(sCopy a file 'src' to 'dst'.

    If 'dst' is a directory, then 'src' is copied there with the same name;
    otherwise, it must be a filename.  (If the file exists, it will be
    ruthlessly clobbered.)  If 'preserve_mode' is true (the default),
    the file's mode (type and permission bits, or whatever is analogous on
    the current platform) is copied.  If 'preserve_times' is true (the
    default), the last-modified and last-access times are copied as well.
    If 'update' is true, 'src' will only be copied if 'dst' does not exist,
    or if 'dst' does exist but is older than 'src'.

    'link' allows you to make hard links (os.link) or symbolic links
    (os.symlink) instead of copying: set it to "hard" or "sym"; if it is
    None (the default), files are copied.  Don't set 'link' on systems that
    don't support it: 'copy_file()' doesn't check if hard or symbolic
    linking is available. If hardlink fails, falls back to
    _copy_file_contents().

    Under Mac OS, uses the native file copy function in macostools; on
    other systems, uses '_copy_file_contents()' to copy file contents.

    Return a tuple (dest_name, copied): 'dest_name' is the actual name of
    the output file, and 'copied' is true if the file was copied (or would
    have been copied, if 'dry_run' true).
    i����(tnewer(tST_ATIMEtST_MTIMEtST_MODEtS_IMODEs4can't copy '%s': doesn't exist or not a regular fileis"not copying %s (output up-to-date)is&invalid value '%s' for 'link' arguments%s %s -> %sRR(tdistutils.dep_utilRtstatRRRRR	RtisfileRtisdirtjointbasenametdirnameRtdebugt_copy_actiontKeyErrort
ValueErrortinfoRtsamefiletlinktOSErrortsymlinkRtutimetchmod(RRt
preserve_modetpreserve_timestupdateR,tverbosetdry_runRRRRRtdirtactiontst((s+/usr/lib64/python2.7/distutils/file_util.pyt	copy_fileGsT""$

$
'

'

! c
Cs�ddlm}m}m}m}m}ddl}	|dkrVtjd||�n|r`|S||�st	d|��n||�r�t
jj|||��}n%||�r�t	d||f��n|||��s�t	d||f��nd	}
yt
j
||�WnMt
jk
rb\}}||	jkrFd}
qct	d
|||f��nX|
r�t||d|�yt
j|�Wq�t
jk
r�\}}yt
j|�Wnt
jk
r�nXt	dd
||||f��q�Xn|S(s)Move a file 'src' to 'dst'.

    If 'dst' is a directory, the file will be moved into it with the same
    name; otherwise, 'src' is just renamed to 'dst'.  Return the new
    full name of the file.

    Handles cross-device moves on Unix using 'copy_file()'.  What about
    other systems???
    i����(RR!R"R$R%Nismoving %s -> %ss#can't move '%s': not a regular files0can't move '%s': destination '%s' already existss2can't move '%s': destination '%s' not a valid pathiscouldn't move '%s' to '%s': %sR4s+couldn't move '%s' to '%s' by copy/delete: sdelete '%s' failed: %s(tos.pathRR!R"R$R%RRR*RR	RR#trenameR
tEXDEVR9R
(
RRR4R5RR!R"R$R%Rtcopy_ittnumtmsg((s+/usr/lib64/python2.7/distutils/file_util.pyt	move_file�sP
(	cCsGt|d�}z&x|D]}|j|d�qWWd|j�XdS(s{Create a file with the specified name and write 'contents' (a
    sequence of strings without line terminators) to it.
    tws
N(RRR(tfilenametcontentstftline((s+/usr/lib64/python2.7/distutils/file_util.pyt
write_file�s

i@(
t__doc__t__revision__R	tdistutils.errorsRt	distutilsRRR'RR9R@RF(((s+/usr/lib64/python2.7/distutils/file_util.pyt<module>s

5	b<PKW[s�L^^
file_util.pycnu�[����
{fc@s�dZdZddlZddlmZddlmZidd6dd6d	d
6Zdd
�Z	ddddddd�Z
ddd�Zd�ZdS(sFdistutils.file_util

Utility functions for operating on single files.
s$Id$i����N(tDistutilsFileError(tlogtcopyingshard linkingthardssymbolically linkingtsymiicCs�d}d}z�yt|d�}Wn2tjk
rV\}}td||f��nXtjj|�r�ytj|�Wq�tjk
r�\}}td||f��q�Xnyt|d�}Wn2tjk
r�\}}td||f��nXx�y|j|�}Wn2tjk
rD\}}td||f��nX|sOPny|j	|�Wq�tjk
r�\}}td||f��q�Xq�WWd|r�|j
�n|r�|j
�nXdS(	s5Copy the file 'src' to 'dst'.

    Both must be filenames. Any error opening either file, reading from
    'src', or writing to 'dst', raises DistutilsFileError.  Data is
    read/written in chunks of 'buffer_size' bytes (default 16k).  No attempt
    is made to handle anything apart from regular files.
    trbscould not open '%s': %sscould not delete '%s': %stwbscould not create '%s': %sscould not read from '%s': %sscould not write to '%s': %sN(tNonetopentosterrorRtpathtexiststunlinktreadtwritetclose(tsrctdsttbuffer_sizetfsrctfdstterrnoterrstrtbuf((s+/usr/lib64/python2.7/distutils/file_util.pyt_copy_file_contentssF

iicCs�ddlm}ddlm}	m}
m}m}tjj	|�sWt
d|��ntjj|�r�|}
tjj|tjj
|��}ntjj|�}
|r�|||�r�|dkr�tjd|�n|dfSyt|}Wn!tk
rtd|��nX|dkrxtjj
|�tjj
|�kr_tjd	|||
�qxtjd	|||�n|r�|dfS|d
kr�tjj|�o�tjj||�sCytj||�|dfSWq�tk
r�q�XqCnP|dkrCtjj|�o#tjj||�sCtj||�|dfSnt||�|s\|r�tj|�}|r�tj|||	||
f�n|r�tj||||��q�n|dfS(sCopy a file 'src' to 'dst'.

    If 'dst' is a directory, then 'src' is copied there with the same name;
    otherwise, it must be a filename.  (If the file exists, it will be
    ruthlessly clobbered.)  If 'preserve_mode' is true (the default),
    the file's mode (type and permission bits, or whatever is analogous on
    the current platform) is copied.  If 'preserve_times' is true (the
    default), the last-modified and last-access times are copied as well.
    If 'update' is true, 'src' will only be copied if 'dst' does not exist,
    or if 'dst' does exist but is older than 'src'.

    'link' allows you to make hard links (os.link) or symbolic links
    (os.symlink) instead of copying: set it to "hard" or "sym"; if it is
    None (the default), files are copied.  Don't set 'link' on systems that
    don't support it: 'copy_file()' doesn't check if hard or symbolic
    linking is available. If hardlink fails, falls back to
    _copy_file_contents().

    Under Mac OS, uses the native file copy function in macostools; on
    other systems, uses '_copy_file_contents()' to copy file contents.

    Return a tuple (dest_name, copied): 'dest_name' is the actual name of
    the output file, and 'copied' is true if the file was copied (or would
    have been copied, if 'dry_run' true).
    i����(tnewer(tST_ATIMEtST_MTIMEtST_MODEtS_IMODEs4can't copy '%s': doesn't exist or not a regular fileis"not copying %s (output up-to-date)is&invalid value '%s' for 'link' arguments%s %s -> %sRR(tdistutils.dep_utilRtstatRRRRR	RtisfileRtisdirtjointbasenametdirnameRtdebugt_copy_actiontKeyErrort
ValueErrortinfoRtsamefiletlinktOSErrortsymlinkRtutimetchmod(RRt
preserve_modetpreserve_timestupdateR,tverbosetdry_runRRRRRtdirtactiontst((s+/usr/lib64/python2.7/distutils/file_util.pyt	copy_fileGsT""$

$
'

'

! c
Cs�ddlm}m}m}m}m}ddl}	|dkrVtjd||�n|r`|S||�st	d|��n||�r�t
jj|||��}n%||�r�t	d||f��n|||��s�t	d||f��nd	}
yt
j
||�WnMt
jk
rb\}}||	jkrFd}
qct	d
|||f��nX|
r�t||d|�yt
j|�Wq�t
jk
r�\}}yt
j|�Wnt
jk
r�nXt	dd
||||f��q�Xn|S(s)Move a file 'src' to 'dst'.

    If 'dst' is a directory, the file will be moved into it with the same
    name; otherwise, 'src' is just renamed to 'dst'.  Return the new
    full name of the file.

    Handles cross-device moves on Unix using 'copy_file()'.  What about
    other systems???
    i����(RR!R"R$R%Nismoving %s -> %ss#can't move '%s': not a regular files0can't move '%s': destination '%s' already existss2can't move '%s': destination '%s' not a valid pathiscouldn't move '%s' to '%s': %sR4s+couldn't move '%s' to '%s' by copy/delete: sdelete '%s' failed: %s(tos.pathRR!R"R$R%RRR*RR	RR#trenameR
tEXDEVR9R
(
RRR4R5RR!R"R$R%Rtcopy_ittnumtmsg((s+/usr/lib64/python2.7/distutils/file_util.pyt	move_file�sP
(	cCsGt|d�}z&x|D]}|j|d�qWWd|j�XdS(s{Create a file with the specified name and write 'contents' (a
    sequence of strings without line terminators) to it.
    tws
N(RRR(tfilenametcontentstftline((s+/usr/lib64/python2.7/distutils/file_util.pyt
write_file�s

i@(
t__doc__t__revision__R	tdistutils.errorsRt	distutilsRRR'RR9R@RF(((s+/usr/lib64/python2.7/distutils/file_util.pyt<module>s

5	b<PKW[��ho��	debug.pyonu�[����
{fc@s(ddlZdZejjd�ZdS(i����Ns$Id$tDISTUTILS_DEBUG(tost__revision__tenvirontgettDEBUG(((s'/usr/lib64/python2.7/distutils/debug.pyt<module>sPKW[��8��A�Acmd.pycnu�[����
{fc@s�dZdZddlZddlZddlZddlmZddlmZm	Z	m
Z
mZmZddlm
Z
dfd��YZd	efd
��YZdS(stdistutils.cmd

Provides the Command class, the base class for the command classes
in the distutils.command package.
s$Id$i����N(tDistutilsOptionError(tutiltdir_utilt	file_utiltarchive_utiltdep_util(tlogtCommandcBsyeZdZgZd�Zd�Zd�Zd�Zd�Zd#dd�Z
d�Zd	d
�Zd�Z
d#d�Zd#d
�Zd�Zd#d�Zd�Zd�Zd�Zd�Zd	d�Zdd�Zd�Zd�Zd�Zd#d	d�Zdd�Zd	d	d#d	d�Zd	d	dd	d�Zd	d�Zd	d	d �Z d#d#d#d#d!�Z!d#d#d	d"�Z"RS($s}Abstract base class for defining command classes, the "worker bees"
    of the Distutils.  A useful analogy for command classes is to think of
    them as subroutines with local variables called "options".  The options
    are "declared" in 'initialize_options()' and "defined" (given their
    final values, aka "finalized") in 'finalize_options()', both of which
    must be defined by every command class.  The distinction between the
    two is necessary because option values might come from the outside
    world (command line, config file, ...), and any options dependent on
    other options must be computed *after* these outside influences have
    been processed -- hence 'finalize_options()'.  The "body" of the
    subroutine, where it does all its work based on the values of its
    options, is the 'run()' method, which must also be implemented by every
    command class.
    cCs�ddlm}t||�s+td�n|jtkrFtd�n||_|j�d|_
|j|_d|_d|_
d|_dS(s�Create and initialize a new Command object.  Most importantly,
        invokes the 'initialize_options()' method, which is the real
        initializer and depends on the actual command being
        instantiated.
        i����(tDistributions$dist must be a Distribution instancesCommand is an abstract classiN(tdistutils.distRt
isinstancet	TypeErrort	__class__RtRuntimeErrortdistributiontinitialize_optionstNonet_dry_runtverbosetforcethelpt	finalized(tselftdistR((s%/usr/lib64/python2.7/distutils/cmd.pyt__init__1s	

			cCsO|dkrBt|d|�}|dkr;t|j|�S|Sn	t|�dS(Ntdry_runt_(tgetattrRRtAttributeError(Rtattrtmyval((s%/usr/lib64/python2.7/distutils/cmd.pyt__getattr__ascCs#|js|j�nd|_dS(Ni(Rtfinalize_options(R((s%/usr/lib64/python2.7/distutils/cmd.pytensure_finalizedks	
cCstd|j�dS(s�Set default values for all the options that this command
        supports.  Note that these defaults may be overridden by other
        commands, by the setup script, by config files, or by the
        command-line.  Thus, this is not the place to code dependencies
        between options; generally, 'initialize_options()' implementations
        are just a bunch of "self.foo = None" assignments.

        This method must be implemented by all command classes.
        s,abstract method -- subclass %s must overrideN(R
R(R((s%/usr/lib64/python2.7/distutils/cmd.pyR}s
cCstd|j�dS(sSet final values for all the options that this command supports.
        This is always called as late as possible, ie.  after any option
        assignments from the command-line or from other commands have been
        done.  Thus, this is the place to code option dependencies: if
        'foo' depends on 'bar', then it is safe to set 'foo' from 'bar' as
        long as 'foo' still has the same value it was assigned in
        'initialize_options()'.

        This method must be implemented by all command classes.
        s,abstract method -- subclass %s must overrideN(R
R(R((s%/usr/lib64/python2.7/distutils/cmd.pyR �stcCs�ddlm}|dkr/d|j�}n|j||dtj�|d}xy|jD]n\}}}|j|�}|ddkr�|d }nt	||�}|j|d||fdtj�q]WdS(Ni����(t
longopt_xlatescommand options for '%s':tlevels  t=s%s = %s(
tdistutils.fancy_getoptR#Rtget_command_nametannounceRtINFOtuser_optionst	translateR(RtheadertindentR#toptionRtvalue((s%/usr/lib64/python2.7/distutils/cmd.pytdump_options�s

cCstd|j�dS(s�A command's raison d'etre: carry out the action it exists to
        perform, controlled by the options initialized in
        'initialize_options()', customized by other commands, the setup
        script, the command-line, and config files, and finalized in
        'finalize_options()'.  All terminal output and filesystem
        interaction should be done by 'run()'.

        This method must be implemented by all command classes.
        s,abstract method -- subclass %s must overrideN(R
R(R((s%/usr/lib64/python2.7/distutils/cmd.pytrun�s
icCstj||�dS(smIf the current verbosity level is of greater than or equal to
        'level' print 'msg' to stdout.
        N(R(RtmsgR$((s%/usr/lib64/python2.7/distutils/cmd.pyR(�scCs/ddlm}|r+|GHtjj�ndS(s~Print 'msg' to stdout if the global DEBUG (taken from the
        DISTUTILS_DEBUG environment variable) flag is true.
        i����(tDEBUGN(tdistutils.debugR3tsyststdouttflush(RR2R3((s%/usr/lib64/python2.7/distutils/cmd.pytdebug_print�scCs[t||�}|dkr/t|||�|St|t�sWtd|||f�n|S(Ns'%s' must be a %s (got `%s`)(RRtsetattrR
tstrR(RR.twhattdefaulttval((s%/usr/lib64/python2.7/distutils/cmd.pyt_ensure_stringlike�scCs|j|d|�dS(sWEnsure that 'option' is a string; if not defined, set it to
        'default'.
        tstringN(R>(RR.R<((s%/usr/lib64/python2.7/distutils/cmd.pyt
ensure_string�scCs�t||�}|dkrdSt|t�rMt||tjd|��ndt|t�r�d}x0|D]}t|t�sid}PqiqiWnd}|s�td||f�ndS(s�Ensure that 'option' is a list of strings.  If 'option' is
        currently a string, we split it either on /,\s*/ or /\s+/, so
        "foo bar baz", "foo,bar,baz", and "foo,   bar baz" all become
        ["foo", "bar", "baz"].
        Ns,\s*|\s+iis''%s' must be a list of strings (got %r)(	RRR
R:R9tretsplittlistR(RR.R=toktelement((s%/usr/lib64/python2.7/distutils/cmd.pytensure_string_list�s 
cCsL|j|||�}|dk	rH||�rHtd|||f�ndS(Nserror in '%s' option: (R>RR(RR.ttesterR;t	error_fmtR<R=((s%/usr/lib64/python2.7/distutils/cmd.pyt_ensure_tested_string�scCs |j|tjjdd�dS(s5Ensure that 'option' is the name of an existing file.tfilenames$'%s' does not exist or is not a fileN(RItostpathtisfile(RR.((s%/usr/lib64/python2.7/distutils/cmd.pytensure_filenamescCs |j|tjjdd�dS(Nsdirectory names)'%s' does not exist or is not a directory(RIRKRLtisdir(RR.((s%/usr/lib64/python2.7/distutils/cmd.pytensure_dirname
scCs$t|d�r|jS|jjSdS(Ntcommand_name(thasattrRQRt__name__(R((s%/usr/lib64/python2.7/distutils/cmd.pyR'scGsh|jj|�}|j�xE|D]=\}}t||�dkr#t||t||��q#q#WdS(s>Set the values of any "undefined" options from corresponding
        option values in some other command object.  "Undefined" here means
        "is None", which is the convention used to indicate that an option
        has not been changed between 'initialize_options()' and
        'finalize_options()'.  Usually called from 'finalize_options()' for
        options that depend on some other command rather than another
        option of the same command.  'src_cmd' is the other command from
        which option values will be taken (a command object will be created
        for it if necessary); the remaining arguments are
        '(src_option,dst_option)' tuples which mean "take the value of
        'src_option' in the 'src_cmd' command object, and copy it to
        'dst_option' in the current command object".
        N(Rtget_command_objR!RRR9(Rtsrc_cmdtoption_pairstsrc_cmd_objt
src_optiont
dst_option((s%/usr/lib64/python2.7/distutils/cmd.pytset_undefined_optionss
	cCs#|jj||�}|j�|S(s�Wrapper around Distribution's 'get_command_obj()' method: find
        (create if necessary and 'create' is true) the command object for
        'command', call its 'ensure_finalized()' method, and return the
        finalized command object.
        (RRTR!(Rtcommandtcreatetcmd_obj((s%/usr/lib64/python2.7/distutils/cmd.pytget_finalized_command1s
icCs|jj||�S(N(Rtreinitialize_command(RR[treinit_subcommands((s%/usr/lib64/python2.7/distutils/cmd.pyR_=s	cCs|jj|�dS(s�Run some other command: uses the 'run_command()' method of
        Distribution, which creates and finalizes the command object if
        necessary and then invokes its 'run()' method.
        N(Rtrun_command(RR[((s%/usr/lib64/python2.7/distutils/cmd.pyRaAscCsLg}x?|jD]4\}}|dks4||�r|j|�qqW|S(skDetermine the sub-commands that are relevant in the current
        distribution (ie., that need to be run).  This is based on the
        'sub_commands' class attribute: each tuple in that list may include
        a method that we call to determine if the subcommand needs to be
        run for the current distribution.  Return a list of command names.
        N(tsub_commandsRtappend(Rtcommandstcmd_nametmethod((s%/usr/lib64/python2.7/distutils/cmd.pytget_sub_commandsHs
cCs!tjd|j�|f�dS(Nswarning: %s: %s
(RtwarnR'(RR2((s%/usr/lib64/python2.7/distutils/cmd.pyRhXs	cCs tj|||d|j�dS(NR(RtexecuteR(RtfunctargsR2R$((s%/usr/lib64/python2.7/distutils/cmd.pyRi\si�cCstj||d|j�dS(NR(RtmkpathR(Rtnametmode((s%/usr/lib64/python2.7/distutils/cmd.pyRl_sc	Cs)tj|||||j|d|j�S(s�Copy a file respecting verbose, dry-run and force flags.  (The
        former two default to whatever is in the Distribution object, and
        the latter defaults to false for commands that don't define it.)R(Rt	copy_fileRR(Rtinfiletoutfilet
preserve_modetpreserve_timestlinkR$((s%/usr/lib64/python2.7/distutils/cmd.pyRobsc	Cs)tj||||||jd|j�S(s\Copy an entire directory tree respecting verbose, dry-run,
        and force flags.
        R(Rt	copy_treeRR(RRpRqRrRstpreserve_symlinksR$((s%/usr/lib64/python2.7/distutils/cmd.pyRuos
	
cCstj||d|j�S(s$Move a file respecting dry-run flag.R(Rt	move_fileR(RtsrctdstR$((s%/usr/lib64/python2.7/distutils/cmd.pyRw{scCs*ddlm}|||d|j�dS(s2Spawn an external command respecting dry-run flag.i����(tspawnRN(tdistutils.spawnRzR(Rtcmdtsearch_pathR$Rz((s%/usr/lib64/python2.7/distutils/cmd.pyRzscCs+tj||||d|jd|d|�S(NRtownertgroup(Rtmake_archiveR(Rt	base_nametformattroot_dirtbase_dirR~R((s%/usr/lib64/python2.7/distutils/cmd.pyR��scCs�|dkrd|}nt|t�r4|f}n!t|ttf�sUtd�n|dkr}d|dj|�f}n|js�tj	||�r�|j
||||�n
tj|�dS(s�Special case of 'execute()' for operations that process one or
        more input files and generate one output file.  Works just like
        'execute()', except the operation is skipped and a different
        message printed if 'outfile' already exists and is newer than all
        files listed in 'infiles'.  If the command defined 'self.force',
        and it is true, then the command is unconditionally run -- does no
        timestamp checks.
        sskipping %s (inputs unchanged)s9'infiles' must be a string, or a list or tuple of stringssgenerating %s from %ss, N(
RR
R:RCttupleRtjoinRRtnewer_groupRiRtdebug(RtinfilesRqRjRktexec_msgtskip_msgR$((s%/usr/lib64/python2.7/distutils/cmd.pyt	make_file�s

	N(#RSt
__module__t__doc__RbRRR!RR RR0R1R(R8R>R@RFRIRNRPR'RZR^R_RaRgRhRiRlRoRuRwRzR�R�(((s%/usr/lib64/python2.7/distutils/cmd.pyRsD	0	
		
		
	
								
	
tinstall_misccBs;eZdZdgZd�Zd�Zd�Zd�ZRS(	s{Common base class for installing some files in a subdirectory.
    Currently used by install_data and install_scripts.
    sinstall-dir=tds!directory to install the files tocCsd|_g|_dS(N(Rtinstall_dirtoutfiles(R((s%/usr/lib64/python2.7/distutils/cmd.pyR�s	cCs|jd|df�dS(NtinstallR�(RZ(Rtdirname((s%/usr/lib64/python2.7/distutils/cmd.pyt_install_dir_from�scCsmg|_|sdS|j|j�xC|D];}|j||j�|jjtjj|j|��q*WdS(N(R�RlR�RoRcRKRLR�(Rtfilelisttf((s%/usr/lib64/python2.7/distutils/cmd.pyt_copy_files�s	
cCs|jS(N(R�(R((s%/usr/lib64/python2.7/distutils/cmd.pytget_outputs�s(sinstall-dir=R�s!directory to install the files to(RSR�R�R*RR�R�R�(((s%/usr/lib64/python2.7/distutils/cmd.pyR��s					(R�t__revision__R5RKRAtdistutils.errorsRt	distutilsRRRRRRRR�(((s%/usr/lib64/python2.7/distutils/cmd.pyt<module>s$(��PKW[O��9�D�Dsysconfig.py.debug-buildnu�[���"""Provide access to Python's configuration information.  The specific
configuration variables available depend heavily on the platform and
configuration.  The values may be retrieved using
get_config_var(name), and the list of variables is available via
get_config_vars().keys().  Additional convenience functions are also
available.

Written by:   Fred L. Drake, Jr.
Email:        <fdrake@acm.org>
"""

__revision__ = "$Id$"

import os
import re
import string
import sys

from distutils.errors import DistutilsPlatformError

# These are needed in a couple of spots, so just compute them once.
PREFIX = os.path.normpath(sys.prefix)
EXEC_PREFIX = os.path.normpath(sys.exec_prefix)

# Path to the base directory of the project. On Windows the binary may
# live in project/PCBuild9.  If we're dealing with an x64 Windows build,
# it'll live in project/PCbuild/amd64.
if sys.executable:
    project_base = os.path.dirname(os.path.abspath(sys.executable))
else:
    # sys.executable can be empty if argv[0] has been changed and Python is
    # unable to retrieve the real program name
    project_base = os.getcwd()
if os.name == "nt" and "pcbuild" in project_base[-8:].lower():
    project_base = os.path.abspath(os.path.join(project_base, os.path.pardir))
# PC/VS7.1
if os.name == "nt" and "\\pc\\v" in project_base[-10:].lower():
    project_base = os.path.abspath(os.path.join(project_base, os.path.pardir,
                                                os.path.pardir))
# PC/AMD64
if os.name == "nt" and "\\pcbuild\\amd64" in project_base[-14:].lower():
    project_base = os.path.abspath(os.path.join(project_base, os.path.pardir,
                                                os.path.pardir))

# set for cross builds
if "_PYTHON_PROJECT_BASE" in os.environ:
    # this is the build directory, at least for posix
    project_base = os.path.normpath(os.environ["_PYTHON_PROJECT_BASE"])

# python_build: (Boolean) if true, we're either building Python or
# building an extension with an un-installed Python, so we use
# different (hard-wired) directories.
# Setup.local is available for Makefile builds including VPATH builds,
# Setup.dist is available on Windows
def _python_build():
    for fn in ("Setup.dist", "Setup.local"):
        if os.path.isfile(os.path.join(project_base, "Modules", fn)):
            return True
    return False
python_build = _python_build()


def get_python_version():
    """Return a string containing the major and minor Python version,
    leaving off the patchlevel.  Sample return values could be '1.5'
    or '2.2'.
    """
    return sys.version[:3]


def get_python_inc(plat_specific=0, prefix=None):
    """Return the directory containing installed Python header files.

    If 'plat_specific' is false (the default), this is the path to the
    non-platform-specific header files, i.e. Python.h and so on;
    otherwise, this is the path to platform-specific header files
    (namely pyconfig.h).

    If 'prefix' is supplied, use it instead of sys.prefix or
    sys.exec_prefix -- i.e., ignore 'plat_specific'.
    """
    if prefix is None:
        prefix = plat_specific and EXEC_PREFIX or PREFIX

    if os.name == "posix":
        if python_build:
            if sys.executable:
                buildir = os.path.dirname(sys.executable)
            else:
                # sys.executable can be empty if argv[0] has been changed
                # and Python is unable to retrieve the real program name
                buildir = os.getcwd()
            if plat_specific:
                # python.h is located in the buildir
                inc_dir = buildir
            else:
                # the source dir is relative to the buildir
                srcdir = os.path.abspath(os.path.join(buildir,
                                         get_config_var('srcdir')))
                # Include is located in the srcdir
                inc_dir = os.path.join(srcdir, "Include")
            return inc_dir
        return os.path.join(prefix, "include", "python" + get_python_version())
    elif os.name == "nt":
        return os.path.join(prefix, "include")
    elif os.name == "os2":
        return os.path.join(prefix, "Include")
    else:
        raise DistutilsPlatformError(
            "I don't know where Python installs its C header files "
            "on platform '%s'" % os.name)


def get_python_lib(plat_specific=0, standard_lib=0, prefix=None):
    """Return the directory containing the Python library (standard or
    site additions).

    If 'plat_specific' is true, return the directory containing
    platform-specific modules, i.e. any module from a non-pure-Python
    module distribution; otherwise, return the platform-shared library
    directory.  If 'standard_lib' is true, return the directory
    containing standard Python library modules; otherwise, return the
    directory for site-specific modules.

    If 'prefix' is supplied, use it instead of sys.prefix or
    sys.exec_prefix -- i.e., ignore 'plat_specific'.
    """
    if prefix is None:
        prefix = plat_specific and EXEC_PREFIX or PREFIX

    if os.name == "posix":
        if plat_specific or standard_lib:
            lib = "lib64"
        else:
            lib = "lib"
        libpython = os.path.join(prefix,
                                 lib, "python" + get_python_version())
        if standard_lib:
            return libpython
        else:
            return os.path.join(libpython, "site-packages")

    elif os.name == "nt":
        if standard_lib:
            return os.path.join(prefix, "Lib")
        else:
            if get_python_version() < "2.2":
                return prefix
            else:
                return os.path.join(prefix, "Lib", "site-packages")

    elif os.name == "os2":
        if standard_lib:
            return os.path.join(prefix, "Lib")
        else:
            return os.path.join(prefix, "Lib", "site-packages")

    else:
        raise DistutilsPlatformError(
            "I don't know where Python installs its library "
            "on platform '%s'" % os.name)



def customize_compiler(compiler):
    """Do any platform-specific customization of a CCompiler instance.

    Mainly needed on Unix, so we can plug in the information that
    varies across Unices and is stored in Python's Makefile.
    """
    if compiler.compiler_type == "unix":
        if sys.platform == "darwin":
            # Perform first-time customization of compiler-related
            # config vars on OS X now that we know we need a compiler.
            # This is primarily to support Pythons from binary
            # installers.  The kind and paths to build tools on
            # the user system may vary significantly from the system
            # that Python itself was built on.  Also the user OS
            # version and build tools may not support the same set
            # of CPU architectures for universal builds.
            global _config_vars
            # Use get_config_var() to ensure _config_vars is initialized.
            if not get_config_var('CUSTOMIZED_OSX_COMPILER'):
                import _osx_support
                _osx_support.customize_compiler(_config_vars)
                _config_vars['CUSTOMIZED_OSX_COMPILER'] = 'True'

        (cc, cxx, cflags, ccshared, ldshared, so_ext, ar, ar_flags) = \
            get_config_vars('CC', 'CXX', 'CFLAGS',
                            'CCSHARED', 'LDSHARED', 'SO', 'AR',
                            'ARFLAGS')

        if 'CC' in os.environ:
            newcc = os.environ['CC']
            if (sys.platform == 'darwin'
                    and 'LDSHARED' not in os.environ
                    and ldshared.startswith(cc)):
                # On OS X, if CC is overridden, use that as the default
                #       command for LDSHARED as well
                ldshared = newcc + ldshared[len(cc):]
            cc = newcc
        if 'CXX' in os.environ:
            cxx = os.environ['CXX']
        if 'LDSHARED' in os.environ:
            ldshared = os.environ['LDSHARED']
        if 'CPP' in os.environ:
            cpp = os.environ['CPP']
        else:
            cpp = cc + " -E"           # not always
        if 'LDFLAGS' in os.environ:
            ldshared = ldshared + ' ' + os.environ['LDFLAGS']
        if 'CFLAGS' in os.environ:
            cflags = cflags + ' ' + os.environ['CFLAGS']
            ldshared = ldshared + ' ' + os.environ['CFLAGS']
        if 'CPPFLAGS' in os.environ:
            cpp = cpp + ' ' + os.environ['CPPFLAGS']
            cflags = cflags + ' ' + os.environ['CPPFLAGS']
            ldshared = ldshared + ' ' + os.environ['CPPFLAGS']
        if 'AR' in os.environ:
            ar = os.environ['AR']
        if 'ARFLAGS' in os.environ:
            archiver = ar + ' ' + os.environ['ARFLAGS']
        else:
            archiver = ar + ' ' + ar_flags

        cc_cmd = cc + ' ' + cflags
        compiler.set_executables(
            preprocessor=cpp,
            compiler=cc_cmd,
            compiler_so=cc_cmd + ' ' + ccshared,
            compiler_cxx=cxx,
            linker_so=ldshared,
            linker_exe=cc,
            archiver=archiver)

        compiler.shared_lib_extension = so_ext


def get_config_h_filename():
    """Return full pathname of installed pyconfig.h file."""
    if python_build:
        if os.name == "nt":
            inc_dir = os.path.join(project_base, "PC")
        else:
            inc_dir = project_base
    else:
        inc_dir = get_python_inc(plat_specific=1)
    if get_python_version() < '2.2':
        config_h = 'config.h'
    else:
        # The name of the config.h file changed in 2.2
        config_h = 'pyconfig.h'
    return os.path.join(inc_dir, config_h)


def get_makefile_filename():
    """Return full pathname of installed Makefile from the Python build."""
    if python_build:
        return os.path.join(project_base, "Makefile")
    lib_dir = get_python_lib(plat_specific=1, standard_lib=1)
    return os.path.join(lib_dir, "config", "Makefile")


def parse_config_h(fp, g=None):
    """Parse a config.h-style file.

    A dictionary containing name/value pairs is returned.  If an
    optional dictionary is passed in as the second argument, it is
    used instead of a new dictionary.
    """
    if g is None:
        g = {}
    define_rx = re.compile("#define ([A-Z][A-Za-z0-9_]+) (.*)\n")
    undef_rx = re.compile("/[*] #undef ([A-Z][A-Za-z0-9_]+) [*]/\n")
    #
    while 1:
        line = fp.readline()
        if not line:
            break
        m = define_rx.match(line)
        if m:
            n, v = m.group(1, 2)
            try: v = int(v)
            except ValueError: pass
            g[n] = v
        else:
            m = undef_rx.match(line)
            if m:
                g[m.group(1)] = 0
    return g


# Regexes needed for parsing Makefile (and similar syntaxes,
# like old-style Setup files).
_variable_rx = re.compile("([a-zA-Z][a-zA-Z0-9_]+)\s*=\s*(.*)")
_findvar1_rx = re.compile(r"\$\(([A-Za-z][A-Za-z0-9_]*)\)")
_findvar2_rx = re.compile(r"\${([A-Za-z][A-Za-z0-9_]*)}")

def parse_makefile(fn, g=None):
    """Parse a Makefile-style file.

    A dictionary containing name/value pairs is returned.  If an
    optional dictionary is passed in as the second argument, it is
    used instead of a new dictionary.
    """
    from distutils.text_file import TextFile
    fp = TextFile(fn, strip_comments=1, skip_blanks=1, join_lines=1)

    if g is None:
        g = {}
    done = {}
    notdone = {}

    while 1:
        line = fp.readline()
        if line is None:  # eof
            break
        m = _variable_rx.match(line)
        if m:
            n, v = m.group(1, 2)
            v = v.strip()
            # `$$' is a literal `$' in make
            tmpv = v.replace('$$', '')

            if "$" in tmpv:
                notdone[n] = v
            else:
                try:
                    v = int(v)
                except ValueError:
                    # insert literal `$'
                    done[n] = v.replace('$$', '$')
                else:
                    done[n] = v

    # do variable interpolation here
    while notdone:
        for name in notdone.keys():
            value = notdone[name]
            m = _findvar1_rx.search(value) or _findvar2_rx.search(value)
            if m:
                n = m.group(1)
                found = True
                if n in done:
                    item = str(done[n])
                elif n in notdone:
                    # get it on a subsequent round
                    found = False
                elif n in os.environ:
                    # do it like make: fall back to environment
                    item = os.environ[n]
                else:
                    done[n] = item = ""
                if found:
                    after = value[m.end():]
                    value = value[:m.start()] + item + after
                    if "$" in after:
                        notdone[name] = value
                    else:
                        try: value = int(value)
                        except ValueError:
                            done[name] = value.strip()
                        else:
                            done[name] = value
                        del notdone[name]
            else:
                # bogus variable reference; just drop it since we can't deal
                del notdone[name]

    fp.close()

    # strip spurious spaces
    for k, v in done.items():
        if isinstance(v, str):
            done[k] = v.strip()

    # save the results in the global dictionary
    g.update(done)
    return g


def expand_makefile_vars(s, vars):
    """Expand Makefile-style variables -- "${foo}" or "$(foo)" -- in
    'string' according to 'vars' (a dictionary mapping variable names to
    values).  Variables not present in 'vars' are silently expanded to the
    empty string.  The variable values in 'vars' should not contain further
    variable expansions; if 'vars' is the output of 'parse_makefile()',
    you're fine.  Returns a variable-expanded version of 's'.
    """

    # This algorithm does multiple expansion, so if vars['foo'] contains
    # "${bar}", it will expand ${foo} to ${bar}, and then expand
    # ${bar}... and so forth.  This is fine as long as 'vars' comes from
    # 'parse_makefile()', which takes care of such expansions eagerly,
    # according to make's variable expansion semantics.

    while 1:
        m = _findvar1_rx.search(s) or _findvar2_rx.search(s)
        if m:
            (beg, end) = m.span()
            s = s[0:beg] + vars.get(m.group(1)) + s[end:]
        else:
            break
    return s


_config_vars = None

def _init_posix():
    """Initialize the module as appropriate for POSIX systems."""
    # _sysconfigdata is generated at build time, see the sysconfig module
    from _sysconfigdata import build_time_vars
    global _config_vars
    _config_vars = {}
    _config_vars.update(build_time_vars)


def _init_nt():
    """Initialize the module as appropriate for NT"""
    g = {}
    # set basic install directories
    g['LIBDEST'] = get_python_lib(plat_specific=0, standard_lib=1)
    g['BINLIBDEST'] = get_python_lib(plat_specific=1, standard_lib=1)

    # XXX hmmm.. a normal install puts include files here
    g['INCLUDEPY'] = get_python_inc(plat_specific=0)

    g['SO'] = '.pyd'
    g['EXE'] = ".exe"
    g['VERSION'] = get_python_version().replace(".", "")
    g['BINDIR'] = os.path.dirname(os.path.abspath(sys.executable))

    global _config_vars
    _config_vars = g


def _init_os2():
    """Initialize the module as appropriate for OS/2"""
    g = {}
    # set basic install directories
    g['LIBDEST'] = get_python_lib(plat_specific=0, standard_lib=1)
    g['BINLIBDEST'] = get_python_lib(plat_specific=1, standard_lib=1)

    # XXX hmmm.. a normal install puts include files here
    g['INCLUDEPY'] = get_python_inc(plat_specific=0)

    g['SO'] = '.pyd'
    g['EXE'] = ".exe"

    global _config_vars
    _config_vars = g


def get_config_vars(*args):
    """With no arguments, return a dictionary of all configuration
    variables relevant for the current platform.  Generally this includes
    everything needed to build extensions and install both pure modules and
    extensions.  On Unix, this means every variable defined in Python's
    installed Makefile; on Windows and Mac OS it's a much smaller set.

    With arguments, return a list of values that result from looking up
    each argument in the configuration variable dictionary.
    """
    global _config_vars
    if _config_vars is None:
        func = globals().get("_init_" + os.name)
        if func:
            func()
        else:
            _config_vars = {}

        # Normalized versions of prefix and exec_prefix are handy to have;
        # in fact, these are the standard versions used most places in the
        # Distutils.
        _config_vars['prefix'] = PREFIX
        _config_vars['exec_prefix'] = EXEC_PREFIX

        # OS X platforms require special customization to handle
        # multi-architecture, multi-os-version installers
        if sys.platform == 'darwin':
            import _osx_support
            _osx_support.customize_config_vars(_config_vars)

    if args:
        vals = []
        for name in args:
            vals.append(_config_vars.get(name))
        return vals
    else:
        return _config_vars

def get_config_var(name):
    """Return the value of a single variable using the dictionary
    returned by 'get_config_vars()'.  Equivalent to
    get_config_vars().get(name)
    """
    return get_config_vars().get(name)
PKW[e|��% % unixccompiler.pycnu�[����
{fc@s�dZdZddlZddlZddlZddlmZmZddlm	Z	ddl
mZddlm
Z
mZmZddlmZmZmZmZdd	lmZejd
kr�ddlZnde
fd��YZdS(
s9distutils.unixccompiler

Contains the UnixCCompiler class, a subclass of CCompiler that handles
the "typical" Unix-style command-line C compiler:
  * macros defined with -Dname[=value]
  * macros undefined with -Uname
  * include search directories specified with -Idir
  * libraries specified with -lllib
  * library search directories specified with -Ldir
  * compile handled by 'cc' (or similar) executable with -c option:
    compiles .c to .o
  * link static library handled by 'ar' command (possibly with 'ranlib')
  * link shared library handled by 'cc -shared'
s$Id$i����N(t
StringTypetNoneType(t	sysconfig(tnewer(t	CCompilertgen_preprocess_optionstgen_lib_options(tDistutilsExecErrortCompileErrortLibErrort	LinkError(tlogtdarwint
UnixCCompilercBs|eZdZid(d6dgd6dgd6dgd6ddgd6dgd6d	d
gd6d(d6Zejd
 dkr�dged<nddddddgZdZdZ	dZ
dZdZdZ
ZZeZejdkr�dZnd�Zd(d(d(d(d(d�Zd�Zd(d d(d!�Zd(d(d(d(d(d d(d(d(d(d"�
Zd#�Zd$�Zd%�Zd&�Zd d'�ZRS()tunixtpreprocessortcctcompilertcompiler_sotcompiler_cxxs-sharedt	linker_sot
linker_exetars-crtarchivertranlibiRs.cs.Cs.ccs.cxxs.cpps.ms.os.as.sos.dylibs.tbdslib%s%stcygwins.execCs_tj||||�\}}}tjd�}|rR||krR|j|�n|||fS(s'Remove standard library path from rpathtLIBDIR(Rt
_fix_lib_argsRtget_config_vartremove(tselft	librariestlibrary_dirstruntime_library_dirstlibdir((s//usr/lib64/python2.7/distutils/unixccompiler.pyRXscCs	|jd||�\}}}t||�}|j|}	|rV|	jd|g�n|ri||	d*n|r|	j|�n|	j|�|js�|dks�t||�r|r�|jt	j
j|��ny|j|	�Wqt
k
r}
t|
�qXndS(Ns-oi(t_fix_compile_argstNoneRRtextendtappendtforceRtmkpathtostpathtdirnametspawnRR(Rtsourcetoutput_filetmacrostinclude_dirst
extra_preargstextra_postargstignoretpp_optstpp_argstmsg((s//usr/lib64/python2.7/distutils/unixccompiler.pyt
preprocessbs"


$c	Csz|j}tjdkr1tj|||�}ny&|j|||d|g|�Wntk
ru}t|�nXdS(NRs-o(Rtsystplatformt_osx_supporttcompiler_fixupR,RR(	Rtobjtsrctexttcc_argsR2R4RR6((s//usr/lib64/python2.7/distutils/unixccompiler.pyt_compile}s		icCs�|j||�\}}|j|d|�}|j||�r�|jtjj|��|j|j|g||j	�|j
r�y|j|j
|g�Wq�tk
r�}t|�q�Xq�nt
jd|�dS(Nt
output_dirsskipping %s (up-to-date)(t_fix_object_argstlibrary_filenamet
_need_linkR(R)R*R+R,RtobjectsRRR	Rtdebug(RREtoutput_libnameRARFttarget_langtoutput_filenameR6((s//usr/lib64/python2.7/distutils/unixccompiler.pytcreate_static_lib�s	cCs"|j||�\}}|j|||�\}}}t||||�}t|�ttfkrotd�n|dk	r�tj	j
||�}n|j||�r||j|d|g}|	r�dg|d*n|
r�|
|d*n|r�|j
|�n|jtj	j|��y�|tjkr7|j}n
|j}|
dkr�|jr�d}tj	j|d�dkr�d}x!d||kr�|d}q�Wn|j|||<ntjd	kr�tj||�}n|j||�Wqtk
r
}t|�qXntjd
|�dS(Ns%'output_dir' must be a string or Nones-os-gisc++tenvit=Rsskipping %s (up-to-date)(RBRRttypeRRt	TypeErrorR$R)R*tjoinRDRER%R(R+Rt
EXECUTABLERRRtbasenameR8R9R:R;R,RR
RRF(Rttarget_descRERIRARR R!texport_symbolsRFR1R2t
build_tempRHtlib_optstld_argstlinkertiR6((s//usr/lib64/python2.7/distutils/unixccompiler.pytlink�sD	


cCsd|S(Ns-L((Rtdir((s//usr/lib64/python2.7/distutils/unixccompiler.pytlibrary_dir_option�scCsd|kpd|kS(Ntgccsg++((Rt
compiler_name((s//usr/lib64/python2.7/distutils/unixccompiler.pyt_is_gcc�scCs�tjjtjd��}tjd dkr6d|Stjd dkrQd|Stjd d	kr�|j|�r�d
d|gSdd|gStjd dks�tjd d
kr�d|gS|j|�r�d|Sd|SdS(NtCCiRs-Litfreebsds-Wl,-rpath=ishp-uxs-Wl,+ss+stirix646tosf1V5s-rpaths-Wl,-Rs-R(R)R*RQRRR8R9R^(RRZR((s//usr/lib64/python2.7/distutils/unixccompiler.pytruntime_library_dir_option�s
&
cCsd|S(Ns-l((Rtlib((s//usr/lib64/python2.7/distutils/unixccompiler.pytlibrary_optionscCs|j|dd�}|j|dd�}|j|dd�}|j|dd�}tjdkr�tjd�}tjd|�}	|	dkr�d	}
q�|	jd
�}
nxj|D]b}t	j
j||�}t	j
j||�}
t	j
j||�}t	j
j||�}tjdkr�|jd�sI|jd�r�|jd
�r�t	j
j|
|d
|�}t	j
j|
|d
|�}
t	j
j|
|d
|�}t	j
j|
|d
|�}nt	j
j
|
�r�|
St	j
j
|�r�|St	j
j
|�r�|St	j
j
|�r�|Sq�WdS(Ntlib_typetsharedtdylibt
xcode_stubtstaticRtCFLAGSs-isysroot\s+(\S+)t/is/System/s/usr/s/usr/local/(RCR8R9RRtretsearchR$tgroupR)R*ROt
startswithtexists(RtdirsRdRFtshared_ftdylib_ftxcode_stub_ftstatic_ftcflagstmtsysrootRZRgRhRjRi((s//usr/lib64/python2.7/distutils/unixccompiler.pytfind_library_files>	
N(t__name__t
__module__t
compiler_typeR$texecutablesR8R9tsrc_extensionst
obj_extensiontstatic_lib_extensiontshared_lib_extensiontdylib_lib_extensiontxcode_stub_lib_extensiontstatic_lib_formattshared_lib_formattdylib_lib_formattxcode_stub_lib_formatt
exe_extensionRR7R@RJRYR[R^RcReRz(((s//usr/lib64/python2.7/distutils/unixccompiler.pyR
0sF







					6				(t__doc__t__revision__R)R8RmttypesRRt	distutilsRtdistutils.dep_utilRtdistutils.ccompilerRRRtdistutils.errorsRRR	R
RR9R:R
(((s//usr/lib64/python2.7/distutils/unixccompiler.pyt<module>s$"PKW[<Bu2uDuDmsvccompiler.pyonu�[����
{fc@sdZdZddlZddlZddlZddlmZmZmZm	Z	m
Z
ddlmZm
Z
ddlmZdZy@ddlZdZeZejZejZejZejZWn~ek
rDyLddlZddlZdZeZejZejZejZejZWnek
r@ejd	�nXnXerlejej ej!ej"fZ#nd
�Z$d�Z%d�Z&d
fd��YZ'd�Z(d�Z)d�Z*defd��YZ+e(�dkrej,d�e+Z-ddl.m+Z+ddl.m'Z'ndS(s�distutils.msvccompiler

Contains MSVCCompiler, an implementation of the abstract CCompiler class
for the Microsoft Visual Studio.
s$Id$i����N(tDistutilsExecErrortDistutilsPlatformErrortCompileErrortLibErrort	LinkError(t	CCompilertgen_lib_options(tlogiis�Warning: Can't read registry to find the necessary compiler setting
Make sure that Python modules _winreg, win32api or win32con are installed.cCs~yt||�}Wntk
r'dSXg}d}xCyt||�}Wntk
r^PnX|j|�|d}q7W|S(sReturn list of registry keys.iiN(tRegOpenKeyExtRegErrortNonet
RegEnumKeytappend(tbasetkeythandletLtitk((s./usr/lib64/python2.7/distutils/msvccompiler.pyt	read_keys;s


cCs�yt||�}Wntk
r'dSXi}d}xayt||�\}}}Wntk
rgPnX|j�}t|�|t|�<|d}q7W|S(sXReturn dict of registry keys and values.

    All names are converted to lowercase.
    iiN(RR	R
tRegEnumValuetlowertconvert_mbcs(R
RRtdRtnametvaluettype((s./usr/lib64/python2.7/distutils/msvccompiler.pytread_valuesMs

cCsIt|dd�}|dk	rEy|d�}WqEtk
rAqEXn|S(Ntencodetmbcs(tgetattrR
tUnicodeError(tstenc((s./usr/lib64/python2.7/distutils/msvccompiler.pyRbs
t
MacroExpandercBs,eZd�Zd�Zd�Zd�ZRS(cCsi|_|j|�dS(N(tmacrostload_macros(tselftversion((s./usr/lib64/python2.7/distutils/msvccompiler.pyt__init__ms	cCsCx<tD]4}t||�}|r|||jd|<PqqWdS(Ns$(%s)(tHKEYSRR#(R%tmacrotpathRR
R((s./usr/lib64/python2.7/distutils/msvccompiler.pyt	set_macroqs

c	Cs%d|}|jd|dd�|jd|dd�d}|jd|d	�y9|d
krv|jd|d�n|jd|d
�Wntk
r�td�nXd}xqtD]i}yt||�}Wntk
r�q�nXt|d�}t|d||f�}|d|jd<q�WdS(Ns%Software\Microsoft\VisualStudio\%0.1ftVCInstallDirs	\Setup\VCt
productdirtVSInstallDirs	\Setup\VSs Software\Microsoft\.NETFrameworktFrameworkDirtinstallrootg@tFrameworkSDKDirssdkinstallrootv1.1tsdkinstallrootsPython was built with Visual Studio 2003;
extensions must be built with a compiler than can generate compatible binaries.
Visual Studio 2003 was not found on this system. If you have Cygwin installed,
you can try compiling with MingW32, by passing "-c mingw32" to setup.py.s.Software\Microsoft\NET Framework Setup\Productis%s\%sR&s$(FrameworkVersion)(	R+tKeyErrorRR(RR	RRR#(	R%R&tvsbasetnettpR
thRR((s./usr/lib64/python2.7/distutils/msvccompiler.pyR$xs*




cCs9x2|jj�D]!\}}tj|||�}qW|S(N(R#titemststringtreplace(R%R Rtv((s./usr/lib64/python2.7/distutils/msvccompiler.pytsub�s(t__name__t
__module__R'R+R$R<(((s./usr/lib64/python2.7/distutils/msvccompiler.pyR"ks			cCs�d}tjtj|�}|dkr+dS|t|�}tj|jdd�\}}t|d �d}t|dd!�d	}|dkr�d
}n|dkr�||SdS(s�Return the version of MSVC that was used to build Python.

    For Python 2.3 and up, the version number is included in
    sys.version.  For earlier versions, assume the compiler is MSVC 6.
    sMSC v.i����it ii����iig$@iN(R9tfindtsysR&tlentsplittintR
(tprefixRR tresttmajorVersiontminorVersion((s./usr/lib64/python2.7/distutils/msvccompiler.pytget_build_version�s	cCs[d}tjtj|�}|dkr+dStjtjd|�}tj|t|�|!S(saReturn the processor architecture.

    Possible results are "Intel", "Itanium", or "AMD64".
    s bit (i����tIntelt)(R9R@RAR&RB(RERtj((s./usr/lib64/python2.7/distutils/msvccompiler.pytget_build_architecture�scCsIg}x<|D]4}tjj|�}||kr
|j|�q
q
W|S(snReturn a list of normalized paths with duplicates removed.

    The current order of paths is maintained.
    (tosR*tnormpathR(tpathst
reduced_pathsR6tnp((s./usr/lib64/python2.7/distutils/msvccompiler.pytnormalize_and_reduce_paths�s
tMSVCCompilercBsDeZdZdZiZdgZdddgZdgZdgZeeeeZ	dZ
d	Zd
ZdZ
dZZd
Zdddd�Zd�Zddd�Zdddddddd�Zdddd�Zddddddddddd�
Zd�Zd�Zd�Zdd�Zd�Zdd�Zd�ZRS(swConcrete class that implements an interface to Microsoft Visual C++,
       as defined by the CCompiler abstract class.tmsvcs.cs.ccs.cpps.cxxs.rcs.mcs.ress.objs.libs.dlls%s%ss.exeicCs�tj||||�t�|_t�|_|jdkr�|jdkrjd|_t|j�|_n	d|_d|j|_	nd|jd|_	t
|_dS(NRJisSoftware\Microsoft\VisualStudiosSoftware\Microsoft\DevstudiosVisual Studio version %ssMicrosoft SDK compiler %si(RR'RIt_MSVCCompiler__versionRMt_MSVCCompiler__archt_MSVCCompiler__rootR"t_MSVCCompiler__macrost_MSVCCompiler__producttFalsetinitialized(R%tverbosetdry_runtforce((s./usr/lib64/python2.7/distutils/msvccompiler.pyR'�s		cCs�g|_dtjkrfdtjkrf|jd�rfd|_d|_d|_d|_d|_n�|j	d�|_t
|j�d	kr�td
|j�n|jd�|_|jd�|_|jd�|_|jd�|_|jd�|_|j
d�|j
d�y8x1tjtjdd
�D]}|jj|�q1WWntk
r_nXt|j�|_tj|jd
�tjd<d|_|jdkr�ddddddg|_dddddddg|_n9ddddddg|_dddddddg|_dddg|_|jdkrTddddg|_ndddddg|_dg|_t|_dS( NtDISTUTILS_USE_SDKtMSSdkscl.exeslink.exeslib.exesrc.exesmc.exeR*isxPython was built with %s, and extensions need to be built with the same version of the compiler, but it isn't installed.tlibtincludet;RJs/nologos/Oxs/MDs/W3s/GXs/DNDEBUGs/Ods/MDds/Z7s/D_DEBUGs/GS-s/DLLs/INCREMENTAL:NOis/INCREMENTAL:nos/DEBUGs	/pdb:None(t_MSVCCompiler__pathsRNtenvirontfind_exetcctlinkerRbtrctmctget_msvc_pathsRBRRZtset_path_env_varR9RCRR3RStjoinR
tpreprocess_optionsRWtcompile_optionstcompile_options_debugtldflags_sharedRVtldflags_shared_debugtldflags_statictTrueR\(R%R6((s./usr/lib64/python2.7/distutils/msvccompiler.pyt
initialize�sT	-				


 
	tcCs>|dkrd}ng}x|D]}tjj|�\}}tjj|�d}|tjj|�}||jkr�td|��n|r�tjj|�}n||j	kr�|j
tjj|||j��q"||j
kr|j
tjj|||j��q"|j
tjj|||j��q"W|S(NRwisDon't know how to compile %s(R
RNR*tsplitextt
splitdrivetisabstsrc_extensionsRtbasenamet_rc_extensionsRRnt
res_extensiont_mc_extensionst
obj_extension(R%tsource_filenamest	strip_dirt
output_dirt	obj_namestsrc_nameR
text((s./usr/lib64/python2.7/distutils/msvccompiler.pytobject_filenames<s(	
c	Cs�|js|j�n|j||||||�\}}	}}
}|pLg}|jd�|ru|j|j�n|j|j�xM|	D]E}
y||
\}}Wntk
r�q�nX|r�tj	j
|�}n||jkr�d|}n�||jkrd|}nk||j
kr}|}d|
}y)|j|jg|
|g|g�Wq�tk
rv}t|�q�Xq�n�||jkretj	j|�}tj	j|
�}y�|j|jgd|d|g|g�tj	jtj	j|��\}}tj	j||d�}|j|jgd|
g|g�Wq�tk
r^}t|�q�Xq�ntd||
f��d	|
}y-|j|jg||
||g|�Wq�tk
r�}t|�q�Xq�W|	S(
Ns/cs/Tcs/Tps/fos-hs-rs.rcs"Don't know how to compile %s to %ss/Fo(R\Rvt_setup_compileRtextendRqRpR3RNR*tabspatht
_c_extensionst_cpp_extensionsR}tspawnRjRRRtdirnameRkRxR|RnRh(R%tsourcesR�R#tinclude_dirstdebugt
extra_preargstextra_postargstdependstobjectstpp_optstbuildtcompile_optstobjtsrcR�t	input_optt
output_opttmsgth_dirtrc_dirR
t_trc_file((s./usr/lib64/python2.7/distutils/msvccompiler.pytcompile]sj	






#
$$#

c	Cs�|js|j�n|j||�\}}|j|d|�}|j||�r�|d|g}|rony|j|jg|�Wq�tk
r�}t|�q�Xnt	j
d|�dS(NR�s/OUT:sskipping %s (up-to-date)(R\Rvt_fix_object_argstlibrary_filenamet
_need_linkR�RbRRRR�(	R%R�toutput_libnameR�R�ttarget_langtoutput_filenametlib_argsR�((s./usr/lib64/python2.7/distutils/msvccompiler.pytcreate_static_lib�s	
cCsW|js|j�n|j||�\}}|j|||�\}}}|rl|jdt|��nt||||�}|dk	r�tj	j
||�}n|j||�rC|tj
kr�|	r�|jd}q|jd}n|	r�|j}n	|j}g}x%|pgD]}|jd|�qW||||d|g}|dk	r�tj	jtj	j|��\}}tj	j
tj	j|d�|j|��}|jd|�n|
r�|
|d*n|r�|j|�n|jtj	j|��y|j|jg|�WqStk
r?}t|�qSXntjd|�dS(Ns5I don't know what to do with 'runtime_library_dirs': is/EXPORT:s/OUT:is/IMPLIB:sskipping %s (up-to-date)(R\RvR�t
_fix_lib_argstwarntstrRR
RNR*RnR�Rt
EXECUTABLERsRrRRxR|R�R�R�tmkpathR�RiRRRR�(R%ttarget_descR�R�R�t	librariestlibrary_dirstruntime_library_dirstexport_symbolsR�R�R�t
build_tempR�tlib_optstldflagstexport_optstsymtld_argstdll_nametdll_exttimplib_fileR�((s./usr/lib64/python2.7/distutils/msvccompiler.pytlink�sR	
					
cCsd|S(Ns	/LIBPATH:((R%tdir((s./usr/lib64/python2.7/distutils/msvccompiler.pytlibrary_dir_option$scCs
td�dS(Ns<don't know how to set runtime library search path for MSVC++(R(R%R�((s./usr/lib64/python2.7/distutils/msvccompiler.pytruntime_library_dir_option'scCs
|j|�S(N(R�(R%Rb((s./usr/lib64/python2.7/distutils/msvccompiler.pytlibrary_option+scCs�|r|d|g}n	|g}xW|D]K}xB|D]:}tjj||j|��}tjj|�r6|Sq6Wq)WdSdS(Nt_d(RNR*RnR�texistsR
(R%tdirsRbR�t	try_namesR�Rtlibfile((s./usr/lib64/python2.7/distutils/msvccompiler.pytfind_library_file/s	

cCs�xH|jD]=}tjjtjj|�|�}tjj|�r
|Sq
WxXtjtjdd�D]=}tjjtjj|�|�}tjj|�re|SqeW|S(s�Return path to an MSVC executable program.

        Tries to find the program in several places: first, one of the
        MSVC program search paths from the registry; next, the directories
        in the PATH environment variable.  If any of those work, return an
        absolute path that is known to exist.  If none of them work, just
        return the original program name, 'exe'.
        tPathRd(	ReRNR*RnR�tisfileR9RCRf(R%texeR6tfn((s./usr/lib64/python2.7/distutils/msvccompiler.pyRgCs
! !tx86cCsts
gS|d}|jdkr<d|j|jf}nd|j|f}xitD]a}t||�}|rV|jdkr�tj|jj||�d�Stj||d�SqVqVW|jdkrx>tD]3}t|d|j�d	k	r�|j
d�Pq�q�WngS(
s�Get a list of devstudio directories (include, lib or path).

        Return a list of strings.  The list will be empty if unable to
        access the registry or appropriate registry keys not found.
        s dirsis6%s\%0.1f\VC\VC_OBJECTS_PLATFORM_INFO\Win32\Directoriess?%s\6.0\Build System\Components\Platforms\Win32 (%s)\DirectoriesRdis%s\6.0s�It seems you have Visual Studio 6 installed, but the expected registry settings are not present.
You must at least run the Visual Studio GUI once so that these entries are created.N(t
_can_read_regRVRXR(RR9RCRYR<R
R�(R%R*tplatformRR
R((s./usr/lib64/python2.7/distutils/msvccompiler.pyRlZs(

 

cCsS|dkr|jd�}n|j|�}|rOtj|d�tj|<ndS(s�Set environment variable 'name' to an MSVC path type value.

        This is equivalent to a SET command prior to execution of spawned
        commands.
        RbtlibraryRdN(RlR9RnRNRf(R%RR6((s./usr/lib64/python2.7/distutils/msvccompiler.pyRms
N(R=R>t__doc__t
compiler_typetexecutablesR�R�R}RR{R~R�tstatic_lib_extensiontshared_lib_extensiontstatic_lib_formattshared_lib_formatt
exe_extensionR'RvR�R
R�R�R�R�R�R�R�RgRlRm(((s./usr/lib64/python2.7/distutils/msvccompiler.pyRT�sP			
	BZG				%g @s3Importing new compiler from distutils.msvc9compiler(RT(R"(/R�t__revision__RARNR9tdistutils.errorsRRRRRtdistutils.ccompilerRRt	distutilsRR�t_winregthkey_modt	OpenKeyExRtEnumKeyRt	EnumValueRterrorR	tImportErrortwin32apitwin32continfot
HKEY_USERStHKEY_CURRENT_USERtHKEY_LOCAL_MACHINEtHKEY_CLASSES_ROOTR(RRRR"RIRMRSRTR�tOldMSVCCompilertdistutils.msvc9compiler(((s./usr/lib64/python2.7/distutils/msvccompiler.pyt<module>s`(			

			


				.		
	��
PKW[��%z+$+$
text_file.pyonu�[����
{fc@s/dZdZddlZddd��YZdS(s�text_file

provides the TextFile class, which gives an interface to text files
that (optionally) takes care of stripping comments, ignoring blank
lines, and joining lines with backslashes.s$Id$i����NtTextFilecBs�eZdZidd6dd6dd6dd6dd6dd6Zddd	�Zd
�Zd�Zdd�Zdd
�Z	dd�Z
d�Zd�Zd�Z
RS(s�Provides a file-like object that takes care of all the things you
       commonly want to do when processing a text file that has some
       line-by-line syntax: strip comments (as long as "#" is your
       comment character), skip blank lines, join adjacent lines by
       escaping the newline (ie. backslash at end of line), strip
       leading and/or trailing whitespace.  All of these are optional
       and independently controllable.

       Provides a 'warn()' method so you can generate warning messages that
       report physical line number, even if the logical line in question
       spans multiple physical lines.  Also provides 'unreadline()' for
       implementing line-at-a-time lookahead.

       Constructor is called as:

           TextFile (filename=None, file=None, **options)

       It bombs (RuntimeError) if both 'filename' and 'file' are None;
       'filename' should be a string, and 'file' a file object (or
       something that provides 'readline()' and 'close()' methods).  It is
       recommended that you supply at least 'filename', so that TextFile
       can include it in warning messages.  If 'file' is not supplied,
       TextFile creates its own using the 'open()' builtin.

       The options are all boolean, and affect the value returned by
       'readline()':
         strip_comments [default: true]
           strip from "#" to end-of-line, as well as any whitespace
           leading up to the "#" -- unless it is escaped by a backslash
         lstrip_ws [default: false]
           strip leading whitespace from each line before returning it
         rstrip_ws [default: true]
           strip trailing whitespace (including line terminator!) from
           each line before returning it
         skip_blanks [default: true}
           skip lines that are empty *after* stripping comments and
           whitespace.  (If both lstrip_ws and rstrip_ws are false,
           then some lines may consist of solely whitespace: these will
           *not* be skipped, even if 'skip_blanks' is true.)
         join_lines [default: false]
           if a backslash is the last non-newline character on a line
           after stripping comments and whitespace, join the following line
           to it to form one "logical line"; if N consecutive lines end
           with a backslash, then N+1 physical lines will be joined to
           form one logical line.
         collapse_join [default: false]
           strip leading whitespace from lines that are joined to their
           predecessor; only matters if (join_lines and not lstrip_ws)

       Note that since 'rstrip_ws' can strip the trailing newline, the
       semantics of 'readline()' must differ from those of the builtin file
       object's 'readline()' method!  In particular, 'readline()' returns
       None for end-of-file: an empty string might just be a blank line (or
       an all-whitespace line), if 'rstrip_ws' is true but 'skip_blanks' is
       not.itstrip_commentstskip_blanksit	lstrip_wst	rstrip_wst
join_linest
collapse_joincKs�|dkr$|dkr$td�nxQ|jj�D]@}||kr]t||||�q4t|||j|�q4Wx3|j�D]%}||jkr�td|�q�q�W|dkr�|j|�n||_||_d|_	g|_
dS(s�Construct a new TextFile object.  At least one of 'filename'
           (a string) and 'file' (a file-like object) must be supplied.
           They keyword argument options are described above and affect
           the values returned by 'readline()'.s7you must supply either or both of 'filename' and 'file'sinvalid TextFile option '%s'iN(tNonetRuntimeErrortdefault_optionstkeystsetattrtKeyErrortopentfilenametfiletcurrent_linetlinebuf(tselfRRtoptionstopt((s+/usr/lib64/python2.7/distutils/text_file.pyt__init__Ns 				cCs+||_t|jd�|_d|_dS(syOpen a new file named 'filename'.  This overrides both the
           'filename' and 'file' arguments to the constructor.triN(RR
RR(RR((s+/usr/lib64/python2.7/distutils/text_file.pyR
ss	cCs2|j}d|_d|_d|_|j�dS(siClose the current file and forget everything we know about it
           (filename, current line number).N(RRRRtclose(RR((s+/usr/lib64/python2.7/distutils/text_file.pyR|s
				cCs�g}|dkr|j}n|j|jd�t|ttf�ra|jdt|��n|jd|�|jt|��dj|�S(Ns, s
lines %d-%d: s	line %d: t(	RRtappendRt
isinstancetlistttupletstrtjoin(Rtmsgtlinetoutmsg((s+/usr/lib64/python2.7/distutils/text_file.pyt	gen_error�scCstd|j||��dS(Nserror: (t
ValueErrorR"(RRR ((s+/usr/lib64/python2.7/distutils/text_file.pyterror�scCs(tjjd|j||�d�dS(s�Print (to stderr) a warning message tied to the current logical
           line in the current file.  If the current logical line in the
           file spans multiple physical lines, the warning refers to the
           whole range, eg. "lines 3-5".  If 'line' supplied, it overrides
           the current line number; it may be a list or tuple to indicate a
           range of physical lines, or an integer for a single physical
           line.s	warning: s
N(tsyststderrtwriteR"(RRR ((s+/usr/lib64/python2.7/distutils/text_file.pytwarn�scCs�|jr$|jd}|jd=|Sd}x~|jj�}|dkrQd}n|jr�|r�|jd�}|dkr~q�|dks�||ddkr�|ddkr�dp�d}|d|!|}|j�dkr�q-q�q�|jdd�}n|jr�|r�|dkr'|j	d	�|S|j
r?|j�}n||}t|j
t�rv|j
dd|j
d<q�|j
|j
dg|_
nI|dkr�dSt|j
t�r�|j
dd|_
n|j
d|_
|jr�|jr�|j�}n0|jr|j�}n|jr,|j�}n|dksD|dkrS|jrSq-n|jr�|ddkr||d }q-n|d
dkr�|dd
!d}q-q�n|SWdS(
sURead and return a single logical line from the current file (or
           from an internal buffer if lines have previously been "unread"
           with 'unreadline()').  If the 'join_lines' option is true, this
           may involve reading multiple physical lines concatenated into a
           single string.  Updates the current line number, so calling
           'warn()' after 'readline()' emits a warning about the physical
           line(s) just read.  Returns None on end-of-file, since the empty
           string can occur if 'rstrip_ws' is true but 'strip_blanks' is
           not.i����Rt#iis\s
s\#s2continuation line immediately precedes end-of-filei����s\
N(RRtreadlineRRtfindtstriptreplaceRR(RtlstripRRRRRtrstripR(RR tbuildup_linetposteol((s+/usr/lib64/python2.7/distutils/text_file.pyR*�sf	

	
 		
	
		!	
	cCs:g}x-|j�}|dkr%|S|j|�q	WdS(sWRead and return the list of all logical lines remaining in the
           current file.N(R*RR(RtlinesR ((s+/usr/lib64/python2.7/distutils/text_file.pyt	readlinesscCs|jj|�dS(s�Push 'line' (a string) onto an internal buffer that will be
           checked by future 'readline()' calls.  Handy for implementing
           a parser with line-at-a-time lookahead.N(RR(RR ((s+/usr/lib64/python2.7/distutils/text_file.pyt
unreadline+sN(t__name__t
__module__t__doc__R	RRR
RR"R$R(R*R4R5(((s+/usr/lib64/python2.7/distutils/text_file.pyRs 8

%			

	~	((R8t__revision__R%R(((s+/usr/lib64/python2.7/distutils/text_file.pyt<module>sPKW[F5f#��bcppcompiler.pycnu�[����
{fc@s�dZdZddlZddlmZmZmZmZmZddl	m
Z
mZddlm
Z
ddlmZddlmZd	e
fd
��YZdS(s�distutils.bcppcompiler

Contains BorlandCCompiler, an implementation of the abstract CCompiler class
for the Borland C++ compiler.
s$Id$i����N(tDistutilsExecErrortCompileErrortLibErrort	LinkErrortUnknownFileError(t	CCompilertgen_preprocess_options(t
write_file(tnewer(tlogtBCPPCompilercBs�eZdZdZiZdgZdddgZeeZdZdZ	dZ
d	ZZd
Z
dddd�Zdddddddd
�Zdddd�Zddddddddddd�
Zdd�Zddd�Zdddddd�ZRS(sConcrete class that implements an interface to the Borland C/C++
    compiler, as defined by the CCompiler abstract class.
    tbcpps.cs.ccs.cpps.cxxs.objs.libs.dlls%s%ss.exeicCs�tj||||�d|_d|_d|_d|_ddddg|_ddddg|_d	d
ddg|_	d	d
ddg|_
g|_d
ddg|_d
dddg|_
dS(
Ns	bcc32.exesilink32.exestlib.exes/tWMs/O2s/qs/g0s/Ods/Tpds/Gns/xs/r(Rt__init__tcctlinkertlibtNonetpreprocess_optionstcompile_optionstcompile_options_debugtldflags_sharedtldflags_shared_debugtldflags_statictldflags_exetldflags_exe_debug(tselftverbosetdry_runtforce((s./usr/lib64/python2.7/distutils/bcppcompiler.pyR5s					c	Cs�|j||||||�\}}	}}
}|p6g}|jd�|r_|j|j�n|j|j�xi|	D]a}
y||
\}}Wntk
r�qvnXtjj|�}tjj|
�}
|j	tjj
|
��|dkr�qvn|dkrDy|jdd|
|g�Wqvtk
r=}t
|�qvXqvn||jkr\d}n||jkrtd}nd}d|
}y4|j|jg||
||g||g�Wqvtk
r�}t
|�qvXqvW|	S(	Ns-cs.ress.rctbrcc32s-fots-Ps-o(t_setup_compiletappendtextendRRtKeyErrortostpathtnormpathtmkpathtdirnametspawnRRt
_c_extensionst_cpp_extensionsR
(Rtsourcest
output_dirtmacrostinclude_dirstdebugt
extra_preargstextra_postargstdependstobjectstpp_optstbuildtcompile_optstobjtsrctexttmsgt	input_optt
output_opt((s./usr/lib64/python2.7/distutils/bcppcompiler.pytcompileQsF



		
.c	Cs�|j||�\}}|j|d|�}|j||�r�|dg|}|rXny|j|jg|�Wq�tk
r�}t|�q�Xntjd|�dS(NR,s/usskipping %s (up-to-date)(	t_fix_object_argstlibrary_filenamet
_need_linkR(RRRR	R/(	RR3toutput_libnameR,R/ttarget_langtoutput_filenametlib_argsR:((s./usr/lib64/python2.7/distutils/bcppcompiler.pytcreate_static_lib�sc Cs�|j||�\}}|j|||�\}}}|rUtjdt|��n|dk	rytjj||�}n|j	||�r�|t
jkr�d}|	r�|j}q�|j
}n#d}|	r�|j}n
|j}|dkr�d}n�tjj|�\}}tjj|�\}}tjj|d�}tjj|d|�}dg}x+|plgD]}|jd||f�qmW|jt||fd	|�ttjj|�}|g}g}x[|D]S}tjjtjj|��\}}|d
kr|j|�q�|j|�q�Wx+|D]#}|jdtjj|��q4W|jd�|j|�|jd
|g�|jd�xL|D]D}|j|||	�}|dkr�|j|�q�|j|�q�W|jd�|jd�|jd
|g�|jd
�|j|�|
r>|
|d*n|rT|j|�n|jtjj|��y|j|jg|�Wq�tk
r�}t|�q�Xntj d|�dS(Ns7I don't know what to do with 'runtime_library_dirs': %stc0w32tc0d32Ris%s.deftEXPORTSs  %s=_%ss
writing %ss.ress/L%ss/L.t,s,,timport32tcw32mtsskipping %s (up-to-date)(!R>t
_fix_lib_argsR	twarntstrRR#R$tjoinR@Rt
EXECUTABLERRRRtsplittsplitextR'R texecuteRtmapR%tnormcaseR!tfind_library_fileR&R(RRRR/( Rttarget_descR3RCR,t	librariestlibrary_dirstruntime_library_dirstexport_symbolsR/R0R1t
build_tempRBtstartup_objtld_argstdef_filetheadttailtmodnameR9ttemp_dirtcontentstsymtobjects2t	resourcestfiletbasetlRtlibfileR:((s./usr/lib64/python2.7/distutils/bcppcompiler.pytlink�s|	



			
$
!









c	Cs�|r-|d}|d|d||f}n|d|f}xW|D]K}xB|D]:}tjj||j|��}tjj|�rQ|SqQWqDWdSdS(Nt_dt_bcpp(R#R$ROR?texistsR(	RtdirsRR/tdlibt	try_namestdirtnameRk((s./usr/lib64/python2.7/distutils/bcppcompiler.pyRV4s



RcCs|dkrd}ng}x�|D]�}tjjtjj|��\}}||jddgkr{td||f�n|r�tjj|�}n|dkr�|jtjj	|||��q"|dkr�|jtjj	||d��q"|jtjj	|||j
��q"W|S(NRs.rcs.ress"unknown file type '%s' (from '%s')(RR#R$RRRUtsrc_extensionsRtbasenameR ROt
obj_extension(Rtsource_filenamest	strip_dirR,t	obj_namestsrc_nameRiR9((s./usr/lib64/python2.7/distutils/bcppcompiler.pytobject_filenamesNs$	
$##cCs|jd||�\}}}t||�}dg|}	|dk	rZ|	jd|�n|rm||	d*n|r�|	j|�n|	j|�|js�|dks�t||�r|r�|jtj	j
|��ny|j|	�Wqtk
r
}
|
GHt
|
�qXndS(Ns	cpp32.exes-oi(t_fix_compile_argsRRR R!RRR&R#R$R'R(RR(Rtsourcetoutput_fileR-R.R0R1t_R4tpp_argsR:((s./usr/lib64/python2.7/distutils/bcppcompiler.pyt
preprocessjs$	


$N(t__name__t
__module__t__doc__t
compiler_typetexecutablesR)R*RuRwtstatic_lib_extensiontshared_lib_extensiontstatic_lib_formattshared_lib_formatt
exe_extensionRRR=RERlRVR|R�(((s./usr/lib64/python2.7/distutils/bcppcompiler.pyR
sJ	

B|(R�t__revision__R#tdistutils.errorsRRRRRtdistutils.ccompilerRRtdistutils.file_utilRtdistutils.dep_utilRt	distutilsR	R
(((s./usr/lib64/python2.7/distutils/bcppcompiler.pyt<module>s	(PKW[)c�a&a&cygwinccompiler.pyonu�[����
{fc@s�dZdZddlZddlZddlZddlmZmZddlm	Z	ddl
mZddlm
Z
mZmZddlmZd	�Zd
e	fd��YZdefd
��YZdZdZdZd�Zd�Zd�ZdS(sdistutils.cygwinccompiler

Provides the CygwinCCompiler class, a subclass of UnixCCompiler that
handles the Cygwin port of the GNU C compiler to Windows.  It also contains
the Mingw32CCompiler class which handles the mingw32 port of GCC (same as
cygwin in no-cygwin mode).
s$Id$i����N(tgen_preprocess_optionstgen_lib_options(t
UnixCCompiler(t
write_file(tDistutilsExecErrortCompileErrortUnknownFileError(tlogcCs�tjjd�}|dkr�tj|d|d!}|dkrIdgS|dkr\dgS|d	krod
gS|dkr�dgStd
|��ndS(saInclude the appropriate MSVC runtime library if Python was built
    with MSVC 7.0 or later.
    sMSC v.i����ii
t1300tmsvcr70t1310tmsvcr71t1400tmsvcr80t1500tmsvcr90sUnknown MS Compiler version %s N(tsystversiontfindt
ValueError(tmsc_postmsc_ver((s1/usr/lib64/python2.7/distutils/cygwinccompiler.pyt	get_msvcr;stCygwinCCompilercBs�eZdZdZdZdZdZdZdZdddd�Z	d	�Z
d
d
d
d
d
dd
d
d
d
d
�
Zddd�Z
RS(tcygwins.os.as.dllslib%s%ss%s%ss.exeic
CsStj||||�t�\}}|jd||f�|tk	r\|jd|�nt�\|_|_|_	|j|j
d|j|j|j	f�|jdkr�d|_n	d|_|jdkr�d}nd	}|jd
ddd
dddddd|j|f�|jdkrCdg|_
|jd�nt�|_
dS(Ns%Python's GCC status: %s (details: %s)s�Python's pyconfig.h doesn't seem to support your compiler. Reason: %s. Compiling may fail because of undefined preprocessor macros.s: gcc %s, ld %s, dllwrap %s
s2.10.90tgcctdllwraps2.13s-shareds
-mdll -statictcompilersgcc -mcygwin -O -Walltcompiler_sosgcc -mcygwin -mdll -O -Walltcompiler_cxxsg++ -mcygwin -O -Wallt
linker_exesgcc -mcygwint	linker_sos%s -mcygwin %ss2.91.57tmsvcrts,Consider upgrading to a newer version of gcc(Rt__init__tcheck_config_htdebug_printtCONFIG_H_OKtwarntget_versionstgcc_versiont
ld_versiontdllwrap_versiont
compiler_typet
linker_dlltset_executablest
dll_librariesR(tselftverbosetdry_runtforcetstatustdetailst
shared_option((s1/usr/lib64/python2.7/distutils/cygwinccompiler.pyR!\s<			
cCs�|dks|dkrZy |jdd|d|g�Wq�tk
rV}t|�q�XnHy)|j|j||d|g|�Wntk
r�}t|�nXdS(Ns.rcs.restwindress-is-o(tspawnRRR(R.tobjtsrctexttcc_argstextra_postargstpp_optstmsg((s1/usr/lib64/python2.7/distutils/cygwinccompiler.pyt_compile�s cCs�tj|
pg�}
tj|p$g�}tj|p9g�}|j|j�|dk	r�||jksy|jdkr�tjj|d�}tjj	tjj
|��\}}tjj||d�}tjj|d|d�}dtjj
|�dg}x|D]}|j|�qW|j
t||fd|�|jd	krx|
jd
|g�|
jd|g�q�|j|�n|	s�|
jd�ntj||||||||d|	|
|||
�dS(
NRis.deftlibs.as
LIBRARY %stEXPORTSs
writing %sRs--output-libs--defs-s(tcopytextendR-tNonet
EXECUTABLER+tostpathtdirnametsplitexttbasenametjointappendtexecuteRRtlink(R.ttarget_desctobjectstoutput_filenamet
output_dirt	librariestlibrary_dirstruntime_library_dirstexport_symbolstdebugt
extra_preargsR;t
build_tempttarget_langttemp_dirtdll_namet
dll_extensiontdef_filetlib_filetcontentstsym((s1/usr/lib64/python2.7/distutils/cygwinccompiler.pyRM�sJ			
	tcCs|dkrd}ng}x�|D]�}tjjtjj|��\}}||jddgkr{td||f�n|r�tjj|�}n|dks�|dkr�|jtjj	||||j
��q"|jtjj	|||j
��q"W|S(NRas.rcs.ress"unknown file type '%s' (from '%s')(RCRERFRHtnormcasetsrc_extensionsRRIRKRJt
obj_extension(R.tsource_filenamest	strip_dirRQt	obj_namestsrc_nametbaseR9((s1/usr/lib64/python2.7/distutils/cygwinccompiler.pytobject_filenamess"	
$N(t__name__t
__module__R*Rdtstatic_lib_extensiontshared_lib_extensiontstatic_lib_formattshared_lib_formatt
exe_extensionR!R>RCRMRj(((s1/usr/lib64/python2.7/distutils/cygwinccompiler.pyRRs*>	XtMingw32CCompilercBs eZdZdddd�ZRS(tmingw32icCs�tj||||�|jdkr.d}nd}|jdkrLd}nd}|jdksjt�rsd}nd}|jd	d
|dd|d
d|dd|dd|j|||f�g|_t�|_dS(Ns2.13s-shareds
-mdll -statics2.91.57s--entry _DllMain@12Rat4s -mno-cygwinRsgcc%s -O -WallRsgcc%s -mdll -O -WallRsg++%s -O -WallRsgcc%sRs
%s%s %s %s(	RR!R(R'tis_cygwingccR,R+R-R(R.R/R0R1R4tentry_pointt	no_cygwin((s1/usr/lib64/python2.7/distutils/cygwinccompiler.pyR!-s&			


		(RkRlR*R!(((s1/usr/lib64/python2.7/distutils/cygwinccompiler.pyRr)stoksnot okt	uncertaincCs�ddlm}ddl}|jtjd�dkrAtdfS|j�}y.t|�}z|j	�}Wd|j
�XWn'tk
r�}td||j
ffSX|j|d�dkr�td	|fStd
|fSdS(s�Check if the current Python installation (specifically, pyconfig.h)
    appears amenable to building extensions with GCC.  Returns a tuple
    (status, details), where 'status' is one of the following constants:
      CONFIG_H_OK
        all is well, go ahead and compile
      CONFIG_H_NOTOK
        doesn't look good
      CONFIG_H_UNCERTAIN
        not sure -- unable to read pyconfig.h
    'details' is a human-readable string explaining the situation.

    Note there are two ways to conclude "OK": either 'sys.version' contains
    the string "GCC" (implying that this Python was built with GCC), or the
    installed "pyconfig.h" contains the string "__GNUC__".
    i����(t	sysconfigNtGCCissys.version mentions 'GCC'scouldn't read '%s': %st__GNUC__s'%s' mentions '__GNUC__'s '%s' does not mention '__GNUC__'(t	distutilsRztstringRRRR$tget_config_h_filenametopentreadtclosetIOErrortCONFIG_H_UNCERTAINtstrerrortCONFIG_H_NOTOK(RzR~tfntftstexc((s1/usr/lib64/python2.7/distutils/cygwinccompiler.pyR"es 
cCs�ddlm}ddlm}ddl}|d�}|r�tj|dd�}|j�}|j�|j	d|�}|r�||j
d	��}q�d}nd}|d
�}|r tj|dd�}|j�}|j�|j	d|�}|r||j
d	��}	q&d}	nd}	|d�}
|
r�tj|
d
d�}|j�}|j�|j	d|�}|r�||j
d	��}q�d}nd}||	|fS(sj Try to find out the versions of gcc, ld and dllwrap.
        If not possible it returns None for it.
    i����(tLooseVersion(tfind_executableNRs
 -dumpversiontrs(\d+\.\d+(\.\d+)*)itlds -vRs
 --versions (\d+\.\d+(\.\d+)*)(tdistutils.versionR�tdistutils.spawnR�treREtpopenR�R�tsearchtgroupRC(R�R�R�tgcc_exetoutt
out_stringtresultR'tld_exeR(tdllwrap_exeR)((s1/usr/lib64/python2.7/distutils/cygwinccompiler.pyR&�sD
	
	
	cCs;tjdd�}|j�}|j�|j�jd�S(s>Try to determine if the gcc that would be used is from cygwin.sgcc -dumpmachineR�R(RER�R�R�tstriptendswith(R�R�((s1/usr/lib64/python2.7/distutils/cygwinccompiler.pyRu�s
(t__doc__t__revision__RERRAtdistutils.ccompilerRRtdistutils.unixccompilerRtdistutils.file_utilRtdistutils.errorsRRRR}RRRRrR$R�R�R"R&Ru(((s1/usr/lib64/python2.7/distutils/cygwinccompiler.pyt<module>s +$	�8	5	.PKW[)c�a&a&cygwinccompiler.pycnu�[����
{fc@s�dZdZddlZddlZddlZddlmZmZddlm	Z	ddl
mZddlm
Z
mZmZddlmZd	�Zd
e	fd��YZdefd
��YZdZdZdZd�Zd�Zd�ZdS(sdistutils.cygwinccompiler

Provides the CygwinCCompiler class, a subclass of UnixCCompiler that
handles the Cygwin port of the GNU C compiler to Windows.  It also contains
the Mingw32CCompiler class which handles the mingw32 port of GCC (same as
cygwin in no-cygwin mode).
s$Id$i����N(tgen_preprocess_optionstgen_lib_options(t
UnixCCompiler(t
write_file(tDistutilsExecErrortCompileErrortUnknownFileError(tlogcCs�tjjd�}|dkr�tj|d|d!}|dkrIdgS|dkr\dgS|d	krod
gS|dkr�dgStd
|��ndS(saInclude the appropriate MSVC runtime library if Python was built
    with MSVC 7.0 or later.
    sMSC v.i����ii
t1300tmsvcr70t1310tmsvcr71t1400tmsvcr80t1500tmsvcr90sUnknown MS Compiler version %s N(tsystversiontfindt
ValueError(tmsc_postmsc_ver((s1/usr/lib64/python2.7/distutils/cygwinccompiler.pyt	get_msvcr;stCygwinCCompilercBs�eZdZdZdZdZdZdZdZdddd�Z	d	�Z
d
d
d
d
d
dd
d
d
d
d
�
Zddd�Z
RS(tcygwins.os.as.dllslib%s%ss%s%ss.exeic
CsStj||||�t�\}}|jd||f�|tk	r\|jd|�nt�\|_|_|_	|j|j
d|j|j|j	f�|jdkr�d|_n	d|_|jdkr�d}nd	}|jd
ddd
dddddd|j|f�|jdkrCdg|_
|jd�nt�|_
dS(Ns%Python's GCC status: %s (details: %s)s�Python's pyconfig.h doesn't seem to support your compiler. Reason: %s. Compiling may fail because of undefined preprocessor macros.s: gcc %s, ld %s, dllwrap %s
s2.10.90tgcctdllwraps2.13s-shareds
-mdll -statictcompilersgcc -mcygwin -O -Walltcompiler_sosgcc -mcygwin -mdll -O -Walltcompiler_cxxsg++ -mcygwin -O -Wallt
linker_exesgcc -mcygwint	linker_sos%s -mcygwin %ss2.91.57tmsvcrts,Consider upgrading to a newer version of gcc(Rt__init__tcheck_config_htdebug_printtCONFIG_H_OKtwarntget_versionstgcc_versiont
ld_versiontdllwrap_versiont
compiler_typet
linker_dlltset_executablest
dll_librariesR(tselftverbosetdry_runtforcetstatustdetailst
shared_option((s1/usr/lib64/python2.7/distutils/cygwinccompiler.pyR!\s<			
cCs�|dks|dkrZy |jdd|d|g�Wq�tk
rV}t|�q�XnHy)|j|j||d|g|�Wntk
r�}t|�nXdS(Ns.rcs.restwindress-is-o(tspawnRRR(R.tobjtsrctexttcc_argstextra_postargstpp_optstmsg((s1/usr/lib64/python2.7/distutils/cygwinccompiler.pyt_compile�s cCs�tj|
pg�}
tj|p$g�}tj|p9g�}|j|j�|dk	r�||jksy|jdkr�tjj|d�}tjj	tjj
|��\}}tjj||d�}tjj|d|d�}dtjj
|�dg}x|D]}|j|�qW|j
t||fd|�|jd	krx|
jd
|g�|
jd|g�q�|j|�n|	s�|
jd�ntj||||||||d|	|
|||
�dS(
NRis.deftlibs.as
LIBRARY %stEXPORTSs
writing %sRs--output-libs--defs-s(tcopytextendR-tNonet
EXECUTABLER+tostpathtdirnametsplitexttbasenametjointappendtexecuteRRtlink(R.ttarget_desctobjectstoutput_filenamet
output_dirt	librariestlibrary_dirstruntime_library_dirstexport_symbolstdebugt
extra_preargsR;t
build_tempttarget_langttemp_dirtdll_namet
dll_extensiontdef_filetlib_filetcontentstsym((s1/usr/lib64/python2.7/distutils/cygwinccompiler.pyRM�sJ			
	tcCs|dkrd}ng}x�|D]�}tjjtjj|��\}}||jddgkr{td||f�n|r�tjj|�}n|dks�|dkr�|jtjj	||||j
��q"|jtjj	|||j
��q"W|S(NRas.rcs.ress"unknown file type '%s' (from '%s')(RCRERFRHtnormcasetsrc_extensionsRRIRKRJt
obj_extension(R.tsource_filenamest	strip_dirRQt	obj_namestsrc_nametbaseR9((s1/usr/lib64/python2.7/distutils/cygwinccompiler.pytobject_filenamess"	
$N(t__name__t
__module__R*Rdtstatic_lib_extensiontshared_lib_extensiontstatic_lib_formattshared_lib_formatt
exe_extensionR!R>RCRMRj(((s1/usr/lib64/python2.7/distutils/cygwinccompiler.pyRRs*>	XtMingw32CCompilercBs eZdZdddd�ZRS(tmingw32icCs�tj||||�|jdkr.d}nd}|jdkrLd}nd}|jdksjt�rsd}nd}|jd	d
|dd|d
d|dd|dd|j|||f�g|_t�|_dS(Ns2.13s-shareds
-mdll -statics2.91.57s--entry _DllMain@12Rat4s -mno-cygwinRsgcc%s -O -WallRsgcc%s -mdll -O -WallRsg++%s -O -WallRsgcc%sRs
%s%s %s %s(	RR!R(R'tis_cygwingccR,R+R-R(R.R/R0R1R4tentry_pointt	no_cygwin((s1/usr/lib64/python2.7/distutils/cygwinccompiler.pyR!-s&			


		(RkRlR*R!(((s1/usr/lib64/python2.7/distutils/cygwinccompiler.pyRr)stoksnot okt	uncertaincCs�ddlm}ddl}|jtjd�dkrAtdfS|j�}y.t|�}z|j	�}Wd|j
�XWn'tk
r�}td||j
ffSX|j|d�dkr�td	|fStd
|fSdS(s�Check if the current Python installation (specifically, pyconfig.h)
    appears amenable to building extensions with GCC.  Returns a tuple
    (status, details), where 'status' is one of the following constants:
      CONFIG_H_OK
        all is well, go ahead and compile
      CONFIG_H_NOTOK
        doesn't look good
      CONFIG_H_UNCERTAIN
        not sure -- unable to read pyconfig.h
    'details' is a human-readable string explaining the situation.

    Note there are two ways to conclude "OK": either 'sys.version' contains
    the string "GCC" (implying that this Python was built with GCC), or the
    installed "pyconfig.h" contains the string "__GNUC__".
    i����(t	sysconfigNtGCCissys.version mentions 'GCC'scouldn't read '%s': %st__GNUC__s'%s' mentions '__GNUC__'s '%s' does not mention '__GNUC__'(t	distutilsRztstringRRRR$tget_config_h_filenametopentreadtclosetIOErrortCONFIG_H_UNCERTAINtstrerrortCONFIG_H_NOTOK(RzR~tfntftstexc((s1/usr/lib64/python2.7/distutils/cygwinccompiler.pyR"es 
cCs�ddlm}ddlm}ddl}|d�}|r�tj|dd�}|j�}|j�|j	d|�}|r�||j
d	��}q�d}nd}|d
�}|r tj|dd�}|j�}|j�|j	d|�}|r||j
d	��}	q&d}	nd}	|d�}
|
r�tj|
d
d�}|j�}|j�|j	d|�}|r�||j
d	��}q�d}nd}||	|fS(sj Try to find out the versions of gcc, ld and dllwrap.
        If not possible it returns None for it.
    i����(tLooseVersion(tfind_executableNRs
 -dumpversiontrs(\d+\.\d+(\.\d+)*)itlds -vRs
 --versions (\d+\.\d+(\.\d+)*)(tdistutils.versionR�tdistutils.spawnR�treREtpopenR�R�tsearchtgroupRC(R�R�R�tgcc_exetoutt
out_stringtresultR'tld_exeR(tdllwrap_exeR)((s1/usr/lib64/python2.7/distutils/cygwinccompiler.pyR&�sD
	
	
	cCs;tjdd�}|j�}|j�|j�jd�S(s>Try to determine if the gcc that would be used is from cygwin.sgcc -dumpmachineR�R(RER�R�R�tstriptendswith(R�R�((s1/usr/lib64/python2.7/distutils/cygwinccompiler.pyRu�s
(t__doc__t__revision__RERRAtdistutils.ccompilerRRtdistutils.unixccompilerRtdistutils.file_utilRtdistutils.errorsRRRR}RRRRrR$R�R�R"R&Ru(((s1/usr/lib64/python2.7/distutils/cygwinccompiler.pyt<module>s +$	�8	5	.PKW[��%z+$+$
text_file.pycnu�[����
{fc@s/dZdZddlZddd��YZdS(s�text_file

provides the TextFile class, which gives an interface to text files
that (optionally) takes care of stripping comments, ignoring blank
lines, and joining lines with backslashes.s$Id$i����NtTextFilecBs�eZdZidd6dd6dd6dd6dd6dd6Zddd	�Zd
�Zd�Zdd�Zdd
�Z	dd�Z
d�Zd�Zd�Z
RS(s�Provides a file-like object that takes care of all the things you
       commonly want to do when processing a text file that has some
       line-by-line syntax: strip comments (as long as "#" is your
       comment character), skip blank lines, join adjacent lines by
       escaping the newline (ie. backslash at end of line), strip
       leading and/or trailing whitespace.  All of these are optional
       and independently controllable.

       Provides a 'warn()' method so you can generate warning messages that
       report physical line number, even if the logical line in question
       spans multiple physical lines.  Also provides 'unreadline()' for
       implementing line-at-a-time lookahead.

       Constructor is called as:

           TextFile (filename=None, file=None, **options)

       It bombs (RuntimeError) if both 'filename' and 'file' are None;
       'filename' should be a string, and 'file' a file object (or
       something that provides 'readline()' and 'close()' methods).  It is
       recommended that you supply at least 'filename', so that TextFile
       can include it in warning messages.  If 'file' is not supplied,
       TextFile creates its own using the 'open()' builtin.

       The options are all boolean, and affect the value returned by
       'readline()':
         strip_comments [default: true]
           strip from "#" to end-of-line, as well as any whitespace
           leading up to the "#" -- unless it is escaped by a backslash
         lstrip_ws [default: false]
           strip leading whitespace from each line before returning it
         rstrip_ws [default: true]
           strip trailing whitespace (including line terminator!) from
           each line before returning it
         skip_blanks [default: true}
           skip lines that are empty *after* stripping comments and
           whitespace.  (If both lstrip_ws and rstrip_ws are false,
           then some lines may consist of solely whitespace: these will
           *not* be skipped, even if 'skip_blanks' is true.)
         join_lines [default: false]
           if a backslash is the last non-newline character on a line
           after stripping comments and whitespace, join the following line
           to it to form one "logical line"; if N consecutive lines end
           with a backslash, then N+1 physical lines will be joined to
           form one logical line.
         collapse_join [default: false]
           strip leading whitespace from lines that are joined to their
           predecessor; only matters if (join_lines and not lstrip_ws)

       Note that since 'rstrip_ws' can strip the trailing newline, the
       semantics of 'readline()' must differ from those of the builtin file
       object's 'readline()' method!  In particular, 'readline()' returns
       None for end-of-file: an empty string might just be a blank line (or
       an all-whitespace line), if 'rstrip_ws' is true but 'skip_blanks' is
       not.itstrip_commentstskip_blanksit	lstrip_wst	rstrip_wst
join_linest
collapse_joincKs�|dkr$|dkr$td�nxQ|jj�D]@}||kr]t||||�q4t|||j|�q4Wx3|j�D]%}||jkr�td|�q�q�W|dkr�|j|�n||_||_d|_	g|_
dS(s�Construct a new TextFile object.  At least one of 'filename'
           (a string) and 'file' (a file-like object) must be supplied.
           They keyword argument options are described above and affect
           the values returned by 'readline()'.s7you must supply either or both of 'filename' and 'file'sinvalid TextFile option '%s'iN(tNonetRuntimeErrortdefault_optionstkeystsetattrtKeyErrortopentfilenametfiletcurrent_linetlinebuf(tselfRRtoptionstopt((s+/usr/lib64/python2.7/distutils/text_file.pyt__init__Ns 				cCs+||_t|jd�|_d|_dS(syOpen a new file named 'filename'.  This overrides both the
           'filename' and 'file' arguments to the constructor.triN(RR
RR(RR((s+/usr/lib64/python2.7/distutils/text_file.pyR
ss	cCs2|j}d|_d|_d|_|j�dS(siClose the current file and forget everything we know about it
           (filename, current line number).N(RRRRtclose(RR((s+/usr/lib64/python2.7/distutils/text_file.pyR|s
				cCs�g}|dkr|j}n|j|jd�t|ttf�ra|jdt|��n|jd|�|jt|��dj|�S(Ns, s
lines %d-%d: s	line %d: t(	RRtappendRt
isinstancetlistttupletstrtjoin(Rtmsgtlinetoutmsg((s+/usr/lib64/python2.7/distutils/text_file.pyt	gen_error�scCstd|j||��dS(Nserror: (t
ValueErrorR"(RRR ((s+/usr/lib64/python2.7/distutils/text_file.pyterror�scCs(tjjd|j||�d�dS(s�Print (to stderr) a warning message tied to the current logical
           line in the current file.  If the current logical line in the
           file spans multiple physical lines, the warning refers to the
           whole range, eg. "lines 3-5".  If 'line' supplied, it overrides
           the current line number; it may be a list or tuple to indicate a
           range of physical lines, or an integer for a single physical
           line.s	warning: s
N(tsyststderrtwriteR"(RRR ((s+/usr/lib64/python2.7/distutils/text_file.pytwarn�scCs�|jr$|jd}|jd=|Sd}x~|jj�}|dkrQd}n|jr�|r�|jd�}|dkr~q�|dks�||ddkr�|ddkr�dp�d}|d|!|}|j�dkr�q-q�q�|jdd�}n|jr�|r�|dkr'|j	d	�|S|j
r?|j�}n||}t|j
t�rv|j
dd|j
d<q�|j
|j
dg|_
nI|dkr�dSt|j
t�r�|j
dd|_
n|j
d|_
|jr�|jr�|j�}n0|jr|j�}n|jr,|j�}n|dksD|dkrS|jrSq-n|jr�|ddkr||d }q-n|d
dkr�|dd
!d}q-q�n|SWdS(
sURead and return a single logical line from the current file (or
           from an internal buffer if lines have previously been "unread"
           with 'unreadline()').  If the 'join_lines' option is true, this
           may involve reading multiple physical lines concatenated into a
           single string.  Updates the current line number, so calling
           'warn()' after 'readline()' emits a warning about the physical
           line(s) just read.  Returns None on end-of-file, since the empty
           string can occur if 'rstrip_ws' is true but 'strip_blanks' is
           not.i����Rt#iis\s
s\#s2continuation line immediately precedes end-of-filei����s\
N(RRtreadlineRRtfindtstriptreplaceRR(RtlstripRRRRRtrstripR(RR tbuildup_linetposteol((s+/usr/lib64/python2.7/distutils/text_file.pyR*�sf	

	
 		
	
		!	
	cCs:g}x-|j�}|dkr%|S|j|�q	WdS(sWRead and return the list of all logical lines remaining in the
           current file.N(R*RR(RtlinesR ((s+/usr/lib64/python2.7/distutils/text_file.pyt	readlinesscCs|jj|�dS(s�Push 'line' (a string) onto an internal buffer that will be
           checked by future 'readline()' calls.  Handy for implementing
           a parser with line-at-a-time lookahead.N(RR(RR ((s+/usr/lib64/python2.7/distutils/text_file.pyt
unreadline+sN(t__name__t
__module__t__doc__R	RRR
RR"R$R(R*R4R5(((s+/usr/lib64/python2.7/distutils/text_file.pyRs 8

%			

	~	((R8t__revision__R%R(((s+/usr/lib64/python2.7/distutils/text_file.pyt<module>sPKW[#��˱�archive_util.pyonu�[����
{fc@s�dZdZddlZddlmZddlZddlmZddlm	Z	ddl
mZddlm
Z
ydd	lmZWnek
r�dZnXydd
lmZWnek
r�dZnXd�Zd�Zd
ddddd�Zddd�Ziedgdfd6ed gdfd6ed!gdfd6ed"gdfd6egdfd6Zd�Zddddddd�ZdS(#sodistutils.archive_util

Utility functions for creating archive files (tarballs, zip files,
that sort of thing).s$Id$i����N(twarn(tDistutilsExecError(tspawn(tmkpath(tlog(tgetpwnam(tgetgrnamcCs^tdks|dkrdSyt|�}Wntk
rEd}nX|dk	rZ|dSdS(s"Returns a gid, given a group name.iN(RtNonetKeyError(tnametresult((s./usr/lib64/python2.7/distutils/archive_util.pyt_get_gids

cCs^tdks|dkrdSyt|�}Wntk
rEd}nX|dk	rZ|dSdS(s"Returns an uid, given a user name.iN(RRR(R	R
((s./usr/lib64/python2.7/distutils/archive_util.pyt_get_uid's

tgzipics�idd6dd6dd6dd6}idd6dd6d	d6}|dk	rg||j�krgtd
�n|d}	|dkr�|	|j|d�7}	nttjj|	�d|�d
dl}
t	j
d�t���t�������fd�}|sC|
j
|	d||�}z|j|d|�Wd|j�Xn|dkr�tdt�|	||}
tjdkr�||	|
g}n|d|	g}t|d|�|
S|	S(s-Create a (possibly compressed) tar file from all the files under
    'base_dir'.

    'compress' must be "gzip" (the default), "compress", "bzip2", or None.
    (compress will be deprecated in Python 3.2)

    'owner' and 'group' can be used to define an owner and a group for the
    archive that is being built. If not provided, the current owner and group
    will be used.

    The output tar file will be named 'base_dir' +  ".tar", possibly plus
    the appropriate compression extension (".gz", ".bz2" or ".Z").

    Returns the output filename.
    tgzR
tbz2tbzip2ttcompresss.gzs.bz2s.ZsEbad value for 'compress': must be None, 'gzip', 'bzip2' or 'compress's.tartdry_runi����NsCreating tar archivecsF�dk	r!�|_�|_n�dk	rB�|_�|_n|S(N(Rtgidtgnametuidtuname(ttarinfo(RtgrouptownerR(s./usr/lib64/python2.7/distutils/archive_util.pyt_set_uid_gid[s		sw|%stfilters'compress' will be deprecated.twin32s-f(Rtkeyst
ValueErrortgetRtostpathtdirnamettarfileRtinfoRRtopentaddtcloseRtPendingDeprecationWarningtsystplatformR(t	base_nametbase_dirRtverboseRRRttar_compressiontcompress_exttarchive_nameR$Rttartcompressed_nametcmd((RRRRs./usr/lib64/python2.7/distutils/archive_util.pytmake_tarball3s8"	

	
c
Cs-yddl}Wntk
r)d}nX|d}ttjj|�d|�|dkr�|rkd}nd}y td|||gd|�Wq)tk
r�td|�q)Xntt	j
d	||�|s)|j|d
d|j�}|tj
kr<tjjtjj|d��}|j||�t	j
d
|�nx�tj|�D]�\}	}
}xR|
D]J}tjjtjj|	|d��}|j||�t	j
d
|�qbWxe|D]]}tjjtjj|	|��}tjj|�r�|j||�t	j
d
|�q�q�WqLW|j�n|S(svCreate a zip file from all the files under 'base_dir'.

    The output zip file will be named 'base_name' + ".zip".  Uses either the
    "zipfile" Python module (if available) or the InfoZIP "zip" utility
    (if installed and found on the default search path).  If neither tool is
    available, raises DistutilsExecError.  Returns the name of the output zip
    file.
    i����Ns.zipRs-rs-rqtzipskunable to create zip file '%s': could neither import the 'zipfile' module nor find a standalone zip utilitys#creating '%s' and adding '%s' to ittwtcompressionRsadding '%s'(tzipfiletImportErrorRRR!R"R#RRRR%tZipFiletZIP_DEFLATEDtcurdirtnormpathtjointwritetwalktisfileR((
R,R-R.RR9tzip_filenamet
zipoptionsR6R"tdirpathtdirnamest	filenamesR	((s./usr/lib64/python2.7/distutils/archive_util.pytmake_zipfileysL	


	
	
!
$
!
Rsgzip'ed tar-filetgztarRsbzip2'ed tar-filetbztarscompressed tar filetztarsuncompressed tar fileR2sZIP fileR6cCs%x|D]}|tkr|SqWdS(sqReturns the first format from the 'format' list that is unknown.

    If all formats are known, returns None
    N(tARCHIVE_FORMATSR(tformatstformat((s./usr/lib64/python2.7/distutils/archive_util.pytcheck_archive_formats�s
cCsCtj�}|d	k	rStjd|�tjj|�}|sStj|�qSn|d	krktj}ni|d6}	yt	|}
Wnt
k
r�td|�nX|
d}x"|
dD]\}}
|
|	|<q�W|dkr�||	d<||	d<nz||||	�}Wd	|d	k	r>tjd
|�tj|�nX|S(s�Create an archive file (eg. zip or tar).

    'base_name' is the name of the file to create, minus any format-specific
    extension; 'format' is the archive format: one of "zip", "tar", "ztar",
    or "gztar".

    'root_dir' is a directory that will be the root directory of the
    archive; ie. we typically chdir into 'root_dir' before creating the
    archive.  'base_dir' is the directory where we start archiving from;
    ie. 'base_dir' will be the common prefix of all files and
    directories in the archive.  'root_dir' and 'base_dir' both default
    to the current directory.  Returns the name of the archive file.

    'owner' and 'group' are used when creating a tar archive. By default,
    uses the current owner and group.
    schanging into '%s'Rsunknown archive format '%s'iiR6RRNschanging back to '%s'(R!tgetcwdRRtdebugR"tabspathtchdirR=RLRR(R,RNtroot_dirR-R.RRRtsave_cwdtkwargstformat_infotfunctargtvaltfilename((s./usr/lib64/python2.7/distutils/archive_util.pytmake_archive�s2




(RR
(RR(RR(RN(t__doc__t__revision__R!twarningsRR*tdistutils.errorsRtdistutils.spawnRtdistutils.dir_utilRt	distutilsRtpwdRR:RtgrpRRRR5RHRLROR\(((s./usr/lib64/python2.7/distutils/archive_util.pyt<module>s<



			E>	
	PKW[b�{�++emxccompiler.pycnu�[����
{fc@s�dZdZddlZddlZddlZddlmZmZddlm	Z	ddl
mZddlm
Z
mZmZddlmZd	e	fd
��YZdZdZd
Zd�Zd�ZdS(s�distutils.emxccompiler

Provides the EMXCCompiler class, a subclass of UnixCCompiler that
handles the EMX port of the GNU C compiler to OS/2.
s$Id$i����N(tgen_preprocess_optionstgen_lib_options(t
UnixCCompiler(t
write_file(tDistutilsExecErrortCompileErrortUnknownFileError(tlogtEMXCCompilercBs�eZdZdZdZdZdZdZdZdZ	dddd�Z
d	�Zddddddddddd
�
Z
ddd�Zdd
�ZRS(temxs.objs.libs.dlls%s%ss.ress.exeic	Cs�tj||||�t�\}}|jd||f�|tk	rd|jdd|d�nt�\|_|_|j|j	d|j|jf�|j
ddddd	d
dd�d
g|_dS(Ns%Python's GCC status: %s (details: %s)s<Python's pyconfig.h doesn't seem to support your compiler.  sReason: %s.s<Compiling may fail because of undefined preprocessor macros.s: gcc %s, ld %s
tcompilers5gcc -Zomf -Zmt -O3 -fomit-frame-pointer -mprobe -Walltcompiler_sot
linker_exesgcc -Zomf -Zmt -Zcrtdllt	linker_sosgcc -Zomf -Zmt -Zcrtdll -Zdlltgcc(Rt__init__tcheck_config_htdebug_printtCONFIG_H_OKtwarntget_versionstgcc_versiont
ld_versiont
compiler_typetset_executablest
dll_libraries(tselftverbosetdry_runtforcetstatustdetails((s./usr/lib64/python2.7/distutils/emxccompiler.pyR*s"	cCs�|dkrHy|jdd|g�Wq�tk
rD}t|�q�XnHy)|j|j||d|g|�Wntk
r�}t|�nXdS(Ns.rctrcs-rs-o(tspawnRRR(Rtobjtsrctexttcc_argstextra_postargstpp_optstmsg((s./usr/lib64/python2.7/distutils/emxccompiler.pyt_compileMscCs�tj|
pg�}
tj|p$g�}tj|p9g�}|j|j�|dk	r;||jkr;tjj|d�}tjjtjj	|��\}}tjj
||d�}dtjjtjj	|��dddg}x|D]}|jd|�q�W|jt
||fd|�|j|�n|	sQ|
jd�ntj||||||||d|	|
|||
�dS(	Nis.defs$LIBRARY %s INITINSTANCE TERMINSTANCEsDATA MULTIPLE NONSHAREDtEXPORTSs  "%s"s
writing %ss-s(tcopytextendRtNonet
EXECUTABLEtostpathtdirnametsplitexttbasenametjointappendtexecuteRRtlink(Rttarget_desctobjectstoutput_filenamet
output_dirt	librariestlibrary_dirstruntime_library_dirstexport_symbolstdebugt
extra_preargsR&t
build_tempttarget_langttemp_dirtdll_namet
dll_extensiontdef_filetcontentstsym((s./usr/lib64/python2.7/distutils/emxccompiler.pyR7[sF		 	
	tcCs�|dkrd}ng}x�|D]�}tjjtjj|��\}}||jdgkrxtd||f�n|r�tjj|�}n|dkr�|jtjj	|||j
��q"|jtjj	|||j��q"W|S(NRJs.rcs"unknown file type '%s' (from '%s')(R-R/R0R2tnormcasetsrc_extensionsRR3R5R4t
res_extensiont
obj_extension(Rtsource_filenamest	strip_dirR;t	obj_namestsrc_nametbaseR$((s./usr/lib64/python2.7/distutils/emxccompiler.pytobject_filenames�s"	
$c
Cs�d|}d|}ytjdjd�}Wntk
rGg}nXxh||D]\}tjj||�}tjj||�}	tjj|�r�|Stjj|	�rS|	SqSWdS(Ns%s.libs	lib%s.libtLIBRARY_PATHt;(R/tenvirontsplittKeyErrorR0R4texistsR-(
RtdirstlibR@tshortlibtlonglibtemx_dirstdirt	shortlibptlonglibp((s./usr/lib64/python2.7/distutils/emxccompiler.pytfind_library_file�s



N(t__name__t
__module__RRNtstatic_lib_extensiontshared_lib_extensiontstatic_lib_formattshared_lib_formatRMt
exe_extensionRR)R-R7RTRc(((s./usr/lib64/python2.7/distutils/emxccompiler.pyRs2 	Ptoksnot okt	uncertaincCs�ddlm}ddl}|jtjd�dkrAtdfS|j�}y.t|�}z|j	�}Wd|j
�XWn'tk
r�}td||j
ffSX|j|d�dkr�td	|fStd
|fSdS(s�Check if the current Python installation (specifically, pyconfig.h)
    appears amenable to building extensions with GCC.  Returns a tuple
    (status, details), where 'status' is one of the following constants:
      CONFIG_H_OK
        all is well, go ahead and compile
      CONFIG_H_NOTOK
        doesn't look good
      CONFIG_H_UNCERTAIN
        not sure -- unable to read pyconfig.h
    'details' is a human-readable string explaining the situation.

    Note there are two ways to conclude "OK": either 'sys.version' contains
    the string "GCC" (implying that this Python was built with GCC), or the
    installed "pyconfig.h" contains the string "__GNUC__".
    i����(t	sysconfigNtGCCissys.version mentions 'GCC'scouldn't read '%s': %st__GNUC__s'%s' mentions '__GNUC__'s '%s' does not mention '__GNUC__'(t	distutilsRmtstringtfindtsystversionRtget_config_h_filenametopentreadtclosetIOErrortCONFIG_H_UNCERTAINtstrerrortCONFIG_H_NOTOK(RmRqtfntftstexc((s./usr/lib64/python2.7/distutils/emxccompiler.pyR�s 
c	Cs�ddlm}ddlm}ddl}|d�}|r�tj|dd�}z|j�}Wd|j�X|j	d|�}|r�||j
d	��}q�d}nd}d}||fS(
sa Try to find out the versions of gcc and ld.
        If not possible it returns None for it.
    i����(t
StrictVersion(tfind_executableNRs
 -dumpversiontrs(\d+\.\d+\.\d+)i(tdistutils.versionR�tdistutils.spawnR�treR/tpopenRwRxtsearchtgroupR-(	R�R�R�tgcc_exetoutt
out_stringtresultRR((s./usr/lib64/python2.7/distutils/emxccompiler.pyR&s 	(t__doc__t__revision__R/RsR+tdistutils.ccompilerRRtdistutils.unixccompilerRtdistutils.file_utilRtdistutils.errorsRRRRpRRRR|RzRR(((s./usr/lib64/python2.7/distutils/emxccompiler.pyt<module>s$�	4PKW[ϩڜ�S�Smsvc9compiler.pycnu�[����
{fc@s�dZdZddlZddlZddlZddlZddlmZmZm	Z	m
Z
mZddlm
Z
mZddlmZddlmZddlZejZejZejZejZejejejejfZ ej!dkoej"d%kZ#e#r'dZ$dZ%d
Z&dZ'ndZ$dZ%dZ&dZ'idd6dd6dd6Z(dd&d��YZ)dd'd��YZ*d�Z+d�Z,d�Z-d�Z.dd �Z/e+�Z0e0d!kr�ed"e0��nd#e
fd$��YZ1dS((sdistutils.msvc9compiler

Contains MSVCCompiler, an implementation of the abstract CCompiler class
for the Microsoft Visual Studio 2008.

The module is compatible with VS 2005 and VS 2008. You can find legacy support
for older versions of VS in distutils.msvccompiler.
s$Id$i����N(tDistutilsExecErrortDistutilsPlatformErrortCompileErrortLibErrort	LinkError(t	CCompilertgen_lib_options(tlog(tget_platformtwin32ii s1Software\Wow6432Node\Microsoft\VisualStudio\%0.1fs.Software\Wow6432Node\Microsoft\VCExpress\%0.1fs5Software\Wow6432Node\Microsoft\Microsoft SDKs\Windowss,Software\Wow6432Node\Microsoft\.NETFrameworks%Software\Microsoft\VisualStudio\%0.1fs"Software\Microsoft\VCExpress\%0.1fs)Software\Microsoft\Microsoft SDKs\Windowss Software\Microsoft\.NETFrameworktx86tamd64s	win-amd64tia64swin-ia64tRegcBsbeZdZd�Zee�Zd�Zee�Zd�Zee�Zd�Zee�ZRS(s2Helper class to read values from the registry
    cCsMx:tD]2}|j||�}|r||kr||SqWt|��dS(N(tHKEYStread_valuestKeyError(tclstpathtkeytbasetd((s//usr/lib64/python2.7/distutils/msvc9compiler.pyt	get_valueDs

cCs�yt||�}Wntk
r'dSXg}d}xItryt||�}Wntk
rdPnX|j|�|d7}q7W|S(sReturn list of registry keys.iiN(tRegOpenKeyExtRegErrortNonetTruet
RegEnumKeytappend(RRRthandletLtitk((s//usr/lib64/python2.7/distutils/msvc9compiler.pyt	read_keysLs
	

c	Cs�yt||�}Wntk
r'dSXi}d}xmtr�yt||�\}}}Wntk
rmPnX|j�}|j|�||j|�<|d7}q7W|S(s`Return dict of registry keys and values.

        All names are converted to lowercase.
        iiN(RRRRtRegEnumValuetlowertconvert_mbcs(	RRRRRRtnametvaluettype((s//usr/lib64/python2.7/distutils/msvc9compiler.pyR^s
	
cCsIt|dd�}|dk	rEy|d�}WqEtk
rAqEXn|S(Ntdecodetmbcs(tgetattrRtUnicodeError(tstdec((s//usr/lib64/python2.7/distutils/msvc9compiler.pyR$ts
(	t__name__t
__module__t__doc__RtclassmethodR!RR$tstaticmethod(((s//usr/lib64/python2.7/distutils/msvc9compiler.pyR
@s				t
MacroExpandercBs,eZd�Zd�Zd�Zd�ZRS(cCs'i|_t||_|j|�dS(N(tmacrostVS_BASEtvsbasetload_macros(tselftversion((s//usr/lib64/python2.7/distutils/msvc9compiler.pyt__init__�s	
cCs!tj||�|jd|<dS(Ns$(%s)(R
RR4(R8tmacroRR((s//usr/lib64/python2.7/distutils/msvc9compiler.pyt	set_macro�scCsR|jd|jdd�|jd|jdd�|jdtd�y2|dkrl|jd	td
�ntd
��Wntk
r�td��nX|dkr�|jd
|jd�|jdtd�n}d}xttD]l}yt||�}Wntk
r
q�nXt	|d�}t
j|d||f�}|d|jd<q�WdS(NtVCInstallDirs	\Setup\VCt
productdirtVSInstallDirs	\Setup\VStFrameworkDirtinstallrootg @tFrameworkSDKDirssdkinstallrootv2.0sPython was built with Visual Studio 2008;
extensions must be built with a compiler than can generate compatible binaries.
Visual Studio 2008 was not found on this system. If you have Cygwin installed,
you can try compiling with MingW32, by passing "-c mingw32" to setup.py.g"@tFrameworkVersionsclr versiont
WindowsSdkDirtcurrentinstallfolders.Software\Microsoft\NET Framework Setup\Productis%s\%sR9s$(FrameworkVersion)(
R<R6tNET_BASERRtWINSDK_BASERRRRR
RR4(R8R9tpRthRR((s//usr/lib64/python2.7/distutils/msvc9compiler.pyR7�s.




cCs6x/|jj�D]\}}|j||�}qW|S(N(R4titemstreplace(R8R,R tv((s//usr/lib64/python2.7/distutils/msvc9compiler.pytsub�s(R.R/R:R<R7RM(((s//usr/lib64/python2.7/distutils/msvc9compiler.pyR3~s			cCs�d}tjj|�}|dkr(dS|t|�}tj|jdd�\}}t|d �d}t|dd!�d	}|dkr�d
}n|dkr�||SdS(s�Return the version of MSVC that was used to build Python.

    For Python 2.3 and up, the version number is included in
    sys.version.  For earlier versions, assume the compiler is MSVC 6.
    sMSC v.i����it ii����iig$@iN(tsysR9tfindtlentsplittintR(tprefixRR,tresttmajorVersiontminorVersion((s//usr/lib64/python2.7/distutils/msvc9compiler.pytget_build_version�s	cCsIg}x<|D]4}tjj|�}||kr
|j|�q
q
W|S(snReturn a list of normalized paths with duplicates removed.

    The current order of paths is maintained.
    (tosRtnormpathR(tpathst
reduced_pathsRHtnp((s//usr/lib64/python2.7/distutils/msvc9compiler.pytnormalize_and_reduce_paths�s
cCs[|jtj�}g}x*|D]"}||kr|j|�qqWtjj|�}|S(s8Remove duplicate values of an environment variable.
    (RRRYtpathsepRtjoin(tvariabletoldListtnewListRtnewVariable((s//usr/lib64/python2.7/distutils/msvc9compiler.pytremoveDuplicates�s
cCs�t|}ytjd|d�}Wntk
r=d}nX|dkr�t|}ytjd|d�}Wq�tk
r�d}tjd�q�Xn|s�tj	j
|�rZd|}tjj|d�}|rFtj	j
|�rFtj	j
|tjtjd�}tj	j|�}tj	j
|�sWtjd|�dSqZtjd|�n|sqtjd�dStj	j
|d	�}tj	j|�r�|Stjd
�dS(s�Find the vcvarsall.bat file

    At first it tries to find the productdir of VS 2008 in the registry. If
    that fails it falls back to the VS90COMNTOOLS env var.
    s%s\Setup\VCR>s%Unable to find productdir in registrysVS%0.f0COMNTOOLStVCs%s is not a valid directorys Env var %s is not set or invalidsNo productdir founds
vcvarsall.batsUnable to find vcvarsall.batN(R5R
RRRtVSEXPRESS_BASERtdebugRYRtisdirtenvirontgetR`tpardirtabspathtisfile(R9R6R>ttoolskeyttoolsdirt	vcvarsall((s//usr/lib64/python2.7/distutils/msvc9compiler.pytfind_vcvarsall�s@









!

cCs�t|�}td�}i}|dkr9td��ntjd||�tjd||fdtjd	tj�}z�|j	�\}}|j
�d
kr�t|jd���n|jd�}x�|jd�D]�}t
j|�}d
|kr�q�n|j�}|jd
d�\}	}
|	j�}	|	|kr�|
jtj�rW|
d }
nt|
�||	<q�q�WWd|jj�|jj�Xt|�t|�kr�ttt|j�����n|S(sDLaunch vcvarsall.bat and read the settings from its environment
    tincludetlibtlibpathRsUnable to find vcvarsall.bats'Calling 'vcvarsall.bat %s' (version=%s)s
"%s" %s & settstdouttstderriR)s
t=ii����N(RsRtRuR(RrtsetRRRRht
subprocesstPopentPIPEtcommunicatetwaitR(RRR
R$tstripR#tendswithRYR_ReRvtcloseRwRQt
ValueErrortstrtlisttkeys(R9tarchRqtinterestingtresulttpopenRvRwtlineRR&((s//usr/lib64/python2.7/distutils/msvc9compiler.pytquery_vcvarsalls<	

!g @s(VC %0.1f is not supported by this moduletMSVCCompilercBsMeZdZdZiZdgZdddgZdgZdgZeeeeZ	dZ
d	Zd
ZdZ
dZZd
Zdddd�Zdd�Zddd�Zdddddddd�Zdddd�Zddddddddddd�
Zd�Zd�Zd�Zd�Zd�Zd�Zdd�Zd�ZRS(swConcrete class that implements an interface to Microsoft Visual C++,
       as defined by the CCompiler abstract class.tmsvcs.cs.ccs.cpps.cxxs.rcs.mcs.ress.objs.libs.dlls%s%ss.exeicCsPtj||||�t|_d|_g|_d|_d|_t	|_
dS(NsSoftware\Microsoft\VisualStudio(RR:tVERSIONt_MSVCCompiler__versiont_MSVCCompiler__roott_MSVCCompiler__pathsRt	plat_namet_MSVCCompiler__archtFalsetinitialized(R8tverbosetdry_runtforce((s//usr/lib64/python2.7/distutils/msvc9compiler.pyR:Ss					cCs+|jstd��|dkr.t�}nd%}||krVtd|f��ndtjkr�dtjkr�|jd�r�d|_d	|_	d
|_
d|_d|_n+|t�ks�|dkr�t
|}nt
t�d
t
|}tt|�}|djd�jtj�|_|djd�tjd<|djd�tjd<t|j�dkr�td|j��n|jd�|_|jd	�|_	|jd
�|_
|jd�|_|jd�|_y5x.tjdjd�D]}|jj|�q�WWntk
r&nXt|j�|_dj|j�tjd<d|_|jdkr�dddddg|_ddddddg|_n9ddddddg|_dddddddg|_d dd!g|_|jd"krd dd#d$g|_ ndg|_!t"|_dS(&Nsdon't init multiple timesR	s	win-amd64swin-ia64s--plat-name must be one of %stDISTUTILS_USE_SDKtMSSdkscl.exeslink.exeslib.exesrc.exesmc.exet_RR)RtRsisxPython was built with %s, and extensions need to be built with the same version of the compiler, but it isn't installed.t;R
s/nologos/Oxs/MDs/W3s/DNDEBUGs/Ods/MDds/Z7s/D_DEBUGs/GS-s/DLLs/INCREMENTAL:NOis/INCREMENTAL:nos/DEBUG(R	s	win-amd64swin-ia64(#R�tAssertionErrorRRRRYRjtfind_exetcctlinkerRttrctmctPLAT_TO_VCVARSR�R�tencodeRRR_R�RQt_MSVCCompiler__productRRR^R`tpreprocess_optionsR�tcompile_optionstcompile_options_debugtldflags_sharedR�tldflags_shared_debugtldflags_staticR(R8R�tok_platst	plat_spectvc_envRH((s//usr/lib64/python2.7/distutils/msvc9compiler.pyt
initialize^sf-				
"
	tcCs>|dkrd}ng}x|D]}tjj|�\}}tjj|�d}|tjj|�}||jkr�td|��n|r�tjj|�}n||j	kr�|j
tjj|||j��q"||j
kr|j
tjj|||j��q"|j
tjj|||j��q"W|S(NR�isDon't know how to compile %s(RRYRtsplitextt
splitdrivetisabstsrc_extensionsRtbasenamet_rc_extensionsRR`t
res_extensiont_mc_extensionst
obj_extension(R8tsource_filenamest	strip_dirt
output_dirt	obj_namestsrc_nameRtext((s//usr/lib64/python2.7/distutils/msvc9compiler.pytobject_filenames�s(	
c	Cs�|js|j�n|j||||||�}	|	\}}
}}}|pRg}
|
jd�|r{|
j|j�n|
j|j�xV|
D]N}y||\}}Wntk
r�q�nX|r�tj	j
|�}n||jkr�d|}n�||jkrd|}nq||j
kr�|}d|}y)|j|jg||g|g�Wq�tk
r}t|��q�Xq�n||jkrqtj	j|�}tj	j|�}y�|j|jgd|d|g|g�tj	jtj	j|��\}}tj	j||d�}|j|jgd|g|g�Wq�tk
rj}t|��q�Xq�ntd||f��d	|}y-|j|jg|
|||g|�Wq�tk
r�}t|��q�Xq�W|
S(
Ns/cs/Tcs/Tps/fos-hs-rs.rcs"Don't know how to compile %s to %ss/Fo(R�R�t_setup_compileRtextendR�R�RRYRRmt
_c_extensionst_cpp_extensionsR�tspawnR�RRR�tdirnameR�R�R�R`R�(R8tsourcesR�R4tinclude_dirsRht
extra_preargstextra_postargstdependstcompile_infotobjectstpp_optstbuildtcompile_optstobjtsrcR�t	input_optt
output_opttmsgth_dirtrc_dirRR�trc_file((s//usr/lib64/python2.7/distutils/msvc9compiler.pytcompile�sj	






#$$#
c	Cs�|js|j�n|j||�\}}|j|d|�}|j||�r�|d|g}|rony|j|jg|�Wq�tk
r�}t|��q�Xnt	j
d|�dS(NR�s/OUT:sskipping %s (up-to-date)(R�R�t_fix_object_argstlibrary_filenamet
_need_linkR�RtRRRRh(	R8R�toutput_libnameR�Rhttarget_langtoutput_filenametlib_argsR�((s//usr/lib64/python2.7/distutils/msvc9compiler.pytcreate_static_lib)s	
	cCs�|js|j�n|j||�\}}|j|||�}|\}}}|rr|jdt|��nt||||�}|dk	r�tj	j
||�}n|j||�r�|tj
kr�|	r�|jd}q
|jd}n|	r|j}n	|j}g}x%|pgD]}|jd|�q W||||d|g}tj	j|d�}|dk	r�tj	jtj	j|��\}}tj	j
||j|��}|jd|�n|j|||�|
r�|
|d*n|r|j|�n|jtj	j|��y|j|jg|�Wntk
ra}t|��nX|j||�}|dk	r�|\}}d||f}y |jdd	d
||g�Wq�tk
r�}t|��q�Xq�ntjd|�dS(Ns5I don't know what to do with 'runtime_library_dirs': is/EXPORT:s/OUT:is/IMPLIB:s-outputresource:%s;%ssmt.exes-nologos	-manifestsskipping %s (up-to-date)(R�R�R�t
_fix_lib_argstwarnR�RRRYRR`R�Rt
EXECUTABLER�R�RR�R�R�R�tmanifest_setup_ldargsR�tmkpathR�R�RRtmanifest_get_embed_infoRRh(R8ttarget_descR�R�R�t	librariestlibrary_dirstruntime_library_dirstexport_symbolsRhR�R�t
build_tempR�t
fixed_argstlib_optstldflagstexport_optstsymtld_argstdll_nametdll_exttimplib_fileR�tmfinfot
mffilenametmfidtout_arg((s//usr/lib64/python2.7/distutils/msvc9compiler.pytlinkBsl	
						
cCs:tjj|tjj|�d�}|jd|�dS(Ns	.manifests/MANIFESTFILE:(RYRR`R�R(R8R�R�R�t
temp_manifest((s//usr/lib64/python2.7/distutils/msvc9compiler.pyR��s	cCs�x;|D]/}|jd�r|jdd�d}PqqWdS|tjkrVd}nd}|j|�}|dkr{dS||fS(Ns/MANIFESTFILE:t:ii(t
startswithRRRRR�t_remove_visual_c_ref(R8R�R�targR�R�((s//usr/lib64/python2.7/distutils/msvc9compiler.pyR��s
	cCs�y�t|�}z|j�}Wd|j�Xtjdtj�}tj|d|�}d}tj|d|�}tjdtj�}tj||�dkr�dSt|d�}z|j	|�|SWd|j�XWnt
k
r�nXdS(NsU<assemblyIdentity.*?name=("|')Microsoft\.VC\d{2}\.CRT("|').*?(/>|</assemblyIdentity>)R�s*<dependentAssembly>\s*</dependentAssembly>sI<assemblyIdentity.*?name=(?:"|')(.+?)(?:"|').*?(?:/>|</assemblyIdentity>)tw(topentreadR�treR�tDOTALLRMtsearchRtwritetIOError(R8t
manifest_filet
manifest_ftmanifest_buftpattern((s//usr/lib64/python2.7/distutils/msvc9compiler.pyR��s.	

cCsd|S(Ns	/LIBPATH:((R8tdir((s//usr/lib64/python2.7/distutils/msvc9compiler.pytlibrary_dir_option�scCstd��dS(Ns<don't know how to set runtime library search path for MSVC++(R(R8R
((s//usr/lib64/python2.7/distutils/msvc9compiler.pytruntime_library_dir_option�scCs
|j|�S(N(R�(R8Rt((s//usr/lib64/python2.7/distutils/msvc9compiler.pytlibrary_option�scCs�|r|d|g}n	|g}xW|D]K}xB|D]:}tjj||j|��}tjj|�r6|Sq6Wq)WdSdS(Nt_d(RYRR`R�texistsR(R8tdirsRtRht	try_namesR
R%tlibfile((s//usr/lib64/python2.7/distutils/msvc9compiler.pytfind_library_file�s	

cCs�xH|jD]=}tjjtjj|�|�}tjj|�r
|Sq
WxUtjdjd�D]=}tjjtjj|�|�}tjj|�rb|SqbW|S(s�Return path to an MSVC executable program.

        Tries to find the program in several places: first, one of the
        MSVC program search paths from the registry; next, the directories
        in the PATH environment variable.  If any of those work, return an
        absolute path that is known to exist.  If none of them work, just
        return the original program name, 'exe'.
        tPathR�(R�RYRR`RmRnRjRR(R8texeRHtfn((s//usr/lib64/python2.7/distutils/msvc9compiler.pyR�
s	!!N( R.R/R0t
compiler_typetexecutablesR�R�R�R�R�R�R�tstatic_lib_extensiontshared_lib_extensiontstatic_lib_formattshared_lib_formatt
exe_extensionR:RR�R�R�R�R�R�R�R�RRRRR�(((s//usr/lib64/python2.7/distutils/msvc9compiler.pyR�5sR			
YVR			+			I(((2R0t__revision__RYRzRORtdistutils.errorsRRRRRtdistutils.ccompilerRRt	distutilsRtdistutils.utilRt_winregt	OpenKeyExRtEnumKeyRt	EnumValueR"terrorRt
HKEY_USERStHKEY_CURRENT_USERtHKEY_LOCAL_MACHINEtHKEY_CLASSES_ROOTRtplatformtmaxsizetNATIVE_WIN64R5RgRGRFR�R
R3RXR^ReRrR�R�R�(((s//usr/lib64/python2.7/distutils/msvc9compiler.pyt<module>sV(					
>.				,)	PKW[m��lldep_util.pycnu�[����
{fc@sZdZdZddlZddlmZddlmZd�Zd�Zdd	�Z	dS(
s�distutils.dep_util

Utility functions for simple, timestamp-based dependency of files
and groups of files; also, function based entirely on such
timestamp dependency analysis.s$Id$i����N(tST_MTIME(tDistutilsFileErrorcCsktjj|�s1tdtjj|���ntjj|�sGtStj|�ttj|�tkS(s�Tells if the target is newer than the source.

    Return true if 'source' exists and is more recently modified than
    'target', or if 'source' exists and 'target' doesn't.

    Return false if both exist and 'target' is the same age or younger
    than 'source'. Raise DistutilsFileError if 'source' does not exist.

    Note that this test is not very accurate: files created in the same second
    will have the same "age".
    sfile '%s' does not exist(tostpathtexistsRtabspathtTruetstatR(tsourcettarget((s*/usr/lib64/python2.7/distutils/dep_util.pytnewer
scCs�t|�t|�kr$td�ng}g}xIt||�D]8\}}t||�r@|j|�|j|�q@q@W||fS(s�Walk two filename lists in parallel, testing if each source is newer
    than its corresponding target.  Return a pair of lists (sources,
    targets) where source is newer than target, according to the semantics
    of 'newer()'.
    s+'sources' and 'targets' must be same length(tlent
ValueErrortzipR
tappend(tsourcesttargetst	n_sourcest	n_targetsRR	((s*/usr/lib64/python2.7/distutils/dep_util.pytnewer_pairwise!s
terrorcCs�tjj|�stStj|�t}xq|D]i}tjj|�s||dkrWq||dkriq0q||dkr|tSntj|�t|kr0tSq0WtS(s�Return true if 'target' is out-of-date with respect to any file
    listed in 'sources'.

    In other words, if 'target' exists and is newer
    than every file in 'sources', return false; otherwise return true.
    'missing' controls what we do when a source file is missing; the
    default ("error") is to blow up with an OSError from inside 'stat()';
    if it is "ignore", we silently drop any missing source files; if it is
    "newer", any missing source files make us assume that 'target' is
    out-of-date (this is handy in "dry-run" mode: it'll make you pretend to
    carry out commands that wouldn't work because inputs are missing, but
    that doesn't matter because you're not actually going to run the
    commands).
    RtignoreR
(RRRRRRtFalse(RR	tmissingttarget_mtimeR((s*/usr/lib64/python2.7/distutils/dep_util.pytnewer_group4s
(
t__doc__t__revision__RRRtdistutils.errorsRR
RR(((s*/usr/lib64/python2.7/distutils/dep_util.pyt<module>s		PKW[�^�	spawn.pyonu�[����
{fc@s�dZdZddlZddlZddlmZmZddlmZddl	m
Z
dddd	�Zd
�Zdddd�Z
dddd�Zejd
kr�ddl	mZdadandddd�Zdd�ZdS(s�distutils.spawn

Provides the 'spawn()' function, a front-end to various platform-
specific functions for launching another program in a sub-process.
Also provides the 'find_executable()' to search the path for a given
executable name.
s$Id$i����N(tDistutilsPlatformErrortDistutilsExecError(tDEBUG(tlogiicCs�t|�}tjdkr1t||d|�nZtjdkrVt||d|�n5tjdkr{t||d|�ntdtj�dS(s�Run another program, specified as a command list 'cmd', in a new process.

    'cmd' is just the argument list for the new process, ie.
    cmd[0] is the program to run and cmd[1:] are the rest of its arguments.
    There is no way to run a program with a name different from that of its
    executable.

    If 'search_path' is true (the default), the system's executable
    search path will be used to find the program; otherwise, cmd[0]
    must be the exact path to the executable.  If 'dry_run' is true,
    the command will not actually be run.

    Raise DistutilsExecError if running the program fails in any way; just
    return on success.
    tposixtdry_runtnttos2s1don't know how to spawn programs on platform '%s'N(tlisttostnamet_spawn_posixt	_spawn_ntt
_spawn_os2R(tcmdtsearch_pathtverboseR((s'/usr/lib64/python2.7/distutils/spawn.pytspawnscCs>x7t|�D])\}}d|kr
d|||<q
q
W|S(s�Quote command-line arguments for DOS/Windows conventions.

    Just wraps every argument which contains blanks in double quotes, and
    returns a new argument list.
    t s"%s"(t	enumerate(targstitarg((s'/usr/lib64/python2.7/distutils/spawn.pyt_nt_quote_args/scCs�|d}t|�}|r1t|�p+|}ntjdj|g|d��|s�ytjtj||�}Wn9tk
r�}t	s�|}nt
d||df�nX|dkr�t	s�|}nt
d||f�q�ndS(NiRiscommand %r failed: %si����s%command %r failed with exit status %d(Rtfind_executableRtinfotjoinR	tspawnvtP_WAITtOSErrorRR(RRRRt
executabletrctexc((s'/usr/lib64/python2.7/distutils/spawn.pyR?s$
!		cCs�|d}|r%t|�p|}ntjdj|g|d��|s�ytjtj||�}Wn9tk
r�}ts�|}nt	d||df�nX|dkr�ts�|}ntj
d||f�t	d||f�q�ndS(NiRiscommand %r failed: %si����s%command %r failed with exit status %d(RRRRR	RRRRRtdebug(RRRRRRR ((s'/usr/lib64/python2.7/distutils/spawn.pyR
Ws$
!		tdarwin(t	sysconfigcCs_tjdj|��|r dS|d}|r9tjp?tj}d}tjdkrGt	dkr�t
jd�puda	t	r�gt	jd�D]}t
|�^q�aq�nt	rGtjjdt	�}tg|jd�D]}t
|�^q�krd|t	f}	t|	��nttjd|�}|r8tjp>tj}qGntj�}
|
dkry0|dkr~|||�n||||�WnLtk
r�}ts�|}ntjjd||jf�tjd	�nXts�|}ntjjd
|�tjd	�nJxGytj|
d�\}
}Wn]tk
r�}
ddl}|
j|jkrfqntsu|}ntd||
df�nXtj |�r�ts�|}ntd
|tj!|�f�qtj"|�r tj#|�}|dkr�dSts
|}ntd||f�qtj$|�r5qqtsD|}ntd||f�qWdS(NRiR"tMACOSX_DEPLOYMENT_TARGETtt.sF$MACOSX_DEPLOYMENT_TARGET mismatch: now "%s" but "%s" during configuresunable to execute %r: %s
is(unable to execute %r for unknown reasonsi����scommand %r failed: %ss"command %r terminated by signal %ds%command %r failed with exit status %ds1unknown error executing %r: termination status %d(%RRRR	texecvptexecvtNonetsystplatformt_cfg_targetR#tget_config_vartsplittintt_cfg_target_splittenvirontgetRtdicttexecvpetexecvetforkRRtstderrtwritetstrerrort_exittwaitpidterrnotEINTRRtWIFSIGNALEDtWTERMSIGt	WIFEXITEDtWEXITSTATUSt
WIFSTOPPED(RRRRRtexec_fntenvtxt
cur_targettmy_msgtpidtetstatusR R<texit_status((s'/usr/lib64/python2.7/distutils/spawn.pyRts�
..
							cCs�|dkr'tjjdtj�}n|jtj�}tjj|�\}}t	j
dksotjdkr�|dkr�|d}ntjj|�s�x9|D]1}tjj
||�}tjj|�r�|Sq�WdS|SdS(s�Tries to find 'executable' in the directories listed in 'path'.

    A string listing directories separated by 'os.pathsep'; defaults to
    os.environ['PATH'].  Returns the complete filename or None if not found.
    tPATHtwin32Rs.exeN(R)R	R1R2tdefpathR.tpathseptpathtsplitextR*R+R
tisfileR(RRPtpathstbasetexttptf((s'/usr/lib64/python2.7/distutils/spawn.pyR�s*

(t__doc__t__revision__R*R	tdistutils.errorsRRtdistutils.debugRt	distutilsRRRRR
R+R#R)R,R0RR(((s'/usr/lib64/python2.7/distutils/spawn.pyt<module>s 		XPKW[	`��ppcore.pyonu�[����
{fc@s�dZdZddlZddlZddlmZddlmZmZm	Z	m
Z
ddlmZddl
mZddlmZdd	lmZd
Zd�Zdadad2Zd3Zd/�Zdd0d1�ZdS(4s#distutils.core

The only module that needs to be imported to use the Distutils; provides
the 'setup' function (which is to be called from the setup script).  Also
indirectly provides the Distribution and Command classes, although they are
really defined in distutils.dist and distutils.cmd.
s$Id$i����N(tDEBUG(tDistutilsSetupErrortDistutilsArgErrortDistutilsErrortCCompilerError(tDistribution(tCommand(t
PyPIRCCommand(t	Extensions�usage: %(script)s [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]
   or: %(script)s --help [cmd1 cmd2 ...]
   or: %(script)s --help-commands
   or: %(script)s cmd --help
cCs!tjj|�}ti|d6S(Ntscript(tostpathtbasenametUSAGE(tscript_nameR	((s&/usr/lib64/python2.7/distutils/core.pyt	gen_usage#st	distclassRtscript_argstoptionstnametversiontauthortauthor_emailt
maintainertmaintainer_emailturltlicensetdescriptiontlong_descriptiontkeywordst	platformstclassifierstdownload_urltrequirestprovidest	obsoletestsourcestinclude_dirst
define_macrostundef_macrostlibrary_dirst	librariestruntime_library_dirst
extra_objectstextra_compile_argstextra_link_argst	swig_optstexport_symbolstdependstlanguagecKs5|jd�}|r|d=nt}d|krQtjjtjd�|d<nd|krqtjd|d<ny||�a}WnFtk
r�}d|kr�t	d|d|f�q�t	d|�nXt
d	kr�|S|j�trd
GH|j
�nt
dkr|Sy|j�}Wn-tk
rO}t	t|j�d|�nXtrhd
GH|j
�nt
dkrx|S|r1y|j�Wq1tk
r�t	d�q1ttjfk
r�}tr�tjjd|f��q.t	d|f�q1ttfk
r-}tr�q.t	dt|��q1Xn|S(s�The gateway to the Distutils: do everything your setup script needs
    to do, in a highly flexible and user-driven way.  Briefly: create a
    Distribution instance; find and parse config files; parse the command
    line; run each Distutils command found there, customized by the options
    supplied to 'setup()' (as keyword arguments), in config files, and on
    the command line.

    The Distribution instance might be an instance of a class supplied via
    the 'distclass' keyword argument to 'setup'; if no such class is
    supplied, then the Distribution class (in dist.py) is instantiated.
    All other arguments to 'setup' (except for 'cmdclass') are used to set
    attributes of the Distribution instance.

    The 'cmdclass' argument, if supplied, is a dictionary mapping command
    names to command classes.  Each command encountered on the command line
    will be turned into a command class, which is in turn instantiated; any
    class found in 'cmdclass' is used in place of the default, which is
    (for command 'foo_bar') class 'foo_bar' in module
    'distutils.command.foo_bar'.  The command class must provide a
    'user_options' attribute which is a list of option specifiers for
    'distutils.fancy_getopt'.  Any command-line options between the current
    and the next command are used to set attributes of the current command
    object.

    When the entire command-line has been successfully parsed, calls the
    'run()' method on each command object in turn.  This method will be
    driven entirely by the Distribution object (which each command object
    has a reference to, thanks to its constructor), and the
    command-specific options that became attributes of each command
    object.
    RRiRiRserror in %s setup command: %sserror in setup command: %stinits%options (after parsing config files):tconfigs

error: %ss%options (after parsing command line):tcommandlinetinterrupteds
error: %s
s	error: %sserror: (tgetRR
RRtsystargvt_setup_distributionRt
SystemExitt_setup_stop_aftertparse_config_filesRtdump_option_dictstparse_command_lineRRRtrun_commandstKeyboardInterrupttIOErrorterrortstderrtwriteRRtstr(tattrstklasstdisttmsgtoktexc((s&/usr/lib64/python2.7/distutils/core.pytsetup<s`%
 



truncBs�|dkred|f�n|aej}i|d6}i}yrz[|ejd<|d	k	rp|ejd)ne|�}z|j�||UWd	|j�XWd	|e_d	aXWnek
r�n
�nXt	d	kr�e
d
|�nt	S(s)Run a setup script in a somewhat controlled environment, and
    return the Distribution instance that drives things.  This is useful
    if you need to find out the distribution meta-data (passed as
    keyword args from 'script' to 'setup()', or the contents of the
    config files or command-line.

    'script_name' is a file that will be run with 'execfile()';
    'sys.argv[0]' will be replaced with 'script' for the duration of the
    call.  'script_args' is a list of strings; if supplied,
    'sys.argv[1:]' will be replaced by 'script_args' for the duration of
    the call.

    'stop_after' tells 'setup()' when to stop processing; possible
    values:
      init
        stop after the Distribution instance has been created and
        populated with the keyword arguments to 'setup()'
      config
        stop after config files have been parsed (and their data
        stored in the Distribution instance)
      commandline
        stop after the command-line ('sys.argv[1:]' or 'script_args')
        have been parsed (and the data stored in the Distribution)
      run [default]
        stop after all commands have been run (the same as if 'setup()'
        had been called in the usual way

    Returns the Distribution instance, which provides all information
    used to drive the Distutils.
    R2R3R4RMs"invalid value for 'stop_after': %rt__file__iiNsZ'distutils.core.setup()' was never called -- perhaps '%s' is not a Distutils setup script?(R2R3R4RM(t
ValueErrorR;R7R8tNonetopentreadtcloseR:R9tRuntimeError(RRt
stop_aftert	save_argvtgtltf((s&/usr/lib64/python2.7/distutils/core.pyt	run_setup�s4	

	

(RRRRRRRRRRRRRRRRRR R!R"R#(RR$R%R&R'R(R)R*R+R,R-R.R/R0R1(t__doc__t__revision__R7R
tdistutils.debugRtdistutils.errorsRRRRtdistutils.distRt
distutils.cmdRtdistutils.configRtdistutils.extensionRR
RRPR;R9tsetup_keywordstextension_keywordsRLRZ(((s&/usr/lib64/python2.7/distutils/core.pyt<module>s4"		oPKW[e|��% % unixccompiler.pyonu�[����
{fc@s�dZdZddlZddlZddlZddlmZmZddlm	Z	ddl
mZddlm
Z
mZmZddlmZmZmZmZdd	lmZejd
kr�ddlZnde
fd��YZdS(
s9distutils.unixccompiler

Contains the UnixCCompiler class, a subclass of CCompiler that handles
the "typical" Unix-style command-line C compiler:
  * macros defined with -Dname[=value]
  * macros undefined with -Uname
  * include search directories specified with -Idir
  * libraries specified with -lllib
  * library search directories specified with -Ldir
  * compile handled by 'cc' (or similar) executable with -c option:
    compiles .c to .o
  * link static library handled by 'ar' command (possibly with 'ranlib')
  * link shared library handled by 'cc -shared'
s$Id$i����N(t
StringTypetNoneType(t	sysconfig(tnewer(t	CCompilertgen_preprocess_optionstgen_lib_options(tDistutilsExecErrortCompileErrortLibErrort	LinkError(tlogtdarwint
UnixCCompilercBs|eZdZid(d6dgd6dgd6dgd6ddgd6dgd6d	d
gd6d(d6Zejd
 dkr�dged<nddddddgZdZdZ	dZ
dZdZdZ
ZZeZejdkr�dZnd�Zd(d(d(d(d(d�Zd�Zd(d d(d!�Zd(d(d(d(d(d d(d(d(d(d"�
Zd#�Zd$�Zd%�Zd&�Zd d'�ZRS()tunixtpreprocessortcctcompilertcompiler_sotcompiler_cxxs-sharedt	linker_sot
linker_exetars-crtarchivertranlibiRs.cs.Cs.ccs.cxxs.cpps.ms.os.as.sos.dylibs.tbdslib%s%stcygwins.execCs_tj||||�\}}}tjd�}|rR||krR|j|�n|||fS(s'Remove standard library path from rpathtLIBDIR(Rt
_fix_lib_argsRtget_config_vartremove(tselft	librariestlibrary_dirstruntime_library_dirstlibdir((s//usr/lib64/python2.7/distutils/unixccompiler.pyRXscCs	|jd||�\}}}t||�}|j|}	|rV|	jd|g�n|ri||	d*n|r|	j|�n|	j|�|js�|dks�t||�r|r�|jt	j
j|��ny|j|	�Wqt
k
r}
t|
�qXndS(Ns-oi(t_fix_compile_argstNoneRRtextendtappendtforceRtmkpathtostpathtdirnametspawnRR(Rtsourcetoutput_filetmacrostinclude_dirst
extra_preargstextra_postargstignoretpp_optstpp_argstmsg((s//usr/lib64/python2.7/distutils/unixccompiler.pyt
preprocessbs"


$c	Csz|j}tjdkr1tj|||�}ny&|j|||d|g|�Wntk
ru}t|�nXdS(NRs-o(Rtsystplatformt_osx_supporttcompiler_fixupR,RR(	Rtobjtsrctexttcc_argsR2R4RR6((s//usr/lib64/python2.7/distutils/unixccompiler.pyt_compile}s		icCs�|j||�\}}|j|d|�}|j||�r�|jtjj|��|j|j|g||j	�|j
r�y|j|j
|g�Wq�tk
r�}t|�q�Xq�nt
jd|�dS(Nt
output_dirsskipping %s (up-to-date)(t_fix_object_argstlibrary_filenamet
_need_linkR(R)R*R+R,RtobjectsRRR	Rtdebug(RREtoutput_libnameRARFttarget_langtoutput_filenameR6((s//usr/lib64/python2.7/distutils/unixccompiler.pytcreate_static_lib�s	cCs"|j||�\}}|j|||�\}}}t||||�}t|�ttfkrotd�n|dk	r�tj	j
||�}n|j||�r||j|d|g}|	r�dg|d*n|
r�|
|d*n|r�|j
|�n|jtj	j|��y�|tjkr7|j}n
|j}|
dkr�|jr�d}tj	j|d�dkr�d}x!d||kr�|d}q�Wn|j|||<ntjd	kr�tj||�}n|j||�Wqtk
r
}t|�qXntjd
|�dS(Ns%'output_dir' must be a string or Nones-os-gisc++tenvit=Rsskipping %s (up-to-date)(RBRRttypeRRt	TypeErrorR$R)R*tjoinRDRER%R(R+Rt
EXECUTABLERRRtbasenameR8R9R:R;R,RR
RRF(Rttarget_descRERIRARR R!texport_symbolsRFR1R2t
build_tempRHtlib_optstld_argstlinkertiR6((s//usr/lib64/python2.7/distutils/unixccompiler.pytlink�sD	


cCsd|S(Ns-L((Rtdir((s//usr/lib64/python2.7/distutils/unixccompiler.pytlibrary_dir_option�scCsd|kpd|kS(Ntgccsg++((Rt
compiler_name((s//usr/lib64/python2.7/distutils/unixccompiler.pyt_is_gcc�scCs�tjjtjd��}tjd dkr6d|Stjd dkrQd|Stjd d	kr�|j|�r�d
d|gSdd|gStjd dks�tjd d
kr�d|gS|j|�r�d|Sd|SdS(NtCCiRs-Litfreebsds-Wl,-rpath=ishp-uxs-Wl,+ss+stirix646tosf1V5s-rpaths-Wl,-Rs-R(R)R*RQRRR8R9R^(RRZR((s//usr/lib64/python2.7/distutils/unixccompiler.pytruntime_library_dir_option�s
&
cCsd|S(Ns-l((Rtlib((s//usr/lib64/python2.7/distutils/unixccompiler.pytlibrary_optionscCs|j|dd�}|j|dd�}|j|dd�}|j|dd�}tjdkr�tjd�}tjd|�}	|	dkr�d	}
q�|	jd
�}
nxj|D]b}t	j
j||�}t	j
j||�}
t	j
j||�}t	j
j||�}tjdkr�|jd�sI|jd�r�|jd
�r�t	j
j|
|d
|�}t	j
j|
|d
|�}
t	j
j|
|d
|�}t	j
j|
|d
|�}nt	j
j
|
�r�|
St	j
j
|�r�|St	j
j
|�r�|St	j
j
|�r�|Sq�WdS(Ntlib_typetsharedtdylibt
xcode_stubtstaticRtCFLAGSs-isysroot\s+(\S+)t/is/System/s/usr/s/usr/local/(RCR8R9RRtretsearchR$tgroupR)R*ROt
startswithtexists(RtdirsRdRFtshared_ftdylib_ftxcode_stub_ftstatic_ftcflagstmtsysrootRZRgRhRjRi((s//usr/lib64/python2.7/distutils/unixccompiler.pytfind_library_files>	
N(t__name__t
__module__t
compiler_typeR$texecutablesR8R9tsrc_extensionst
obj_extensiontstatic_lib_extensiontshared_lib_extensiontdylib_lib_extensiontxcode_stub_lib_extensiontstatic_lib_formattshared_lib_formattdylib_lib_formattxcode_stub_lib_formatt
exe_extensionRR7R@RJRYR[R^RcReRz(((s//usr/lib64/python2.7/distutils/unixccompiler.pyR
0sF







					6				(t__doc__t__revision__R)R8RmttypesRRt	distutilsRtdistutils.dep_utilRtdistutils.ccompilerRRRtdistutils.errorsRRR	R
RR9R:R
(((s//usr/lib64/python2.7/distutils/unixccompiler.pyt<module>s$"PKW[}�J��dist.pyonu�[����
{fc@s&dZdZddlZddlZddlZddlmZyddlZWnek
rie	ZnXddl
mZmZm
Z
mZddlmZmZddlmZmZmZddlmZdd	lmZd
Zejd�Zdfd
��YZdfd��YZd�ZdS(s}distutils.dist

Provides the Distribution class, which represents the module distribution
being built/installed/distributed.
s$Id$i����N(tmessage_from_file(tDistutilsOptionErrortDistutilsArgErrortDistutilsModuleErrortDistutilsClassError(tFancyGetoptttranslate_longopt(t
check_environt	strtoboolt
rfc822_escape(tlog(tDEBUGsutf-8s^[a-zA-Z]([a-zA-Z0-9_]*)$tDistributioncBs�eZdZd]d^d_d`dbgZdZdcdddedfdgdhdidjdkdldmdndodpdqdrdsdtdudvdwgZed<�e�Zidd6Z	dad=�Z
d>�Zdadad?d@�ZdA�Z
dadB�ZdC�ZdD�ZdE�ZdF�ZddgdG�ZdH�ZdI�ZdJ�ZdK�ZdL�ZdM�ZddN�ZdadO�ZdPdQ�ZejdR�ZdS�Z dT�Z!dU�Z"dV�Z#dW�Z$dX�Z%dY�Z&dZ�Z'd[�Z(d\�Z)RS(xs�The core of the Distutils.  Most of the work hiding behind 'setup'
    is really done within a Distribution instance, which farms the work out
    to the Distutils commands specified on the command line.

    Setup scripts will almost never instantiate Distribution directly,
    unless the 'setup()' function is totally inadequate to their needs.
    However, it is conceivable that a setup script might wish to subclass
    Distribution for some specialized purpose, and then pass the subclass
    to 'setup()' as the 'distclass' keyword argument.  If so, it is
    necessary to respect the expectations that 'setup' has of Distribution.
    See the code for 'setup()', in core.py, for details.
    tverbosetvsrun verbosely (default)itquiettqs!run quietly (turns verbosity off)sdry-runtnsdon't actually do anythingthelpthsshow detailed help messagesno-user-cfgs-ignore pydistutils.cfg in your home directorys�Common commands: (see '--help-commands' for more)

  setup.py build      will build the package underneath 'build/'
  setup.py install    will install the package
s
help-commandsslist all available commandstnamesprint package nametversiontVsprint package versiontfullnamesprint <package name>-<version>tauthorsprint the author's namesauthor-emails print the author's email addresst
maintainersprint the maintainer's namesmaintainer-emails$print the maintainer's email addresstcontacts7print the maintainer's name if known, else the author'ss
contact-emails@print the maintainer's email address if known, else the author'sturlsprint the URL for this packagetlicenses print the license of the packagetlicencesalias for --licensetdescriptionsprint the package descriptionslong-descriptions"print the long package descriptiont	platformssprint the list of platformstclassifierssprint the list of classifierstkeywordssprint the list of keywordstprovidess+print the list of packages/modules providedtrequiress+print the list of packages/modules requiredt	obsoletess0print the list of packages/modules made obsoletecCst|d�S(Ni(R(tx((s&/usr/lib64/python2.7/distutils/dist.pyt<lambda>wtcCsid|_d|_d|_x!|jD]}t||d�q%Wt�|_x:|jjD],}d|}t||t|j|��qXWi|_	d|_d|_d|_
i|_g|_d|_i|_d|_d|_d|_d|_d|_d|_d|_d|_d|_d|_d|_i|_i|_|r|jd�}|dk	r�|d=xY|j �D]H\}}|j!|�}x*|j �D]\}	}
d|
f||	<q�WqzWnd|kr#|d|d<|d=d	}t"dk	rt"j#|�q#t$j%j&|d
�nx�|j �D]�\}}
t'|jd|�rot|jd|�|
�q0t'|j|�r�t|j||
�q0t'||�r�t|||
�q0dt(|�}t"dk	r�t"j#|�q0t$j%j&|d
�q0Wnt)|_*|j
dk	r[x@|j
D]2}
|
j+d
�s;Pn|
dkr"t,|_*Pq"q"Wn|j-�dS(s0Construct a new Distribution instance: initialize all the
        attributes of a Distribution, and then use 'attrs' (a dictionary
        mapping attribute names to values) to assign some of those
        attributes their "real" values.  (Any attributes not mentioned in
        'attrs' will be assigned to some null value: 0, None, an empty list
        or dictionary, etc.)  Most importantly, initialize the
        'command_obj' attribute to the empty dictionary; this will be
        filled in with real command objects by 'parse_command_line()'.
        iitget_R'toptionsssetup scriptRRs:'licence' distribution option is deprecated; use 'license's
tset_sUnknown distribution option: %st-s
--no-user-cfgN(.R
tdry_runRtdisplay_option_namestsetattrtDistributionMetadatatmetadatat_METHOD_BASENAMEStgetattrtcmdclasstNonetcommand_packagestscript_nametscript_argstcommand_optionst
dist_filestpackagestpackage_datatpackage_dirt
py_modulest	librariestheaderstext_modulestext_packagetinclude_dirst
extra_pathtscriptst
data_filestpasswordtcommand_objthave_runtgettitemstget_option_dicttwarningstwarntsyststderrtwritethasattrtreprtTruet
want_user_cfgt
startswithtFalsetfinalize_options(tselftattrstattrtbasenametmethod_nameR)tcommandtcmd_optionstopt_dicttopttvaltmsgtkeytarg((s&/usr/lib64/python2.7/distutils/dist.pyt__init__�s�			
 																							cCs6|jj|�}|dkr2i}|j|<n|S(s�Get the option dictionary for a given command.  If that
        command's option dictionary hasn't been created yet, then create it
        and return the new dictionary; otherwise, return the existing
        option dictionary.
        N(R8RIR4(RXR]tdict((s&/usr/lib64/python2.7/distutils/dist.pyRK!sR'c	Csddlm}|dkr8|jj�}|j�n|dk	rb|j||�|d}n|s}|j|d�dSx�|D]�}|jj|�}|dkr�|j|d|�q�|j|d|�||�}x,|jd�D]}|j|d|�q�Wq�WdS(Ni����(tpformats  sno commands known yetsno option dict for '%s' commandsoption dict for '%s' command:s
(	tpprintRgR4R8tkeystsorttannounceRItsplit(	RXtheadertcommandstindentRgtcmd_nameR_touttline((s&/usr/lib64/python2.7/distutils/dist.pytdump_option_dicts,s(


		cCsg}t�tjjtjdj�}tjj|d�}tjj|�r`|j	|�ntj
dkrxd}nd}|jr�tjjtjjd�|�}tjj|�r�|j	|�q�nd}tjj|�r�|j	|�nt
r|jdd	j|��n|S(
s�Find as many configuration files as should be processed for this
        platform, and return a list of filenames in the order in which they
        should be parsed.  The filenames returned are guaranteed to exist
        (modulo nasty race conditions).

        There are three possible config files: distutils.cfg in the
        Distutils installation directory (ie. where the top-level
        Distutils __inst__.py file lives), a file in the user's home
        directory named .pydistutils.cfg on Unix and pydistutils.cfg
        on Windows/Mac; and setup.cfg in the current directory.

        The file in the user's home directory can be disabled with the
        --no-user-cfg option.
        t	distutilss
distutils.cfgtposixs.pydistutils.cfgspydistutils.cfgt~s	setup.cfgsusing config files: %ss, (RtostpathtdirnameRNtmodulest__file__tjointisfiletappendRRTt
expanduserRRk(RXtfilestsys_dirtsys_filet
user_filenamet	user_filet
local_file((s&/usr/lib64/python2.7/distutils/dist.pytfind_config_filesIs&		!c
Cs�ddlm}|dkr+|j�}ntrA|jd�n|�}x�|D]�}trq|jd|�n|j|�x�|j�D]x}|j|�}|j|�}xQ|D]I}|dkr�|j	||�}	|j
dd�}||	f||<q�q�Wq�W|j�qQWd|jkr�x�|jdj
�D]�\}\}
}	|jj	|�}yY|rt||t|	��n5|dkr�t||t|	��nt|||	�Wq8tk
r�}t|�q8Xq8WndS(Ni����(tConfigParsers"Distribution.parse_config_files():s  reading %st__name__R+t_tglobalR
R,(R
R,(R�R4R�RRktreadtsectionsR)RKRItreplaceReR8RJtnegative_optR.Rt
ValueErrorR(
RXt	filenamesR�tparsertfilenametsectionR)R_R`RatsrctaliasRb((s&/usr/lib64/python2.7/distutils/dist.pytparse_config_filesys<	


&cCs|j�}g|_t||j�}|j|j�|jidd6�|jd|jd|�}|j	�}t
j|j�|j
|�r�dSx,|r�|j||�}|dkr�dSq�W|jr�|j|dt|j�dkd|j�dS|jstd	�nd
S(s�Parse the setup script's command line, taken from the
        'script_args' instance attribute (which defaults to 'sys.argv[1:]'
        -- see 'setup()' in core.py).  This list is first processed for
        "global options" -- options that set attributes of the Distribution
        instance.  Then, it is alternately scanned for Distutils commands
        and options for that command.  Each new command terminates the
        options for the previous command.  The allowed options for a
        command are determined by the 'user_options' attribute of the
        command class -- thus, we have to be able to load command classes
        in order to parse the command line.  Any error in that 'options'
        attribute raises DistutilsGetoptError; any error on the
        command-line raises DistutilsArgError.  If no Distutils commands
        were found on the command line, raises DistutilsArgError.  Return
        true if command-line was successfully parsed and we should carry
        on with executing commands; false if no errors but we shouldn't
        execute commands (currently, this only happens if user asks for
        help).
        RRtargstobjectNtdisplay_optionsiRnsno commands suppliedi(t_get_toplevel_optionsRnRR�tset_negative_aliasesR�tset_aliasestgetoptR7tget_option_orderR
t
set_verbosityR
thandle_display_optionst_parse_command_optsR4Rt
_show_helptlenR(RXttoplevel_optionsR�R�toption_order((s&/usr/lib64/python2.7/distutils/dist.pytparse_command_line�s,				
	cCs|jdgS(s�Return the non-display options recognized at the top level.

        This includes options that are recognized *only* at the top
        level as well as options recognized for commands.
        scommand-packages=s0list of packages that provide distutils commandsN(scommand-packages=Ns0list of packages that provide distutils commands(tglobal_optionsR4(RX((s&/usr/lib64/python2.7/distutils/dist.pyR��scCs�ddlm}|d}tj|�s9td|�n|jj|�y|j|�}Wntk
rz}t	|�nXt
||�s�td|�nt|d�o�t
|jt�s�tdd|�n|j}t|d	�r|j�}|j|j�nt|d
�r9t
|jt�r9t|j�}ng}|j|j|j|�|j|�|j|d�\}}	t|	d�r�|	jr�|j|d
dd|g�dSt|d
�r\t
|jt�r\d}
xm|jD]b\}}}
}t|	|j|��r�d}
t|d�r2|�qKtd||f��q�q�W|
r\dSn|j|�}x0t|	�j�D]\}}d|f||<q~W|S(s�Parse the command-line options for a single command.
        'parser' must be a FancyGetopt instance; 'args' must be the list
        of arguments, starting with the current command (whose options
        we are about to parse).  Returns a new version of 'args' with
        the next command at the front of the list; will be the empty
        list if there are no more commands on the command line.  Returns
        None if the user asked for help on this command.
        i����(tCommandisinvalid command name '%s's&command class %s must subclass Commandtuser_optionsscommand class %s must provide s+'user_options' attribute (a list of tuples)R�thelp_optionsiRR�RnNt__call__sYinvalid help function %r for help option '%s': must be a callable object (function, etc.)scommand line(t
distutils.cmdR�t
command_retmatcht
SystemExitRnR~tget_command_classRRt
issubclassRRQt
isinstanceR�tlistR�tcopytupdateR�tfix_help_optionstset_option_tableR�R�R�RR�t
get_attr_nameRKtvarsRJ(RXR�R�R�R]t	cmd_classRbR�R�toptsthelp_option_foundthelp_optiontshorttdesctfuncR_Rtvalue((s&/usr/lib64/python2.7/distutils/dist.pyR��sf




	


cCs�xdD]w}t|j|�}|dkr1qnt|t�rg|jd�D]}|j�^qP}t|j||�qqWdS(s�Set final values for all the options on the Distribution
        instance, analogous to the .finalize_options() method of Command
        objects.
        R!Rt,N(R!R(R2R0R4R�tstrRltstripR.(RXRZR�telm((s&/usr/lib64/python2.7/distutils/dist.pyRWRs
(c
Csbddlm}ddlm}|rm|r;|j�}n	|j}|j|�|j|jd�dGHn|r�|j|j	�|jdd�dGHnx�|j
D]�}t|t�r�t
||�r�|}	n|j|�}	t|	d�r#t|	jt�r#|j|	jt|	j��n|j|	j�|jd	|	j�dGHq�W||j�GHd
S(sbShow help for the setup script command-line in the form of
        several lists of command-line options.  'parser' should be a
        FancyGetopt instance; do not expect it to be returned in the
        same state, as its option table will be reset to make it
        generate the correct help text.

        If 'global_options' is true, lists the global options:
        --verbose, --dry-run, etc.  If 'display_options' is true, lists
        the "display-only" options: --name, --version, etc.  Finally,
        lists per-command help for every command name or command class
        in 'commands'.
        i����(t	gen_usage(R�s
Global options:R's*Information display options (just display s!information, ignore any commands)R�sOptions for '%s' command:N(tdistutils.coreR�R�R�R�R�R�t
print_helptcommon_usageR�RnR�ttypeR�R�RQR�R�R�R�R�R6(
RXR�R�R�RnR�R�R)R]tklass((s&/usr/lib64/python2.7/distutils/dist.pyR�_s6	
		c	Csddlm}|jr:|j�dGH||j�GHdSd}i}x|jD]}d||d<qPWx�|D]�\}}|ro|j|�rot|�}t|j	d|��}|dkr�d	j
|�GHn"|dkr�dj
|�GHn|GHd}qoqoW|S(s�If there were any non-global "display-only" options
        (--help-commands or the metadata display options) on the command
        line, display the requested info and return true; else return
        false.
        i����(R�R'iiR(R!RR�R R"R#R$s
(R!R(R R"R#R$(R�R�t
help_commandstprint_commandsR6R�RIRR2R0R|(	RXR�R�tany_display_optionstis_display_optiontoptionR`RaR�((s&/usr/lib64/python2.7/distutils/dist.pyR��s,	
	
cCs�|dGHxq|D]i}|jj|�}|s@|j|�}ny
|j}Wntk
rfd}nXd|||fGHqWdS(sZPrint a subset of the list of all commands -- used by
        'print_commands()'.
        t:s(no description available)s
  %-*s  %sN(R3RIR�RtAttributeError(RXRnRmt
max_lengthtcmdR�R((s&/usr/lib64/python2.7/distutils/dist.pytprint_command_list�s	



cCs�ddl}|jj}i}x|D]}d||<q%Wg}x6|jj�D]%}|j|�sO|j|�qOqOWd}x3||D]'}t|�|kr�t|�}q�q�W|j|d|�|r�H|j|d|�ndS(snPrint out a help message listing all available commands with a
        description of each.  The list is divided into "standard commands"
        (listed in distutils.command.__all__) and "extra commands"
        (mentioned in self.cmdclass, but not a standard command).  The
        descriptions come from the command class attribute
        'description'.
        i����NiisStandard commandssExtra commands(	tdistutils.commandR]t__all__R3RiRIR~R�R�(RXRttstd_commandstis_stdR�textra_commandsR�((s&/usr/lib64/python2.7/distutils/dist.pyR��s*
		c	Cs�ddl}|jj}i}x|D]}d||<q%Wg}x6|jj�D]%}|j|�sO|j|�qOqOWg}xv||D]j}|jj|�}|s�|j|�}ny
|j}Wnt	k
r�d}nX|j||f�q�W|S(s>Get a list of (command, description) tuples.
        The list is divided into "standard commands" (listed in
        distutils.command.__all__) and "extra commands" (mentioned in
        self.cmdclass, but not a standard command).  The descriptions come
        from the command class attribute 'description'.
        i����Nis(no description available)(
R�R]R�R3RiRIR~R�RR�(	RXRtR�R�R�R�trvR�R((s&/usr/lib64/python2.7/distutils/dist.pytget_command_list�s(




cCs�|j}t|t�s�|dkr-d}ng|jd�D]}|dkr=|j�^q=}d|kr�|jdd�n||_n|S(s9Return a list of packages from which commands are loaded.R'R�sdistutils.commandiN(R5R�R�R4RlR�tinsert(RXtpkgstpkg((s&/usr/lib64/python2.7/distutils/dist.pytget_command_packagess		4cCs�|jj|�}|r|Sx�|j�D]�}d||f}|}yt|�tj|}Wntk
rvq)nXyt||�}Wn'tk
r�t	d|||f�nX||j|<|SWt	d|��dS(soReturn the class that implements the Distutils command named by
        'command'.  First we check the 'cmdclass' dictionary; if the
        command is mentioned there, we fetch the class object from the
        dictionary and return it.  Otherwise we load the command module
        ("distutils.command." + command) and fetch the command class from
        the module.  The loaded class is also stored in 'cmdclass'
        to speed future calls to 'get_command_class()'.

        Raises DistutilsModuleError if the expected module could not be
        found, or if that module does not define the expected class.
        s%s.%ss3invalid command '%s' (no class '%s' in module '%s')sinvalid command '%s'N(
R3RIR�t
__import__RNRztImportErrorR2R�R(RXR]R�tpkgnametmodule_namet
klass_nametmodule((s&/usr/lib64/python2.7/distutils/dist.pyR�s(



cCs�|jj|�}|r�|r�tr9|jd|�n|j|�}||�}|j|<d|j|<|jj|�}|r�|j||�q�n|S(sReturn the command object for 'command'.  Normally this object
        is cached on a previous call to 'get_command_obj()'; if no command
        object for 'command' is in the cache, then we either create and
        return it (if 'create' is true) or return None.
        s<Distribution.get_command_obj(): creating '%s' command objecti(RGRIRRkR�RHR8t_set_command_options(RXR]tcreatetcmd_objR�R)((s&/usr/lib64/python2.7/distutils/dist.pytget_command_objAs
	
cCs�|j�}|dkr*|j|�}ntrD|jd|�nx_|j�D]Q\}\}}tr�|jd|||f�nytt|j�}Wnt	k
r�g}nXy
|j
}Wnt	k
r�i}nXy�t|t�}	||kr|	rt
|||t|��nc||krJ|	rJt
||t|��n8t||�rlt
|||�ntd|||f�WqQtk
r�}
t|
�qQXqQWdS(sySet the options for 'command_obj' from 'option_dict'.  Basically
        this means copying elements of a dictionary ('option_dict') to
        attributes of an instance ('command').

        'command_obj' must be a Command instance.  If 'option_dict' is not
        supplied, uses the standard option dictionary for this command
        (from 'self.command_options').
        s#  setting options for '%s' command:s    %s = %s (from %s)s1error in %s: command '%s' has no such option '%s'N(tget_command_nameR4RKRRkRJtmapRtboolean_optionsR�R�R�R�R.RRQRR�(RXRGtoption_dicttcommand_nameR�tsourceR�t	bool_optstneg_optt	is_stringRb((s&/usr/lib64/python2.7/distutils/dist.pyR�\s<	




icCs�ddlm}t||�s7|}|j|�}n|j�}|jsP|S|j�d|_d|j|<|j|�|r�x'|j	�D]}|j
||�q�Wn|S(s�Reinitializes a command to the state it was in when first
        returned by 'get_command_obj()': ie., initialized but not yet
        finalized.  This provides the opportunity to sneak option
        values in programmatically, overriding or supplementing
        user-supplied values from the config files and command line.
        You'll have to re-finalize the command object (by calling
        'finalize_options()' or 'ensure_finalized()') before using it for
        real.

        'command' should be a command name (string) or command object.  If
        'reinit_subcommands' is true, also reinitializes the command's
        sub-commands, as declared by the 'sub_commands' class attribute (if
        it has one).  See the "install" command for an example.  Only
        reinitializes the sub-commands that actually matter, ie. those
        whose test predicates return true.

        Returns the reinitialized command object.
        i����(R�i(R�R�R�R�R�t	finalizedtinitialize_optionsRHR�tget_sub_commandstreinitialize_command(RXR]treinit_subcommandsR�R�tsub((s&/usr/lib64/python2.7/distutils/dist.pyR��s	
	

cCstj||�dS(N(R
(RXRbtlevel((s&/usr/lib64/python2.7/distutils/dist.pyRk�scCs%x|jD]}|j|�q
WdS(s�Run each command that was seen on the setup script command line.
        Uses the list of commands found and cache of command objects
        created by 'get_command_obj()'.
        N(Rntrun_command(RXR�((s&/usr/lib64/python2.7/distutils/dist.pytrun_commands�scCsZ|jj|�rdStjd|�|j|�}|j�|j�d|j|<dS(s�Do whatever it takes to run a command (including nothing at all,
        if the command has already been run).  Specifically: if we have
        already created and run the command named by 'command', return
        silently without doing anything.  If the command named by 'command'
        doesn't even have a command object yet, create one.  Then invoke
        'run()' on that command object (or an existing one).
        Ns
running %si(RHRIR
tinfoR�tensure_finalizedtrun(RXR]R�((s&/usr/lib64/python2.7/distutils/dist.pyR��s	

cCs"t|jp|jpg�dkS(Ni(R�R:R=(RX((s&/usr/lib64/python2.7/distutils/dist.pythas_pure_modules�scCs|jot|j�dkS(Ni(R@R�(RX((s&/usr/lib64/python2.7/distutils/dist.pythas_ext_modules�scCs|jot|j�dkS(Ni(R>R�(RX((s&/usr/lib64/python2.7/distutils/dist.pythas_c_libraries�scCs|j�p|j�S(N(RR(RX((s&/usr/lib64/python2.7/distutils/dist.pythas_modules�scCs|jot|j�dkS(Ni(R?R�(RX((s&/usr/lib64/python2.7/distutils/dist.pythas_headers�scCs|jot|j�dkS(Ni(RDR�(RX((s&/usr/lib64/python2.7/distutils/dist.pythas_scripts�scCs|jot|j�dkS(Ni(RER�(RX((s&/usr/lib64/python2.7/distutils/dist.pythas_data_files�scCs$|j�o#|j�o#|j�S(N(RRR(RX((s&/usr/lib64/python2.7/distutils/dist.pytis_pure�s
(R
Rsrun verbosely (default)i(RRs!run quietly (turns verbosity off)(sdry-runRsdon't actually do anything(RRsshow detailed help messageN(sno-user-cfgNs-ignore pydistutils.cfg in your home directory(s
help-commandsNslist all available commands(RNsprint package name(RRsprint package version(RNsprint <package name>-<version>(RNsprint the author's name(sauthor-emailNs print the author's email address(RNsprint the maintainer's name(smaintainer-emailNs$print the maintainer's email address(RNs7print the maintainer's name if known, else the author's(s
contact-emailNs@print the maintainer's email address if known, else the author's(RNsprint the URL for this package(RNs print the license of the package(RNsalias for --license(RNsprint the package description(slong-descriptionNs"print the long package description(RNsprint the list of platforms(R Nsprint the list of classifiers(R!Nsprint the list of keywords(R"Ns+print the list of packages/modules provided(R#Ns+print the list of packages/modules required(R$Ns0print the list of packages/modules made obsolete(*R�t
__module__t__doc__R4R�R�R�R�R-R�ReRKRsR�R�R�R�R�RWR�R�R�R�R�R�R�R�R�R�R
tINFORkR�R�RRRRRRRR(((s&/usr/lib64/python2.7/distutils/dist.pyR"s�	
			
�		0.	C		]	
1	(		!	#		'+)	
								R/cBs+eZdZd3Zd4d�Zd�Zd�Zd�Zd�Z	d�Z
d�Zd�Zd�Z
d�Zd�Zd �Zd!�Zd"�Zd#�Zd$�Zd%�Zd&�ZeZd'�Zd(�Zd)�Zd*�Zd+�Zd,�Zd-�Zd.�Zd/�Z d0�Z!d1�Z"d2�Z#RS(5s]Dummy class to hold the distribution meta-data: name, version,
    author, and so forth.
    RRRtauthor_emailRtmaintainer_emailRRRtlong_descriptionR!RRRt
contact_emailR tdownload_urlR"R#R$cCs�|dk	r"|jt|��n�d|_d|_d|_d|_d|_d|_d|_	d|_
d|_d|_d|_
d|_d|_d|_d|_d|_d|_dS(N(R4t
read_pkg_filetopenRRRRRRRRRR
R!RR RR"R#R$(RXRx((s&/usr/lib64/python2.7/distutils/dist.pyRes&																cs�t|���fd�}�fd�}�d}|d�|_|d�|_|d�|_|d�|_d|_|d�|_d|_|d	�|_	|d
�|_
d�kr�|d�|_n	d|_|d�|_|d�|_d
�kr|d
�j
d�|_n|d�|_|d�|_|dkru|d�|_|d�|_|d�|_nd|_d|_d|_dS(s-Reads the metadata values from a file object.cs�|}|dkrdS|S(NtUNKNOWN(R4(RR�(Rb(s&/usr/lib64/python2.7/distutils/dist.pyt_read_fields
cs&�j|d�}|gkr"dS|S(N(tget_allR4(Rtvalues(Rb(s&/usr/lib64/python2.7/distutils/dist.pyt
_read_list#ssmetadata-versionRRtsummaryRsauthor-emails	home-pageRsdownload-urlRR!R�tplatformt
classifiers1.1R#R"R$N(RRRRRR4RRRRRRR
RlR!RR R#R"R$(RXtfileRRtmetadata_version((Rbs&/usr/lib64/python2.7/distutils/dist.pyRs:
					cCsAttjj|d�d�}z|j|�Wd|j�XdS(s7Write the PKG-INFO file into the release tree.
        sPKG-INFOtwN(RRwRxR|twrite_pkg_filetclose(RXtbase_dirtpkg_info((s&/usr/lib64/python2.7/distutils/dist.pytwrite_pkg_infoMscCs�d}|js3|js3|js3|js3|jr<d}n|j|d|�|j|d|j��|j|d|j��|j|d|j��|j|d|j	��|j|d|j
��|j|d	|j��|j|d
|j��|jr |j|d|j�nt
|j��}|j|d|�d
j|j��}|rv|j|d|�n|j|d|j��|j|d|j��|j|d|j��|j|d|j��|j|d|j��dS(s9Write the PKG-INFO format data to a file object.
        s1.0s1.1sMetadata-VersiontNametVersiontSummarys	Home-pagetAuthorsAuthor-emailtLicensesDownload-URLtDescriptionR�tKeywordstPlatformt
ClassifiertRequirestProvidest	ObsoletesN(R"R#R$R Rt_write_fieldtget_nametget_versiontget_descriptiontget_urltget_contacttget_contact_emailtget_licenseR	tget_long_descriptionR|tget_keywordst_write_listt
get_platformstget_classifierstget_requirestget_providest
get_obsoletes(RXRRt	long_descR!((s&/usr/lib64/python2.7/distutils/dist.pyRVs0		cCs$|jd||j|�f�dS(Ns%s: %s
(RPt
_encode_field(RXRRR�((s&/usr/lib64/python2.7/distutils/dist.pyR.xscCs(x!|D]}|j|||�qWdS(N(R.(RXRRRR�((s&/usr/lib64/python2.7/distutils/dist.pyR8{s
cCs6|dkrdSt|t�r,|jt�St|�S(N(R4R�tunicodetencodetPKG_INFO_ENCODINGR�(RXR�((s&/usr/lib64/python2.7/distutils/dist.pyR?s

cCs
|jpdS(NR(R(RX((s&/usr/lib64/python2.7/distutils/dist.pyR/�scCs
|jpdS(Ns0.0.0(R(RX((s&/usr/lib64/python2.7/distutils/dist.pyR0�scCsd|j�|j�fS(Ns%s-%s(R/R0(RX((s&/usr/lib64/python2.7/distutils/dist.pytget_fullname�scCs|j|j�pdS(NR(R?R(RX((s&/usr/lib64/python2.7/distutils/dist.pyt
get_author�scCs
|jpdS(NR(R(RX((s&/usr/lib64/python2.7/distutils/dist.pytget_author_email�scCs|j|j�pdS(NR(R?R(RX((s&/usr/lib64/python2.7/distutils/dist.pytget_maintainer�scCs
|jpdS(NR(R(RX((s&/usr/lib64/python2.7/distutils/dist.pytget_maintainer_email�scCs(|j|j�p'|j|j�p'dS(NR(R?RR(RX((s&/usr/lib64/python2.7/distutils/dist.pyR3�scCs|jp|jpdS(NR(RR(RX((s&/usr/lib64/python2.7/distutils/dist.pyR4�scCs
|jpdS(NR(R(RX((s&/usr/lib64/python2.7/distutils/dist.pyR2�scCs
|jpdS(NR(R(RX((s&/usr/lib64/python2.7/distutils/dist.pyR5�scCs|j|j�pdS(NR(R?R(RX((s&/usr/lib64/python2.7/distutils/dist.pyR1�scCs|j|j�pdS(NR(R?R
(RX((s&/usr/lib64/python2.7/distutils/dist.pyR6�scCs
|jpgS(N(R!(RX((s&/usr/lib64/python2.7/distutils/dist.pyR7�scCs|jpdgS(NR(R(RX((s&/usr/lib64/python2.7/distutils/dist.pyR9�scCs
|jpgS(N(R (RX((s&/usr/lib64/python2.7/distutils/dist.pyR:�scCs
|jpdS(NR(R(RX((s&/usr/lib64/python2.7/distutils/dist.pytget_download_url�scCs
|jpgS(N(R#(RX((s&/usr/lib64/python2.7/distutils/dist.pyR;�scCs:ddl}x|D]}|jj|�qW||_dS(Ni����(tdistutils.versionpredicatetversionpredicatetVersionPredicateR#(RXR�RtR((s&/usr/lib64/python2.7/distutils/dist.pytset_requires�s
cCs
|jpgS(N(R"(RX((s&/usr/lib64/python2.7/distutils/dist.pyR<�scCsYg|D]}|j�^q}x*|D]"}ddl}|jj|�q&W||_dS(Ni����(R�RIRJtsplit_provisionR"(RXR�RRt((s&/usr/lib64/python2.7/distutils/dist.pytset_provides�s

cCs
|jpgS(N(R$(RX((s&/usr/lib64/python2.7/distutils/dist.pyR=�scCs:ddl}x|D]}|jj|�qW||_dS(Ni����(RIRJRKR$(RXR�RtR((s&/usr/lib64/python2.7/distutils/dist.pyt
set_obsoletes�s
(RRRRRRRRRR
R!RRRRRR RR"R#R$N($R�RR	R1R4ReRR!RR.R8R?R/R0RCRDRERFRGR3R4R2R5tget_licenceR1R6R7R9R:RHR;RLR<RNR=RO(((s&/usr/lib64/python2.7/distutils/dist.pyR/�sN	4			"																										cCs/g}x"|D]}|j|dd!�q
W|S(sConvert a 4-tuple 'help_options' list as found in various command
    classes to the 3-tuple form required by FancyGetopt.
    ii(R~(R)tnew_optionst
help_tuple((s&/usr/lib64/python2.7/distutils/dist.pyR��s
( R	t__revision__RNRwtretemailRRLR�R4tdistutils.errorsRRRRtdistutils.fancy_getoptRRtdistutils.utilRRR	RtR
tdistutils.debugRRBtcompileR�RR/R�(((s&/usr/lib64/python2.7/distutils/dist.pyt<module>s($

"�����PKW[��8��A�Acmd.pyonu�[����
{fc@s�dZdZddlZddlZddlZddlmZddlmZm	Z	m
Z
mZmZddlm
Z
dfd��YZd	efd
��YZdS(stdistutils.cmd

Provides the Command class, the base class for the command classes
in the distutils.command package.
s$Id$i����N(tDistutilsOptionError(tutiltdir_utilt	file_utiltarchive_utiltdep_util(tlogtCommandcBsyeZdZgZd�Zd�Zd�Zd�Zd�Zd#dd�Z
d�Zd	d
�Zd�Z
d#d�Zd#d
�Zd�Zd#d�Zd�Zd�Zd�Zd�Zd	d�Zdd�Zd�Zd�Zd�Zd#d	d�Zdd�Zd	d	d#d	d�Zd	d	dd	d�Zd	d�Zd	d	d �Z d#d#d#d#d!�Z!d#d#d	d"�Z"RS($s}Abstract base class for defining command classes, the "worker bees"
    of the Distutils.  A useful analogy for command classes is to think of
    them as subroutines with local variables called "options".  The options
    are "declared" in 'initialize_options()' and "defined" (given their
    final values, aka "finalized") in 'finalize_options()', both of which
    must be defined by every command class.  The distinction between the
    two is necessary because option values might come from the outside
    world (command line, config file, ...), and any options dependent on
    other options must be computed *after* these outside influences have
    been processed -- hence 'finalize_options()'.  The "body" of the
    subroutine, where it does all its work based on the values of its
    options, is the 'run()' method, which must also be implemented by every
    command class.
    cCs�ddlm}t||�s+td�n|jtkrFtd�n||_|j�d|_
|j|_d|_d|_
d|_dS(s�Create and initialize a new Command object.  Most importantly,
        invokes the 'initialize_options()' method, which is the real
        initializer and depends on the actual command being
        instantiated.
        i����(tDistributions$dist must be a Distribution instancesCommand is an abstract classiN(tdistutils.distRt
isinstancet	TypeErrort	__class__RtRuntimeErrortdistributiontinitialize_optionstNonet_dry_runtverbosetforcethelpt	finalized(tselftdistR((s%/usr/lib64/python2.7/distutils/cmd.pyt__init__1s	

			cCsO|dkrBt|d|�}|dkr;t|j|�S|Sn	t|�dS(Ntdry_runt_(tgetattrRRtAttributeError(Rtattrtmyval((s%/usr/lib64/python2.7/distutils/cmd.pyt__getattr__ascCs#|js|j�nd|_dS(Ni(Rtfinalize_options(R((s%/usr/lib64/python2.7/distutils/cmd.pytensure_finalizedks	
cCstd|j�dS(s�Set default values for all the options that this command
        supports.  Note that these defaults may be overridden by other
        commands, by the setup script, by config files, or by the
        command-line.  Thus, this is not the place to code dependencies
        between options; generally, 'initialize_options()' implementations
        are just a bunch of "self.foo = None" assignments.

        This method must be implemented by all command classes.
        s,abstract method -- subclass %s must overrideN(R
R(R((s%/usr/lib64/python2.7/distutils/cmd.pyR}s
cCstd|j�dS(sSet final values for all the options that this command supports.
        This is always called as late as possible, ie.  after any option
        assignments from the command-line or from other commands have been
        done.  Thus, this is the place to code option dependencies: if
        'foo' depends on 'bar', then it is safe to set 'foo' from 'bar' as
        long as 'foo' still has the same value it was assigned in
        'initialize_options()'.

        This method must be implemented by all command classes.
        s,abstract method -- subclass %s must overrideN(R
R(R((s%/usr/lib64/python2.7/distutils/cmd.pyR �stcCs�ddlm}|dkr/d|j�}n|j||dtj�|d}xy|jD]n\}}}|j|�}|ddkr�|d }nt	||�}|j|d||fdtj�q]WdS(Ni����(t
longopt_xlatescommand options for '%s':tlevels  t=s%s = %s(
tdistutils.fancy_getoptR#Rtget_command_nametannounceRtINFOtuser_optionst	translateR(RtheadertindentR#toptionRtvalue((s%/usr/lib64/python2.7/distutils/cmd.pytdump_options�s

cCstd|j�dS(s�A command's raison d'etre: carry out the action it exists to
        perform, controlled by the options initialized in
        'initialize_options()', customized by other commands, the setup
        script, the command-line, and config files, and finalized in
        'finalize_options()'.  All terminal output and filesystem
        interaction should be done by 'run()'.

        This method must be implemented by all command classes.
        s,abstract method -- subclass %s must overrideN(R
R(R((s%/usr/lib64/python2.7/distutils/cmd.pytrun�s
icCstj||�dS(smIf the current verbosity level is of greater than or equal to
        'level' print 'msg' to stdout.
        N(R(RtmsgR$((s%/usr/lib64/python2.7/distutils/cmd.pyR(�scCs/ddlm}|r+|GHtjj�ndS(s~Print 'msg' to stdout if the global DEBUG (taken from the
        DISTUTILS_DEBUG environment variable) flag is true.
        i����(tDEBUGN(tdistutils.debugR3tsyststdouttflush(RR2R3((s%/usr/lib64/python2.7/distutils/cmd.pytdebug_print�scCs[t||�}|dkr/t|||�|St|t�sWtd|||f�n|S(Ns'%s' must be a %s (got `%s`)(RRtsetattrR
tstrR(RR.twhattdefaulttval((s%/usr/lib64/python2.7/distutils/cmd.pyt_ensure_stringlike�scCs|j|d|�dS(sWEnsure that 'option' is a string; if not defined, set it to
        'default'.
        tstringN(R>(RR.R<((s%/usr/lib64/python2.7/distutils/cmd.pyt
ensure_string�scCs�t||�}|dkrdSt|t�rMt||tjd|��ndt|t�r�d}x0|D]}t|t�sid}PqiqiWnd}|s�td||f�ndS(s�Ensure that 'option' is a list of strings.  If 'option' is
        currently a string, we split it either on /,\s*/ or /\s+/, so
        "foo bar baz", "foo,bar,baz", and "foo,   bar baz" all become
        ["foo", "bar", "baz"].
        Ns,\s*|\s+iis''%s' must be a list of strings (got %r)(	RRR
R:R9tretsplittlistR(RR.R=toktelement((s%/usr/lib64/python2.7/distutils/cmd.pytensure_string_list�s 
cCsL|j|||�}|dk	rH||�rHtd|||f�ndS(Nserror in '%s' option: (R>RR(RR.ttesterR;t	error_fmtR<R=((s%/usr/lib64/python2.7/distutils/cmd.pyt_ensure_tested_string�scCs |j|tjjdd�dS(s5Ensure that 'option' is the name of an existing file.tfilenames$'%s' does not exist or is not a fileN(RItostpathtisfile(RR.((s%/usr/lib64/python2.7/distutils/cmd.pytensure_filenamescCs |j|tjjdd�dS(Nsdirectory names)'%s' does not exist or is not a directory(RIRKRLtisdir(RR.((s%/usr/lib64/python2.7/distutils/cmd.pytensure_dirname
scCs$t|d�r|jS|jjSdS(Ntcommand_name(thasattrRQRt__name__(R((s%/usr/lib64/python2.7/distutils/cmd.pyR'scGsh|jj|�}|j�xE|D]=\}}t||�dkr#t||t||��q#q#WdS(s>Set the values of any "undefined" options from corresponding
        option values in some other command object.  "Undefined" here means
        "is None", which is the convention used to indicate that an option
        has not been changed between 'initialize_options()' and
        'finalize_options()'.  Usually called from 'finalize_options()' for
        options that depend on some other command rather than another
        option of the same command.  'src_cmd' is the other command from
        which option values will be taken (a command object will be created
        for it if necessary); the remaining arguments are
        '(src_option,dst_option)' tuples which mean "take the value of
        'src_option' in the 'src_cmd' command object, and copy it to
        'dst_option' in the current command object".
        N(Rtget_command_objR!RRR9(Rtsrc_cmdtoption_pairstsrc_cmd_objt
src_optiont
dst_option((s%/usr/lib64/python2.7/distutils/cmd.pytset_undefined_optionss
	cCs#|jj||�}|j�|S(s�Wrapper around Distribution's 'get_command_obj()' method: find
        (create if necessary and 'create' is true) the command object for
        'command', call its 'ensure_finalized()' method, and return the
        finalized command object.
        (RRTR!(Rtcommandtcreatetcmd_obj((s%/usr/lib64/python2.7/distutils/cmd.pytget_finalized_command1s
icCs|jj||�S(N(Rtreinitialize_command(RR[treinit_subcommands((s%/usr/lib64/python2.7/distutils/cmd.pyR_=s	cCs|jj|�dS(s�Run some other command: uses the 'run_command()' method of
        Distribution, which creates and finalizes the command object if
        necessary and then invokes its 'run()' method.
        N(Rtrun_command(RR[((s%/usr/lib64/python2.7/distutils/cmd.pyRaAscCsLg}x?|jD]4\}}|dks4||�r|j|�qqW|S(skDetermine the sub-commands that are relevant in the current
        distribution (ie., that need to be run).  This is based on the
        'sub_commands' class attribute: each tuple in that list may include
        a method that we call to determine if the subcommand needs to be
        run for the current distribution.  Return a list of command names.
        N(tsub_commandsRtappend(Rtcommandstcmd_nametmethod((s%/usr/lib64/python2.7/distutils/cmd.pytget_sub_commandsHs
cCs!tjd|j�|f�dS(Nswarning: %s: %s
(RtwarnR'(RR2((s%/usr/lib64/python2.7/distutils/cmd.pyRhXs	cCs tj|||d|j�dS(NR(RtexecuteR(RtfunctargsR2R$((s%/usr/lib64/python2.7/distutils/cmd.pyRi\si�cCstj||d|j�dS(NR(RtmkpathR(Rtnametmode((s%/usr/lib64/python2.7/distutils/cmd.pyRl_sc	Cs)tj|||||j|d|j�S(s�Copy a file respecting verbose, dry-run and force flags.  (The
        former two default to whatever is in the Distribution object, and
        the latter defaults to false for commands that don't define it.)R(Rt	copy_fileRR(Rtinfiletoutfilet
preserve_modetpreserve_timestlinkR$((s%/usr/lib64/python2.7/distutils/cmd.pyRobsc	Cs)tj||||||jd|j�S(s\Copy an entire directory tree respecting verbose, dry-run,
        and force flags.
        R(Rt	copy_treeRR(RRpRqRrRstpreserve_symlinksR$((s%/usr/lib64/python2.7/distutils/cmd.pyRuos
	
cCstj||d|j�S(s$Move a file respecting dry-run flag.R(Rt	move_fileR(RtsrctdstR$((s%/usr/lib64/python2.7/distutils/cmd.pyRw{scCs*ddlm}|||d|j�dS(s2Spawn an external command respecting dry-run flag.i����(tspawnRN(tdistutils.spawnRzR(Rtcmdtsearch_pathR$Rz((s%/usr/lib64/python2.7/distutils/cmd.pyRzscCs+tj||||d|jd|d|�S(NRtownertgroup(Rtmake_archiveR(Rt	base_nametformattroot_dirtbase_dirR~R((s%/usr/lib64/python2.7/distutils/cmd.pyR��scCs�|dkrd|}nt|t�r4|f}n!t|ttf�sUtd�n|dkr}d|dj|�f}n|js�tj	||�r�|j
||||�n
tj|�dS(s�Special case of 'execute()' for operations that process one or
        more input files and generate one output file.  Works just like
        'execute()', except the operation is skipped and a different
        message printed if 'outfile' already exists and is newer than all
        files listed in 'infiles'.  If the command defined 'self.force',
        and it is true, then the command is unconditionally run -- does no
        timestamp checks.
        sskipping %s (inputs unchanged)s9'infiles' must be a string, or a list or tuple of stringssgenerating %s from %ss, N(
RR
R:RCttupleRtjoinRRtnewer_groupRiRtdebug(RtinfilesRqRjRktexec_msgtskip_msgR$((s%/usr/lib64/python2.7/distutils/cmd.pyt	make_file�s

	N(#RSt
__module__t__doc__RbRRR!RR RR0R1R(R8R>R@RFRIRNRPR'RZR^R_RaRgRhRiRlRoRuRwRzR�R�(((s%/usr/lib64/python2.7/distutils/cmd.pyRsD	0	
		
		
	
								
	
tinstall_misccBs;eZdZdgZd�Zd�Zd�Zd�ZRS(	s{Common base class for installing some files in a subdirectory.
    Currently used by install_data and install_scripts.
    sinstall-dir=tds!directory to install the files tocCsd|_g|_dS(N(Rtinstall_dirtoutfiles(R((s%/usr/lib64/python2.7/distutils/cmd.pyR�s	cCs|jd|df�dS(NtinstallR�(RZ(Rtdirname((s%/usr/lib64/python2.7/distutils/cmd.pyt_install_dir_from�scCsmg|_|sdS|j|j�xC|D];}|j||j�|jjtjj|j|��q*WdS(N(R�RlR�RoRcRKRLR�(Rtfilelisttf((s%/usr/lib64/python2.7/distutils/cmd.pyt_copy_files�s	
cCs|jS(N(R�(R((s%/usr/lib64/python2.7/distutils/cmd.pytget_outputs�s(sinstall-dir=R�s!directory to install the files to(RSR�R�R*RR�R�R�(((s%/usr/lib64/python2.7/distutils/cmd.pyR��s					(R�t__revision__R5RKRAtdistutils.errorsRt	distutilsRRRRRRRR�(((s%/usr/lib64/python2.7/distutils/cmd.pyt<module>s$(��PKW[���\4\4
sysconfig.pyonu�[����
�fc@s�dZdZddlZddlZddlZddlZddlmZejj	ej
�Zejj	ej�Z
ejr�ejjejjej��Znej�Zejdkr�dedj�kr�ejjejjeejj��ZnejdkrVded	j�krVejjejjeejjejj��Znejdkr�d
edj�kr�ejjejjeejjejj��Zndejkr�ejj	ejd�Znd
�Ze�Zd�Zddd�Zdddd�Zd�Zd�Zd�Z dd�Z!ej"d�Z#ej"d�Z$ej"d�Z%dd�Z&d�Z'da(d�Z)d�Z*d�Z+d�Z,d�Z-dS( s�Provide access to Python's configuration information.  The specific
configuration variables available depend heavily on the platform and
configuration.  The values may be retrieved using
get_config_var(name), and the list of variables is available via
get_config_vars().keys().  Additional convenience functions are also
available.

Written by:   Fred L. Drake, Jr.
Email:        <fdrake@acm.org>
s$Id$i����N(tDistutilsPlatformErrortnttpcbuildi����s\pc\vi����s\pcbuild\amd64i�t_PYTHON_PROJECT_BASEcCs=x6dD].}tjjtjjtd|��rtSqWtS(Ns
Setup.distsSetup.localtModules(s
Setup.distsSetup.local(tostpathtisfiletjointproject_basetTruetFalse(tfn((s+/usr/lib64/python2.7/distutils/sysconfig.pyt
_python_build7s
$cCstjd S(s�Return a string containing the major and minor Python version,
    leaving off the patchlevel.  Sample return values could be '1.5'
    or '2.2'.
    i(tsystversion(((s+/usr/lib64/python2.7/distutils/sysconfig.pytget_python_version?sicCs=|dkr!|rtpt}ntjdkr�tr�tjrWtjj	tj�}ntj
�}|rr|}n<tjjtjj|t
d���}tjj|d�}|Stjj|ddt�tjr�dp�d�Stjdkrtjj|d�Stjd	kr&tjj|d�Std
tj��dS(s�Return the directory containing installed Python header files.

    If 'plat_specific' is false (the default), this is the path to the
    non-platform-specific header files, i.e. Python.h and so on;
    otherwise, this is the path to platform-specific header files
    (namely pyconfig.h).

    If 'prefix' is supplied, use it instead of sys.prefix or
    sys.exec_prefix -- i.e., ignore 'plat_specific'.
    tposixtsrcdirtIncludetincludetpythons-debugtRtos2sFI don't know where Python installs its C header files on platform '%s'N(tNonetEXEC_PREFIXtPREFIXRtnametpython_buildRt
executableRtdirnametgetcwdtabspathRtget_config_varRtpydebugR(t
plat_specifictprefixtbuildirtinc_dirR((s+/usr/lib64/python2.7/distutils/sysconfig.pytget_python_incGs,		!cCs6|dkr!|rtpt}ntjdkr�|s<|rEd}nd}tjj||dt��}|rt|Stjj|d�Sn�tjdkr�|r�tjj|d�St�dkr�|Stjj|dd�SnTtjd	kr|rtjj|d�Stjj|dd�Sntd
tj��dS(sIReturn the directory containing the Python library (standard or
    site additions).

    If 'plat_specific' is true, return the directory containing
    platform-specific modules, i.e. any module from a non-pure-Python
    module distribution; otherwise, return the platform-shared library
    directory.  If 'standard_lib' is true, return the directory
    containing standard Python library modules; otherwise, return the
    directory for site-specific modules.

    If 'prefix' is supplied, use it instead of sys.prefix or
    sys.exec_prefix -- i.e., ignore 'plat_specific'.
    Rtlib64tlibRs
site-packagesRtLibs2.2Rs?I don't know where Python installs its library on platform '%s'N(	RRRRRRRRR(R#tstandard_libR$R)t	libpython((s+/usr/lib64/python2.7/distutils/sysconfig.pytget_python_libss0	cCs�|jdkr�tjdkrStd�sSddl}|jt�dtd<qSntddd	d
ddd
d�\}}}}}}}}	dtj	kr�tj	d}
tjdkr�dtj	kr�|j
|�r�|
|t|�}n|
}ndtj	krtj	d}ndtj	kr3tj	d}ndtj	krRtj	d}n
|d}dtj	kr�|dtj	d}nd	tj	kr�|dtj	d	}|dtj	d	}ndtj	kr|dtj	d}|dtj	d}|dtj	d}nd
tj	kr/tj	d
}ndtj	krV|dtj	d}n|d|	}|d|}
|jd|d|
d|
d|d|d|d|d|�||_
ndS(s�Do any platform-specific customization of a CCompiler instance.

    Mainly needed on Unix, so we can plug in the information that
    varies across Unices and is stored in Python's Makefile.
    tunixtdarwintCUSTOMIZED_OSX_COMPILERi����NR
tCCtCXXtCFLAGStCCSHAREDtLDSHAREDtSOtARtARFLAGStCPPs -EtLDFLAGSt tCPPFLAGStpreprocessortcompilertcompiler_sotcompiler_cxxt	linker_sot
linker_exetarchiver(t
compiler_typeRtplatformR!t_osx_supporttcustomize_compilert_config_varstget_config_varsRtenviront
startswithtlentset_executablestshared_lib_extension(R>RFtcctcxxtcflagstccsharedtldsharedtso_exttartar_flagstnewcctcppRCtcc_cmd((s+/usr/lib64/python2.7/distutils/sysconfig.pyRG�s^
!
	
	cCsvtr6tjdkr-tjjtd�}qEt}ntdd�}t�dkr]d}nd}tjj||�S(s2Return full pathname of installed pyconfig.h file.RtPCR#is2.2sconfig.hs
pyconfig-64.h(RRRRRR	R'R(R&tconfig_h((s+/usr/lib64/python2.7/distutils/sysconfig.pytget_config_h_filename�s		cCsWtrtjjtd�Stdddd�}tjj|dtjrLdpOdd�S(sAReturn full pathname of installed Makefile from the Python build.tMakefileR#iR+tconfigs-debugR(RRRRR	R-RR"(tlib_dir((s+/usr/lib64/python2.7/distutils/sysconfig.pytget_makefile_filenamescCs�|dkri}ntjd�}tjd�}x�|j�}|sLPn|j|�}|r�|jdd�\}}yt|�}Wntk
r�nX|||<q6|j|�}|r6d||jd�<q6q6W|S(s�Parse a config.h-style file.

    A dictionary containing name/value pairs is returned.  If an
    optional dictionary is passed in as the second argument, it is
    used instead of a new dictionary.
    s"#define ([A-Z][A-Za-z0-9_]+) (.*)
s&/[*] #undef ([A-Z][A-Za-z0-9_]+) [*]/
iiiN(Rtretcompiletreadlinetmatchtgrouptintt
ValueError(tfptgt	define_rxtundef_rxtlinetmtntv((s+/usr/lib64/python2.7/distutils/sysconfig.pytparse_config_h	s(	

s"([a-zA-Z][a-zA-Z0-9_]+)\s*=\s*(.*)s\$\(([A-Za-z][A-Za-z0-9_]*)\)s\${([A-Za-z][A-Za-z0-9_]*)}cCs�ddlm}||dddddd�}|dkrCi}ni}i}x�|j�}|dkrnPntj|�}|rR|jdd�\}}	|	j�}	|	jdd	�}
d
|
kr�|	||<qyt	|	�}	Wn't
k
r|	jdd
�||<qX|	||<qRqRWx^|r}xQ|j�D]C}||}tj
|�p^tj
|�}|ro|jd�}t}
||kr�t||�}nB||kr�t}
n-|tjkr�tj|}nd	||<}|
rv||j�}||j� ||}d
|kr$|||<qlyt	|�}Wn!t
k
rW|j�||<nX|||<||=qvq3||=q3Wq W|j�x<|j�D].\}}	t|	t�r�|	j�||<q�q�W|j|�|S(s�Parse a Makefile-style file.

    A dictionary containing name/value pairs is returned.  If an
    optional dictionary is passed in as the second argument, it is
    used instead of a new dictionary.
    i����(tTextFiletstrip_commentsitskip_blankst
join_linesis$$Rt$N(tdistutils.text_fileRqRRct_variable_rxRdRetstriptreplaceRfRgtkeyst_findvar1_rxtsearcht_findvar2_rxR
tstrRRRJtendtstarttclosetitemst
isinstancetupdate(RRiRqRhtdonetnotdoneRlRmRnRottmpvRtvaluetfoundtitemtaftertk((s+/usr/lib64/python2.7/distutils/sysconfig.pytparse_makefile,sl	

	
	





cCspxitj|�ptj|�}|rg|j�\}}|d|!|j|jd��||}qPqW|S(s�Expand Makefile-style variables -- "${foo}" or "$(foo)" -- in
    'string' according to 'vars' (a dictionary mapping variable names to
    values).  Variables not present in 'vars' are silently expanded to the
    empty string.  The variable values in 'vars' should not contain further
    variable expansions; if 'vars' is the output of 'parse_makefile()',
    you're fine.  Returns a variable-expanded version of 's'.
    ii(R{R|R}tspantgetRe(tstvarsRmtbegR((s+/usr/lib64/python2.7/distutils/sysconfig.pytexpand_makefile_varss.cCs'ddlm}iatj|�dS(s7Initialize the module as appropriate for POSIX systems.i����(tbuild_time_varsN(t_sysconfigdataR�RHR�(R�((s+/usr/lib64/python2.7/distutils/sysconfig.pyt_init_posix�scCs�i}tdddd�|d<tdddd�|d<tdd�|d<d|d	<d
|d<t�jdd
�|d<tjjtjjtj	��|d<|a
dS(s+Initialize the module as appropriate for NTR#iR+itLIBDESTt
BINLIBDESTt	INCLUDEPYs.pydR6s.exetEXEt.RtVERSIONtBINDIRN(R-R'RRyRRRR RRRH(Ri((s+/usr/lib64/python2.7/distutils/sysconfig.pyt_init_nt�s

%cCsii}tdddd�|d<tdddd�|d<tdd�|d<d|d	<d
|d<|adS(
s-Initialize the module as appropriate for OS/2R#iR+iR�R�R�s.pydR6s.exeR�N(R-R'RH(Ri((s+/usr/lib64/python2.7/distutils/sysconfig.pyt	_init_os2�s

cGs�tdkr}t�jdtj�}|r5|�niattd<ttd<tj	dkr}ddl
}|jt�q}n|r�g}x$|D]}|jtj|��q�W|StSdS(s�With no arguments, return a dictionary of all configuration
    variables relevant for the current platform.  Generally this includes
    everything needed to build extensions and install both pure modules and
    extensions.  On Unix, this means every variable defined in Python's
    installed Makefile; on Windows and Mac OS it's a much smaller set.

    With arguments, return a list of values that result from looking up
    each argument in the configuration variable dictionary.
    t_init_R$texec_prefixR/i����N(
RHRtglobalsR�RRRRRRERFtcustomize_config_varstappend(targstfuncRFtvalsR((s+/usr/lib64/python2.7/distutils/sysconfig.pyRI�s 



cCst�j|�S(s�Return the value of a single variable using the dictionary
    returned by 'get_config_vars()'.  Equivalent to
    get_config_vars().get(name)
    (RIR�(R((s+/usr/lib64/python2.7/distutils/sysconfig.pyR!�s(.t__doc__t__revision__RRatstringRtdistutils.errorsRRtnormpathR$RR�RRRR R	RRtlowerRtpardirRJR
RRRR'R-RGR\R`RpRbRwR{R}R�R�RHR�R�R�RIR!(((s+/usr/lib64/python2.7/distutils/sysconfig.pyt<module>
sR	$%*%%			,3	J		S						&PKW[�/��.�.fancy_getopt.pycnu�[����
{fc@s�dZdZddlZddlZddlZddlZddlmZmZdZ	ej
de	�Zej
de	e	f�Zej
dd	�Zd
fd��YZd�Zej
ejd
eej��Zd�Zd�Zdfd��YZdS(s6distutils.fancy_getopt

Wrapper around the standard getopt module that provides the following
additional features:
  * short and long options are tied together
  * options have help strings, so fancy_getopt could potentially
    create a complete usage summary
  * options set attributes of a passed-in object
s$Id$i����N(tDistutilsGetoptErrortDistutilsArgErrors[a-zA-Z](?:[a-zA-Z0-9-]*)s^%s$s^(%s)=!(%s)$t-t_tFancyGetoptcBs�eZdZdd�Zd�Zd�Zddd�Zd�Zd�Z	d�Z
d�Zd	�Zd
�Z
ddd�Zd�Zdd
�Zddd�ZRS(s�Wrapper around the standard 'getopt()' module that provides some
    handy extra functionality:
      * short and long options are tied together
      * options have help strings, and help text can be assembled
        from them
      * options set attributes of a passed-in object
      * boolean options can have "negative aliases" -- eg. if
        --quiet is the "negative alias" of --verbose, then "--quiet"
        on the command line sets 'verbose' to false
    cCst||_i|_|jr(|j�ni|_i|_g|_g|_i|_i|_i|_	g|_
dS(N(toption_tabletoption_indext_build_indextaliastnegative_aliast
short_optst	long_optst
short2longt	attr_namet	takes_argtoption_order(tselfR((s./usr/lib64/python2.7/distutils/fancy_getopt.pyt__init__-s
			
							cCs6|jj�x"|jD]}||j|d<qWdS(Ni(RtclearR(Rtoption((s./usr/lib64/python2.7/distutils/fancy_getopt.pyRYs
cCs||_|j�dS(N(RR(RR((s./usr/lib64/python2.7/distutils/fancy_getopt.pytset_option_table^s	cCsO||jkrtd|�n,|||f}|jj|�||j|<dS(Ns'option conflict: already an option '%s'(RRRtappend(Rtlong_optiontshort_optionthelp_stringR((s./usr/lib64/python2.7/distutils/fancy_getopt.pyt
add_optionbs
cCs
||jkS(scReturn true if the option table for this parser has an
        option with long name 'long_option'.(R(RR((s./usr/lib64/python2.7/distutils/fancy_getopt.pyt
has_optionlscCstj|t�S(s�Translate long option name 'long_option' to the form it
        has as an attribute of some object: ie., translate hyphens
        to underscores.(tstringt	translatet
longopt_xlate(RR((s./usr/lib64/python2.7/distutils/fancy_getopt.pyt
get_attr_nameqscCs�t|t�st�xj|j�D]\\}}||jkrVtd|||f�n||jkr"td|||f�q"q"WdS(Ns(invalid %s '%s': option '%s' not defineds0invalid %s '%s': aliased option '%s' not defined(t
isinstancetdicttAssertionErrortitemsRR(RtaliasestwhatRtopt((s./usr/lib64/python2.7/distutils/fancy_getopt.pyt_check_alias_dictxscCs|j|d�||_dS(s'Set the aliases for this option parser.RN(R&R(RR((s./usr/lib64/python2.7/distutils/fancy_getopt.pytset_aliases�scCs|j|d�||_dS(s�Set the negative aliases for this option parser.
        'negative_alias' should be a dictionary mapping option names to
        option names, both the key and value must already be defined
        in the option table.snegative aliasN(R&R	(RR	((s./usr/lib64/python2.7/distutils/fancy_getopt.pytset_negative_aliases�scCs�g|_g|_|jj�i|_x]|jD]R}t|�dkrb|\}}}d}n7t|�dkr�|\}}}}ntd|f�t|t	�s�t|�dkr�t
d|�n|dkp�t|t	�o�t|�dkst
d|�n||j|<|jj|�|d	d
kre|rH|d}n|dd	!}d|j
|<nk|jj|�}|dk	r�|j
|r�t
d||f�n||jd	<d|j
|<n
d|j
|<|jj|�}|dk	r!|j
||j
|kr!t
d
||f�q!ntj|�sDt
dd|�n|j|�|j|<|r2|jj|�||j|d<q2q2WdS(s�Populate the various data structures that keep tabs on the
        option table.  Called by 'getopt()' before it can do anything
        worthwhile.
        iiisinvalid option tuple: %ris9invalid long option '%s': must be a string of length >= 2is:invalid short option '%s': must a single character or Nonei����t=t:s>invalid negative alias '%s': aliased option '%s' takes a valuesginvalid alias '%s': inconsistent with aliased option '%s' (one of them takes a value, the other doesn'tsinvalid long option name '%s' s'(must be letters, numbers, hyphens onlyN(RR
RRtrepeatRtlent
ValueErrorRtstrRtNoneRRR	tgetRt
longopt_retmatchRR
(RRtlongtshortthelpR+talias_to((s./usr/lib64/python2.7/distutils/fancy_getopt.pyt_grok_option_table�sd		
		"
!






cCs|dkrtjd}n|dkr:t�}d}nd}|j�tj|j�}y"tj|||j	�\}}Wntj
k
r�}t|�nXx\|D]T\}}t|�dkr�|ddkr�|j
|d}n2t|�dkr|d dkst�|d}|jj|�}	|	r<|	}n|j|s�|dksatd��|jj|�}	|	r�|	}d}q�d}n|j|}
|r�|jj|
�dk	r�t||
d�d}nt||
|�|jj||f�q�W|r||fS|SdS(	sParse command-line options in args. Store as attributes on object.

        If 'args' is None or not supplied, uses 'sys.argv[1:]'.  If
        'object' is None or not supplied, creates a new OptionDummy
        object, stores option values there, and returns a tuple (args,
        object).  If 'object' is supplied, it is modified in place and
        'getopt()' just returns 'args'; in both cases, the returned
        'args' is a modified copy of the passed-in 'args' list, which
        is left untouched.
        iiiRs--tsboolean option can't have valueN(R/tsystargvtOptionDummyR7RtjoinR
tgetoptRterrorRR,RR!RR0RR	R
R+tgetattrtsetattrRR(Rtargstobjecttcreated_objectR
toptstmsgR%tvalRtattr((s./usr/lib64/python2.7/distutils/fancy_getopt.pyR=�sF		
"
"(
	
		

cCs&|jdkrtd�n|jSdS(s�Returns the list of (option, value) tuples processed by the
        previous run of 'getopt()'.  Raises RuntimeError if
        'getopt()' hasn't been called yet.
        s!'getopt()' hasn't been called yetN(RR/tRuntimeError(R((s./usr/lib64/python2.7/distutils/fancy_getopt.pytget_option_order*scCs�d}x||jD]q}|d}|d}t|�}|ddkrS|d}n|dk	rl|d}n||kr|}qqW|ddd}d}||}	d|}
|r�|g}n	d	g}x|jD]}|d
 \}}}t||	�}
|ddkr|dd!}n|dkrk|
rQ|jd|||
df�q�|jd||f�nHd
||f}|
r�|jd|||
df�n|jd|�x#|
dD]}|j|
|�q�Wq�W|S(s�Generate help text (a list of strings, one per suggested line of
        output) from the option table for this FancyGetopt object.
        iii����R)iiiNt sOption summary:is  --%-*s  %ss
  --%-*s  s%s (-%s)s  --%-*sN(RR,R/t	wrap_textR(Rtheadertmax_optRR3R4tlt	opt_widtht
line_widtht
text_widtht
big_indenttlinesR5ttextt	opt_names((s./usr/lib64/python2.7/distutils/fancy_getopt.pyt
generate_help5sF






	!	cCsG|dkrtj}nx(|j|�D]}|j|d�q(WdS(Ns
(R/R9tstdoutRVtwrite(RRLtfiletline((s./usr/lib64/python2.7/distutils/fancy_getopt.pyt
print_help�sN(t__name__t
__module__t__doc__R/RRRRRRR&R'R(R7R=RIRVR[(((s./usr/lib64/python2.7/distutils/fancy_getopt.pyR!s
,		
							X@	TcCs)t|�}|j|�|j||�S(N(RR(R=(toptionstnegative_optRBRAtparser((s./usr/lib64/python2.7/distutils/fancy_getopt.pytfancy_getopt�s
RJcCs~|dkrgSt|�|kr)|gStj|�}tj|t�}tjd|�}td|�}g}x|ryg}d}xt|r�t|d�}|||kr�|j	|d�|d=||}q�|r�|dddkr�|d=nPq�W|r]|dkr<|j	|dd|!�|d||d<n|dddkr]|d=q]n|j	tj
|d��qtW|S(s�wrap_text(text : string, width : int) -> [string]

    Split 'text' into multiple lines of no more than 'width' characters
    each, and return the list of strings that results.
    s( +|-+)ii����RJR8N(R/R,Rt
expandtabsRtWS_TRANStretsplittfilterRR<(RTtwidthtchunksRStcur_linetcur_lenRN((s./usr/lib64/python2.7/distutils/fancy_getopt.pyRK�s:		


cCstj|t�S(sXConvert a long option name to a valid Python identifier by
    changing "-" to "_".
    (RRR(R%((s./usr/lib64/python2.7/distutils/fancy_getopt.pyttranslate_longopt�sR;cBseZdZgd�ZRS(s_Dummy class just used as a place to hold command-line option
    values as instance attributes.cCs%x|D]}t||d�qWdS(skCreate a new OptionDummy instance.  The attributes listed in
        'options' will be initialized to None.N(R@R/(RR_R%((s./usr/lib64/python2.7/distutils/fancy_getopt.pyR�s
(R\R]R^R(((s./usr/lib64/python2.7/distutils/fancy_getopt.pyR;�s(R^t__revision__R9RReR=tdistutils.errorsRRtlongopt_pattcompileR1tneg_alias_ret	maketransRRRbt
whitespaceR,RdRKRlR;(((s./usr/lib64/python2.7/distutils/fancy_getopt.pyt<module>	s"�r	"	;	PKW[�zN֟�__init__.pyonu�[����
{fc@s/dZddlZejejjd� ZdS(s�distutils

The main package for the Python Module Distribution Utilities.  Normally
used from a setup script as

   from distutils.core import setup

   setup (...)
i����Nt (t__doc__tsystversiontindext__version__(((s*/usr/lib64/python2.7/distutils/__init__.pyt<module>	sPKW[���\4\4
sysconfig.pycnu�[����
�fc@s�dZdZddlZddlZddlZddlZddlmZejj	ej
�Zejj	ej�Z
ejr�ejjejjej��Znej�Zejdkr�dedj�kr�ejjejjeejj��ZnejdkrVded	j�krVejjejjeejjejj��Znejdkr�d
edj�kr�ejjejjeejjejj��Zndejkr�ejj	ejd�Znd
�Ze�Zd�Zddd�Zdddd�Zd�Zd�Zd�Z dd�Z!ej"d�Z#ej"d�Z$ej"d�Z%dd�Z&d�Z'da(d�Z)d�Z*d�Z+d�Z,d�Z-dS( s�Provide access to Python's configuration information.  The specific
configuration variables available depend heavily on the platform and
configuration.  The values may be retrieved using
get_config_var(name), and the list of variables is available via
get_config_vars().keys().  Additional convenience functions are also
available.

Written by:   Fred L. Drake, Jr.
Email:        <fdrake@acm.org>
s$Id$i����N(tDistutilsPlatformErrortnttpcbuildi����s\pc\vi����s\pcbuild\amd64i�t_PYTHON_PROJECT_BASEcCs=x6dD].}tjjtjjtd|��rtSqWtS(Ns
Setup.distsSetup.localtModules(s
Setup.distsSetup.local(tostpathtisfiletjointproject_basetTruetFalse(tfn((s+/usr/lib64/python2.7/distutils/sysconfig.pyt
_python_build7s
$cCstjd S(s�Return a string containing the major and minor Python version,
    leaving off the patchlevel.  Sample return values could be '1.5'
    or '2.2'.
    i(tsystversion(((s+/usr/lib64/python2.7/distutils/sysconfig.pytget_python_version?sicCs=|dkr!|rtpt}ntjdkr�tr�tjrWtjj	tj�}ntj
�}|rr|}n<tjjtjj|t
d���}tjj|d�}|Stjj|ddt�tjr�dp�d�Stjdkrtjj|d�Stjd	kr&tjj|d�Std
tj��dS(s�Return the directory containing installed Python header files.

    If 'plat_specific' is false (the default), this is the path to the
    non-platform-specific header files, i.e. Python.h and so on;
    otherwise, this is the path to platform-specific header files
    (namely pyconfig.h).

    If 'prefix' is supplied, use it instead of sys.prefix or
    sys.exec_prefix -- i.e., ignore 'plat_specific'.
    tposixtsrcdirtIncludetincludetpythons-debugtRtos2sFI don't know where Python installs its C header files on platform '%s'N(tNonetEXEC_PREFIXtPREFIXRtnametpython_buildRt
executableRtdirnametgetcwdtabspathRtget_config_varRtpydebugR(t
plat_specifictprefixtbuildirtinc_dirR((s+/usr/lib64/python2.7/distutils/sysconfig.pytget_python_incGs,		!cCs6|dkr!|rtpt}ntjdkr�|s<|rEd}nd}tjj||dt��}|rt|Stjj|d�Sn�tjdkr�|r�tjj|d�St�dkr�|Stjj|dd�SnTtjd	kr|rtjj|d�Stjj|dd�Sntd
tj��dS(sIReturn the directory containing the Python library (standard or
    site additions).

    If 'plat_specific' is true, return the directory containing
    platform-specific modules, i.e. any module from a non-pure-Python
    module distribution; otherwise, return the platform-shared library
    directory.  If 'standard_lib' is true, return the directory
    containing standard Python library modules; otherwise, return the
    directory for site-specific modules.

    If 'prefix' is supplied, use it instead of sys.prefix or
    sys.exec_prefix -- i.e., ignore 'plat_specific'.
    Rtlib64tlibRs
site-packagesRtLibs2.2Rs?I don't know where Python installs its library on platform '%s'N(	RRRRRRRRR(R#tstandard_libR$R)t	libpython((s+/usr/lib64/python2.7/distutils/sysconfig.pytget_python_libss0	cCs�|jdkr�tjdkrStd�sSddl}|jt�dtd<qSntddd	d
ddd
d�\}}}}}}}}	dtj	kr�tj	d}
tjdkr�dtj	kr�|j
|�r�|
|t|�}n|
}ndtj	krtj	d}ndtj	kr3tj	d}ndtj	krRtj	d}n
|d}dtj	kr�|dtj	d}nd	tj	kr�|dtj	d	}|dtj	d	}ndtj	kr|dtj	d}|dtj	d}|dtj	d}nd
tj	kr/tj	d
}ndtj	krV|dtj	d}n|d|	}|d|}
|jd|d|
d|
d|d|d|d|d|�||_
ndS(s�Do any platform-specific customization of a CCompiler instance.

    Mainly needed on Unix, so we can plug in the information that
    varies across Unices and is stored in Python's Makefile.
    tunixtdarwintCUSTOMIZED_OSX_COMPILERi����NR
tCCtCXXtCFLAGStCCSHAREDtLDSHAREDtSOtARtARFLAGStCPPs -EtLDFLAGSt tCPPFLAGStpreprocessortcompilertcompiler_sotcompiler_cxxt	linker_sot
linker_exetarchiver(t
compiler_typeRtplatformR!t_osx_supporttcustomize_compilert_config_varstget_config_varsRtenviront
startswithtlentset_executablestshared_lib_extension(R>RFtcctcxxtcflagstccsharedtldsharedtso_exttartar_flagstnewcctcppRCtcc_cmd((s+/usr/lib64/python2.7/distutils/sysconfig.pyRG�s^
!
	
	cCsvtr6tjdkr-tjjtd�}qEt}ntdd�}t�dkr]d}nd}tjj||�S(s2Return full pathname of installed pyconfig.h file.RtPCR#is2.2sconfig.hs
pyconfig-64.h(RRRRRR	R'R(R&tconfig_h((s+/usr/lib64/python2.7/distutils/sysconfig.pytget_config_h_filename�s		cCsWtrtjjtd�Stdddd�}tjj|dtjrLdpOdd�S(sAReturn full pathname of installed Makefile from the Python build.tMakefileR#iR+tconfigs-debugR(RRRRR	R-RR"(tlib_dir((s+/usr/lib64/python2.7/distutils/sysconfig.pytget_makefile_filenamescCs�|dkri}ntjd�}tjd�}x�|j�}|sLPn|j|�}|r�|jdd�\}}yt|�}Wntk
r�nX|||<q6|j|�}|r6d||jd�<q6q6W|S(s�Parse a config.h-style file.

    A dictionary containing name/value pairs is returned.  If an
    optional dictionary is passed in as the second argument, it is
    used instead of a new dictionary.
    s"#define ([A-Z][A-Za-z0-9_]+) (.*)
s&/[*] #undef ([A-Z][A-Za-z0-9_]+) [*]/
iiiN(Rtretcompiletreadlinetmatchtgrouptintt
ValueError(tfptgt	define_rxtundef_rxtlinetmtntv((s+/usr/lib64/python2.7/distutils/sysconfig.pytparse_config_h	s(	

s"([a-zA-Z][a-zA-Z0-9_]+)\s*=\s*(.*)s\$\(([A-Za-z][A-Za-z0-9_]*)\)s\${([A-Za-z][A-Za-z0-9_]*)}cCs�ddlm}||dddddd�}|dkrCi}ni}i}x�|j�}|dkrnPntj|�}|rR|jdd�\}}	|	j�}	|	jdd	�}
d
|
kr�|	||<qyt	|	�}	Wn't
k
r|	jdd
�||<qX|	||<qRqRWx^|r}xQ|j�D]C}||}tj
|�p^tj
|�}|ro|jd�}t}
||kr�t||�}nB||kr�t}
n-|tjkr�tj|}nd	||<}|
rv||j�}||j� ||}d
|kr$|||<qlyt	|�}Wn!t
k
rW|j�||<nX|||<||=qvq3||=q3Wq W|j�x<|j�D].\}}	t|	t�r�|	j�||<q�q�W|j|�|S(s�Parse a Makefile-style file.

    A dictionary containing name/value pairs is returned.  If an
    optional dictionary is passed in as the second argument, it is
    used instead of a new dictionary.
    i����(tTextFiletstrip_commentsitskip_blankst
join_linesis$$Rt$N(tdistutils.text_fileRqRRct_variable_rxRdRetstriptreplaceRfRgtkeyst_findvar1_rxtsearcht_findvar2_rxR
tstrRRRJtendtstarttclosetitemst
isinstancetupdate(RRiRqRhtdonetnotdoneRlRmRnRottmpvRtvaluetfoundtitemtaftertk((s+/usr/lib64/python2.7/distutils/sysconfig.pytparse_makefile,sl	

	
	





cCspxitj|�ptj|�}|rg|j�\}}|d|!|j|jd��||}qPqW|S(s�Expand Makefile-style variables -- "${foo}" or "$(foo)" -- in
    'string' according to 'vars' (a dictionary mapping variable names to
    values).  Variables not present in 'vars' are silently expanded to the
    empty string.  The variable values in 'vars' should not contain further
    variable expansions; if 'vars' is the output of 'parse_makefile()',
    you're fine.  Returns a variable-expanded version of 's'.
    ii(R{R|R}tspantgetRe(tstvarsRmtbegR((s+/usr/lib64/python2.7/distutils/sysconfig.pytexpand_makefile_varss.cCs'ddlm}iatj|�dS(s7Initialize the module as appropriate for POSIX systems.i����(tbuild_time_varsN(t_sysconfigdataR�RHR�(R�((s+/usr/lib64/python2.7/distutils/sysconfig.pyt_init_posix�scCs�i}tdddd�|d<tdddd�|d<tdd�|d<d|d	<d
|d<t�jdd
�|d<tjjtjjtj	��|d<|a
dS(s+Initialize the module as appropriate for NTR#iR+itLIBDESTt
BINLIBDESTt	INCLUDEPYs.pydR6s.exetEXEt.RtVERSIONtBINDIRN(R-R'RRyRRRR RRRH(Ri((s+/usr/lib64/python2.7/distutils/sysconfig.pyt_init_nt�s

%cCsii}tdddd�|d<tdddd�|d<tdd�|d<d|d	<d
|d<|adS(
s-Initialize the module as appropriate for OS/2R#iR+iR�R�R�s.pydR6s.exeR�N(R-R'RH(Ri((s+/usr/lib64/python2.7/distutils/sysconfig.pyt	_init_os2�s

cGs�tdkr}t�jdtj�}|r5|�niattd<ttd<tj	dkr}ddl
}|jt�q}n|r�g}x$|D]}|jtj|��q�W|StSdS(s�With no arguments, return a dictionary of all configuration
    variables relevant for the current platform.  Generally this includes
    everything needed to build extensions and install both pure modules and
    extensions.  On Unix, this means every variable defined in Python's
    installed Makefile; on Windows and Mac OS it's a much smaller set.

    With arguments, return a list of values that result from looking up
    each argument in the configuration variable dictionary.
    t_init_R$texec_prefixR/i����N(
RHRtglobalsR�RRRRRRERFtcustomize_config_varstappend(targstfuncRFtvalsR((s+/usr/lib64/python2.7/distutils/sysconfig.pyRI�s 



cCst�j|�S(s�Return the value of a single variable using the dictionary
    returned by 'get_config_vars()'.  Equivalent to
    get_config_vars().get(name)
    (RIR�(R((s+/usr/lib64/python2.7/distutils/sysconfig.pyR!�s(.t__doc__t__revision__RRatstringRtdistutils.errorsRRtnormpathR$RR�RRRR R	RRtlowerRtpardirRJR
RRRR'R-RGR\R`RpRbRwR{R}R�R�RHR�R�R�RIR!(((s+/usr/lib64/python2.7/distutils/sysconfig.pyt<module>
sR	$%*%%			,3	J		S						&PKW[��ho��	debug.pycnu�[����
{fc@s(ddlZdZejjd�ZdS(i����Ns$Id$tDISTUTILS_DEBUG(tost__revision__tenvirontgettDEBUG(((s'/usr/lib64/python2.7/distutils/debug.pyt<module>sPKW[O�**filelist.pyonu�[����
{fc@s�dZdZddlZddlZddlZddlmZddlmZm	Z	ddl
mZddd��YZej
d	�Zd
�Zdddd
�ZdS(ssdistutils.filelist

Provides the FileList class, used for poking about the filesystem
and building lists of files.
s$Id$i����N(tconvert_path(tDistutilsTemplateErrortDistutilsInternalError(tlogtFileListcBs�eZdZddd�Zd�Zejd�Zd�Z	d�Z
d�Zd�Zd�Z
d	�Zd
�Zdddd
�Zdddd�ZRS(s�A list of files built by on exploring the filesystem and filtered by
    applying various patterns to what we find there.

    Instance attributes:
      dir
        directory from which files will be taken -- only used if
        'allfiles' not supplied to constructor
      files
        list of filenames currently being built/filtered/manipulated
      allfiles
        complete list of files under consideration (ie. without any
        filtering applied)
    cCsd|_g|_dS(N(tNonetallfilestfiles(tselftwarntdebug_print((s*/usr/lib64/python2.7/distutils/filelist.pyt__init__s	cCs
||_dS(N(R(RR((s*/usr/lib64/python2.7/distutils/filelist.pytset_allfiles$scCst|�|_dS(N(tfindallR(Rtdir((s*/usr/lib64/python2.7/distutils/filelist.pyR
'scCs"ddlm}|r|GHndS(s~Print 'msg' to stdout if the global DEBUG (taken from the
        DISTUTILS_DEBUG environment variable) flag is true.
        i����(tDEBUGN(tdistutils.debugR(RtmsgR((s*/usr/lib64/python2.7/distutils/filelist.pyR
*scCs|jj|�dS(N(Rtappend(Rtitem((s*/usr/lib64/python2.7/distutils/filelist.pyR4scCs|jj|�dS(N(Rtextend(Rtitems((s*/usr/lib64/python2.7/distutils/filelist.pyR7scCs\ttjj|j�}|j�g|_x*|D]"}|jjtjj|��q2WdS(N(tmaptostpathtsplitRtsortRtjoin(Rtsortable_filest
sort_tuple((s*/usr/lib64/python2.7/distutils/filelist.pyR:s

	
cCsYxRtt|j�ddd�D]1}|j||j|dkr |j|=q q WdS(Niii����(trangetlenR(Rti((s*/usr/lib64/python2.7/distutils/filelist.pytremove_duplicatesEs&cCs|j�}|d}d}}}|dkrht|�dkrRtd|�ntt|d�}n�|dkr�t|�dkr�td|�nt|d�}tt|d�}nN|dkr�t|�dkr�td|�nt|d�}n
td|�||||fS(Nitincludetexcludesglobal-includesglobal-excludeis&'%s' expects <pattern1> <pattern2> ...isrecursive-includesrecursive-excludeis,'%s' expects <dir> <pattern1> <pattern2> ...tgrafttprunes#'%s' expects a single <dir_pattern>sunknown action '%s'(R"R#sglobal-includesglobal-exclude(srecursive-includesrecursive-exclude(R$R%(RRRRRR(RtlinetwordstactiontpatternsRtdir_pattern((s*/usr/lib64/python2.7/distutils/filelist.pyt_parse_template_lineNs,
	



cCs&|j|�\}}}}|dkr}|jddj|��x�|D].}|j|dd�sHtjd|�qHqHWn�|dkr�|jddj|��x||D].}|j|dd�s�tjd	|�q�q�WnC|d
krE|jddj|��x|D]2}|j|dd�stjd
d|�qqWn�|dkr�|jddj|��x�|D].}|j|dd�srtjd|�qrqrWn{|dkr|jd|dj|�f�xL|D]5}|j|d|�s�tjd
d||�q�q�Wn|dkr�|jd|dj|�f�x�|D]1}|j|d|�sItjd||�qIqIWn�|dkr�|jd|�|jdd|�s"tjd|�q"nY|dkr|jd|�|jdd|�s"tjdd|�q"n
td |�dS(!NR"sinclude t tanchoris%warning: no files found matching '%s'R#sexclude s9warning: no previously-included files found matching '%s'sglobal-includesglobal-include is&warning: no files found matching '%s' sanywhere in distributionsglobal-excludesglobal-exclude sRwarning: no previously-included files matching '%s' found anywhere in distributionsrecursive-includesrecursive-include %s %stprefixsunder directory '%s'srecursive-excludesrecursive-exclude %s %ssNwarning: no previously-included files matching '%s' found under directory '%s'R$sgraft s+warning: no directories found matching '%s'R%sprune s)no previously-included directories found s
matching '%s's'this cannot happen: invalid action '%s'(	R+R
Rtinclude_patternRR	texclude_patternRR(RR&R(R)RR*tpattern((s*/usr/lib64/python2.7/distutils/filelist.pytprocess_template_linepsh
	
	
	
		
		
		
	iicCs�d}t||||�}|jd|j�|jdkrK|j�nxJ|jD]?}|j|�rU|jd|�|jj|�d}qUqUW|S(s�Select strings (presumably filenames) from 'self.files' that
        match 'pattern', a Unix-style wildcard (glob) pattern.

        Patterns are not quite the same as implemented by the 'fnmatch'
        module: '*' and '?'  match non-special characters, where "special"
        is platform-dependent: slash on Unix; colon, slash, and backslash on
        DOS/Windows; and colon on Mac OS.

        If 'anchor' is true (the default), then the pattern match is more
        stringent: "*.py" will match "foo.py" but not "foo/bar.py".  If
        'anchor' is false, both of these will match.

        If 'prefix' is supplied, then only filenames starting with 'prefix'
        (itself a pattern) and ending with 'pattern', with anything in between
        them, will match.  'anchor' is ignored in this case.

        If 'is_regex' is true, 'anchor' and 'prefix' are ignored, and
        'pattern' is assumed to be either a string containing a regex or a
        regex object -- no translation is done, the regex is just compiled
        and used as-is.

        Selected strings will be added to self.files.

        Return 1 if files are found.
        is%include_pattern: applying regex r'%s's adding iN(	ttranslate_patternR
R1RRR
tsearchRR(RR1R-R.tis_regextfiles_foundt
pattern_retname((s*/usr/lib64/python2.7/distutils/filelist.pyR/�s	

cCs�d}t||||�}|jd|j�xhtt|j�ddd�D]G}|j|j|�rO|jd|j|�|j|=d}qOqOW|S(s�Remove strings (presumably filenames) from 'files' that match
        'pattern'.

        Other parameters are the same as for 'include_pattern()', above.
        The list 'self.files' is modified in place. Return 1 if files are
        found.
        is%exclude_pattern: applying regex r'%s'ii����s
 removing (R3R
R1RRRR4(RR1R-R.R5R6R7R ((s*/usr/lib64/python2.7/distutils/filelist.pyR0�s	&

N(t__name__t
__module__t__doc__RRRRtcurdirR
R
RRRR!R+R2R/R0(((s*/usr/lib64/python2.7/distutils/filelist.pyRs
		
						"	K-cCsddlm}m}m}m}g}|g}|j}|j}x�|r|�}tj|�}	x�|	D]�}
|tj	kr�tj
j||
�}n|
}tj|�}||}
||
�r�|j|�qk||
�rk||
�rk||�qkqkWqFW|S(s^Find all files under 'dir' and return the list of full filenames
    (relative to 'dir').
    i����(tST_MODEtS_ISREGtS_ISDIRtS_ISLNK(tstatR=R>R?R@tpopRRtlistdirR<RR(RR=R>R?R@tlisttstackRBtpushtnamesR8tfullnameRAtmode((s*/usr/lib64/python2.7/distutils/filelist.pyR
s&"					

cCsStj|�}tj}tjdkr0d}nd|}tjd||�}|S(s�Translate a shell-like glob pattern to a regular expression.

    Return a string containing the regex.  Differs from
    'fnmatch.translate()' in that '*' does not match "special characters"
    (which are platform-specific).
    s\s\\\\s\1[^%s]s((?<!\\)(\\\\)*)\.(tfnmatcht	translateRtseptretsub(R1R7RLtescaped((s*/usr/lib64/python2.7/distutils/filelist.pyt
glob_to_re s		
iicCs�|r)t|t�r"tj|�S|Sn|r>t|�}nd}|dk	r�td�}t|�t|� }tj}tjdkr�d}nd|j	|d|f�}n|r�d|}ntj|�S(sTranslate a shell-like wildcard pattern to a compiled regular
    expression.

    Return the compiled regex.  If 'is_regex' true,
    then 'pattern' is directly compiled to a regex (if it's a string)
    or just returned as-is (assumes it's a regex object).
    ts\s\\t^s.*N(
t
isinstancetstrRMtcompileRPRRRRLR(R1R-R.R5R7t
empty_patternt	prefix_reRL((s*/usr/lib64/python2.7/distutils/filelist.pyR38s"
		 
((R;t__revision__RRMRJtdistutils.utilRtdistutils.errorsRRt	distutilsRRR<R
RPRR3(((s*/usr/lib64/python2.7/distutils/filelist.pyt<module>s� 	PKW[b�y���
extension.pycnu�[����
{fc@s�dZdZddlZddlZddlZddlTyddlZWnek
rcdZnXddd��YZ	d�Z
dS(	smdistutils.extension

Provides the Extension class, used to describe C/C++ extension
modules in setup scripts.s$Id$i����N(t*t	ExtensioncBs>eZdZdddddddddddddd�
ZRS(s4Just a collection of attributes that describes an extension
    module and everything needed to build it (hopefully in a portable
    way, but there are hooks that let you be as unportable as you need).

    Instance attributes:
      name : string
        the full name of the extension, including any packages -- ie.
        *not* a filename or pathname, but Python dotted name
      sources : [string]
        list of source filenames, relative to the distribution root
        (where the setup script lives), in Unix form (slash-separated)
        for portability.  Source files may be C, C++, SWIG (.i),
        platform-specific resource files, or whatever else is recognized
        by the "build_ext" command as source for a Python extension.
      include_dirs : [string]
        list of directories to search for C/C++ header files (in Unix
        form for portability)
      define_macros : [(name : string, value : string|None)]
        list of macros to define; each macro is defined using a 2-tuple,
        where 'value' is either the string to define it to or None to
        define it without a particular value (equivalent of "#define
        FOO" in source or -DFOO on Unix C compiler command line)
      undef_macros : [string]
        list of macros to undefine explicitly
      library_dirs : [string]
        list of directories to search for C/C++ libraries at link time
      libraries : [string]
        list of library names (not filenames or paths) to link against
      runtime_library_dirs : [string]
        list of directories to search for C/C++ libraries at run time
        (for shared extensions, this is when the extension is loaded)
      extra_objects : [string]
        list of extra files to link with (eg. object files not implied
        by 'sources', static library that must be explicitly specified,
        binary resource files, etc.)
      extra_compile_args : [string]
        any extra platform- and compiler-specific information to use
        when compiling the source files in 'sources'.  For platforms and
        compilers where "command line" makes sense, this is typically a
        list of command-line arguments, but for other platforms it could
        be anything.
      extra_link_args : [string]
        any extra platform- and compiler-specific information to use
        when linking object files together to create the extension (or
        to create a new static Python interpreter).  Similar
        interpretation as for 'extra_compile_args'.
      export_symbols : [string]
        list of symbols to be exported from a shared extension.  Not
        used on all platforms, and not generally necessary for Python
        extensions, which typically export exactly one symbol: "init" +
        extension_name.
      swig_opts : [string]
        any extra options to pass to SWIG if a source file has the .i
        extension.
      depends : [string]
        list of files that the extension depends on
      language : string
        extension language (i.e. "c", "c++", "objc"). Will be detected
        from the source extensions if not provided.
    cKs�t|�tkstd��t|�tkrRtt|�tgt|�ks^td��||_||_|pyg|_|p�g|_	|p�g|_
|p�g|_|p�g|_|p�g|_
|	p�g|_|
p�g|_|p�g|_|pg|_|
pg|_|pg|_||_t|�r�|j�}|j�tt|�}dtj|d�}tdk	r�tj|�q�tjj|d�ndS(Ns'name' must be a strings#'sources' must be a list of stringssUnknown Extension options: s, s
( ttypet
StringTypetAssertionErrortListTypetmaptlentnametsourcestinclude_dirst
define_macrostundef_macrostlibrary_dirst	librariestruntime_library_dirst
extra_objectstextra_compile_argstextra_link_argstexport_symbolst	swig_optstdependstlanguagetkeystsorttreprtstringtjointwarningstNonetwarntsyststderrtwrite(tselfRR	R
RRR
RRRRRRRRRtkwtLtmsg((s+/usr/lib64/python2.7/distutils/extension.pyt__init__Zs6%				
N(t__name__t
__module__t__doc__RR&(((s+/usr/lib64/python2.7/distutils/extension.pyRs<cCs�ddlm}m}m}ddlm}ddlm}||�}||ddddddd	dd
d�}zag}xT|j�}	|	dkr�Pn|j
|	�r�q~|	d|	dko�dknr�|jd
|	�q~q�n||	|�}	||	�}
|
d}t|g�}d}
x�|
dD]�}|
dk	rZ|
j
|�d}
q/ntjj|�d}|dd!}|d}|d(kr�|jj
|�q/|dkr�|jj
|�q/|dkr0tj|d�}|dkr|jj
|df�q�|jj
|d|!||df�q/|dkrO|jj
|�q/|dkrn|jj
|�q/|dkr�|jj
|�q/|dkr�|jj
|�q/|dkr�|jj
|�q/|dkr�|j}
q/|dkr�|j}
q/|d kr|j}
q/|d!krD|jj
|�|s�|j}
q�q/|d kr\|j}
q/|d!kr�|jj
|�|s�|j}
q�q/|d)kr�|jj
|�q/|jd'|�q/W|j
|�q~WWd|j�X|S(*Ni����(tparse_makefiletexpand_makefile_varst_variable_rx(tTextFile(tsplit_quotedtstrip_commentsitskip_blankst
join_linest	lstrip_wst	rstrip_wsiRs'%s' lines not handled yetis.cs.ccs.cpps.cxxs.c++s.ms.mms-Is-Dt=s-Us-Cs-ls-Ls-Rs-rpaths-Xlinkers
-Xcompilers-us.as.sos.sls.os.dylibsunrecognized argument '%s'(s.cs.ccs.cpps.cxxs.c++s.ms.mm(s.as.sos.sls.os.dylib(tdistutils.sysconfigR*R+R,tdistutils.text_fileR-tdistutils.utilR.treadlineRtmatchRRtappendtostpathtsplitextR	R
RtfindRRRRR
RRRtclose(tfilenameR*R+R,R-R.tvarstfilet
extensionstlinetwordstmoduletexttappend_next_wordtwordtsuffixtswitchtvaluetequals((s+/usr/lib64/python2.7/distutils/extension.pytread_setup_file�s�	$		



((R)t__revision__R;RRttypesRtImportErrorRRRN(((s+/usr/lib64/python2.7/distutils/extension.pyt<module>s$


qPKW[<Bu2uDuDmsvccompiler.pycnu�[����
{fc@sdZdZddlZddlZddlZddlmZmZmZm	Z	m
Z
ddlmZm
Z
ddlmZdZy@ddlZdZeZejZejZejZejZWn~ek
rDyLddlZddlZdZeZejZejZejZejZWnek
r@ejd	�nXnXerlejej ej!ej"fZ#nd
�Z$d�Z%d�Z&d
fd��YZ'd�Z(d�Z)d�Z*defd��YZ+e(�dkrej,d�e+Z-ddl.m+Z+ddl.m'Z'ndS(s�distutils.msvccompiler

Contains MSVCCompiler, an implementation of the abstract CCompiler class
for the Microsoft Visual Studio.
s$Id$i����N(tDistutilsExecErrortDistutilsPlatformErrortCompileErrortLibErrort	LinkError(t	CCompilertgen_lib_options(tlogiis�Warning: Can't read registry to find the necessary compiler setting
Make sure that Python modules _winreg, win32api or win32con are installed.cCs~yt||�}Wntk
r'dSXg}d}xCyt||�}Wntk
r^PnX|j|�|d}q7W|S(sReturn list of registry keys.iiN(tRegOpenKeyExtRegErrortNonet
RegEnumKeytappend(tbasetkeythandletLtitk((s./usr/lib64/python2.7/distutils/msvccompiler.pyt	read_keys;s


cCs�yt||�}Wntk
r'dSXi}d}xayt||�\}}}Wntk
rgPnX|j�}t|�|t|�<|d}q7W|S(sXReturn dict of registry keys and values.

    All names are converted to lowercase.
    iiN(RR	R
tRegEnumValuetlowertconvert_mbcs(R
RRtdRtnametvaluettype((s./usr/lib64/python2.7/distutils/msvccompiler.pytread_valuesMs

cCsIt|dd�}|dk	rEy|d�}WqEtk
rAqEXn|S(Ntencodetmbcs(tgetattrR
tUnicodeError(tstenc((s./usr/lib64/python2.7/distutils/msvccompiler.pyRbs
t
MacroExpandercBs,eZd�Zd�Zd�Zd�ZRS(cCsi|_|j|�dS(N(tmacrostload_macros(tselftversion((s./usr/lib64/python2.7/distutils/msvccompiler.pyt__init__ms	cCsCx<tD]4}t||�}|r|||jd|<PqqWdS(Ns$(%s)(tHKEYSRR#(R%tmacrotpathRR
R((s./usr/lib64/python2.7/distutils/msvccompiler.pyt	set_macroqs

c	Cs%d|}|jd|dd�|jd|dd�d}|jd|d	�y9|d
krv|jd|d�n|jd|d
�Wntk
r�td�nXd}xqtD]i}yt||�}Wntk
r�q�nXt|d�}t|d||f�}|d|jd<q�WdS(Ns%Software\Microsoft\VisualStudio\%0.1ftVCInstallDirs	\Setup\VCt
productdirtVSInstallDirs	\Setup\VSs Software\Microsoft\.NETFrameworktFrameworkDirtinstallrootg@tFrameworkSDKDirssdkinstallrootv1.1tsdkinstallrootsPython was built with Visual Studio 2003;
extensions must be built with a compiler than can generate compatible binaries.
Visual Studio 2003 was not found on this system. If you have Cygwin installed,
you can try compiling with MingW32, by passing "-c mingw32" to setup.py.s.Software\Microsoft\NET Framework Setup\Productis%s\%sR&s$(FrameworkVersion)(	R+tKeyErrorRR(RR	RRR#(	R%R&tvsbasetnettpR
thRR((s./usr/lib64/python2.7/distutils/msvccompiler.pyR$xs*




cCs9x2|jj�D]!\}}tj|||�}qW|S(N(R#titemststringtreplace(R%R Rtv((s./usr/lib64/python2.7/distutils/msvccompiler.pytsub�s(t__name__t
__module__R'R+R$R<(((s./usr/lib64/python2.7/distutils/msvccompiler.pyR"ks			cCs�d}tjtj|�}|dkr+dS|t|�}tj|jdd�\}}t|d �d}t|dd!�d	}|dkr�d
}n|dkr�||SdS(s�Return the version of MSVC that was used to build Python.

    For Python 2.3 and up, the version number is included in
    sys.version.  For earlier versions, assume the compiler is MSVC 6.
    sMSC v.i����it ii����iig$@iN(R9tfindtsysR&tlentsplittintR
(tprefixRR tresttmajorVersiontminorVersion((s./usr/lib64/python2.7/distutils/msvccompiler.pytget_build_version�s	cCs[d}tjtj|�}|dkr+dStjtjd|�}tj|t|�|!S(saReturn the processor architecture.

    Possible results are "Intel", "Itanium", or "AMD64".
    s bit (i����tIntelt)(R9R@RAR&RB(RERtj((s./usr/lib64/python2.7/distutils/msvccompiler.pytget_build_architecture�scCsIg}x<|D]4}tjj|�}||kr
|j|�q
q
W|S(snReturn a list of normalized paths with duplicates removed.

    The current order of paths is maintained.
    (tosR*tnormpathR(tpathst
reduced_pathsR6tnp((s./usr/lib64/python2.7/distutils/msvccompiler.pytnormalize_and_reduce_paths�s
tMSVCCompilercBsDeZdZdZiZdgZdddgZdgZdgZeeeeZ	dZ
d	Zd
ZdZ
dZZd
Zdddd�Zd�Zddd�Zdddddddd�Zdddd�Zddddddddddd�
Zd�Zd�Zd�Zdd�Zd�Zdd�Zd�ZRS(swConcrete class that implements an interface to Microsoft Visual C++,
       as defined by the CCompiler abstract class.tmsvcs.cs.ccs.cpps.cxxs.rcs.mcs.ress.objs.libs.dlls%s%ss.exeicCs�tj||||�t�|_t�|_|jdkr�|jdkrjd|_t|j�|_n	d|_d|j|_	nd|jd|_	t
|_dS(NRJisSoftware\Microsoft\VisualStudiosSoftware\Microsoft\DevstudiosVisual Studio version %ssMicrosoft SDK compiler %si(RR'RIt_MSVCCompiler__versionRMt_MSVCCompiler__archt_MSVCCompiler__rootR"t_MSVCCompiler__macrost_MSVCCompiler__producttFalsetinitialized(R%tverbosetdry_runtforce((s./usr/lib64/python2.7/distutils/msvccompiler.pyR'�s		cCs�g|_dtjkrfdtjkrf|jd�rfd|_d|_d|_d|_d|_n�|j	d�|_t
|j�d	kr�td
|j�n|jd�|_|jd�|_|jd�|_|jd�|_|jd�|_|j
d�|j
d�y8x1tjtjdd
�D]}|jj|�q1WWntk
r_nXt|j�|_tj|jd
�tjd<d|_|jdkr�ddddddg|_dddddddg|_n9ddddddg|_dddddddg|_dddg|_|jdkrTddddg|_ndddddg|_dg|_t|_dS( NtDISTUTILS_USE_SDKtMSSdkscl.exeslink.exeslib.exesrc.exesmc.exeR*isxPython was built with %s, and extensions need to be built with the same version of the compiler, but it isn't installed.tlibtincludet;RJs/nologos/Oxs/MDs/W3s/GXs/DNDEBUGs/Ods/MDds/Z7s/D_DEBUGs/GS-s/DLLs/INCREMENTAL:NOis/INCREMENTAL:nos/DEBUGs	/pdb:None(t_MSVCCompiler__pathsRNtenvirontfind_exetcctlinkerRbtrctmctget_msvc_pathsRBRRZtset_path_env_varR9RCRR3RStjoinR
tpreprocess_optionsRWtcompile_optionstcompile_options_debugtldflags_sharedRVtldflags_shared_debugtldflags_statictTrueR\(R%R6((s./usr/lib64/python2.7/distutils/msvccompiler.pyt
initialize�sT	-				


 
	tcCs>|dkrd}ng}x|D]}tjj|�\}}tjj|�d}|tjj|�}||jkr�td|��n|r�tjj|�}n||j	kr�|j
tjj|||j��q"||j
kr|j
tjj|||j��q"|j
tjj|||j��q"W|S(NRwisDon't know how to compile %s(R
RNR*tsplitextt
splitdrivetisabstsrc_extensionsRtbasenamet_rc_extensionsRRnt
res_extensiont_mc_extensionst
obj_extension(R%tsource_filenamest	strip_dirt
output_dirt	obj_namestsrc_nameR
text((s./usr/lib64/python2.7/distutils/msvccompiler.pytobject_filenames<s(	
c	Cs�|js|j�n|j||||||�\}}	}}
}|pLg}|jd�|ru|j|j�n|j|j�xM|	D]E}
y||
\}}Wntk
r�q�nX|r�tj	j
|�}n||jkr�d|}n�||jkrd|}nk||j
kr}|}d|
}y)|j|jg|
|g|g�Wq�tk
rv}t|�q�Xq�n�||jkretj	j|�}tj	j|
�}y�|j|jgd|d|g|g�tj	jtj	j|��\}}tj	j||d�}|j|jgd|
g|g�Wq�tk
r^}t|�q�Xq�ntd||
f��d	|
}y-|j|jg||
||g|�Wq�tk
r�}t|�q�Xq�W|	S(
Ns/cs/Tcs/Tps/fos-hs-rs.rcs"Don't know how to compile %s to %ss/Fo(R\Rvt_setup_compileRtextendRqRpR3RNR*tabspatht
_c_extensionst_cpp_extensionsR}tspawnRjRRRtdirnameRkRxR|RnRh(R%tsourcesR�R#tinclude_dirstdebugt
extra_preargstextra_postargstdependstobjectstpp_optstbuildtcompile_optstobjtsrcR�t	input_optt
output_opttmsgth_dirtrc_dirR
t_trc_file((s./usr/lib64/python2.7/distutils/msvccompiler.pytcompile]sj	






#
$$#

c	Cs�|js|j�n|j||�\}}|j|d|�}|j||�r�|d|g}|rony|j|jg|�Wq�tk
r�}t|�q�Xnt	j
d|�dS(NR�s/OUT:sskipping %s (up-to-date)(R\Rvt_fix_object_argstlibrary_filenamet
_need_linkR�RbRRRR�(	R%R�toutput_libnameR�R�ttarget_langtoutput_filenametlib_argsR�((s./usr/lib64/python2.7/distutils/msvccompiler.pytcreate_static_lib�s	
cCsW|js|j�n|j||�\}}|j|||�\}}}|rl|jdt|��nt||||�}|dk	r�tj	j
||�}n|j||�rC|tj
kr�|	r�|jd}q|jd}n|	r�|j}n	|j}g}x%|pgD]}|jd|�qW||||d|g}|dk	r�tj	jtj	j|��\}}tj	j
tj	j|d�|j|��}|jd|�n|
r�|
|d*n|r�|j|�n|jtj	j|��y|j|jg|�WqStk
r?}t|�qSXntjd|�dS(Ns5I don't know what to do with 'runtime_library_dirs': is/EXPORT:s/OUT:is/IMPLIB:sskipping %s (up-to-date)(R\RvR�t
_fix_lib_argstwarntstrRR
RNR*RnR�Rt
EXECUTABLERsRrRRxR|R�R�R�tmkpathR�RiRRRR�(R%ttarget_descR�R�R�t	librariestlibrary_dirstruntime_library_dirstexport_symbolsR�R�R�t
build_tempR�tlib_optstldflagstexport_optstsymtld_argstdll_nametdll_exttimplib_fileR�((s./usr/lib64/python2.7/distutils/msvccompiler.pytlink�sR	
					
cCsd|S(Ns	/LIBPATH:((R%tdir((s./usr/lib64/python2.7/distutils/msvccompiler.pytlibrary_dir_option$scCs
td�dS(Ns<don't know how to set runtime library search path for MSVC++(R(R%R�((s./usr/lib64/python2.7/distutils/msvccompiler.pytruntime_library_dir_option'scCs
|j|�S(N(R�(R%Rb((s./usr/lib64/python2.7/distutils/msvccompiler.pytlibrary_option+scCs�|r|d|g}n	|g}xW|D]K}xB|D]:}tjj||j|��}tjj|�r6|Sq6Wq)WdSdS(Nt_d(RNR*RnR�texistsR
(R%tdirsRbR�t	try_namesR�Rtlibfile((s./usr/lib64/python2.7/distutils/msvccompiler.pytfind_library_file/s	

cCs�xH|jD]=}tjjtjj|�|�}tjj|�r
|Sq
WxXtjtjdd�D]=}tjjtjj|�|�}tjj|�re|SqeW|S(s�Return path to an MSVC executable program.

        Tries to find the program in several places: first, one of the
        MSVC program search paths from the registry; next, the directories
        in the PATH environment variable.  If any of those work, return an
        absolute path that is known to exist.  If none of them work, just
        return the original program name, 'exe'.
        tPathRd(	ReRNR*RnR�tisfileR9RCRf(R%texeR6tfn((s./usr/lib64/python2.7/distutils/msvccompiler.pyRgCs
! !tx86cCsts
gS|d}|jdkr<d|j|jf}nd|j|f}xitD]a}t||�}|rV|jdkr�tj|jj||�d�Stj||d�SqVqVW|jdkrx>tD]3}t|d|j�d	k	r�|j
d�Pq�q�WngS(
s�Get a list of devstudio directories (include, lib or path).

        Return a list of strings.  The list will be empty if unable to
        access the registry or appropriate registry keys not found.
        s dirsis6%s\%0.1f\VC\VC_OBJECTS_PLATFORM_INFO\Win32\Directoriess?%s\6.0\Build System\Components\Platforms\Win32 (%s)\DirectoriesRdis%s\6.0s�It seems you have Visual Studio 6 installed, but the expected registry settings are not present.
You must at least run the Visual Studio GUI once so that these entries are created.N(t
_can_read_regRVRXR(RR9RCRYR<R
R�(R%R*tplatformRR
R((s./usr/lib64/python2.7/distutils/msvccompiler.pyRlZs(

 

cCsS|dkr|jd�}n|j|�}|rOtj|d�tj|<ndS(s�Set environment variable 'name' to an MSVC path type value.

        This is equivalent to a SET command prior to execution of spawned
        commands.
        RbtlibraryRdN(RlR9RnRNRf(R%RR6((s./usr/lib64/python2.7/distutils/msvccompiler.pyRms
N(R=R>t__doc__t
compiler_typetexecutablesR�R�R}RR{R~R�tstatic_lib_extensiontshared_lib_extensiontstatic_lib_formattshared_lib_formatt
exe_extensionR'RvR�R
R�R�R�R�R�R�R�RgRlRm(((s./usr/lib64/python2.7/distutils/msvccompiler.pyRT�sP			
	BZG				%g @s3Importing new compiler from distutils.msvc9compiler(RT(R"(/R�t__revision__RARNR9tdistutils.errorsRRRRRtdistutils.ccompilerRRt	distutilsRR�t_winregthkey_modt	OpenKeyExRtEnumKeyRt	EnumValueRterrorR	tImportErrortwin32apitwin32continfot
HKEY_USERStHKEY_CURRENT_USERtHKEY_LOCAL_MACHINEtHKEY_CLASSES_ROOTR(RRRR"RIRMRSRTR�tOldMSVCCompilertdistutils.msvc9compiler(((s./usr/lib64/python2.7/distutils/msvccompiler.pyt<module>s`(			

			


				.		
	��
PKW[���
extension.pyonu�[����
{fc@s�dZdZddlZddlZddlZddlTyddlZWnek
rcdZnXddd��YZ	d�Z
dS(	smdistutils.extension

Provides the Extension class, used to describe C/C++ extension
modules in setup scripts.s$Id$i����N(t*t	ExtensioncBs>eZdZdddddddddddddd�
ZRS(s4Just a collection of attributes that describes an extension
    module and everything needed to build it (hopefully in a portable
    way, but there are hooks that let you be as unportable as you need).

    Instance attributes:
      name : string
        the full name of the extension, including any packages -- ie.
        *not* a filename or pathname, but Python dotted name
      sources : [string]
        list of source filenames, relative to the distribution root
        (where the setup script lives), in Unix form (slash-separated)
        for portability.  Source files may be C, C++, SWIG (.i),
        platform-specific resource files, or whatever else is recognized
        by the "build_ext" command as source for a Python extension.
      include_dirs : [string]
        list of directories to search for C/C++ header files (in Unix
        form for portability)
      define_macros : [(name : string, value : string|None)]
        list of macros to define; each macro is defined using a 2-tuple,
        where 'value' is either the string to define it to or None to
        define it without a particular value (equivalent of "#define
        FOO" in source or -DFOO on Unix C compiler command line)
      undef_macros : [string]
        list of macros to undefine explicitly
      library_dirs : [string]
        list of directories to search for C/C++ libraries at link time
      libraries : [string]
        list of library names (not filenames or paths) to link against
      runtime_library_dirs : [string]
        list of directories to search for C/C++ libraries at run time
        (for shared extensions, this is when the extension is loaded)
      extra_objects : [string]
        list of extra files to link with (eg. object files not implied
        by 'sources', static library that must be explicitly specified,
        binary resource files, etc.)
      extra_compile_args : [string]
        any extra platform- and compiler-specific information to use
        when compiling the source files in 'sources'.  For platforms and
        compilers where "command line" makes sense, this is typically a
        list of command-line arguments, but for other platforms it could
        be anything.
      extra_link_args : [string]
        any extra platform- and compiler-specific information to use
        when linking object files together to create the extension (or
        to create a new static Python interpreter).  Similar
        interpretation as for 'extra_compile_args'.
      export_symbols : [string]
        list of symbols to be exported from a shared extension.  Not
        used on all platforms, and not generally necessary for Python
        extensions, which typically export exactly one symbol: "init" +
        extension_name.
      swig_opts : [string]
        any extra options to pass to SWIG if a source file has the .i
        extension.
      depends : [string]
        list of files that the extension depends on
      language : string
        extension language (i.e. "c", "c++", "objc"). Will be detected
        from the source extensions if not provided.
    cKsM||_||_|pg|_|p*g|_|p9g|_|pHg|_|pWg|_|pfg|_|	pug|_|
p�g|_	|p�g|_
|p�g|_|
p�g|_|p�g|_
||_t|�rI|j�}|j�tt|�}dtj|d�}tdk	r2tj|�qItjj|d�ndS(NsUnknown Extension options: s, s
(tnametsourcestinclude_dirst
define_macrostundef_macrostlibrary_dirst	librariestruntime_library_dirst
extra_objectstextra_compile_argstextra_link_argstexport_symbolst	swig_optstdependstlanguagetlentkeystsorttmaptreprtstringtjointwarningstNonetwarntsyststderrtwrite(tselfRRRRRRRR	R
RRR
RRRtkwtLtmsg((s+/usr/lib64/python2.7/distutils/extension.pyt__init__Zs.			
N(t__name__t
__module__t__doc__RR"(((s+/usr/lib64/python2.7/distutils/extension.pyRs<cCs�ddlm}m}m}ddlm}ddlm}||�}||ddddddd	dd
d�}zag}xT|j�}	|	dkr�Pn|j
|	�r�q~|	d|	dko�dknr�|jd
|	�q~q�n||	|�}	||	�}
|
d}t|g�}d}
x�|
dD]�}|
dk	rZ|
j
|�d}
q/ntjj|�d}|dd!}|d}|d(kr�|jj
|�q/|dkr�|jj
|�q/|dkr0tj|d�}|dkr|jj
|df�q�|jj
|d|!||df�q/|dkrO|jj
|�q/|dkrn|jj
|�q/|dkr�|jj
|�q/|dkr�|jj
|�q/|dkr�|jj
|�q/|dkr�|j}
q/|dkr�|j}
q/|d kr|j}
q/|d!krD|jj
|�|s�|j}
q�q/|d kr\|j}
q/|d!kr�|jj
|�|s�|j}
q�q/|d)kr�|jj
|�q/|jd'|�q/W|j
|�q~WWd|j�X|S(*Ni����(tparse_makefiletexpand_makefile_varst_variable_rx(tTextFile(tsplit_quotedtstrip_commentsitskip_blankst
join_linest	lstrip_wst	rstrip_wsiRs'%s' lines not handled yetis.cs.ccs.cpps.cxxs.c++s.ms.mms-Is-Dt=s-Us-Cs-ls-Ls-Rs-rpaths-Xlinkers
-Xcompilers-us.as.sos.sls.os.dylibsunrecognized argument '%s'(s.cs.ccs.cpps.cxxs.c++s.ms.mm(s.as.sos.sls.os.dylib(tdistutils.sysconfigR&R'R(tdistutils.text_fileR)tdistutils.utilR*treadlineRtmatchRRtappendtostpathtsplitextRRRtfindRRRRRR	RR
tclose(tfilenameR&R'R(R)R*tvarstfilet
extensionstlinetwordstmoduletexttappend_next_wordtwordtsuffixtswitchtvaluetequals((s+/usr/lib64/python2.7/distutils/extension.pytread_setup_file�s�	$		



((R%t__revision__R7RRttypesRtImportErrorRRRJ(((s+/usr/lib64/python2.7/distutils/extension.pyt<module>s$


qPKW[U�cڍ�
errors.pyonu�[����
{fc@s�dZdZdefd��YZdefd��YZdefd��YZdefd	��YZd
efd��YZdefd
��YZdefd��YZ	defd��YZ
defd��YZdefd��YZdefd��YZ
defd��YZdefd��YZdefd��YZdefd��YZd efd!��YZd"efd#��YZd$efd%��YZd&efd'��YZd(S()s�distutils.errors

Provides exceptions used by the Distutils modules.  Note that Distutils
modules may raise standard exceptions; in particular, SystemExit is
usually raised for errors that are obviously the end-user's fault
(eg. bad command-line arguments).

This module is safe to use in "from ... import *" mode; it only exports
symbols whose names start with "Distutils" and end with "Error".s$Id$tDistutilsErrorcBseZdZRS(sThe root of all Distutils evil.(t__name__t
__module__t__doc__(((s(/usr/lib64/python2.7/distutils/errors.pyR
stDistutilsModuleErrorcBseZdZRS(s�Unable to load an expected module, or to find an expected class
    within some module (in particular, command modules and classes).(RRR(((s(/usr/lib64/python2.7/distutils/errors.pyRstDistutilsClassErrorcBseZdZRS(s�Some command class (or possibly distribution class, if anyone
    feels a need to subclass Distribution) is found not to be holding
    up its end of the bargain, ie. implementing some part of the
    "command "interface.(RRR(((s(/usr/lib64/python2.7/distutils/errors.pyRstDistutilsGetoptErrorcBseZdZRS(s7The option table provided to 'fancy_getopt()' is bogus.(RRR(((s(/usr/lib64/python2.7/distutils/errors.pyRstDistutilsArgErrorcBseZdZRS(saRaised by fancy_getopt in response to getopt.error -- ie. an
    error in the command line usage.(RRR(((s(/usr/lib64/python2.7/distutils/errors.pyRstDistutilsFileErrorcBseZdZRS(s�Any problems in the filesystem: expected file not found, etc.
    Typically this is for problems that we detect before IOError or
    OSError could be raised.(RRR(((s(/usr/lib64/python2.7/distutils/errors.pyR!stDistutilsOptionErrorcBseZdZRS(s�Syntactic/semantic errors in command options, such as use of
    mutually conflicting options, or inconsistent options,
    badly-spelled values, etc.  No distinction is made between option
    values originating in the setup script, the command line, config
    files, or what-have-you -- but if we *know* something originated in
    the setup script, we'll raise DistutilsSetupError instead.(RRR(((s(/usr/lib64/python2.7/distutils/errors.pyR	&stDistutilsSetupErrorcBseZdZRS(sqFor errors that can be definitely blamed on the setup script,
    such as invalid keyword arguments to 'setup()'.(RRR(((s(/usr/lib64/python2.7/distutils/errors.pyR
.stDistutilsPlatformErrorcBseZdZRS(s�We don't know how to do something on the current platform (but
    we do know how to do it on some platform) -- eg. trying to compile
    C files on a platform not supported by a CCompiler subclass.(RRR(((s(/usr/lib64/python2.7/distutils/errors.pyR2stDistutilsExecErrorcBseZdZRS(s`Any problems executing an external program (such as the C
    compiler, when compiling C files).(RRR(((s(/usr/lib64/python2.7/distutils/errors.pyR7stDistutilsInternalErrorcBseZdZRS(soInternal inconsistencies or impossibilities (obviously, this
    should never be seen if the code is working!).(RRR(((s(/usr/lib64/python2.7/distutils/errors.pyR
;stDistutilsTemplateErrorcBseZdZRS(s%Syntax error in a file list template.(RRR(((s(/usr/lib64/python2.7/distutils/errors.pyR?stDistutilsByteCompileErrorcBseZdZRS(sByte compile error.(RRR(((s(/usr/lib64/python2.7/distutils/errors.pyRBstCCompilerErrorcBseZdZRS(s#Some compile/link operation failed.(RRR(((s(/usr/lib64/python2.7/distutils/errors.pyRFstPreprocessErrorcBseZdZRS(s.Failure to preprocess one or more C/C++ files.(RRR(((s(/usr/lib64/python2.7/distutils/errors.pyRIstCompileErrorcBseZdZRS(s2Failure to compile one or more C/C++ source files.(RRR(((s(/usr/lib64/python2.7/distutils/errors.pyRLstLibErrorcBseZdZRS(sKFailure to create a static library from one or more C/C++ object
    files.(RRR(((s(/usr/lib64/python2.7/distutils/errors.pyROst	LinkErrorcBseZdZRS(s]Failure to link one or more C/C++ object files into an executable
    or shared library file.(RRR(((s(/usr/lib64/python2.7/distutils/errors.pyRSstUnknownFileErrorcBseZdZRS(s(Attempt to process an unknown file type.(RRR(((s(/usr/lib64/python2.7/distutils/errors.pyRWsN(Rt__revision__t	ExceptionRRRRRRR	R
RRR
RRRRRRRR(((s(/usr/lib64/python2.7/distutils/errors.pyt<module>	s(PKW[	`��ppcore.pycnu�[����
{fc@s�dZdZddlZddlZddlmZddlmZmZm	Z	m
Z
ddlmZddl
mZddlmZdd	lmZd
Zd�Zdadad2Zd3Zd/�Zdd0d1�ZdS(4s#distutils.core

The only module that needs to be imported to use the Distutils; provides
the 'setup' function (which is to be called from the setup script).  Also
indirectly provides the Distribution and Command classes, although they are
really defined in distutils.dist and distutils.cmd.
s$Id$i����N(tDEBUG(tDistutilsSetupErrortDistutilsArgErrortDistutilsErrortCCompilerError(tDistribution(tCommand(t
PyPIRCCommand(t	Extensions�usage: %(script)s [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]
   or: %(script)s --help [cmd1 cmd2 ...]
   or: %(script)s --help-commands
   or: %(script)s cmd --help
cCs!tjj|�}ti|d6S(Ntscript(tostpathtbasenametUSAGE(tscript_nameR	((s&/usr/lib64/python2.7/distutils/core.pyt	gen_usage#st	distclassRtscript_argstoptionstnametversiontauthortauthor_emailt
maintainertmaintainer_emailturltlicensetdescriptiontlong_descriptiontkeywordst	platformstclassifierstdownload_urltrequirestprovidest	obsoletestsourcestinclude_dirst
define_macrostundef_macrostlibrary_dirst	librariestruntime_library_dirst
extra_objectstextra_compile_argstextra_link_argst	swig_optstexport_symbolstdependstlanguagecKs5|jd�}|r|d=nt}d|krQtjjtjd�|d<nd|krqtjd|d<ny||�a}WnFtk
r�}d|kr�t	d|d|f�q�t	d|�nXt
d	kr�|S|j�trd
GH|j
�nt
dkr|Sy|j�}Wn-tk
rO}t	t|j�d|�nXtrhd
GH|j
�nt
dkrx|S|r1y|j�Wq1tk
r�t	d�q1ttjfk
r�}tr�tjjd|f��q.t	d|f�q1ttfk
r-}tr�q.t	dt|��q1Xn|S(s�The gateway to the Distutils: do everything your setup script needs
    to do, in a highly flexible and user-driven way.  Briefly: create a
    Distribution instance; find and parse config files; parse the command
    line; run each Distutils command found there, customized by the options
    supplied to 'setup()' (as keyword arguments), in config files, and on
    the command line.

    The Distribution instance might be an instance of a class supplied via
    the 'distclass' keyword argument to 'setup'; if no such class is
    supplied, then the Distribution class (in dist.py) is instantiated.
    All other arguments to 'setup' (except for 'cmdclass') are used to set
    attributes of the Distribution instance.

    The 'cmdclass' argument, if supplied, is a dictionary mapping command
    names to command classes.  Each command encountered on the command line
    will be turned into a command class, which is in turn instantiated; any
    class found in 'cmdclass' is used in place of the default, which is
    (for command 'foo_bar') class 'foo_bar' in module
    'distutils.command.foo_bar'.  The command class must provide a
    'user_options' attribute which is a list of option specifiers for
    'distutils.fancy_getopt'.  Any command-line options between the current
    and the next command are used to set attributes of the current command
    object.

    When the entire command-line has been successfully parsed, calls the
    'run()' method on each command object in turn.  This method will be
    driven entirely by the Distribution object (which each command object
    has a reference to, thanks to its constructor), and the
    command-specific options that became attributes of each command
    object.
    RRiRiRserror in %s setup command: %sserror in setup command: %stinits%options (after parsing config files):tconfigs

error: %ss%options (after parsing command line):tcommandlinetinterrupteds
error: %s
s	error: %sserror: (tgetRR
RRtsystargvt_setup_distributionRt
SystemExitt_setup_stop_aftertparse_config_filesRtdump_option_dictstparse_command_lineRRRtrun_commandstKeyboardInterrupttIOErrorterrortstderrtwriteRRtstr(tattrstklasstdisttmsgtoktexc((s&/usr/lib64/python2.7/distutils/core.pytsetup<s`%
 



truncBs�|dkred|f�n|aej}i|d6}i}yrz[|ejd<|d	k	rp|ejd)ne|�}z|j�||UWd	|j�XWd	|e_d	aXWnek
r�n
�nXt	d	kr�e
d
|�nt	S(s)Run a setup script in a somewhat controlled environment, and
    return the Distribution instance that drives things.  This is useful
    if you need to find out the distribution meta-data (passed as
    keyword args from 'script' to 'setup()', or the contents of the
    config files or command-line.

    'script_name' is a file that will be run with 'execfile()';
    'sys.argv[0]' will be replaced with 'script' for the duration of the
    call.  'script_args' is a list of strings; if supplied,
    'sys.argv[1:]' will be replaced by 'script_args' for the duration of
    the call.

    'stop_after' tells 'setup()' when to stop processing; possible
    values:
      init
        stop after the Distribution instance has been created and
        populated with the keyword arguments to 'setup()'
      config
        stop after config files have been parsed (and their data
        stored in the Distribution instance)
      commandline
        stop after the command-line ('sys.argv[1:]' or 'script_args')
        have been parsed (and the data stored in the Distribution)
      run [default]
        stop after all commands have been run (the same as if 'setup()'
        had been called in the usual way

    Returns the Distribution instance, which provides all information
    used to drive the Distutils.
    R2R3R4RMs"invalid value for 'stop_after': %rt__file__iiNsZ'distutils.core.setup()' was never called -- perhaps '%s' is not a Distutils setup script?(R2R3R4RM(t
ValueErrorR;R7R8tNonetopentreadtcloseR:R9tRuntimeError(RRt
stop_aftert	save_argvtgtltf((s&/usr/lib64/python2.7/distutils/core.pyt	run_setup�s4	

	

(RRRRRRRRRRRRRRRRRR R!R"R#(RR$R%R&R'R(R)R*R+R,R-R.R/R0R1(t__doc__t__revision__R7R
tdistutils.debugRtdistutils.errorsRRRRtdistutils.distRt
distutils.cmdRtdistutils.configRtdistutils.extensionRR
RRPR;R9tsetup_keywordstextension_keywordsRLRZ(((s&/usr/lib64/python2.7/distutils/core.pyt<module>s4"		oPKW[d�7�'�'command/register.pyonu�[����
{fc@szdZdZddlZddlZddlZddlmZddlmZddl	m
Z
defd��YZdS(	shdistutils.command.register

Implements the Distutils 'register' command (register with the repository).
s$Id$i����N(twarn(t
PyPIRCCommand(tlogtregistercBs�eZdZejddgZejdddgZdd�fgZd�Zd	�Z	d
�Z
d�Zd�Zd
�Z
d�Zd�Zd�Zdd�ZRS(s7register the distribution with the Python package indexslist-classifierss list the valid Trove classifierststrictsBWill stop the registering if the meta-data are not fully complianttverifytcheckcCstS(N(tTrue(tself((s2/usr/lib64/python2.7/distutils/command/register.pyt<lambda>tcCs#tj|�d|_d|_dS(Ni(Rtinitialize_optionstlist_classifiersR(R((s2/usr/lib64/python2.7/distutils/command/register.pyR s
	cCs>tj|�id|jfd6dd6}||jjd<dS(NRRitrestructuredtextR(Ri(Rtfinalize_optionsRtdistributiontcommand_options(Rt
check_options((s2/usr/lib64/python2.7/distutils/command/register.pyR%s

cCsr|j�|j�x!|j�D]}|j|�q!W|jrN|j�n |jrd|j�n
|j�dS(N(	Rt_set_configtget_sub_commandstrun_commandtdry_runtverify_metadataRtclassifierst
send_metadata(Rtcmd_name((s2/usr/lib64/python2.7/distutils/command/register.pytrun,s

	
	
cCsLtdt�|jjd�}|j�|j|_d|_|j�dS(sDeprecated API.sddistutils.command.register.check_metadata is deprecated,               use the check command insteadRiN(RtPendingDeprecationWarningRtget_command_objtensure_finalizedRR
R(RR((s2/usr/lib64/python2.7/distutils/command/register.pytcheck_metadata;s

	cCs�|j�}|ikrX|d|_|d|_|d|_|d|_t|_nU|jd|jfkr�td|j��n|jdkr�|j|_nt	|_dS(s: Reads the configuration file and set attributes.
        tusernametpasswordt
repositorytrealmtpypis%s not found in .pypircN(
t_read_pypircRR R!R"Rt
has_configtDEFAULT_REPOSITORYt
ValueErrortFalse(Rtconfig((s2/usr/lib64/python2.7/distutils/command/register.pyREs



cCs-tj|jd�}tj|j��dS(s8 Fetch the list of classifiers from the server.
        s?:action=list_classifiersN(turllib2turlopenR!Rtinfotread(Rtresponse((s2/usr/lib64/python2.7/distutils/command/register.pyRVscCs9|j|jd��\}}tjd||f�dS(sF Send the metadata to the package index server to be checked.
        RsServer response (%s): %sN(tpost_to_servertbuild_post_dataRR,(Rtcodetresult((s2/usr/lib64/python2.7/distutils/command/register.pyR\sc
Cs�|jr$d}|j}|j}nd}d}}dj�}xO||kr�|jdtj�t�}|szd}qC||krCdGHqCqCW|dkrx|s�td�}q�Wx|s�tjd�}q�Wt	j
�}tj|j�d	}|j
|j|||�|j|jd
�|�\}}|jd||ftj�|dkr�|jrp||j_q|jd
tj�|jd|j�tj�d}x1|j�dkr�td�}|s�d}q�q�W|j�dkr|j||�qq�n�|dkroidd6}	d|	d<|	d<|	d<d#|	d<x|	dsbtd�|	d<qEWx�|	d|	dkr�x!|	ds�tjd�|	d<q}Wx!|	ds�tjd�|	d<q�W|	d|	dkrfd|	d<d#|	d<dGHqfqfWx|	dstd�|	d<q�W|j|	�\}}|dkrRtjd||f�q�tjd�tjd�ns|d kr�id!d6}	d|	d<x|	ds�td"�|	d<q�W|j|	�\}}tjd||f�nd#S($s_ Send the metadata to the package index server.

            Well, do the following:
            1. figure who the user is, and then
            2. send the data as a Basic auth'ed POST.

            First we try to read the username/password from $HOME/.pypirc,
            which is a ConfigParser-formatted file with a section
            [distutils] containing username and password entries (both
            in clear text). Eg:

                [distutils]
                index-servers =
                    pypi

                [pypi]
                username: fred
                password: sekrit

            Otherwise, to figure who the user is, we offer the user three
            choices:

             1. use existing login,
             2. register as a new user, or
             3. set the password to a random string and email the user.

        t1txR
s1 2 3 4s�We need to know who you are, so please choose either:
 1. use your existing login,
 2. register as a new user,
 3. have the server generate a new password for you (and email it to you), or
 4. quit
Your selection [default 1]: s&Please choose one of the four options!s
Username: s
Password: itsubmitsServer response (%s): %si�sAI can store your PyPI login so future submissions will be faster.s (the login will be stored in %s)tXtynsSave your login (y/N)?tntyt2tusers:actiontnameR temailtconfirms
 Confirm: s!Password and confirm don't match!s
   EMail: s"You will receive an email shortly.s7Follow the instructions in it to complete registration.t3tpassword_resetsYour email address: N(R%RR tsplittannounceRtINFOt	raw_inputtgetpassR*tHTTPPasswordMgrturlparseR!tadd_passwordR"R/R0Rt_get_rc_filetlowert
_store_pypirctNoneR,(
RtchoiceRR tchoicestauththostR1R2tdata((s2/usr/lib64/python2.7/distutils/command/register.pyRds�		

				
		
	












cCs|jj}i|d6dd6|j�d6|j�d6|j�d6|j�d6|j�d6|j�d	6|j�d
6|j	�d6|j
�d6|j�d
6|j�d6|j
�d6|j�d6|j�d6|j�d6}|ds|ds|drd|d<n|S(Ns:actions1.0tmetadata_versionR<tversiontsummaryt	home_pagetauthortauthor_emailtlicensetdescriptiontkeywordstplatformRtdownload_urltprovidestrequirest	obsoletess1.1(Rtmetadatatget_nametget_versiontget_descriptiontget_urltget_contacttget_contact_emailtget_licencetget_long_descriptiontget_keywordst
get_platformstget_classifierstget_download_urltget_providestget_requirest
get_obsoletes(RtactiontmetaRQ((s2/usr/lib64/python2.7/distutils/command/register.pyR0�s,














cCs�d|kr3|jd|d|jftj�nd}d|}|d}g}x�|j�D]�\}}t|�tg�td�fkr�|g}nxl|D]d}|j|�|jd|�|jd�|j|�|r�|dd	kr�|jd
�q�q�Wq`W|j|�|jd
�g}	xC|D];}
t|
t�rd|	j|
j	d��q6|	j|
�q6Wdj
|	�}	id
|d6tt|	��d6}t
j|j|	|�}t
jt
jd|��}
d}y|
j|�}Wnjt
jk
r9}|jr$|jj�}n|j|jf}nFt
jk
r`}dt|�f}nX|jry|j�}nd}|jr�dd}|jd|||f�n|S(sC Post a query to the server, and return a string response.
        R<sRegistering %s to %ss3--------------GHSKFJDLGDS7543FJKLFHRE75642756743254s
--s--s*
Content-Disposition: form-data; name="%s"s

i����s
s
sutf-8R
s/multipart/form-data; boundary=%s; charset=utf-8sContent-typesContent-lengthtpassword_mgri�i�tOKt-iKs%s%s%s((i�Rs(RBR!RRCtitemsttypetappendt
isinstancetunicodetencodetjointstrtlenR*tRequesttbuild_openertHTTPBasicAuthHandlertopent	HTTPErrort
show_responsetfpR-R1tmsgtURLError(RRQROtboundarytsep_boundarytend_boundarytchunkstkeytvaluetbodytchunktheaderstreqtopenerR2tetdashes((s2/usr/lib64/python2.7/distutils/command/register.pyR/�s`



$






			
N(slist-classifiersNs list the valid Trove classifiers(RNsBWill stop the registering if the meta-data are not fully compliant(t__name__t
__module__RYRtuser_optionsRLtboolean_optionstsub_commandsRRRRRRRRR0R/(((s2/usr/lib64/python2.7/distutils/command/register.pyRs&
				
				{	(t__doc__t__revision__R*RERGtwarningsRtdistutils.coreRt	distutilsRR(((s2/usr/lib64/python2.7/distutils/command/register.pyt<module>sPKW[)Of.].]command/bdist_msi.pyonu�[����
{fc@sdZddlZddlZddlmZddlmZddlmZddl	m
Z
ddlmZddl
mZdd	lmZddlZdd
lmZmZmZddlmZmZmZmZdefd
��YZdefd��YZdS(s#
Implements the bdist_msi command.
i����N(tget_python_version(tCommand(tremove_tree(t
StrictVersion(tDistutilsOptionError(tlog(tget_platform(tschematsequencettext(t	DirectorytFeaturetDialogtadd_datatPyDialogcBsVeZdZd�Zd�Zddd�Zddd�Zddd	�Zd
�ZRS(s�Dialog class with a fixed layout: controls at the top, then a ruler,
    then a list of buttons: back, next, cancel. Optionally a bitmap at the
    left.cOs=tj||�|jd}|jdd||jd�dS(sbDialog(database, name, x, y, w, h, attributes, title, first,
        default, cancel, bitmap=true)i$t
BottomLineiN(Rt__init__thtlinetw(tselftargstkwtruler((s3/usr/lib64/python2.7/distutils/command/bdist_msi.pyRs
c	Cs'|jddddddd|�dS(	s,Set the title text of the dialog at the top.tTitleii
i@i<is{\VerdanaBold10}%sN(R	(Rttitle((s3/usr/lib64/python2.7/distutils/command/bdist_msi.pyR$stBackic	Cs>|rd}nd}|j|d|jddd|||�S(s�Add a back button with a given title, the tab-next button,
        its name in the Control table, possibly initially disabled.

        Return the button, so that events can be associatediii�ii8i(t
pushbuttonR(RRtnexttnametactivetflags((s3/usr/lib64/python2.7/distutils/command/bdist_msi.pytback+s	tCancelc	Cs>|rd}nd}|j|d|jddd|||�S(s�Add a cancel button with a given title, the tab-next button,
        its name in the Control table, possibly initially disabled.

        Return the button, so that events can be associatediii0ii8i(RR(RRRRRR((s3/usr/lib64/python2.7/distutils/command/bdist_msi.pytcancel6s	tNextc	Cs>|rd}nd}|j|d|jddd|||�S(s�Add a Next button with a given title, the tab-next button,
        its name in the Control table, possibly initially disabled.

        Return the button, so that events can be associatediii�ii8i(RR(RRRRRR((s3/usr/lib64/python2.7/distutils/command/bdist_msi.pyRAs	c	Cs:|j|t|j|d�|jdddd||�S(s�Add a button with a given title, the tab-next button,
        its name in the Control table, giving its x position; the
        y-position is aligned with the other buttons.

        Return the button, so that events can be associatediii8ii(RtintRR(RRRRtxpos((s3/usr/lib64/python2.7/distutils/command/bdist_msi.pytxbuttonLs(	t__name__t
__module__t__doc__RRR R"RR&(((s3/usr/lib64/python2.7/distutils/command/bdist_msi.pyRs			t	bdist_msicBs=eZdZdedfddde�fdddd	fd
eddfd
ddfdddfdddfdedfdedfdedfg
Zdd
ddgZddddd d!d"d#d$d%d&d'd(d)d*d+d,d-d.d/gZd0Zd1�Z	d2�Z
d3�Zd4�Zd5�Z
d6�Zd7�Zd8�ZRS(9s7create a Microsoft Installer (.msi) binary distributions
bdist-dir=s1temporary directory for creating the distributions
plat-name=tps;platform name to embed in generated filenames (default: %s)s	keep-temptks/keep the pseudo-installation tree around after s!creating the distribution archivestarget-version=s!require a specific python versions on the target systemsno-target-compiletcs/do not compile .py to .pyc on the target systemsno-target-optimizetos;do not compile .py to .pyo (optimized) on the target systems	dist-dir=tds-directory to put final built distributions ins
skip-builds2skip rebuilding everything (for testing/debugging)sinstall-script=sUbasename of installation script to be run after installation or before deinstallationspre-install-script=s{Fully qualified filename of a script to be run before any files are installed.  This script need not be in the distributions2.0s2.1s2.2s2.3s2.4s2.5s2.6s2.7s2.8s2.9s3.0s3.1s3.2s3.3s3.4s3.5s3.6s3.7s3.8s3.9tXcCsgd|_d|_d|_d|_d|_d|_d|_d|_d|_	d|_
d|_dS(Ni(tNonet	bdist_dirt	plat_namet	keep_temptno_target_compiletno_target_optimizettarget_versiontdist_dirt
skip_buildtinstall_scripttpre_install_scripttversions(R((s3/usr/lib64/python2.7/distutils/command/bdist_msi.pytinitialize_options~s										cCsi|jdd	�|jdkrL|jd�j}tjj|d�|_nt�}|j	rz|j
j�rz||_	n|j	r�|j	g|_|j
r�|j
j�r�|j	|kr�td|f�q�nt|j�|_|jdd
d�|jr
td�n|jr\xF|j
jD]%}|jtjj|�kr Pq q Wtd|j�nd|_dS(NtbdistR9tmsisMtarget version can only be %s, or the '--skip-build' option must be specifiedR8R3s5the pre-install-script feature is not yet implementeds(install_script '%s' not found in scripts(R9R9(R8R8(R3R3(tset_undefined_optionsR2R1tget_finalized_commandt
bdist_basetostpathtjoinRR7tdistributionthas_ext_modulesR<R9Rtlisttall_versionsR;R:tscriptstbasenametinstall_script_key(RRBt
short_versiontscript((s3/usr/lib64/python2.7/distutils/command/bdist_msi.pytfinalize_options�s8					
cCsz|js|jd�n|jddd�}|j|_|j|_d|_|jd�}d|_d|_|jj	�r�|j
}|s�tjdd!}nd|j
|f}|jd�}tjj|jd	|�|_ntjd
|j�|j�tjjdtjj|jd��|j�tjd=|j|j�|jj�}|j|�}tjj|�}tjj|�r�tj|�n|jj }|j!}	|	s�|j"}	n|	s�d}	n|j#�}
d
t$|
�j}|jj�}|j
r d|j
|f}n
d|}t%j&|t'|t%j(�||	�|_)t%j*|j)t+�d|
fg}
|j,p�|j-}|r�|
j.d|f�n|j/r�|
j.d|j/f�n|
r�t0|j)d|
�n|j1�|j2�|j3�|j4�|j)j5�t6|jd�rTd|j
p5d|f}|jj7j.|�n|j8svt9|jd|j:�ndS(Ntbuildtinstalltreinit_subcommandsiitinstall_libis.%s-%stlibsinstalling to %stPURELIBtUNKNOWNs%d.%d.%dsPython %s %ss	Python %stDistVersiont
ARPCONTACTtARPURLINFOABOUTtPropertyt
dist_filesR*tanytdry_run(;R9trun_commandtreinitialize_commandR2tprefixtwarn_dirtcompiletoptimizeRFRGR7tsystversionR3RARCRDREt
build_baset	build_libRtinfotensure_finalizedtinserttruntmkpathR8tget_fullnametget_installer_filenametabspathtexiststunlinktmetadatatauthort
maintainertget_versionRtmsilibt
init_databaseRtgen_uuidtdbt
add_tablesRtauthor_emailtmaintainer_emailtappendturlR
tadd_find_pythont	add_filestadd_scriptstadd_uitCommitthasattrR[R4RR](RRQRSR7tplat_specifierRPtfullnametinstaller_nameRrRsRetsversiontproduct_nametpropstemailttup((s3/usr/lib64/python2.7/distutils/command/bdist_msi.pyRk�s|					
%

			
	




	c
Cs�|j}tjd�}tjj|j�}t||d|dd�}t	|ddddddd�}||d	fg}x�|j
|jgD]�}d|}d|}	}
d}||jkr�d
}d}
nd|}d}
t	||	||d|
d|�}t||||||
�}|j|||f�q�W|j
�i}x�|D]�\}}}|g}xg|r�|j�}xNtj|j�D]:}tjj|j|�}tjj|�rd
|j|�|f}||}
t|||||
|�}|j|�q�|js.|j|j|d�n||kr�|j|�}||<||jkr�|jr|td|��nd||_q�q�||}t|jd|||j|d|jfg�q�WqiW|j
�qNW|j|�dS(Nt	distfilest	TARGETDIRt	SourceDirtPythont
Everythingiit	directorytsPython from another locationisPython %s from registrys%s|%ssMultiple files with name %ss[#%s]t
DuplicateFile(RyRvtCABRCRDRoR2R
R1RR<t
other_versionR}R�tpoptlistdirtabsoluteREtisdirt
make_shortt	componenttstart_componenttlogicaltadd_fileR:RLRR
tcommit(RRytcabtrootdirtroottftitemsRettargetRtdefaulttdescRtleveltdirtseentfeaturettodotfiletafiletshorttnewdirtkey((s3/usr/lib64/python2.7/distutils/command/bdist_msi.pyR�s\	
	
!
		
		
+cCs�d}x�|jD]�}d|}d|}d|}d|}d|}d|}d|}	d	|}
d
|}d|}tjr�d}
nd}
t|jd|d|d|
f|d|d|
fg�t|jd||f||fg�t|jd|d |d|df|	d!|d|df|
d"|d|dfg�t|jd|||f|	||df|
d|dfg�t|jd|||f|	||df|
d|dfg�t|jdd|dd|fg�|d7}qWdS(#ssAdds code to the installer to compute the location of Python.

        Properties PYTHON.MACHINE.X.Y and PYTHON.USER.X.Y will be set from the
        registry for each version of Python.

        Properties TARGETDIRX.Y will be set from PYTHON.USER.X.Y if defined,
        else from PYTHON.MACHINE.X.Y.

        Properties PYTHONX.Y will be set to TARGETDIRX.Y\python.exei�s)SOFTWARE\Python\PythonCore\%s\InstallPathspython.machine.spython.user.sPYTHON.MACHINE.sPYTHON.USER.tPythonFromMachinetPythonFromUsert	PythonExeR�tPYTHONiit
RegLocatorit	AppSearchtCustomActioni3it[t]s]\python.exetInstallExecuteSequencetInstallUISequencet	ConditionR�is
NOT TARGETDIRiNii3i3i3(R<RvtWin64R
RyR1(Rtstarttvertinstall_pathtmachine_regtuser_regtmachine_propt	user_proptmachine_actiontuser_actiont
exe_actionttarget_dir_proptexe_proptType((s3/usr/lib64/python2.7/distutils/command/bdist_msi.pyREsJ









			
cCsQ|jr�d}x�|j|jgD]l}d|}d|}t|jd|d||jfg�t|jd|d||fg�|d7}q#Wn|jrMtjj	|j
d	�}t|d
�}|jd�|jt|j�j
��|j�t|jdd
tj|�fg�t|jddg�t|jddg�ndS(Ni�sinstall_script.R�R�i2R�s&Python%s=3ispreinstall.batRsrem ="""
%1 %0
exit
"""
tBinaryt
PreInstallis
NOT Installedi�(R�iR�N(R�s
NOT Installedi�(R:R<R�R
RyRLR;RCRDRER2topentwritetreadtcloseRvR�R1(RR�R�tinstall_actionR�tscriptfnR�((s3/usr/lib64/python2.7/distutils/command/bdist_msi.pyR�{s,	

		


cCsA|j}d}}d}d}d}d}d}t|dd�d�d�d�d�d�g�t|dd�d�d�d�g�t|dd�d�d�d�d�g�t|d.tj�t|d/tj�t|d0||||||d1d1d1�}	|	jd2�|	jd3d1d4d�|	j	d5d6d4d�|	jd7d8d9d:d;d<d=�|	jd>d8d?d:d@d<dA�|	j
d1d5dBd1�}
|
jdCdD�t|dE||||||d1d1d1�}|jdF�|jd3d1d4d�|j	d5d6d4d�|jd7d8d9d:d;d<dG�|jd>d8d?d:d@d<dA�|j
d1d5dBd1�}
|
jdCdD�t|dH||||||d1d1d1�}|jdI�|jd3d1d4d�|j	d5d6d4d�|jdJd8dKd:d@d<dA�|j
d1d5dBd1�}
|
jdCdL�t|dM||||dN|dOdOdOdPt�}
|
jdQd8dRdSd8d<dT�|
jdJd@dUdVd@d<dW�|
jdXd@dYdZddd[�|
j
d\d]d@d^dZd_d`daddd�|
jdDdbdBdD�}
|
jdCdD�|
j
dbdOdBdb�}
|
jdCdb�|
j	dOdDdBdO�}
|
jdCdO�t|ddddZdcdd|dedd�}|jdedddVdfddg�|jdhdidjdkdlddmd�jdCdn�|jdodpdjdkdlddqd�jdCdr�|jdsddjdkdlddtd�jdCdu�|jdvdwdjdkdldd5d�jdCdx�|jdydkdjdkdlddbd�jdCdz�|jd{d|djdkdldd}d�jdCd~�|jdd�djdkdlddOd�jdCd��t|d�ddd�d�d|dmdmdm�}|jdXdfd8d�d�dd��|jdqdjd�d�d�ddqdm�}
|
jdCdD�|jdmd�d�d�d�ddmdq�}
|
jdCdL�t|d�ddd�d�||dLdLdL�}|jdXdfd8d�d�dd��|jdLd�d�d�d�ddLd�}
|
jdCdD�t|d ||||||d5d5d5�}|jdJd8d9d:d�d<d��|jd��|jd.d8d�d:d@d<d��}
|
jd.dX�|jd�d8d�d:d�d<d�}
|
jd�dX�|jd6dd4d�|j
d�dd4d�|j	d5d�}
|
jd�d��t|d&||||||d�d�d5�}|jd��|jd�d8d�dd@dd�|jj��|jd3dd4d�|j
d�d5�}
d}|
jd�d�d�|�xF|j|jgD]1}|d7}|
jd�d�|d�|d�|�q�W|
jd�d�d�|d�|
jdCdLd�|d��|j	d5d��}
|
jd�d��|j
d�d�d8d�ddidd�dd�d�}
|
jd�d��|j}d�|}d�|}|jd�d8dSdd8dd��}
|
jd�|�|
jd�|�|
jd�|�|
jd�|�|j
d�d�d8d�dd�dd�|dd�d�}
|
jd�|�|
jd�|�|
jd�|�|
jd�|�t|d�||||||d�d�d�dPt�}|jdQd8dRdSd8d<d��|jdJd@d@dVd@d<d��|jdXd@d�dZd�dd��|j
d�d�d@d�dZd�d�dd�dd�|jd�d}dd��jdCdL�t|d#||||||d�d�d5�}|jd��|jd�d8d�d�ddddgd��	}|jddd�d�d@d��|jd�dd�d�d@d��|jd6dd4d�|j
d�d5�}
|
jd�d�d�d�|
jdCdLd�d��|j	d5d��}
|
jd�d��t|d,||||||d5d5d5dPt�}|jdQd@d8dSd8d<d��|jdXd�d�dd�dd��|jd�d�d�d�d@dd��|jd.d9d�|d9d@dd��}
|
jd.dX�|j
d�d�d�diddd�dd�dd�}
|
jd�d��|jd3d�d4t�|j
d�d5d4t�|j	d5d6�jd�d��t|d)||||||d�d�d5�}|jd��|jd�d8d�dZdwdd��|jd�d8d�dZd�dddgd��	}|jddd�dSd�d��|jd�dd�dSd�d��|jd3dd4t�|j
d1d5�}
|
jd�dd�d��|
jd�d�d�dR�|
jd�d�d�d`�|
jd�dd�d�|
jd�dd�d��|
jd�d�d�d��|
jd�d�d�d��|
jd�dd�d��|
jdCdLd�d@�|j	d5d��jd�d��dS(�Ni2iri,s[ProductName] SetupiiRZt
DefaultUIFonttDlgFont8tErrorDialogtErrorDlgt	Progress1tInstallt	Progress2tinstallstMaintenanceForm_ActiontRepairt
WhichUserstALLt	TextStyletTahomai	itDlgFontBold8it
VerdanaBold10tVerdanai
tVerdanaRed9i�R�t
PrepareDlgs(Not Privileged or Windows9x or Installedi�t
WhichUsersDlgs.Privileged and not Windows9x and not Installedi�tSelectFeaturesDlgs
Not Installedi�tMaintenanceTypeDlgs,Installed AND NOT RESUME AND NOT Preselectedi�tProgressDlgit
ActionTexttUITextt
FatalErrortFinishs)[ProductName] Installer ended prematurelys< BackRR!RtDescription1iiFi@iPis�[ProductName] setup ended prematurely because of an error.  Your system has not been modified.  To install this program at a later time, please run the installation again.tDescription2i�is.Click the Finish button to exit the Installer.Rt	EndDialogtExittUserExits'[ProductName] Installer was interrupteds�[ProductName] setup was interrupted.  Your system has not been modified.  To install this program at a later time, please run the installation again.t
ExitDialogs&Completing the [ProductName] InstallertDescriptioni�tReturnt
FilesInUseitRetrytbitmapRii�s{\DlgFontBold8}Files in Useiis8Some files that need to be updated are currently in use.tTexti7iJs�The following applications are using files that need to be updated by this setup. Close these applications and then click Retry to continue the installation or Cancel to exit it.tListtListBoxiki�itFileInUseProcesstIgnoreieit	ErrorTexti0R�tNixiHiQitNotErrorNotYi�tYestErrorYestAtAbortt
ErrorAborttCi*tErrorCanceltItErrorIgnoretOi�tOktErrorOktRi�t
ErrorRetryt	CancelDlgiiUi�is;Are you sure you want to cancel [ProductName] installation?i9i8ii�tWaitForCostingDlgsRPlease wait while the installer finishes determining your disk space requirements.ifi(sOPlease wait while the Installer prepares to guide you through the installation.s&Welcome to the [ProductName] InstallerinsPondering...t
ActionDatai�R#tSpawnDialogsSelect Python InstallationstHints9Select the Python locations where %s should be installed.sNext >s[TARGETDIR]s[SourceDir]torderings
[TARGETDIR%s]s FEATURE_SELECTED AND &Python%s=3tSpawnWaitDialogitFeaturest
SelectionTreei<tFEATUREtPathEdits[FEATURE_SELECTED]t1s!FEATURE_SELECTED AND &Python%s<>3tOthers$Provide an alternate Python locationtEnabletShowtDisabletHidei�iR�tDiskCostDlgtOKs&{\DlgFontBold8}Disk Space RequirementssFThe disk space required for the installation of the selected features.i5sThe highlighted volumes (if any) do not have enough disk space available for the currently selected features.  You can either remove some files from the highlighted volumes, or choose to install less features onto local drive(s), or select different destination drive(s).t
VolumeListtVolumeCostListidi�is{120}{70}{70}{70}{70}g�?tAdminInstallsGSelect whether to install [ProductName] for all users of this computer.isInstall for all userstJUSTMEisInstall just for mes
[ALLUSERS]sWhichUsers="ALL"s({\DlgFontBold8}[Progress1] [ProductName]i#iAsYPlease wait while the Installer [Progress2] [ProductName]. This may take several minutes.tStatusLabelsStatus:tProgressBaris
Progress donetSetProgresstProgresss)Welcome to the [ProductName] Setup WizardtBodyTexti?s:Select whether you want to repair or remove [ProductName].tRepairRadioGroupilis&Repair [ProductName]tRemovei$sRe&move [ProductName]s[REINSTALL]sMaintenanceForm_Action="Repair"s[Progress1]t	Repairings[Progress2]trepairst	Reinstalls[REMOVE]sMaintenanceForm_Action="Remove"itRemovingitremovesi
is MaintenanceForm_Action<>"Change"(R�R�(R�R�(R�R�(R�R�(R�R�(R�R�(R�R�i	Ni(R�R�iNi(R�R�i
Ni(R�R�i	i�i(R�s(Not Privileged or Windows9x or Installedi�(R�s.Privileged and not Windows9x and not Installedi�(R�s
Not Installedi�(R�s,Installed AND NOT RESUME AND NOT Preselectedi�(R�Ni(RyR
R1R	R�R�RRR R"RteventtFalsetcontrolRRtmappingRFRmR<R�t	conditionR&t
radiogrouptadd(RRytxtyRRRtmodaltmodelesstfatalR-t	user_exittexit_dialogtinuseterrorR"tcostingtpreptseldlgtorderReR�tinstall_other_condtdont_install_other_condtcostt
whichuserstgtprogresstmaint((s3/usr/lib64/python2.7/distutils/command/bdist_msi.pyR��s�	
	
	
	



	
	.......$$$
!!


	

	"

%
cCsT|jr%d||j|jf}nd||jf}tjj|j|�}|S(Ns%s.%s-py%s.msis	%s.%s.msi(R7R3RCRDRER8(RR�t	base_nameR�((s3/usr/lib64/python2.7/distutils/command/bdist_msi.pyRn�s	(R'R(tdescriptionR1Rtuser_optionstboolean_optionsRIR�R=RORkR�RR�R�Rn(((s3/usr/lib64/python2.7/distutils/command/bdist_msi.pyR*TsP
			
	)	[	6	6	&	�>(R)RdRCt	sysconfigRtdistutils.coreRtdistutils.dir_utilRtdistutils.versionRtdistutils.errorsRt	distutilsRtdistutils.utilRRvRRR	R
RRR
RR*(((s3/usr/lib64/python2.7/distutils/command/bdist_msi.pyt<module>s"=PKW[���command/install_lib.pyonu�[����
{fc@s�dZdZddlZddlZddlmZddlmZeed�rcej	dZ
ndZ
d	efd
��YZdS(skdistutils.command.install_lib

Implements the Distutils 'install_lib' command
(install all Python modules).s$Id$i����N(tCommand(tDistutilsOptionErrortextseptpys.pytinstall_libc	Bs�eZdZddd d!d#d$d%gZdd
dgZid
d
6Zd�Zd�Zd�Z	d�Z
d�Zd�Zd�Z
d�Zd�Zd�ZRS(&s7install all Python modules (extensions and pure Python)sinstall-dir=tdsdirectory to install tos
build-dir=tbs'build directory (where to install from)tforcetfs-force installation (overwrite existing files)tcompiletcscompile .py to .pyc [default]s
no-compilesdon't compile .py filess	optimize=tOslalso compile with optimization: -O1 for "python -O", -O2 for "python -OO", and -O0 to disable [default: -O0]s
skip-buildsskip the build stepscCs:d|_d|_d|_d|_d|_d|_dS(Ni(tNonetinstall_dirt	build_dirRR	toptimizet
skip_build(tself((s5/usr/lib64/python2.7/distutils/command/install_lib.pytinitialize_options7s					c	Cs�|jddddddd�|jdkr:d
|_n|jdkrUd|_nt|jt�s�y.t|j�|_|jdkr�t�nWq�ttfk
r�td
�q�XndS(Ntinstallt	build_libRRR
RR	RRiiisoptimize must be 0, 1, or 2(RR(RR
(RR(R	R	(RR(RR(iii(	tset_undefined_optionsR	RRt
isinstancetinttAssertionErrort
ValueErrorR(R((s5/usr/lib64/python2.7/distutils/command/install_lib.pytfinalize_options@s$	
cCsE|j�|j�}|dk	rA|jj�rA|j|�ndS(N(tbuildRRtdistributionthas_pure_modulestbyte_compile(Rtoutfiles((s5/usr/lib64/python2.7/distutils/command/install_lib.pytrunZs
cCsN|jsJ|jj�r(|jd�n|jj�rJ|jd�qJndS(Ntbuild_pyt	build_ext(RRRtrun_commandthas_ext_modules(R((s5/usr/lib64/python2.7/distutils/command/install_lib.pyRjs
	cCsLtjj|j�r0|j|j|j�}n|jd|j�dS|S(Ns3'%s' does not exist -- no Python modules to install(tostpathtisdirRt	copy_treeR
twarn(RR((s5/usr/lib64/python2.7/distutils/command/install_lib.pyRqs	cCs�tjr|jd�dSddlm}|jd�j}|jrp||ddd|jd|d	|j	�n|j
dkr�||d|j
d|jd|d
|jd	|j	�ndS(Ns%byte-compiling is disabled, skipping.i����(RRRiRtprefixtdry_runtverbose(tsystdont_write_bytecodeR)tdistutils.utilRtget_finalized_commandtrootR	RR+RR,(RtfilesRtinstall_root((s5/usr/lib64/python2.7/distutils/command/install_lib.pyRzs	
	
c
Cs�|s
gS|j|�}|j�}t||�}t|�ttj�}g}x.|D]&}	|jtjj||	|��qZW|S(N(	R0tget_outputstgetattrtlenR%tseptappendR&tjoin(
Rthas_anyt	build_cmdt
cmd_optiont
output_dirtbuild_filesRt
prefix_lentoutputstfile((s5/usr/lib64/python2.7/distutils/command/install_lib.pyt_mutate_outputs�s
$cCs�g}x�|D]z}tjjtjj|��d}|tkrGq
n|jrd|j|d�n|jdkr
|j|d�q
q
W|S(NiR
ito(R%R&tsplitexttnormcasetPYTHON_SOURCE_EXTENSIONR	R8R(Rtpy_filenamestbytecode_filestpy_filetext((s5/usr/lib64/python2.7/distutils/command/install_lib.pyt_bytecode_filenames�s
"	cCsu|j|jj�dd|j�}|jr?|j|�}ng}|j|jj�dd|j�}|||S(s�Return the list of files that would be installed if this command
        were actually run.  Not affected by the "dry-run" flag or whether
        modules have actually been built yet.
        R!RR"(RBRRR
R	RKR$(Rtpure_outputstbytecode_outputstext_outputs((s5/usr/lib64/python2.7/distutils/command/install_lib.pyR4�s	cCsrg}|jj�r:|jd�}|j|j��n|jj�rn|jd�}|j|j��n|S(s�Get the list of files that are input to this command, ie. the
        files that get installed as they are named in the build tree.
        The files in this list correspond one-to-one to the output
        filenames returned by 'get_outputs()'.
        R!R"(RRR0textendR4R$(RtinputsR!R"((s5/usr/lib64/python2.7/distutils/command/install_lib.pyt
get_inputs�s(sinstall-dir=Rsdirectory to install to(s
build-dir=Rs'build directory (where to install from)(RRs-force installation (overwrite existing files)(R	R
scompile .py to .pyc [default]N(s
no-compileNsdon't compile .py files(s	optimize=Rslalso compile with optimization: -O1 for "python -O", -O2 for "python -OO", and -O0 to disable [default: -O0](s
skip-buildNsskip the build steps(t__name__t
__module__tdescriptionRtuser_optionstboolean_optionstnegative_optRRR RRRRBRKR4RQ(((s5/usr/lib64/python2.7/distutils/command/install_lib.pyRs*	
											(t__doc__t__revision__R%R-tdistutils.coreRtdistutils.errorsRthasattrRRFR(((s5/usr/lib64/python2.7/distutils/command/install_lib.pyt<module>sPKW[��Z}}command/build_scripts.pycnu�[����
{fc@s�dZdZddlZddlZddlmZddlmZddlm	Z	ddl
mZddlm
Z
ejd	�Zd
efd��YZdS(sRdistutils.command.build_scripts

Implements the Distutils 'build_scripts' command.s$Id$i����N(tST_MODE(tCommand(tnewer(tconvert_path(tlogs^#!.*python[0-9.]*([ 	].*)?$t
build_scriptscBsSeZdZdddgZdgZd
�Zd�Zd�Zd
�Zd�Z	RS(s("build" scripts (copy and fixup #! line)s
build-dir=tdsdirectory to "build" (copy) totforcetfs1forcibly build everything (ignore file timestampssexecutable=tes*specify final destination interpreter pathcCs1d|_d|_d|_d|_d|_dS(N(tNonet	build_dirtscriptsRt
executabletoutfiles(tself((s7/usr/lib64/python2.7/distutils/command/build_scripts.pytinitialize_optionss
				cCs)|jdddd�|jj|_dS(	NtbuildRRRR
(RR(RR(R
R
(tset_undefined_optionstdistributionR(R((s7/usr/lib64/python2.7/distutils/command/build_scripts.pytfinalize_options%s
	cCs|jS(N(R(R((s7/usr/lib64/python2.7/distutils/command/build_scripts.pytget_source_files,scCs|js
dS|j�dS(N(Rtcopy_scripts(R((s7/usr/lib64/python2.7/distutils/command/build_scripts.pytrun/s	c	Cs�td�}|j|j�g}x|jD]}d}t|�}tjj|jtjj|��}|j	|�|j
r�t||�r�tj
d|�q,nyt|d�}Wn&tk
r�|js��nd}n]X|j�}|s
|jd|�q,ntj|�}|r=d}|jd�p7d}	n|rtjd||j�|jst|d	�}
|j�s�|
jd
|j|	f�nK|
jd
tjj|jd�d|jd
�|jd�f�|	f�|
j|j��|
j�n|r>|j�q>q,|r.|j�n|j||�q,Wtj dkr�x�|D]|}|jrztjd|�qXtj!|�t"d@}|dBd@}
|
|krXtjd|||
�tj#||
�qXqXWndS(s"Copy each script listed in 'self.scripts'; if it's marked as a
        Python script in the Unix way (first line matches 'first_line_re',
        ie. starts with "\#!" and contains "python"), then adjust the first
        line to refer to the current Python interpreter as we copy.
        t	sysconfigisnot copying %s (up-to-date)trs%s is an empty file (skipping)itscopying and adjusting %s -> %stws#!%s%s
tBINDIRs
python%s%stVERSIONtEXEtposixschanging mode of %si�ims!changing mode of %s from %o to %oN($t
__import__tmkpathRRRtostpathtjointbasenametappendRRRtdebugtopentIOErrortdry_runR
treadlinetwarnt
first_line_retmatchtgrouptinfotis_python_buildtwriteR
tget_config_vart
writelinest	readlinestcloset	copy_filetnametstatRtchmod(Rt
_sysconfigRtscripttadjusttoutfileRt
first_lineR.tpost_interptoutftfiletoldmodetnewmode((s7/usr/lib64/python2.7/distutils/command/build_scripts.pyR5sr$

	

				


		
(s
build-dir=Rsdirectory to "build" (copy) to(RRs1forcibly build everything (ignore file timestamps(sexecutable=R	s*specify final destination interpreter path(
t__name__t
__module__tdescriptiontuser_optionstboolean_optionsRRRRR(((s7/usr/lib64/python2.7/distutils/command/build_scripts.pyRs						(t__doc__t__revision__R"treR9Rtdistutils.coreRtdistutils.dep_utilRtdistutils.utilRt	distutilsRtcompileR-R(((s7/usr/lib64/python2.7/distutils/command/build_scripts.pyt<module>sPKW[���t..command/install_data.pycnu�[����
{fc@sXdZdZddlZddlmZddlmZmZdefd��YZdS(s�distutils.command.install_data

Implements the Distutils 'install_data' command, for installing
platform-independent data files.s$Id$i����N(tCommand(tchange_roottconvert_pathtinstall_datacBsSeZdZdddgZdgZd	�Zd
�Zd�Zd�Z	d
�Z
RS(sinstall data filessinstall-dir=tdsIbase directory for installing data files (default: installation base dir)sroot=s<install everything relative to this alternate root directorytforcetfs-force installation (overwrite existing files)cCs@d|_g|_d|_d|_|jj|_d|_dS(Nii(tNonetinstall_dirtoutfilestrootRtdistributiont
data_filestwarn_dir(tself((s6/usr/lib64/python2.7/distutils/command/install_data.pytinitialize_optionss				cCs|jdddd�dS(	NtinstallRRR
R(RR(R
R
(RR(tset_undefined_options(R((s6/usr/lib64/python2.7/distutils/command/install_data.pytfinalize_options%s	cCsk|j|j�xT|jD]I}t|t�r�t|�}|jra|jd||jf�n|j||j�\}}|j	j
|�qt|d�}tjj
|�s�tjj|j|�}n|jr�t|j|�}n|j|�|dgkr|j	j
|�qxF|dD]:}t|�}|j||�\}}|j	j
|�q%WqWdS(NsMsetup script did not provide a directory for '%s' -- installing right in '%s'ii(tmkpathRRt
isinstancetstrRR
twarnt	copy_fileR	tappendtostpathtisabstjoinR
R(RRtoutt_tdirtdata((s6/usr/lib64/python2.7/distutils/command/install_data.pytrun,s*			
cCs
|jpgS(N(R(R((s6/usr/lib64/python2.7/distutils/command/install_data.pyt
get_inputsMscCs|jS(N(R	(R((s6/usr/lib64/python2.7/distutils/command/install_data.pytget_outputsPs(sinstall-dir=RsIbase directory for installing data files (default: installation base dir)N(sroot=Ns<install everything relative to this alternate root directory(RRs-force installation (overwrite existing files)(t__name__t
__module__tdescriptionRtuser_optionstboolean_optionsRRR!R"R#(((s6/usr/lib64/python2.7/distutils/command/install_data.pyRs					!	(	t__doc__t__revision__Rtdistutils.coreRtdistutils.utilRRR(((s6/usr/lib64/python2.7/distutils/command/install_data.pyt<module>s
PKW[�D9%�D�Dcommand/bdist_rpm.pycnu�[����
{fc@s�dZdZddlZddlZddlZddlmZddlmZddl	m
Z
ddlmZddl
mZmZmZmZdd	lmZd
efd��YZdS(swdistutils.command.bdist_rpm

Implements the Distutils 'bdist_rpm' command (create RPM source and binary
distributions).s$Id$i����N(tCommand(tDEBUG(t
write_file(tget_python_version(tDistutilsOptionErrortDistutilsPlatformErrortDistutilsFileErrortDistutilsExecError(tlogt	bdist_rpmc+Bs�eZdZd^d_d`dadbdcdddedfdgdhdidjdkdldmdndodpdqdrdsdtdudvdwdxdydzd{d|d}d~dd�d�d�d�d�d�d�g)Zd2d7d;d0dSgZid2d56d7d96d;d=6ZdV�ZdW�ZdX�Z	dY�Z
dZ�Zd[�Zd\�Z
RS(�screate an RPM distributionsbdist-base=s/base directory for creating built distributionss	rpm-base=sdbase directory for creating RPMs (defaults to "rpm" under --bdist-base; must be specified for RPM 2)s	dist-dir=tdsDdirectory to put final RPM files in (and .spec files if --spec-only)spython=sMpath to Python interpreter to hard-code in the .spec file (default: "python")s
fix-pythonsLhard-code the exact path to the current Python interpreter in the .spec files	spec-onlysonly regenerate spec filessource-onlysonly generate source RPMsbinary-onlysonly generate binary RPMs	use-bzip2s7use bzip2 instead of gzip to create source distributionsdistribution-name=sgname of the (Linux) distribution to which this RPM applies (*not* the name of the module distribution!)sgroup=s9package classification [default: "Development/Libraries"]srelease=sRPM release numbersserial=sRPM serial numbersvendor=saRPM "vendor" (eg. "Joe Blow <joe@example.com>") [default: maintainer or author from setup script]s	packager=sBRPM packager (eg. "Jane Doe <jane@example.net>") [default: vendor]s
doc-files=s6list of documentation files (space or comma-separated)s
changelog=s
RPM changelogsicon=sname of icon files	provides=s%capabilities provided by this packages	requires=s%capabilities required by this packages
conflicts=s-capabilities which conflict with this packagesbuild-requires=s+capabilities required to build this packages
obsoletes=s*capabilities made obsolete by this packages
no-autoreqs+do not automatically calculate dependenciess	keep-temptks"don't clean up RPM build directorysno-keep-temps&clean up RPM build directory [default]suse-rpm-opt-flagss8compile with RPM_OPT_FLAGS when building from source RPMsno-rpm-opt-flagss&do not pass any RPM CFLAGS to compilers	rpm3-modes"RPM 3 compatibility mode (default)s	rpm2-modesRPM 2 compatibility modesprep-script=s3Specify a script for the PREP phase of RPM buildings
build-script=s4Specify a script for the BUILD phase of RPM buildingspre-install=s:Specify a script for the pre-INSTALL phase of RPM buildingsinstall-script=s6Specify a script for the INSTALL phase of RPM buildings
post-install=s;Specify a script for the post-INSTALL phase of RPM buildingspre-uninstall=s<Specify a script for the pre-UNINSTALL phase of RPM buildingspost-uninstall=s=Specify a script for the post-UNINSTALL phase of RPM buildings
clean-script=s4Specify a script for the CLEAN phase of RPM buildingsverify-script=s6Specify a script for the VERIFY phase of the RPM buildsforce-arch=s0Force an architecture onto the RPM build processtquiettqs3Run the INSTALL phase of RPM building in quiet modecCscd|_d|_d|_d|_d|_d|_d|_d|_d|_	d|_
d|_d|_d|_
d|_d|_d|_d|_d|_d|_d|_d|_d|_d|_d|_d|_d|_d|_d|_d|_d|_d|_d|_ d|_!d|_"d|_#d|_$d|_%d|_&d|_'dS(Nii((tNonet
bdist_basetrpm_basetdist_dirtpythont
fix_pythont	spec_onlytbinary_onlytsource_onlyt	use_bzip2tdistribution_nametgrouptreleasetserialtvendortpackagert	doc_filest	changelogticontprep_scripttbuild_scripttinstall_scripttclean_scriptt
verify_scripttpre_installtpost_installt
pre_uninstalltpost_uninstalltpreptprovidestrequirest	conflictstbuild_requirest	obsoletest	keep_temptuse_rpm_opt_flagst	rpm3_modet
no_autoreqt
force_archR(tself((s3/usr/lib64/python2.7/distutils/command/bdist_rpm.pytinitialize_options�sN																																						cCs|jdd�|jdkrR|js4td�ntjj|jd�|_n|j	dkr�|j
rytj|_	q�d|_	n|j
r�td�ntj
dkr�tdtj
�n|jr�|jr�td	�n|jj�s�d
|_n|jdd
�|j�dS(NtbdistRs)you must specify --rpm-base in RPM 2 modetrpmRs8--python and --fix-python are mutually exclusive optionstposixs9don't know how to create RPM distributions on platform %ss6cannot supply both '--source-only' and '--binary-only'iR(RR(RR(tset_undefined_optionsRRR2RtostpathtjoinRRRtsyst
executabletnameRRRtdistributionthas_ext_modulesR1tfinalize_package_data(R5((s3/usr/lib64/python2.7/distutils/command/bdist_rpm.pytfinalize_options�s0					
	cCs�|jdd�|jdd|jj�|jj�f�|jd�|jd�t|jt�r�xEdD]:}tj	j
|�ro||jkro|jj|�qoqoWn|jd	d
�|jd�|jd�|jd
�|j|j
�|_
|jd�|jd�|jd�|jd�|jd�|jd�|jd�|jd�|jd�|jd�|jd�|jd�|jd�|jd�|jd�|jd�dS(NRsDevelopment/LibrariesRs%s <%s>RRtREADMEs
README.txtRt1RRRR R!R"R#R$R%R&R'R(R)R+R,R-R.R/R4(REs
README.txt(t
ensure_stringRAtget_contacttget_contact_emailtensure_string_listt
isinstanceRtlistR;R<texiststappendt_format_changelogRtensure_filename(R5treadme((s3/usr/lib64/python2.7/distutils/command/bdist_rpm.pyRC�s>	


!

















cCs tr>dGHdG|jGHdG|jGHdG|jGHdG|jGHn|jr`|j}|j|�nNi}x;d(D]3}tj	j
|j|�||<|j||�qmW|d}tj	j
|d|jj
��}|jt||j�fd|�|jrdS|jj}|jd
�}|jr4dg|_ndg|_|jd
�||j_|j�d}|d}|j||�|jr�tj	j|j�r�|j|j|�q�td|j�ntjd�dg}	tj	jd�stj	jd�rdg}	n|jr)|	jd�n&|jrB|	jd�n
|	jd�|j r�|	j!ddtj	j"|j�g�n|j#s�|	jd�n|j$r�|	jd�n|	j|�d}
|
d}d |
d!}d"|||f}
tj%|
�}z�g}d}xt|j'�}|s(Pnt(j)t(j*|��}t+|�d#ksXt,�|j|d$�|dkr|d}qqW|j-�}|r�t.d%t/|
���nWd|j-�X|j0|	�|j1s|jj2�r�t3�}nd&}|js{tj	j
|d
|�}tj	j|�s1t,�|j4||j�tj	j
|j|�}|jjjd'||f�n|jsx�|D]�}tj	j
|d	|�}tj	j|�r�|j4||j�tj	j
|jtj	j5|��}|jjjd'||f�q�q�WqndS()Nsbefore _get_package_data():svendor =s
packager =sdoc_files =schangelog =tSOURCEStSPECStBUILDtRPMStSRPMSs%s.specswriting '%s'tsdisttbztartgztarisicon file '%s' does not exists
building RPMsR8s/usr/bin/rpmbuilds
/bin/rpmbuildtrpmbuilds-bss-bbs-bas--defines
_topdir %ss--cleans--quiets%{name}-%{version}-%{release}s.src.rpms%{arch}/s.%{arch}.rpms%rpm -q --qf '%s %s\n' --specfile '%s'iisFailed to execute: %stanyR	(RRRSRTRURV(6RRRRRRRtmkpathR;R<R=RRAtget_nametexecuteRt_make_spec_filet
dist_filestreinitialize_commandRtformatstrun_commandtget_archive_filest	copy_fileR RMRRtinfoRRNRR2textendtabspathR0RtpopenRtreadlinetstringtsplittstriptlentAssertionErrortcloseRtreprtspawntdry_runRBRt	move_filetbasename(R5tspec_dirtrpm_dirR
t	spec_pathtsaved_dist_filesRWtsourcet
source_dirtrpm_cmdt
nvr_stringtsrc_rpmtnon_src_rpmtq_cmdtouttbinary_rpmst
source_rpmtlinetltstatust	pyversiontsrpmtfilenameR8((s3/usr/lib64/python2.7/distutils/command/bdist_rpm.pytruns�		

		
	

	
			
		 		


			
cCs"tjj|jtjj|��S(N(R;R<R=RRu(R5R<((s3/usr/lib64/python2.7/distutils/command/bdist_rpm.pyt
_dist_path�scCs�d|jj�d|jj�jdd�d|jj�d|jjdd�dd|jj�g}|jd	d
dg�|jr�|jd�n
|jd
�|jd|jj	�d|j
ddg�|js�|jj�s|jd�qn|jd|j�x~dBD]v}t
|tj|��}t|t�rj|jd|tj|�f�q|dCk	r|jd||f�qqW|jj�dkr�|jd|jj��n|jr�|jd|j�n|jr|jdtj|j��n|jr;|jdtjj|j��n|jrT|jd �n|jdd!|jj�g�d"|jtjjtjd#�f}d$|}|j r�d%|}nd&|}dDd*d+|fd,d-|fdEdFdGdHdIdJg	}x�|D]�\}}	}
t
||	�}|s'|
r�|jdd;|g�|ro|jtj!t"|d<�j#�d=��q|j|
�q�q�W|jdd>d?g�|j$r�|jd@tj|j$��n|j%r�|jddAg�|j|j%�n|S(KsiGenerate the text of an RPM spec file and return it as a
        list of strings (one per line).
        s
%define name s%define version t-t_s%define unmangled_version s%define release ts	Summary: s
Name: %{name}sVersion: %{version}sRelease: %{release}s-Source0: %{name}-%{unmangled_version}.tar.bz2s,Source0: %{name}-%{unmangled_version}.tar.gzs	License: sGroup: s>BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildrootsPrefix: %{_prefix}sBuildArch: noarchs
BuildArch: %stVendortPackagertProvidestRequirest	Conflictst	Obsoletess%s: %stUNKNOWNsUrl: sDistribution: sBuildRequires: sIcon: s
AutoReq: 0s%descriptions%s %sis%s buildsenv CFLAGS="$RPM_OPT_FLAGS" s>%s install -O1 --root=$RPM_BUILD_ROOT --record=INSTALLED_FILESR*R!s&%setup -n %{name}-%{unmangled_version}tbuildR"tinstallR#tcleanR$srm -rf $RPM_BUILD_ROOTtverifyscriptR%tpreR&tpostR'tpreunR(tpostunR)t%trs
s%files -f INSTALLED_FILESs%defattr(-,root,root)s%doc s
%changelog(R�R�R�R�R�R�N(R*R!s&%setup -n %{name}-%{unmangled_version}(R�R$srm -rf $RPM_BUILD_ROOT(R�R%N(R�R&N(R�R'N(R�R(N(R�R)N(&RAR]tget_versiontreplaceRtget_descriptionRgRRNtget_licenseRR4RBtgetattrRktlowerRKRLR=Rtget_urlRR.R R;R<RuR3tget_long_descriptionRR>targvR1RltopentreadRR(R5t	spec_filetfieldtvaltdef_setup_callt	def_buildtinstall_cmdtscript_optionstrpm_opttattrtdefault((s3/usr/lib64/python2.7/distutils/command/bdist_rpm.pyR_�s�

	


	
#				#	&
	
	+
	 	
cCs�|s
|Sg}x�tjtj|�d�D]l}tj|�}|ddkrg|jd|g�q,|ddkr�|j|�q,|jd|�q,W|ds�|d=n|S(sKFormat the changelog correctly and convert it to a list of strings
        s
it*R�R�s  (RkRlRmRgRN(R5Rt
new_changelogR�((s3/usr/lib64/python2.7/distutils/command/bdist_rpm.pyRO5s"

N(sbdist-base=Ns/base directory for creating built distributions(s	rpm-base=Nsdbase directory for creating RPMs (defaults to "rpm" under --bdist-base; must be specified for RPM 2)(s	dist-dir=R
sDdirectory to put final RPM files in (and .spec files if --spec-only)(spython=NsMpath to Python interpreter to hard-code in the .spec file (default: "python")(s
fix-pythonNsLhard-code the exact path to the current Python interpreter in the .spec file(s	spec-onlyNsonly regenerate spec file(ssource-onlyNsonly generate source RPM(sbinary-onlyNsonly generate binary RPM(s	use-bzip2Ns7use bzip2 instead of gzip to create source distribution(sdistribution-name=Nsgname of the (Linux) distribution to which this RPM applies (*not* the name of the module distribution!)(sgroup=Ns9package classification [default: "Development/Libraries"](srelease=NsRPM release number(sserial=NsRPM serial number(svendor=NsaRPM "vendor" (eg. "Joe Blow <joe@example.com>") [default: maintainer or author from setup script](s	packager=NsBRPM packager (eg. "Jane Doe <jane@example.net>") [default: vendor](s
doc-files=Ns6list of documentation files (space or comma-separated)(s
changelog=Ns
RPM changelog(sicon=Nsname of icon file(s	provides=Ns%capabilities provided by this package(s	requires=Ns%capabilities required by this package(s
conflicts=Ns-capabilities which conflict with this package(sbuild-requires=Ns+capabilities required to build this package(s
obsoletes=Ns*capabilities made obsolete by this package(s
no-autoreqNs+do not automatically calculate dependencies(s	keep-tempRs"don't clean up RPM build directory(sno-keep-tempNs&clean up RPM build directory [default](suse-rpm-opt-flagsNs8compile with RPM_OPT_FLAGS when building from source RPM(sno-rpm-opt-flagsNs&do not pass any RPM CFLAGS to compiler(s	rpm3-modeNs"RPM 3 compatibility mode (default)(s	rpm2-modeNsRPM 2 compatibility mode(sprep-script=Ns3Specify a script for the PREP phase of RPM building(s
build-script=Ns4Specify a script for the BUILD phase of RPM building(spre-install=Ns:Specify a script for the pre-INSTALL phase of RPM building(sinstall-script=Ns6Specify a script for the INSTALL phase of RPM building(s
post-install=Ns;Specify a script for the post-INSTALL phase of RPM building(spre-uninstall=Ns<Specify a script for the pre-UNINSTALL phase of RPM building(spost-uninstall=Ns=Specify a script for the post-UNINSTALL phase of RPM building(s
clean-script=Ns4Specify a script for the CLEAN phase of RPM building(sverify-script=Ns6Specify a script for the VERIFY phase of the RPM build(sforce-arch=Ns0Force an architecture onto the RPM build process(RR
s3Run the INSTALL phase of RPM building in quiet mode(t__name__t
__module__tdescriptionRtuser_optionstboolean_optionstnegative_optR6RDRCR�R�R_RO(((s3/usr/lib64/python2.7/distutils/command/bdist_rpm.pyR	s�		

	0	"	/	�		�(t__doc__t__revision__R>R;Rktdistutils.coreRtdistutils.debugRtdistutils.file_utilRtdistutils.sysconfigRtdistutils.errorsRRRRt	distutilsRR	(((s3/usr/lib64/python2.7/distutils/command/bdist_rpm.pyt<module>s"PKW[q+g��command/install_headers.pycnu�[����
{fc@s6dZdZddlmZdefd��YZdS(s�distutils.command.install_headers

Implements the Distutils 'install_headers' command, to install C/C++ header
files to the Python include directory.s$Id$i����(tCommandtinstall_headerscBsPeZdZdd
gZdgZd�Zd�Zd	�Zd
�Zd�Z	RS(sinstall C/C++ header filessinstall-dir=tds$directory to install header files totforcetfs-force installation (overwrite existing files)cCsd|_d|_g|_dS(Ni(tNonetinstall_dirRtoutfiles(tself((s9/usr/lib64/python2.7/distutils/command/install_headers.pytinitialize_optionss		cCs|jddd�dS(NtinstallRRR(RR(RR(tset_undefined_options(R((s9/usr/lib64/python2.7/distutils/command/install_headers.pytfinalize_optionss	cCsf|jj}|sdS|j|j�x9|D]1}|j||j�\}}|jj|�q-WdS(N(tdistributiontheaderstmkpathRt	copy_fileRtappend(RRtheadertoutt_((s9/usr/lib64/python2.7/distutils/command/install_headers.pytrun#s
cCs|jjpgS(N(R
R(R((s9/usr/lib64/python2.7/distutils/command/install_headers.pyt
get_inputs-scCs|jS(N(R(R((s9/usr/lib64/python2.7/distutils/command/install_headers.pytget_outputs0s(sinstall-dir=Rs$directory to install header files to(RRs-force installation (overwrite existing files)(
t__name__t
__module__tdescriptiontuser_optionstboolean_optionsR	RRRR(((s9/usr/lib64/python2.7/distutils/command/install_headers.pyRs					
	N(t__doc__t__revision__tdistutils.coreRR(((s9/usr/lib64/python2.7/distutils/command/install_headers.pyt<module>sPKW["�1�1command/config.pycnu�[����
{fc@s�dZdZddlZddlZddlmZddlmZddlm	Z	ddl
mZidd	6d
d6Zdefd
��YZ
ed�ZdS(s�distutils.command.config

Implements the Distutils 'config' command, a (mostly) empty command class
that exists mainly to be sub-classed by specific module distributions and
applications.  The idea is that while every "config" command is different,
at least they're all named the same, and users always see "config" in the
list of standard commands.  Also, this is a good place to put common
configure-like tasks: "try to compile this C code", or "figure out where
this header file lives".
s$Id$i����N(tCommand(tDistutilsExecError(tcustomize_compiler(tlogs.ctcs.cxxsc++tconfigcBs.eZdZd,d-d.d/d0d1d2d3d4g	Zd�Zd�Zd�Zd�Zd�Z	d�Z
d�Zd�Zd �Z
d+d+d+d!d"�Zd+d+d+d!d#�Zd+d+d!d$�Zd+d+d+d+d!d%�Zd+d+d+d+d!d&�Zd+d+d+d+d'd'd(�Zd+d+d+gd)�Zd+d+d!d*�ZRS(5sprepare to builds	compiler=sspecify the compiler typescc=sspecify the compiler executables
include-dirs=tIs.list of directories to search for header filessdefine=tDsC preprocessor macros to definesundef=tUs!C preprocessor macros to undefines
libraries=tls!external C libraries to link withs
library-dirs=tLs.directories to search for external C librariestnoisys1show every action (compile, link, run, ...) takensdump-sources=dump generated source files before attempting to compile themcCsLd|_d|_d|_d|_d|_d|_d|_g|_dS(Ni(	tNonetcompilertcctinclude_dirst	librariestlibrary_dirsRtdump_sourcet
temp_files(tself((s0/usr/lib64/python2.7/distutils/command/config.pytinitialize_options6s							cCs�|jdkr'|jjpg|_n-t|jt�rT|jjtj�|_n|jdkrog|_n$t|jt�r�|jg|_n|j	dkr�g|_	n-t|j	t�r�|j	jtj�|_	ndS(N(
RRtdistributiont
isinstancetstrtsplittostpathsepRR(R((s0/usr/lib64/python2.7/distutils/command/config.pytfinalize_optionsEscCsdS(N((R((s0/usr/lib64/python2.7/distutils/command/config.pytrunUscCs�ddlm}m}t|j|�s�|d|jd|jdd�|_t|j�|jrx|jj|j�n|j	r�|jj
|j	�n|jr�|jj|j�q�ndS(s^Check that 'self.compiler' really is a CCompiler object;
        if not, make it one.
        i����(t	CCompilertnew_compilerR
tdry_runtforceiN(
tdistutils.ccompilerRRRR
R RRtset_include_dirsRt
set_librariesRtset_library_dirs(RRR((s0/usr/lib64/python2.7/distutils/command/config.pyt_check_compiler]s
			cCs�dt|}t|d�}|rUx|D]}|jd|�q*W|jd�n|j|�|ddkr�|jd�n|j�|S(Nt_configtesttws#include <%s>
s
i����(tLANG_EXTtopentwritetclose(Rtbodytheaderstlangtfilenametfiletheader((s0/usr/lib64/python2.7/distutils/command/config.pyt_gen_temp_sourcefileps


cCsT|j|||�}d}|jj||g�|jj||d|�||fS(Ns
_configtest.iR(R3RtextendR
t
preprocess(RR-R.RR/tsrctout((s0/usr/lib64/python2.7/distutils/command/config.pyt_preprocess}s
cCs�|j|||�}|jr2t|d|�n|jj|g�\}|jj||g�|jj|gd|�||fS(Nscompiling '%s':R(R3Rt	dump_fileR
tobject_filenamesRR4tcompile(RR-R.RR/R6tobj((s0/usr/lib64/python2.7/distutils/command/config.pyt_compile�s	c
	Cs�|j||||�\}}tjjtjj|��d}	|jj|g|	d|d|d|�|jjdk	r�|	|jj}	n|j	j
|	�|||	fS(NiRRttarget_lang(R=RtpathtsplitexttbasenameR
tlink_executablet
exe_extensionRRtappend(
RR-R.RRRR/R6R<tprog((s0/usr/lib64/python2.7/distutils/command/config.pyt_link�s"cGsn|s|j}g|_ntjddj|��x3|D]+}ytj|�Wq;tk
req;Xq;WdS(Nsremoving: %st (RRtinfotjoinRtremovetOSError(Rt	filenamesR0((s0/usr/lib64/python2.7/distutils/command/config.pyt_clean�s	

RcCsbddlm}|j�d}y|j||||�Wn|k
rSd}nX|j�|S(sQConstruct a source file from 'body' (a string containing lines
        of C/C++ code) and 'headers' (a list of header files to include)
        and run it through the preprocessor.  Return true if the
        preprocessor succeeded, false if there were any errors.
        ('body' probably isn't of much use, but what the heck.)
        i����(tCompileErrorii(R"RNR&R8RM(RR-R.RR/RNtok((s0/usr/lib64/python2.7/distutils/command/config.pyttry_cpp�s



cCs�|j�|j||||�\}}t|t�rItj|�}nt|�}d}	x9|j�}
|
dkrzPn|j|
�r^d}	Pq^q^W|j	�|j
�|	S(s�Construct a source file (just like 'try_cpp()'), run it through
        the preprocessor, and return true if any line of the output matches
        'pattern'.  'pattern' should either be a compiled regex object or a
        string containing a regex.  If both 'body' and 'headers' are None,
        preprocesses an empty file -- which can be useful to determine the
        symbols the preprocessor and compiler set by default.
        iti(R&R8RRtreR;R*treadlinetsearchR,RM(RtpatternR-R.RR/R6R7R1tmatchtline((s0/usr/lib64/python2.7/distutils/command/config.pyt
search_cpp�s 	


cCs{ddlm}|j�y |j||||�d}Wn|k
rSd}nXtj|rfdpid�|j�|S(swTry to compile a source file built from 'body' and 'headers'.
        Return true on success, false otherwise.
        i����(RNiissuccess!sfailure.(R"RNR&R=RRHRM(RR-R.RR/RNRO((s0/usr/lib64/python2.7/distutils/command/config.pyttry_compile�s




c
Cs�ddlm}m}|j�y&|j||||||�d}	Wn||fk
red}	nXtj|	rxdp{d�|j�|	S(s�Try to compile and link a source file, built from 'body' and
        'headers', to executable form.  Return true on success, false
        otherwise.
        i����(RNt	LinkErroriissuccess!sfailure.(R"RNRZR&RFRRHRM(
RR-R.RRRR/RNRZRO((s0/usr/lib64/python2.7/distutils/command/config.pyttry_link�s




c
Cs�ddlm}m}|j�yA|j||||||�\}	}
}|j|g�d}Wn ||tfk
r�d}nXtj|r�dp�d�|j	�|S(s�Try to compile, link to an executable, and run a program
        built from 'body' and 'headers'.  Return true on success, false
        otherwise.
        i����(RNRZiissuccess!sfailure.(
R"RNRZR&RFtspawnRRRHRM(
RR-R.RRRR/RNRZR6R<texeRO((s0/usr/lib64/python2.7/distutils/command/config.pyttry_runs



ic	Cs�|j�g}|r*|jd|�n|jd�|rQ|jd|�n|jd|�|jd�dj|�d}|j|||||�S(s�Determine if function 'func' is available by constructing a
        source file that refers to 'func', and compiles and links it.
        If everything succeeds, returns true; otherwise returns false.

        The constructed source file starts out by including the header
        files listed in 'headers'.  If 'decl' is true, it then declares
        'func' (as "int func()"); you probably shouldn't supply 'headers'
        and set 'decl' true in the same call, or you might get errors about
        a conflicting declarations for 'func'.  Finally, the constructed
        'main()' function either references 'func' or (if 'call' is true)
        calls it.  'libraries' and 'library_dirs' are used when
        linking.
        s
int %s ();s
int main () {s  %s();s  %s;t}s
(R&RDRIR[(	RtfuncR.RRRtdecltcallR-((s0/usr/lib64/python2.7/distutils/command/config.pyt
check_funcs


cCs*|j�|jd|||g||�S(s�Determine if 'library' is available to be linked against,
        without actually checking that any particular symbols are provided
        by it.  'headers' will be used in constructing the source file to
        be compiled, but the only effect of this is to check if all the
        header files listed are available.  Any libraries listed in
        'other_libraries' will be included in the link, in case 'library'
        has symbols that depend on other libraries.
        sint main (void) { }(R&R[(RtlibraryRR.Rtother_libraries((s0/usr/lib64/python2.7/distutils/command/config.pyt	check_lib?s

	cCs|jddd|gd|�S(s�Determine if the system header file named by 'header_file'
        exists and can be found by the preprocessor; return true if so,
        false otherwise.
        R-s
/* No body */R.R(RP(RR2RRR/((s0/usr/lib64/python2.7/distutils/command/config.pytcheck_headerNsN(s	compiler=Nsspecify the compiler type(scc=Nsspecify the compiler executable(s
include-dirs=Rs.list of directories to search for header files(sdefine=RsC preprocessor macros to define(sundef=Rs!C preprocessor macros to undefine(s
libraries=R	s!external C libraries to link with(s
library-dirs=R
s.directories to search for external C libraries(RNs1show every action (compile, link, run, ...) taken(sdump-sourceNs=dump generated source files before attempting to compile them(t__name__t
__module__tdescriptionRtuser_optionsRRRR&R3R8R=RFRMRPRXRYR[R^RcRfRg(((s0/usr/lib64/python2.7/distutils/command/config.pyRsT						
								!cCsb|dkr tjd|�n
tj|�t|�}ztj|j��Wd|j�XdS(sjDumps a file content into log.info.

    If head is not None, will be dumped before the file content.
    s%sN(RRRHR*treadR,(R0theadR1((s0/usr/lib64/python2.7/distutils/command/config.pyR9Xs
(t__doc__t__revision__RRRtdistutils.coreRtdistutils.errorsRtdistutils.sysconfigRt	distutilsRR)RRR9(((s0/usr/lib64/python2.7/distutils/command/config.pyt<module>
s�APKW[���j�K�Kcommand/build_ext.pyonu�[����
{fc@s/dZdZddlZddlZddlZddlZddlTddlmZm	Z	ddl
mZddlTddl
mZmZddlmZdd	lmZdd
lmZddlmZejdkr�dd
lmZee��Znejd�Zd�Zdefd��YZ dS(s�distutils.command.build_ext

Implements the Distutils 'build_ext' command, for building extension
modules (currently limited to C extensions, should accommodate C++
extensions ASAP).s$Id$i����N(t*(t	USER_BASEt	USER_SITE(tCommand(tcustomize_compilertget_python_version(tnewer_group(t	Extension(tget_platform(tlogtnt(tget_build_versions3^[a-zA-Z_][a-zA-Z_0-9]*(\.[a-zA-Z_][a-zA-Z_0-9]*)*$cCsddlm}|�dS(Ni����(tshow_compilers(tdistutils.ccompilerR(R((s3/usr/lib64/python2.7/distutils/command/build_ext.pyR st	build_extcBs?eZdZdejZdFdGdd	d
e�fddd
dfdddefdHdIdJdddefdKdLdMdNdOdQdRdSdTgZdd$d'd-d3gZ	d5dPd6e
fgZd7�Zd8�Z
d9�Zd:�Zd;�Zd<�Zd=�Zd>�Zd?�Zd@�ZdA�ZdB�ZdC�ZdD�ZdE�ZRS(Us8build C/C++ extensions (compile/link to build directory)s (separated by '%s')s
build-lib=tbs(directory for compiled extension modulessbuild-temp=tts1directory for temporary files (build by-products)s
plat-name=tps>platform name to cross-compile for, if supported (default: %s)tinplacetis=ignore build-lib and put compiled extensions into the source s,directory alongside your pure Python moduless
include-dirs=tIs.list of directories to search for header filessdefine=tDsC preprocessor macros to definesundef=tUs!C preprocessor macros to undefines
libraries=tls!external C libraries to link withs
library-dirs=tLs.directories to search for external C librariessrpath=tRs7directories to search for shared C libraries at runtimes
link-objects=tOs2extra explicit link objects to include in the linktdebugtgs'compile/link with debugging informationtforcetfs2forcibly build everything (ignore file timestamps)s	compiler=tcsspecify the compiler typesswig-cpps)make SWIG create C++ files (default is C)s
swig-opts=s!list of SWIG command line optionssswig=spath to the SWIG executabletusers#add user include, library and rpaths
help-compilerslist available compilerscCs�d|_d|_d|_d|_d|_d|_d|_d|_d|_	d|_
d|_d|_d|_
d|_d|_d|_d|_d|_d|_d|_dS(Ni(tNonet
extensionst	build_libt	plat_namet
build_tempRtpackagetinclude_dirstdefinetundeft	librariestlibrary_dirstrpathtlink_objectsRRtcompilertswigtswig_cppt	swig_optsR (tself((s3/usr/lib64/python2.7/distutils/command/build_ext.pytinitialize_optionsls(																			c
	Cs�ddlm}|jdd.d/d0d1d2d3�|jdkrP|jj|_n|jj|_|j	�}|j	d
d�}|j
dkr�|jj
p�g|_
nt|j
t�r�|j
j
tj�|_
n|j
j|�||kr|j
j|�n|jd�|jd
�|jdkr5g|_n|jdkrPg|_n3t|j�tkr�tj
|jtj�|_n|jdkr�g|_n3t|j�tkr�tj
|jtj�|_ntjdkr�|jjtjjtjd��|jr)tjj|jd�|_ntjj|jd�|_|j
jtjjtjd��tdkr�|j dkr�d}n
|j d}x�d4d5fD]L}tjjtj|�}|r�tjj||�}n|jj|�q�Wq�tdkr+|jjtjjtjdd��q�tdkr_|jjtjjtjdd��q�|jjtjjtjdd��ntjdkr�|jjtjjtjd��ntj!d  d!ks�tj!d  d"krJtj"j#tjjtjd#��r7|jjtjjtj$d$d%t%�d&��qJ|jjd'�n|j&d(�r�|j's~|jj|j&d)��q�|jjd'�n|j(r�|j(j
d*�}t)d+�|�|_(n|j*r�|j*j
d*�|_*n|j+dkrg|_+n|j+j
d,�|_+|j,r�tjjt-d-�}tjjt-d$�}	tjj.|�rm|j
j|�ntjj.|	�r�|jj|	�|jj|	�q�ndS(6Ni����(t	sysconfigtbuildR#R%R.RRR$t
plat_specificiR*R-R
tlibstDebugtReleasetPCi	twin32titPCbuildsVS9.0isVS8.0isVS7.1tVC6tos2tConfigitcygwintatheostbintlibtpythontconfigt.tPy_ENABLE_SHAREDtLIBDIRt,cSs
|dfS(Nt1((tsymbol((s3/usr/lib64/python2.7/distutils/command/build_ext.pyt<lambda>�R<t tinclude(R#R#(R%R%(R.R.(RR(RR(R$R$(R=(R:sVS9.0(/t	distutilsR4tset_undefined_optionsR&R!tdistributiontext_packagetext_modulesR"tget_python_incR't
isinstancetstrtsplittostpathseptappendtensure_string_listR*R+ttypet
StringTypetstringR,tnametpathtjointsystexec_prefixRR%tMSVC_VERSIONR$tplatformt
executablet
startswithtprefixRtget_config_vartpython_buildR(tmapR)R1R Rtisdir(
R2R4t
py_includetplat_py_includetsuffixtdtnew_libtdefinestuser_includetuser_lib((s3/usr/lib64/python2.7/distutils/command/build_ext.pytfinalize_options�s�	

"	"	
%&$

				c	Csddlm}|jsdS|jj�rm|jd�}|jj|j�pSg�|j	j
|j�n|d|jd|j
d|jd|j�|_t|j�tjdkr�|jt�kr�|jj|j�n|jdk	r|jj|j�n|jdk	rEx-|jD]\}}|jj||�qWn|jdk	r{x$|jD]}|jj|�q^Wn|jdk	r�|jj|j�n|j	dk	r�|jj|j	�n|jdk	r�|jj |j�n|j!dk	r|jj"|j!�n|j#�dS(	Ni����(tnew_compilert
build_clibR.tverbosetdry_runRR
($R
RwR"RRthas_c_librariestget_finalized_commandR*textendtget_library_namesR+R[RxR.RyRzRRRYR`R$Rt
initializeR'R!tset_include_dirsR(tdefine_macroR)tundefine_macrot
set_librariestset_library_dirsR,tset_runtime_library_dirsR-tset_link_objectstbuild_extensions(R2RwRxR`tvaluetmacro((s3/usr/lib64/python2.7/distutils/command/build_ext.pytruns>			
!c
Cs!t|t�std�nx�t|�D]�\}}t|t�rIq(nt|t�skt|�dkrwtd�n|\}}tjd|�t|t	�o�t
j|�s�td�nt|t�s�td�nt||d�}x<dD]4}|j
|�}|dk	r�t|||�q�q�W|j
d�|_d|krYtjd�n|j
d�}|rg|_g|_x�|D]�}	t|	t�o�t|	�dks�td�nt|	�dkr�|jj|	d�q�t|	�dkr�|jj|	�q�q�Wn|||<q(WdS(s�Ensure that the list of extensions (presumably provided as a
        command option 'extensions') is valid, i.e. it is a list of
        Extension objects.  We also support the old-style list of 2-tuples,
        where the tuples are (ext_name, build_info), which are converted to
        Extension instances here.

        Raise DistutilsSetupError if the structure is invalid anywhere;
        just returns otherwise.
        s:'ext_modules' option must be a list of Extension instancesisMeach element of 'ext_modules' option must be an Extension instance or 2-tuplesvold-style (ext_name, build_info) tuple found in ext_modules for extension '%s' -- please convert to Extension instancesRfirst element of each tuple in 'ext_modules' must be the extension name (a string)sOsecond element of each tuple in 'ext_modules' must be a dictionary (build info)tsourcesR'R+R*t
extra_objectstextra_compile_argstextra_link_argsR,tdef_files9'def_file' element of build info dict no longer supportedtmacrosis9'macros' element of build info dict must be 1- or 2-tupleiN(R'R+R*R�R�R�(ii(RVtlisttDistutilsSetupErrort	enumerateRttupletlenR	twarnRWtextension_name_retmatchtdicttgetR!tsetattrtruntime_library_dirst
define_macrostundef_macrosR[(
R2R"Rtexttext_namet
build_infotkeytvalR�R�((s3/usr/lib64/python2.7/distutils/command/build_ext.pytcheck_extensions_listVsT
	"				
		
!	cCs>|j|j�g}x!|jD]}|j|j�q W|S(N(R�R"R}R�(R2t	filenamesR�((s3/usr/lib64/python2.7/distutils/command/build_ext.pytget_source_files�s
cCsG|j|j�g}x*|jD]}|j|j|j��q W|S(N(R�R"R[tget_ext_fullpathR`(R2toutputsR�((s3/usr/lib64/python2.7/distutils/command/build_ext.pytget_outputs�s
cCs5|j|j�x|jD]}|j|�qWdS(N(R�R"tbuild_extension(R2R�((s3/usr/lib64/python2.7/distutils/command/build_ext.pyR��sc
Cs�|j}|dks-t|�ttfkrHtddd|j�nt|�}|j|j�}||j	}|j
p�t||d�s�tj
d|j�dStjd|j�|j||�}|jp�g}|j}x!|jD]}|j|f�q�W|jj|d|jd|d	|jd
|j
d|d|j	�}||_|jro|j|j�n|jp{g}|jp�|jj|�}	|jj||d
|j|�d|j d|j!d|d|j"|�d
|j
d|jd|	�dS(Ns*in 'ext_modules' option (extension '%s'), s&'sources' must be present and must be sa list of source filenamestnewers$skipping '%s' extension (up-to-date)sbuilding '%s' extensiont
output_dirR�R'Rtextra_postargstdependsR*R+R�texport_symbolsR%ttarget_lang(#R�R!R]tListTypet	TupleTypeR�R`R�R�R�RRR	Rtinfotswig_sourcesR�R�R�R[R.tcompileR%R't_built_objectsR�R}R�tlanguagetdetect_languagetlink_shared_objectt
get_librariesR+R�tget_export_symbols(
R2R�R�text_pathR�t
extra_argsR�R)tobjectsR�((s3/usr/lib64/python2.7/distutils/command/build_ext.pyR��sN	$

			
							cCs�g}g}i}|jr+tjd�n|jsRd|jksRd|jkr[d}nd}xr|D]j}tjj|�\}}	|	dkr�|j|d|�|j|�|d||<qh|j|�qhW|s�|S|jp�|j	�}
|
dg}|j
|j�|jr*|jd�n|jsWx!|jD]}|j|�q=WnxE|D]=}||}
tjd	||
�|j|d
|
|g�q^W|S(s�Walk the list of source files in 'sources', looking for SWIG
        interface (.i) files.  Run SWIG on all that are found, and
        return a modified 'sources' list with SWIG source files replaced
        by the generated C (or C++) files.
        s/--swig-cpp is deprecated - use --swig-opts=-c++s-c++s.cpps.cs.it_wrapi����s-pythonsswigging %s to %ss-o(
R0R	R�R1RYRatsplitextR[R/t	find_swigR}R�tspawn(R2R�t	extensiontnew_sourcesR�tswig_targetst
target_exttsourcetbaseR�R/tswig_cmdtottarget((s3/usr/lib64/python2.7/distutils/command/build_ext.pyR�s>		

		

cCs�tjdkrdStjdkrixgdD]5}tjjd|d�}tjj|�r)|Sq)WdSn#tjd	kr|dStd
tj�dS(
s�Return the name of the SWIG executable.  On Unix, this is
        just "swig" -- it should be in the PATH.  Tries a bit harder on
        Windows.
        tposixR/R
s1.3s1.2s1.1s	c:\swig%ssswig.exeR?s>I don't know how to find (much less run) SWIG on platform '%s'N(s1.3s1.2s1.1(RYR`RaRbtisfiletDistutilsPlatformError(R2tverstfn((s3/usr/lib64/python2.7/distutils/command/build_ext.pyR�Ps
c	Cs�tjdtjd�}|j|�}|j|�}|jd�}|j|�}tjj|�d}|j	s�tjj
|d |g�}tjj
|j|�Sdj
|dd!�}|jd�}tjj
|j|��}tjj
||�S(s�Returns the path of the filename for a given extension.

        The file is located in `build_lib` or directly in the package
        (inplace option).
        t/s..RGi����itbuild_py(R_t	maketransRYtsept	translatetget_ext_fullnameRXtget_ext_filenameRaRRbR#R|tabspathtget_package_dir(	R2R�tall_dotstfullnametmodpathtfilenameR&R�tpackage_dir((s3/usr/lib64/python2.7/distutils/command/build_ext.pyR�qs	cCs&|jdkr|S|jd|SdS(sSReturns the fullname of a given extension name.

        Adds the `package.` prefixRGN(R&R!(R2R�((s3/usr/lib64/python2.7/distutils/command/build_ext.pyR��scCs�ddlm}tj|d�}tjdkrZ|t|�dd |t|�d<n|d�}tjdkr�|jr�tjj	|�d	|Stjj	|�t
jr�d	p�d
|S(s�Convert the name of an extension (eg. "foo.bar") into the name
        of the file from which it will be loaded (eg. "foo/bar.so", or
        "foo\bar.pyd").
        i����(RjRGR?iitSOR
t_dR<(tdistutils.sysconfigRjR_RXRYR`R�RRaRbRctpydebug(R2R�RjR�tso_ext((s3/usr/lib64/python2.7/distutils/command/build_ext.pyR��s)cCsCd|jjd�d}||jkr<|jj|�n|jS(sReturn the list of symbols that a shared extension has to
        export.  This either uses 'ext.export_symbols' or, if it's not
        provided, "init" + module_name.  Only relevant on Windows, where
        the .pyd file (DLL) must export the module "init" function.
        tinitRGi����(R`RXR�R[(R2R�t
initfunc_name((s3/usr/lib64/python2.7/distutils/command/build_ext.pyR��scCsqtjdkr�ddlm}t|j|�s}d}|jrM|d}n|tjd?tjd?d@f}|j|gS|jSn�tjd	kr�d}|tjd?tjd?d@f}|j|gStjd
 dkrd}|tjd?tjd?d@f}|j|gStjd
 d
kr�ddl	m
}d}|tjd?tjd?d@f}g}xM|jd�j�D]6}|j
d�r�|j|d�q||j|�q|W|j|dg|Stjdkr�|jStjd dkr�|jSddl	m
}|jd�rfd}|tjd?tjd?d@f}tjrX|d7}n|j|gS|jSdS(s�Return the list of libraries to link against when building a
        shared extension.  On most platforms, this is just 'ext.libraries';
        on Windows and OS/2, we add the Python library (eg. python20.dll).
        R;i����(tMSVCCompilers
python%d%dR�iii�tos2emxiRAspython%d.%dRB(R4tSHLIBSs-litmtdarwinitaixRHN(RcRftdistutils.msvccompilerR�RVR.Rt
hexversionR*RPR4RjRXRhR[R�(R2R�R�ttemplatet	pythonlibR4textraRD((s3/usr/lib64/python2.7/distutils/command/build_ext.pyR��sX
	

	
(s
build-lib=Rs(directory for compiled extension modules(sbuild-temp=Rs1directory for temporary files (build by-products)(sdefine=RsC preprocessor macros to define(sundef=Rs!C preprocessor macros to undefine(s
libraries=Rs!external C libraries to link with(srpath=Rs7directories to search for shared C libraries at runtime(s
link-objects=Rs2extra explicit link objects to include in the link(RRs'compile/link with debugging information(RRs2forcibly build everything (ignore file timestamps)(s	compiler=Rsspecify the compiler typeN(sswig-cppNs)make SWIG create C++ files (default is C)(s
swig-opts=Ns!list of SWIG command line options(sswig=Nspath to the SWIG executable(R Ns#add user include, library and rpath(t__name__t
__module__tdescriptionRYRZtsep_byRR!tuser_optionstboolean_optionsRthelp_optionsR3RvR�R�R�R�R�R�R�R�R�R�R�R�R�(((s3/usr/lib64/python2.7/distutils/command/build_ext.pyR%st



			�	@	N	
			S	:	!	 				(!t__doc__t__revision__RcRYR_trettypestsiteRRtdistutils.coreRtdistutils.errorsR�RRtdistutils.dep_utilRtdistutils.extensionRtdistutils.utilRRPR	R`R�RtintReR�R�RR(((s3/usr/lib64/python2.7/distutils/command/build_ext.pyt<module>s$0

		PKW[:Oķcommand/build.pyonu�[����
{fc@swdZdZddlZddlZddlmZddlmZddlm	Z	d�Z
defd	��YZdS(
sBdistutils.command.build

Implements the Distutils 'build' command.s$Id$i����N(tget_platform(tCommand(tDistutilsOptionErrorcCsddlm}|�dS(Ni����(tshow_compilers(tdistutils.ccompilerR(R((s//usr/lib64/python2.7/distutils/command/build.pyR
stbuildc
Bs�eZdZd,d.d/dd-d	d
fd0d1ddde�fd2d3d4d5gZddgZdd-d efgZd!�Z	d"�Z
d#�Zd$�Zd%�Z
d&�Zd'�Zd(efd)e
fd*efd+efgZRS(6s"build everything needed to installsbuild-base=tbs base directory for build librarysbuild-purelib=s2build directory for platform-neutral distributionssbuild-platlib=s3build directory for platform-specific distributionss
build-lib=s9build directory for all distribution (defaults to either sbuild-purelib or build-platlibsbuild-scripts=sbuild directory for scriptssbuild-temp=ttstemporary build directorys
plat-name=tps6platform name to build for, if supported (default: %s)s	compiler=tcsspecify the compiler typetdebugtgs;compile extensions and libraries with debugging informationtforcetfs2forcibly build everything (ignore file timestamps)sexecutable=tes5specify final destination interpreter path (build.py)s
help-compilerslist available compilerscCsgd|_d|_d|_d|_d|_d|_d|_d|_d|_	d|_
d|_dS(NRi(t
build_basetNonet
build_purelibt
build_platlibt	build_libt
build_tempt
build_scriptstcompilert	plat_nameR
Rt
executable(tself((s//usr/lib64/python2.7/distutils/command/build.pytinitialize_options7s										cCs�|jdkrt�|_ntjdkr<td��nd|jtjdd!f}ttd�ru|d7}n|j	dkr�tj
j|jd�|_	n|j
dkr�tj
j|jd|�|_
n|jdkr|jjr�|j
|_q|j	|_n|jdkr=tj
j|jd	|�|_n|jdkrxtj
j|jd
tjdd!�|_n|jdkr�tjr�tj
jtj�|_ndS(NtntsW--plat-name only supported on Windows (try using './configure --help' on your platform)s.%s-%siitgettotalrefcounts-pydebugtlibttempsscripts-(RRRtostnameRtsystversionthasattrRtpathtjoinRRRtdistributiontext_modulesRRRtnormpath(Rtplat_specifier((s//usr/lib64/python2.7/distutils/command/build.pytfinalize_optionsFs2
cCs(x!|j�D]}|j|�q
WdS(N(tget_sub_commandstrun_command(Rtcmd_name((s//usr/lib64/python2.7/distutils/command/build.pytrunxscCs
|jj�S(N(R&thas_pure_modules(R((s//usr/lib64/python2.7/distutils/command/build.pyR/�scCs
|jj�S(N(R&thas_c_libraries(R((s//usr/lib64/python2.7/distutils/command/build.pyR0�scCs
|jj�S(N(R&thas_ext_modules(R((s//usr/lib64/python2.7/distutils/command/build.pyR1�scCs
|jj�S(N(R&thas_scripts(R((s//usr/lib64/python2.7/distutils/command/build.pyR2�stbuild_pyt
build_clibt	build_extR(sbuild-base=Rs base directory for build libraryN(sbuild-purelib=Ns2build directory for platform-neutral distributions(sbuild-platlib=Ns3build directory for platform-specific distributions(sbuild-scripts=Nsbuild directory for scripts(sbuild-temp=Rstemporary build directory(s	compiler=R	sspecify the compiler type(R
Rs;compile extensions and libraries with debugging information(RR
s2forcibly build everything (ignore file timestamps)(sexecutable=Rs5specify final destination interpreter path (build.py)(t__name__t
__module__tdescriptionRRtuser_optionstboolean_optionsRthelp_optionsRR*R.R/R0R1R2tsub_commands(((s//usr/lib64/python2.7/distutils/command/build.pyRsN
			2								(t__doc__t__revision__R!Rtdistutils.utilRtdistutils.coreRtdistutils.errorsRRR(((s//usr/lib64/python2.7/distutils/command/build.pyt<module>s	PKW[�?^��]�]command/bdist_msi.pycnu�[����
{fc@sdZddlZddlZddlmZddlmZddlmZddl	m
Z
ddlmZddl
mZdd	lmZddlZdd
lmZmZmZddlmZmZmZmZdefd
��YZdefd��YZdS(s#
Implements the bdist_msi command.
i����N(tget_python_version(tCommand(tremove_tree(t
StrictVersion(tDistutilsOptionError(tlog(tget_platform(tschematsequencettext(t	DirectorytFeaturetDialogtadd_datatPyDialogcBsVeZdZd�Zd�Zddd�Zddd�Zddd	�Zd
�ZRS(s�Dialog class with a fixed layout: controls at the top, then a ruler,
    then a list of buttons: back, next, cancel. Optionally a bitmap at the
    left.cOs=tj||�|jd}|jdd||jd�dS(sbDialog(database, name, x, y, w, h, attributes, title, first,
        default, cancel, bitmap=true)i$t
BottomLineiN(Rt__init__thtlinetw(tselftargstkwtruler((s3/usr/lib64/python2.7/distutils/command/bdist_msi.pyRs
c	Cs'|jddddddd|�dS(	s,Set the title text of the dialog at the top.tTitleii
i@i<is{\VerdanaBold10}%sN(R	(Rttitle((s3/usr/lib64/python2.7/distutils/command/bdist_msi.pyR$stBackic	Cs>|rd}nd}|j|d|jddd|||�S(s�Add a back button with a given title, the tab-next button,
        its name in the Control table, possibly initially disabled.

        Return the button, so that events can be associatediii�ii8i(t
pushbuttonR(RRtnexttnametactivetflags((s3/usr/lib64/python2.7/distutils/command/bdist_msi.pytback+s	tCancelc	Cs>|rd}nd}|j|d|jddd|||�S(s�Add a cancel button with a given title, the tab-next button,
        its name in the Control table, possibly initially disabled.

        Return the button, so that events can be associatediii0ii8i(RR(RRRRRR((s3/usr/lib64/python2.7/distutils/command/bdist_msi.pytcancel6s	tNextc	Cs>|rd}nd}|j|d|jddd|||�S(s�Add a Next button with a given title, the tab-next button,
        its name in the Control table, possibly initially disabled.

        Return the button, so that events can be associatediii�ii8i(RR(RRRRRR((s3/usr/lib64/python2.7/distutils/command/bdist_msi.pyRAs	c	Cs:|j|t|j|d�|jdddd||�S(s�Add a button with a given title, the tab-next button,
        its name in the Control table, giving its x position; the
        y-position is aligned with the other buttons.

        Return the button, so that events can be associatediii8ii(RtintRR(RRRRtxpos((s3/usr/lib64/python2.7/distutils/command/bdist_msi.pytxbuttonLs(	t__name__t
__module__t__doc__RRR R"RR&(((s3/usr/lib64/python2.7/distutils/command/bdist_msi.pyRs			t	bdist_msicBs=eZdZdedfddde�fdddd	fd
eddfd
ddfdddfdddfdedfdedfdedfg
Zdd
ddgZddddd d!d"d#d$d%d&d'd(d)d*d+d,d-d.d/gZd0Zd1�Z	d2�Z
d3�Zd4�Zd5�Z
d6�Zd7�Zd8�ZRS(9s7create a Microsoft Installer (.msi) binary distributions
bdist-dir=s1temporary directory for creating the distributions
plat-name=tps;platform name to embed in generated filenames (default: %s)s	keep-temptks/keep the pseudo-installation tree around after s!creating the distribution archivestarget-version=s!require a specific python versions on the target systemsno-target-compiletcs/do not compile .py to .pyc on the target systemsno-target-optimizetos;do not compile .py to .pyo (optimized) on the target systems	dist-dir=tds-directory to put final built distributions ins
skip-builds2skip rebuilding everything (for testing/debugging)sinstall-script=sUbasename of installation script to be run after installation or before deinstallationspre-install-script=s{Fully qualified filename of a script to be run before any files are installed.  This script need not be in the distributions2.0s2.1s2.2s2.3s2.4s2.5s2.6s2.7s2.8s2.9s3.0s3.1s3.2s3.3s3.4s3.5s3.6s3.7s3.8s3.9tXcCsgd|_d|_d|_d|_d|_d|_d|_d|_d|_	d|_
d|_dS(Ni(tNonet	bdist_dirt	plat_namet	keep_temptno_target_compiletno_target_optimizettarget_versiontdist_dirt
skip_buildtinstall_scripttpre_install_scripttversions(R((s3/usr/lib64/python2.7/distutils/command/bdist_msi.pytinitialize_options~s										cCsi|jdd	�|jdkrL|jd�j}tjj|d�|_nt�}|j	rz|j
j�rz||_	n|j	r�|j	g|_|j
r�|j
j�r�|j	|kr�td|f�q�nt|j�|_|jdd
d�|jr
td�n|jr\xF|j
jD]%}|jtjj|�kr Pq q Wtd|j�nd|_dS(NtbdistR9tmsisMtarget version can only be %s, or the '--skip-build' option must be specifiedR8R3s5the pre-install-script feature is not yet implementeds(install_script '%s' not found in scripts(R9R9(R8R8(R3R3(tset_undefined_optionsR2R1tget_finalized_commandt
bdist_basetostpathtjoinRR7tdistributionthas_ext_modulesR<R9Rtlisttall_versionsR;R:tscriptstbasenametinstall_script_key(RRBt
short_versiontscript((s3/usr/lib64/python2.7/distutils/command/bdist_msi.pytfinalize_options�s8					
cCs�|js|jd�n|jddd�}|j|_|j|_d|_|jd�}d|_d|_|jj	�r�|j
}|s�|js�td��tj
dd!}nd	|j|f}|jd�}tjj|jd
|�|_ntjd|j�|j�tjjdtjj|jd��|j�tjd=|j|j�|jj�}|j|�}tjj|�}tjj|�r�tj |�n|jj!}|j"}	|	s�|j#}	n|	s�d
}	n|j$�}
dt%|
�j
}|jj�}|j
r5d|j
|f}n
d|}t&j'|t(|t&j)�||	�|_*t&j+|j*t,�d|
fg}
|j-p�|j.}|r�|
j/d|f�n|j0r�|
j/d|j0f�n|
r�t1|j*d|
�n|j2�|j3�|j4�|j5�|j*j6�t7|jd�rid|j
pJd|f}|jj8j/|�n|j9s�t:|jd|j;�ndS(Ntbuildtinstalltreinit_subcommandsiitinstall_libs Should have already checked thisis.%s-%stlibsinstalling to %stPURELIBtUNKNOWNs%d.%d.%dsPython %s %ss	Python %stDistVersiont
ARPCONTACTtARPURLINFOABOUTtPropertyt
dist_filesR*tanytdry_run(<R9trun_commandtreinitialize_commandR2tprefixtwarn_dirtcompiletoptimizeRFRGR7tAssertionErrortsystversionR3RARCRDREt
build_baset	build_libRtinfotensure_finalizedtinserttruntmkpathR8tget_fullnametget_installer_filenametabspathtexiststunlinktmetadatatauthort
maintainertget_versionRtmsilibt
init_databaseRtgen_uuidtdbt
add_tablesRtauthor_emailtmaintainer_emailtappendturlR
tadd_find_pythont	add_filestadd_scriptstadd_uitCommitthasattrR[R4RR](RRQRSR7tplat_specifierRPtfullnametinstaller_nameRsRtRftsversiontproduct_nametpropstemailttup((s3/usr/lib64/python2.7/distutils/command/bdist_msi.pyRl�s~					
%

			
	




	c
Cs�|j}tjd�}tjj|j�}t||d|dd�}t	|ddddddd�}||d	fg}x�|j
|jgD]�}d|}d|}	}
d}||jkr�d
}d}
nd|}d}
t	||	||d|
d|�}t||||||
�}|j|||f�q�W|j
�i}x�|D]�\}}}|g}xg|r�|j�}xNtj|j�D]:}tjj|j|�}tjj|�rd
|j|�|f}||}
t|||||
|�}|j|�q�|js.|j|j|d�n||kr�|j|�}||<||jkr�|jr|td|��nd||_q�q�||}t|jd|||j|d|jfg�q�WqiW|j
�qNW|j|�dS(Nt	distfilest	TARGETDIRt	SourceDirtPythont
Everythingiit	directorytsPython from another locationisPython %s from registrys%s|%ssMultiple files with name %ss[#%s]t
DuplicateFile(RzRwtCABRCRDRpR2R
R1RR<t
other_versionR~R�tpoptlistdirtabsoluteREtisdirt
make_shortt	componenttstart_componenttlogicaltadd_fileR:RLRR
tcommit(RRztcabtrootdirtroottftitemsRfttargetRtdefaulttdescRtleveltdirtseentfeaturettodotfiletafiletshorttnewdirtkey((s3/usr/lib64/python2.7/distutils/command/bdist_msi.pyR�s\	
	
!
		
		
+cCsd}x|jD]�}d|}d|}d|}d|}d|}d|}d|}	d	|}
d
|}d|}tjr�d }
nd}
t|jd|d|d|
f|d|d|
fg�t|jd||f||fg�t|jd|d!|d|df|	d"|d|df|
d#|d|dfg�t|jd|||f|	||df|
d|dfg�t|jd|||f|	||df|
d|dfg�t|jdd|dd|fg�|d7}|dkst�qWdS($ssAdds code to the installer to compute the location of Python.

        Properties PYTHON.MACHINE.X.Y and PYTHON.USER.X.Y will be set from the
        registry for each version of Python.

        Properties TARGETDIRX.Y will be set from PYTHON.USER.X.Y if defined,
        else from PYTHON.MACHINE.X.Y.

        Properties PYTHONX.Y will be set to TARGETDIRX.Y\python.exei�s)SOFTWARE\Python\PythonCore\%s\InstallPathspython.machine.spython.user.sPYTHON.MACHINE.sPYTHON.USER.tPythonFromMachinetPythonFromUsert	PythonExeR�tPYTHONiit
RegLocatorit	AppSearchtCustomActioni3it[t]s]\python.exetInstallExecuteSequencetInstallUISequencet	ConditionR�is
NOT TARGETDIRii�Nii3i3i3(R<RwtWin64R
RzR1Rd(Rtstarttvertinstall_pathtmachine_regtuser_regtmachine_propt	user_proptmachine_actiontuser_actiont
exe_actionttarget_dir_proptexe_proptType((s3/usr/lib64/python2.7/distutils/command/bdist_msi.pyR�EsJ









			
cCsQ|jr�d}x�|j|jgD]l}d|}d|}t|jd|d||jfg�t|jd|d||fg�|d7}q#Wn|jrMtjj	|j
d	�}t|d
�}|jd�|jt|j�j
��|j�t|jdd
tj|�fg�t|jddg�t|jddg�ndS(Ni�sinstall_script.R�R�i2R�s&Python%s=3ispreinstall.batRsrem ="""
%1 %0
exit
"""
tBinaryt
PreInstallis
NOT Installedi�(R�iR�N(R�s
NOT Installedi�(R:R<R�R
RzRLR;RCRDRER2topentwritetreadtcloseRwR�R1(RR�R�tinstall_actionR�tscriptfnR�((s3/usr/lib64/python2.7/distutils/command/bdist_msi.pyR�{s,	

		


cCsA|j}d}}d}d}d}d}d}t|dd�d�d�d�d�d�g�t|dd�d�d�d�g�t|dd�d�d�d�d�g�t|d.tj�t|d/tj�t|d0||||||d1d1d1�}	|	jd2�|	jd3d1d4d�|	j	d5d6d4d�|	jd7d8d9d:d;d<d=�|	jd>d8d?d:d@d<dA�|	j
d1d5dBd1�}
|
jdCdD�t|dE||||||d1d1d1�}|jdF�|jd3d1d4d�|j	d5d6d4d�|jd7d8d9d:d;d<dG�|jd>d8d?d:d@d<dA�|j
d1d5dBd1�}
|
jdCdD�t|dH||||||d1d1d1�}|jdI�|jd3d1d4d�|j	d5d6d4d�|jdJd8dKd:d@d<dA�|j
d1d5dBd1�}
|
jdCdL�t|dM||||dN|dOdOdOdPt�}
|
jdQd8dRdSd8d<dT�|
jdJd@dUdVd@d<dW�|
jdXd@dYdZddd[�|
j
d\d]d@d^dZd_d`daddd�|
jdDdbdBdD�}
|
jdCdD�|
j
dbdOdBdb�}
|
jdCdb�|
j	dOdDdBdO�}
|
jdCdO�t|ddddZdcdd|dedd�}|jdedddVdfddg�|jdhdidjdkdlddmd�jdCdn�|jdodpdjdkdlddqd�jdCdr�|jdsddjdkdlddtd�jdCdu�|jdvdwdjdkdldd5d�jdCdx�|jdydkdjdkdlddbd�jdCdz�|jd{d|djdkdldd}d�jdCd~�|jdd�djdkdlddOd�jdCd��t|d�ddd�d�d|dmdmdm�}|jdXdfd8d�d�dd��|jdqdjd�d�d�ddqdm�}
|
jdCdD�|jdmd�d�d�d�ddmdq�}
|
jdCdL�t|d�ddd�d�||dLdLdL�}|jdXdfd8d�d�dd��|jdLd�d�d�d�ddLd�}
|
jdCdD�t|d ||||||d5d5d5�}|jdJd8d9d:d�d<d��|jd��|jd.d8d�d:d@d<d��}
|
jd.dX�|jd�d8d�d:d�d<d�}
|
jd�dX�|jd6dd4d�|j
d�dd4d�|j	d5d�}
|
jd�d��t|d&||||||d�d�d5�}|jd��|jd�d8d�dd@dd�|jj��|jd3dd4d�|j
d�d5�}
d}|
jd�d�d�|�xF|j|jgD]1}|d7}|
jd�d�|d�|d�|�q�W|
jd�d�d�|d�|
jdCdLd�|d��|j	d5d��}
|
jd�d��|j
d�d�d8d�ddidd�dd�d�}
|
jd�d��|j}d�|}d�|}|jd�d8dSdd8dd��}
|
jd�|�|
jd�|�|
jd�|�|
jd�|�|j
d�d�d8d�dd�dd�|dd�d�}
|
jd�|�|
jd�|�|
jd�|�|
jd�|�t|d�||||||d�d�d�dPt�}|jdQd8dRdSd8d<d��|jdJd@d@dVd@d<d��|jdXd@d�dZd�dd��|j
d�d�d@d�dZd�d�dd�dd�|jd�d}dd��jdCdL�t|d#||||||d�d�d5�}|jd��|jd�d8d�d�ddddgd��	}|jddd�d�d@d��|jd�dd�d�d@d��|jd6dd4d�|j
d�d5�}
|
jd�d�d�d�|
jdCdLd�d��|j	d5d��}
|
jd�d��t|d,||||||d5d5d5dPt�}|jdQd@d8dSd8d<d��|jdXd�d�dd�dd��|jd�d�d�d�d@dd��|jd.d9d�|d9d@dd��}
|
jd.dX�|j
d�d�d�diddd�dd�dd�}
|
jd�d��|jd3d�d4t�|j
d�d5d4t�|j	d5d6�jd�d��t|d)||||||d�d�d5�}|jd��|jd�d8d�dZdwdd��|jd�d8d�dZd�dddgd��	}|jddd�dSd�d��|jd�dd�dSd�d��|jd3dd4t�|j
d1d5�}
|
jd�dd�d��|
jd�d�d�dR�|
jd�d�d�d`�|
jd�dd�d�|
jd�dd�d��|
jd�d�d�d��|
jd�d�d�d��|
jd�dd�d��|
jdCdLd�d@�|j	d5d��jd�d��dS(�Ni2iri,s[ProductName] SetupiiRZt
DefaultUIFonttDlgFont8tErrorDialogtErrorDlgt	Progress1tInstallt	Progress2tinstallstMaintenanceForm_ActiontRepairt
WhichUserstALLt	TextStyletTahomai	itDlgFontBold8it
VerdanaBold10tVerdanai
tVerdanaRed9i�R�t
PrepareDlgs(Not Privileged or Windows9x or Installedi�t
WhichUsersDlgs.Privileged and not Windows9x and not Installedi�tSelectFeaturesDlgs
Not Installedi�tMaintenanceTypeDlgs,Installed AND NOT RESUME AND NOT Preselectedi�tProgressDlgit
ActionTexttUITextt
FatalErrortFinishs)[ProductName] Installer ended prematurelys< BackRR!RtDescription1iiFi@iPis�[ProductName] setup ended prematurely because of an error.  Your system has not been modified.  To install this program at a later time, please run the installation again.tDescription2i�is.Click the Finish button to exit the Installer.Rt	EndDialogtExittUserExits'[ProductName] Installer was interrupteds�[ProductName] setup was interrupted.  Your system has not been modified.  To install this program at a later time, please run the installation again.t
ExitDialogs&Completing the [ProductName] InstallertDescriptioni�tReturnt
FilesInUseitRetrytbitmapRii�s{\DlgFontBold8}Files in Useiis8Some files that need to be updated are currently in use.tTexti7iJs�The following applications are using files that need to be updated by this setup. Close these applications and then click Retry to continue the installation or Cancel to exit it.tListtListBoxiki�itFileInUseProcesstIgnoreieit	ErrorTexti0R�tNixiHiQitNotErrorNotYi�tYestErrorYestAtAbortt
ErrorAborttCi*tErrorCanceltItErrorIgnoretOi�tOktErrorOktRi�t
ErrorRetryt	CancelDlgiiUi�is;Are you sure you want to cancel [ProductName] installation?i9i8ii�tWaitForCostingDlgsRPlease wait while the installer finishes determining your disk space requirements.ifi(sOPlease wait while the Installer prepares to guide you through the installation.s&Welcome to the [ProductName] InstallerinsPondering...t
ActionDatai�R#tSpawnDialogsSelect Python InstallationstHints9Select the Python locations where %s should be installed.sNext >s[TARGETDIR]s[SourceDir]torderings
[TARGETDIR%s]s FEATURE_SELECTED AND &Python%s=3tSpawnWaitDialogitFeaturest
SelectionTreei<tFEATUREtPathEdits[FEATURE_SELECTED]t1s!FEATURE_SELECTED AND &Python%s<>3tOthers$Provide an alternate Python locationtEnabletShowtDisabletHidei�iR�tDiskCostDlgtOKs&{\DlgFontBold8}Disk Space RequirementssFThe disk space required for the installation of the selected features.i5sThe highlighted volumes (if any) do not have enough disk space available for the currently selected features.  You can either remove some files from the highlighted volumes, or choose to install less features onto local drive(s), or select different destination drive(s).t
VolumeListtVolumeCostListidi�is{120}{70}{70}{70}{70}g�?tAdminInstallsGSelect whether to install [ProductName] for all users of this computer.isInstall for all userstJUSTMEisInstall just for mes
[ALLUSERS]sWhichUsers="ALL"s({\DlgFontBold8}[Progress1] [ProductName]i#iAsYPlease wait while the Installer [Progress2] [ProductName]. This may take several minutes.tStatusLabelsStatus:tProgressBaris
Progress donetSetProgresstProgresss)Welcome to the [ProductName] Setup WizardtBodyTexti?s:Select whether you want to repair or remove [ProductName].tRepairRadioGroupilis&Repair [ProductName]tRemovei$sRe&move [ProductName]s[REINSTALL]sMaintenanceForm_Action="Repair"s[Progress1]t	Repairings[Progress2]trepairst	Reinstalls[REMOVE]sMaintenanceForm_Action="Remove"itRemovingitremovesi
is MaintenanceForm_Action<>"Change"(R�R�(R�R�(R�R�(R�R�(R�R�(R�R�(R�R�i	Ni(R�R�iNi(R�R�i
Ni(R�R�i	i�i(R�s(Not Privileged or Windows9x or Installedi�(R�s.Privileged and not Windows9x and not Installedi�(R�s
Not Installedi�(R�s,Installed AND NOT RESUME AND NOT Preselectedi�(R�Ni(RzR
R1R	R�R�RRR R"RteventtFalsetcontrolRRtmappingRFRnR<R�t	conditionR&t
radiogrouptadd(RRztxtyRRRtmodaltmodelesstfatalR-t	user_exittexit_dialogtinuseterrorR"tcostingtpreptseldlgtorderRfR�tinstall_other_condtdont_install_other_condtcostt
whichuserstgtprogresstmaint((s3/usr/lib64/python2.7/distutils/command/bdist_msi.pyR��s�	
	
	
	



	
	.......$$$
!!


	

	"

%
cCsT|jr%d||j|jf}nd||jf}tjj|j|�}|S(Ns%s.%s-py%s.msis	%s.%s.msi(R7R3RCRDRER8(RR�t	base_nameR�((s3/usr/lib64/python2.7/distutils/command/bdist_msi.pyRo�s	(R'R(tdescriptionR1Rtuser_optionstboolean_optionsRIR�R=RORlR�R�R�R�Ro(((s3/usr/lib64/python2.7/distutils/command/bdist_msi.pyR*TsP
			
	)	[	6	6	&	�>(R)ReRCt	sysconfigRtdistutils.coreRtdistutils.dir_utilRtdistutils.versionRtdistutils.errorsRt	distutilsRtdistutils.utilRRwRRR	R
RRR
RR*(((s3/usr/lib64/python2.7/distutils/command/bdist_msi.pyt<module>s"=PKW[�ˣA�A�Acommand/install.pycnu�[����
{fc@s�dZddlmZdZddlZddlZddlZddlTddlm	Z	ddl
mZddlm
Z
dd	lmZdd
lmZddlmZmZmZddlmZdd
lmZddlmZddlmZejdkr1idd6dd6dd6dd6dd6Zn)idd6dd6dd6dd6dd6Ziidd6dd6dd6dd6dd6d6idd6d d6d!d6dd6dd6d"6id#d6d#d6d$d6d%d6d&d6d'6ed(6id#d6d#d6d)d6d*d6d&d6d+6idd6dd6dd6dd6dd6d,6id#d6d#d6d$d6d%d6d&d6d-6Zd0Zd.e	fd/��YZdS(1sFdistutils.command.install

Implements the Distutils 'install' command.i����(tlogs$Id$N(t*(tCommand(tDEBUG(tget_config_vars(tDistutilsPlatformError(t
write_file(tconvert_patht
subst_varstchange_root(tget_platform(tDistutilsOptionError(t	USER_BASE(t	USER_SITEs2.2s$basetpurelibtplatlibs$base/Include/$dist_nametheaderss
$base/Scriptstscriptstdatas$base/Lib/site-packagess/$base/lib/python$py_version_short/site-packagess5$platbase/lib64/python$py_version_short/site-packagess0$base/include/python$py_version_short/$dist_names	$base/bintunix_prefixs$base/lib/pythons$base/lib64/pythons$base/include/python/$dist_namet	unix_homes	$usersites4$userbase/include/python$py_version_short/$dist_names
$userbase/bins	$userbaset	unix_usertnts4$userbase/Python$py_version_nodot/Include/$dist_names$userbase/Scriptstnt_usertos2tos2_hometinstallcBs�eZdZdHdIdJddGdefdKddGdd
fdLdMdNddGddfdOdPdQdRdSdTdUdVdWgZdd%d(dgZidd 6Zd,�Zd-�Z	d.�Z
d/�Zd0�Zd1�Z
d2�Zd3�Zd4�Zd5�Zd6�Zd7�Zd8�Zd9�Zd:�Zd;�Zd<�Zd=�Zd>�Zd?�Zd@�ZdAefdBefdCefdDefdEdF�fgZRS(Xs'install everything from build directorysprefix=sinstallation prefixsexec-prefix=s.(Unix only) prefix for platform-specific filesshome=s+(Unix only) home directory to install undertusers!install in user site-package '%s's
install-base=s;base installation directory (instead of --prefix or --home)sinstall-platbase=s8base installation directory for platform-specific files s$(instead of --exec-prefix or --home)sroot=s<install everything relative to this alternate root directorysinstall-purelib=s;installation directory for pure Python module distributionssinstall-platlib=s8installation directory for non-pure module distributionssinstall-lib=s4installation directory for all module distributions s3(overrides --install-purelib and --install-platlib)sinstall-headers=s(installation directory for C/C++ headerssinstall-scripts=s)installation directory for Python scriptss
install-data=s%installation directory for data filestcompiletcscompile .py to .pyc [default]s
no-compilesdon't compile .py filess	optimize=tOslalso compile with optimization: -O1 for "python -O", -O2 for "python -OO", and -O0 to disable [default: -O0]tforcetfs1force installation (overwrite any existing files)s
skip-builds2skip rebuilding everything (for testing/debugging)srecord=s3filename in which to record list of installed filescCs�d|_d|_d|_d|_d|_d|_d|_d|_d|_	d|_
d|_d|_d|_
t|_t|_d|_d|_d|_d|_d|_d|_d|_d|_d|_d|_dS(Nii(tNonetprefixtexec_prefixthomeRtinstall_basetinstall_platbasetroottinstall_purelibtinstall_platlibtinstall_headerstinstall_libtinstall_scriptstinstall_dataRtinstall_userbaseR
tinstall_usersiteRtoptimizet
extra_pathtinstall_path_fileRt
skip_buildtwarn_dirt
build_baset	build_libtrecord(tself((s1/usr/lib64/python2.7/distutils/command/install.pytinitialize_options�s2																	
							c	CsL|js|js|jr=|js-|jr=tdd�n|jrd|jsX|jrdtd�n|jr�|js�|js�|js�|js�|jr�td��ntjdkr�|jr�|j	d�d|_q�n|jd�tjdkr|j�n
|j
�|jd�tjtj�d	}td
d�\}}i|jj�d6|jj�d
6|jj�d6|d6|d	d!d6|d	|dd6|d6|d
6|d6|d6|jd6|jd6|_|j�|jd�|j|jd<|j|jd<tr;ddlm}dGH||j�n|j�|jd�|jrh|j�n|jdkr�|jj r�|j!|_q�|j"|_n|j#dd d!d"d#d$dd�|j$�|j|_%tj&j'|j|j(�|_|j)dk	r(|j*d%dd d!d"d#d$�n|jd&�|j+d'd*d+�dS(,Ns.must supply either prefix/exec-prefix/home or s)install-base/install-platbase -- not boths9must supply either home or prefix/exec-prefix -- not bothsGcan't combine user with prefix, exec_prefix/home, or install_(plat)basetposixs+exec-prefix option ignored on this platformspre-finalize_{unix,other}spost-finalize_{unix,other}()iR"R#t	dist_nametdist_versiont
dist_fullnamet
py_versionitpy_version_shortitpy_version_nodott
sys_prefixtsys_exec_prefixtuserbasetusersitespost-expand_basedirs()tbasetplatbasei����(tpprintsconfig vars:spost-expand_dirs()tlibRRRRRtlibbasesafter prepending roottbuildR5R6(R5R5(R6R6(,R"R#R$R%R&RRtostnametwarnR!t	dump_dirst
finalize_unixtfinalize_othertstringtsplittsystversionRtdistributiontget_nametget_versiontget_fullnameR.R/tconfig_varstexpand_basedirsRRGtexpand_dirstcreate_home_pathR+text_modulesR)R(t
convert_pathsthandle_extra_pathtinstall_libbasetpathtjoint
extra_dirsR'tchange_rootstset_undefined_options(R8R>R"R#RG((s1/usr/lib64/python2.7/distutils/command/install.pytfinalize_options�s~
	$	










	
	


	cCs�tr�ddlm}|dGHx�|jD]�}|d}|ddkrY|dd!}n||jkr�tj|j||�}t||�}n!tj||�}t||�}d||fGHq)WndS(Ni����(t
longopt_xlatet:it=s  %s: %s(Rtdistutils.fancy_getoptRgtuser_optionstnegative_optRQt	translatetgetattr(R8tmsgRgtopttopt_nametval((s1/usr/lib64/python2.7/distutils/command/install.pyRN~s	
	cCs�|jdk	s|jdk	r�|jdkrK|jdkrK|jdksx|jdksx|jdksx|jdkr�t	d�ndS|j
r�|jdkr�td��n|j|_|_|j
d�n�|jdk	r|j|_|_|j
d�n�|jdkra|jdk	r.t	d�ntjjtj�|_tjjtj�|_n|jdkr|j|_n|j|_|j|_|j
d�dS(NsPinstall-base or install-platbase supplied, but installation scheme is incompletes$User base directory is not specifiedRRs*must not supply exec-prefix without prefixR(R%R!R&R+R(R)R*R,R-RRR.Rt
select_schemeR$R"R#RKRatnormpathRS(R8((s1/usr/lib64/python2.7/distutils/command/install.pyRO�s<			cCs�|jrQ|jdkr'td��n|j|_|_|jtjd�n�|j	dk	r�|j	|_|_|jd�nu|j
dkr�tjjt
j
�|_
n|j
|_|_y|jtj�Wn!tk
r�tdtj�nXdS(Ns$User base directory is not specifiedt_userRs)I don't know how to install stuff on '%s'(RR.R!RR%R&RsRKRLR$R"RaRtRStKeyError(R8((s1/usr/lib64/python2.7/distutils/command/install.pyRP�s"	
cCsUt|}xDtD]<}d|}t||�dkrt||||�qqWdS(Ntinstall_(tINSTALL_SCHEMEStSCHEME_KEYSRnR!tsetattr(R8RLtschemetkeytattrname((s1/usr/lib64/python2.7/distutils/command/install.pyRs�s



cCs�x�|D]y}t||�}|dk	rtjdksFtjdkr[tjj|�}nt||j�}t|||�qqWdS(NR:R(	RnR!RKRLRat
expanduserRRYRz(R8tattrstattrRr((s1/usr/lib64/python2.7/distutils/command/install.pyt
_expand_attrs�s
cCs|jdddg�dS(NR%R&R'(R�(R8((s1/usr/lib64/python2.7/distutils/command/install.pyRZ�s	cCs#|jddddddg�dS(NR(R)R+R*R,R-(R�(R8((s1/usr/lib64/python2.7/distutils/command/install.pyR[�s	cGs>x7|D]/}d|}t||tt||���qWdS(NRw(RzRRn(R8tnamesRLR�((s1/usr/lib64/python2.7/distutils/command/install.pyR^�s

cCs�|jdkr!|jj|_n|jdk	r�t|j�tkr`tj|jd�|_nt|j�dkr�|jd}}n0t|j�dkr�|j\}}n	td�t	|�}nd}d}||_
||_dS(Nt,iiisY'extra_path' option must be a list, tuple, or comma-separated string with 1 or 2 elementst(R1R!RUttypet
StringTypeRQRRtlenRRt	path_fileRc(R8R�Rc((s1/usr/lib64/python2.7/distutils/command/install.pyR_�s 	c	GsDx=|D]5}d|}t||t|jt||���qWdS(NRw(RzR	R'Rn(R8R�RLR�((s1/usr/lib64/python2.7/distutils/command/install.pyRds

cCs�|js
dSttjjd��}xc|jj�D]R\}}|j|�r5tjj|�r5|j	d|�tj
|d�q5q5WdS(s#Create directories under ~
        Nt~sos.makedirs('%s', 0700)i�(RRRKRaR~RYt	iteritemst
startswithtisdirtdebug_printtmakedirs(R8R$RLRa((s1/usr/lib64/python2.7/distutils/command/install.pyR\"s	"cCs�|jsU|jd�|jjd�j}|jrU|t�krUtd��qUnx!|j�D]}|j|�qbW|j	r�|j
�n|jr|j�}|j
r�t|j
�}x/tt|��D]}|||||<q�Wn|jt|j|fd|j�nttjjtj�}ttjj|�}tjjtjj|j��}|jr�|j	oz|jr�||kr�tjd|j�ndS(NRJs"Can't install when cross-compilings'writing list of installed files to '%s's�modules installed to '%s', which is not in Python's module search path (sys.path) -- you'll have to change the search path yourself(R3trun_commandRUtget_command_objt	plat_nameR4R
Rtget_sub_commandsR�tcreate_path_fileR7tget_outputsR'R�txrangetexecuteRtmapRKRaRtRStnormcaseR+R2Rtdebug(R8t
build_plattcmd_nametoutputstroot_lentcountertsys_pathR+((s1/usr/lib64/python2.7/distutils/command/install.pytrun/s6	
	
			!		cCsctjj|j|jd�}|jrN|jt||jgfd|�n|j	d|�dS(Ns.pthscreating %sspath file '%s' not created(
RKRaRbR`R�R2R�RRcRM(R8tfilename((s1/usr/lib64/python2.7/distutils/command/install.pyR�]s		cCs�g}xV|j�D]H}|j|�}x0|j�D]"}||kr5|j|�q5q5WqW|jr�|jr�|jtjj|j	|jd��n|S(Ns.pth(
R�tget_finalized_commandR�tappendR�R2RKRaRbR`(R8R�R�tcmdR�((s1/usr/lib64/python2.7/distutils/command/install.pyR�jscCsCg}x6|j�D](}|j|�}|j|j��qW|S(N(R�R�textendt
get_inputs(R8tinputsR�R�((s1/usr/lib64/python2.7/distutils/command/install.pyR�{s
cCs|jj�p|jj�S(sRReturn true if the current distribution has any Python
        modules to install.(RUthas_pure_modulesthas_ext_modules(R8((s1/usr/lib64/python2.7/distutils/command/install.pythas_lib�scCs
|jj�S(N(RUthas_headers(R8((s1/usr/lib64/python2.7/distutils/command/install.pyR��scCs
|jj�S(N(RUthas_scripts(R8((s1/usr/lib64/python2.7/distutils/command/install.pyR��scCs
|jj�S(N(RUthas_data_files(R8((s1/usr/lib64/python2.7/distutils/command/install.pythas_data�sR+R*R,R-tinstall_egg_infocCstS(N(tTrue(R8((s1/usr/lib64/python2.7/distutils/command/install.pyt<lambda>�R�N(sprefix=Nsinstallation prefix(sexec-prefix=Ns.(Unix only) prefix for platform-specific files(shome=Ns+(Unix only) home directory to install under(s
install-base=Ns;base installation directory (instead of --prefix or --home)(sroot=Ns<install everything relative to this alternate root directory(sinstall-purelib=Ns;installation directory for pure Python module distributions(sinstall-platlib=Ns8installation directory for non-pure module distributions(sinstall-headers=Ns(installation directory for C/C++ headers(sinstall-scripts=Ns)installation directory for Python scripts(s
install-data=Ns%installation directory for data files(RRscompile .py to .pyc [default](s
no-compileNsdon't compile .py files(s	optimize=Rslalso compile with optimization: -O1 for "python -O", -O2 for "python -OO", and -O0 to disable [default: -O0](RR s1force installation (overwrite any existing files)(s
skip-buildNs2skip rebuilding everything (for testing/debugging)(srecord=Ns3filename in which to record list of installed files(t__name__t
__module__tdescriptionR!R
Rktboolean_optionsRlR9RfRNRORPRsR�RZR[R^R_RdR\R�R�R�R�R�R�R�R�tsub_commands(((s1/usr/lib64/python2.7/distutils/command/install.pyR^s�
	
	M	�		+				
					"		
	.	
										(RRRRR( t__doc__t	distutilsRt__revision__RSRKRQttypestdistutils.coreRtdistutils.debugRtdistutils.sysconfigRtdistutils.errorsRtdistutils.file_utilRtdistutils.utilRRR	R
RtsiteRR
RTtWINDOWS_SCHEMERxRyR(((s1/usr/lib64/python2.7/distutils/command/install.pyt<module>s�$


PKW[d�7�'�'command/register.pycnu�[����
{fc@szdZdZddlZddlZddlZddlmZddlmZddl	m
Z
defd��YZdS(	shdistutils.command.register

Implements the Distutils 'register' command (register with the repository).
s$Id$i����N(twarn(t
PyPIRCCommand(tlogtregistercBs�eZdZejddgZejdddgZdd�fgZd�Zd	�Z	d
�Z
d�Zd�Zd
�Z
d�Zd�Zd�Zdd�ZRS(s7register the distribution with the Python package indexslist-classifierss list the valid Trove classifierststrictsBWill stop the registering if the meta-data are not fully complianttverifytcheckcCstS(N(tTrue(tself((s2/usr/lib64/python2.7/distutils/command/register.pyt<lambda>tcCs#tj|�d|_d|_dS(Ni(Rtinitialize_optionstlist_classifiersR(R((s2/usr/lib64/python2.7/distutils/command/register.pyR s
	cCs>tj|�id|jfd6dd6}||jjd<dS(NRRitrestructuredtextR(Ri(Rtfinalize_optionsRtdistributiontcommand_options(Rt
check_options((s2/usr/lib64/python2.7/distutils/command/register.pyR%s

cCsr|j�|j�x!|j�D]}|j|�q!W|jrN|j�n |jrd|j�n
|j�dS(N(	Rt_set_configtget_sub_commandstrun_commandtdry_runtverify_metadataRtclassifierst
send_metadata(Rtcmd_name((s2/usr/lib64/python2.7/distutils/command/register.pytrun,s

	
	
cCsLtdt�|jjd�}|j�|j|_d|_|j�dS(sDeprecated API.sddistutils.command.register.check_metadata is deprecated,               use the check command insteadRiN(RtPendingDeprecationWarningRtget_command_objtensure_finalizedRR
R(RR((s2/usr/lib64/python2.7/distutils/command/register.pytcheck_metadata;s

	cCs�|j�}|ikrX|d|_|d|_|d|_|d|_t|_nU|jd|jfkr�td|j��n|jdkr�|j|_nt	|_dS(s: Reads the configuration file and set attributes.
        tusernametpasswordt
repositorytrealmtpypis%s not found in .pypircN(
t_read_pypircRR R!R"Rt
has_configtDEFAULT_REPOSITORYt
ValueErrortFalse(Rtconfig((s2/usr/lib64/python2.7/distutils/command/register.pyREs



cCs-tj|jd�}tj|j��dS(s8 Fetch the list of classifiers from the server.
        s?:action=list_classifiersN(turllib2turlopenR!Rtinfotread(Rtresponse((s2/usr/lib64/python2.7/distutils/command/register.pyRVscCs9|j|jd��\}}tjd||f�dS(sF Send the metadata to the package index server to be checked.
        RsServer response (%s): %sN(tpost_to_servertbuild_post_dataRR,(Rtcodetresult((s2/usr/lib64/python2.7/distutils/command/register.pyR\sc
Cs�|jr$d}|j}|j}nd}d}}dj�}xO||kr�|jdtj�t�}|szd}qC||krCdGHqCqCW|dkrx|s�td�}q�Wx|s�tjd�}q�Wt	j
�}tj|j�d	}|j
|j|||�|j|jd
�|�\}}|jd||ftj�|dkr�|jrp||j_q|jd
tj�|jd|j�tj�d}x1|j�dkr�td�}|s�d}q�q�W|j�dkr|j||�qq�n�|dkroidd6}	d|	d<|	d<|	d<d#|	d<x|	dsbtd�|	d<qEWx�|	d|	dkr�x!|	ds�tjd�|	d<q}Wx!|	ds�tjd�|	d<q�W|	d|	dkrfd|	d<d#|	d<dGHqfqfWx|	dstd�|	d<q�W|j|	�\}}|dkrRtjd||f�q�tjd�tjd�ns|d kr�id!d6}	d|	d<x|	ds�td"�|	d<q�W|j|	�\}}tjd||f�nd#S($s_ Send the metadata to the package index server.

            Well, do the following:
            1. figure who the user is, and then
            2. send the data as a Basic auth'ed POST.

            First we try to read the username/password from $HOME/.pypirc,
            which is a ConfigParser-formatted file with a section
            [distutils] containing username and password entries (both
            in clear text). Eg:

                [distutils]
                index-servers =
                    pypi

                [pypi]
                username: fred
                password: sekrit

            Otherwise, to figure who the user is, we offer the user three
            choices:

             1. use existing login,
             2. register as a new user, or
             3. set the password to a random string and email the user.

        t1txR
s1 2 3 4s�We need to know who you are, so please choose either:
 1. use your existing login,
 2. register as a new user,
 3. have the server generate a new password for you (and email it to you), or
 4. quit
Your selection [default 1]: s&Please choose one of the four options!s
Username: s
Password: itsubmitsServer response (%s): %si�sAI can store your PyPI login so future submissions will be faster.s (the login will be stored in %s)tXtynsSave your login (y/N)?tntyt2tusers:actiontnameR temailtconfirms
 Confirm: s!Password and confirm don't match!s
   EMail: s"You will receive an email shortly.s7Follow the instructions in it to complete registration.t3tpassword_resetsYour email address: N(R%RR tsplittannounceRtINFOt	raw_inputtgetpassR*tHTTPPasswordMgrturlparseR!tadd_passwordR"R/R0Rt_get_rc_filetlowert
_store_pypirctNoneR,(
RtchoiceRR tchoicestauththostR1R2tdata((s2/usr/lib64/python2.7/distutils/command/register.pyRds�		

				
		
	












cCs|jj}i|d6dd6|j�d6|j�d6|j�d6|j�d6|j�d6|j�d	6|j�d
6|j	�d6|j
�d6|j�d
6|j�d6|j
�d6|j�d6|j�d6|j�d6}|ds|ds|drd|d<n|S(Ns:actions1.0tmetadata_versionR<tversiontsummaryt	home_pagetauthortauthor_emailtlicensetdescriptiontkeywordstplatformRtdownload_urltprovidestrequirest	obsoletess1.1(Rtmetadatatget_nametget_versiontget_descriptiontget_urltget_contacttget_contact_emailtget_licencetget_long_descriptiontget_keywordst
get_platformstget_classifierstget_download_urltget_providestget_requirest
get_obsoletes(RtactiontmetaRQ((s2/usr/lib64/python2.7/distutils/command/register.pyR0�s,














cCs�d|kr3|jd|d|jftj�nd}d|}|d}g}x�|j�D]�\}}t|�tg�td�fkr�|g}nxl|D]d}|j|�|jd|�|jd�|j|�|r�|dd	kr�|jd
�q�q�Wq`W|j|�|jd
�g}	xC|D];}
t|
t�rd|	j|
j	d��q6|	j|
�q6Wdj
|	�}	id
|d6tt|	��d6}t
j|j|	|�}t
jt
jd|��}
d}y|
j|�}Wnjt
jk
r9}|jr$|jj�}n|j|jf}nFt
jk
r`}dt|�f}nX|jry|j�}nd}|jr�dd}|jd|||f�n|S(sC Post a query to the server, and return a string response.
        R<sRegistering %s to %ss3--------------GHSKFJDLGDS7543FJKLFHRE75642756743254s
--s--s*
Content-Disposition: form-data; name="%s"s

i����s
s
sutf-8R
s/multipart/form-data; boundary=%s; charset=utf-8sContent-typesContent-lengthtpassword_mgri�i�tOKt-iKs%s%s%s((i�Rs(RBR!RRCtitemsttypetappendt
isinstancetunicodetencodetjointstrtlenR*tRequesttbuild_openertHTTPBasicAuthHandlertopent	HTTPErrort
show_responsetfpR-R1tmsgtURLError(RRQROtboundarytsep_boundarytend_boundarytchunkstkeytvaluetbodytchunktheaderstreqtopenerR2tetdashes((s2/usr/lib64/python2.7/distutils/command/register.pyR/�s`



$






			
N(slist-classifiersNs list the valid Trove classifiers(RNsBWill stop the registering if the meta-data are not fully compliant(t__name__t
__module__RYRtuser_optionsRLtboolean_optionstsub_commandsRRRRRRRRR0R/(((s2/usr/lib64/python2.7/distutils/command/register.pyRs&
				
				{	(t__doc__t__revision__R*RERGtwarningsRtdistutils.coreRt	distutilsRR(((s2/usr/lib64/python2.7/distutils/command/register.pyt<module>sPKW[V�0e~~ command/build_ext.py.debug-buildnu�[���"""distutils.command.build_ext

Implements the Distutils 'build_ext' command, for building extension
modules (currently limited to C extensions, should accommodate C++
extensions ASAP)."""

# This module should be kept compatible with Python 2.1.

__revision__ = "$Id$"

import sys, os, string, re
from types import *
from site import USER_BASE, USER_SITE
from distutils.core import Command
from distutils.errors import *
from distutils.sysconfig import customize_compiler, get_python_version
from distutils.dep_util import newer_group
from distutils.extension import Extension
from distutils.util import get_platform
from distutils import log

if os.name == 'nt':
    from distutils.msvccompiler import get_build_version
    MSVC_VERSION = int(get_build_version())

# An extension name is just a dot-separated list of Python NAMEs (ie.
# the same as a fully-qualified module name).
extension_name_re = re.compile \
    (r'^[a-zA-Z_][a-zA-Z_0-9]*(\.[a-zA-Z_][a-zA-Z_0-9]*)*$')


def show_compilers ():
    from distutils.ccompiler import show_compilers
    show_compilers()


class build_ext (Command):

    description = "build C/C++ extensions (compile/link to build directory)"

    # XXX thoughts on how to deal with complex command-line options like
    # these, i.e. how to make it so fancy_getopt can suck them off the
    # command line and make it look like setup.py defined the appropriate
    # lists of tuples of what-have-you.
    #   - each command needs a callback to process its command-line options
    #   - Command.__init__() needs access to its share of the whole
    #     command line (must ultimately come from
    #     Distribution.parse_command_line())
    #   - it then calls the current command class' option-parsing
    #     callback to deal with weird options like -D, which have to
    #     parse the option text and churn out some custom data
    #     structure
    #   - that data structure (in this case, a list of 2-tuples)
    #     will then be present in the command object by the time
    #     we get to finalize_options() (i.e. the constructor
    #     takes care of both command-line and client options
    #     in between initialize_options() and finalize_options())

    sep_by = " (separated by '%s')" % os.pathsep
    user_options = [
        ('build-lib=', 'b',
         "directory for compiled extension modules"),
        ('build-temp=', 't',
         "directory for temporary files (build by-products)"),
        ('plat-name=', 'p',
         "platform name to cross-compile for, if supported "
         "(default: %s)" % get_platform()),
        ('inplace', 'i',
         "ignore build-lib and put compiled extensions into the source " +
         "directory alongside your pure Python modules"),
        ('include-dirs=', 'I',
         "list of directories to search for header files" + sep_by),
        ('define=', 'D',
         "C preprocessor macros to define"),
        ('undef=', 'U',
         "C preprocessor macros to undefine"),
        ('libraries=', 'l',
         "external C libraries to link with"),
        ('library-dirs=', 'L',
         "directories to search for external C libraries" + sep_by),
        ('rpath=', 'R',
         "directories to search for shared C libraries at runtime"),
        ('link-objects=', 'O',
         "extra explicit link objects to include in the link"),
        ('debug', 'g',
         "compile/link with debugging information"),
        ('force', 'f',
         "forcibly build everything (ignore file timestamps)"),
        ('compiler=', 'c',
         "specify the compiler type"),
        ('swig-cpp', None,
         "make SWIG create C++ files (default is C)"),
        ('swig-opts=', None,
         "list of SWIG command line options"),
        ('swig=', None,
         "path to the SWIG executable"),
        ('user', None,
         "add user include, library and rpath"),
        ]

    boolean_options = ['inplace', 'debug', 'force', 'swig-cpp', 'user']

    help_options = [
        ('help-compiler', None,
         "list available compilers", show_compilers),
        ]

    def initialize_options (self):
        self.extensions = None
        self.build_lib = None
        self.plat_name = None
        self.build_temp = None
        self.inplace = 0
        self.package = None

        self.include_dirs = None
        self.define = None
        self.undef = None
        self.libraries = None
        self.library_dirs = None
        self.rpath = None
        self.link_objects = None
        self.debug = None
        self.force = None
        self.compiler = None
        self.swig = None
        self.swig_cpp = None
        self.swig_opts = None
        self.user = None

    def finalize_options(self):
        from distutils import sysconfig

        self.set_undefined_options('build',
                                   ('build_lib', 'build_lib'),
                                   ('build_temp', 'build_temp'),
                                   ('compiler', 'compiler'),
                                   ('debug', 'debug'),
                                   ('force', 'force'),
                                   ('plat_name', 'plat_name'),
                                   )

        if self.package is None:
            self.package = self.distribution.ext_package

        self.extensions = self.distribution.ext_modules

        # Make sure Python's include directories (for Python.h, pyconfig.h,
        # etc.) are in the include search path.
        py_include = sysconfig.get_python_inc()
        plat_py_include = sysconfig.get_python_inc(plat_specific=1)
        if self.include_dirs is None:
            self.include_dirs = self.distribution.include_dirs or []
        if isinstance(self.include_dirs, str):
            self.include_dirs = self.include_dirs.split(os.pathsep)

        # Put the Python "system" include dir at the end, so that
        # any local include dirs take precedence.
        self.include_dirs.append(py_include)
        if plat_py_include != py_include:
            self.include_dirs.append(plat_py_include)

        self.ensure_string_list('libraries')
        self.ensure_string_list('link_objects')

        # Life is easier if we're not forever checking for None, so
        # simplify these options to empty lists if unset
        if self.libraries is None:
            self.libraries = []
        if self.library_dirs is None:
            self.library_dirs = []
        elif type(self.library_dirs) is StringType:
            self.library_dirs = string.split(self.library_dirs, os.pathsep)

        if self.rpath is None:
            self.rpath = []
        elif type(self.rpath) is StringType:
            self.rpath = string.split(self.rpath, os.pathsep)

        # for extensions under windows use different directories
        # for Release and Debug builds.
        # also Python's library directory must be appended to library_dirs
        if os.name == 'nt':
            # the 'libs' directory is for binary installs - we assume that
            # must be the *native* platform.  But we don't really support
            # cross-compiling via a binary install anyway, so we let it go.
            self.library_dirs.append(os.path.join(sys.exec_prefix, 'libs'))
            if self.debug:
                self.build_temp = os.path.join(self.build_temp, "Debug")
            else:
                self.build_temp = os.path.join(self.build_temp, "Release")

            # Append the source distribution include and library directories,
            # this allows distutils on windows to work in the source tree
            self.include_dirs.append(os.path.join(sys.exec_prefix, 'PC'))
            if MSVC_VERSION == 9:
                # Use the .lib files for the correct architecture
                if self.plat_name == 'win32':
                    suffix = ''
                else:
                    # win-amd64 or win-ia64
                    suffix = self.plat_name[4:]
                # We could have been built in one of two places; add both
                for d in ('PCbuild',), ('PC', 'VS9.0'):
                    new_lib = os.path.join(sys.exec_prefix, *d)
                    if suffix:
                        new_lib = os.path.join(new_lib, suffix)
                    self.library_dirs.append(new_lib)

            elif MSVC_VERSION == 8:
                self.library_dirs.append(os.path.join(sys.exec_prefix,
                                         'PC', 'VS8.0'))
            elif MSVC_VERSION == 7:
                self.library_dirs.append(os.path.join(sys.exec_prefix,
                                         'PC', 'VS7.1'))
            else:
                self.library_dirs.append(os.path.join(sys.exec_prefix,
                                         'PC', 'VC6'))

        # OS/2 (EMX) doesn't support Debug vs Release builds, but has the
        # import libraries in its "Config" subdirectory
        if os.name == 'os2':
            self.library_dirs.append(os.path.join(sys.exec_prefix, 'Config'))

        # for extensions under Cygwin and AtheOS Python's library directory must be
        # appended to library_dirs
        if sys.platform[:6] == 'cygwin' or sys.platform[:6] == 'atheos':
            if sys.executable.startswith(os.path.join(sys.exec_prefix, "bin")):
                # building third party extensions
                self.library_dirs.append(os.path.join(sys.prefix, "lib",
                                                      "python" + get_python_version(),
                                                      "config"))
            else:
                # building python standard extensions
                self.library_dirs.append('.')

        # For building extensions with a shared Python library,
        # Python's library directory must be appended to library_dirs
        # See Issues: #1600860, #4366
        if (sysconfig.get_config_var('Py_ENABLE_SHARED')):
            if not sysconfig.python_build:
                # building third party extensions
                self.library_dirs.append(sysconfig.get_config_var('LIBDIR'))
            else:
                # building python standard extensions
                self.library_dirs.append('.')

        # The argument parsing will result in self.define being a string, but
        # it has to be a list of 2-tuples.  All the preprocessor symbols
        # specified by the 'define' option will be set to '1'.  Multiple
        # symbols can be separated with commas.

        if self.define:
            defines = self.define.split(',')
            self.define = map(lambda symbol: (symbol, '1'), defines)

        # The option for macros to undefine is also a string from the
        # option parsing, but has to be a list.  Multiple symbols can also
        # be separated with commas here.
        if self.undef:
            self.undef = self.undef.split(',')

        if self.swig_opts is None:
            self.swig_opts = []
        else:
            self.swig_opts = self.swig_opts.split(' ')

        # Finally add the user include and library directories if requested
        if self.user:
            user_include = os.path.join(USER_BASE, "include")
            user_lib = os.path.join(USER_BASE, "lib")
            if os.path.isdir(user_include):
                self.include_dirs.append(user_include)
            if os.path.isdir(user_lib):
                self.library_dirs.append(user_lib)
                self.rpath.append(user_lib)

    def run(self):
        from distutils.ccompiler import new_compiler

        # 'self.extensions', as supplied by setup.py, is a list of
        # Extension instances.  See the documentation for Extension (in
        # distutils.extension) for details.
        #
        # For backwards compatibility with Distutils 0.8.2 and earlier, we
        # also allow the 'extensions' list to be a list of tuples:
        #    (ext_name, build_info)
        # where build_info is a dictionary containing everything that
        # Extension instances do except the name, with a few things being
        # differently named.  We convert these 2-tuples to Extension
        # instances as needed.

        if not self.extensions:
            return

        # If we were asked to build any C/C++ libraries, make sure that the
        # directory where we put them is in the library search path for
        # linking extensions.
        if self.distribution.has_c_libraries():
            build_clib = self.get_finalized_command('build_clib')
            self.libraries.extend(build_clib.get_library_names() or [])
            self.library_dirs.append(build_clib.build_clib)

        # Setup the CCompiler object that we'll use to do all the
        # compiling and linking
        self.compiler = new_compiler(compiler=self.compiler,
                                     verbose=self.verbose,
                                     dry_run=self.dry_run,
                                     force=self.force)
        customize_compiler(self.compiler)
        # If we are cross-compiling, init the compiler now (if we are not
        # cross-compiling, init would not hurt, but people may rely on
        # late initialization of compiler even if they shouldn't...)
        if os.name == 'nt' and self.plat_name != get_platform():
            self.compiler.initialize(self.plat_name)

        # And make sure that any compile/link-related options (which might
        # come from the command-line or from the setup script) are set in
        # that CCompiler object -- that way, they automatically apply to
        # all compiling and linking done here.
        if self.include_dirs is not None:
            self.compiler.set_include_dirs(self.include_dirs)
        if self.define is not None:
            # 'define' option is a list of (name,value) tuples
            for (name, value) in self.define:
                self.compiler.define_macro(name, value)
        if self.undef is not None:
            for macro in self.undef:
                self.compiler.undefine_macro(macro)
        if self.libraries is not None:
            self.compiler.set_libraries(self.libraries)
        if self.library_dirs is not None:
            self.compiler.set_library_dirs(self.library_dirs)
        if self.rpath is not None:
            self.compiler.set_runtime_library_dirs(self.rpath)
        if self.link_objects is not None:
            self.compiler.set_link_objects(self.link_objects)

        # Now actually compile and link everything.
        self.build_extensions()

    def check_extensions_list(self, extensions):
        """Ensure that the list of extensions (presumably provided as a
        command option 'extensions') is valid, i.e. it is a list of
        Extension objects.  We also support the old-style list of 2-tuples,
        where the tuples are (ext_name, build_info), which are converted to
        Extension instances here.

        Raise DistutilsSetupError if the structure is invalid anywhere;
        just returns otherwise.
        """
        if not isinstance(extensions, list):
            raise DistutilsSetupError, \
                  "'ext_modules' option must be a list of Extension instances"

        for i, ext in enumerate(extensions):
            if isinstance(ext, Extension):
                continue                # OK! (assume type-checking done
                                        # by Extension constructor)

            if not isinstance(ext, tuple) or len(ext) != 2:
                raise DistutilsSetupError, \
                      ("each element of 'ext_modules' option must be an "
                       "Extension instance or 2-tuple")

            ext_name, build_info = ext

            log.warn(("old-style (ext_name, build_info) tuple found in "
                      "ext_modules for extension '%s' "
                      "-- please convert to Extension instance" % ext_name))

            if not (isinstance(ext_name, str) and
                    extension_name_re.match(ext_name)):
                raise DistutilsSetupError, \
                      ("first element of each tuple in 'ext_modules' "
                       "must be the extension name (a string)")

            if not isinstance(build_info, dict):
                raise DistutilsSetupError, \
                      ("second element of each tuple in 'ext_modules' "
                       "must be a dictionary (build info)")

            # OK, the (ext_name, build_info) dict is type-safe: convert it
            # to an Extension instance.
            ext = Extension(ext_name, build_info['sources'])

            # Easy stuff: one-to-one mapping from dict elements to
            # instance attributes.
            for key in ('include_dirs', 'library_dirs', 'libraries',
                        'extra_objects', 'extra_compile_args',
                        'extra_link_args'):
                val = build_info.get(key)
                if val is not None:
                    setattr(ext, key, val)

            # Medium-easy stuff: same syntax/semantics, different names.
            ext.runtime_library_dirs = build_info.get('rpath')
            if 'def_file' in build_info:
                log.warn("'def_file' element of build info dict "
                         "no longer supported")

            # Non-trivial stuff: 'macros' split into 'define_macros'
            # and 'undef_macros'.
            macros = build_info.get('macros')
            if macros:
                ext.define_macros = []
                ext.undef_macros = []
                for macro in macros:
                    if not (isinstance(macro, tuple) and len(macro) in (1, 2)):
                        raise DistutilsSetupError, \
                              ("'macros' element of build info dict "
                               "must be 1- or 2-tuple")
                    if len(macro) == 1:
                        ext.undef_macros.append(macro[0])
                    elif len(macro) == 2:
                        ext.define_macros.append(macro)

            extensions[i] = ext

    def get_source_files(self):
        self.check_extensions_list(self.extensions)
        filenames = []

        # Wouldn't it be neat if we knew the names of header files too...
        for ext in self.extensions:
            filenames.extend(ext.sources)

        return filenames

    def get_outputs(self):
        # Sanity check the 'extensions' list -- can't assume this is being
        # done in the same run as a 'build_extensions()' call (in fact, we
        # can probably assume that it *isn't*!).
        self.check_extensions_list(self.extensions)

        # And build the list of output (built) filenames.  Note that this
        # ignores the 'inplace' flag, and assumes everything goes in the
        # "build" tree.
        outputs = []
        for ext in self.extensions:
            outputs.append(self.get_ext_fullpath(ext.name))
        return outputs

    def build_extensions(self):
        # First, sanity-check the 'extensions' list
        self.check_extensions_list(self.extensions)

        for ext in self.extensions:
            self.build_extension(ext)

    def build_extension(self, ext):
        sources = ext.sources
        if sources is None or type(sources) not in (ListType, TupleType):
            raise DistutilsSetupError, \
                  ("in 'ext_modules' option (extension '%s'), " +
                   "'sources' must be present and must be " +
                   "a list of source filenames") % ext.name
        sources = list(sources)

        ext_path = self.get_ext_fullpath(ext.name)
        depends = sources + ext.depends
        if not (self.force or newer_group(depends, ext_path, 'newer')):
            log.debug("skipping '%s' extension (up-to-date)", ext.name)
            return
        else:
            log.info("building '%s' extension", ext.name)

        # First, scan the sources for SWIG definition files (.i), run
        # SWIG on 'em to create .c files, and modify the sources list
        # accordingly.
        sources = self.swig_sources(sources, ext)

        # Next, compile the source code to object files.

        # XXX not honouring 'define_macros' or 'undef_macros' -- the
        # CCompiler API needs to change to accommodate this, and I
        # want to do one thing at a time!

        # Two possible sources for extra compiler arguments:
        #   - 'extra_compile_args' in Extension object
        #   - CFLAGS environment variable (not particularly
        #     elegant, but people seem to expect it and I
        #     guess it's useful)
        # The environment variable should take precedence, and
        # any sensible compiler will give precedence to later
        # command line args.  Hence we combine them in order:
        extra_args = ext.extra_compile_args or []

        macros = ext.define_macros[:]
        for undef in ext.undef_macros:
            macros.append((undef,))

        objects = self.compiler.compile(sources,
                                         output_dir=self.build_temp,
                                         macros=macros,
                                         include_dirs=ext.include_dirs,
                                         debug=self.debug,
                                         extra_postargs=extra_args,
                                         depends=ext.depends)

        # XXX -- this is a Vile HACK!
        #
        # The setup.py script for Python on Unix needs to be able to
        # get this list so it can perform all the clean up needed to
        # avoid keeping object files around when cleaning out a failed
        # build of an extension module.  Since Distutils does not
        # track dependencies, we have to get rid of intermediates to
        # ensure all the intermediates will be properly re-built.
        #
        self._built_objects = objects[:]

        # Now link the object files together into a "shared object" --
        # of course, first we have to figure out all the other things
        # that go into the mix.
        if ext.extra_objects:
            objects.extend(ext.extra_objects)
        extra_args = ext.extra_link_args or []

        # Detect target language, if not provided
        language = ext.language or self.compiler.detect_language(sources)

        self.compiler.link_shared_object(
            objects, ext_path,
            libraries=self.get_libraries(ext),
            library_dirs=ext.library_dirs,
            runtime_library_dirs=ext.runtime_library_dirs,
            extra_postargs=extra_args,
            export_symbols=self.get_export_symbols(ext),
            debug=self.debug,
            build_temp=self.build_temp,
            target_lang=language)


    def swig_sources (self, sources, extension):

        """Walk the list of source files in 'sources', looking for SWIG
        interface (.i) files.  Run SWIG on all that are found, and
        return a modified 'sources' list with SWIG source files replaced
        by the generated C (or C++) files.
        """

        new_sources = []
        swig_sources = []
        swig_targets = {}

        # XXX this drops generated C/C++ files into the source tree, which
        # is fine for developers who want to distribute the generated
        # source -- but there should be an option to put SWIG output in
        # the temp dir.

        if self.swig_cpp:
            log.warn("--swig-cpp is deprecated - use --swig-opts=-c++")

        if self.swig_cpp or ('-c++' in self.swig_opts) or \
           ('-c++' in extension.swig_opts):
            target_ext = '.cpp'
        else:
            target_ext = '.c'

        for source in sources:
            (base, ext) = os.path.splitext(source)
            if ext == ".i":             # SWIG interface file
                new_sources.append(base + '_wrap' + target_ext)
                swig_sources.append(source)
                swig_targets[source] = new_sources[-1]
            else:
                new_sources.append(source)

        if not swig_sources:
            return new_sources

        swig = self.swig or self.find_swig()
        swig_cmd = [swig, "-python"]
        swig_cmd.extend(self.swig_opts)
        if self.swig_cpp:
            swig_cmd.append("-c++")

        # Do not override commandline arguments
        if not self.swig_opts:
            for o in extension.swig_opts:
                swig_cmd.append(o)

        for source in swig_sources:
            target = swig_targets[source]
            log.info("swigging %s to %s", source, target)
            self.spawn(swig_cmd + ["-o", target, source])

        return new_sources

    # swig_sources ()

    def find_swig (self):
        """Return the name of the SWIG executable.  On Unix, this is
        just "swig" -- it should be in the PATH.  Tries a bit harder on
        Windows.
        """

        if os.name == "posix":
            return "swig"
        elif os.name == "nt":

            # Look for SWIG in its standard installation directory on
            # Windows (or so I presume!).  If we find it there, great;
            # if not, act like Unix and assume it's in the PATH.
            for vers in ("1.3", "1.2", "1.1"):
                fn = os.path.join("c:\\swig%s" % vers, "swig.exe")
                if os.path.isfile(fn):
                    return fn
            else:
                return "swig.exe"

        elif os.name == "os2":
            # assume swig available in the PATH.
            return "swig.exe"

        else:
            raise DistutilsPlatformError, \
                  ("I don't know how to find (much less run) SWIG "
                   "on platform '%s'") % os.name

    # find_swig ()

    # -- Name generators -----------------------------------------------
    # (extension names, filenames, whatever)
    def get_ext_fullpath(self, ext_name):
        """Returns the path of the filename for a given extension.

        The file is located in `build_lib` or directly in the package
        (inplace option).
        """
        # makes sure the extension name is only using dots
        all_dots = string.maketrans('/'+os.sep, '..')
        ext_name = ext_name.translate(all_dots)

        fullname = self.get_ext_fullname(ext_name)
        modpath = fullname.split('.')
        filename = self.get_ext_filename(ext_name)
        filename = os.path.split(filename)[-1]

        if not self.inplace:
            # no further work needed
            # returning :
            #   build_dir/package/path/filename
            filename = os.path.join(*modpath[:-1]+[filename])
            return os.path.join(self.build_lib, filename)

        # the inplace option requires to find the package directory
        # using the build_py command for that
        package = '.'.join(modpath[0:-1])
        build_py = self.get_finalized_command('build_py')
        package_dir = os.path.abspath(build_py.get_package_dir(package))

        # returning
        #   package_dir/filename
        return os.path.join(package_dir, filename)

    def get_ext_fullname(self, ext_name):
        """Returns the fullname of a given extension name.

        Adds the `package.` prefix"""
        if self.package is None:
            return ext_name
        else:
            return self.package + '.' + ext_name

    def get_ext_filename(self, ext_name):
        r"""Convert the name of an extension (eg. "foo.bar") into the name
        of the file from which it will be loaded (eg. "foo/bar.so", or
        "foo\bar.pyd").
        """
        from distutils.sysconfig import get_config_var
        ext_path = string.split(ext_name, '.')
        # OS/2 has an 8 character module (extension) limit :-(
        if os.name == "os2":
            ext_path[len(ext_path) - 1] = ext_path[len(ext_path) - 1][:8]
        # extensions in debug_mode are named 'module_d.pyd' under windows
        so_ext = get_config_var('SO')
        if os.name == 'nt' and self.debug:
            return os.path.join(*ext_path) + '_d' + so_ext
        return os.path.join(*ext_path) + so_ext

    def get_export_symbols (self, ext):
        """Return the list of symbols that a shared extension has to
        export.  This either uses 'ext.export_symbols' or, if it's not
        provided, "init" + module_name.  Only relevant on Windows, where
        the .pyd file (DLL) must export the module "init" function.
        """
        initfunc_name = "init" + ext.name.split('.')[-1]
        if initfunc_name not in ext.export_symbols:
            ext.export_symbols.append(initfunc_name)
        return ext.export_symbols

    def get_libraries (self, ext):
        """Return the list of libraries to link against when building a
        shared extension.  On most platforms, this is just 'ext.libraries';
        on Windows and OS/2, we add the Python library (eg. python20.dll).
        """
        # The python library is always needed on Windows.  For MSVC, this
        # is redundant, since the library is mentioned in a pragma in
        # pyconfig.h that MSVC groks.  The other Windows compilers all seem
        # to need it mentioned explicitly, though, so that's what we do.
        # Append '_d' to the python import library on debug builds.
        if sys.platform == "win32":
            from distutils.msvccompiler import MSVCCompiler
            if not isinstance(self.compiler, MSVCCompiler):
                template = "python%d%d"
                if self.debug:
                    template = template + '_d'
                pythonlib = (template %
                       (sys.hexversion >> 24, (sys.hexversion >> 16) & 0xff))
                # don't extend ext.libraries, it may be shared with other
                # extensions, it is a reference to the original list
                return ext.libraries + [pythonlib]
            else:
                return ext.libraries
        elif sys.platform == "os2emx":
            # EMX/GCC requires the python library explicitly, and I
            # believe VACPP does as well (though not confirmed) - AIM Apr01
            template = "python%d%d"
            # debug versions of the main DLL aren't supported, at least
            # not at this time - AIM Apr01
            #if self.debug:
            #    template = template + '_d'
            pythonlib = (template %
                   (sys.hexversion >> 24, (sys.hexversion >> 16) & 0xff))
            # don't extend ext.libraries, it may be shared with other
            # extensions, it is a reference to the original list
            return ext.libraries + [pythonlib]
        elif sys.platform[:6] == "cygwin":
            template = "python%d.%d"
            pythonlib = (template %
                   (sys.hexversion >> 24, (sys.hexversion >> 16) & 0xff))
            # don't extend ext.libraries, it may be shared with other
            # extensions, it is a reference to the original list
            return ext.libraries + [pythonlib]
        elif sys.platform[:6] == "atheos":
            from distutils import sysconfig

            template = "python%d.%d"
            pythonlib = (template %
                   (sys.hexversion >> 24, (sys.hexversion >> 16) & 0xff))
            # Get SHLIBS from Makefile
            extra = []
            for lib in sysconfig.get_config_var('SHLIBS').split():
                if lib.startswith('-l'):
                    extra.append(lib[2:])
                else:
                    extra.append(lib)
            # don't extend ext.libraries, it may be shared with other
            # extensions, it is a reference to the original list
            return ext.libraries + [pythonlib, "m"] + extra

        elif sys.platform == 'darwin':
            # Don't use the default code below
            return ext.libraries
        elif sys.platform[:3] == 'aix':
            # Don't use the default code below
            return ext.libraries
        else:
            from distutils import sysconfig
            if sysconfig.get_config_var('Py_ENABLE_SHARED'):
                template = "python%d.%d"
                pythonlib = (template %
                             (sys.hexversion >> 24, (sys.hexversion >> 16) & 0xff))
                return ext.libraries + [pythonlib]
            else:
                return ext.libraries

# class build_ext
PKW[q+g��command/install_headers.pyonu�[����
{fc@s6dZdZddlmZdefd��YZdS(s�distutils.command.install_headers

Implements the Distutils 'install_headers' command, to install C/C++ header
files to the Python include directory.s$Id$i����(tCommandtinstall_headerscBsPeZdZdd
gZdgZd�Zd�Zd	�Zd
�Zd�Z	RS(sinstall C/C++ header filessinstall-dir=tds$directory to install header files totforcetfs-force installation (overwrite existing files)cCsd|_d|_g|_dS(Ni(tNonetinstall_dirRtoutfiles(tself((s9/usr/lib64/python2.7/distutils/command/install_headers.pytinitialize_optionss		cCs|jddd�dS(NtinstallRRR(RR(RR(tset_undefined_options(R((s9/usr/lib64/python2.7/distutils/command/install_headers.pytfinalize_optionss	cCsf|jj}|sdS|j|j�x9|D]1}|j||j�\}}|jj|�q-WdS(N(tdistributiontheaderstmkpathRt	copy_fileRtappend(RRtheadertoutt_((s9/usr/lib64/python2.7/distutils/command/install_headers.pytrun#s
cCs|jjpgS(N(R
R(R((s9/usr/lib64/python2.7/distutils/command/install_headers.pyt
get_inputs-scCs|jS(N(R(R((s9/usr/lib64/python2.7/distutils/command/install_headers.pytget_outputs0s(sinstall-dir=Rs$directory to install header files to(RRs-force installation (overwrite existing files)(
t__name__t
__module__tdescriptiontuser_optionstboolean_optionsR	RRRR(((s9/usr/lib64/python2.7/distutils/command/install_headers.pyRs					
	N(t__doc__t__revision__tdistutils.coreRR(((s9/usr/lib64/python2.7/distutils/command/install_headers.pyt<module>sPKW["�1�1command/config.pyonu�[����
{fc@s�dZdZddlZddlZddlmZddlmZddlm	Z	ddl
mZidd	6d
d6Zdefd
��YZ
ed�ZdS(s�distutils.command.config

Implements the Distutils 'config' command, a (mostly) empty command class
that exists mainly to be sub-classed by specific module distributions and
applications.  The idea is that while every "config" command is different,
at least they're all named the same, and users always see "config" in the
list of standard commands.  Also, this is a good place to put common
configure-like tasks: "try to compile this C code", or "figure out where
this header file lives".
s$Id$i����N(tCommand(tDistutilsExecError(tcustomize_compiler(tlogs.ctcs.cxxsc++tconfigcBs.eZdZd,d-d.d/d0d1d2d3d4g	Zd�Zd�Zd�Zd�Zd�Z	d�Z
d�Zd�Zd �Z
d+d+d+d!d"�Zd+d+d+d!d#�Zd+d+d!d$�Zd+d+d+d+d!d%�Zd+d+d+d+d!d&�Zd+d+d+d+d'd'd(�Zd+d+d+gd)�Zd+d+d!d*�ZRS(5sprepare to builds	compiler=sspecify the compiler typescc=sspecify the compiler executables
include-dirs=tIs.list of directories to search for header filessdefine=tDsC preprocessor macros to definesundef=tUs!C preprocessor macros to undefines
libraries=tls!external C libraries to link withs
library-dirs=tLs.directories to search for external C librariestnoisys1show every action (compile, link, run, ...) takensdump-sources=dump generated source files before attempting to compile themcCsLd|_d|_d|_d|_d|_d|_d|_g|_dS(Ni(	tNonetcompilertcctinclude_dirst	librariestlibrary_dirsRtdump_sourcet
temp_files(tself((s0/usr/lib64/python2.7/distutils/command/config.pytinitialize_options6s							cCs�|jdkr'|jjpg|_n-t|jt�rT|jjtj�|_n|jdkrog|_n$t|jt�r�|jg|_n|j	dkr�g|_	n-t|j	t�r�|j	jtj�|_	ndS(N(
RRtdistributiont
isinstancetstrtsplittostpathsepRR(R((s0/usr/lib64/python2.7/distutils/command/config.pytfinalize_optionsEscCsdS(N((R((s0/usr/lib64/python2.7/distutils/command/config.pytrunUscCs�ddlm}m}t|j|�s�|d|jd|jdd�|_t|j�|jrx|jj|j�n|j	r�|jj
|j	�n|jr�|jj|j�q�ndS(s^Check that 'self.compiler' really is a CCompiler object;
        if not, make it one.
        i����(t	CCompilertnew_compilerR
tdry_runtforceiN(
tdistutils.ccompilerRRRR
R RRtset_include_dirsRt
set_librariesRtset_library_dirs(RRR((s0/usr/lib64/python2.7/distutils/command/config.pyt_check_compiler]s
			cCs�dt|}t|d�}|rUx|D]}|jd|�q*W|jd�n|j|�|ddkr�|jd�n|j�|S(Nt_configtesttws#include <%s>
s
i����(tLANG_EXTtopentwritetclose(Rtbodytheaderstlangtfilenametfiletheader((s0/usr/lib64/python2.7/distutils/command/config.pyt_gen_temp_sourcefileps


cCsT|j|||�}d}|jj||g�|jj||d|�||fS(Ns
_configtest.iR(R3RtextendR
t
preprocess(RR-R.RR/tsrctout((s0/usr/lib64/python2.7/distutils/command/config.pyt_preprocess}s
cCs�|j|||�}|jr2t|d|�n|jj|g�\}|jj||g�|jj|gd|�||fS(Nscompiling '%s':R(R3Rt	dump_fileR
tobject_filenamesRR4tcompile(RR-R.RR/R6tobj((s0/usr/lib64/python2.7/distutils/command/config.pyt_compile�s	c
	Cs�|j||||�\}}tjjtjj|��d}	|jj|g|	d|d|d|�|jjdk	r�|	|jj}	n|j	j
|	�|||	fS(NiRRttarget_lang(R=RtpathtsplitexttbasenameR
tlink_executablet
exe_extensionRRtappend(
RR-R.RRRR/R6R<tprog((s0/usr/lib64/python2.7/distutils/command/config.pyt_link�s"cGsn|s|j}g|_ntjddj|��x3|D]+}ytj|�Wq;tk
req;Xq;WdS(Nsremoving: %st (RRtinfotjoinRtremovetOSError(Rt	filenamesR0((s0/usr/lib64/python2.7/distutils/command/config.pyt_clean�s	

RcCsbddlm}|j�d}y|j||||�Wn|k
rSd}nX|j�|S(sQConstruct a source file from 'body' (a string containing lines
        of C/C++ code) and 'headers' (a list of header files to include)
        and run it through the preprocessor.  Return true if the
        preprocessor succeeded, false if there were any errors.
        ('body' probably isn't of much use, but what the heck.)
        i����(tCompileErrorii(R"RNR&R8RM(RR-R.RR/RNtok((s0/usr/lib64/python2.7/distutils/command/config.pyttry_cpp�s



cCs�|j�|j||||�\}}t|t�rItj|�}nt|�}d}	x9|j�}
|
dkrzPn|j|
�r^d}	Pq^q^W|j	�|j
�|	S(s�Construct a source file (just like 'try_cpp()'), run it through
        the preprocessor, and return true if any line of the output matches
        'pattern'.  'pattern' should either be a compiled regex object or a
        string containing a regex.  If both 'body' and 'headers' are None,
        preprocesses an empty file -- which can be useful to determine the
        symbols the preprocessor and compiler set by default.
        iti(R&R8RRtreR;R*treadlinetsearchR,RM(RtpatternR-R.RR/R6R7R1tmatchtline((s0/usr/lib64/python2.7/distutils/command/config.pyt
search_cpp�s 	


cCs{ddlm}|j�y |j||||�d}Wn|k
rSd}nXtj|rfdpid�|j�|S(swTry to compile a source file built from 'body' and 'headers'.
        Return true on success, false otherwise.
        i����(RNiissuccess!sfailure.(R"RNR&R=RRHRM(RR-R.RR/RNRO((s0/usr/lib64/python2.7/distutils/command/config.pyttry_compile�s




c
Cs�ddlm}m}|j�y&|j||||||�d}	Wn||fk
red}	nXtj|	rxdp{d�|j�|	S(s�Try to compile and link a source file, built from 'body' and
        'headers', to executable form.  Return true on success, false
        otherwise.
        i����(RNt	LinkErroriissuccess!sfailure.(R"RNRZR&RFRRHRM(
RR-R.RRRR/RNRZRO((s0/usr/lib64/python2.7/distutils/command/config.pyttry_link�s




c
Cs�ddlm}m}|j�yA|j||||||�\}	}
}|j|g�d}Wn ||tfk
r�d}nXtj|r�dp�d�|j	�|S(s�Try to compile, link to an executable, and run a program
        built from 'body' and 'headers'.  Return true on success, false
        otherwise.
        i����(RNRZiissuccess!sfailure.(
R"RNRZR&RFtspawnRRRHRM(
RR-R.RRRR/RNRZR6R<texeRO((s0/usr/lib64/python2.7/distutils/command/config.pyttry_runs



ic	Cs�|j�g}|r*|jd|�n|jd�|rQ|jd|�n|jd|�|jd�dj|�d}|j|||||�S(s�Determine if function 'func' is available by constructing a
        source file that refers to 'func', and compiles and links it.
        If everything succeeds, returns true; otherwise returns false.

        The constructed source file starts out by including the header
        files listed in 'headers'.  If 'decl' is true, it then declares
        'func' (as "int func()"); you probably shouldn't supply 'headers'
        and set 'decl' true in the same call, or you might get errors about
        a conflicting declarations for 'func'.  Finally, the constructed
        'main()' function either references 'func' or (if 'call' is true)
        calls it.  'libraries' and 'library_dirs' are used when
        linking.
        s
int %s ();s
int main () {s  %s();s  %s;t}s
(R&RDRIR[(	RtfuncR.RRRtdecltcallR-((s0/usr/lib64/python2.7/distutils/command/config.pyt
check_funcs


cCs*|j�|jd|||g||�S(s�Determine if 'library' is available to be linked against,
        without actually checking that any particular symbols are provided
        by it.  'headers' will be used in constructing the source file to
        be compiled, but the only effect of this is to check if all the
        header files listed are available.  Any libraries listed in
        'other_libraries' will be included in the link, in case 'library'
        has symbols that depend on other libraries.
        sint main (void) { }(R&R[(RtlibraryRR.Rtother_libraries((s0/usr/lib64/python2.7/distutils/command/config.pyt	check_lib?s

	cCs|jddd|gd|�S(s�Determine if the system header file named by 'header_file'
        exists and can be found by the preprocessor; return true if so,
        false otherwise.
        R-s
/* No body */R.R(RP(RR2RRR/((s0/usr/lib64/python2.7/distutils/command/config.pytcheck_headerNsN(s	compiler=Nsspecify the compiler type(scc=Nsspecify the compiler executable(s
include-dirs=Rs.list of directories to search for header files(sdefine=RsC preprocessor macros to define(sundef=Rs!C preprocessor macros to undefine(s
libraries=R	s!external C libraries to link with(s
library-dirs=R
s.directories to search for external C libraries(RNs1show every action (compile, link, run, ...) taken(sdump-sourceNs=dump generated source files before attempting to compile them(t__name__t
__module__tdescriptionRtuser_optionsRRRR&R3R8R=RFRMRPRXRYR[R^RcRfRg(((s0/usr/lib64/python2.7/distutils/command/config.pyRsT						
								!cCsb|dkr tjd|�n
tj|�t|�}ztj|j��Wd|j�XdS(sjDumps a file content into log.info.

    If head is not None, will be dumped before the file content.
    s%sN(RRRHR*treadR,(R0theadR1((s0/usr/lib64/python2.7/distutils/command/config.pyR9Xs
(t__doc__t__revision__RRRtdistutils.coreRtdistutils.errorsRtdistutils.sysconfigRt	distutilsRR)RRR9(((s0/usr/lib64/python2.7/distutils/command/config.pyt<module>
s�APKW[V��11command/bdist.pyonu�[����
{fc@sqdZdZddlZddlmZddlmZddlmZm	Z	d�Z
defd	��YZdS(
sidistutils.command.bdist

Implements the Distutils 'bdist' command (create a built [binary]
distribution).s$Id$i����N(tget_platform(tCommand(tDistutilsPlatformErrortDistutilsOptionErrorcCslddlm}g}x6tjD]+}|jd|dtj|df�q W||�}|jd�dS(sFPrint list of available formats (arguments to "--format" option).
    i����(tFancyGetoptsformats=is'List of available distribution formats:N(tdistutils.fancy_getoptRtbdisttformat_commandstappendtNonetformat_commandt
print_help(Rtformatstformattpretty_printer((s//usr/lib64/python2.7/distutils/command/bdist.pytshow_formatssRc	Bs�eZdZd0ddde�fd2d3d4d5d6gZdgZdd1defgZd7Z	idd6dd6dd6Z
dddddd dd!gZid8d6d9d6d:d6d;d6d<d6d=d 6d>d6d?d!6Zd-�Z
d.�Zd/�ZRS(@s$create a built (binary) distributionsbdist-base=tbs4temporary directory for creating built distributionss
plat-name=tps;platform name to embed in generated filenames (default: %s)sformats=s/formats for distribution (comma-separated list)s	dist-dir=tds=directory to put final built distributions in [default: dist]s
skip-builds2skip rebuilding everything (for testing/debugging)sowner=tus@Owner name used when creating a tar file [default: current user]sgroup=tgsAGroup name used when creating a tar file [default: current group]shelp-formatss$lists available distribution formatst	bdist_rpmtgztartposixtziptnttos2trpmtbztartztarttartwininsttmsisRPM distributiont
bdist_dumbsgzip'ed tar filesbzip2'ed tar filescompressed tar filestar filet
bdist_wininstsWindows executable installersZIP filet	bdist_msisMicrosoft InstallercCsCd|_d|_d|_d|_d|_d|_d|_dS(Ni(R	t
bdist_baset	plat_nameRtdist_dirt
skip_buildtgrouptowner(tself((s//usr/lib64/python2.7/distutils/command/bdist.pytinitialize_optionsTs						cCs|jdkr?|jr't�|_q?|jd�j|_n|jdkr�|jd�j}tjj	|d|j�|_n|j
d�|jdkr�y|jtj
g|_Wq�tk
r�tddtj
�q�Xn|jdkr�d|_ndS(Ntbuildsbdist.Rs-don't know how to create built distributions son platform %stdist(R%R	R'Rtget_finalized_commandR$t
build_basetostpathtjointensure_string_listRtdefault_formattnametKeyErrorRR&(R*R/((s//usr/lib64/python2.7/distutils/command/bdist.pytfinalize_options]s$	

cCs
g}xN|jD]C}y|j|j|d�Wqtk
rRtd|�qXqWx�tt|j��D]�}||}|j|�}||jkr�|j||_	n|dkr�|j
|_
|j|_n|||dkr�d|_n|j
|�qmWdS(Nisinvalid format '%s'R!i(RRR
R6Rtrangetlentreinitialize_commandtno_format_optionR
R)R(t	keep_temptrun_command(R*tcommandsR
titcmd_nametsub_cmd((s//usr/lib64/python2.7/distutils/command/bdist.pytrunys"

(sbdist-base=Rs4temporary directory for creating built distributionsN(sformats=Ns/formats for distribution (comma-separated list)(s	dist-dir=Rs=directory to put final built distributions in [default: dist](s
skip-buildNs2skip rebuilding everything (for testing/debugging)(sowner=Rs@Owner name used when creating a tar file [default: current user](sgroup=RsAGroup name used when creating a tar file [default: current group](R(RsRPM distribution(R!sgzip'ed tar file(R!sbzip2'ed tar file(R!scompressed tar file(R!star file(R"sWindows executable installer(R!sZIP file(R#sMicrosoft Installer(t__name__t
__module__tdescriptionRR	tuser_optionstboolean_optionsRthelp_optionsR;R4RR
R+R7RB(((s//usr/lib64/python2.7/distutils/command/bdist.pyRsJ
		



			(t__doc__t__revision__R0tdistutils.utilRtdistutils.coreRtdistutils.errorsRRRR(((s//usr/lib64/python2.7/distutils/command/bdist.pyt<module>s	PKW[��Z}}command/build_scripts.pyonu�[����
{fc@s�dZdZddlZddlZddlmZddlmZddlm	Z	ddl
mZddlm
Z
ejd	�Zd
efd��YZdS(sRdistutils.command.build_scripts

Implements the Distutils 'build_scripts' command.s$Id$i����N(tST_MODE(tCommand(tnewer(tconvert_path(tlogs^#!.*python[0-9.]*([ 	].*)?$t
build_scriptscBsSeZdZdddgZdgZd
�Zd�Zd�Zd
�Zd�Z	RS(s("build" scripts (copy and fixup #! line)s
build-dir=tdsdirectory to "build" (copy) totforcetfs1forcibly build everything (ignore file timestampssexecutable=tes*specify final destination interpreter pathcCs1d|_d|_d|_d|_d|_dS(N(tNonet	build_dirtscriptsRt
executabletoutfiles(tself((s7/usr/lib64/python2.7/distutils/command/build_scripts.pytinitialize_optionss
				cCs)|jdddd�|jj|_dS(	NtbuildRRRR
(RR(RR(R
R
(tset_undefined_optionstdistributionR(R((s7/usr/lib64/python2.7/distutils/command/build_scripts.pytfinalize_options%s
	cCs|jS(N(R(R((s7/usr/lib64/python2.7/distutils/command/build_scripts.pytget_source_files,scCs|js
dS|j�dS(N(Rtcopy_scripts(R((s7/usr/lib64/python2.7/distutils/command/build_scripts.pytrun/s	c	Cs�td�}|j|j�g}x|jD]}d}t|�}tjj|jtjj|��}|j	|�|j
r�t||�r�tj
d|�q,nyt|d�}Wn&tk
r�|js��nd}n]X|j�}|s
|jd|�q,ntj|�}|r=d}|jd�p7d}	n|rtjd||j�|jst|d	�}
|j�s�|
jd
|j|	f�nK|
jd
tjj|jd�d|jd
�|jd�f�|	f�|
j|j��|
j�n|r>|j�q>q,|r.|j�n|j||�q,Wtj dkr�x�|D]|}|jrztjd|�qXtj!|�t"d@}|dBd@}
|
|krXtjd|||
�tj#||
�qXqXWndS(s"Copy each script listed in 'self.scripts'; if it's marked as a
        Python script in the Unix way (first line matches 'first_line_re',
        ie. starts with "\#!" and contains "python"), then adjust the first
        line to refer to the current Python interpreter as we copy.
        t	sysconfigisnot copying %s (up-to-date)trs%s is an empty file (skipping)itscopying and adjusting %s -> %stws#!%s%s
tBINDIRs
python%s%stVERSIONtEXEtposixschanging mode of %si�ims!changing mode of %s from %o to %oN($t
__import__tmkpathRRRtostpathtjointbasenametappendRRRtdebugtopentIOErrortdry_runR
treadlinetwarnt
first_line_retmatchtgrouptinfotis_python_buildtwriteR
tget_config_vart
writelinest	readlinestcloset	copy_filetnametstatRtchmod(Rt
_sysconfigRtscripttadjusttoutfileRt
first_lineR.tpost_interptoutftfiletoldmodetnewmode((s7/usr/lib64/python2.7/distutils/command/build_scripts.pyR5sr$

	

				


		
(s
build-dir=Rsdirectory to "build" (copy) to(RRs1forcibly build everything (ignore file timestamps(sexecutable=R	s*specify final destination interpreter path(
t__name__t
__module__tdescriptiontuser_optionstboolean_optionsRRRRR(((s7/usr/lib64/python2.7/distutils/command/build_scripts.pyRs						(t__doc__t__revision__R"treR9Rtdistutils.coreRtdistutils.dep_utilRtdistutils.utilRt	distutilsRtcompileR-R(((s7/usr/lib64/python2.7/distutils/command/build_scripts.pyt<module>sPKW[V��11command/bdist.pycnu�[����
{fc@sqdZdZddlZddlmZddlmZddlmZm	Z	d�Z
defd	��YZdS(
sidistutils.command.bdist

Implements the Distutils 'bdist' command (create a built [binary]
distribution).s$Id$i����N(tget_platform(tCommand(tDistutilsPlatformErrortDistutilsOptionErrorcCslddlm}g}x6tjD]+}|jd|dtj|df�q W||�}|jd�dS(sFPrint list of available formats (arguments to "--format" option).
    i����(tFancyGetoptsformats=is'List of available distribution formats:N(tdistutils.fancy_getoptRtbdisttformat_commandstappendtNonetformat_commandt
print_help(Rtformatstformattpretty_printer((s//usr/lib64/python2.7/distutils/command/bdist.pytshow_formatssRc	Bs�eZdZd0ddde�fd2d3d4d5d6gZdgZdd1defgZd7Z	idd6dd6dd6Z
dddddd dd!gZid8d6d9d6d:d6d;d6d<d6d=d 6d>d6d?d!6Zd-�Z
d.�Zd/�ZRS(@s$create a built (binary) distributionsbdist-base=tbs4temporary directory for creating built distributionss
plat-name=tps;platform name to embed in generated filenames (default: %s)sformats=s/formats for distribution (comma-separated list)s	dist-dir=tds=directory to put final built distributions in [default: dist]s
skip-builds2skip rebuilding everything (for testing/debugging)sowner=tus@Owner name used when creating a tar file [default: current user]sgroup=tgsAGroup name used when creating a tar file [default: current group]shelp-formatss$lists available distribution formatst	bdist_rpmtgztartposixtziptnttos2trpmtbztartztarttartwininsttmsisRPM distributiont
bdist_dumbsgzip'ed tar filesbzip2'ed tar filescompressed tar filestar filet
bdist_wininstsWindows executable installersZIP filet	bdist_msisMicrosoft InstallercCsCd|_d|_d|_d|_d|_d|_d|_dS(Ni(R	t
bdist_baset	plat_nameRtdist_dirt
skip_buildtgrouptowner(tself((s//usr/lib64/python2.7/distutils/command/bdist.pytinitialize_optionsTs						cCs|jdkr?|jr't�|_q?|jd�j|_n|jdkr�|jd�j}tjj	|d|j�|_n|j
d�|jdkr�y|jtj
g|_Wq�tk
r�tddtj
�q�Xn|jdkr�d|_ndS(Ntbuildsbdist.Rs-don't know how to create built distributions son platform %stdist(R%R	R'Rtget_finalized_commandR$t
build_basetostpathtjointensure_string_listRtdefault_formattnametKeyErrorRR&(R*R/((s//usr/lib64/python2.7/distutils/command/bdist.pytfinalize_options]s$	

cCs
g}xN|jD]C}y|j|j|d�Wqtk
rRtd|�qXqWx�tt|j��D]�}||}|j|�}||jkr�|j||_	n|dkr�|j
|_
|j|_n|||dkr�d|_n|j
|�qmWdS(Nisinvalid format '%s'R!i(RRR
R6Rtrangetlentreinitialize_commandtno_format_optionR
R)R(t	keep_temptrun_command(R*tcommandsR
titcmd_nametsub_cmd((s//usr/lib64/python2.7/distutils/command/bdist.pytrunys"

(sbdist-base=Rs4temporary directory for creating built distributionsN(sformats=Ns/formats for distribution (comma-separated list)(s	dist-dir=Rs=directory to put final built distributions in [default: dist](s
skip-buildNs2skip rebuilding everything (for testing/debugging)(sowner=Rs@Owner name used when creating a tar file [default: current user](sgroup=RsAGroup name used when creating a tar file [default: current group](R(RsRPM distribution(R!sgzip'ed tar file(R!sbzip2'ed tar file(R!scompressed tar file(R!star file(R"sWindows executable installer(R!sZIP file(R#sMicrosoft Installer(t__name__t
__module__tdescriptionRR	tuser_optionstboolean_optionsRthelp_optionsR;R4RR
R+R7RB(((s//usr/lib64/python2.7/distutils/command/bdist.pyRsJ
		



			(t__doc__t__revision__R0tdistutils.utilRtdistutils.coreRtdistutils.errorsRRRR(((s//usr/lib64/python2.7/distutils/command/bdist.pyt<module>s	PKW[�����command/build_clib.pyonu�[����
{fc@s{dZdZddlZddlmZddlmZddlmZddl	m
Z
d�Zd	efd
��YZdS(s�distutils.command.build_clib

Implements the Distutils 'build_clib' command, to build a C/C++ library
that is included in the module distribution and needed by an extension
module.s$Id$i����N(tCommand(tDistutilsSetupError(tcustomize_compiler(tlogcCsddlm}|�dS(Ni����(tshow_compilers(tdistutils.ccompilerR(R((s4/usr/lib64/python2.7/distutils/command/build_clib.pyRst
build_clibcBs�eZdZdddddgZdd
gZdddefgZd�Zd�Z	d�Z
d�Zd�Zd�Z
d�ZRS(s/build C/C++ libraries used by Python extensionssbuild-clib=tbs%directory to build C/C++ libraries tosbuild-temp=tts,directory to put temporary build by-productstdebugtgs"compile with debugging informationtforcetfs2forcibly build everything (ignore file timestamps)s	compiler=tcsspecify the compiler types
help-compilerslist available compilerscCsUd|_d|_d|_d|_d|_d|_d|_d|_d|_	dS(Ni(
tNoneRt
build_tempt	librariestinclude_dirstdefinetundefR	Rtcompiler(tself((s4/usr/lib64/python2.7/distutils/command/build_clib.pytinitialize_options6s								cCs�|jdddd	d
d�|jj|_|jrG|j|j�n|jdkrn|jjpeg|_nt|jt�r�|jjt	j
�|_ndS(NtbuildRRRR	R(RR(RR(RR(R	R	(RR(tset_undefined_optionstdistributionRtcheck_library_listRRt
isinstancetstrtsplittostpathsep(R((s4/usr/lib64/python2.7/distutils/command/build_clib.pytfinalize_optionsFs		cCs�|js
dSddlm}|d|jd|jd|j�|_t|j�|jdk	rv|jj	|j�n|j
dk	r�x-|j
D]\}}|jj||�q�Wn|jdk	r�x$|jD]}|jj
|�q�Wn|j|j�dS(Ni����(tnew_compilerRtdry_runR(RRR!RR"RRRRtset_include_dirsRtdefine_macroRtundefine_macrotbuild_libraries(RR!tnametvaluetmacro((s4/usr/lib64/python2.7/distutils/command/build_clib.pytrun_s 		
cCs�t|t�std�nx�|D]�}t|t�rVt|�dkrVtd�n|\}}t|t�s�tdd�nd|ks�tjdkr�tj|kr�tdd|d	�nt|t�s"td
d�q"q"WdS(
s`Ensure that the list of libraries is valid.

        `library` is presumably provided as a command option 'libraries'.
        This method checks that it is a list of 2-tuples, where the tuples
        are (library_name, build_info_dict).

        Raise DistutilsSetupError if the structure is invalid anywhere;
        just returns otherwise.
        s+'libraries' option must be a list of tuplesis*each element of 'libraries' must a 2-tuples+first element of each tuple in 'libraries' s#must be a string (the library name)t/sbad library name '%s': s$may not contain directory separatorsis,second element of each tuple in 'libraries' s!must be a dictionary (build info)N(	RtlistRttupletlenRRtseptdict(RRtlibR't
build_info((s4/usr/lib64/python2.7/distutils/command/build_clib.pyRws*
	
"	
*cCs>|js
dSg}x$|jD]\}}|j|�qW|S(N(RRtappend(Rt	lib_namestlib_nameR2((s4/usr/lib64/python2.7/distutils/command/build_clib.pytget_library_names�s	cCs�|j|j�g}xe|jD]Z\}}|jd�}|dks]t|ttf�rmtd|�n|j|�q W|S(Ntsourcessfin 'libraries' option (library '%s'), 'sources' must be present and must be a list of source filenames(	RRtgetRRR,R-Rtextend(Rt	filenamesR5R2R7((s4/usr/lib64/python2.7/distutils/command/build_clib.pytget_source_files�s"
cCs�x�|D]�\}}|jd�}|dksDt|ttf�r\tddd|�nt|�}tjd|�|jd�}|jd�}|jj	|d|j
d|d|d	|j�}|jj||d|j
d	|j�qWdS(
NR7s&in 'libraries' option (library '%s'), s&'sources' must be present and must be sa list of source filenamessbuilding '%s' librarytmacrosRt
output_dirR	(R8RRR,R-RRtinfoRtcompileRR	tcreate_static_libR(RRR5R2R7R<Rtobjects((s4/usr/lib64/python2.7/distutils/command/build_clib.pyR&�s$"		(sbuild-clib=Rs%directory to build C/C++ libraries to(sbuild-temp=Rs,directory to put temporary build by-products(R	R
s"compile with debugging information(RRs2forcibly build everything (ignore file timestamps)(s	compiler=R
sspecify the compiler typeN(t__name__t
__module__tdescriptiontuser_optionstboolean_optionsRRthelp_optionsRR R*RR6R;R&(((s4/usr/lib64/python2.7/distutils/command/build_clib.pyRs*					$		(
t__doc__t__revision__Rtdistutils.coreRtdistutils.errorsRtdistutils.sysconfigRt	distutilsRRR(((s4/usr/lib64/python2.7/distutils/command/build_clib.pyt<module>s	PKW[�N�`wwcommand/bdist_dumb.pycnu�[����
{fc@s�dZdZddlZddlmZddlmZddlmZddl	m
Z
mZddlm
Z
dd	lmZd
efd��YZdS(s�distutils.command.bdist_dumb

Implements the Distutils 'bdist_dumb' command (create a "dumb" built
distribution -- i.e., just an archive to be unpacked under $prefix or
$exec_prefix).s$Id$i����N(tget_python_version(tget_platform(tCommand(tremove_treetensure_relative(tDistutilsPlatformError(tlogt
bdist_dumbcBs�eZdZd"ddde�fd#d
ddd
fd$d&d'd(d)g	Zd
ddgZidd6dd6dd6Zd�Zd �Z	d!�Z
RS(*s"create a "dumb" built distributions
bdist-dir=tds1temporary directory for creating the distributions
plat-name=tps;platform name to embed in generated filenames (default: %s)sformat=tfs0archive format to create (tar, ztar, gztar, zip)s	keep-temptks/keep the pseudo-installation tree around after s!creating the distribution archives	dist-dir=s-directory to put final built distributions ins
skip-builds2skip rebuilding everything (for testing/debugging)trelatives7build the archive using relative paths (default: false)sowner=tus@Owner name used when creating a tar file [default: current user]sgroup=tgsAGroup name used when creating a tar file [default: current group]tgztartposixtziptnttos2cCsUd|_d|_d|_d|_d|_d|_d|_d|_d|_	dS(Ni(
tNonet	bdist_dirt	plat_nametformatt	keep_temptdist_dirt
skip_buildRtownertgroup(tself((s4/usr/lib64/python2.7/distutils/command/bdist_dumb.pytinitialize_options7s								cCs�|jdkr<|jd�j}tjj|d�|_n|jdkr�y|jtj	|_Wq�t
k
r�tddtj	�q�Xn|jddd	d
�dS(Ntbdisttdumbs2don't know how to create dumb built distributions son platform %sRRR(RR(RR(RR(
RRtget_finalized_commandt
bdist_basetostpathtjoinRtdefault_formattnametKeyErrorRtset_undefined_options(RR"((s4/usr/lib64/python2.7/distutils/command/bdist_dumb.pytfinalize_optionsBs
	c	Cs�|js|jd�n|jddd�}|j|_|j|_d|_tjd|j�|jd�d|jj	�|j
f}tjdkr�|j
d	d
�}ntjj|j|�}|js�|j}nj|jj�r&|j|jkr&tdt|j�t|j�f�n!tjj|jt|j��}|j||jd|d
|jd|j�}|jj�r�t�}nd}|jjjd||f�|js�t |jd|j!�ndS(Ntbuildtinstalltreinit_subcommandsiisinstalling to %ss%s.%sRt:t-sScan't make a dumb built distribution where base and platbase are different (%s, %s)troot_dirRRtanyRtdry_run("Rtrun_commandtreinitialize_commandRtroottwarn_dirRtinfotdistributiontget_fullnameRR#R'treplaceR$R%RRthas_ext_modulestinstall_basetinstall_platbaseRtreprRtmake_archiveRRRRt
dist_filestappendRRR2(RR,tarchive_basenametpseudoinstall_roottarchive_roottfilenamet	pyversion((s4/usr/lib64/python2.7/distutils/command/bdist_dumb.pytrunTsB		

		
	(s
bdist-dir=Rs1temporary directory for creating the distribution(sformat=R
s0archive format to create (tar, ztar, gztar, zip)(s	dist-dir=Rs-directory to put final built distributions inN(s
skip-buildNs2skip rebuilding everything (for testing/debugging)(RNs7build the archive using relative paths (default: false)(sowner=R
s@Owner name used when creating a tar file [default: current user](sgroup=RsAGroup name used when creating a tar file [default: current group](t__name__t
__module__tdescriptionRRtuser_optionstboolean_optionsR&RR*RG(((s4/usr/lib64/python2.7/distutils/command/bdist_dumb.pyRs8
	

		(t__doc__t__revision__R#t	sysconfigRtdistutils.utilRtdistutils.coreRtdistutils.dir_utilRRtdistutils.errorsRt	distutilsRR(((s4/usr/lib64/python2.7/distutils/command/bdist_dumb.pyt<module>sPKW[�v�jvvcommand/check.pycnu�[����
{fc@s�dZdZddlmZddlmZddlmZypddlm	Z	ddl
mZddlm
Z
dd	lmZdd
lmZde	fd��YZeZWnek
r�eZnXd
efd��YZdS(sCdistutils.command.check

Implements the Distutils 'check' command.
s$Id$i����(tCommand(tPKG_INFO_ENCODING(tDistutilsSetupError(tReporter(tParser(tfrontend(tnodes(tStringIOtSilentReportercBs&eZddddd�Zd�ZRS(itasciitreplacec	Cs/g|_tj||||||||�dS(N(tmessagesRt__init__(tselftsourcetreport_levelt
halt_leveltstreamtdebugtencodingt
error_handler((s//usr/lib64/python2.7/distutils/command/check.pyRs	cOsB|jj||||f�tj|d|d|j|||�S(Ntlevelttype(RtappendRtsystem_messagetlevels(R
Rtmessagetchildrentkwargs((s//usr/lib64/python2.7/distutils/command/check.pyRs
N(t__name__t
__module__tNoneRR(((s//usr/lib64/python2.7/distutils/command/check.pyRstcheckcBsqeZdZdZdddgZdddgZd�Zd�Zd
�Zd�Z	d�Z
d�Zd�ZRS(s6This command checks the meta-data of the package.
    s"perform some checks on the packagetmetadatatmsVerify meta-datatrestructuredtexttrsEChecks if long string meta-data syntax are reStructuredText-complianttstricttss(Will exit with an error if a check failscCs(d|_d|_d|_d|_dS(s Sets default values for options.iiN(R#R!R%t	_warnings(R
((s//usr/lib64/python2.7/distutils/command/check.pytinitialize_options3s			cCsdS(N((R
((s//usr/lib64/python2.7/distutils/command/check.pytfinalize_options:scCs|jd7_tj||�S(s*Counts the number of warnings that occurs.i(R'Rtwarn(R
tmsg((s//usr/lib64/python2.7/distutils/command/check.pyR*=scCsx|jr|j�n|jrMtr2|j�qM|jrMtd��qMn|jrt|jdkrttd��ndS(sRuns the command.sThe docutils package is needed.isPlease correct your package.N(R!tcheck_metadataR#tHAS_DOCUTILStcheck_restructuredtextR%RR'(R
((s//usr/lib64/python2.7/distutils/command/check.pytrunBs	
	
	cCs�|jj}g}x<dD]4}t||�o:t||�s|j|�qqW|rt|jddj|��n|jr�|js�|jdd�q�n>|j	r�|j
s�|jdd	�q�n|jd
dd�d
S(s�Ensures that all required elements of meta-data are supplied.

        name, version, URL, (author and author_email) or
        (maintainer and maintainer_email)).

        Warns if any are missing.
        tnametversionturlsmissing required meta-data: %ss, s)missing meta-data: if 'author' supplied, s#'author_email' must be supplied toos-missing meta-data: if 'maintainer' supplied, s''maintainer_email' must be supplied toos4missing meta-data: either (author and author_email) s%or (maintainer and maintainer_email) smust be suppliedN(R0R1R2(tdistributionR!thasattrtgetattrRR*tjointauthortauthor_emailt
maintainertmaintainer_email(R
R!tmissingtattr((s//usr/lib64/python2.7/distutils/command/check.pyR,Rs$
						cCs�|jj�}t|t�s0|jt�}nxd|j|�D]S}|djd�}|dkrr|d}nd|d|f}|j	|�q@WdS(s4Checks if the long string fields are reST-compliant.i����tlineis%s (line %s)N(
R3tget_long_descriptiont
isinstancetunicodetdecodeRt_check_rst_datatgetRR*(R
tdatatwarningR=((s//usr/lib64/python2.7/distutils/command/check.pyR.ps
cCs|jjpd}t�}tjdtf�j�}d|_d|_d|_	t
||j|jd|j
d|jd|jd|j�}tj||d|�}|j|d	�y|j||�Wn3tk
r�}|jjd	d
|dif�nX|jS(
s8Returns warnings when the provided data doesn't compile.ssetup.pyt
componentsiRRRRRi����s!Could not finish the parsing: %s.tN(R3tscript_nameRRtOptionParsertget_default_valuest	tab_widthRtpep_referencestrfc_referencesRRRtwarning_streamRterror_encodingterror_encoding_error_handlerRtdocumenttnote_sourcetparsetAttributeErrorRR(R
RDtsource_pathtparsertsettingstreporterRQte((s//usr/lib64/python2.7/distutils/command/check.pyRB}s*									(R!R"sVerify meta-data(R#R$sEChecks if long string meta-data syntax are reStructuredText-compliant(R%R&s(Will exit with an error if a check fails(
RRt__doc__tdescriptiontuser_optionstboolean_optionsR(R)R*R/R,R.RB(((s//usr/lib64/python2.7/distutils/command/check.pyR &s							
N(RZt__revision__tdistutils.coreRtdistutils.distRtdistutils.errorsRtdocutils.utilsRtdocutils.parsers.rstRtdocutilsRRRRtTrueR-tImportErrortFalseR (((s//usr/lib64/python2.7/distutils/command/check.pyt<module>s


PKW[���command/install_lib.pycnu�[����
{fc@s�dZdZddlZddlZddlmZddlmZeed�rcej	dZ
ndZ
d	efd
��YZdS(skdistutils.command.install_lib

Implements the Distutils 'install_lib' command
(install all Python modules).s$Id$i����N(tCommand(tDistutilsOptionErrortextseptpys.pytinstall_libc	Bs�eZdZddd d!d#d$d%gZdd
dgZid
d
6Zd�Zd�Zd�Z	d�Z
d�Zd�Zd�Z
d�Zd�Zd�ZRS(&s7install all Python modules (extensions and pure Python)sinstall-dir=tdsdirectory to install tos
build-dir=tbs'build directory (where to install from)tforcetfs-force installation (overwrite existing files)tcompiletcscompile .py to .pyc [default]s
no-compilesdon't compile .py filess	optimize=tOslalso compile with optimization: -O1 for "python -O", -O2 for "python -OO", and -O0 to disable [default: -O0]s
skip-buildsskip the build stepscCs:d|_d|_d|_d|_d|_d|_dS(Ni(tNonetinstall_dirt	build_dirRR	toptimizet
skip_build(tself((s5/usr/lib64/python2.7/distutils/command/install_lib.pytinitialize_options7s					c	Cs�|jddddddd�|jdkr:d
|_n|jdkrUd|_nt|jt�s�y.t|j�|_|jdkr�t�nWq�ttfk
r�td
�q�XndS(Ntinstallt	build_libRRR
RR	RRiiisoptimize must be 0, 1, or 2(RR(RR
(RR(R	R	(RR(RR(iii(	tset_undefined_optionsR	RRt
isinstancetinttAssertionErrort
ValueErrorR(R((s5/usr/lib64/python2.7/distutils/command/install_lib.pytfinalize_options@s$	
cCsE|j�|j�}|dk	rA|jj�rA|j|�ndS(N(tbuildRRtdistributionthas_pure_modulestbyte_compile(Rtoutfiles((s5/usr/lib64/python2.7/distutils/command/install_lib.pytrunZs
cCsN|jsJ|jj�r(|jd�n|jj�rJ|jd�qJndS(Ntbuild_pyt	build_ext(RRRtrun_commandthas_ext_modules(R((s5/usr/lib64/python2.7/distutils/command/install_lib.pyRjs
	cCsLtjj|j�r0|j|j|j�}n|jd|j�dS|S(Ns3'%s' does not exist -- no Python modules to install(tostpathtisdirRt	copy_treeR
twarn(RR((s5/usr/lib64/python2.7/distutils/command/install_lib.pyRqs	cCs�tjr|jd�dSddlm}|jd�j}|jrp||ddd|jd|d	|j	�n|j
dkr�||d|j
d|jd|d
|jd	|j	�ndS(Ns%byte-compiling is disabled, skipping.i����(RRRiRtprefixtdry_runtverbose(tsystdont_write_bytecodeR)tdistutils.utilRtget_finalized_commandtrootR	RR+RR,(RtfilesRtinstall_root((s5/usr/lib64/python2.7/distutils/command/install_lib.pyRzs	
	
c
Cs�|s
gS|j|�}|j�}t||�}t|�ttj�}g}x.|D]&}	|jtjj||	|��qZW|S(N(	R0tget_outputstgetattrtlenR%tseptappendR&tjoin(
Rthas_anyt	build_cmdt
cmd_optiont
output_dirtbuild_filesRt
prefix_lentoutputstfile((s5/usr/lib64/python2.7/distutils/command/install_lib.pyt_mutate_outputs�s
$cCs�g}x�|D]z}tjjtjj|��d}|tkrGq
n|jrd|j|d�n|jdkr
|j|d�q
q
W|S(NiR
ito(R%R&tsplitexttnormcasetPYTHON_SOURCE_EXTENSIONR	R8R(Rtpy_filenamestbytecode_filestpy_filetext((s5/usr/lib64/python2.7/distutils/command/install_lib.pyt_bytecode_filenames�s
"	cCsu|j|jj�dd|j�}|jr?|j|�}ng}|j|jj�dd|j�}|||S(s�Return the list of files that would be installed if this command
        were actually run.  Not affected by the "dry-run" flag or whether
        modules have actually been built yet.
        R!RR"(RBRRR
R	RKR$(Rtpure_outputstbytecode_outputstext_outputs((s5/usr/lib64/python2.7/distutils/command/install_lib.pyR4�s	cCsrg}|jj�r:|jd�}|j|j��n|jj�rn|jd�}|j|j��n|S(s�Get the list of files that are input to this command, ie. the
        files that get installed as they are named in the build tree.
        The files in this list correspond one-to-one to the output
        filenames returned by 'get_outputs()'.
        R!R"(RRR0textendR4R$(RtinputsR!R"((s5/usr/lib64/python2.7/distutils/command/install_lib.pyt
get_inputs�s(sinstall-dir=Rsdirectory to install to(s
build-dir=Rs'build directory (where to install from)(RRs-force installation (overwrite existing files)(R	R
scompile .py to .pyc [default]N(s
no-compileNsdon't compile .py files(s	optimize=Rslalso compile with optimization: -O1 for "python -O", -O2 for "python -OO", and -O0 to disable [default: -O0](s
skip-buildNsskip the build steps(t__name__t
__module__tdescriptionRtuser_optionstboolean_optionstnegative_optRRR RRRRBRKR4RQ(((s5/usr/lib64/python2.7/distutils/command/install_lib.pyRs*	
											(t__doc__t__revision__R%R-tdistutils.coreRtdistutils.errorsRthasattrRRFR(((s5/usr/lib64/python2.7/distutils/command/install_lib.pyt<module>sPKW[�A�r��command/upload.pyonu�[����
{fc@s�dZddlZddlZddlZddlmZmZmZddlm	Z	ddl
Z
ddlZddl
mZddlmZmZddlmZddlmZdd	lmZd
efd��YZdS(s`distutils.command.upload

Implements the Distutils 'upload' subcommand (upload package to PyPI).i����N(turlopentRequestt	HTTPError(tstandard_b64encode(tmd5(tDistutilsErrortDistutilsOptionError(t
PyPIRCCommand(tspawn(tlogtuploadcBsUeZdZejddgZejdgZd�Zd�Zd	�Zd
�Z	RS(
supload binary package to PyPItsigntsssign files to upload using gpgs	identity=tisGPG identity used to sign filescCs>tj|�d|_d|_d|_t|_d|_dS(Nti(	Rtinitialize_optionstusernametpasswordt
show_responsetFalseRtNonetidentity(tself((s0/usr/lib64/python2.7/distutils/command/upload.pyRs
				cCs�tj|�|jr/|jr/td��n|j�}|ikr~|d|_|d|_|d|_|d|_	n|jr�|j
jr�|j
j|_ndS(Ns.Must use --sign for --identity to have meaningRRt
repositorytrealm(Rtfinalize_optionsRRRt_read_pypircRRRRtdistribution(Rtconfig((s0/usr/lib64/python2.7/distutils/command/upload.pyR&s



cCsX|jjs!d}t|��nx0|jjD]"\}}}|j|||�q.WdS(NsHMust create and upload files in one command (e.g. setup.py sdist upload)(Rt
dist_filesRtupload_file(Rtmsgtcommandt	pyversiontfilename((s0/usr/lib64/python2.7/distutils/command/upload.pytrun8s
c"Cs`tj|j�\}}}}}}	|s6|s6|	rLtd|j��n|dEkrktd|��n|jr�ddd|g}
|jr�d|jg|
d	d	+nt|
d
|j�nt|d�}z|j�}Wd|j	�X|j
j}
idd
6dd6|
j�d6|
j
�d6tjj|�|fd6|d6|d6t|�j�d6dd6|
j�d6|
j�d6|
j�d6|
j�d6|
j�d6|
j�d6|
j�d6|
j�d6|
j�d 6|
j�d!6|
j�d"6|
j�d#6|
j�d$6}d%}|d&krRt j!�\}}}|rwd'||f}qwn%|d(krwd)t j d*d+�}n||d,<|jr�tjj|�d-t|d-�j�f|d.<nd/t"|j#d0|j$�}d1}d2|}|d3}t%j%�}x�|j&�D]�\}}t'|t(�s5|g}nx�|D]{}t'|t)�rld4|d5}|d+}nd%}|j*|�|j*d6|�|j*|�|j*d7�|j*|�q<WqW|j*|�|j+�}|j,d8||jft-j.�id9|d:6t/t0|��d;6|d<6}t1|jd=|d>|�}yjt2|�}|j3�}|j4}|j5r�d?j6d@dA|j�d@dAf�} |j,| t-j.�nWnVt7j8k
r�}!|j,t/|!�t-j9��n%t:k
r}!|!j;}|!j4}nX|dBkr-|j,dC||ft-j.�n/dD||f} |j,| t-j9�t<| ��dS(FNsIncompatible url %sthttpthttpssunsupported schema tgpgs
--detach-signs-as--local-useritdry_runtrbtfile_uploads:actiont1tprotcol_versiontnametversiontcontenttfiletypeR!t
md5_digests1.0tmetadata_versiontsummaryt	home_pagetauthortauthor_emailtlicensetdescriptiontkeywordstplatformtclassifierstdownload_urltprovidestrequirest	obsoletesRt	bdist_rpmsbuilt for %s %st
bdist_dumbsbuilt for %stterseitcomments.asct
gpg_signaturesBasic t:s3--------------GHSKFJDLGDS7543FJKLFHRE75642756743254s
--s--
s;filename="%s"is+
Content-Disposition: form-data; name="%s"s

sSubmitting %s to %ss multipart/form-data; boundary=%ssContent-typesContent-lengtht
Authorizationtdatatheaderss
t-iKi�sServer response (%s): %ssUpload failed (%s): %s(R$R%(=turlparseRtAssertionErrorRRRR'topentreadtcloseRtmetadatatget_nametget_versiontostpathtbasenameRt	hexdigesttget_descriptiontget_urltget_contacttget_contact_emailtget_licencetget_long_descriptiontget_keywordst
get_platformstget_classifierstget_download_urltget_providestget_requirest
get_obsoletesR9tdistRRRtStringIOtitemst
isinstancetlistttupletwritetgetvaluetannounceR	tINFOtstrtlenRRtgetcodeRRtjointsocketterrortERRORRtcodeR("RR R!R"tschematnetlocturltparamstqueryt	fragmentstgpg_argstfR.tmetaRFRBRbR-tidtauthtboundarytsep_boundarytend_boundarytbodytkeytvaluetfnRGtrequesttresulttstatustreasonRte((s0/usr/lib64/python2.7/distutils/command/upload.pyR@s�$			















	 







 
			&	

(RRssign files to upload using gpg(s	identity=R
sGPG identity used to sign files(
t__name__t
__module__R7Rtuser_optionstboolean_optionsRRR#R(((s0/usr/lib64/python2.7/distutils/command/upload.pyR
s
			(t__doc__RQRpR9turllib2RRRtbase64RRIt	cStringIORcthashlibRtdistutils.errorsRRtdistutils.coreRtdistutils.spawnRt	distutilsR	R
(((s0/usr/lib64/python2.7/distutils/command/upload.pyt<module>sPKW[�$2��command/install_egg_info.pycnu�[����
{fc@s�dZddlmZddlmZmZddlZddlZddlZdefd��YZ	d�Z
d�Zd	�ZdS(
s�distutils.command.install_egg_info

Implements the Distutils 'install_egg_info' command, for installing
a package's PKG-INFO metadata.i����(tCommand(tlogtdir_utilNtinstall_egg_infocBsAeZdZdZd	gZd�Zd�Zd�Zd�ZRS(
s)Install an .egg-info file for the packages8Install package's PKG-INFO metadata as an .egg-info filesinstall-dir=tdsdirectory to install tocCs
d|_dS(N(tNonetinstall_dir(tself((s:/usr/lib64/python2.7/distutils/command/install_egg_info.pytinitialize_optionsscCs�|jdd�dtt|jj���tt|jj���tjd f}t	j
j|j|�|_
|j
g|_dS(Ntinstall_libRs%s-%s-py%s.egg-infoi(RR(tset_undefined_optionstto_filenamet	safe_nametdistributiontget_nametsafe_versiontget_versiontsystversiontostpathtjoinRttargettoutputs(Rtbasename((s:/usr/lib64/python2.7/distutils/command/install_egg_info.pytfinalize_optionsscCs|j}tjj|�rGtjj|�rGtj|d|j�nptjj|�r||j	tj
|jfd|�n;tjj|j�s�|j	tj|jfd|j�nt
jd|�|js�t|d�}|jjj|�|j�ndS(Ntdry_runs	Removing s	Creating s
Writing %stw(RRRtisdirtislinkRtremove_treeRtexiststexecutetunlinkRtmakedirsRtinfotopenR
tmetadatatwrite_pkg_filetclose(RRtf((s:/usr/lib64/python2.7/distutils/command/install_egg_info.pytrun s	%#	cCs|jS(N(R(R((s:/usr/lib64/python2.7/distutils/command/install_egg_info.pytget_outputs/s(sinstall-dir=Rsdirectory to install to(	t__name__t
__module__t__doc__tdescriptiontuser_optionsRRR)R*(((s:/usr/lib64/python2.7/distutils/command/install_egg_info.pyRs			
	cCstjdd|�S(s�Convert an arbitrary string to a standard distribution name

    Any runs of non-alphanumeric/. characters are replaced with a single '-'.
    s[^A-Za-z0-9.]+t-(tretsub(tname((s:/usr/lib64/python2.7/distutils/command/install_egg_info.pyR7scCs%|jdd�}tjdd|�S(s�Convert an arbitrary string to a standard version string

    Spaces become dots, and all other non-alphanumeric characters become
    dashes, with runs of multiple dashes condensed to a single dash.
    t t.s[^A-Za-z0-9.]+R0(treplaceR1R2(R((s:/usr/lib64/python2.7/distutils/command/install_egg_info.pyR?scCs|jdd�S(s|Convert a project or version name to its filename-escaped form

    Any '-' characters are currently replaced with '_'.
    R0t_(R6(R3((s:/usr/lib64/python2.7/distutils/command/install_egg_info.pyRIs(
R-t
distutils.cmdRt	distutilsRRRRR1RRRR(((s:/usr/lib64/python2.7/distutils/command/install_egg_info.pyt<module>s$,		
PKW[���j�K�Kcommand/build_ext.pycnu�[����
{fc@s/dZdZddlZddlZddlZddlZddlTddlmZm	Z	ddl
mZddlTddl
mZmZddlmZdd	lmZdd
lmZddlmZejdkr�dd
lmZee��Znejd�Zd�Zdefd��YZ dS(s�distutils.command.build_ext

Implements the Distutils 'build_ext' command, for building extension
modules (currently limited to C extensions, should accommodate C++
extensions ASAP).s$Id$i����N(t*(t	USER_BASEt	USER_SITE(tCommand(tcustomize_compilertget_python_version(tnewer_group(t	Extension(tget_platform(tlogtnt(tget_build_versions3^[a-zA-Z_][a-zA-Z_0-9]*(\.[a-zA-Z_][a-zA-Z_0-9]*)*$cCsddlm}|�dS(Ni����(tshow_compilers(tdistutils.ccompilerR(R((s3/usr/lib64/python2.7/distutils/command/build_ext.pyR st	build_extcBs?eZdZdejZdFdGdd	d
e�fddd
dfdddefdHdIdJdddefdKdLdMdNdOdQdRdSdTgZdd$d'd-d3gZ	d5dPd6e
fgZd7�Zd8�Z
d9�Zd:�Zd;�Zd<�Zd=�Zd>�Zd?�Zd@�ZdA�ZdB�ZdC�ZdD�ZdE�ZRS(Us8build C/C++ extensions (compile/link to build directory)s (separated by '%s')s
build-lib=tbs(directory for compiled extension modulessbuild-temp=tts1directory for temporary files (build by-products)s
plat-name=tps>platform name to cross-compile for, if supported (default: %s)tinplacetis=ignore build-lib and put compiled extensions into the source s,directory alongside your pure Python moduless
include-dirs=tIs.list of directories to search for header filessdefine=tDsC preprocessor macros to definesundef=tUs!C preprocessor macros to undefines
libraries=tls!external C libraries to link withs
library-dirs=tLs.directories to search for external C librariessrpath=tRs7directories to search for shared C libraries at runtimes
link-objects=tOs2extra explicit link objects to include in the linktdebugtgs'compile/link with debugging informationtforcetfs2forcibly build everything (ignore file timestamps)s	compiler=tcsspecify the compiler typesswig-cpps)make SWIG create C++ files (default is C)s
swig-opts=s!list of SWIG command line optionssswig=spath to the SWIG executabletusers#add user include, library and rpaths
help-compilerslist available compilerscCs�d|_d|_d|_d|_d|_d|_d|_d|_d|_	d|_
d|_d|_d|_
d|_d|_d|_d|_d|_d|_d|_dS(Ni(tNonet
extensionst	build_libt	plat_namet
build_tempRtpackagetinclude_dirstdefinetundeft	librariestlibrary_dirstrpathtlink_objectsRRtcompilertswigtswig_cppt	swig_optsR (tself((s3/usr/lib64/python2.7/distutils/command/build_ext.pytinitialize_optionsls(																			c
	Cs�ddlm}|jdd.d/d0d1d2d3�|jdkrP|jj|_n|jj|_|j	�}|j	d
d�}|j
dkr�|jj
p�g|_
nt|j
t�r�|j
j
tj�|_
n|j
j|�||kr|j
j|�n|jd�|jd
�|jdkr5g|_n|jdkrPg|_n3t|j�tkr�tj
|jtj�|_n|jdkr�g|_n3t|j�tkr�tj
|jtj�|_ntjdkr�|jjtjjtjd��|jr)tjj|jd�|_ntjj|jd�|_|j
jtjjtjd��tdkr�|j dkr�d}n
|j d}x�d4d5fD]L}tjjtj|�}|r�tjj||�}n|jj|�q�Wq�tdkr+|jjtjjtjdd��q�tdkr_|jjtjjtjdd��q�|jjtjjtjdd��ntjdkr�|jjtjjtjd��ntj!d  d!ks�tj!d  d"krJtj"j#tjjtjd#��r7|jjtjjtj$d$d%t%�d&��qJ|jjd'�n|j&d(�r�|j's~|jj|j&d)��q�|jjd'�n|j(r�|j(j
d*�}t)d+�|�|_(n|j*r�|j*j
d*�|_*n|j+dkrg|_+n|j+j
d,�|_+|j,r�tjjt-d-�}tjjt-d$�}	tjj.|�rm|j
j|�ntjj.|	�r�|jj|	�|jj|	�q�ndS(6Ni����(t	sysconfigtbuildR#R%R.RRR$t
plat_specificiR*R-R
tlibstDebugtReleasetPCi	twin32titPCbuildsVS9.0isVS8.0isVS7.1tVC6tos2tConfigitcygwintatheostbintlibtpythontconfigt.tPy_ENABLE_SHAREDtLIBDIRt,cSs
|dfS(Nt1((tsymbol((s3/usr/lib64/python2.7/distutils/command/build_ext.pyt<lambda>�R<t tinclude(R#R#(R%R%(R.R.(RR(RR(R$R$(R=(R:sVS9.0(/t	distutilsR4tset_undefined_optionsR&R!tdistributiontext_packagetext_modulesR"tget_python_incR't
isinstancetstrtsplittostpathseptappendtensure_string_listR*R+ttypet
StringTypetstringR,tnametpathtjointsystexec_prefixRR%tMSVC_VERSIONR$tplatformt
executablet
startswithtprefixRtget_config_vartpython_buildR(tmapR)R1R Rtisdir(
R2R4t
py_includetplat_py_includetsuffixtdtnew_libtdefinestuser_includetuser_lib((s3/usr/lib64/python2.7/distutils/command/build_ext.pytfinalize_options�s�	

"	"	
%&$

				c	Csddlm}|jsdS|jj�rm|jd�}|jj|j�pSg�|j	j
|j�n|d|jd|j
d|jd|j�|_t|j�tjdkr�|jt�kr�|jj|j�n|jdk	r|jj|j�n|jdk	rEx-|jD]\}}|jj||�qWn|jdk	r{x$|jD]}|jj|�q^Wn|jdk	r�|jj|j�n|j	dk	r�|jj|j	�n|jdk	r�|jj |j�n|j!dk	r|jj"|j!�n|j#�dS(	Ni����(tnew_compilert
build_clibR.tverbosetdry_runRR
($R
RwR"RRthas_c_librariestget_finalized_commandR*textendtget_library_namesR+R[RxR.RyRzRRRYR`R$Rt
initializeR'R!tset_include_dirsR(tdefine_macroR)tundefine_macrot
set_librariestset_library_dirsR,tset_runtime_library_dirsR-tset_link_objectstbuild_extensions(R2RwRxR`tvaluetmacro((s3/usr/lib64/python2.7/distutils/command/build_ext.pytruns>			
!c
Cs!t|t�std�nx�t|�D]�\}}t|t�rIq(nt|t�skt|�dkrwtd�n|\}}tjd|�t|t	�o�t
j|�s�td�nt|t�s�td�nt||d�}x<dD]4}|j
|�}|dk	r�t|||�q�q�W|j
d�|_d|krYtjd�n|j
d�}|rg|_g|_x�|D]�}	t|	t�o�t|	�dks�td�nt|	�dkr�|jj|	d�q�t|	�dkr�|jj|	�q�q�Wn|||<q(WdS(s�Ensure that the list of extensions (presumably provided as a
        command option 'extensions') is valid, i.e. it is a list of
        Extension objects.  We also support the old-style list of 2-tuples,
        where the tuples are (ext_name, build_info), which are converted to
        Extension instances here.

        Raise DistutilsSetupError if the structure is invalid anywhere;
        just returns otherwise.
        s:'ext_modules' option must be a list of Extension instancesisMeach element of 'ext_modules' option must be an Extension instance or 2-tuplesvold-style (ext_name, build_info) tuple found in ext_modules for extension '%s' -- please convert to Extension instancesRfirst element of each tuple in 'ext_modules' must be the extension name (a string)sOsecond element of each tuple in 'ext_modules' must be a dictionary (build info)tsourcesR'R+R*t
extra_objectstextra_compile_argstextra_link_argsR,tdef_files9'def_file' element of build info dict no longer supportedtmacrosis9'macros' element of build info dict must be 1- or 2-tupleiN(R'R+R*R�R�R�(ii(RVtlisttDistutilsSetupErrort	enumerateRttupletlenR	twarnRWtextension_name_retmatchtdicttgetR!tsetattrtruntime_library_dirst
define_macrostundef_macrosR[(
R2R"Rtexttext_namet
build_infotkeytvalR�R�((s3/usr/lib64/python2.7/distutils/command/build_ext.pytcheck_extensions_listVsT
	"				
		
!	cCs>|j|j�g}x!|jD]}|j|j�q W|S(N(R�R"R}R�(R2t	filenamesR�((s3/usr/lib64/python2.7/distutils/command/build_ext.pytget_source_files�s
cCsG|j|j�g}x*|jD]}|j|j|j��q W|S(N(R�R"R[tget_ext_fullpathR`(R2toutputsR�((s3/usr/lib64/python2.7/distutils/command/build_ext.pytget_outputs�s
cCs5|j|j�x|jD]}|j|�qWdS(N(R�R"tbuild_extension(R2R�((s3/usr/lib64/python2.7/distutils/command/build_ext.pyR��sc
Cs�|j}|dks-t|�ttfkrHtddd|j�nt|�}|j|j�}||j	}|j
p�t||d�s�tj
d|j�dStjd|j�|j||�}|jp�g}|j}x!|jD]}|j|f�q�W|jj|d|jd|d	|jd
|j
d|d|j	�}||_|jro|j|j�n|jp{g}|jp�|jj|�}	|jj||d
|j|�d|j d|j!d|d|j"|�d
|j
d|jd|	�dS(Ns*in 'ext_modules' option (extension '%s'), s&'sources' must be present and must be sa list of source filenamestnewers$skipping '%s' extension (up-to-date)sbuilding '%s' extensiont
output_dirR�R'Rtextra_postargstdependsR*R+R�texport_symbolsR%ttarget_lang(#R�R!R]tListTypet	TupleTypeR�R`R�R�R�RRR	Rtinfotswig_sourcesR�R�R�R[R.tcompileR%R't_built_objectsR�R}R�tlanguagetdetect_languagetlink_shared_objectt
get_librariesR+R�tget_export_symbols(
R2R�R�text_pathR�t
extra_argsR�R)tobjectsR�((s3/usr/lib64/python2.7/distutils/command/build_ext.pyR��sN	$

			
							cCs�g}g}i}|jr+tjd�n|jsRd|jksRd|jkr[d}nd}xr|D]j}tjj|�\}}	|	dkr�|j|d|�|j|�|d||<qh|j|�qhW|s�|S|jp�|j	�}
|
dg}|j
|j�|jr*|jd�n|jsWx!|jD]}|j|�q=WnxE|D]=}||}
tjd	||
�|j|d
|
|g�q^W|S(s�Walk the list of source files in 'sources', looking for SWIG
        interface (.i) files.  Run SWIG on all that are found, and
        return a modified 'sources' list with SWIG source files replaced
        by the generated C (or C++) files.
        s/--swig-cpp is deprecated - use --swig-opts=-c++s-c++s.cpps.cs.it_wrapi����s-pythonsswigging %s to %ss-o(
R0R	R�R1RYRatsplitextR[R/t	find_swigR}R�tspawn(R2R�t	extensiontnew_sourcesR�tswig_targetst
target_exttsourcetbaseR�R/tswig_cmdtottarget((s3/usr/lib64/python2.7/distutils/command/build_ext.pyR�s>		

		

cCs�tjdkrdStjdkrixgdD]5}tjjd|d�}tjj|�r)|Sq)WdSn#tjd	kr|dStd
tj�dS(
s�Return the name of the SWIG executable.  On Unix, this is
        just "swig" -- it should be in the PATH.  Tries a bit harder on
        Windows.
        tposixR/R
s1.3s1.2s1.1s	c:\swig%ssswig.exeR?s>I don't know how to find (much less run) SWIG on platform '%s'N(s1.3s1.2s1.1(RYR`RaRbtisfiletDistutilsPlatformError(R2tverstfn((s3/usr/lib64/python2.7/distutils/command/build_ext.pyR�Ps
c	Cs�tjdtjd�}|j|�}|j|�}|jd�}|j|�}tjj|�d}|j	s�tjj
|d |g�}tjj
|j|�Sdj
|dd!�}|jd�}tjj
|j|��}tjj
||�S(s�Returns the path of the filename for a given extension.

        The file is located in `build_lib` or directly in the package
        (inplace option).
        t/s..RGi����itbuild_py(R_t	maketransRYtsept	translatetget_ext_fullnameRXtget_ext_filenameRaRRbR#R|tabspathtget_package_dir(	R2R�tall_dotstfullnametmodpathtfilenameR&R�tpackage_dir((s3/usr/lib64/python2.7/distutils/command/build_ext.pyR�qs	cCs&|jdkr|S|jd|SdS(sSReturns the fullname of a given extension name.

        Adds the `package.` prefixRGN(R&R!(R2R�((s3/usr/lib64/python2.7/distutils/command/build_ext.pyR��scCs�ddlm}tj|d�}tjdkrZ|t|�dd |t|�d<n|d�}tjdkr�|jr�tjj	|�d	|Stjj	|�t
jr�d	p�d
|S(s�Convert the name of an extension (eg. "foo.bar") into the name
        of the file from which it will be loaded (eg. "foo/bar.so", or
        "foo\bar.pyd").
        i����(RjRGR?iitSOR
t_dR<(tdistutils.sysconfigRjR_RXRYR`R�RRaRbRctpydebug(R2R�RjR�tso_ext((s3/usr/lib64/python2.7/distutils/command/build_ext.pyR��s)cCsCd|jjd�d}||jkr<|jj|�n|jS(sReturn the list of symbols that a shared extension has to
        export.  This either uses 'ext.export_symbols' or, if it's not
        provided, "init" + module_name.  Only relevant on Windows, where
        the .pyd file (DLL) must export the module "init" function.
        tinitRGi����(R`RXR�R[(R2R�t
initfunc_name((s3/usr/lib64/python2.7/distutils/command/build_ext.pyR��scCsqtjdkr�ddlm}t|j|�s}d}|jrM|d}n|tjd?tjd?d@f}|j|gS|jSn�tjd	kr�d}|tjd?tjd?d@f}|j|gStjd
 dkrd}|tjd?tjd?d@f}|j|gStjd
 d
kr�ddl	m
}d}|tjd?tjd?d@f}g}xM|jd�j�D]6}|j
d�r�|j|d�q||j|�q|W|j|dg|Stjdkr�|jStjd dkr�|jSddl	m
}|jd�rfd}|tjd?tjd?d@f}tjrX|d7}n|j|gS|jSdS(s�Return the list of libraries to link against when building a
        shared extension.  On most platforms, this is just 'ext.libraries';
        on Windows and OS/2, we add the Python library (eg. python20.dll).
        R;i����(tMSVCCompilers
python%d%dR�iii�tos2emxiRAspython%d.%dRB(R4tSHLIBSs-litmtdarwinitaixRHN(RcRftdistutils.msvccompilerR�RVR.Rt
hexversionR*RPR4RjRXRhR[R�(R2R�R�ttemplatet	pythonlibR4textraRD((s3/usr/lib64/python2.7/distutils/command/build_ext.pyR��sX
	

	
(s
build-lib=Rs(directory for compiled extension modules(sbuild-temp=Rs1directory for temporary files (build by-products)(sdefine=RsC preprocessor macros to define(sundef=Rs!C preprocessor macros to undefine(s
libraries=Rs!external C libraries to link with(srpath=Rs7directories to search for shared C libraries at runtime(s
link-objects=Rs2extra explicit link objects to include in the link(RRs'compile/link with debugging information(RRs2forcibly build everything (ignore file timestamps)(s	compiler=Rsspecify the compiler typeN(sswig-cppNs)make SWIG create C++ files (default is C)(s
swig-opts=Ns!list of SWIG command line options(sswig=Nspath to the SWIG executable(R Ns#add user include, library and rpath(t__name__t
__module__tdescriptionRYRZtsep_byRR!tuser_optionstboolean_optionsRthelp_optionsR3RvR�R�R�R�R�R�R�R�R�R�R�R�R�(((s3/usr/lib64/python2.7/distutils/command/build_ext.pyR%st



			�	@	N	
			S	:	!	 				(!t__doc__t__revision__RcRYR_trettypestsiteRRtdistutils.coreRtdistutils.errorsR�RRtdistutils.dep_utilRtdistutils.extensionRtdistutils.utilRRPR	R`R�RtintReR�R�RR(((s3/usr/lib64/python2.7/distutils/command/build_ext.pyt<module>s$0

		PKW[=�ib8A8Acommand/sdist.pyonu�[����
{fc@sdZdZddlZddlZddlZddlmZddlmZddlm	Z	ddl
mZmZm
Z
mZddlmZdd	lmZmZmZdd
lmZddl
mZddlmZd
�Zde	fd��YZdS(sadistutils.command.sdist

Implements the Distutils 'sdist' command (create a source distribution).s$Id$i����N(tglob(twarn(tCommand(tdir_utiltdep_utilt	file_utiltarchive_util(tTextFile(tDistutilsPlatformErrortDistutilsOptionErrortDistutilsTemplateError(tFileList(tlog(tconvert_pathcCs�ddlm}ddlm}g}x6|j�D](}|jd|d||df�q3W|j�||�jd�dS(soPrint all possible values for the 'formats' option (used by
    the "--help-formats" command-line option).
    i����(tFancyGetopt(tARCHIVE_FORMATSsformats=is.List of available source distribution formats:N(	tdistutils.fancy_getoptRtdistutils.archive_utilRtkeystappendtNonetsortt
print_help(RRtformatstformat((s//usr/lib64/python2.7/distutils/command/sdist.pytshow_formatss
tsdistcBs6eZdZd�Zd<d=d?d@dAdBdCdDdEddddfdFdGdHdIgZddddddgZd'd>d(efgZidd
6dd6Z	id)d*6d+d,6Z
d-efgZd.�Zd/�Z
d0�Zd1�Zd2�Zd3�Zd4�Zd5�Zd6�Zd7�Zd8�Zd9�Zd:�Zd;�ZRS(Js6create a source distribution (tarball, zip file, etc.)cCs|jS(sYCallable used for the check sub-command.

        Placed here so user_options can view it(tmetadata_check(tself((s//usr/lib64/python2.7/distutils/command/sdist.pytchecking_metadata(ss	template=tts5name of manifest template file [default: MANIFEST.in]s	manifest=tms)name of manifest file [default: MANIFEST]suse-defaultssRinclude the default file set in the manifest [default; disable with --no-defaults]sno-defaultss"don't include the default file settprunes�specifically exclude files/directories that should not be distributed (build tree, RCS/CVS dirs, etc.) [default; disable with --no-prune]sno-prunes$don't automatically exclude anythings
manifest-onlytosEjust regenerate the manifest and then stop (implies --force-manifest)sforce-manifesttfskforcibly regenerate the manifest and carry on as usual. Deprecated: now the manifest is always regenerated.sformats=s6formats for source distribution (comma-separated list)s	keep-temptks1keep the distribution tree around after creating sarchive file(s)s	dist-dir=tdsFdirectory to put the source distribution archive(s) in [default: dist]smetadata-checks[Ensure that all required elements of meta-data are supplied. Warn if any missing. [default]sowner=tus@Owner name used when creating a tar file [default: current user]sgroup=tgsAGroup name used when creating a tar file [default: current group]shelp-formatss#list available distribution formatstgztartposixtziptnttcheckcCsyd|_d|_d|_d|_d|_d|_d|_d|_d|_	d|_
d|_d|_d|_
dS(Nii(Rttemplatetmanifesttuse_defaultsR t
manifest_onlytforce_manifestRt	keep_temptdist_dirt
archive_filesRtownertgroup(R((s//usr/lib64/python2.7/distutils/command/sdist.pytinitialize_optionsfs												cCs�|jdkrd|_n|jdkr6d|_n|jd�|jdkr�y|jtjg|_Wq�tk
r�t	ddtj�q�Xnt
j|j�}|r�td|�n|j
dkr�d|_
ndS(NtMANIFESTsMANIFEST.inRs.don't know how to create source distributions son platform %ssunknown archive format '%s'tdist(R-RR,tensure_string_listRtdefault_formattostnametKeyErrorRRtcheck_archive_formatsR	R2(Rt
bad_format((s//usr/lib64/python2.7/distutils/command/sdist.pytfinalize_options}s$


cCsUt�|_x!|j�D]}|j|�qW|j�|jrGdS|j�dS(N(Rtfilelisttget_sub_commandstrun_commandt
get_file_listR/tmake_distribution(Rtcmd_name((s//usr/lib64/python2.7/distutils/command/sdist.pytrun�s
	cCs7tdt�|jjd�}|j�|j�dS(sDeprecated API.sadistutils.command.sdist.check_metadata is deprecated,               use the check command insteadR+N(RtPendingDeprecationWarningtdistributiontget_command_objtensure_finalizedRG(RR+((s//usr/lib64/python2.7/distutils/command/sdist.pytcheck_metadata�s


cCs�tjj|j�}|rP|j�rP|j�|jj�|jj�dS|sq|j	dd|j�n|jj
�|jr�|j�n|r�|j
�n|jr�|j�n|jj�|jj�|j�dS(sCFigure out the list of files to include in the source
        distribution, and put it in 'self.filelist'.  This might involve
        reading the manifest template (and writing the manifest), or just
        reading the manifest, or just using the default file set -- it all
        depends on the user's options.
        Ns&manifest template '%s' does not exist s(using default file list)(R;tpathtisfileR,t_manifest_is_not_generatedt
read_manifestRARtremove_duplicatesRtfindallR.tadd_defaultst
read_templateR tprune_file_listtwrite_manifest(Rttemplate_exists((s//usr/lib64/python2.7/distutils/command/sdist.pyRD�s(


	
	

	


cCsd|jjg}x�|D]�}t|t�r�|}d}x:|D]2}tjj|�rAd}|jj|�PqAqAW|s�|j	dt
j|d��q�qtjj|�r�|jj|�q|j	d|�qWdd	g}xB|D]:}ttjj
t|��}|r�|jj|�q�q�W|jd
�}|jj�rb|jj|j��nxM|jD]B\}	}
}}x-|D]%}
|jjtjj|
|
��q�WqlW|jj�rlx�|jjD]�}t|t�rt|�}tjj
|�re|jj|�qeq�|\}}x?|D]7}t|�}tjj
|�r*|jj|�q*q*Wq�Wn|jj�r�|jd�}|jj|j��n|jj�r�|jd�}|jj|j��n|jj�r|jd
�}|jj|j��ndS(s9Add all the default files to self.filelist:
          - README or README.txt
          - setup.py
          - test/test*.py
          - all pure Python modules mentioned in setup script
          - all files pointed by package_data (build_py)
          - all files defined in data_files.
          - all files defined as scripts.
          - all C sources listed as part of extensions or C libraries
            in the setup script (doesn't catch C headers!)
        Warns if (README or README.txt) or setup.py are missing; everything
        else is optional.
        tREADMEs
README.txtiis,standard file not found: should have one of s, sstandard file '%s' not founds
test/test*.pys	setup.cfgtbuild_pyt	build_extt
build_clibt
build_scriptsN(RXs
README.txt(RItscript_namet
isinstancettupleR;RMtexistsRARRtstringtjointfilterRNRtextendtget_finalized_commandthas_pure_modulestget_source_filest
data_filesthas_data_fileststrR
thas_ext_modulesthas_c_librariesthas_scripts(Rt	standardstfntaltstgot_ittoptionaltpatterntfilesRYtpkgtsrc_dirt	build_dirt	filenamestfilenametitemtdirnameR"RZR[R\((s//usr/lib64/python2.7/distutils/command/sdist.pyRS�s^

	

'
cCs�tjd|j�t|jdddddddddddd�}zwxp|j�}|d
krhPny|jj|�WqLtt	fk
r�}|j
d	|j|j|f�qLXqLWWd
|j
�Xd
S(s�Read and parse manifest template file named by self.template.

        (usually "MANIFEST.in") The parsing and processing is done by
        'self.filelist', which updates itself accordingly.
        sreading manifest template '%s'tstrip_commentsitskip_blankst
join_linest	lstrip_wst	rstrip_wst
collapse_joins%s, line %d: %sN(RtinfoR,RtreadlineRRAtprocess_template_lineR
t
ValueErrorRRytcurrent_linetclose(RR,tlinetmsg((s//usr/lib64/python2.7/distutils/command/sdist.pyRT,s(	cCs�|jd�}|jj�}|jjdd|j�|jjdd|�tjdkred}nd}dddd	d
ddg}d
|dj	|�|f}|jj|dd�dS(svPrune off branches that might slip into the file list as created
        by 'read_template()', but really don't belong there:
          * the build tree (typically "build")
          * the release tree itself (only an issue if we ran "sdist"
            previously with --keep-temp, or it aborted)
          * any RCS, CVS, .svn, .hg, .git, .bzr, _darcs directories
        tbuildtprefixtwin32s/|\\t/tRCStCVSs\.svns\.hgs\.gits\.bzrt_darcss(^|%s)(%s)(%s).*t|tis_regexiN(
ReRItget_fullnameRAtexclude_patternRt
build_basetsystplatformRb(RR�tbase_dirtsepstvcs_dirstvcs_ptrn((s//usr/lib64/python2.7/distutils/command/sdist.pyRUMs		cCsk|j�r$tjd|j�dS|jj}|jdd�|jtj	|j|fd|j�dS(s�Write the file list in 'self.filelist' (presumably as filled in
        by 'add_defaults()' and 'read_template()') to the manifest file
        named by 'self.manifest'.
        s5not writing to manually maintained manifest file '%s'Nis*# file GENERATED by distutils, do NOT editswriting manifest file '%s'(
RORR�R-RARttinserttexecuteRt
write_file(Rtcontent((s//usr/lib64/python2.7/distutils/command/sdist.pyRVgs	
cCsStjj|j�stSt|jd�}z|j�}Wd|j�X|dkS(NtrUs+# file GENERATED by distutils, do NOT edit
(R;RMRNR-tFalsetopenR�R�(Rtfpt
first_line((s//usr/lib64/python2.7/distutils/command/sdist.pyROvscCsytjd|j�t|j�}xF|D]>}|j�}|jd�s)|rWq)n|jj|�q)W|j�dS(s�Read the manifest file (named by 'self.manifest') and use it to
        fill in 'self.filelist', the list of files to include in the source
        distribution.
        sreading manifest file '%s't#N(	RR�R-R�tstript
startswithRARR�(RR-R�((s//usr/lib64/python2.7/distutils/command/sdist.pyRP�s
cCs�|j|�tj||d|j�ttd�rHd}d|}nd}d|}|sntjd�n
tj	|�x_|D]W}tj
j|�s�tjd|�q�tj
j||�}|j
||d|�q�W|jjj|�dS(	s�Create the directory tree that will become the source
        distribution archive.  All directories implied by the filenames in
        'files' are created under 'base_dir', and then we hard link or copy
        (if hard linking is unavailable) those files into place.
        Essentially, this duplicates the developer's source tree, but in a
        directory named after the distribution, containing only the files
        to be distributed.
        tdry_runtlinkthardsmaking hard links in %s...scopying files to %s...s)no files to distribute -- empty manifest?s#'%s' not a regular file -- skippingN(tmkpathRtcreate_treeR�thasattrR;RRRR�RMRNRbt	copy_fileRItmetadatatwrite_pkg_info(RR�RtR�R�tfiletdest((s//usr/lib64/python2.7/distutils/command/sdist.pytmake_release_tree�s 
	



c
Cs|jj�}tjj|j|�}|j||jj�g}d|j	kr}|j	j
|j	j|j	jd���nxd|j	D]Y}|j
||d|d|jd|j�}|j
|�|jjj
dd|f�q�W||_|jstj|d|j�ndS(	s�Create the source distribution(s).  First, we create the release
        tree with 'make_release_tree()'; then, we create all required
        archive files (according to 'self.formats') from the release tree.
        Finally, we clean up by blowing away the release tree (unless
        'self.keep_temp' is true).  The list of archive files created is
        stored so it can be retrieved later by 'get_archive_files()'.
        ttarR�R4R5RtR�N(RIR�R;RMRbR2R�RARtRRtpoptindextmake_archiveR4R5t
dist_filesR3R1Rtremove_treeR�(RR�t	base_nameR3tfmtR�((s//usr/lib64/python2.7/distutils/command/sdist.pyRE�s
+
 		cCs|jS(szReturn the list of archive files created when the command
        was run, or None if the command hasn't run yet.
        (R3(R((s//usr/lib64/python2.7/distutils/command/sdist.pytget_archive_files�s(s	template=Rs5name of manifest template file [default: MANIFEST.in](s	manifest=Rs)name of manifest file [default: MANIFEST]N(suse-defaultsNsRinclude the default file set in the manifest [default; disable with --no-defaults](sno-defaultsNs"don't include the default file set(R Ns�specifically exclude files/directories that should not be distributed (build tree, RCS/CVS dirs, etc.) [default; disable with --no-prune](sno-pruneNs$don't automatically exclude anything(s
manifest-onlyR!sEjust regenerate the manifest and then stop (implies --force-manifest)(sforce-manifestR"skforcibly regenerate the manifest and carry on as usual. Deprecated: now the manifest is always regenerated.(sformats=Ns6formats for source distribution (comma-separated list)(s	dist-dir=R$sFdirectory to put the source distribution archive(s) in [default: dist](smetadata-checkNs[Ensure that all required elements of meta-data are supplied. Warn if any missing. [default](sowner=R%s@Owner name used when creating a tar file [default: current user](sgroup=R&sAGroup name used when creating a tar file [default: current group](t__name__t
__module__tdescriptionRRtuser_optionstboolean_optionsRthelp_optionstnegative_optR:tsub_commandsR6R@RGRLRDRSRTRURVRORPR�RER�(((s//usr/lib64/python2.7/distutils/command/sdist.pyR$sn		



					(	R	!					*	(t__doc__t__revision__R;RaR�RtwarningsRtdistutils.coreRt	distutilsRRRRtdistutils.text_fileRtdistutils.errorsRR	R
tdistutils.filelistRRtdistutils.utilR
RR(((s//usr/lib64/python2.7/distutils/command/sdist.pyt<module>s"	PKW[�5�)�)command/bdist_wininst.pyonu�[����
{fc@s�dZdZddlZddlZddlZddlmZddlmZddl	m
Z
ddlmZm
Z
ddlmZdd	lmZd
efd��YZdS(szdistutils.command.bdist_wininst

Implements the Distutils 'bdist_wininst' command: create a windows installer
exe-program.s$Id$i����N(tget_python_version(tCommand(tremove_tree(tDistutilsOptionErrortDistutilsPlatformError(tlog(tget_platformt
bdist_wininstcBs�eZdZd,ddde�fdddd	fd
d+ddfd-d.d/d0d1d2d3d4d5g
Zdd
ddgZd$�Zd%�Zd&�Z	d'�Z
d+d(�Zd)�Zd*�Z
RS(6s-create an executable installer for MS Windowss
bdist-dir=s1temporary directory for creating the distributions
plat-name=tps;platform name to embed in generated filenames (default: %s)s	keep-temptks/keep the pseudo-installation tree around after s!creating the distribution archivestarget-version=s!require a specific python versions on the target systemsno-target-compiletcs/do not compile .py to .pyc on the target systemsno-target-optimizetos;do not compile .py to .pyo (optimized) on the target systems	dist-dir=tds-directory to put final built distributions insbitmap=tbs>bitmap to use for the installer instead of python-powered logostitle=tts?title to display on the installer background instead of defaults
skip-builds2skip rebuilding everything (for testing/debugging)sinstall-script=sUbasename of installation script to be run after installation or before deinstallationspre-install-script=s{Fully qualified filename of a script to be run before any files are installed.  This script need not be in the distributionsuser-access-control=s�specify Vista's UAC handling - 'none'/default=no handling, 'auto'=use UAC if target Python installed for all users, 'force'=always use UACcCsyd|_d|_d|_d|_d|_d|_d|_d|_d|_	d|_
d|_d|_d|_
dS(Ni(tNonet	bdist_dirt	plat_namet	keep_temptno_target_compiletno_target_optimizettarget_versiontdist_dirtbitmapttitlet
skip_buildtinstall_scripttpre_install_scripttuser_access_control(tself((s7/usr/lib64/python2.7/distutils/command/bdist_wininst.pytinitialize_options@s												cCsV|jdd	�|jdkr|jrR|jrR|jjd�}|j|_n|jd�j}t	j
j|d�|_n|js�d|_n|jr�|jj
�r�t�}|jr�|j|kr�td|f�n||_n|jdd
d�|jrRxF|jjD]%}|jt	j
j|�krPqqWtd|j�ndS(NtbdistRtwininsttsMtarget version can only be %s, or the '--skip-build' option must be specifiedRRs(install_script '%s' not found in scripts(RR(RR(RR(tset_undefined_optionsRRRRtdistributiontget_command_objtget_finalized_commandt
bdist_basetostpathtjoinRthas_ext_modulesRRRtscriptstbasename(RRR&t
short_versiontscript((s7/usr/lib64/python2.7/distutils/command/bdist_wininst.pytfinalize_optionsRs4		
		c
Cs�tjdkr<|jj�s-|jj�r<td��n|jsU|jd�n|jddd�}|j	|_
|j|_d|_|j|_|jd�}d|_
d|_|jj�r-|j}|s�tjdd	!}nd
|j|f}|jd�}tjj|jd|�|_nxJdD]B}tj|�}|dkrb|d}nt|d||�q4Wtjd|j	�|j�tjjdtjj|j	d��|j�tjd=ddlm }|�}	|jj!�}
|j"|	dd|j	�}|j#||
|j$�|jj�rDt%�}nd}|jj&j'd||j(|
�f�tj)d|�tj*|�|j+s�t,|j	d|j-�ndS(Ntwin32s^distribution contains extensions and/or C libraries; must be compiled on a Windows 32 platformtbuildtinstalltreinit_subcommandsiitinstall_libis.%s-%stlibtpurelibtplatlibtheadersR+tdatas/Include/$dist_nametinstall_sinstalling to %stPURELIBi����(tmktemptziptroot_dirtanyRsremoving temporary file '%s'tdry_run(R6R7R8R+R9(.tsystplatformR#R*thas_c_librariesRRtrun_commandtreinitialize_commandRtroottwarn_dirRtcompiletoptimizeRtversionR%R'R(R)t
build_baset	build_libtstringtuppertsetattrRtinfotensure_finalizedtinserttrunttempfileR<tget_fullnametmake_archivet
create_exeRRt
dist_filestappendtget_installer_filenametdebugtremoveRRR@(
RR2R4Rtplat_specifierR1tkeytvalueR<tarchive_basenametfullnametarcnamet	pyversion((s7/usr/lib64/python2.7/distutils/command/bdist_wininst.pyRSzsd					


%

	
	cCs�g}|jj}|jd�|jp+dd}d�}x�ddddd	d
ddgD]a}t||d�}|rZ|d
tj|�||�f}|jd|||�f�qZqZW|jd�|jr�|jd|j�n|jd||��|jd|j�|jd|j	�|j
rM|jd|j
�n|jrm|jd|j�n|jp�|jj
�}|jd||��ddl}ddl}	d|j|j��|	jf}
|jd|
�tj|d�S(Ns
[metadata]R!s
cSstj|dd�S(Ns
s\n(RMtreplace(ts((s7/usr/lib64/python2.7/distutils/command/bdist_wininst.pytescape�stauthortauthor_emailtdescriptiont
maintainertmaintainer_emailtnameturlRJs
    %s: %ss%s=%ss
[Setup]sinstall_script=%ssinfo=%sstarget_compile=%dstarget_optimize=%dstarget_version=%ssuser_access_control=%sstitle=%si����sBuilt %s with distutils-%ss
build_info=%s(R#tmetadataRYtlong_descriptiontgetattrRMt
capitalizeRRRRRRRUttimet	distutilstctimet__version__R)(RtlinesRnRPRfRlR9RRrRst
build_info((s7/usr/lib64/python2.7/distutils/command/bdist_wininst.pytget_inidata�s<
	$
			cCs�ddl}|j|j�|j�}|j|�}|jd|�|rrt|d�j�}t|�}nd}t|d�}	|	j	|j
��|r�|	j	|�nytWntk
r�n"Xt
|t�r�|jd�}n|d}|jr)t|jd�j�}
||
d	}n
|d}|	j	|�|jd
dt|�|�}|	j	|�|	j	t|d�j��dS(Ni����screating %strbitwbtmbcsstrs
s<iiii{V4(tstructtmkpathRRxRZtannouncetopentreadtlentwritet
get_exe_bytestunicodet	NameErrort
isinstancetencodeRtpack(RRbRaRR}tcfgdatatinstaller_namet
bitmapdatat	bitmaplentfiletscript_datatheader((s7/usr/lib64/python2.7/distutils/command/bdist_wininst.pyRW�s>

	

			
cCs`|jr7tjj|jd||j|jf�}n%tjj|jd||jf�}|S(Ns%s.%s-py%s.exes	%s.%s.exe(RR'R(R)RR(RRaR�((s7/usr/lib64/python2.7/distutils/command/bdist_wininst.pyRZ5s	cCsddlm}t�}|jrm|j|krm|j|krL|�}qv|jdkrdd}qvd}n	|�}tjjt�}|jdkr�|jd dkr�|jd}nd	}tjj	|d
||f�}t
|d�}z|j�SWd|j�XdS(Ni����(tget_build_versions2.4g@gffffff@R0itwinR!swininst-%.1f%s.exeRy(
tdistutils.msvccompilerR�RRR'R(tdirnamet__file__RR)R�R�tclose(RR�tcur_versiontbvt	directorytsfixtfilenametf((s7/usr/lib64/python2.7/distutils/command/bdist_wininst.pyR�Cs$					"N(s
bdist-dir=Ns1temporary directory for creating the distribution(sno-target-compileR
s/do not compile .py to .pyc on the target system(sno-target-optimizeRs;do not compile .py to .pyo (optimized) on the target system(s	dist-dir=Rs-directory to put final built distributions in(sbitmap=R
s>bitmap to use for the installer instead of python-powered logo(stitle=Rs?title to display on the installer background instead of default(s
skip-buildNs2skip rebuilding everything (for testing/debugging)(sinstall-script=NsUbasename of installation script to be run after installation or before deinstallation(spre-install-script=Ns{Fully qualified filename of a script to be run before any files are installed.  This script need not be in the distribution(suser-access-control=Ns�specify Vista's UAC handling - 'none'/default=no handling, 'auto'=use UAC if target Python installed for all users, 'force'=always use UAC(t__name__t
__module__RiRRtuser_optionstboolean_optionsRR/RSRxRWRZR�(((s7/usr/lib64/python2.7/distutils/command/bdist_wininst.pyRsN
					(	S	17	(t__doc__t__revision__RAR'RMt	sysconfigRtdistutils.coreRtdistutils.dir_utilRtdistutils.errorsRRRsRtdistutils.utilRR(((s7/usr/lib64/python2.7/distutils/command/bdist_wininst.pyt<module>sPKW[)U]	��command/__init__.pyonu�[����
{fc@sOdZdZdddddddd	d
ddd
dddddddgZdS(s\distutils.command

Package containing implementation of all the standard Distutils
commands.s$Id$tbuildtbuild_pyt	build_extt
build_clibt
build_scriptstcleantinstalltinstall_libtinstall_headerstinstall_scriptstinstall_datatsdisttregistertbdistt
bdist_dumbt	bdist_rpmt
bdist_wininsttuploadtcheckN(t__doc__t__revision__t__all__(((s2/usr/lib64/python2.7/distutils/command/__init__.pyt<module>s(PKW[�����command/build_clib.pycnu�[����
{fc@s{dZdZddlZddlmZddlmZddlmZddl	m
Z
d�Zd	efd
��YZdS(s�distutils.command.build_clib

Implements the Distutils 'build_clib' command, to build a C/C++ library
that is included in the module distribution and needed by an extension
module.s$Id$i����N(tCommand(tDistutilsSetupError(tcustomize_compiler(tlogcCsddlm}|�dS(Ni����(tshow_compilers(tdistutils.ccompilerR(R((s4/usr/lib64/python2.7/distutils/command/build_clib.pyRst
build_clibcBs�eZdZdddddgZdd
gZdddefgZd�Zd�Z	d�Z
d�Zd�Zd�Z
d�ZRS(s/build C/C++ libraries used by Python extensionssbuild-clib=tbs%directory to build C/C++ libraries tosbuild-temp=tts,directory to put temporary build by-productstdebugtgs"compile with debugging informationtforcetfs2forcibly build everything (ignore file timestamps)s	compiler=tcsspecify the compiler types
help-compilerslist available compilerscCsUd|_d|_d|_d|_d|_d|_d|_d|_d|_	dS(Ni(
tNoneRt
build_tempt	librariestinclude_dirstdefinetundefR	Rtcompiler(tself((s4/usr/lib64/python2.7/distutils/command/build_clib.pytinitialize_options6s								cCs�|jdddd	d
d�|jj|_|jrG|j|j�n|jdkrn|jjpeg|_nt|jt�r�|jjt	j
�|_ndS(NtbuildRRRR	R(RR(RR(RR(R	R	(RR(tset_undefined_optionstdistributionRtcheck_library_listRRt
isinstancetstrtsplittostpathsep(R((s4/usr/lib64/python2.7/distutils/command/build_clib.pytfinalize_optionsFs		cCs�|js
dSddlm}|d|jd|jd|j�|_t|j�|jdk	rv|jj	|j�n|j
dk	r�x-|j
D]\}}|jj||�q�Wn|jdk	r�x$|jD]}|jj
|�q�Wn|j|j�dS(Ni����(tnew_compilerRtdry_runR(RRR!RR"RRRRtset_include_dirsRtdefine_macroRtundefine_macrotbuild_libraries(RR!tnametvaluetmacro((s4/usr/lib64/python2.7/distutils/command/build_clib.pytrun_s 		
cCs�t|t�std�nx�|D]�}t|t�rVt|�dkrVtd�n|\}}t|t�s�tdd�nd|ks�tjdkr�tj|kr�tdd|d	�nt|t�s"td
d�q"q"WdS(
s`Ensure that the list of libraries is valid.

        `library` is presumably provided as a command option 'libraries'.
        This method checks that it is a list of 2-tuples, where the tuples
        are (library_name, build_info_dict).

        Raise DistutilsSetupError if the structure is invalid anywhere;
        just returns otherwise.
        s+'libraries' option must be a list of tuplesis*each element of 'libraries' must a 2-tuples+first element of each tuple in 'libraries' s#must be a string (the library name)t/sbad library name '%s': s$may not contain directory separatorsis,second element of each tuple in 'libraries' s!must be a dictionary (build info)N(	RtlistRttupletlenRRtseptdict(RRtlibR't
build_info((s4/usr/lib64/python2.7/distutils/command/build_clib.pyRws*
	
"	
*cCs>|js
dSg}x$|jD]\}}|j|�qW|S(N(RRtappend(Rt	lib_namestlib_nameR2((s4/usr/lib64/python2.7/distutils/command/build_clib.pytget_library_names�s	cCs�|j|j�g}xe|jD]Z\}}|jd�}|dks]t|ttf�rmtd|�n|j|�q W|S(Ntsourcessfin 'libraries' option (library '%s'), 'sources' must be present and must be a list of source filenames(	RRtgetRRR,R-Rtextend(Rt	filenamesR5R2R7((s4/usr/lib64/python2.7/distutils/command/build_clib.pytget_source_files�s"
cCs�x�|D]�\}}|jd�}|dksDt|ttf�r\tddd|�nt|�}tjd|�|jd�}|jd�}|jj	|d|j
d|d|d	|j�}|jj||d|j
d	|j�qWdS(
NR7s&in 'libraries' option (library '%s'), s&'sources' must be present and must be sa list of source filenamessbuilding '%s' librarytmacrosRt
output_dirR	(R8RRR,R-RRtinfoRtcompileRR	tcreate_static_libR(RRR5R2R7R<Rtobjects((s4/usr/lib64/python2.7/distutils/command/build_clib.pyR&�s$"		(sbuild-clib=Rs%directory to build C/C++ libraries to(sbuild-temp=Rs,directory to put temporary build by-products(R	R
s"compile with debugging information(RRs2forcibly build everything (ignore file timestamps)(s	compiler=R
sspecify the compiler typeN(t__name__t
__module__tdescriptiontuser_optionstboolean_optionsRRthelp_optionsRR R*RR6R;R&(((s4/usr/lib64/python2.7/distutils/command/build_clib.pyRs*					$		(
t__doc__t__revision__Rtdistutils.coreRtdistutils.errorsRtdistutils.sysconfigRt	distutilsRRR(((s4/usr/lib64/python2.7/distutils/command/build_clib.pyt<module>s	PKW[=�ib8A8Acommand/sdist.pycnu�[����
{fc@sdZdZddlZddlZddlZddlmZddlmZddlm	Z	ddl
mZmZm
Z
mZddlmZdd	lmZmZmZdd
lmZddl
mZddlmZd
�Zde	fd��YZdS(sadistutils.command.sdist

Implements the Distutils 'sdist' command (create a source distribution).s$Id$i����N(tglob(twarn(tCommand(tdir_utiltdep_utilt	file_utiltarchive_util(tTextFile(tDistutilsPlatformErrortDistutilsOptionErrortDistutilsTemplateError(tFileList(tlog(tconvert_pathcCs�ddlm}ddlm}g}x6|j�D](}|jd|d||df�q3W|j�||�jd�dS(soPrint all possible values for the 'formats' option (used by
    the "--help-formats" command-line option).
    i����(tFancyGetopt(tARCHIVE_FORMATSsformats=is.List of available source distribution formats:N(	tdistutils.fancy_getoptRtdistutils.archive_utilRtkeystappendtNonetsortt
print_help(RRtformatstformat((s//usr/lib64/python2.7/distutils/command/sdist.pytshow_formatss
tsdistcBs6eZdZd�Zd<d=d?d@dAdBdCdDdEddddfdFdGdHdIgZddddddgZd'd>d(efgZidd
6dd6Z	id)d*6d+d,6Z
d-efgZd.�Zd/�Z
d0�Zd1�Zd2�Zd3�Zd4�Zd5�Zd6�Zd7�Zd8�Zd9�Zd:�Zd;�ZRS(Js6create a source distribution (tarball, zip file, etc.)cCs|jS(sYCallable used for the check sub-command.

        Placed here so user_options can view it(tmetadata_check(tself((s//usr/lib64/python2.7/distutils/command/sdist.pytchecking_metadata(ss	template=tts5name of manifest template file [default: MANIFEST.in]s	manifest=tms)name of manifest file [default: MANIFEST]suse-defaultssRinclude the default file set in the manifest [default; disable with --no-defaults]sno-defaultss"don't include the default file settprunes�specifically exclude files/directories that should not be distributed (build tree, RCS/CVS dirs, etc.) [default; disable with --no-prune]sno-prunes$don't automatically exclude anythings
manifest-onlytosEjust regenerate the manifest and then stop (implies --force-manifest)sforce-manifesttfskforcibly regenerate the manifest and carry on as usual. Deprecated: now the manifest is always regenerated.sformats=s6formats for source distribution (comma-separated list)s	keep-temptks1keep the distribution tree around after creating sarchive file(s)s	dist-dir=tdsFdirectory to put the source distribution archive(s) in [default: dist]smetadata-checks[Ensure that all required elements of meta-data are supplied. Warn if any missing. [default]sowner=tus@Owner name used when creating a tar file [default: current user]sgroup=tgsAGroup name used when creating a tar file [default: current group]shelp-formatss#list available distribution formatstgztartposixtziptnttcheckcCsyd|_d|_d|_d|_d|_d|_d|_d|_d|_	d|_
d|_d|_d|_
dS(Nii(Rttemplatetmanifesttuse_defaultsR t
manifest_onlytforce_manifestRt	keep_temptdist_dirt
archive_filesRtownertgroup(R((s//usr/lib64/python2.7/distutils/command/sdist.pytinitialize_optionsfs												cCs�|jdkrd|_n|jdkr6d|_n|jd�|jdkr�y|jtjg|_Wq�tk
r�t	ddtj�q�Xnt
j|j�}|r�td|�n|j
dkr�d|_
ndS(NtMANIFESTsMANIFEST.inRs.don't know how to create source distributions son platform %ssunknown archive format '%s'tdist(R-RR,tensure_string_listRtdefault_formattostnametKeyErrorRRtcheck_archive_formatsR	R2(Rt
bad_format((s//usr/lib64/python2.7/distutils/command/sdist.pytfinalize_options}s$


cCsUt�|_x!|j�D]}|j|�qW|j�|jrGdS|j�dS(N(Rtfilelisttget_sub_commandstrun_commandt
get_file_listR/tmake_distribution(Rtcmd_name((s//usr/lib64/python2.7/distutils/command/sdist.pytrun�s
	cCs7tdt�|jjd�}|j�|j�dS(sDeprecated API.sadistutils.command.sdist.check_metadata is deprecated,               use the check command insteadR+N(RtPendingDeprecationWarningtdistributiontget_command_objtensure_finalizedRG(RR+((s//usr/lib64/python2.7/distutils/command/sdist.pytcheck_metadata�s


cCs�tjj|j�}|rP|j�rP|j�|jj�|jj�dS|sq|j	dd|j�n|jj
�|jr�|j�n|r�|j
�n|jr�|j�n|jj�|jj�|j�dS(sCFigure out the list of files to include in the source
        distribution, and put it in 'self.filelist'.  This might involve
        reading the manifest template (and writing the manifest), or just
        reading the manifest, or just using the default file set -- it all
        depends on the user's options.
        Ns&manifest template '%s' does not exist s(using default file list)(R;tpathtisfileR,t_manifest_is_not_generatedt
read_manifestRARtremove_duplicatesRtfindallR.tadd_defaultst
read_templateR tprune_file_listtwrite_manifest(Rttemplate_exists((s//usr/lib64/python2.7/distutils/command/sdist.pyRD�s(


	
	

	


cCsd|jjg}x�|D]�}t|t�r�|}d}x:|D]2}tjj|�rAd}|jj|�PqAqAW|s�|j	dt
j|d��q�qtjj|�r�|jj|�q|j	d|�qWdd	g}xB|D]:}ttjj
t|��}|r�|jj|�q�q�W|jd
�}|jj�rb|jj|j��nxM|jD]B\}	}
}}x-|D]%}
|jjtjj|
|
��q�WqlW|jj�rlx�|jjD]�}t|t�rt|�}tjj
|�re|jj|�qeq�|\}}x?|D]7}t|�}tjj
|�r*|jj|�q*q*Wq�Wn|jj�r�|jd�}|jj|j��n|jj�r�|jd�}|jj|j��n|jj�r|jd
�}|jj|j��ndS(s9Add all the default files to self.filelist:
          - README or README.txt
          - setup.py
          - test/test*.py
          - all pure Python modules mentioned in setup script
          - all files pointed by package_data (build_py)
          - all files defined in data_files.
          - all files defined as scripts.
          - all C sources listed as part of extensions or C libraries
            in the setup script (doesn't catch C headers!)
        Warns if (README or README.txt) or setup.py are missing; everything
        else is optional.
        tREADMEs
README.txtiis,standard file not found: should have one of s, sstandard file '%s' not founds
test/test*.pys	setup.cfgtbuild_pyt	build_extt
build_clibt
build_scriptsN(RXs
README.txt(RItscript_namet
isinstancettupleR;RMtexistsRARRtstringtjointfilterRNRtextendtget_finalized_commandthas_pure_modulestget_source_filest
data_filesthas_data_fileststrR
thas_ext_modulesthas_c_librariesthas_scripts(Rt	standardstfntaltstgot_ittoptionaltpatterntfilesRYtpkgtsrc_dirt	build_dirt	filenamestfilenametitemtdirnameR"RZR[R\((s//usr/lib64/python2.7/distutils/command/sdist.pyRS�s^

	

'
cCs�tjd|j�t|jdddddddddddd�}zwxp|j�}|d
krhPny|jj|�WqLtt	fk
r�}|j
d	|j|j|f�qLXqLWWd
|j
�Xd
S(s�Read and parse manifest template file named by self.template.

        (usually "MANIFEST.in") The parsing and processing is done by
        'self.filelist', which updates itself accordingly.
        sreading manifest template '%s'tstrip_commentsitskip_blankst
join_linest	lstrip_wst	rstrip_wst
collapse_joins%s, line %d: %sN(RtinfoR,RtreadlineRRAtprocess_template_lineR
t
ValueErrorRRytcurrent_linetclose(RR,tlinetmsg((s//usr/lib64/python2.7/distutils/command/sdist.pyRT,s(	cCs�|jd�}|jj�}|jjdd|j�|jjdd|�tjdkred}nd}dddd	d
ddg}d
|dj	|�|f}|jj|dd�dS(svPrune off branches that might slip into the file list as created
        by 'read_template()', but really don't belong there:
          * the build tree (typically "build")
          * the release tree itself (only an issue if we ran "sdist"
            previously with --keep-temp, or it aborted)
          * any RCS, CVS, .svn, .hg, .git, .bzr, _darcs directories
        tbuildtprefixtwin32s/|\\t/tRCStCVSs\.svns\.hgs\.gits\.bzrt_darcss(^|%s)(%s)(%s).*t|tis_regexiN(
ReRItget_fullnameRAtexclude_patternRt
build_basetsystplatformRb(RR�tbase_dirtsepstvcs_dirstvcs_ptrn((s//usr/lib64/python2.7/distutils/command/sdist.pyRUMs		cCsk|j�r$tjd|j�dS|jj}|jdd�|jtj	|j|fd|j�dS(s�Write the file list in 'self.filelist' (presumably as filled in
        by 'add_defaults()' and 'read_template()') to the manifest file
        named by 'self.manifest'.
        s5not writing to manually maintained manifest file '%s'Nis*# file GENERATED by distutils, do NOT editswriting manifest file '%s'(
RORR�R-RARttinserttexecuteRt
write_file(Rtcontent((s//usr/lib64/python2.7/distutils/command/sdist.pyRVgs	
cCsStjj|j�stSt|jd�}z|j�}Wd|j�X|dkS(NtrUs+# file GENERATED by distutils, do NOT edit
(R;RMRNR-tFalsetopenR�R�(Rtfpt
first_line((s//usr/lib64/python2.7/distutils/command/sdist.pyROvscCsytjd|j�t|j�}xF|D]>}|j�}|jd�s)|rWq)n|jj|�q)W|j�dS(s�Read the manifest file (named by 'self.manifest') and use it to
        fill in 'self.filelist', the list of files to include in the source
        distribution.
        sreading manifest file '%s't#N(	RR�R-R�tstript
startswithRARR�(RR-R�((s//usr/lib64/python2.7/distutils/command/sdist.pyRP�s
cCs�|j|�tj||d|j�ttd�rHd}d|}nd}d|}|sntjd�n
tj	|�x_|D]W}tj
j|�s�tjd|�q�tj
j||�}|j
||d|�q�W|jjj|�dS(	s�Create the directory tree that will become the source
        distribution archive.  All directories implied by the filenames in
        'files' are created under 'base_dir', and then we hard link or copy
        (if hard linking is unavailable) those files into place.
        Essentially, this duplicates the developer's source tree, but in a
        directory named after the distribution, containing only the files
        to be distributed.
        tdry_runtlinkthardsmaking hard links in %s...scopying files to %s...s)no files to distribute -- empty manifest?s#'%s' not a regular file -- skippingN(tmkpathRtcreate_treeR�thasattrR;RRRR�RMRNRbt	copy_fileRItmetadatatwrite_pkg_info(RR�RtR�R�tfiletdest((s//usr/lib64/python2.7/distutils/command/sdist.pytmake_release_tree�s 
	



c
Cs|jj�}tjj|j|�}|j||jj�g}d|j	kr}|j	j
|j	j|j	jd���nxd|j	D]Y}|j
||d|d|jd|j�}|j
|�|jjj
dd|f�q�W||_|jstj|d|j�ndS(	s�Create the source distribution(s).  First, we create the release
        tree with 'make_release_tree()'; then, we create all required
        archive files (according to 'self.formats') from the release tree.
        Finally, we clean up by blowing away the release tree (unless
        'self.keep_temp' is true).  The list of archive files created is
        stored so it can be retrieved later by 'get_archive_files()'.
        ttarR�R4R5RtR�N(RIR�R;RMRbR2R�RARtRRtpoptindextmake_archiveR4R5t
dist_filesR3R1Rtremove_treeR�(RR�t	base_nameR3tfmtR�((s//usr/lib64/python2.7/distutils/command/sdist.pyRE�s
+
 		cCs|jS(szReturn the list of archive files created when the command
        was run, or None if the command hasn't run yet.
        (R3(R((s//usr/lib64/python2.7/distutils/command/sdist.pytget_archive_files�s(s	template=Rs5name of manifest template file [default: MANIFEST.in](s	manifest=Rs)name of manifest file [default: MANIFEST]N(suse-defaultsNsRinclude the default file set in the manifest [default; disable with --no-defaults](sno-defaultsNs"don't include the default file set(R Ns�specifically exclude files/directories that should not be distributed (build tree, RCS/CVS dirs, etc.) [default; disable with --no-prune](sno-pruneNs$don't automatically exclude anything(s
manifest-onlyR!sEjust regenerate the manifest and then stop (implies --force-manifest)(sforce-manifestR"skforcibly regenerate the manifest and carry on as usual. Deprecated: now the manifest is always regenerated.(sformats=Ns6formats for source distribution (comma-separated list)(s	dist-dir=R$sFdirectory to put the source distribution archive(s) in [default: dist](smetadata-checkNs[Ensure that all required elements of meta-data are supplied. Warn if any missing. [default](sowner=R%s@Owner name used when creating a tar file [default: current user](sgroup=R&sAGroup name used when creating a tar file [default: current group](t__name__t
__module__tdescriptionRRtuser_optionstboolean_optionsRthelp_optionstnegative_optR:tsub_commandsR6R@RGRLRDRSRTRURVRORPR�RER�(((s//usr/lib64/python2.7/distutils/command/sdist.pyR$sn		



					(	R	!					*	(t__doc__t__revision__R;RaR�RtwarningsRtdistutils.coreRt	distutilsRRRRtdistutils.text_fileRtdistutils.errorsRR	R
tdistutils.filelistRRtdistutils.utilR
RR(((s//usr/lib64/python2.7/distutils/command/sdist.pyt<module>s"	PKW[%
�ppcommand/install_scripts.pyonu�[����
{fc@sbdZdZddlZddlmZddlmZddlmZdefd��YZ	dS(	sudistutils.command.install_scripts

Implements the Distutils 'install_scripts' command, for installing
Python scripts.s$Id$i����N(tCommand(tlog(tST_MODEtinstall_scriptscBsYeZdZddddgZdd
gZd�Zd
�Zd�Zd�Z	d�Z
RS(s%install scripts (Python or otherwise)sinstall-dir=tdsdirectory to install scripts tos
build-dir=tbs'build directory (where to install from)tforcetfs-force installation (overwrite existing files)s
skip-buildsskip the build stepscCs(d|_d|_d|_d|_dS(Ni(tNonetinstall_dirRt	build_dirt
skip_build(tself((s9/usr/lib64/python2.7/distutils/command/install_scripts.pytinitialize_optionss			cCs*|jdd	�|jdd
dd�dS(
Ntbuildt
build_scriptsR
tinstallRR	RR(RR
(RR	(RR(RR(tset_undefined_options(R((s9/usr/lib64/python2.7/distutils/command/install_scripts.pytfinalize_options#s
	cCs�|js|jd�n|j|j|j�|_tjdkr�xq|j�D]`}|j	rrt
jd|�qPtj|�t
dBd@}t
jd||�tj||�qPWndS(NRtposixschanging mode of %simi�schanging mode of %s to %o(Rtrun_commandt	copy_treeR
R	toutfilestostnametget_outputstdry_runRtinfotstatRtchmod(Rtfiletmode((s9/usr/lib64/python2.7/distutils/command/install_scripts.pytrun+s		cCs|jjpgS(N(tdistributiontscripts(R((s9/usr/lib64/python2.7/distutils/command/install_scripts.pyt
get_inputs:scCs
|jpgS(N(R(R((s9/usr/lib64/python2.7/distutils/command/install_scripts.pyR=s(sinstall-dir=Rsdirectory to install scripts to(s
build-dir=Rs'build directory (where to install from)(RRs-force installation (overwrite existing files)N(s
skip-buildNsskip the build steps(t__name__t
__module__tdescriptionRtuser_optionstboolean_optionsR
RR R#R(((s9/usr/lib64/python2.7/distutils/command/install_scripts.pyRs					(
t__doc__t__revision__Rtdistutils.coreRt	distutilsRRRR(((s9/usr/lib64/python2.7/distutils/command/install_scripts.pyt<module>sPKW[���t..command/install_data.pyonu�[����
{fc@sXdZdZddlZddlmZddlmZmZdefd��YZdS(s�distutils.command.install_data

Implements the Distutils 'install_data' command, for installing
platform-independent data files.s$Id$i����N(tCommand(tchange_roottconvert_pathtinstall_datacBsSeZdZdddgZdgZd	�Zd
�Zd�Zd�Z	d
�Z
RS(sinstall data filessinstall-dir=tdsIbase directory for installing data files (default: installation base dir)sroot=s<install everything relative to this alternate root directorytforcetfs-force installation (overwrite existing files)cCs@d|_g|_d|_d|_|jj|_d|_dS(Nii(tNonetinstall_dirtoutfilestrootRtdistributiont
data_filestwarn_dir(tself((s6/usr/lib64/python2.7/distutils/command/install_data.pytinitialize_optionss				cCs|jdddd�dS(	NtinstallRRR
R(RR(R
R
(RR(tset_undefined_options(R((s6/usr/lib64/python2.7/distutils/command/install_data.pytfinalize_options%s	cCsk|j|j�xT|jD]I}t|t�r�t|�}|jra|jd||jf�n|j||j�\}}|j	j
|�qt|d�}tjj
|�s�tjj|j|�}n|jr�t|j|�}n|j|�|dgkr|j	j
|�qxF|dD]:}t|�}|j||�\}}|j	j
|�q%WqWdS(NsMsetup script did not provide a directory for '%s' -- installing right in '%s'ii(tmkpathRRt
isinstancetstrRR
twarnt	copy_fileR	tappendtostpathtisabstjoinR
R(RRtoutt_tdirtdata((s6/usr/lib64/python2.7/distutils/command/install_data.pytrun,s*			
cCs
|jpgS(N(R(R((s6/usr/lib64/python2.7/distutils/command/install_data.pyt
get_inputsMscCs|jS(N(R	(R((s6/usr/lib64/python2.7/distutils/command/install_data.pytget_outputsPs(sinstall-dir=RsIbase directory for installing data files (default: installation base dir)N(sroot=Ns<install everything relative to this alternate root directory(RRs-force installation (overwrite existing files)(t__name__t
__module__tdescriptionRtuser_optionstboolean_optionsRRR!R"R#(((s6/usr/lib64/python2.7/distutils/command/install_data.pyRs					!	(	t__doc__t__revision__Rtdistutils.coreRtdistutils.utilRRR(((s6/usr/lib64/python2.7/distutils/command/install_data.pyt<module>s
PKW[�ܚy��command/clean.pyonu�[����
{fc@sbdZdZddlZddlmZddlmZddlmZdefd��YZ	dS(	sBdistutils.command.clean

Implements the Distutils 'clean' command.s$Id$i����N(tCommand(tremove_tree(tlogtcleancBsJeZdZddddddgZd
gZd�Zd�Zd�ZRS(s-clean up temporary files from 'build' commandsbuild-base=tbs2base build directory (default: 'build.build-base')s
build-lib=s<build directory for all modules (default: 'build.build-lib')sbuild-temp=tts7temporary build directory (default: 'build.build-temp')sbuild-scripts=s<build directory for scripts (default: 'build.build-scripts')sbdist-base=s+temporary directory for built distributionstalltas7remove all build output, not just temporary by-productscCs:d|_d|_d|_d|_d|_d|_dS(N(tNonet
build_baset	build_libt
build_tempt
build_scriptst
bdist_baseR(tself((s//usr/lib64/python2.7/distutils/command/clean.pytinitialize_options"s					cCs-|jddd	d
d�|jdd�dS(
NtbuildR	R
RRtbdistR
(R	R	(R
R
(RR(RR(R
R
(tset_undefined_options(R((s//usr/lib64/python2.7/distutils/command/clean.pytfinalize_options*s		cCs�tjj|j�r.t|jd|j�ntjd|j�|jr�x[|j	|j
|jfD]>}tjj|�r�t|d|j�qctjd|�qcWn|js�y'tj
|j�tjd|j�Wq�tk
r�q�XndS(Ntdry_runs%'%s' does not exist -- can't clean its
removing '%s'(tostpathtexistsRRRRtdebugRR
R
RtwarntrmdirR	tinfotOSError(Rt	directory((s//usr/lib64/python2.7/distutils/command/clean.pytrun3s$	
				
(sbuild-base=Rs2base build directory (default: 'build.build-base')N(s
build-lib=Ns<build directory for all modules (default: 'build.build-lib')(sbuild-temp=Rs7temporary build directory (default: 'build.build-temp')(sbuild-scripts=Ns<build directory for scripts (default: 'build.build-scripts')(sbdist-base=Ns+temporary directory for built distributions(RRs7remove all build output, not just temporary by-products(	t__name__t
__module__tdescriptionRtuser_optionstboolean_optionsRRR(((s//usr/lib64/python2.7/distutils/command/clean.pyRs"					(
t__doc__t__revision__Rtdistutils.coreRtdistutils.dir_utilRt	distutilsRR(((s//usr/lib64/python2.7/distutils/command/clean.pyt<module>sPKW[`�=��)�)command/bdist_wininst.pycnu�[����
{fc@s�dZdZddlZddlZddlZddlmZddlmZddl	m
Z
ddlmZm
Z
ddlmZdd	lmZd
efd��YZdS(szdistutils.command.bdist_wininst

Implements the Distutils 'bdist_wininst' command: create a windows installer
exe-program.s$Id$i����N(tget_python_version(tCommand(tremove_tree(tDistutilsOptionErrortDistutilsPlatformError(tlog(tget_platformt
bdist_wininstcBs�eZdZd,ddde�fdddd	fd
d+ddfd-d.d/d0d1d2d3d4d5g
Zdd
ddgZd$�Zd%�Zd&�Z	d'�Z
d+d(�Zd)�Zd*�Z
RS(6s-create an executable installer for MS Windowss
bdist-dir=s1temporary directory for creating the distributions
plat-name=tps;platform name to embed in generated filenames (default: %s)s	keep-temptks/keep the pseudo-installation tree around after s!creating the distribution archivestarget-version=s!require a specific python versions on the target systemsno-target-compiletcs/do not compile .py to .pyc on the target systemsno-target-optimizetos;do not compile .py to .pyo (optimized) on the target systems	dist-dir=tds-directory to put final built distributions insbitmap=tbs>bitmap to use for the installer instead of python-powered logostitle=tts?title to display on the installer background instead of defaults
skip-builds2skip rebuilding everything (for testing/debugging)sinstall-script=sUbasename of installation script to be run after installation or before deinstallationspre-install-script=s{Fully qualified filename of a script to be run before any files are installed.  This script need not be in the distributionsuser-access-control=s�specify Vista's UAC handling - 'none'/default=no handling, 'auto'=use UAC if target Python installed for all users, 'force'=always use UACcCsyd|_d|_d|_d|_d|_d|_d|_d|_d|_	d|_
d|_d|_d|_
dS(Ni(tNonet	bdist_dirt	plat_namet	keep_temptno_target_compiletno_target_optimizettarget_versiontdist_dirtbitmapttitlet
skip_buildtinstall_scripttpre_install_scripttuser_access_control(tself((s7/usr/lib64/python2.7/distutils/command/bdist_wininst.pytinitialize_options@s												cCsV|jdd	�|jdkr|jrR|jrR|jjd�}|j|_n|jd�j}t	j
j|d�|_n|js�d|_n|jr�|jj
�r�t�}|jr�|j|kr�td|f�n||_n|jdd
d�|jrRxF|jjD]%}|jt	j
j|�krPqqWtd|j�ndS(NtbdistRtwininsttsMtarget version can only be %s, or the '--skip-build' option must be specifiedRRs(install_script '%s' not found in scripts(RR(RR(RR(tset_undefined_optionsRRRRtdistributiontget_command_objtget_finalized_commandt
bdist_basetostpathtjoinRthas_ext_modulesRRRtscriptstbasename(RRR&t
short_versiontscript((s7/usr/lib64/python2.7/distutils/command/bdist_wininst.pytfinalize_optionsRs4		
		c
Cs�tjdkr<|jj�s-|jj�r<td��n|jsU|jd�n|jddd�}|j	|_
|j|_d|_|j|_|jd�}d|_
d|_|jj�rB|j}|s�|js�td	��tjdd
!}nd|j|f}|jd�}tjj|jd|�|_nxJdD]B}tj|�}|dkrw|d}nt|d||�qIWtjd|j	�|j�tjjdtjj|j	d��|j�tjd=ddl m!}|�}	|jj"�}
|j#|	dd|j	�}|j$||
|j%�|jj�rYt&�}nd}|jj'j(d||j)|
�f�tj*d|�tj+|�|j,s�t-|j	d|j.�ndS(Ntwin32s^distribution contains extensions and/or C libraries; must be compiled on a Windows 32 platformtbuildtinstalltreinit_subcommandsiitinstall_libs Should have already checked thisis.%s-%stlibtpurelibtplatlibtheadersR+tdatas/Include/$dist_nametinstall_sinstalling to %stPURELIBi����(tmktemptziptroot_dirtanyRsremoving temporary file '%s'tdry_run(R6R7R8R+R9(/tsystplatformR#R*thas_c_librariesRRtrun_commandtreinitialize_commandRtroottwarn_dirRtcompiletoptimizeRtAssertionErrortversionR%R'R(R)t
build_baset	build_libtstringtuppertsetattrRtinfotensure_finalizedtinserttrunttempfileR<tget_fullnametmake_archivet
create_exeRRt
dist_filestappendtget_installer_filenametdebugtremoveRRR@(
RR2R4Rtplat_specifierR1tkeytvalueR<tarchive_basenametfullnametarcnamet	pyversion((s7/usr/lib64/python2.7/distutils/command/bdist_wininst.pyRTzsf					


%

	
	cCs�g}|jj}|jd�|jp+dd}d�}x�ddddd	d
ddgD]a}t||d�}|rZ|d
tj|�||�f}|jd|||�f�qZqZW|jd�|jr�|jd|j�n|jd||��|jd|j�|jd|j	�|j
rM|jd|j
�n|jrm|jd|j�n|jp�|jj
�}|jd||��ddl}ddl}	d|j|j��|	jf}
|jd|
�tj|d�S(Ns
[metadata]R!s
cSstj|dd�S(Ns
s\n(RNtreplace(ts((s7/usr/lib64/python2.7/distutils/command/bdist_wininst.pytescape�stauthortauthor_emailtdescriptiont
maintainertmaintainer_emailtnameturlRKs
    %s: %ss%s=%ss
[Setup]sinstall_script=%ssinfo=%sstarget_compile=%dstarget_optimize=%dstarget_version=%ssuser_access_control=%sstitle=%si����sBuilt %s with distutils-%ss
build_info=%s(R#tmetadataRZtlong_descriptiontgetattrRNt
capitalizeRRRRRRRVttimet	distutilstctimet__version__R)(RtlinesRoRQRgRmR9RRsRtt
build_info((s7/usr/lib64/python2.7/distutils/command/bdist_wininst.pytget_inidata�s<
	$
			cCs�ddl}|j|j�|j�}|j|�}|jd|�|rrt|d�j�}t|�}nd}t|d�}	|	j	|j
��|r�|	j	|�nytWntk
r�n"Xt
|t�r�|jd�}n|d}|jr)t|jd�j�}
||
d	}n
|d}|	j	|�|jd
dt|�|�}|	j	|�|	j	t|d�j��dS(Ni����screating %strbitwbtmbcsstrs
s<iiii{V4(tstructtmkpathRRyR[tannouncetopentreadtlentwritet
get_exe_bytestunicodet	NameErrort
isinstancetencodeRtpack(RRcRbRR~tcfgdatatinstaller_namet
bitmapdatat	bitmaplentfiletscript_datatheader((s7/usr/lib64/python2.7/distutils/command/bdist_wininst.pyRX�s>

	

			
cCs`|jr7tjj|jd||j|jf�}n%tjj|jd||jf�}|S(Ns%s.%s-py%s.exes	%s.%s.exe(RR'R(R)RR(RRbR�((s7/usr/lib64/python2.7/distutils/command/bdist_wininst.pyR[5s	cCsddlm}t�}|jrm|j|krm|j|krL|�}qv|jdkrdd}qvd}n	|�}tjjt�}|jdkr�|jd dkr�|jd}nd	}tjj	|d
||f�}t
|d�}z|j�SWd|j�XdS(Ni����(tget_build_versions2.4g@gffffff@R0itwinR!swininst-%.1f%s.exeRz(
tdistutils.msvccompilerR�RRR'R(tdirnamet__file__RR)R�R�tclose(RR�tcur_versiontbvt	directorytsfixtfilenametf((s7/usr/lib64/python2.7/distutils/command/bdist_wininst.pyR�Cs$					"N(s
bdist-dir=Ns1temporary directory for creating the distribution(sno-target-compileR
s/do not compile .py to .pyc on the target system(sno-target-optimizeRs;do not compile .py to .pyo (optimized) on the target system(s	dist-dir=Rs-directory to put final built distributions in(sbitmap=R
s>bitmap to use for the installer instead of python-powered logo(stitle=Rs?title to display on the installer background instead of default(s
skip-buildNs2skip rebuilding everything (for testing/debugging)(sinstall-script=NsUbasename of installation script to be run after installation or before deinstallation(spre-install-script=Ns{Fully qualified filename of a script to be run before any files are installed.  This script need not be in the distribution(suser-access-control=Ns�specify Vista's UAC handling - 'none'/default=no handling, 'auto'=use UAC if target Python installed for all users, 'force'=always use UAC(t__name__t
__module__RjRRtuser_optionstboolean_optionsRR/RTRyRXR[R�(((s7/usr/lib64/python2.7/distutils/command/bdist_wininst.pyRsN
					(	S	17	(t__doc__t__revision__RAR'RNt	sysconfigRtdistutils.coreRtdistutils.dir_utilRtdistutils.errorsRRRtRtdistutils.utilRR(((s7/usr/lib64/python2.7/distutils/command/bdist_wininst.pyt<module>sPKW[�ܚy��command/clean.pycnu�[����
{fc@sbdZdZddlZddlmZddlmZddlmZdefd��YZ	dS(	sBdistutils.command.clean

Implements the Distutils 'clean' command.s$Id$i����N(tCommand(tremove_tree(tlogtcleancBsJeZdZddddddgZd
gZd�Zd�Zd�ZRS(s-clean up temporary files from 'build' commandsbuild-base=tbs2base build directory (default: 'build.build-base')s
build-lib=s<build directory for all modules (default: 'build.build-lib')sbuild-temp=tts7temporary build directory (default: 'build.build-temp')sbuild-scripts=s<build directory for scripts (default: 'build.build-scripts')sbdist-base=s+temporary directory for built distributionstalltas7remove all build output, not just temporary by-productscCs:d|_d|_d|_d|_d|_d|_dS(N(tNonet
build_baset	build_libt
build_tempt
build_scriptst
bdist_baseR(tself((s//usr/lib64/python2.7/distutils/command/clean.pytinitialize_options"s					cCs-|jddd	d
d�|jdd�dS(
NtbuildR	R
RRtbdistR
(R	R	(R
R
(RR(RR(R
R
(tset_undefined_options(R((s//usr/lib64/python2.7/distutils/command/clean.pytfinalize_options*s		cCs�tjj|j�r.t|jd|j�ntjd|j�|jr�x[|j	|j
|jfD]>}tjj|�r�t|d|j�qctjd|�qcWn|js�y'tj
|j�tjd|j�Wq�tk
r�q�XndS(Ntdry_runs%'%s' does not exist -- can't clean its
removing '%s'(tostpathtexistsRRRRtdebugRR
R
RtwarntrmdirR	tinfotOSError(Rt	directory((s//usr/lib64/python2.7/distutils/command/clean.pytrun3s$	
				
(sbuild-base=Rs2base build directory (default: 'build.build-base')N(s
build-lib=Ns<build directory for all modules (default: 'build.build-lib')(sbuild-temp=Rs7temporary build directory (default: 'build.build-temp')(sbuild-scripts=Ns<build directory for scripts (default: 'build.build-scripts')(sbdist-base=Ns+temporary directory for built distributions(RRs7remove all build output, not just temporary by-products(	t__name__t
__module__tdescriptionRtuser_optionstboolean_optionsRRR(((s//usr/lib64/python2.7/distutils/command/clean.pyRs"					(
t__doc__t__revision__Rtdistutils.coreRtdistutils.dir_utilRt	distutilsRR(((s//usr/lib64/python2.7/distutils/command/clean.pyt<module>sPKW[fX��,�,command/build_py.pyonu�[����
{fc@s�dZdZddlZddlZddlmZddlmZddlmZm	Z	ddl
mZddlm
Z
d	efd
��YZdS(sHdistutils.command.build_py

Implements the Distutils 'build_py' command.s$Id$i����N(tglob(tCommand(tDistutilsOptionErrortDistutilsFileError(tconvert_path(tlogtbuild_pycBs�eZdZd#d$d&d'd(gZddgZidd6Zd�Zd�Zd�Z	d�Z
d�Zd�Zd�Z
d�Zd�Zd�Zd�Zd�Zd�Zd�Zdd�Zd�Zd �Zd!�Zd"�ZRS()s5"build" pure Python modules (copy to build directory)s
build-lib=tdsdirectory to "build" (copy) totcompiletcscompile .py to .pycs
no-compiles!don't compile .py files [default]s	optimize=tOslalso compile with optimization: -O1 for "python -O", -O2 for "python -OO", and -O0 to disable [default: -O0]tforcetfs2forcibly build everything (ignore file timestamps)cCsLd|_d|_d|_d|_d|_d|_d|_d|_dS(Ni(	tNonet	build_libt
py_modulestpackagetpackage_datatpackage_dirRtoptimizeR(tself((s2/usr/lib64/python2.7/distutils/command/build_py.pytinitialize_options!s							cCs�|jddd�|jj|_|jj|_|jj|_i|_|jjr�x6|jjj�D]\}}t|�|j|<qhWn|j�|_	t
|jt�s�yt|j�|_Wq�t
tfk
r�td��q�XndS(NtbuildRRsoptimize must be 0, 1, or 2(RR(RR(tset_undefined_optionstdistributiontpackagesRRRtitemsRtget_data_filest
data_filest
isinstanceRtintt
ValueErrortAssertionErrorR(Rtnametpath((s2/usr/lib64/python2.7/distutils/command/build_py.pytfinalize_options+s"		cCsS|jr|j�n|jr6|j�|j�n|j|jdd��dS(Ntinclude_bytecodei(Rt
build_modulesRtbuild_packagestbuild_package_datatbyte_compiletget_outputs(R((s2/usr/lib64/python2.7/distutils/command/build_py.pytrunDs	
	

cCs�g}|js|Sx�|jD]�}|j|�}tjj|jg|jd��}d}|rvt|�d}ng|j||�D]}||^q�}|j	||||f�qW|S(s?Generate list of '(package,src_dir,build_dir,filenames)' tuplest.ii(
Rtget_package_dirtosR"tjoinRtsplittlentfind_data_filestappend(RtdataRtsrc_dirt	build_dirtplentfilet	filenames((s2/usr/lib64/python2.7/distutils/command/build_py.pyRbs	%)cCs�|jjdg�|jj|g�}g}xm|D]e}ttjj|t|���}|jg|D]*}||kritjj|�ri|^qi�q5W|S(s6Return filenames for package's data files in 'src_dir't(	RtgetRR-R"R.Rtextendtisfile(RRR4tglobstfilestpatterntfilelisttfn((s2/usr/lib64/python2.7/distutils/command/build_py.pyR1zs
!#cCs�x�|jD]v\}}}}xa|D]Y}tjj||�}|jtjj|��|jtjj||�|dt�q#Wq
WdS(s$Copy data files into build directoryt
preserve_modeN(RR-R"R.tmkpathtdirnamet	copy_filetFalse(RRR4R5R8tfilenamettarget((s2/usr/lib64/python2.7/distutils/command/build_py.pyR'�s
cCs|jd�}|js5|r.tjj|�SdSn�g}x�|r�y|jdj|�}Wn,tk
r�|jd|d�|d=q>X|jd|�tjj|�Sq>W|jjd�}|dk	r�|jd|�n|r�tjj|�SdSdS(s�Return the directory, relative to the top of the source
           distribution, where package 'package' should be found
           (at least according to the 'package_dir' option, if any).R+R9ii����N(	R/RR-R"R.tKeyErrortinsertR:R
(RRR"ttailtpdir((s2/usr/lib64/python2.7/distutils/command/build_py.pyR,�s(		
	cCs�|dkrYtjj|�s1td|��ntjj|�sYtd|��qYn|r�tjj|d�}tjj|�r�|Stjdd|�ndS(NR9s%package directory '%s' does not exists>supposed package directory '%s' exists, but is not a directorys__init__.pys!package init file '%s' not found s(or not a regular file)(
R-R"texistsRtisdirR.R<RtwarnR
(RRRtinit_py((s2/usr/lib64/python2.7/distutils/command/build_py.pyt
check_package�s	cCs1tjj|�s)tjd||�tStSdS(Ns!file %s (for module %s) not found(R-R"R<RRORFtTrue(Rtmoduletmodule_file((s2/usr/lib64/python2.7/distutils/command/build_py.pytcheck_module�sc	Cs�|j||�ttjj|d��}g}tjj|jj�}xx|D]p}tjj|�}||kr�tjjtjj	|��d}|j
|||f�qP|jd|�qPW|S(Ns*.pyisexcluding %s(RQRR-R"R.tabspathRtscript_nametsplitexttbasenameR2tdebug_print(	RRRtmodule_filestmodulestsetup_scriptRtabs_fRS((s2/usr/lib64/python2.7/distutils/command/build_py.pytfind_package_modules�s
"cCs!i}g}x|jD]}|jd�}dj|dd!�}|d}y||\}}Wn&tk
r�|j|�}d}nX|s�|j||�}	|df||<|	r�|j|d|	f�q�ntjj||d�}
|j	||
�sqn|j|||
f�qW|S(s�Finds individually-specified Python modules, ie. those listed by
        module name in 'self.py_modules'.  Returns a list of tuples (package,
        module_base, filename): 'package' is a tuple of the path through
        package-space to the module; 'module_base' is the bare (no
        packages, no dots) module name, and 'filename' is the path to the
        ".py" file (relative to the distribution root) that implements the
        module.
        R+ii����it__init__s.py(
RR/R.RIR,RQR2R-R"RU(RRR\RSR"Rtmodule_baseRtcheckedRPRT((s2/usr/lib64/python2.7/distutils/command/build_py.pytfind_modules�s*


cCswg}|jr%|j|j��n|jrsxB|jD]4}|j|�}|j||�}|j|�q8Wn|S(s4Compute the list of all modules that will be built, whether
        they are specified one-module-at-a-time ('self.py_modules') or
        by whole packages ('self.packages').  Return a list of tuples
        (package, module, module_file), just like 'find_modules()' and
        'find_package_modules()' do.(RR;RcRR,R_(RR\RRtm((s2/usr/lib64/python2.7/distutils/command/build_py.pytfind_all_moduless		cCs!g|j�D]}|d^q
S(Ni����(Re(RRS((s2/usr/lib64/python2.7/distutils/command/build_py.pytget_source_files-scCs.|gt|�|dg}tjj|�S(Ns.py(tlistR-R"R.(RR5RRStoutfile_path((s2/usr/lib64/python2.7/distutils/command/build_py.pytget_module_outfile0sicCs�|j�}g}x�|D]�\}}}|jd�}|j|j||�}|j|�|r|jr|j|d�n|jdkr�|j|d�q�qqW|g|jD]4\}}}	}
|
D]}tj	j
|	|�^q�q�7}|S(NR+R	ito(ReR/RiRR2RRRR-R"R.(RR$R\toutputsRRSRTRGR4R5R8((s2/usr/lib64/python2.7/distutils/command/build_py.pyR)4s 
	)cCs�t|t�r!|jd�}n$t|ttf�sEtd��n|j|j||�}tj	j
|�}|j|�|j||dd�S(NR+s:'package' must be a string (dot-separated), list, or tupleRBi(
RtstrR/Rgttuplet	TypeErrorRiRR-R"RDRCRE(RRSRTRtoutfiletdir((s2/usr/lib64/python2.7/distutils/command/build_py.pytbuild_moduleIs
cCs=|j�}x*|D]"\}}}|j|||�qWdS(N(RcRq(RR\RRSRT((s2/usr/lib64/python2.7/distutils/command/build_py.pyR%XscCsfx_|jD]T}|j|�}|j||�}x*|D]"\}}}|j|||�q8Wq
WdS(N(RR,R_Rq(RRRR\tpackage_RSRT((s2/usr/lib64/python2.7/distutils/command/build_py.pyR&bs
c
Cs�tjr|jd�dSddlm}|j}|dtjkrV|tj}n|jr�||ddd|j	d|d|j
�n|jdkr�||d|jd|j	d|d|j
�ndS(	Ns%byte-compiling is disabled, skipping.i����(R(RiRtprefixtdry_run(tsystdont_write_bytecodeROtdistutils.utilR(RR-tsepRRRtR(RR>R(Rs((s2/usr/lib64/python2.7/distutils/command/build_py.pyR(ws	
		(s
build-lib=Rsdirectory to "build" (copy) to(RR	scompile .py to .pycN(s
no-compileNs!don't compile .py files [default](s	optimize=R
slalso compile with optimization: -O1 for "python -O", -O2 for "python -OO", and -O0 to disable [default: -O0](RRs2forcibly build everything (ignore file timestamps)(t__name__t
__module__tdescriptionR
tuser_optionstboolean_optionstnegative_optRR#R*RR1R'R,RQRUR_RcReRfRiR)RqR%R&R((((s2/usr/lib64/python2.7/distutils/command/build_py.pyRs8	
	
				
			(				4					
	(t__doc__t__revision__R-RuRtdistutils.coreRtdistutils.errorsRRRwRt	distutilsRR(((s2/usr/lib64/python2.7/distutils/command/build_py.pyt<module>sPKW[(^��,�,command/build_py.pycnu�[����
{fc@s�dZdZddlZddlZddlmZddlmZddlmZm	Z	ddl
mZddlm
Z
d	efd
��YZdS(sHdistutils.command.build_py

Implements the Distutils 'build_py' command.s$Id$i����N(tglob(tCommand(tDistutilsOptionErrortDistutilsFileError(tconvert_path(tlogtbuild_pycBs�eZdZd#d$d&d'd(gZddgZidd6Zd�Zd�Zd�Z	d�Z
d�Zd�Zd�Z
d�Zd�Zd�Zd�Zd�Zd�Zd�Zdd�Zd�Zd �Zd!�Zd"�ZRS()s5"build" pure Python modules (copy to build directory)s
build-lib=tdsdirectory to "build" (copy) totcompiletcscompile .py to .pycs
no-compiles!don't compile .py files [default]s	optimize=tOslalso compile with optimization: -O1 for "python -O", -O2 for "python -OO", and -O0 to disable [default: -O0]tforcetfs2forcibly build everything (ignore file timestamps)cCsLd|_d|_d|_d|_d|_d|_d|_d|_dS(Ni(	tNonet	build_libt
py_modulestpackagetpackage_datatpackage_dirRtoptimizeR(tself((s2/usr/lib64/python2.7/distutils/command/build_py.pytinitialize_options!s							cCs|jddd�|jj|_|jj|_|jj|_i|_|jjr�x6|jjj�D]\}}t|�|j|<qhWn|j�|_	t
|jt�sy;t|j�|_d|jko�dkns�t
�Wqtt
fk
rtd��qXndS(	NtbuildRRiisoptimize must be 0, 1, or 2(RR(RR(tset_undefined_optionstdistributiontpackagesRRRtitemsRtget_data_filest
data_filest
isinstanceRtinttAssertionErrort
ValueErrorR(Rtnametpath((s2/usr/lib64/python2.7/distutils/command/build_py.pytfinalize_options+s"		)cCsS|jr|j�n|jr6|j�|j�n|j|jdd��dS(Ntinclude_bytecodei(Rt
build_modulesRtbuild_packagestbuild_package_datatbyte_compiletget_outputs(R((s2/usr/lib64/python2.7/distutils/command/build_py.pytrunDs	
	

cCs�g}|js|Sx�|jD]�}|j|�}tjj|jg|jd��}d}|rvt|�d}ng|j||�D]}||^q�}|j	||||f�qW|S(s?Generate list of '(package,src_dir,build_dir,filenames)' tuplest.ii(
Rtget_package_dirtosR"tjoinRtsplittlentfind_data_filestappend(RtdataRtsrc_dirt	build_dirtplentfilet	filenames((s2/usr/lib64/python2.7/distutils/command/build_py.pyRbs	%)cCs�|jjdg�|jj|g�}g}xm|D]e}ttjj|t|���}|jg|D]*}||kritjj|�ri|^qi�q5W|S(s6Return filenames for package's data files in 'src_dir't(	RtgetRR-R"R.Rtextendtisfile(RRR4tglobstfilestpatterntfilelisttfn((s2/usr/lib64/python2.7/distutils/command/build_py.pyR1zs
!#cCs�x�|jD]v\}}}}xa|D]Y}tjj||�}|jtjj|��|jtjj||�|dt�q#Wq
WdS(s$Copy data files into build directoryt
preserve_modeN(RR-R"R.tmkpathtdirnamet	copy_filetFalse(RRR4R5R8tfilenamettarget((s2/usr/lib64/python2.7/distutils/command/build_py.pyR'�s
cCs|jd�}|js5|r.tjj|�SdSn�g}x�|r�y|jdj|�}Wn,tk
r�|jd|d�|d=q>X|jd|�tjj|�Sq>W|jjd�}|dk	r�|jd|�n|r�tjj|�SdSdS(s�Return the directory, relative to the top of the source
           distribution, where package 'package' should be found
           (at least according to the 'package_dir' option, if any).R+R9ii����N(	R/RR-R"R.tKeyErrortinsertR:R
(RRR"ttailtpdir((s2/usr/lib64/python2.7/distutils/command/build_py.pyR,�s(		
	cCs�|dkrYtjj|�s1td|��ntjj|�sYtd|��qYn|r�tjj|d�}tjj|�r�|Stjdd|�ndS(NR9s%package directory '%s' does not exists>supposed package directory '%s' exists, but is not a directorys__init__.pys!package init file '%s' not found s(or not a regular file)(
R-R"texistsRtisdirR.R<RtwarnR
(RRRtinit_py((s2/usr/lib64/python2.7/distutils/command/build_py.pyt
check_package�s	cCs1tjj|�s)tjd||�tStSdS(Ns!file %s (for module %s) not found(R-R"R<RRORFtTrue(Rtmoduletmodule_file((s2/usr/lib64/python2.7/distutils/command/build_py.pytcheck_module�sc	Cs�|j||�ttjj|d��}g}tjj|jj�}xx|D]p}tjj|�}||kr�tjjtjj	|��d}|j
|||f�qP|jd|�qPW|S(Ns*.pyisexcluding %s(RQRR-R"R.tabspathRtscript_nametsplitexttbasenameR2tdebug_print(	RRRtmodule_filestmodulestsetup_scriptRtabs_fRS((s2/usr/lib64/python2.7/distutils/command/build_py.pytfind_package_modules�s
"cCs!i}g}x|jD]}|jd�}dj|dd!�}|d}y||\}}Wn&tk
r�|j|�}d}nX|s�|j||�}	|df||<|	r�|j|d|	f�q�ntjj||d�}
|j	||
�sqn|j|||
f�qW|S(s�Finds individually-specified Python modules, ie. those listed by
        module name in 'self.py_modules'.  Returns a list of tuples (package,
        module_base, filename): 'package' is a tuple of the path through
        package-space to the module; 'module_base' is the bare (no
        packages, no dots) module name, and 'filename' is the path to the
        ".py" file (relative to the distribution root) that implements the
        module.
        R+ii����it__init__s.py(
RR/R.RIR,RQR2R-R"RU(RRR\RSR"Rtmodule_baseRtcheckedRPRT((s2/usr/lib64/python2.7/distutils/command/build_py.pytfind_modules�s*


cCswg}|jr%|j|j��n|jrsxB|jD]4}|j|�}|j||�}|j|�q8Wn|S(s4Compute the list of all modules that will be built, whether
        they are specified one-module-at-a-time ('self.py_modules') or
        by whole packages ('self.packages').  Return a list of tuples
        (package, module, module_file), just like 'find_modules()' and
        'find_package_modules()' do.(RR;RcRR,R_(RR\RRtm((s2/usr/lib64/python2.7/distutils/command/build_py.pytfind_all_moduless		cCs!g|j�D]}|d^q
S(Ni����(Re(RRS((s2/usr/lib64/python2.7/distutils/command/build_py.pytget_source_files-scCs.|gt|�|dg}tjj|�S(Ns.py(tlistR-R"R.(RR5RRStoutfile_path((s2/usr/lib64/python2.7/distutils/command/build_py.pytget_module_outfile0sicCs�|j�}g}x�|D]�\}}}|jd�}|j|j||�}|j|�|r|jr|j|d�n|jdkr�|j|d�q�qqW|g|jD]4\}}}	}
|
D]}tj	j
|	|�^q�q�7}|S(NR+R	ito(ReR/RiRR2RRRR-R"R.(RR$R\toutputsRRSRTRGR4R5R8((s2/usr/lib64/python2.7/distutils/command/build_py.pyR)4s 
	)cCs�t|t�r!|jd�}n$t|ttf�sEtd��n|j|j||�}tj	j
|�}|j|�|j||dd�S(NR+s:'package' must be a string (dot-separated), list, or tupleRBi(
RtstrR/Rgttuplet	TypeErrorRiRR-R"RDRCRE(RRSRTRtoutfiletdir((s2/usr/lib64/python2.7/distutils/command/build_py.pytbuild_moduleIs
cCs=|j�}x*|D]"\}}}|j|||�qWdS(N(RcRq(RR\RRSRT((s2/usr/lib64/python2.7/distutils/command/build_py.pyR%XscCsxxq|jD]f}|j|�}|j||�}x<|D]4\}}}||ksYt�|j|||�q8Wq
WdS(N(RR,R_RRq(RRRR\tpackage_RSRT((s2/usr/lib64/python2.7/distutils/command/build_py.pyR&bsc
Cs�tjr|jd�dSddlm}|j}|dtjkrV|tj}n|jr�||ddd|j	d|d|j
�n|jdkr�||d|jd|j	d|d|j
�ndS(	Ns%byte-compiling is disabled, skipping.i����(R(RiRtprefixtdry_run(tsystdont_write_bytecodeROtdistutils.utilR(RR-tsepRRRtR(RR>R(Rs((s2/usr/lib64/python2.7/distutils/command/build_py.pyR(ws	
		(s
build-lib=Rsdirectory to "build" (copy) to(RR	scompile .py to .pycN(s
no-compileNs!don't compile .py files [default](s	optimize=R
slalso compile with optimization: -O1 for "python -O", -O2 for "python -OO", and -O0 to disable [default: -O0](RRs2forcibly build everything (ignore file timestamps)(t__name__t
__module__tdescriptionR
tuser_optionstboolean_optionstnegative_optRR#R*RR1R'R,RQRUR_RcReRfRiR)RqR%R&R((((s2/usr/lib64/python2.7/distutils/command/build_py.pyRs8	
	
				
			(				4					
	(t__doc__t__revision__R-RuRtdistutils.coreRtdistutils.errorsRRRwRt	distutilsRR(((s2/usr/lib64/python2.7/distutils/command/build_py.pyt<module>sPKW[�A�r��command/upload.pycnu�[����
{fc@s�dZddlZddlZddlZddlmZmZmZddlm	Z	ddl
Z
ddlZddl
mZddlmZmZddlmZddlmZdd	lmZd
efd��YZdS(s`distutils.command.upload

Implements the Distutils 'upload' subcommand (upload package to PyPI).i����N(turlopentRequestt	HTTPError(tstandard_b64encode(tmd5(tDistutilsErrortDistutilsOptionError(t
PyPIRCCommand(tspawn(tlogtuploadcBsUeZdZejddgZejdgZd�Zd�Zd	�Zd
�Z	RS(
supload binary package to PyPItsigntsssign files to upload using gpgs	identity=tisGPG identity used to sign filescCs>tj|�d|_d|_d|_t|_d|_dS(Nti(	Rtinitialize_optionstusernametpasswordt
show_responsetFalseRtNonetidentity(tself((s0/usr/lib64/python2.7/distutils/command/upload.pyRs
				cCs�tj|�|jr/|jr/td��n|j�}|ikr~|d|_|d|_|d|_|d|_	n|jr�|j
jr�|j
j|_ndS(Ns.Must use --sign for --identity to have meaningRRt
repositorytrealm(Rtfinalize_optionsRRRt_read_pypircRRRRtdistribution(Rtconfig((s0/usr/lib64/python2.7/distutils/command/upload.pyR&s



cCsX|jjs!d}t|��nx0|jjD]"\}}}|j|||�q.WdS(NsHMust create and upload files in one command (e.g. setup.py sdist upload)(Rt
dist_filesRtupload_file(Rtmsgtcommandt	pyversiontfilename((s0/usr/lib64/python2.7/distutils/command/upload.pytrun8s
c"Cs`tj|j�\}}}}}}	|s6|s6|	rLtd|j��n|dEkrktd|��n|jr�ddd|g}
|jr�d|jg|
d	d	+nt|
d
|j�nt|d�}z|j�}Wd|j	�X|j
j}
idd
6dd6|
j�d6|
j
�d6tjj|�|fd6|d6|d6t|�j�d6dd6|
j�d6|
j�d6|
j�d6|
j�d6|
j�d6|
j�d6|
j�d6|
j�d6|
j�d 6|
j�d!6|
j�d"6|
j�d#6|
j�d$6}d%}|d&krRt j!�\}}}|rwd'||f}qwn%|d(krwd)t j d*d+�}n||d,<|jr�tjj|�d-t|d-�j�f|d.<nd/t"|j#d0|j$�}d1}d2|}|d3}t%j%�}x�|j&�D]�\}}t'|t(�s5|g}nx�|D]{}t'|t)�rld4|d5}|d+}nd%}|j*|�|j*d6|�|j*|�|j*d7�|j*|�q<WqW|j*|�|j+�}|j,d8||jft-j.�id9|d:6t/t0|��d;6|d<6}t1|jd=|d>|�}yjt2|�}|j3�}|j4}|j5r�d?j6d@dA|j�d@dAf�} |j,| t-j.�nWnVt7j8k
r�}!|j,t/|!�t-j9��n%t:k
r}!|!j;}|!j4}nX|dBkr-|j,dC||ft-j.�n/dD||f} |j,| t-j9�t<| ��dS(FNsIncompatible url %sthttpthttpssunsupported schema tgpgs
--detach-signs-as--local-useritdry_runtrbtfile_uploads:actiont1tprotcol_versiontnametversiontcontenttfiletypeR!t
md5_digests1.0tmetadata_versiontsummaryt	home_pagetauthortauthor_emailtlicensetdescriptiontkeywordstplatformtclassifierstdownload_urltprovidestrequirest	obsoletesRt	bdist_rpmsbuilt for %s %st
bdist_dumbsbuilt for %stterseitcomments.asct
gpg_signaturesBasic t:s3--------------GHSKFJDLGDS7543FJKLFHRE75642756743254s
--s--
s;filename="%s"is+
Content-Disposition: form-data; name="%s"s

sSubmitting %s to %ss multipart/form-data; boundary=%ssContent-typesContent-lengtht
Authorizationtdatatheaderss
t-iKi�sServer response (%s): %ssUpload failed (%s): %s(R$R%(=turlparseRtAssertionErrorRRRR'topentreadtcloseRtmetadatatget_nametget_versiontostpathtbasenameRt	hexdigesttget_descriptiontget_urltget_contacttget_contact_emailtget_licencetget_long_descriptiontget_keywordst
get_platformstget_classifierstget_download_urltget_providestget_requirest
get_obsoletesR9tdistRRRtStringIOtitemst
isinstancetlistttupletwritetgetvaluetannounceR	tINFOtstrtlenRRtgetcodeRRtjointsocketterrortERRORRtcodeR("RR R!R"tschematnetlocturltparamstqueryt	fragmentstgpg_argstfR.tmetaRFRBRbR-tidtauthtboundarytsep_boundarytend_boundarytbodytkeytvaluetfnRGtrequesttresulttstatustreasonRte((s0/usr/lib64/python2.7/distutils/command/upload.pyR@s�$			















	 







 
			&	

(RRssign files to upload using gpg(s	identity=R
sGPG identity used to sign files(
t__name__t
__module__R7Rtuser_optionstboolean_optionsRRR#R(((s0/usr/lib64/python2.7/distutils/command/upload.pyR
s
			(t__doc__RQRpR9turllib2RRRtbase64RRIt	cStringIORcthashlibRtdistutils.errorsRRtdistutils.coreRtdistutils.spawnRt	distutilsR	R
(((s0/usr/lib64/python2.7/distutils/command/upload.pyt<module>sPKW[%
�ppcommand/install_scripts.pycnu�[����
{fc@sbdZdZddlZddlmZddlmZddlmZdefd��YZ	dS(	sudistutils.command.install_scripts

Implements the Distutils 'install_scripts' command, for installing
Python scripts.s$Id$i����N(tCommand(tlog(tST_MODEtinstall_scriptscBsYeZdZddddgZdd
gZd�Zd
�Zd�Zd�Z	d�Z
RS(s%install scripts (Python or otherwise)sinstall-dir=tdsdirectory to install scripts tos
build-dir=tbs'build directory (where to install from)tforcetfs-force installation (overwrite existing files)s
skip-buildsskip the build stepscCs(d|_d|_d|_d|_dS(Ni(tNonetinstall_dirRt	build_dirt
skip_build(tself((s9/usr/lib64/python2.7/distutils/command/install_scripts.pytinitialize_optionss			cCs*|jdd	�|jdd
dd�dS(
Ntbuildt
build_scriptsR
tinstallRR	RR(RR
(RR	(RR(RR(tset_undefined_options(R((s9/usr/lib64/python2.7/distutils/command/install_scripts.pytfinalize_options#s
	cCs�|js|jd�n|j|j|j�|_tjdkr�xq|j�D]`}|j	rrt
jd|�qPtj|�t
dBd@}t
jd||�tj||�qPWndS(NRtposixschanging mode of %simi�schanging mode of %s to %o(Rtrun_commandt	copy_treeR
R	toutfilestostnametget_outputstdry_runRtinfotstatRtchmod(Rtfiletmode((s9/usr/lib64/python2.7/distutils/command/install_scripts.pytrun+s		cCs|jjpgS(N(tdistributiontscripts(R((s9/usr/lib64/python2.7/distutils/command/install_scripts.pyt
get_inputs:scCs
|jpgS(N(R(R((s9/usr/lib64/python2.7/distutils/command/install_scripts.pyR=s(sinstall-dir=Rsdirectory to install scripts to(s
build-dir=Rs'build directory (where to install from)(RRs-force installation (overwrite existing files)N(s
skip-buildNsskip the build steps(t__name__t
__module__tdescriptionRtuser_optionstboolean_optionsR
RR R#R(((s9/usr/lib64/python2.7/distutils/command/install_scripts.pyRs					(
t__doc__t__revision__Rtdistutils.coreRt	distutilsRRRR(((s9/usr/lib64/python2.7/distutils/command/install_scripts.pyt<module>sPKW[:Oķcommand/build.pycnu�[����
{fc@swdZdZddlZddlZddlmZddlmZddlm	Z	d�Z
defd	��YZdS(
sBdistutils.command.build

Implements the Distutils 'build' command.s$Id$i����N(tget_platform(tCommand(tDistutilsOptionErrorcCsddlm}|�dS(Ni����(tshow_compilers(tdistutils.ccompilerR(R((s//usr/lib64/python2.7/distutils/command/build.pyR
stbuildc
Bs�eZdZd,d.d/dd-d	d
fd0d1ddde�fd2d3d4d5gZddgZdd-d efgZd!�Z	d"�Z
d#�Zd$�Zd%�Z
d&�Zd'�Zd(efd)e
fd*efd+efgZRS(6s"build everything needed to installsbuild-base=tbs base directory for build librarysbuild-purelib=s2build directory for platform-neutral distributionssbuild-platlib=s3build directory for platform-specific distributionss
build-lib=s9build directory for all distribution (defaults to either sbuild-purelib or build-platlibsbuild-scripts=sbuild directory for scriptssbuild-temp=ttstemporary build directorys
plat-name=tps6platform name to build for, if supported (default: %s)s	compiler=tcsspecify the compiler typetdebugtgs;compile extensions and libraries with debugging informationtforcetfs2forcibly build everything (ignore file timestamps)sexecutable=tes5specify final destination interpreter path (build.py)s
help-compilerslist available compilerscCsgd|_d|_d|_d|_d|_d|_d|_d|_d|_	d|_
d|_dS(NRi(t
build_basetNonet
build_purelibt
build_platlibt	build_libt
build_tempt
build_scriptstcompilert	plat_nameR
Rt
executable(tself((s//usr/lib64/python2.7/distutils/command/build.pytinitialize_options7s										cCs�|jdkrt�|_ntjdkr<td��nd|jtjdd!f}ttd�ru|d7}n|j	dkr�tj
j|jd�|_	n|j
dkr�tj
j|jd|�|_
n|jdkr|jjr�|j
|_q|j	|_n|jdkr=tj
j|jd	|�|_n|jdkrxtj
j|jd
tjdd!�|_n|jdkr�tjr�tj
jtj�|_ndS(NtntsW--plat-name only supported on Windows (try using './configure --help' on your platform)s.%s-%siitgettotalrefcounts-pydebugtlibttempsscripts-(RRRtostnameRtsystversionthasattrRtpathtjoinRRRtdistributiontext_modulesRRRtnormpath(Rtplat_specifier((s//usr/lib64/python2.7/distutils/command/build.pytfinalize_optionsFs2
cCs(x!|j�D]}|j|�q
WdS(N(tget_sub_commandstrun_command(Rtcmd_name((s//usr/lib64/python2.7/distutils/command/build.pytrunxscCs
|jj�S(N(R&thas_pure_modules(R((s//usr/lib64/python2.7/distutils/command/build.pyR/�scCs
|jj�S(N(R&thas_c_libraries(R((s//usr/lib64/python2.7/distutils/command/build.pyR0�scCs
|jj�S(N(R&thas_ext_modules(R((s//usr/lib64/python2.7/distutils/command/build.pyR1�scCs
|jj�S(N(R&thas_scripts(R((s//usr/lib64/python2.7/distutils/command/build.pyR2�stbuild_pyt
build_clibt	build_extR(sbuild-base=Rs base directory for build libraryN(sbuild-purelib=Ns2build directory for platform-neutral distributions(sbuild-platlib=Ns3build directory for platform-specific distributions(sbuild-scripts=Nsbuild directory for scripts(sbuild-temp=Rstemporary build directory(s	compiler=R	sspecify the compiler type(R
Rs;compile extensions and libraries with debugging information(RR
s2forcibly build everything (ignore file timestamps)(sexecutable=Rs5specify final destination interpreter path (build.py)(t__name__t
__module__tdescriptionRRtuser_optionstboolean_optionsRthelp_optionsRR*R.R/R0R1R2tsub_commands(((s//usr/lib64/python2.7/distutils/command/build.pyRsN
			2								(t__doc__t__revision__R!Rtdistutils.utilRtdistutils.coreRtdistutils.errorsRRR(((s//usr/lib64/python2.7/distutils/command/build.pyt<module>s	PKW[�v�jvvcommand/check.pyonu�[����
{fc@s�dZdZddlmZddlmZddlmZypddlm	Z	ddl
mZddlm
Z
dd	lmZdd
lmZde	fd��YZeZWnek
r�eZnXd
efd��YZdS(sCdistutils.command.check

Implements the Distutils 'check' command.
s$Id$i����(tCommand(tPKG_INFO_ENCODING(tDistutilsSetupError(tReporter(tParser(tfrontend(tnodes(tStringIOtSilentReportercBs&eZddddd�Zd�ZRS(itasciitreplacec	Cs/g|_tj||||||||�dS(N(tmessagesRt__init__(tselftsourcetreport_levelt
halt_leveltstreamtdebugtencodingt
error_handler((s//usr/lib64/python2.7/distutils/command/check.pyRs	cOsB|jj||||f�tj|d|d|j|||�S(Ntlevelttype(RtappendRtsystem_messagetlevels(R
Rtmessagetchildrentkwargs((s//usr/lib64/python2.7/distutils/command/check.pyRs
N(t__name__t
__module__tNoneRR(((s//usr/lib64/python2.7/distutils/command/check.pyRstcheckcBsqeZdZdZdddgZdddgZd�Zd�Zd
�Zd�Z	d�Z
d�Zd�ZRS(s6This command checks the meta-data of the package.
    s"perform some checks on the packagetmetadatatmsVerify meta-datatrestructuredtexttrsEChecks if long string meta-data syntax are reStructuredText-complianttstricttss(Will exit with an error if a check failscCs(d|_d|_d|_d|_dS(s Sets default values for options.iiN(R#R!R%t	_warnings(R
((s//usr/lib64/python2.7/distutils/command/check.pytinitialize_options3s			cCsdS(N((R
((s//usr/lib64/python2.7/distutils/command/check.pytfinalize_options:scCs|jd7_tj||�S(s*Counts the number of warnings that occurs.i(R'Rtwarn(R
tmsg((s//usr/lib64/python2.7/distutils/command/check.pyR*=scCsx|jr|j�n|jrMtr2|j�qM|jrMtd��qMn|jrt|jdkrttd��ndS(sRuns the command.sThe docutils package is needed.isPlease correct your package.N(R!tcheck_metadataR#tHAS_DOCUTILStcheck_restructuredtextR%RR'(R
((s//usr/lib64/python2.7/distutils/command/check.pytrunBs	
	
	cCs�|jj}g}x<dD]4}t||�o:t||�s|j|�qqW|rt|jddj|��n|jr�|js�|jdd�q�n>|j	r�|j
s�|jdd	�q�n|jd
dd�d
S(s�Ensures that all required elements of meta-data are supplied.

        name, version, URL, (author and author_email) or
        (maintainer and maintainer_email)).

        Warns if any are missing.
        tnametversionturlsmissing required meta-data: %ss, s)missing meta-data: if 'author' supplied, s#'author_email' must be supplied toos-missing meta-data: if 'maintainer' supplied, s''maintainer_email' must be supplied toos4missing meta-data: either (author and author_email) s%or (maintainer and maintainer_email) smust be suppliedN(R0R1R2(tdistributionR!thasattrtgetattrRR*tjointauthortauthor_emailt
maintainertmaintainer_email(R
R!tmissingtattr((s//usr/lib64/python2.7/distutils/command/check.pyR,Rs$
						cCs�|jj�}t|t�s0|jt�}nxd|j|�D]S}|djd�}|dkrr|d}nd|d|f}|j	|�q@WdS(s4Checks if the long string fields are reST-compliant.i����tlineis%s (line %s)N(
R3tget_long_descriptiont
isinstancetunicodetdecodeRt_check_rst_datatgetRR*(R
tdatatwarningR=((s//usr/lib64/python2.7/distutils/command/check.pyR.ps
cCs|jjpd}t�}tjdtf�j�}d|_d|_d|_	t
||j|jd|j
d|jd|jd|j�}tj||d|�}|j|d	�y|j||�Wn3tk
r�}|jjd	d
|dif�nX|jS(
s8Returns warnings when the provided data doesn't compile.ssetup.pyt
componentsiRRRRRi����s!Could not finish the parsing: %s.tN(R3tscript_nameRRtOptionParsertget_default_valuest	tab_widthRtpep_referencestrfc_referencesRRRtwarning_streamRterror_encodingterror_encoding_error_handlerRtdocumenttnote_sourcetparsetAttributeErrorRR(R
RDtsource_pathtparsertsettingstreporterRQte((s//usr/lib64/python2.7/distutils/command/check.pyRB}s*									(R!R"sVerify meta-data(R#R$sEChecks if long string meta-data syntax are reStructuredText-compliant(R%R&s(Will exit with an error if a check fails(
RRt__doc__tdescriptiontuser_optionstboolean_optionsR(R)R*R/R,R.RB(((s//usr/lib64/python2.7/distutils/command/check.pyR &s							
N(RZt__revision__tdistutils.coreRtdistutils.distRtdistutils.errorsRtdocutils.utilsRtdocutils.parsers.rstRtdocutilsRRRRtTrueR-tImportErrortFalseR (((s//usr/lib64/python2.7/distutils/command/check.pyt<module>s


PKW[)U]	��command/__init__.pycnu�[����
{fc@sOdZdZdddddddd	d
ddd
dddddddgZdS(s\distutils.command

Package containing implementation of all the standard Distutils
commands.s$Id$tbuildtbuild_pyt	build_extt
build_clibt
build_scriptstcleantinstalltinstall_libtinstall_headerstinstall_scriptstinstall_datatsdisttregistertbdistt
bdist_dumbt	bdist_rpmt
bdist_wininsttuploadtcheckN(t__doc__t__revision__t__all__(((s2/usr/lib64/python2.7/distutils/command/__init__.pyt<module>s(PKW[�ˣA�A�Acommand/install.pyonu�[����
{fc@s�dZddlmZdZddlZddlZddlZddlTddlm	Z	ddl
mZddlm
Z
dd	lmZdd
lmZddlmZmZmZddlmZdd
lmZddlmZddlmZejdkr1idd6dd6dd6dd6dd6Zn)idd6dd6dd6dd6dd6Ziidd6dd6dd6dd6dd6d6idd6d d6d!d6dd6dd6d"6id#d6d#d6d$d6d%d6d&d6d'6ed(6id#d6d#d6d)d6d*d6d&d6d+6idd6dd6dd6dd6dd6d,6id#d6d#d6d$d6d%d6d&d6d-6Zd0Zd.e	fd/��YZdS(1sFdistutils.command.install

Implements the Distutils 'install' command.i����(tlogs$Id$N(t*(tCommand(tDEBUG(tget_config_vars(tDistutilsPlatformError(t
write_file(tconvert_patht
subst_varstchange_root(tget_platform(tDistutilsOptionError(t	USER_BASE(t	USER_SITEs2.2s$basetpurelibtplatlibs$base/Include/$dist_nametheaderss
$base/Scriptstscriptstdatas$base/Lib/site-packagess/$base/lib/python$py_version_short/site-packagess5$platbase/lib64/python$py_version_short/site-packagess0$base/include/python$py_version_short/$dist_names	$base/bintunix_prefixs$base/lib/pythons$base/lib64/pythons$base/include/python/$dist_namet	unix_homes	$usersites4$userbase/include/python$py_version_short/$dist_names
$userbase/bins	$userbaset	unix_usertnts4$userbase/Python$py_version_nodot/Include/$dist_names$userbase/Scriptstnt_usertos2tos2_hometinstallcBs�eZdZdHdIdJddGdefdKddGdd
fdLdMdNddGddfdOdPdQdRdSdTdUdVdWgZdd%d(dgZidd 6Zd,�Zd-�Z	d.�Z
d/�Zd0�Zd1�Z
d2�Zd3�Zd4�Zd5�Zd6�Zd7�Zd8�Zd9�Zd:�Zd;�Zd<�Zd=�Zd>�Zd?�Zd@�ZdAefdBefdCefdDefdEdF�fgZRS(Xs'install everything from build directorysprefix=sinstallation prefixsexec-prefix=s.(Unix only) prefix for platform-specific filesshome=s+(Unix only) home directory to install undertusers!install in user site-package '%s's
install-base=s;base installation directory (instead of --prefix or --home)sinstall-platbase=s8base installation directory for platform-specific files s$(instead of --exec-prefix or --home)sroot=s<install everything relative to this alternate root directorysinstall-purelib=s;installation directory for pure Python module distributionssinstall-platlib=s8installation directory for non-pure module distributionssinstall-lib=s4installation directory for all module distributions s3(overrides --install-purelib and --install-platlib)sinstall-headers=s(installation directory for C/C++ headerssinstall-scripts=s)installation directory for Python scriptss
install-data=s%installation directory for data filestcompiletcscompile .py to .pyc [default]s
no-compilesdon't compile .py filess	optimize=tOslalso compile with optimization: -O1 for "python -O", -O2 for "python -OO", and -O0 to disable [default: -O0]tforcetfs1force installation (overwrite any existing files)s
skip-builds2skip rebuilding everything (for testing/debugging)srecord=s3filename in which to record list of installed filescCs�d|_d|_d|_d|_d|_d|_d|_d|_d|_	d|_
d|_d|_d|_
t|_t|_d|_d|_d|_d|_d|_d|_d|_d|_d|_d|_dS(Nii(tNonetprefixtexec_prefixthomeRtinstall_basetinstall_platbasetroottinstall_purelibtinstall_platlibtinstall_headerstinstall_libtinstall_scriptstinstall_dataRtinstall_userbaseR
tinstall_usersiteRtoptimizet
extra_pathtinstall_path_fileRt
skip_buildtwarn_dirt
build_baset	build_libtrecord(tself((s1/usr/lib64/python2.7/distutils/command/install.pytinitialize_options�s2																	
							c	CsL|js|js|jr=|js-|jr=tdd�n|jrd|jsX|jrdtd�n|jr�|js�|js�|js�|js�|jr�td��ntjdkr�|jr�|j	d�d|_q�n|jd�tjdkr|j�n
|j
�|jd�tjtj�d	}td
d�\}}i|jj�d6|jj�d
6|jj�d6|d6|d	d!d6|d	|dd6|d6|d
6|d6|d6|jd6|jd6|_|j�|jd�|j|jd<|j|jd<tr;ddlm}dGH||j�n|j�|jd�|jrh|j�n|jdkr�|jj r�|j!|_q�|j"|_n|j#dd d!d"d#d$dd�|j$�|j|_%tj&j'|j|j(�|_|j)dk	r(|j*d%dd d!d"d#d$�n|jd&�|j+d'd*d+�dS(,Ns.must supply either prefix/exec-prefix/home or s)install-base/install-platbase -- not boths9must supply either home or prefix/exec-prefix -- not bothsGcan't combine user with prefix, exec_prefix/home, or install_(plat)basetposixs+exec-prefix option ignored on this platformspre-finalize_{unix,other}spost-finalize_{unix,other}()iR"R#t	dist_nametdist_versiont
dist_fullnamet
py_versionitpy_version_shortitpy_version_nodott
sys_prefixtsys_exec_prefixtuserbasetusersitespost-expand_basedirs()tbasetplatbasei����(tpprintsconfig vars:spost-expand_dirs()tlibRRRRRtlibbasesafter prepending roottbuildR5R6(R5R5(R6R6(,R"R#R$R%R&RRtostnametwarnR!t	dump_dirst
finalize_unixtfinalize_othertstringtsplittsystversionRtdistributiontget_nametget_versiontget_fullnameR.R/tconfig_varstexpand_basedirsRRGtexpand_dirstcreate_home_pathR+text_modulesR)R(t
convert_pathsthandle_extra_pathtinstall_libbasetpathtjoint
extra_dirsR'tchange_rootstset_undefined_options(R8R>R"R#RG((s1/usr/lib64/python2.7/distutils/command/install.pytfinalize_options�s~
	$	










	
	


	cCs�tr�ddlm}|dGHx�|jD]�}|d}|ddkrY|dd!}n||jkr�tj|j||�}t||�}n!tj||�}t||�}d||fGHq)WndS(Ni����(t
longopt_xlatet:it=s  %s: %s(Rtdistutils.fancy_getoptRgtuser_optionstnegative_optRQt	translatetgetattr(R8tmsgRgtopttopt_nametval((s1/usr/lib64/python2.7/distutils/command/install.pyRN~s	
	cCs�|jdk	s|jdk	r�|jdkrK|jdkrK|jdksx|jdksx|jdksx|jdkr�t	d�ndS|j
r�|jdkr�td��n|j|_|_|j
d�n�|jdk	r|j|_|_|j
d�n�|jdkra|jdk	r.t	d�ntjjtj�|_tjjtj�|_n|jdkr|j|_n|j|_|j|_|j
d�dS(NsPinstall-base or install-platbase supplied, but installation scheme is incompletes$User base directory is not specifiedRRs*must not supply exec-prefix without prefixR(R%R!R&R+R(R)R*R,R-RRR.Rt
select_schemeR$R"R#RKRatnormpathRS(R8((s1/usr/lib64/python2.7/distutils/command/install.pyRO�s<			cCs�|jrQ|jdkr'td��n|j|_|_|jtjd�n�|j	dk	r�|j	|_|_|jd�nu|j
dkr�tjjt
j
�|_
n|j
|_|_y|jtj�Wn!tk
r�tdtj�nXdS(Ns$User base directory is not specifiedt_userRs)I don't know how to install stuff on '%s'(RR.R!RR%R&RsRKRLR$R"RaRtRStKeyError(R8((s1/usr/lib64/python2.7/distutils/command/install.pyRP�s"	
cCsUt|}xDtD]<}d|}t||�dkrt||||�qqWdS(Ntinstall_(tINSTALL_SCHEMEStSCHEME_KEYSRnR!tsetattr(R8RLtschemetkeytattrname((s1/usr/lib64/python2.7/distutils/command/install.pyRs�s



cCs�x�|D]y}t||�}|dk	rtjdksFtjdkr[tjj|�}nt||j�}t|||�qqWdS(NR:R(	RnR!RKRLRat
expanduserRRYRz(R8tattrstattrRr((s1/usr/lib64/python2.7/distutils/command/install.pyt
_expand_attrs�s
cCs|jdddg�dS(NR%R&R'(R�(R8((s1/usr/lib64/python2.7/distutils/command/install.pyRZ�s	cCs#|jddddddg�dS(NR(R)R+R*R,R-(R�(R8((s1/usr/lib64/python2.7/distutils/command/install.pyR[�s	cGs>x7|D]/}d|}t||tt||���qWdS(NRw(RzRRn(R8tnamesRLR�((s1/usr/lib64/python2.7/distutils/command/install.pyR^�s

cCs�|jdkr!|jj|_n|jdk	r�t|j�tkr`tj|jd�|_nt|j�dkr�|jd}}n0t|j�dkr�|j\}}n	td�t	|�}nd}d}||_
||_dS(Nt,iiisY'extra_path' option must be a list, tuple, or comma-separated string with 1 or 2 elementst(R1R!RUttypet
StringTypeRQRRtlenRRt	path_fileRc(R8R�Rc((s1/usr/lib64/python2.7/distutils/command/install.pyR_�s 	c	GsDx=|D]5}d|}t||t|jt||���qWdS(NRw(RzR	R'Rn(R8R�RLR�((s1/usr/lib64/python2.7/distutils/command/install.pyRds

cCs�|js
dSttjjd��}xc|jj�D]R\}}|j|�r5tjj|�r5|j	d|�tj
|d�q5q5WdS(s#Create directories under ~
        Nt~sos.makedirs('%s', 0700)i�(RRRKRaR~RYt	iteritemst
startswithtisdirtdebug_printtmakedirs(R8R$RLRa((s1/usr/lib64/python2.7/distutils/command/install.pyR\"s	"cCs�|jsU|jd�|jjd�j}|jrU|t�krUtd��qUnx!|j�D]}|j|�qbW|j	r�|j
�n|jr|j�}|j
r�t|j
�}x/tt|��D]}|||||<q�Wn|jt|j|fd|j�nttjjtj�}ttjj|�}tjjtjj|j��}|jr�|j	oz|jr�||kr�tjd|j�ndS(NRJs"Can't install when cross-compilings'writing list of installed files to '%s's�modules installed to '%s', which is not in Python's module search path (sys.path) -- you'll have to change the search path yourself(R3trun_commandRUtget_command_objt	plat_nameR4R
Rtget_sub_commandsR�tcreate_path_fileR7tget_outputsR'R�txrangetexecuteRtmapRKRaRtRStnormcaseR+R2Rtdebug(R8t
build_plattcmd_nametoutputstroot_lentcountertsys_pathR+((s1/usr/lib64/python2.7/distutils/command/install.pytrun/s6	
	
			!		cCsctjj|j|jd�}|jrN|jt||jgfd|�n|j	d|�dS(Ns.pthscreating %sspath file '%s' not created(
RKRaRbR`R�R2R�RRcRM(R8tfilename((s1/usr/lib64/python2.7/distutils/command/install.pyR�]s		cCs�g}xV|j�D]H}|j|�}x0|j�D]"}||kr5|j|�q5q5WqW|jr�|jr�|jtjj|j	|jd��n|S(Ns.pth(
R�tget_finalized_commandR�tappendR�R2RKRaRbR`(R8R�R�tcmdR�((s1/usr/lib64/python2.7/distutils/command/install.pyR�jscCsCg}x6|j�D](}|j|�}|j|j��qW|S(N(R�R�textendt
get_inputs(R8tinputsR�R�((s1/usr/lib64/python2.7/distutils/command/install.pyR�{s
cCs|jj�p|jj�S(sRReturn true if the current distribution has any Python
        modules to install.(RUthas_pure_modulesthas_ext_modules(R8((s1/usr/lib64/python2.7/distutils/command/install.pythas_lib�scCs
|jj�S(N(RUthas_headers(R8((s1/usr/lib64/python2.7/distutils/command/install.pyR��scCs
|jj�S(N(RUthas_scripts(R8((s1/usr/lib64/python2.7/distutils/command/install.pyR��scCs
|jj�S(N(RUthas_data_files(R8((s1/usr/lib64/python2.7/distutils/command/install.pythas_data�sR+R*R,R-tinstall_egg_infocCstS(N(tTrue(R8((s1/usr/lib64/python2.7/distutils/command/install.pyt<lambda>�R�N(sprefix=Nsinstallation prefix(sexec-prefix=Ns.(Unix only) prefix for platform-specific files(shome=Ns+(Unix only) home directory to install under(s
install-base=Ns;base installation directory (instead of --prefix or --home)(sroot=Ns<install everything relative to this alternate root directory(sinstall-purelib=Ns;installation directory for pure Python module distributions(sinstall-platlib=Ns8installation directory for non-pure module distributions(sinstall-headers=Ns(installation directory for C/C++ headers(sinstall-scripts=Ns)installation directory for Python scripts(s
install-data=Ns%installation directory for data files(RRscompile .py to .pyc [default](s
no-compileNsdon't compile .py files(s	optimize=Rslalso compile with optimization: -O1 for "python -O", -O2 for "python -OO", and -O0 to disable [default: -O0](RR s1force installation (overwrite any existing files)(s
skip-buildNs2skip rebuilding everything (for testing/debugging)(srecord=Ns3filename in which to record list of installed files(t__name__t
__module__tdescriptionR!R
Rktboolean_optionsRlR9RfRNRORPRsR�RZR[R^R_RdR\R�R�R�R�R�R�R�R�tsub_commands(((s1/usr/lib64/python2.7/distutils/command/install.pyR^s�
	
	M	�		+				
					"		
	.	
										(RRRRR( t__doc__t	distutilsRt__revision__RSRKRQttypestdistutils.coreRtdistutils.debugRtdistutils.sysconfigRtdistutils.errorsRtdistutils.file_utilRtdistutils.utilRRR	R
RtsiteRR
RTtWINDOWS_SCHEMERxRyR(((s1/usr/lib64/python2.7/distutils/command/install.pyt<module>s�$


PKW[�$2��command/install_egg_info.pyonu�[����
{fc@s�dZddlmZddlmZmZddlZddlZddlZdefd��YZ	d�Z
d�Zd	�ZdS(
s�distutils.command.install_egg_info

Implements the Distutils 'install_egg_info' command, for installing
a package's PKG-INFO metadata.i����(tCommand(tlogtdir_utilNtinstall_egg_infocBsAeZdZdZd	gZd�Zd�Zd�Zd�ZRS(
s)Install an .egg-info file for the packages8Install package's PKG-INFO metadata as an .egg-info filesinstall-dir=tdsdirectory to install tocCs
d|_dS(N(tNonetinstall_dir(tself((s:/usr/lib64/python2.7/distutils/command/install_egg_info.pytinitialize_optionsscCs�|jdd�dtt|jj���tt|jj���tjd f}t	j
j|j|�|_
|j
g|_dS(Ntinstall_libRs%s-%s-py%s.egg-infoi(RR(tset_undefined_optionstto_filenamet	safe_nametdistributiontget_nametsafe_versiontget_versiontsystversiontostpathtjoinRttargettoutputs(Rtbasename((s:/usr/lib64/python2.7/distutils/command/install_egg_info.pytfinalize_optionsscCs|j}tjj|�rGtjj|�rGtj|d|j�nptjj|�r||j	tj
|jfd|�n;tjj|j�s�|j	tj|jfd|j�nt
jd|�|js�t|d�}|jjj|�|j�ndS(Ntdry_runs	Removing s	Creating s
Writing %stw(RRRtisdirtislinkRtremove_treeRtexiststexecutetunlinkRtmakedirsRtinfotopenR
tmetadatatwrite_pkg_filetclose(RRtf((s:/usr/lib64/python2.7/distutils/command/install_egg_info.pytrun s	%#	cCs|jS(N(R(R((s:/usr/lib64/python2.7/distutils/command/install_egg_info.pytget_outputs/s(sinstall-dir=Rsdirectory to install to(	t__name__t
__module__t__doc__tdescriptiontuser_optionsRRR)R*(((s:/usr/lib64/python2.7/distutils/command/install_egg_info.pyRs			
	cCstjdd|�S(s�Convert an arbitrary string to a standard distribution name

    Any runs of non-alphanumeric/. characters are replaced with a single '-'.
    s[^A-Za-z0-9.]+t-(tretsub(tname((s:/usr/lib64/python2.7/distutils/command/install_egg_info.pyR7scCs%|jdd�}tjdd|�S(s�Convert an arbitrary string to a standard version string

    Spaces become dots, and all other non-alphanumeric characters become
    dashes, with runs of multiple dashes condensed to a single dash.
    t t.s[^A-Za-z0-9.]+R0(treplaceR1R2(R((s:/usr/lib64/python2.7/distutils/command/install_egg_info.pyR?scCs|jdd�S(s|Convert a project or version name to its filename-escaped form

    Any '-' characters are currently replaced with '_'.
    R0t_(R6(R3((s:/usr/lib64/python2.7/distutils/command/install_egg_info.pyRIs(
R-t
distutils.cmdRt	distutilsRRRRR1RRRR(((s:/usr/lib64/python2.7/distutils/command/install_egg_info.pyt<module>s$,		
PKW[4��tDtDcommand/bdist_rpm.pyonu�[����
{fc@s�dZdZddlZddlZddlZddlmZddlmZddl	m
Z
ddlmZddl
mZmZmZmZdd	lmZd
efd��YZdS(swdistutils.command.bdist_rpm

Implements the Distutils 'bdist_rpm' command (create RPM source and binary
distributions).s$Id$i����N(tCommand(tDEBUG(t
write_file(tget_python_version(tDistutilsOptionErrortDistutilsPlatformErrortDistutilsFileErrortDistutilsExecError(tlogt	bdist_rpmc+Bs�eZdZd^d_d`dadbdcdddedfdgdhdidjdkdldmdndodpdqdrdsdtdudvdwdxdydzd{d|d}d~dd�d�d�d�d�d�d�g)Zd2d7d;d0dSgZid2d56d7d96d;d=6ZdV�ZdW�ZdX�Z	dY�Z
dZ�Zd[�Zd\�Z
RS(�screate an RPM distributionsbdist-base=s/base directory for creating built distributionss	rpm-base=sdbase directory for creating RPMs (defaults to "rpm" under --bdist-base; must be specified for RPM 2)s	dist-dir=tdsDdirectory to put final RPM files in (and .spec files if --spec-only)spython=sMpath to Python interpreter to hard-code in the .spec file (default: "python")s
fix-pythonsLhard-code the exact path to the current Python interpreter in the .spec files	spec-onlysonly regenerate spec filessource-onlysonly generate source RPMsbinary-onlysonly generate binary RPMs	use-bzip2s7use bzip2 instead of gzip to create source distributionsdistribution-name=sgname of the (Linux) distribution to which this RPM applies (*not* the name of the module distribution!)sgroup=s9package classification [default: "Development/Libraries"]srelease=sRPM release numbersserial=sRPM serial numbersvendor=saRPM "vendor" (eg. "Joe Blow <joe@example.com>") [default: maintainer or author from setup script]s	packager=sBRPM packager (eg. "Jane Doe <jane@example.net>") [default: vendor]s
doc-files=s6list of documentation files (space or comma-separated)s
changelog=s
RPM changelogsicon=sname of icon files	provides=s%capabilities provided by this packages	requires=s%capabilities required by this packages
conflicts=s-capabilities which conflict with this packagesbuild-requires=s+capabilities required to build this packages
obsoletes=s*capabilities made obsolete by this packages
no-autoreqs+do not automatically calculate dependenciess	keep-temptks"don't clean up RPM build directorysno-keep-temps&clean up RPM build directory [default]suse-rpm-opt-flagss8compile with RPM_OPT_FLAGS when building from source RPMsno-rpm-opt-flagss&do not pass any RPM CFLAGS to compilers	rpm3-modes"RPM 3 compatibility mode (default)s	rpm2-modesRPM 2 compatibility modesprep-script=s3Specify a script for the PREP phase of RPM buildings
build-script=s4Specify a script for the BUILD phase of RPM buildingspre-install=s:Specify a script for the pre-INSTALL phase of RPM buildingsinstall-script=s6Specify a script for the INSTALL phase of RPM buildings
post-install=s;Specify a script for the post-INSTALL phase of RPM buildingspre-uninstall=s<Specify a script for the pre-UNINSTALL phase of RPM buildingspost-uninstall=s=Specify a script for the post-UNINSTALL phase of RPM buildings
clean-script=s4Specify a script for the CLEAN phase of RPM buildingsverify-script=s6Specify a script for the VERIFY phase of the RPM buildsforce-arch=s0Force an architecture onto the RPM build processtquiettqs3Run the INSTALL phase of RPM building in quiet modecCscd|_d|_d|_d|_d|_d|_d|_d|_d|_	d|_
d|_d|_d|_
d|_d|_d|_d|_d|_d|_d|_d|_d|_d|_d|_d|_d|_d|_d|_d|_d|_d|_d|_ d|_!d|_"d|_#d|_$d|_%d|_&d|_'dS(Nii((tNonet
bdist_basetrpm_basetdist_dirtpythont
fix_pythont	spec_onlytbinary_onlytsource_onlyt	use_bzip2tdistribution_nametgrouptreleasetserialtvendortpackagert	doc_filest	changelogticontprep_scripttbuild_scripttinstall_scripttclean_scriptt
verify_scripttpre_installtpost_installt
pre_uninstalltpost_uninstalltpreptprovidestrequirest	conflictstbuild_requirest	obsoletest	keep_temptuse_rpm_opt_flagst	rpm3_modet
no_autoreqt
force_archR(tself((s3/usr/lib64/python2.7/distutils/command/bdist_rpm.pytinitialize_options�sN																																						cCs|jdd�|jdkrR|js4td�ntjj|jd�|_n|j	dkr�|j
rytj|_	q�d|_	n|j
r�td�ntj
dkr�tdtj
�n|jr�|jr�td	�n|jj�s�d
|_n|jdd
�|j�dS(NtbdistRs)you must specify --rpm-base in RPM 2 modetrpmRs8--python and --fix-python are mutually exclusive optionstposixs9don't know how to create RPM distributions on platform %ss6cannot supply both '--source-only' and '--binary-only'iR(RR(RR(tset_undefined_optionsRRR2RtostpathtjoinRRRtsyst
executabletnameRRRtdistributionthas_ext_modulesR1tfinalize_package_data(R5((s3/usr/lib64/python2.7/distutils/command/bdist_rpm.pytfinalize_options�s0					
	cCs�|jdd�|jdd|jj�|jj�f�|jd�|jd�t|jt�r�xEdD]:}tj	j
|�ro||jkro|jj|�qoqoWn|jd	d
�|jd�|jd�|jd
�|j|j
�|_
|jd�|jd�|jd�|jd�|jd�|jd�|jd�|jd�|jd�|jd�|jd�|jd�|jd�|jd�|jd�|jd�dS(NRsDevelopment/LibrariesRs%s <%s>RRtREADMEs
README.txtRt1RRRR R!R"R#R$R%R&R'R(R)R+R,R-R.R/R4(REs
README.txt(t
ensure_stringRAtget_contacttget_contact_emailtensure_string_listt
isinstanceRtlistR;R<texiststappendt_format_changelogRtensure_filename(R5treadme((s3/usr/lib64/python2.7/distutils/command/bdist_rpm.pyRC�s>	


!

















cCs�tr>dGHdG|jGHdG|jGHdG|jGHdG|jGHn|jr`|j}|j|�nNi}x;d'D]3}tj	j
|j|�||<|j||�qmW|d}tj	j
|d|jj
��}|jt||j�fd|�|jrdS|jj}|jd
�}|jr4dg|_ndg|_|jd
�||j_|j�d}|d}|j||�|jr�tj	j|j�r�|j|j|�q�td|j�ntjd�dg}	tj	jd�stj	jd�rdg}	n|jr)|	jd�n&|jrB|	jd�n
|	jd�|j r�|	j!ddtj	j"|j�g�n|j#s�|	jd�n|j$r�|	jd�n|	j|�d}
|
d}d |
d!}d"|||f}
tj%|
�}z�g}d}x\|j'�}|s(Pnt(j)t(j*|��}|j|d#�|dkr|d}qqW|j+�}|r�t,d$t-|
���nWd|j+�X|j.|	�|j/s�|jj0�r�t1�}nd%}|jsKtj	j
|d
|�}|j2||j�tj	j
|j|�}|jjjd&||f�n|js�x�|D]�}tj	j
|d	|�}tj	j|�r[|j2||j�tj	j
|jtj	j3|��}|jjjd&||f�q[q[Wq�ndS((Nsbefore _get_package_data():svendor =s
packager =sdoc_files =schangelog =tSOURCEStSPECStBUILDtRPMStSRPMSs%s.specswriting '%s'tsdisttbztartgztarisicon file '%s' does not exists
building RPMsR8s/usr/bin/rpmbuilds
/bin/rpmbuildtrpmbuilds-bss-bbs-bas--defines
_topdir %ss--cleans--quiets%{name}-%{version}-%{release}s.src.rpms%{arch}/s.%{arch}.rpms%rpm -q --qf '%s %s\n' --specfile '%s'isFailed to execute: %stanyR	(RRRSRTRURV(4RRRRRRRtmkpathR;R<R=RRAtget_nametexecuteRt_make_spec_filet
dist_filestreinitialize_commandRtformatstrun_commandtget_archive_filest	copy_fileR RMRRtinfoRRNRR2textendtabspathR0RtpopenRtreadlinetstringtsplittstriptcloseRtreprtspawntdry_runRBRt	move_filetbasename(R5tspec_dirtrpm_dirR
t	spec_pathtsaved_dist_filesRWtsourcet
source_dirtrpm_cmdt
nvr_stringtsrc_rpmtnon_src_rpmtq_cmdtouttbinary_rpmst
source_rpmtlinetltstatust	pyversiontsrpmtfilenameR8((s3/usr/lib64/python2.7/distutils/command/bdist_rpm.pytruns�		

		
	

	
			
		 		


			
cCs"tjj|jtjj|��S(N(R;R<R=RRs(R5R<((s3/usr/lib64/python2.7/distutils/command/bdist_rpm.pyt
_dist_path�scCs�d|jj�d|jj�jdd�d|jj�d|jjdd�dd|jj�g}|jd	d
dg�|jr�|jd�n
|jd
�|jd|jj	�d|j
ddg�|js�|jj�s|jd�qn|jd|j�x~dBD]v}t
|tj|��}t|t�rj|jd|tj|�f�q|dCk	r|jd||f�qqW|jj�dkr�|jd|jj��n|jr�|jd|j�n|jr|jdtj|j��n|jr;|jdtjj|j��n|jrT|jd �n|jdd!|jj�g�d"|jtjjtjd#�f}d$|}|j r�d%|}nd&|}dDd*d+|fd,d-|fdEdFdGdHdIdJg	}x�|D]�\}}	}
t
||	�}|s'|
r�|jdd;|g�|ro|jtj!t"|d<�j#�d=��q|j|
�q�q�W|jdd>d?g�|j$r�|jd@tj|j$��n|j%r�|jddAg�|j|j%�n|S(KsiGenerate the text of an RPM spec file and return it as a
        list of strings (one per line).
        s
%define name s%define version t-t_s%define unmangled_version s%define release ts	Summary: s
Name: %{name}sVersion: %{version}sRelease: %{release}s-Source0: %{name}-%{unmangled_version}.tar.bz2s,Source0: %{name}-%{unmangled_version}.tar.gzs	License: sGroup: s>BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildrootsPrefix: %{_prefix}sBuildArch: noarchs
BuildArch: %stVendortPackagertProvidestRequirest	Conflictst	Obsoletess%s: %stUNKNOWNsUrl: sDistribution: sBuildRequires: sIcon: s
AutoReq: 0s%descriptions%s %sis%s buildsenv CFLAGS="$RPM_OPT_FLAGS" s>%s install -O1 --root=$RPM_BUILD_ROOT --record=INSTALLED_FILESR*R!s&%setup -n %{name}-%{unmangled_version}tbuildR"tinstallR#tcleanR$srm -rf $RPM_BUILD_ROOTtverifyscriptR%tpreR&tpostR'tpreunR(tpostunR)t%trs
s%files -f INSTALLED_FILESs%defattr(-,root,root)s%doc s
%changelog(R�R�R�R�R�R�N(R*R!s&%setup -n %{name}-%{unmangled_version}(R�R$srm -rf $RPM_BUILD_ROOT(R�R%N(R�R&N(R�R'N(R�R(N(R�R)N(&RAR]tget_versiontreplaceRtget_descriptionRgRRNtget_licenseRR4RBtgetattrRktlowerRKRLR=Rtget_urlRR.R R;R<RsR3tget_long_descriptionRR>targvR1RltopentreadRR(R5t	spec_filetfieldtvaltdef_setup_callt	def_buildtinstall_cmdtscript_optionstrpm_opttattrtdefault((s3/usr/lib64/python2.7/distutils/command/bdist_rpm.pyR_�s�

	


	
#				#	&
	
	+
	 	
cCs�|s
|Sg}x�tjtj|�d�D]l}tj|�}|ddkrg|jd|g�q,|ddkr�|j|�q,|jd|�q,W|ds�|d=n|S(sKFormat the changelog correctly and convert it to a list of strings
        s
it*R�R�s  (RkRlRmRgRN(R5Rt
new_changelogR�((s3/usr/lib64/python2.7/distutils/command/bdist_rpm.pyRO5s"

N(sbdist-base=Ns/base directory for creating built distributions(s	rpm-base=Nsdbase directory for creating RPMs (defaults to "rpm" under --bdist-base; must be specified for RPM 2)(s	dist-dir=R
sDdirectory to put final RPM files in (and .spec files if --spec-only)(spython=NsMpath to Python interpreter to hard-code in the .spec file (default: "python")(s
fix-pythonNsLhard-code the exact path to the current Python interpreter in the .spec file(s	spec-onlyNsonly regenerate spec file(ssource-onlyNsonly generate source RPM(sbinary-onlyNsonly generate binary RPM(s	use-bzip2Ns7use bzip2 instead of gzip to create source distribution(sdistribution-name=Nsgname of the (Linux) distribution to which this RPM applies (*not* the name of the module distribution!)(sgroup=Ns9package classification [default: "Development/Libraries"](srelease=NsRPM release number(sserial=NsRPM serial number(svendor=NsaRPM "vendor" (eg. "Joe Blow <joe@example.com>") [default: maintainer or author from setup script](s	packager=NsBRPM packager (eg. "Jane Doe <jane@example.net>") [default: vendor](s
doc-files=Ns6list of documentation files (space or comma-separated)(s
changelog=Ns
RPM changelog(sicon=Nsname of icon file(s	provides=Ns%capabilities provided by this package(s	requires=Ns%capabilities required by this package(s
conflicts=Ns-capabilities which conflict with this package(sbuild-requires=Ns+capabilities required to build this package(s
obsoletes=Ns*capabilities made obsolete by this package(s
no-autoreqNs+do not automatically calculate dependencies(s	keep-tempRs"don't clean up RPM build directory(sno-keep-tempNs&clean up RPM build directory [default](suse-rpm-opt-flagsNs8compile with RPM_OPT_FLAGS when building from source RPM(sno-rpm-opt-flagsNs&do not pass any RPM CFLAGS to compiler(s	rpm3-modeNs"RPM 3 compatibility mode (default)(s	rpm2-modeNsRPM 2 compatibility mode(sprep-script=Ns3Specify a script for the PREP phase of RPM building(s
build-script=Ns4Specify a script for the BUILD phase of RPM building(spre-install=Ns:Specify a script for the pre-INSTALL phase of RPM building(sinstall-script=Ns6Specify a script for the INSTALL phase of RPM building(s
post-install=Ns;Specify a script for the post-INSTALL phase of RPM building(spre-uninstall=Ns<Specify a script for the pre-UNINSTALL phase of RPM building(spost-uninstall=Ns=Specify a script for the post-UNINSTALL phase of RPM building(s
clean-script=Ns4Specify a script for the CLEAN phase of RPM building(sverify-script=Ns6Specify a script for the VERIFY phase of the RPM build(sforce-arch=Ns0Force an architecture onto the RPM build process(RR
s3Run the INSTALL phase of RPM building in quiet mode(t__name__t
__module__tdescriptionRtuser_optionstboolean_optionstnegative_optR6RDRCR�R�R_RO(((s3/usr/lib64/python2.7/distutils/command/bdist_rpm.pyR	s�		

	0	"	/	�		�(t__doc__t__revision__R>R;Rktdistutils.coreRtdistutils.debugRtdistutils.file_utilRtdistutils.sysconfigRtdistutils.errorsRRRRt	distutilsRR	(((s3/usr/lib64/python2.7/distutils/command/bdist_rpm.pyt<module>s"PKW[�N�`wwcommand/bdist_dumb.pyonu�[����
{fc@s�dZdZddlZddlmZddlmZddlmZddl	m
Z
mZddlm
Z
dd	lmZd
efd��YZdS(s�distutils.command.bdist_dumb

Implements the Distutils 'bdist_dumb' command (create a "dumb" built
distribution -- i.e., just an archive to be unpacked under $prefix or
$exec_prefix).s$Id$i����N(tget_python_version(tget_platform(tCommand(tremove_treetensure_relative(tDistutilsPlatformError(tlogt
bdist_dumbcBs�eZdZd"ddde�fd#d
ddd
fd$d&d'd(d)g	Zd
ddgZidd6dd6dd6Zd�Zd �Z	d!�Z
RS(*s"create a "dumb" built distributions
bdist-dir=tds1temporary directory for creating the distributions
plat-name=tps;platform name to embed in generated filenames (default: %s)sformat=tfs0archive format to create (tar, ztar, gztar, zip)s	keep-temptks/keep the pseudo-installation tree around after s!creating the distribution archives	dist-dir=s-directory to put final built distributions ins
skip-builds2skip rebuilding everything (for testing/debugging)trelatives7build the archive using relative paths (default: false)sowner=tus@Owner name used when creating a tar file [default: current user]sgroup=tgsAGroup name used when creating a tar file [default: current group]tgztartposixtziptnttos2cCsUd|_d|_d|_d|_d|_d|_d|_d|_d|_	dS(Ni(
tNonet	bdist_dirt	plat_nametformatt	keep_temptdist_dirt
skip_buildRtownertgroup(tself((s4/usr/lib64/python2.7/distutils/command/bdist_dumb.pytinitialize_options7s								cCs�|jdkr<|jd�j}tjj|d�|_n|jdkr�y|jtj	|_Wq�t
k
r�tddtj	�q�Xn|jddd	d
�dS(Ntbdisttdumbs2don't know how to create dumb built distributions son platform %sRRR(RR(RR(RR(
RRtget_finalized_commandt
bdist_basetostpathtjoinRtdefault_formattnametKeyErrorRtset_undefined_options(RR"((s4/usr/lib64/python2.7/distutils/command/bdist_dumb.pytfinalize_optionsBs
	c	Cs�|js|jd�n|jddd�}|j|_|j|_d|_tjd|j�|jd�d|jj	�|j
f}tjdkr�|j
d	d
�}ntjj|j|�}|js�|j}nj|jj�r&|j|jkr&tdt|j�t|j�f�n!tjj|jt|j��}|j||jd|d
|jd|j�}|jj�r�t�}nd}|jjjd||f�|js�t |jd|j!�ndS(Ntbuildtinstalltreinit_subcommandsiisinstalling to %ss%s.%sRt:t-sScan't make a dumb built distribution where base and platbase are different (%s, %s)troot_dirRRtanyRtdry_run("Rtrun_commandtreinitialize_commandRtroottwarn_dirRtinfotdistributiontget_fullnameRR#R'treplaceR$R%RRthas_ext_modulestinstall_basetinstall_platbaseRtreprRtmake_archiveRRRRt
dist_filestappendRRR2(RR,tarchive_basenametpseudoinstall_roottarchive_roottfilenamet	pyversion((s4/usr/lib64/python2.7/distutils/command/bdist_dumb.pytrunTsB		

		
	(s
bdist-dir=Rs1temporary directory for creating the distribution(sformat=R
s0archive format to create (tar, ztar, gztar, zip)(s	dist-dir=Rs-directory to put final built distributions inN(s
skip-buildNs2skip rebuilding everything (for testing/debugging)(RNs7build the archive using relative paths (default: false)(sowner=R
s@Owner name used when creating a tar file [default: current user](sgroup=RsAGroup name used when creating a tar file [default: current group](t__name__t
__module__tdescriptionRRtuser_optionstboolean_optionsR&RR*RG(((s4/usr/lib64/python2.7/distutils/command/bdist_dumb.pyRs8
	

		(t__doc__t__revision__R#t	sysconfigRtdistutils.utilRtdistutils.coreRtdistutils.dir_utilRRtdistutils.errorsRt	distutilsRR(((s4/usr/lib64/python2.7/distutils/command/bdist_dumb.pyt<module>sPKW[��p���versionpredicate.pyonu�[����
{fc@s�dZddlZddlZddlZejd�Zejd�Zejd�Zd�Z	iej
d6ejd6ejd	6ej
d
6ejd6ejd6Zd
dd��YZdad�ZdS(sBModule for parsing and testing package version predicate strings.
i����Ns'(?i)^\s*([a-z_]\w*(?:\.[a-z_]\w*)*)(.*)s^\s*\((.*)\)\s*$s%^\s*(<=|>=|<|>|!=|==)\s*([^\s,]+)\s*$cCsPtj|�}|s(td|��n|j�\}}|tjj|�fS(sVParse a single version comparison.

    Return (comparison string, StrictVersion)
    s"bad package restriction syntax: %r(tre_splitComparisontmatcht
ValueErrortgroupst	distutilstversiont
StrictVersion(tpredtrestcomptverStr((s2/usr/lib64/python2.7/distutils/versionpredicate.pytsplitUps
t<s<=s==t>s>=s!=tVersionPredicatecBs)eZdZd�Zd�Zd�ZRS(s�Parse and test package version predicates.

    >>> v = VersionPredicate('pyepat.abc (>1.0, <3333.3a1, !=1555.1b3)')

    The `name` attribute provides the full dotted name that is given::

    >>> v.name
    'pyepat.abc'

    The str() of a `VersionPredicate` provides a normalized
    human-readable version of the expression::

    >>> print v
    pyepat.abc (> 1.0, < 3333.3a1, != 1555.1b3)

    The `satisfied_by()` method can be used to determine with a given
    version number is included in the set described by the version
    restrictions::

    >>> v.satisfied_by('1.1')
    True
    >>> v.satisfied_by('1.4')
    True
    >>> v.satisfied_by('1.0')
    False
    >>> v.satisfied_by('4444.4')
    False
    >>> v.satisfied_by('1555.1b3')
    False

    `VersionPredicate` is flexible in accepting extra whitespace::

    >>> v = VersionPredicate(' pat( ==  0.1  )  ')
    >>> v.name
    'pat'
    >>> v.satisfied_by('0.1')
    True
    >>> v.satisfied_by('0.2')
    False

    If any version numbers passed in do not conform to the
    restrictions of `StrictVersion`, a `ValueError` is raised::

    >>> v = VersionPredicate('p1.p2.p3.p4(>=1.0, <=1.3a1, !=1.2zb3)')
    Traceback (most recent call last):
      ...
    ValueError: invalid version number '1.2zb3'

    It the module or package name given does not conform to what's
    allowed as a legal module or package name, `ValueError` is
    raised::

    >>> v = VersionPredicate('foo-bar')
    Traceback (most recent call last):
      ...
    ValueError: expected parenthesized list: '-bar'

    >>> v = VersionPredicate('foo bar (12.21)')
    Traceback (most recent call last):
      ...
    ValueError: expected parenthesized list: 'bar (12.21)'

    cCs�|j�}|s!td��ntj|�}|sItd|��n|j�\|_}|j�}|r�tj|�}|s�td|��n|j�d}g|jd�D]}t|�^q�|_	|j	s�td|��q�n	g|_	dS(s*Parse a version predicate string.
        sempty package restrictionsbad package name in %rsexpected parenthesized list: %rit,sempty parenthesized list in %rN(
tstripRtre_validPackageRRtnametre_parentsplitRR(tselftversionPredicateStrRtparentstrtaPred((s2/usr/lib64/python2.7/distutils/versionpredicate.pyt__init___s$+	cCs`|jrUg|jD] \}}|dt|�^q}|jddj|�dS|jSdS(Nt s (s, t)(RRRtjoin(Rtcondtvertseq((s2/usr/lib64/python2.7/distutils/versionpredicate.pyt__str__zs	0cCs5x.|jD]#\}}t|||�s
tSq
WtS(s�True if version is compatible with all the predicates in self.
        The parameter version must be acceptable to the StrictVersion
        constructor.  It may be either a string or StrictVersion.
        (RtcompmaptFalsetTrue(RRRR((s2/usr/lib64/python2.7/distutils/versionpredicate.pytsatisfied_by�s(t__name__t
__module__t__doc__RR!R%(((s2/usr/lib64/python2.7/distutils/versionpredicate.pyRs?		cCs�tdkrtjd�an|j�}tj|�}|sRtd|��n|jd�pdd}|r�tj	j
|�}n|jd�|fS(s9Return the name and optional version number of a provision.

    The version number, if given, will be returned as a `StrictVersion`
    instance, otherwise it will be `None`.

    >>> split_provision('mypkg')
    ('mypkg', None)
    >>> split_provision(' mypkg( 1.2 ) ')
    ('mypkg', StrictVersion ('1.2'))
    s=([a-zA-Z_]\w*(?:\.[a-zA-Z_]\w*)*)(?:\s*\(\s*([^)\s]+)\s*\))?$s"illegal provides specification: %riiN(t
_provision_rxtNonetretcompileRRRtgroupRRR(tvaluetmR((s2/usr/lib64/python2.7/distutils/versionpredicate.pytsplit_provision�s((R(R+tdistutils.versionRtoperatorR,RRRRtlttleteqtgttgetneR"RR*R)R0(((s2/usr/lib64/python2.7/distutils/versionpredicate.pyt<module>s	!!nPKW[�zN֟�__init__.pycnu�[����
{fc@s/dZddlZejejjd� ZdS(s�distutils

The main package for the Python Module Distribution Utilities.  Normally
used from a setup script as

   from distutils.core import setup

   setup (...)
i����Nt (t__doc__tsystversiontindext__version__(((s*/usr/lib64/python2.7/distutils/__init__.pyt<module>	sPKW[O�**filelist.pycnu�[����
{fc@s�dZdZddlZddlZddlZddlmZddlmZm	Z	ddl
mZddd��YZej
d	�Zd
�Zdddd
�ZdS(ssdistutils.filelist

Provides the FileList class, used for poking about the filesystem
and building lists of files.
s$Id$i����N(tconvert_path(tDistutilsTemplateErrortDistutilsInternalError(tlogtFileListcBs�eZdZddd�Zd�Zejd�Zd�Z	d�Z
d�Zd�Zd�Z
d	�Zd
�Zdddd
�Zdddd�ZRS(s�A list of files built by on exploring the filesystem and filtered by
    applying various patterns to what we find there.

    Instance attributes:
      dir
        directory from which files will be taken -- only used if
        'allfiles' not supplied to constructor
      files
        list of filenames currently being built/filtered/manipulated
      allfiles
        complete list of files under consideration (ie. without any
        filtering applied)
    cCsd|_g|_dS(N(tNonetallfilestfiles(tselftwarntdebug_print((s*/usr/lib64/python2.7/distutils/filelist.pyt__init__s	cCs
||_dS(N(R(RR((s*/usr/lib64/python2.7/distutils/filelist.pytset_allfiles$scCst|�|_dS(N(tfindallR(Rtdir((s*/usr/lib64/python2.7/distutils/filelist.pyR
'scCs"ddlm}|r|GHndS(s~Print 'msg' to stdout if the global DEBUG (taken from the
        DISTUTILS_DEBUG environment variable) flag is true.
        i����(tDEBUGN(tdistutils.debugR(RtmsgR((s*/usr/lib64/python2.7/distutils/filelist.pyR
*scCs|jj|�dS(N(Rtappend(Rtitem((s*/usr/lib64/python2.7/distutils/filelist.pyR4scCs|jj|�dS(N(Rtextend(Rtitems((s*/usr/lib64/python2.7/distutils/filelist.pyR7scCs\ttjj|j�}|j�g|_x*|D]"}|jjtjj|��q2WdS(N(tmaptostpathtsplitRtsortRtjoin(Rtsortable_filest
sort_tuple((s*/usr/lib64/python2.7/distutils/filelist.pyR:s

	
cCsYxRtt|j�ddd�D]1}|j||j|dkr |j|=q q WdS(Niii����(trangetlenR(Rti((s*/usr/lib64/python2.7/distutils/filelist.pytremove_duplicatesEs&cCs|j�}|d}d}}}|dkrht|�dkrRtd|�ntt|d�}n�|dkr�t|�dkr�td|�nt|d�}tt|d�}nN|dkr�t|�dkr�td|�nt|d�}n
td|�||||fS(Nitincludetexcludesglobal-includesglobal-excludeis&'%s' expects <pattern1> <pattern2> ...isrecursive-includesrecursive-excludeis,'%s' expects <dir> <pattern1> <pattern2> ...tgrafttprunes#'%s' expects a single <dir_pattern>sunknown action '%s'(R"R#sglobal-includesglobal-exclude(srecursive-includesrecursive-exclude(R$R%(RRRRRR(RtlinetwordstactiontpatternsRtdir_pattern((s*/usr/lib64/python2.7/distutils/filelist.pyt_parse_template_lineNs,
	



cCs&|j|�\}}}}|dkr}|jddj|��x�|D].}|j|dd�sHtjd|�qHqHWn�|dkr�|jddj|��x||D].}|j|dd�s�tjd	|�q�q�WnC|d
krE|jddj|��x|D]2}|j|dd�stjd
d|�qqWn�|dkr�|jddj|��x�|D].}|j|dd�srtjd|�qrqrWn{|dkr|jd|dj|�f�xL|D]5}|j|d|�s�tjd
d||�q�q�Wn|dkr�|jd|dj|�f�x�|D]1}|j|d|�sItjd||�qIqIWn�|dkr�|jd|�|jdd|�s"tjd|�q"nY|dkr|jd|�|jdd|�s"tjdd|�q"n
td |�dS(!NR"sinclude t tanchoris%warning: no files found matching '%s'R#sexclude s9warning: no previously-included files found matching '%s'sglobal-includesglobal-include is&warning: no files found matching '%s' sanywhere in distributionsglobal-excludesglobal-exclude sRwarning: no previously-included files matching '%s' found anywhere in distributionsrecursive-includesrecursive-include %s %stprefixsunder directory '%s'srecursive-excludesrecursive-exclude %s %ssNwarning: no previously-included files matching '%s' found under directory '%s'R$sgraft s+warning: no directories found matching '%s'R%sprune s)no previously-included directories found s
matching '%s's'this cannot happen: invalid action '%s'(	R+R
Rtinclude_patternRR	texclude_patternRR(RR&R(R)RR*tpattern((s*/usr/lib64/python2.7/distutils/filelist.pytprocess_template_linepsh
	
	
	
		
		
		
	iicCs�d}t||||�}|jd|j�|jdkrK|j�nxJ|jD]?}|j|�rU|jd|�|jj|�d}qUqUW|S(s�Select strings (presumably filenames) from 'self.files' that
        match 'pattern', a Unix-style wildcard (glob) pattern.

        Patterns are not quite the same as implemented by the 'fnmatch'
        module: '*' and '?'  match non-special characters, where "special"
        is platform-dependent: slash on Unix; colon, slash, and backslash on
        DOS/Windows; and colon on Mac OS.

        If 'anchor' is true (the default), then the pattern match is more
        stringent: "*.py" will match "foo.py" but not "foo/bar.py".  If
        'anchor' is false, both of these will match.

        If 'prefix' is supplied, then only filenames starting with 'prefix'
        (itself a pattern) and ending with 'pattern', with anything in between
        them, will match.  'anchor' is ignored in this case.

        If 'is_regex' is true, 'anchor' and 'prefix' are ignored, and
        'pattern' is assumed to be either a string containing a regex or a
        regex object -- no translation is done, the regex is just compiled
        and used as-is.

        Selected strings will be added to self.files.

        Return 1 if files are found.
        is%include_pattern: applying regex r'%s's adding iN(	ttranslate_patternR
R1RRR
tsearchRR(RR1R-R.tis_regextfiles_foundt
pattern_retname((s*/usr/lib64/python2.7/distutils/filelist.pyR/�s	

cCs�d}t||||�}|jd|j�xhtt|j�ddd�D]G}|j|j|�rO|jd|j|�|j|=d}qOqOW|S(s�Remove strings (presumably filenames) from 'files' that match
        'pattern'.

        Other parameters are the same as for 'include_pattern()', above.
        The list 'self.files' is modified in place. Return 1 if files are
        found.
        is%exclude_pattern: applying regex r'%s'ii����s
 removing (R3R
R1RRRR4(RR1R-R.R5R6R7R ((s*/usr/lib64/python2.7/distutils/filelist.pyR0�s	&

N(t__name__t
__module__t__doc__RRRRtcurdirR
R
RRRR!R+R2R/R0(((s*/usr/lib64/python2.7/distutils/filelist.pyRs
		
						"	K-cCsddlm}m}m}m}g}|g}|j}|j}x�|r|�}tj|�}	x�|	D]�}
|tj	kr�tj
j||
�}n|
}tj|�}||}
||
�r�|j|�qk||
�rk||
�rk||�qkqkWqFW|S(s^Find all files under 'dir' and return the list of full filenames
    (relative to 'dir').
    i����(tST_MODEtS_ISREGtS_ISDIRtS_ISLNK(tstatR=R>R?R@tpopRRtlistdirR<RR(RR=R>R?R@tlisttstackRBtpushtnamesR8tfullnameRAtmode((s*/usr/lib64/python2.7/distutils/filelist.pyR
s&"					

cCsStj|�}tj}tjdkr0d}nd|}tjd||�}|S(s�Translate a shell-like glob pattern to a regular expression.

    Return a string containing the regex.  Differs from
    'fnmatch.translate()' in that '*' does not match "special characters"
    (which are platform-specific).
    s\s\\\\s\1[^%s]s((?<!\\)(\\\\)*)\.(tfnmatcht	translateRtseptretsub(R1R7RLtescaped((s*/usr/lib64/python2.7/distutils/filelist.pyt
glob_to_re s		
iicCs�|r)t|t�r"tj|�S|Sn|r>t|�}nd}|dk	r�td�}t|�t|� }tj}tjdkr�d}nd|j	|d|f�}n|r�d|}ntj|�S(sTranslate a shell-like wildcard pattern to a compiled regular
    expression.

    Return the compiled regex.  If 'is_regex' true,
    then 'pattern' is directly compiled to a regex (if it's a string)
    or just returned as-is (assumes it's a regex object).
    ts\s\\t^s.*N(
t
isinstancetstrRMtcompileRPRRRRLR(R1R-R.R5R7t
empty_patternt	prefix_reRL((s*/usr/lib64/python2.7/distutils/filelist.pyR38s"
		 
((R;t__revision__RRMRJtdistutils.utilRtdistutils.errorsRRt	distutilsRRR<R
RPRR3(((s*/usr/lib64/python2.7/distutils/filelist.pyt<module>s� 	PKW[�d��m5m5 unixccompiler.py.distutils-rpathnu�[���"""distutils.unixccompiler

Contains the UnixCCompiler class, a subclass of CCompiler that handles
the "typical" Unix-style command-line C compiler:
  * macros defined with -Dname[=value]
  * macros undefined with -Uname
  * include search directories specified with -Idir
  * libraries specified with -lllib
  * library search directories specified with -Ldir
  * compile handled by 'cc' (or similar) executable with -c option:
    compiles .c to .o
  * link static library handled by 'ar' command (possibly with 'ranlib')
  * link shared library handled by 'cc -shared'
"""

__revision__ = "$Id$"

import os, sys, re
from types import StringType, NoneType

from distutils import sysconfig
from distutils.dep_util import newer
from distutils.ccompiler import \
     CCompiler, gen_preprocess_options, gen_lib_options
from distutils.errors import \
     DistutilsExecError, CompileError, LibError, LinkError
from distutils import log

if sys.platform == 'darwin':
    import _osx_support

# XXX Things not currently handled:
#   * optimization/debug/warning flags; we just use whatever's in Python's
#     Makefile and live with it.  Is this adequate?  If not, we might
#     have to have a bunch of subclasses GNUCCompiler, SGICCompiler,
#     SunCCompiler, and I suspect down that road lies madness.
#   * even if we don't know a warning flag from an optimization flag,
#     we need some way for outsiders to feed preprocessor/compiler/linker
#     flags in to us -- eg. a sysadmin might want to mandate certain flags
#     via a site config file, or a user might want to set something for
#     compiling this module distribution only via the setup.py command
#     line, whatever.  As long as these options come from something on the
#     current system, they can be as system-dependent as they like, and we
#     should just happily stuff them into the preprocessor/compiler/linker
#     options and carry on.


class UnixCCompiler(CCompiler):

    compiler_type = 'unix'

    # These are used by CCompiler in two places: the constructor sets
    # instance attributes 'preprocessor', 'compiler', etc. from them, and
    # 'set_executable()' allows any of these to be set.  The defaults here
    # are pretty generic; they will probably have to be set by an outsider
    # (eg. using information discovered by the sysconfig about building
    # Python extensions).
    executables = {'preprocessor' : None,
                   'compiler'     : ["cc"],
                   'compiler_so'  : ["cc"],
                   'compiler_cxx' : ["cc"],
                   'linker_so'    : ["cc", "-shared"],
                   'linker_exe'   : ["cc"],
                   'archiver'     : ["ar", "-cr"],
                   'ranlib'       : None,
                  }

    if sys.platform[:6] == "darwin":
        executables['ranlib'] = ["ranlib"]

    # Needed for the filename generation methods provided by the base
    # class, CCompiler.  NB. whoever instantiates/uses a particular
    # UnixCCompiler instance should set 'shared_lib_ext' -- we set a
    # reasonable common default here, but it's not necessarily used on all
    # Unices!

    src_extensions = [".c",".C",".cc",".cxx",".cpp",".m"]
    obj_extension = ".o"
    static_lib_extension = ".a"
    shared_lib_extension = ".so"
    dylib_lib_extension = ".dylib"
    xcode_stub_lib_extension = ".tbd"
    static_lib_format = shared_lib_format = dylib_lib_format = "lib%s%s"
    xcode_stub_lib_format = dylib_lib_format
    if sys.platform == "cygwin":
        exe_extension = ".exe"

    def preprocess(self, source,
                   output_file=None, macros=None, include_dirs=None,
                   extra_preargs=None, extra_postargs=None):
        ignore, macros, include_dirs = \
            self._fix_compile_args(None, macros, include_dirs)
        pp_opts = gen_preprocess_options(macros, include_dirs)
        pp_args = self.preprocessor + pp_opts
        if output_file:
            pp_args.extend(['-o', output_file])
        if extra_preargs:
            pp_args[:0] = extra_preargs
        if extra_postargs:
            pp_args.extend(extra_postargs)
        pp_args.append(source)

        # We need to preprocess: either we're being forced to, or we're
        # generating output to stdout, or there's a target output file and
        # the source file is newer than the target (or the target doesn't
        # exist).
        if self.force or output_file is None or newer(source, output_file):
            if output_file:
                self.mkpath(os.path.dirname(output_file))
            try:
                self.spawn(pp_args)
            except DistutilsExecError, msg:
                raise CompileError, msg

    def _compile(self, obj, src, ext, cc_args, extra_postargs, pp_opts):
        compiler_so = self.compiler_so
        if sys.platform == 'darwin':
            compiler_so = _osx_support.compiler_fixup(compiler_so,
                                                    cc_args + extra_postargs)
        try:
            self.spawn(compiler_so + cc_args + [src, '-o', obj] +
                       extra_postargs)
        except DistutilsExecError, msg:
            raise CompileError, msg

    def create_static_lib(self, objects, output_libname,
                          output_dir=None, debug=0, target_lang=None):
        objects, output_dir = self._fix_object_args(objects, output_dir)

        output_filename = \
            self.library_filename(output_libname, output_dir=output_dir)

        if self._need_link(objects, output_filename):
            self.mkpath(os.path.dirname(output_filename))
            self.spawn(self.archiver +
                       [output_filename] +
                       objects + self.objects)

            # Not many Unices required ranlib anymore -- SunOS 4.x is, I
            # think the only major Unix that does.  Maybe we need some
            # platform intelligence here to skip ranlib if it's not
            # needed -- or maybe Python's configure script took care of
            # it for us, hence the check for leading colon.
            if self.ranlib:
                try:
                    self.spawn(self.ranlib + [output_filename])
                except DistutilsExecError, msg:
                    raise LibError, msg
        else:
            log.debug("skipping %s (up-to-date)", output_filename)

    def link(self, target_desc, objects,
             output_filename, output_dir=None, libraries=None,
             library_dirs=None, runtime_library_dirs=None,
             export_symbols=None, debug=0, extra_preargs=None,
             extra_postargs=None, build_temp=None, target_lang=None):
        objects, output_dir = self._fix_object_args(objects, output_dir)
        libraries, library_dirs, runtime_library_dirs = \
            self._fix_lib_args(libraries, library_dirs, runtime_library_dirs)

        lib_opts = gen_lib_options(self, library_dirs, runtime_library_dirs,
                                   libraries)
        if type(output_dir) not in (StringType, NoneType):
            raise TypeError, "'output_dir' must be a string or None"
        if output_dir is not None:
            output_filename = os.path.join(output_dir, output_filename)

        if self._need_link(objects, output_filename):
            ld_args = (objects + self.objects +
                       lib_opts + ['-o', output_filename])
            if debug:
                ld_args[:0] = ['-g']
            if extra_preargs:
                ld_args[:0] = extra_preargs
            if extra_postargs:
                ld_args.extend(extra_postargs)
            self.mkpath(os.path.dirname(output_filename))
            try:
                if target_desc == CCompiler.EXECUTABLE:
                    linker = self.linker_exe[:]
                else:
                    linker = self.linker_so[:]
                if target_lang == "c++" and self.compiler_cxx:
                    # skip over environment variable settings if /usr/bin/env
                    # is used to set up the linker's environment.
                    # This is needed on OSX. Note: this assumes that the
                    # normal and C++ compiler have the same environment
                    # settings.
                    i = 0
                    if os.path.basename(linker[0]) == "env":
                        i = 1
                        while '=' in linker[i]:
                            i = i + 1

                    linker[i] = self.compiler_cxx[i]

                if sys.platform == 'darwin':
                    linker = _osx_support.compiler_fixup(linker, ld_args)

                self.spawn(linker + ld_args)
            except DistutilsExecError, msg:
                raise LinkError, msg
        else:
            log.debug("skipping %s (up-to-date)", output_filename)

    # -- Miscellaneous methods -----------------------------------------
    # These are all used by the 'gen_lib_options() function, in
    # ccompiler.py.

    def library_dir_option(self, dir):
        return "-L" + dir

    def _is_gcc(self, compiler_name):
        return "gcc" in compiler_name or "g++" in compiler_name

    def runtime_library_dir_option(self, dir):
        # XXX Hackish, at the very least.  See Python bug #445902:
        # http://sourceforge.net/tracker/index.php
        #   ?func=detail&aid=445902&group_id=5470&atid=105470
        # Linkers on different platforms need different options to
        # specify that directories need to be added to the list of
        # directories searched for dependencies when a dynamic library
        # is sought.  GCC has to be told to pass the -R option through
        # to the linker, whereas other compilers just know this.
        # Other compilers may need something slightly different.  At
        # this time, there's no way to determine this information from
        # the configuration data stored in the Python installation, so
        # we use this hack.
        compiler = os.path.basename(sysconfig.get_config_var("CC"))
        if sys.platform[:6] == "darwin":
            # MacOSX's linker doesn't understand the -R flag at all
            return "-L" + dir
        elif sys.platform[:7] == "freebsd":
            return "-Wl,-rpath=" + dir
        elif sys.platform[:5] == "hp-ux":
            if self._is_gcc(compiler):
                return ["-Wl,+s", "-L" + dir]
            return ["+s", "-L" + dir]
        elif sys.platform[:7] == "irix646" or sys.platform[:6] == "osf1V5":
            return ["-rpath", dir]
        elif self._is_gcc(compiler):
            return "-Wl,-R" + dir
        else:
            return "-R" + dir

    def library_option(self, lib):
        return "-l" + lib

    def find_library_file(self, dirs, lib, debug=0):
        shared_f = self.library_filename(lib, lib_type='shared')
        dylib_f = self.library_filename(lib, lib_type='dylib')
        xcode_stub_f = self.library_filename(lib, lib_type='xcode_stub')
        static_f = self.library_filename(lib, lib_type='static')

        if sys.platform == 'darwin':
            # On OSX users can specify an alternate SDK using
            # '-isysroot', calculate the SDK root if it is specified
            # (and use it further on)
            #
            # Note that, as of Xcode 7, Apple SDKs may contain textual stub
            # libraries with .tbd extensions rather than the normal .dylib
            # shared libraries installed in /.  The Apple compiler tool
            # chain handles this transparently but it can cause problems
            # for programs that are being built with an SDK and searching
            # for specific libraries.  Callers of find_library_file need to
            # keep in mind that the base filename of the returned SDK library
            # file might have a different extension from that of the library
            # file installed on the running system, for example:
            #   /Applications/Xcode.app/Contents/Developer/Platforms/
            #       MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk/
            #       usr/lib/libedit.tbd
            # vs
            #   /usr/lib/libedit.dylib
            cflags = sysconfig.get_config_var('CFLAGS')
            m = re.search(r'-isysroot\s+(\S+)', cflags)
            if m is None:
                sysroot = '/'
            else:
                sysroot = m.group(1)



        for dir in dirs:
            shared = os.path.join(dir, shared_f)
            dylib = os.path.join(dir, dylib_f)
            static = os.path.join(dir, static_f)
            xcode_stub = os.path.join(dir, xcode_stub_f)

            if sys.platform == 'darwin' and (
                dir.startswith('/System/') or (
                dir.startswith('/usr/') and not dir.startswith('/usr/local/'))):

                shared = os.path.join(sysroot, dir[1:], shared_f)
                dylib = os.path.join(sysroot, dir[1:], dylib_f)
                static = os.path.join(sysroot, dir[1:], static_f)
                xcode_stub = os.path.join(sysroot, dir[1:], xcode_stub_f)

            # We're second-guessing the linker here, with not much hard
            # data to go on: GCC seems to prefer the shared library, so I'm
            # assuming that *all* Unix C compilers do.  And of course I'm
            # ignoring even GCC's "-static" option.  So sue me.
            if os.path.exists(dylib):
                return dylib
            elif os.path.exists(xcode_stub):
                return xcode_stub
            elif os.path.exists(shared):
                return shared
            elif os.path.exists(static):
                return static

        # Oops, didn't find it in *any* of 'dirs'
        return None
PKW[�?�g��
ccompiler.pycnu�[����
{fc@s�dZdZddlZddlZddlZddlmZmZmZm	Z	m
Z
ddlmZddl
mZddlmZddlmZdd	lmZmZdd
lmZddlmZdfd
��YZddfddfddfddffZeed�Zidddfd6dddfd6dddfd6dd d!fd"6d#d$d%fd&6d'd(d)fd6Zd*�Zeed+d+d+d,�Z d-�Z!d.�Z"dS(/s�distutils.ccompiler

Contains CCompiler, an abstract base class that defines the interface
for the Distutils compiler abstraction model.s$Id$i����N(tCompileErrort	LinkErrortUnknownFileErrortDistutilsPlatformErrortDistutilsModuleError(tspawn(t	move_file(tmkpath(tnewer_group(tsplit_quotedtexecute(tlog(tcustomize_compilert	CCompilercBseZdZdAZdAZdAZdAZdAZdAZ	dAZ
dAZidd6dd6dd6dd6dd6ZdddgZ
d	d	d	d
�Zd�Zd�Zd
�Zd�ZdAd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Z d�Z!d�Z"d�Z#d �Z$d!�Z%dAdAdAdAdAd"�Z&dAdAdAd	dAdAdAd#�Z'd$�Z(dAd	dAd%�Z)d&Z*d'Z+d(Z,dAdAdAdAdAd	dAdAdAdAd)�
Z-dAdAdAdAdAd	dAdAdAdAd*�
Z.dAdAdAdAdAd	dAdAdAdAd+�
Z/dAdAdAdAd	dAdAdAd,�Z0d-�Z1d.�Z2d/�Z3dAdAdAdAd0�Z4d	d1�Z5d	d2d3�Z6d	d2d4�Z7d	d2d5�Z8d6d	d2d7�Z9d8d9�Z:d:�Z;d;�Z<dAd8d<�Z=d=�Z>d>�Z?d?d@�Z@RS(Bs�Abstract base class to define the interface that must be implemented
    by real compiler classes.  Also has some utility methods used by
    several compiler classes.

    The basic idea behind a compiler abstraction class is that each
    instance can be used for all the compile/link steps in building a
    single project.  Thus, attributes common to all of those compile and
    link steps -- include directories, macros to define, libraries to link
    against, etc. -- are attributes of the compiler instance.  To allow for
    variability in how individual files are treated, most of those
    attributes may be varied on a per-compilation or per-link basis.
    tcs.csc++s.ccs.cpps.cxxtobjcs.micCs�||_||_||_d|_g|_g|_g|_g|_g|_	g|_
x.|jj�D]}|j
||j|�qjWdS(N(tdry_runtforcetverbosetNonet
output_dirtmacrostinclude_dirst	librariestlibrary_dirstruntime_library_dirstobjectstexecutablestkeystset_executable(tselfRRRtkey((s+/usr/lib64/python2.7/distutils/ccompiler.pyt__init__]s										cKsZxS|j�D]E}||jkr>td||jjf�n|j|||�q
WdS(s�Define the executables (and options for them) that will be run
        to perform the various stages of compilation.  The exact set of
        executables that may be specified here depends on the compiler
        class (via the 'executables' class attribute), but most will have:
          compiler      the C/C++ compiler
          linker_so     linker used to create shared objects and libraries
          linker_exe    linker used to create binary executables
          archiver      static library creator

        On platforms with a command-line (Unix, DOS/Windows), each of these
        is a string that will be split into executable name and (optional)
        list of arguments.  (Splitting the string is done similarly to how
        Unix shells operate: words are delimited by spaces, but quotes and
        backslashes can override this.  See
        'distutils.util.split_quoted()'.)
        s$unknown executable '%s' for class %sN(RRt
ValueErrort	__class__t__name__R(RtargsR((s+/usr/lib64/python2.7/distutils/ccompiler.pytset_executables�scCs<t|t�r(t||t|��nt|||�dS(N(t
isinstancet
basestringtsetattrR	(RRtvalue((s+/usr/lib64/python2.7/distutils/ccompiler.pyR�scCs<d}x/|jD]$}|d|kr*|S|d}qWdS(Nii(RR(Rtnametitdefn((s+/usr/lib64/python2.7/distutils/ccompiler.pyt_find_macro�scCs�x�|D]�}t|t�ost|�dksct|�dkost|dt�sc|ddkost|dt�std|dd�qqWdS(s�Ensures that every element of 'definitions' is a valid macro
        definition, ie. either (name,value) 2-tuple or a (name,) tuple.  Do
        nothing if all definitions are OK, raise TypeError otherwise.
        iiisinvalid macro definition '%s': s.must be tuple (string,), (string, string), or s(string, None)N(R&ttupletlentstrRt	TypeError(RtdefinitionsR,((s+/usr/lib64/python2.7/distutils/ccompiler.pyt_check_macro_definitions�s
#cCsH|j|�}|dk	r(|j|=n||f}|jj|�dS(s_Define a preprocessor macro for all compilations driven by this
        compiler object.  The optional parameter 'value' should be a
        string; if it is not supplied, then the macro will be defined
        without an explicit value and the exact outcome depends on the
        compiler used (XXX true? does ANSI say anything about this?)
        N(R-RRtappend(RR*R)R+R,((s+/usr/lib64/python2.7/distutils/ccompiler.pytdefine_macro�s
	
cCsE|j|�}|dk	r(|j|=n|f}|jj|�dS(s�Undefine a preprocessor macro for all compilations driven by
        this compiler object.  If the same macro is defined by
        'define_macro()' and undefined by 'undefine_macro()' the last call
        takes precedence (including multiple redefinitions or
        undefinitions).  If the macro is redefined/undefined on a
        per-compilation basis (ie. in the call to 'compile()'), then that
        takes precedence.
        N(R-RRR4(RR*R+tundefn((s+/usr/lib64/python2.7/distutils/ccompiler.pytundefine_macro�s

	cCs|jj|�dS(s�Add 'dir' to the list of directories that will be searched for
        header files.  The compiler is instructed to search directories in
        the order in which they are supplied by successive calls to
        'add_include_dir()'.
        N(RR4(Rtdir((s+/usr/lib64/python2.7/distutils/ccompiler.pytadd_include_dir�scCs||_dS(sySet the list of directories that will be searched to 'dirs' (a
        list of strings).  Overrides any preceding calls to
        'add_include_dir()'; subsequence calls to 'add_include_dir()' add
        to the list passed to 'set_include_dirs()'.  This does not affect
        any list of standard include directories that the compiler may
        search by default.
        N(R(Rtdirs((s+/usr/lib64/python2.7/distutils/ccompiler.pytset_include_dirs�scCs|jj|�dS(s�Add 'libname' to the list of libraries that will be included in
        all links driven by this compiler object.  Note that 'libname'
        should *not* be the name of a file containing a library, but the
        name of the library itself: the actual filename will be inferred by
        the linker, the compiler, or the compiler class (depending on the
        platform).

        The linker will be instructed to link against libraries in the
        order they were supplied to 'add_library()' and/or
        'set_libraries()'.  It is perfectly valid to duplicate library
        names; the linker will be instructed to link against libraries as
        many times as they are mentioned.
        N(RR4(Rtlibname((s+/usr/lib64/python2.7/distutils/ccompiler.pytadd_library�scCs||_dS(s�Set the list of libraries to be included in all links driven by
        this compiler object to 'libnames' (a list of strings).  This does
        not affect any standard system libraries that the linker may
        include by default.
        N(R(Rtlibnames((s+/usr/lib64/python2.7/distutils/ccompiler.pyt
set_librariesscCs|jj|�dS(s'Add 'dir' to the list of directories that will be searched for
        libraries specified to 'add_library()' and 'set_libraries()'.  The
        linker will be instructed to search for libraries in the order they
        are supplied to 'add_library_dir()' and/or 'set_library_dirs()'.
        N(RR4(RR8((s+/usr/lib64/python2.7/distutils/ccompiler.pytadd_library_dirscCs||_dS(s�Set the list of library search directories to 'dirs' (a list of
        strings).  This does not affect any standard library search path
        that the linker may search by default.
        N(R(RR:((s+/usr/lib64/python2.7/distutils/ccompiler.pytset_library_dirsscCs|jj|�dS(slAdd 'dir' to the list of directories that will be searched for
        shared libraries at runtime.
        N(RR4(RR8((s+/usr/lib64/python2.7/distutils/ccompiler.pytadd_runtime_library_dirscCs||_dS(s�Set the list of directories to search for shared libraries at
        runtime to 'dirs' (a list of strings).  This does not affect any
        standard search path that the runtime linker may search by
        default.
        N(R(RR:((s+/usr/lib64/python2.7/distutils/ccompiler.pytset_runtime_library_dirs%scCs|jj|�dS(s�Add 'object' to the list of object files (or analogues, such as
        explicitly named library files or the output of "resource
        compilers") to be included in every link driven by this compiler
        object.
        N(RR4(Rtobject((s+/usr/lib64/python2.7/distutils/ccompiler.pytadd_link_object-scCs||_dS(s�Set the list of object files (or analogues) to be included in
        every link to 'objects'.  This does not affect any standard object
        files that the linker may include by default (such as system
        libraries).
        N(R(RR((s+/usr/lib64/python2.7/distutils/ccompiler.pytset_link_objects5scCs�|dkr|j}nt|t�s3td�n|dkrK|j}n.t|t�rp||jpig}n	td�|dkr�|j}n:t|ttf�r�t|�|jp�g}n	td�|dkr�g}n|j	|ddd|�}t
|�t
|�kst�t||�}i}	xmt
t
|��D]Y}
||
}||
}tjj|�d}
|jtjj|��||
f|	|<qAW|||||	fS(	s;Process arguments and decide which source files to compile.s%'output_dir' must be a string or Nones/'macros' (if supplied) must be a list of tupless6'include_dirs' (if supplied) must be a list of stringst	strip_diriRiN(RRR&R0R1RtlistRR.tobject_filenamesR/tAssertionErrortgen_preprocess_optionstrangetostpathtsplitextRtdirname(RtoutdirRtincdirstsourcestdependstextraRtpp_optstbuildR+tsrctobjtext((s+/usr/lib64/python2.7/distutils/ccompiler.pyt_setup_compileCs<			

cCs:|dg}|r#dg|d*n|r6||d*n|S(Ns-cs-gi((RRVtdebugtbeforetcc_args((s+/usr/lib64/python2.7/distutils/ccompiler.pyt_get_cc_argsos

cCs�|dkr|j}nt|t�s3td�n|dkrK|j}n.t|t�rp||jpig}n	td�|dkr�|j}n:t|ttf�r�t|�|jp�g}n	td�|||fS(s'Typecheck and fix-up some of the arguments to the 'compile()'
        method, and return fixed-up values.  Specifically: if 'output_dir'
        is None, replaces it with 'self.output_dir'; ensures that 'macros'
        is a list, and augments it with 'self.macros'; ensures that
        'include_dirs' is a list, and augments it with 'self.include_dirs'.
        Guarantees that the returned values are of the correct type,
        i.e. for 'output_dir' either string or None, and for 'macros' and
        'include_dirs' either list or None.
        s%'output_dir' must be a string or Nones/'macros' (if supplied) must be a list of tupless6'include_dirs' (if supplied) must be a list of stringsN(	RRR&R0R1RRHRR.(RRRR((s+/usr/lib64/python2.7/distutils/ccompiler.pyt_fix_compile_argsxs 
	cCsjt|ttf�s!td�nt|�}|dkrE|j}nt|t�s`td�n||fS(s�Typecheck and fix up some arguments supplied to various methods.
        Specifically: ensure that 'objects' is a list; if output_dir is
        None, replace with self.output_dir.  Return fixed versions of
        'objects' and 'output_dir'.
        s,'objects' must be a list or tuple of stringss%'output_dir' must be a string or NoneN(R&RHR.R1RRR0(RRR((s+/usr/lib64/python2.7/distutils/ccompiler.pyt_fix_object_args�s	cCs|dkr|j}n:t|ttf�rIt|�|jpBg}n	td�|dkrj|j}n:t|ttf�r�t|�|jp�g}n	td�|dkr�|j}n>t|ttf�r�t|�|jp�g}n
tdd�|||fS(s;Typecheck and fix up some of the arguments supplied to the
        'link_*' methods.  Specifically: ensure that all arguments are
        lists, and augment them with their permanent versions
        (eg. 'self.libraries' augments 'libraries').  Return a tuple with
        fixed versions of all arguments.
        s3'libraries' (if supplied) must be a list of stringss6'library_dirs' (if supplied) must be a list of stringss%'runtime_library_dirs' (if supplied) smust be a list of stringsN(RRR&RHR.R1RR(RRRR((s+/usr/lib64/python2.7/distutils/ccompiler.pyt
_fix_lib_args�s*	cCsE|jr
dS|jr.t||dd�}nt||�}|SdS(sjReturn true if we need to relink the files listed in 'objects'
        to recreate 'output_file'.
        itmissingtnewerN(RRR(RRtoutput_fileRd((s+/usr/lib64/python2.7/distutils/ccompiler.pyt
_need_link�s		c	Cs�t|t�s|g}nd}t|j�}x}|D]u}tjj|�\}}|jj	|�}y1|jj
|�}||kr�|}|}nWq7tk
r�q7Xq7W|S(s|Detect the language of a given file, or list of files. Uses
        language_map, and language_order to do the job.
        N(R&RHRR/tlanguage_orderRMRNROtlanguage_maptgettindexR!(	RRStlangRjtsourcetbaseRZtextlangtextindex((s+/usr/lib64/python2.7/distutils/ccompiler.pytdetect_language�s


cCsdS(s�Preprocess a single C/C++ source file, named in 'source'.
        Output will be written to file named 'output_file', or stdout if
        'output_file' not supplied.  'macros' is a list of macro
        definitions as for 'compile()', which will augment the macros set
        with 'define_macro()' and 'undefine_macro()'.  'include_dirs' is a
        list of directory names that will be added to the default list.

        Raises PreprocessError on failure.
        N((RRlReRRt
extra_preargstextra_postargs((s+/usr/lib64/python2.7/distutils/ccompiler.pyt
preprocess�sc	Cs�|j||||||�\}}	}}
}|j|
||�}xU|	D]M}
y||
\}}Wntk
ryqInX|j|
|||||
�qIW|	S(sK	Compile one or more source files.

        'sources' must be a list of filenames, most likely C/C++
        files, but in reality anything that can be handled by a
        particular compiler and compiler class (eg. MSVCCompiler can
        handle resource files in 'sources').  Return a list of object
        filenames, one per source filename in 'sources'.  Depending on
        the implementation, not all source files will necessarily be
        compiled, but all corresponding object filenames will be
        returned.

        If 'output_dir' is given, object files will be put under it, while
        retaining their original path component.  That is, "foo/bar.c"
        normally compiles to "foo/bar.o" (for a Unix implementation); if
        'output_dir' is "build", then it would compile to
        "build/foo/bar.o".

        'macros', if given, must be a list of macro definitions.  A macro
        definition is either a (name, value) 2-tuple or a (name,) 1-tuple.
        The former defines a macro; if the value is None, the macro is
        defined without an explicit value.  The 1-tuple case undefines a
        macro.  Later definitions/redefinitions/ undefinitions take
        precedence.

        'include_dirs', if given, must be a list of strings, the
        directories to add to the default include file search path for this
        compilation only.

        'debug' is a boolean; if true, the compiler will be instructed to
        output debug symbols in (or alongside) the object file(s).

        'extra_preargs' and 'extra_postargs' are implementation- dependent.
        On platforms that have the notion of a command-line (e.g. Unix,
        DOS/Windows), they are most likely lists of strings: extra
        command-line arguments to prepand/append to the compiler command
        line.  On other platforms, consult the implementation class
        documentation.  In any event, they are intended as an escape hatch
        for those occasions when the abstract compiler framework doesn't
        cut the mustard.

        'depends', if given, is a list of filenames that all targets
        depend on.  If a source file is older than any file in
        depends, then the source file will be recompiled.  This
        supports dependency tracking, but only at a coarse
        granularity.

        Raises CompileError on failure.
        (R[R_tKeyErrort_compile(RRSRRRR\RqRrRTRRVRWR^RYRXRZ((s+/usr/lib64/python2.7/distutils/ccompiler.pytcompile�s7

 cCsdS(sCompile 'src' to product 'obj'.N((RRYRXRZR^RrRV((s+/usr/lib64/python2.7/distutils/ccompiler.pyRuCscCsdS(s&Link a bunch of stuff together to create a static library file.
        The "bunch of stuff" consists of the list of object files supplied
        as 'objects', the extra object files supplied to
        'add_link_object()' and/or 'set_link_objects()', the libraries
        supplied to 'add_library()' and/or 'set_libraries()', and the
        libraries supplied as 'libraries' (if any).

        'output_libname' should be a library name, not a filename; the
        filename will be inferred from the library name.  'output_dir' is
        the directory where the library file will be put.

        'debug' is a boolean; if true, debugging information will be
        included in the library (note that on most platforms, it is the
        compile step where this matters: the 'debug' flag is included here
        just for consistency).

        'target_lang' is the target language for which the given objects
        are being compiled. This allows specific linkage time treatment of
        certain languages.

        Raises LibError on failure.
        N((RRtoutput_libnameRR\ttarget_lang((s+/usr/lib64/python2.7/distutils/ccompiler.pytcreate_static_libJst
shared_objecttshared_libraryt
executablecCs
t�dS(suLink a bunch of stuff together to create an executable or
        shared library file.

        The "bunch of stuff" consists of the list of object files supplied
        as 'objects'.  'output_filename' should be a filename.  If
        'output_dir' is supplied, 'output_filename' is relative to it
        (i.e. 'output_filename' can provide directory components if
        needed).

        'libraries' is a list of libraries to link against.  These are
        library names, not filenames, since they're translated into
        filenames in a platform-specific way (eg. "foo" becomes "libfoo.a"
        on Unix and "foo.lib" on DOS/Windows).  However, they can include a
        directory component, which means the linker will look in that
        specific directory rather than searching all the normal locations.

        'library_dirs', if supplied, should be a list of directories to
        search for libraries that were specified as bare library names
        (ie. no directory component).  These are on top of the system
        default and those supplied to 'add_library_dir()' and/or
        'set_library_dirs()'.  'runtime_library_dirs' is a list of
        directories that will be embedded into the shared library and used
        to search for other shared libraries that *it* depends on at
        run-time.  (This may only be relevant on Unix.)

        'export_symbols' is a list of symbols that the shared library will
        export.  (This appears to be relevant only on Windows.)

        'debug' is as for 'compile()' and 'create_static_lib()', with the
        slight distinction that it actually matters on most platforms (as
        opposed to 'create_static_lib()', which includes a 'debug' flag
        mostly for form's sake).

        'extra_preargs' and 'extra_postargs' are as for 'compile()' (except
        of course that they supply command-line arguments for the
        particular linker being used).

        'target_lang' is the target language for which the given objects
        are being compiled. This allows specific linkage time treatment of
        certain languages.

        Raises LinkError on failure.
        N(tNotImplementedError(Rttarget_descRtoutput_filenameRRRRtexport_symbolsR\RqRrt
build_tempRx((s+/usr/lib64/python2.7/distutils/ccompiler.pytlinkis/c

CsG|jtj||j|dd�|||||||	|
||�
dS(Ntlib_typetshared(R�R
tSHARED_LIBRARYtlibrary_filename(
RRRwRRRRR�R\RqRrR�Rx((s+/usr/lib64/python2.7/distutils/ccompiler.pytlink_shared_lib�s	c

Cs8|jtj|||||||||	|
||�
dS(N(R�R
t
SHARED_OBJECT(
RRRRRRRR�R\RqRrR�Rx((s+/usr/lib64/python2.7/distutils/ccompiler.pytlink_shared_object�s
	cCsA|jtj||j|�||||d|||	d|
�
dS(N(R�R
t
EXECUTABLEtexecutable_filenameR(RRtoutput_prognameRRRRR\RqRrRx((s+/usr/lib64/python2.7/distutils/ccompiler.pytlink_executable�scCs
t�dS(skReturn the compiler option to add 'dir' to the list of
        directories searched for libraries.
        N(R}(RR8((s+/usr/lib64/python2.7/distutils/ccompiler.pytlibrary_dir_option�scCs
t�dS(ssReturn the compiler option to add 'dir' to the list of
        directories searched for runtime libraries.
        N(R}(RR8((s+/usr/lib64/python2.7/distutils/ccompiler.pytruntime_library_dir_option�scCs
t�dS(sReturn the compiler option to add 'lib' to the list of libraries
        linked into the shared library or executable.
        N(R}(Rtlib((s+/usr/lib64/python2.7/distutils/ccompiler.pytlibrary_option�scCsEddl}|dkr!g}n|dkr6g}n|dkrKg}n|dkr`g}n|jd|dt�\}}tj|d�}	z7x|D]}
|	jd|
�q�W|	jd|�Wd|	j�Xy|j|gd|�}Wnt	k
rt
SXy |j|d	d
|d|�Wntt
fk
r@t
SXtS(s�Return a boolean indicating whether funcname is supported on
        the current platform.  The optional arguments can be used to
        augment the compilation environment.
        i����Ns.cttexttws#include "%s"
s=int main (int argc, char **argv) {
    %s();
    return 0;
}
Rsa.outRR(ttempfileRtmkstemptTrueRMtfdopentwritetcloseRvRtFalseR�RR1(RtfuncnametincludesRRRR�tfdtfnametftinclR((s+/usr/lib64/python2.7/distutils/ccompiler.pythas_function�s8
				

cCs
t�dS(sHSearch the specified list of directories for a static or shared
        library file 'lib' and return the full path to that file.  If
        'debug' true, look for a debugging version (if that makes sense on
        the current platform).  Return None if 'lib' wasn't found in any of
        the specified directories.
        N(R}(RR:R�R\((s+/usr/lib64/python2.7/distutils/ccompiler.pytfind_library_filestcCs�|dkrd}ng}x�|D]�}tjj|�\}}tjj|�d}|tjj|�}||jkr�td||f�n|r�tjj|�}n|j	tjj
|||j��q"W|S(NR�is"unknown file type '%s' (from '%s')(RRMRNROt
splitdrivetisabstsrc_extensionsRtbasenameR4tjoint
obj_extension(Rtsource_filenamesRGRt	obj_namestsrc_nameRmRZ((s+/usr/lib64/python2.7/distutils/ccompiler.pyRI.s	
cCsG|dk	st�|r-tjj|�}ntjj|||j�S(N(RRJRMRNR�R�tshared_lib_extension(RR�RGR((s+/usr/lib64/python2.7/distutils/ccompiler.pytshared_object_filename?scCsM|dk	st�|r-tjj|�}ntjj|||jpHd�S(NR�(RRJRMRNR�R�t
exe_extension(RR�RGR((s+/usr/lib64/python2.7/distutils/ccompiler.pyR�Eststaticc
Cs�|dk	st�|d	kr*td�nt||d�}t||d�}tjj|�\}}|||f}	|r�d}ntjj|||	�S(
NR�R�tdylibt
xcode_stubs@'lib_type' must be "static", "shared", "dylib", or "xcode_stub".t_lib_formatt_lib_extensionR�(R�R�R�R�(RRJR!tgetattrRMRNtsplitR�(
RR<R�RGRtfmtRZR8Rmtfilename((s+/usr/lib64/python2.7/distutils/ccompiler.pyR�Ks	icCstj|�dS(N(RR\(Rtmsgtlevel((s+/usr/lib64/python2.7/distutils/ccompiler.pytannounce^scCs"ddlm}|r|GHndS(Ni����(tDEBUG(tdistutils.debugR�(RR�R�((s+/usr/lib64/python2.7/distutils/ccompiler.pytdebug_printascCstjjd|�dS(Nswarning: %s
(tsyststderrR�(RR�((s+/usr/lib64/python2.7/distutils/ccompiler.pytwarnfscCst||||j�dS(N(R
R(RtfuncR$R�R�((s+/usr/lib64/python2.7/distutils/ccompiler.pyR
iscCst|d|j�dS(NR(RR(Rtcmd((s+/usr/lib64/python2.7/distutils/ccompiler.pyRlscCst||d|j�S(NR(RR(RRXtdst((s+/usr/lib64/python2.7/distutils/ccompiler.pyRosi�cCst||d|j�dS(NR(RR(RR*tmode((s+/usr/lib64/python2.7/distutils/ccompiler.pyRrsN(AR#t
__module__t__doc__Rt
compiler_typeR�R�tstatic_lib_extensionR�tstatic_lib_formattshared_lib_formatR�RhRgR R%RR-R3R5R7R9R;R=R?R@RARBRCRERFR[R_R`RaRbRfRpRsRvRuRyR�R�R�R�R�R�R�R�R�R�R�R�RIR�R�R�R�R�R�R
RRR(((s+/usr/lib64/python2.7/distutils/ccompiler.pyR
s�


$	!						
										,			 		#	
		C			1							,+				scygwin.*tunixtos2emxtemxtposixtnttmsvccCs|dkrtj}n|dkr0tj}nxHtD]@\}}tj||�dk	sstj||�dk	r7|Sq7WdS(sr Determine the default compiler to use for the given platform.

        osname should be one of the standard Python OS names (i.e. the
        ones returned by os.name) and platform the common value
        returned by sys.platform for the platform in question.

        The default values are os.name and sys.platform in case the
        parameters are not given.

    R�N(RRMR*R�tplatformt_default_compilerstretmatch(tosnameR�tpatterntcompiler((s+/usr/lib64/python2.7/distutils/ccompiler.pytget_default_compiler�st
unixccompilert
UnixCCompilersstandard UNIX-style compilertmsvccompilertMSVCCompilersMicrosoft Visual C++tcygwinccompilertCygwinCCompilers'Cygwin port of GNU C Compiler for Win32tcygwintMingw32CCompilers(Mingw32 port of GNU C Compiler for Win32tmingw32tbcppcompilertBCPPCompilersBorland C++ CompilertbcpptemxccompilertEMXCCompilers#EMX port of GNU C Compiler for OS/2cCsvddlm}g}x6tj�D](}|jd|dt|df�q#W|j�||�}|jd�dS(syPrint list of available compilers (used by the "--help-compiler"
    options to "build", "build_ext", "build_clib").
    i����(tFancyGetopts	compiler=isList of available compilers:N(tdistutils.fancy_getoptR�tcompiler_classRR4Rtsortt
print_help(R�t	compilersR�tpretty_printer((s+/usr/lib64/python2.7/distutils/ccompiler.pytshow_compilers�s
icCs|dkrtj}ny2|dkr6t|�}nt|\}}}WnAtk
r�d|}|dk	r�|d|}nt|�nXy5d|}t|�tj	|}	t
|	�|}
WnEtk
r�td|�n(tk
r
tdd||f�nX|
d||�S(s[Generate an instance of some CCompiler subclass for the supplied
    platform/compiler combination.  'plat' defaults to 'os.name'
    (eg. 'posix', 'nt'), and 'compiler' defaults to the default compiler
    for that platform.  Currently only 'posix' and 'nt' are supported, and
    the default compilers are "traditional Unix interface" (UnixCCompiler
    class) and Visual C++ (MSVCCompiler class).  Note that it's perfectly
    possible to ask for a Unix compiler object under Windows, and a
    Microsoft compiler object under Unix -- if you supply a value for
    'compiler', 'plat' is ignored.
    s5don't know how to compile C/C++ code on platform '%s's with '%s' compilers
distutils.s4can't compile C/C++ code: unable to load module '%s's4can't compile C/C++ code: unable to find class '%s' sin module '%s'N(
RRMR*R�R�RtRt
__import__R�tmodulestvarstImportErrorR(tplatR�RRRtmodule_namet
class_nametlong_descriptionR�tmoduletklass((s+/usr/lib64/python2.7/distutils/ccompiler.pytnew_compiler�s2








cCs�g}x�|D]�}t|t�oAdt|�ko?dknsXtdd|�nt|�dkr�|jd|d�q
t|�dkr
|dd
kr�|jd|d�q�|jd|�q
q
Wx|D]}|jd	|�q�W|S(sGenerate C pre-processor options (-D, -U, -I) as used by at least
    two types of compilers: the typical Unix compiler and Visual C++.
    'macros' is the usual thing, a list of 1- or 2-tuples, where (name,)
    means undefine (-U) macro 'name', and (name,value) means define (-D)
    macro 'name' to 'value'.  'include_dirs' is just a list of directory
    names to be added to the header file search path (-I).  Returns a list
    of command-line options suitable for either Unix compilers or Visual
    C++.
    iisbad macro definition '%s': s5each element of 'macros' list must be a 1- or 2-tuples-U%sis-D%ss-D%s=%ss-I%sN(R&R.R/R1R4R(RRRVtmacroR8((s+/usr/lib64/python2.7/distutils/ccompiler.pyRK�s"
"

cCs
g}x$|D]}|j|j|��q
WxI|D]A}|j|�}t|t�rh|j|�q4|j|�q4Wx�|D]�}tjj|�\}}	|dkr�|j	|g|	�}
|
dk	r�|j|
�q|jd|�q�|j|j|��q�W|S(sgGenerate linker options for searching library directories and
    linking with specific libraries.

    'libraries' and 'library_dirs' are, respectively, lists of library names
    (not filenames!) and search directories.  Returns a list of command-line
    options suitable for use with some compiler (depending on the two format
    strings passed in).
    R�s6no library file corresponding to '%s' found (skipping)N(
R4R�R�R&RHtextendRMRNR�R�RR�R�(R�RRRtlib_optsR8toptR�tlib_dirtlib_nametlib_file((s+/usr/lib64/python2.7/distutils/ccompiler.pytgen_lib_options"s$	


	(#R�t__revision__R�RMR�tdistutils.errorsRRRRRtdistutils.spawnRtdistutils.file_utilRtdistutils.dir_utilRtdistutils.dep_utilRtdistutils.utilR	R
t	distutilsRtdistutils.sysconfigRR
R�RR�R�R�R�RKR(((s+/usr/lib64/python2.7/distutils/ccompiler.pyt<module>sJ(���o				





	-	1PKW[�Y�*((version.pycnu�[����
{fc@sqdZddlZddlZddlmZdd
d��YZdefd��YZdefd	��YZdS(s�Provides classes to represent module version numbers (one class for
each style of version numbering).  There are currently two such classes
implemented: StrictVersion and LooseVersion.

Every version number class implements the following interface:
  * the 'parse' method takes a string and parses it to some internal
    representation; if the string is an invalid version number,
    'parse' raises a ValueError exception
  * the class constructor takes an optional string argument which,
    if supplied, is passed to 'parse'
  * __str__ reconstructs the string that was passed to 'parse' (or
    an equivalent string -- ie. one that will generate an equivalent
    version number instance)
  * __repr__ generates Python code to recreate the version number instance
  * __cmp__ compares the current instance with either another instance
    of the same class or a string (which will be parsed to an instance
    of the same class, thus must follow the same rules)
i����N(t
StringTypetVersioncBs#eZdZdd�Zd�ZRS(s�Abstract base class for version numbering classes.  Just provides
    constructor (__init__) and reproducer (__repr__), because those
    seem to be the same for all version numbering classes.
    cCs|r|j|�ndS(N(tparse(tselftvstring((s)/usr/lib64/python2.7/distutils/version.pyt__init__&scCsd|jjt|�fS(Ns	%s ('%s')(t	__class__t__name__tstr(R((s)/usr/lib64/python2.7/distutils/version.pyt__repr__*sN(Rt
__module__t__doc__tNoneRR	(((s)/usr/lib64/python2.7/distutils/version.pyR st
StrictVersioncBs>eZdZejdej�Zd�Zd�Zd�Z	RS(s?Version numbering for anal retentives and software idealists.
    Implements the standard interface for version number classes as
    described above.  A version number consists of two or three
    dot-separated numeric components, with an optional "pre-release" tag
    on the end.  The pre-release tag consists of the letter 'a' or 'b'
    followed by a number.  If the numeric components of two version
    numbers are equal, then one with a pre-release tag will always
    be deemed earlier (lesser) than one without.

    The following are valid version numbers (shown in the order that
    would be obtained by sorting according to the supplied cmp function):

        0.4       0.4.0  (these two are equivalent)
        0.4.1
        0.5a1
        0.5b3
        0.5
        0.9.6
        1.0
        1.0.4a3
        1.0.4b1
        1.0.4

    The following are examples of invalid version numbers:

        1
        2.7.2.2
        1.3.a4
        1.3pl1
        1.3c4

    The rationale for this version numbering system will be explained
    in the distutils documentation.
    s)^(\d+) \. (\d+) (\. (\d+))? ([ab](\d+))?$cCs�|jj|�}|s(td|�n|jddddd�\}}}}}|rtttj|||g��|_n(tttj||g�dg�|_|r�|dtj|�f|_	n	d|_	dS(Nsinvalid version number '%s'iiiiii(t
version_retmatcht
ValueErrortgroupttupletmaptstringtatoitversiont
prereleaseR(RRRtmajortminortpatchRtprerelease_num((s)/usr/lib64/python2.7/distutils/version.pyRhs*'(cCs�|jddkr;tjtt|jdd!�d�}ntjtt|j�d�}|jr�||jdt|jd�}n|S(Niit.i(RRtjoinRRR(RR((s)/usr/lib64/python2.7/distutils/version.pyt__str__{s(	%cCs�t|t�rt|�}nt|j|j�}|dkr�|jrW|jrWdS|jrn|jrndS|jr�|jr�dS|jr�|jr�t|j|j�Sn|SdS(Nii����i(t
isinstanceRR
tcmpRR(Rtothertcompare((s)/usr/lib64/python2.7/distutils/version.pyt__cmp__�s(
RR
RtretcompiletVERBOSERRRR#(((s)/usr/lib64/python2.7/distutils/version.pyR
?s#			
tLooseVersioncBsSeZdZejdej�Zdd�Zd�Z	d�Z
d�Zd�ZRS(s�Version numbering for anarchists and software realists.
    Implements the standard interface for version number classes as
    described above.  A version number consists of a series of numbers,
    separated by either periods or strings of letters.  When comparing
    version numbers, the numeric components will be compared
    numerically, and the alphabetic components lexically.  The following
    are all valid version numbers, in no particular order:

        1.5.1
        1.5.2b2
        161
        3.10a
        8.02
        3.4j
        1996.07.12
        3.2.pl0
        3.1.1.6
        2g6
        11g
        0.960923
        2.2beta29
        1.13++
        5.5.kw
        2.0b1pl0

    In fact, there is no such thing as an invalid version number under
    this scheme; the rules for comparison are simple and predictable,
    but may not always give the results you want (for some definition
    of "want").
    s(\d+ | [a-z]+ | \.)cCs|r|j|�ndS(N(R(RR((s)/usr/lib64/python2.7/distutils/version.pyRscCs}||_td�|jj|��}xFtt|��D]2}yt||�||<Wq:tk
rkq:Xq:W||_dS(NcSs|o|dkS(NR((tx((s)/usr/lib64/python2.7/distutils/version.pyt<lambda>t(	Rtfiltertcomponent_retsplittrangetlentintRR(RRt
componentsti((s)/usr/lib64/python2.7/distutils/version.pyRs		
cCs|jS(N(R(R((s)/usr/lib64/python2.7/distutils/version.pyRscCsdt|�S(NsLooseVersion ('%s')(R(R((s)/usr/lib64/python2.7/distutils/version.pyR	 scCs1t|t�rt|�}nt|j|j�S(N(RRR'R R(RR!((s)/usr/lib64/python2.7/distutils/version.pyR#$sN(
RR
RR$R%R&R,RRRRR	R#(((s)/usr/lib64/python2.7/distutils/version.pyR'�s			((RRR$ttypesRRR
R'(((s)/usr/lib64/python2.7/distutils/version.pyt<module>s
�PKW[�BAU�S�Smsvc9compiler.pyonu�[����
{fc@s�dZdZddlZddlZddlZddlZddlmZmZm	Z	m
Z
mZddlm
Z
mZddlmZddlmZddlZejZejZejZejZejejejejfZ ej!dkoej"d%kZ#e#r'dZ$dZ%d
Z&dZ'ndZ$dZ%dZ&dZ'idd6dd6dd6Z(dd&d��YZ)dd'd��YZ*d�Z+d�Z,d�Z-d�Z.dd �Z/e+�Z0e0d!kr�ed"e0��nd#e
fd$��YZ1dS((sdistutils.msvc9compiler

Contains MSVCCompiler, an implementation of the abstract CCompiler class
for the Microsoft Visual Studio 2008.

The module is compatible with VS 2005 and VS 2008. You can find legacy support
for older versions of VS in distutils.msvccompiler.
s$Id$i����N(tDistutilsExecErrortDistutilsPlatformErrortCompileErrortLibErrort	LinkError(t	CCompilertgen_lib_options(tlog(tget_platformtwin32ii s1Software\Wow6432Node\Microsoft\VisualStudio\%0.1fs.Software\Wow6432Node\Microsoft\VCExpress\%0.1fs5Software\Wow6432Node\Microsoft\Microsoft SDKs\Windowss,Software\Wow6432Node\Microsoft\.NETFrameworks%Software\Microsoft\VisualStudio\%0.1fs"Software\Microsoft\VCExpress\%0.1fs)Software\Microsoft\Microsoft SDKs\Windowss Software\Microsoft\.NETFrameworktx86tamd64s	win-amd64tia64swin-ia64tRegcBsbeZdZd�Zee�Zd�Zee�Zd�Zee�Zd�Zee�ZRS(s2Helper class to read values from the registry
    cCsMx:tD]2}|j||�}|r||kr||SqWt|��dS(N(tHKEYStread_valuestKeyError(tclstpathtkeytbasetd((s//usr/lib64/python2.7/distutils/msvc9compiler.pyt	get_valueDs

cCs�yt||�}Wntk
r'dSXg}d}xItryt||�}Wntk
rdPnX|j|�|d7}q7W|S(sReturn list of registry keys.iiN(tRegOpenKeyExtRegErrortNonetTruet
RegEnumKeytappend(RRRthandletLtitk((s//usr/lib64/python2.7/distutils/msvc9compiler.pyt	read_keysLs
	

c	Cs�yt||�}Wntk
r'dSXi}d}xmtr�yt||�\}}}Wntk
rmPnX|j�}|j|�||j|�<|d7}q7W|S(s`Return dict of registry keys and values.

        All names are converted to lowercase.
        iiN(RRRRtRegEnumValuetlowertconvert_mbcs(	RRRRRRtnametvaluettype((s//usr/lib64/python2.7/distutils/msvc9compiler.pyR^s
	
cCsIt|dd�}|dk	rEy|d�}WqEtk
rAqEXn|S(Ntdecodetmbcs(tgetattrRtUnicodeError(tstdec((s//usr/lib64/python2.7/distutils/msvc9compiler.pyR$ts
(	t__name__t
__module__t__doc__RtclassmethodR!RR$tstaticmethod(((s//usr/lib64/python2.7/distutils/msvc9compiler.pyR
@s				t
MacroExpandercBs,eZd�Zd�Zd�Zd�ZRS(cCs'i|_t||_|j|�dS(N(tmacrostVS_BASEtvsbasetload_macros(tselftversion((s//usr/lib64/python2.7/distutils/msvc9compiler.pyt__init__�s	
cCs!tj||�|jd|<dS(Ns$(%s)(R
RR4(R8tmacroRR((s//usr/lib64/python2.7/distutils/msvc9compiler.pyt	set_macro�scCsR|jd|jdd�|jd|jdd�|jdtd�y2|dkrl|jd	td
�ntd
��Wntk
r�td��nX|dkr�|jd
|jd�|jdtd�n}d}xttD]l}yt||�}Wntk
r
q�nXt	|d�}t
j|d||f�}|d|jd<q�WdS(NtVCInstallDirs	\Setup\VCt
productdirtVSInstallDirs	\Setup\VStFrameworkDirtinstallrootg @tFrameworkSDKDirssdkinstallrootv2.0sPython was built with Visual Studio 2008;
extensions must be built with a compiler than can generate compatible binaries.
Visual Studio 2008 was not found on this system. If you have Cygwin installed,
you can try compiling with MingW32, by passing "-c mingw32" to setup.py.g"@tFrameworkVersionsclr versiont
WindowsSdkDirtcurrentinstallfolders.Software\Microsoft\NET Framework Setup\Productis%s\%sR9s$(FrameworkVersion)(
R<R6tNET_BASERRtWINSDK_BASERRRRR
RR4(R8R9tpRthRR((s//usr/lib64/python2.7/distutils/msvc9compiler.pyR7�s.




cCs6x/|jj�D]\}}|j||�}qW|S(N(R4titemstreplace(R8R,R tv((s//usr/lib64/python2.7/distutils/msvc9compiler.pytsub�s(R.R/R:R<R7RM(((s//usr/lib64/python2.7/distutils/msvc9compiler.pyR3~s			cCs�d}tjj|�}|dkr(dS|t|�}tj|jdd�\}}t|d �d}t|dd!�d	}|dkr�d
}n|dkr�||SdS(s�Return the version of MSVC that was used to build Python.

    For Python 2.3 and up, the version number is included in
    sys.version.  For earlier versions, assume the compiler is MSVC 6.
    sMSC v.i����it ii����iig$@iN(tsysR9tfindtlentsplittintR(tprefixRR,tresttmajorVersiontminorVersion((s//usr/lib64/python2.7/distutils/msvc9compiler.pytget_build_version�s	cCsIg}x<|D]4}tjj|�}||kr
|j|�q
q
W|S(snReturn a list of normalized paths with duplicates removed.

    The current order of paths is maintained.
    (tosRtnormpathR(tpathst
reduced_pathsRHtnp((s//usr/lib64/python2.7/distutils/msvc9compiler.pytnormalize_and_reduce_paths�s
cCs[|jtj�}g}x*|D]"}||kr|j|�qqWtjj|�}|S(s8Remove duplicate values of an environment variable.
    (RRRYtpathsepRtjoin(tvariabletoldListtnewListRtnewVariable((s//usr/lib64/python2.7/distutils/msvc9compiler.pytremoveDuplicates�s
cCs�t|}ytjd|d�}Wntk
r=d}nX|dkr�t|}ytjd|d�}Wq�tk
r�d}tjd�q�Xn|s�tj	j
|�rZd|}tjj|d�}|rFtj	j
|�rFtj	j
|tjtjd�}tj	j|�}tj	j
|�sWtjd|�dSqZtjd|�n|sqtjd�dStj	j
|d	�}tj	j|�r�|Stjd
�dS(s�Find the vcvarsall.bat file

    At first it tries to find the productdir of VS 2008 in the registry. If
    that fails it falls back to the VS90COMNTOOLS env var.
    s%s\Setup\VCR>s%Unable to find productdir in registrysVS%0.f0COMNTOOLStVCs%s is not a valid directorys Env var %s is not set or invalidsNo productdir founds
vcvarsall.batsUnable to find vcvarsall.batN(R5R
RRRtVSEXPRESS_BASERtdebugRYRtisdirtenvirontgetR`tpardirtabspathtisfile(R9R6R>ttoolskeyttoolsdirt	vcvarsall((s//usr/lib64/python2.7/distutils/msvc9compiler.pytfind_vcvarsall�s@









!

cCs�t|�}td�}i}|dkr9td��ntjd||�tjd||fdtjd	tj�}z�|j	�\}}|j
�d
kr�t|jd���n|jd�}x�|jd�D]�}t
j|�}d
|kr�q�n|j�}|jd
d�\}	}
|	j�}	|	|kr�|
jtj�rW|
d }
nt|
�||	<q�q�WWd|jj�|jj�Xt|�t|�kr�ttt|j�����n|S(sDLaunch vcvarsall.bat and read the settings from its environment
    tincludetlibtlibpathRsUnable to find vcvarsall.bats'Calling 'vcvarsall.bat %s' (version=%s)s
"%s" %s & settstdouttstderriR)s
t=ii����N(RsRtRuR(RrtsetRRRRht
subprocesstPopentPIPEtcommunicatetwaitR(RRR
R$tstripR#tendswithRYR_ReRvtcloseRwRQt
ValueErrortstrtlisttkeys(R9tarchRqtinterestingtresulttpopenRvRwtlineRR&((s//usr/lib64/python2.7/distutils/msvc9compiler.pytquery_vcvarsalls<	

!g @s(VC %0.1f is not supported by this moduletMSVCCompilercBsMeZdZdZiZdgZdddgZdgZdgZeeeeZ	dZ
d	Zd
ZdZ
dZZd
Zdddd�Zdd�Zddd�Zdddddddd�Zdddd�Zddddddddddd�
Zd�Zd�Zd�Zd�Zd�Zd�Zdd�Zd�ZRS(swConcrete class that implements an interface to Microsoft Visual C++,
       as defined by the CCompiler abstract class.tmsvcs.cs.ccs.cpps.cxxs.rcs.mcs.ress.objs.libs.dlls%s%ss.exeicCsPtj||||�t|_d|_g|_d|_d|_t	|_
dS(NsSoftware\Microsoft\VisualStudio(RR:tVERSIONt_MSVCCompiler__versiont_MSVCCompiler__roott_MSVCCompiler__pathsRt	plat_namet_MSVCCompiler__archtFalsetinitialized(R8tverbosetdry_runtforce((s//usr/lib64/python2.7/distutils/msvc9compiler.pyR:Ss					cCs|dkrt�}nd$}||kr@td|f��ndtjkr�dtjkr�|jd�r�d|_d|_d	|_d
|_	d|_
n+|t�ks�|dkr�t|}ntt�dt|}tt
|�}|d
jd�jtj�|_|djd�tjd<|djd�tjd<t|j�dkrntd|j��n|jd�|_|jd�|_|jd	�|_|jd
�|_	|jd�|_
y5x.tjd
jd�D]}|jj|�q�WWntk
rnXt|j�|_dj|j�tjd
<d|_|jdkr�dddddg|_ddddddg|_n9ddddddg|_dddddddg|_ddd g|_|jd!kr�ddd"d#g|_ndg|_t |_!dS(%NR	s	win-amd64swin-ia64s--plat-name must be one of %stDISTUTILS_USE_SDKtMSSdkscl.exeslink.exeslib.exesrc.exesmc.exet_RR)RtRsisxPython was built with %s, and extensions need to be built with the same version of the compiler, but it isn't installed.t;R
s/nologos/Oxs/MDs/W3s/DNDEBUGs/Ods/MDds/Z7s/D_DEBUGs/GS-s/DLLs/INCREMENTAL:NOis/INCREMENTAL:nos/DEBUG(R	s	win-amd64swin-ia64("RRRRYRjtfind_exetcctlinkerRttrctmctPLAT_TO_VCVARSR�R�tencodeRRR_R�RQt_MSVCCompiler__productRRR^R`tpreprocess_optionsR�tcompile_optionstcompile_options_debugtldflags_sharedR�tldflags_shared_debugtldflags_staticRR�(R8R�tok_platst	plat_spectvc_envRH((s//usr/lib64/python2.7/distutils/msvc9compiler.pyt
initialize^sd-				
"
	tcCs>|dkrd}ng}x|D]}tjj|�\}}tjj|�d}|tjj|�}||jkr�td|��n|r�tjj|�}n||j	kr�|j
tjj|||j��q"||j
kr|j
tjj|||j��q"|j
tjj|||j��q"W|S(NR�isDon't know how to compile %s(RRYRtsplitextt
splitdrivetisabstsrc_extensionsRtbasenamet_rc_extensionsRR`t
res_extensiont_mc_extensionst
obj_extension(R8tsource_filenamest	strip_dirt
output_dirt	obj_namestsrc_nameRtext((s//usr/lib64/python2.7/distutils/msvc9compiler.pytobject_filenames�s(	
c	Cs�|js|j�n|j||||||�}	|	\}}
}}}|pRg}
|
jd�|r{|
j|j�n|
j|j�xV|
D]N}y||\}}Wntk
r�q�nX|r�tj	j
|�}n||jkr�d|}n�||jkrd|}nq||j
kr�|}d|}y)|j|jg||g|g�Wq�tk
r}t|��q�Xq�n||jkrqtj	j|�}tj	j|�}y�|j|jgd|d|g|g�tj	jtj	j|��\}}tj	j||d�}|j|jgd|g|g�Wq�tk
rj}t|��q�Xq�ntd||f��d	|}y-|j|jg|
|||g|�Wq�tk
r�}t|��q�Xq�W|
S(
Ns/cs/Tcs/Tps/fos-hs-rs.rcs"Don't know how to compile %s to %ss/Fo(R�R�t_setup_compileRtextendR�R�RRYRRmt
_c_extensionst_cpp_extensionsR�tspawnR�RRR�tdirnameR�R�R�R`R�(R8tsourcesR�R4tinclude_dirsRht
extra_preargstextra_postargstdependstcompile_infotobjectstpp_optstbuildtcompile_optstobjtsrcR�t	input_optt
output_opttmsgth_dirtrc_dirRR�trc_file((s//usr/lib64/python2.7/distutils/msvc9compiler.pytcompile�sj	






#$$#
c	Cs�|js|j�n|j||�\}}|j|d|�}|j||�r�|d|g}|rony|j|jg|�Wq�tk
r�}t|��q�Xnt	j
d|�dS(NR�s/OUT:sskipping %s (up-to-date)(R�R�t_fix_object_argstlibrary_filenamet
_need_linkR�RtRRRRh(	R8R�toutput_libnameR�Rhttarget_langtoutput_filenametlib_argsR�((s//usr/lib64/python2.7/distutils/msvc9compiler.pytcreate_static_lib)s	
	cCs�|js|j�n|j||�\}}|j|||�}|\}}}|rr|jdt|��nt||||�}|dk	r�tj	j
||�}n|j||�r�|tj
kr�|	r�|jd}q
|jd}n|	r|j}n	|j}g}x%|pgD]}|jd|�q W||||d|g}tj	j|d�}|dk	r�tj	jtj	j|��\}}tj	j
||j|��}|jd|�n|j|||�|
r�|
|d*n|r|j|�n|jtj	j|��y|j|jg|�Wntk
ra}t|��nX|j||�}|dk	r�|\}}d||f}y |jdd	d
||g�Wq�tk
r�}t|��q�Xq�ntjd|�dS(Ns5I don't know what to do with 'runtime_library_dirs': is/EXPORT:s/OUT:is/IMPLIB:s-outputresource:%s;%ssmt.exes-nologos	-manifestsskipping %s (up-to-date)(R�R�R�t
_fix_lib_argstwarnR�RRRYRR`R�Rt
EXECUTABLER�R�RR�R�R�R�tmanifest_setup_ldargsR�tmkpathR�R�RRtmanifest_get_embed_infoRRh(R8ttarget_descR�R�R�t	librariestlibrary_dirstruntime_library_dirstexport_symbolsRhR�R�t
build_tempR�t
fixed_argstlib_optstldflagstexport_optstsymtld_argstdll_nametdll_exttimplib_fileR�tmfinfot
mffilenametmfidtout_arg((s//usr/lib64/python2.7/distutils/msvc9compiler.pytlinkBsl	
						
cCs:tjj|tjj|�d�}|jd|�dS(Ns	.manifests/MANIFESTFILE:(RYRR`R�R(R8R�R�R�t
temp_manifest((s//usr/lib64/python2.7/distutils/msvc9compiler.pyR��s	cCs�x;|D]/}|jd�r|jdd�d}PqqWdS|tjkrVd}nd}|j|�}|dkr{dS||fS(Ns/MANIFESTFILE:t:ii(t
startswithRRRRR�t_remove_visual_c_ref(R8R�R�targR�R�((s//usr/lib64/python2.7/distutils/msvc9compiler.pyR��s
	cCs�y�t|�}z|j�}Wd|j�Xtjdtj�}tj|d|�}d}tj|d|�}tjdtj�}tj||�dkr�dSt|d�}z|j	|�|SWd|j�XWnt
k
r�nXdS(NsU<assemblyIdentity.*?name=("|')Microsoft\.VC\d{2}\.CRT("|').*?(/>|</assemblyIdentity>)R�s*<dependentAssembly>\s*</dependentAssembly>sI<assemblyIdentity.*?name=(?:"|')(.+?)(?:"|').*?(?:/>|</assemblyIdentity>)tw(topentreadR�treR�tDOTALLRMtsearchRtwritetIOError(R8t
manifest_filet
manifest_ftmanifest_buftpattern((s//usr/lib64/python2.7/distutils/msvc9compiler.pyR��s.	

cCsd|S(Ns	/LIBPATH:((R8tdir((s//usr/lib64/python2.7/distutils/msvc9compiler.pytlibrary_dir_option�scCstd��dS(Ns<don't know how to set runtime library search path for MSVC++(R(R8R((s//usr/lib64/python2.7/distutils/msvc9compiler.pytruntime_library_dir_option�scCs
|j|�S(N(R�(R8Rt((s//usr/lib64/python2.7/distutils/msvc9compiler.pytlibrary_option�scCs�|r|d|g}n	|g}xW|D]K}xB|D]:}tjj||j|��}tjj|�r6|Sq6Wq)WdSdS(Nt_d(RYRR`R�texistsR(R8tdirsRtRht	try_namesRR%tlibfile((s//usr/lib64/python2.7/distutils/msvc9compiler.pytfind_library_file�s	

cCs�xH|jD]=}tjjtjj|�|�}tjj|�r
|Sq
WxUtjdjd�D]=}tjjtjj|�|�}tjj|�rb|SqbW|S(s�Return path to an MSVC executable program.

        Tries to find the program in several places: first, one of the
        MSVC program search paths from the registry; next, the directories
        in the PATH environment variable.  If any of those work, return an
        absolute path that is known to exist.  If none of them work, just
        return the original program name, 'exe'.
        tPathR�(R�RYRR`RmRnRjRR(R8texeRHtfn((s//usr/lib64/python2.7/distutils/msvc9compiler.pyR�
s	!!N( R.R/R0t
compiler_typetexecutablesR�R�R�R�R�R�R�tstatic_lib_extensiontshared_lib_extensiontstatic_lib_formattshared_lib_formatt
exe_extensionR:RR�R�R�R�R�R�R�R�R
RRRR�(((s//usr/lib64/python2.7/distutils/msvc9compiler.pyR�5sR			
YVR			+			I(((2R0t__revision__RYRzRORtdistutils.errorsRRRRRtdistutils.ccompilerRRt	distutilsRtdistutils.utilRt_winregt	OpenKeyExRtEnumKeyRt	EnumValueR"terrorRt
HKEY_USERStHKEY_CURRENT_USERtHKEY_LOCAL_MACHINEtHKEY_CLASSES_ROOTRtplatformtmaxsizetNATIVE_WIN64R5RgRGRFR�R
R3RXR^ReRrR�R�R�(((s//usr/lib64/python2.7/distutils/msvc9compiler.pyt<module>sV(					
>.				,)	PKW[�s q����
ccompiler.pyonu�[����
{fc@s�dZdZddlZddlZddlZddlmZmZmZm	Z	m
Z
ddlmZddl
mZddlmZddlmZdd	lmZmZdd
lmZddlmZdfd
��YZddfddfddfddffZeed�Zidddfd6dddfd6dddfd6dd d!fd"6d#d$d%fd&6d'd(d)fd6Zd*�Zeed+d+d+d,�Z d-�Z!d.�Z"dS(/s�distutils.ccompiler

Contains CCompiler, an abstract base class that defines the interface
for the Distutils compiler abstraction model.s$Id$i����N(tCompileErrort	LinkErrortUnknownFileErrortDistutilsPlatformErrortDistutilsModuleError(tspawn(t	move_file(tmkpath(tnewer_group(tsplit_quotedtexecute(tlog(tcustomize_compilert	CCompilercBseZdZdAZdAZdAZdAZdAZdAZ	dAZ
dAZidd6dd6dd6dd6dd6ZdddgZ
d	d	d	d
�Zd�Zd�Zd
�Zd�ZdAd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Z d�Z!d�Z"d�Z#d �Z$d!�Z%dAdAdAdAdAd"�Z&dAdAdAd	dAdAdAd#�Z'd$�Z(dAd	dAd%�Z)d&Z*d'Z+d(Z,dAdAdAdAdAd	dAdAdAdAd)�
Z-dAdAdAdAdAd	dAdAdAdAd*�
Z.dAdAdAdAdAd	dAdAdAdAd+�
Z/dAdAdAdAd	dAdAdAd,�Z0d-�Z1d.�Z2d/�Z3dAdAdAdAd0�Z4d	d1�Z5d	d2d3�Z6d	d2d4�Z7d	d2d5�Z8d6d	d2d7�Z9d8d9�Z:d:�Z;d;�Z<dAd8d<�Z=d=�Z>d>�Z?d?d@�Z@RS(Bs�Abstract base class to define the interface that must be implemented
    by real compiler classes.  Also has some utility methods used by
    several compiler classes.

    The basic idea behind a compiler abstraction class is that each
    instance can be used for all the compile/link steps in building a
    single project.  Thus, attributes common to all of those compile and
    link steps -- include directories, macros to define, libraries to link
    against, etc. -- are attributes of the compiler instance.  To allow for
    variability in how individual files are treated, most of those
    attributes may be varied on a per-compilation or per-link basis.
    tcs.csc++s.ccs.cpps.cxxtobjcs.micCs�||_||_||_d|_g|_g|_g|_g|_g|_	g|_
x.|jj�D]}|j
||j|�qjWdS(N(tdry_runtforcetverbosetNonet
output_dirtmacrostinclude_dirst	librariestlibrary_dirstruntime_library_dirstobjectstexecutablestkeystset_executable(tselfRRRtkey((s+/usr/lib64/python2.7/distutils/ccompiler.pyt__init__]s										cKsZxS|j�D]E}||jkr>td||jjf�n|j|||�q
WdS(s�Define the executables (and options for them) that will be run
        to perform the various stages of compilation.  The exact set of
        executables that may be specified here depends on the compiler
        class (via the 'executables' class attribute), but most will have:
          compiler      the C/C++ compiler
          linker_so     linker used to create shared objects and libraries
          linker_exe    linker used to create binary executables
          archiver      static library creator

        On platforms with a command-line (Unix, DOS/Windows), each of these
        is a string that will be split into executable name and (optional)
        list of arguments.  (Splitting the string is done similarly to how
        Unix shells operate: words are delimited by spaces, but quotes and
        backslashes can override this.  See
        'distutils.util.split_quoted()'.)
        s$unknown executable '%s' for class %sN(RRt
ValueErrort	__class__t__name__R(RtargsR((s+/usr/lib64/python2.7/distutils/ccompiler.pytset_executables�scCs<t|t�r(t||t|��nt|||�dS(N(t
isinstancet
basestringtsetattrR	(RRtvalue((s+/usr/lib64/python2.7/distutils/ccompiler.pyR�scCs<d}x/|jD]$}|d|kr*|S|d}qWdS(Nii(RR(Rtnametitdefn((s+/usr/lib64/python2.7/distutils/ccompiler.pyt_find_macro�scCs�x�|D]�}t|t�ost|�dksct|�dkost|dt�sc|ddkost|dt�std|dd�qqWdS(s�Ensures that every element of 'definitions' is a valid macro
        definition, ie. either (name,value) 2-tuple or a (name,) tuple.  Do
        nothing if all definitions are OK, raise TypeError otherwise.
        iiisinvalid macro definition '%s': s.must be tuple (string,), (string, string), or s(string, None)N(R&ttupletlentstrRt	TypeError(RtdefinitionsR,((s+/usr/lib64/python2.7/distutils/ccompiler.pyt_check_macro_definitions�s
#cCsH|j|�}|dk	r(|j|=n||f}|jj|�dS(s_Define a preprocessor macro for all compilations driven by this
        compiler object.  The optional parameter 'value' should be a
        string; if it is not supplied, then the macro will be defined
        without an explicit value and the exact outcome depends on the
        compiler used (XXX true? does ANSI say anything about this?)
        N(R-RRtappend(RR*R)R+R,((s+/usr/lib64/python2.7/distutils/ccompiler.pytdefine_macro�s
	
cCsE|j|�}|dk	r(|j|=n|f}|jj|�dS(s�Undefine a preprocessor macro for all compilations driven by
        this compiler object.  If the same macro is defined by
        'define_macro()' and undefined by 'undefine_macro()' the last call
        takes precedence (including multiple redefinitions or
        undefinitions).  If the macro is redefined/undefined on a
        per-compilation basis (ie. in the call to 'compile()'), then that
        takes precedence.
        N(R-RRR4(RR*R+tundefn((s+/usr/lib64/python2.7/distutils/ccompiler.pytundefine_macro�s

	cCs|jj|�dS(s�Add 'dir' to the list of directories that will be searched for
        header files.  The compiler is instructed to search directories in
        the order in which they are supplied by successive calls to
        'add_include_dir()'.
        N(RR4(Rtdir((s+/usr/lib64/python2.7/distutils/ccompiler.pytadd_include_dir�scCs||_dS(sySet the list of directories that will be searched to 'dirs' (a
        list of strings).  Overrides any preceding calls to
        'add_include_dir()'; subsequence calls to 'add_include_dir()' add
        to the list passed to 'set_include_dirs()'.  This does not affect
        any list of standard include directories that the compiler may
        search by default.
        N(R(Rtdirs((s+/usr/lib64/python2.7/distutils/ccompiler.pytset_include_dirs�scCs|jj|�dS(s�Add 'libname' to the list of libraries that will be included in
        all links driven by this compiler object.  Note that 'libname'
        should *not* be the name of a file containing a library, but the
        name of the library itself: the actual filename will be inferred by
        the linker, the compiler, or the compiler class (depending on the
        platform).

        The linker will be instructed to link against libraries in the
        order they were supplied to 'add_library()' and/or
        'set_libraries()'.  It is perfectly valid to duplicate library
        names; the linker will be instructed to link against libraries as
        many times as they are mentioned.
        N(RR4(Rtlibname((s+/usr/lib64/python2.7/distutils/ccompiler.pytadd_library�scCs||_dS(s�Set the list of libraries to be included in all links driven by
        this compiler object to 'libnames' (a list of strings).  This does
        not affect any standard system libraries that the linker may
        include by default.
        N(R(Rtlibnames((s+/usr/lib64/python2.7/distutils/ccompiler.pyt
set_librariesscCs|jj|�dS(s'Add 'dir' to the list of directories that will be searched for
        libraries specified to 'add_library()' and 'set_libraries()'.  The
        linker will be instructed to search for libraries in the order they
        are supplied to 'add_library_dir()' and/or 'set_library_dirs()'.
        N(RR4(RR8((s+/usr/lib64/python2.7/distutils/ccompiler.pytadd_library_dirscCs||_dS(s�Set the list of library search directories to 'dirs' (a list of
        strings).  This does not affect any standard library search path
        that the linker may search by default.
        N(R(RR:((s+/usr/lib64/python2.7/distutils/ccompiler.pytset_library_dirsscCs|jj|�dS(slAdd 'dir' to the list of directories that will be searched for
        shared libraries at runtime.
        N(RR4(RR8((s+/usr/lib64/python2.7/distutils/ccompiler.pytadd_runtime_library_dirscCs||_dS(s�Set the list of directories to search for shared libraries at
        runtime to 'dirs' (a list of strings).  This does not affect any
        standard search path that the runtime linker may search by
        default.
        N(R(RR:((s+/usr/lib64/python2.7/distutils/ccompiler.pytset_runtime_library_dirs%scCs|jj|�dS(s�Add 'object' to the list of object files (or analogues, such as
        explicitly named library files or the output of "resource
        compilers") to be included in every link driven by this compiler
        object.
        N(RR4(Rtobject((s+/usr/lib64/python2.7/distutils/ccompiler.pytadd_link_object-scCs||_dS(s�Set the list of object files (or analogues) to be included in
        every link to 'objects'.  This does not affect any standard object
        files that the linker may include by default (such as system
        libraries).
        N(R(RR((s+/usr/lib64/python2.7/distutils/ccompiler.pytset_link_objects5scCs�|dkr|j}nt|t�s3td�n|dkrK|j}n.t|t�rp||jpig}n	td�|dkr�|j}n:t|ttf�r�t|�|jp�g}n	td�|dkr�g}n|j	|ddd|�}t
||�}i}	xmtt|��D]Y}
||
}||
}t
jj|�d}
|jt
jj|��||
f|	|<q#W|||||	fS(	s;Process arguments and decide which source files to compile.s%'output_dir' must be a string or Nones/'macros' (if supplied) must be a list of tupless6'include_dirs' (if supplied) must be a list of stringst	strip_diriRiN(RRR&R0R1RtlistRR.tobject_filenamestgen_preprocess_optionstrangeR/tostpathtsplitextRtdirname(RtoutdirRtincdirstsourcestdependstextraRtpp_optstbuildR+tsrctobjtext((s+/usr/lib64/python2.7/distutils/ccompiler.pyt_setup_compileCs:			

cCs:|dg}|r#dg|d*n|r6||d*n|S(Ns-cs-gi((RRUtdebugtbeforetcc_args((s+/usr/lib64/python2.7/distutils/ccompiler.pyt_get_cc_argsos

cCs�|dkr|j}nt|t�s3td�n|dkrK|j}n.t|t�rp||jpig}n	td�|dkr�|j}n:t|ttf�r�t|�|jp�g}n	td�|||fS(s'Typecheck and fix-up some of the arguments to the 'compile()'
        method, and return fixed-up values.  Specifically: if 'output_dir'
        is None, replaces it with 'self.output_dir'; ensures that 'macros'
        is a list, and augments it with 'self.macros'; ensures that
        'include_dirs' is a list, and augments it with 'self.include_dirs'.
        Guarantees that the returned values are of the correct type,
        i.e. for 'output_dir' either string or None, and for 'macros' and
        'include_dirs' either list or None.
        s%'output_dir' must be a string or Nones/'macros' (if supplied) must be a list of tupless6'include_dirs' (if supplied) must be a list of stringsN(	RRR&R0R1RRHRR.(RRRR((s+/usr/lib64/python2.7/distutils/ccompiler.pyt_fix_compile_argsxs 
	cCsjt|ttf�s!td�nt|�}|dkrE|j}nt|t�s`td�n||fS(s�Typecheck and fix up some arguments supplied to various methods.
        Specifically: ensure that 'objects' is a list; if output_dir is
        None, replace with self.output_dir.  Return fixed versions of
        'objects' and 'output_dir'.
        s,'objects' must be a list or tuple of stringss%'output_dir' must be a string or NoneN(R&RHR.R1RRR0(RRR((s+/usr/lib64/python2.7/distutils/ccompiler.pyt_fix_object_args�s	cCs|dkr|j}n:t|ttf�rIt|�|jpBg}n	td�|dkrj|j}n:t|ttf�r�t|�|jp�g}n	td�|dkr�|j}n>t|ttf�r�t|�|jp�g}n
tdd�|||fS(s;Typecheck and fix up some of the arguments supplied to the
        'link_*' methods.  Specifically: ensure that all arguments are
        lists, and augment them with their permanent versions
        (eg. 'self.libraries' augments 'libraries').  Return a tuple with
        fixed versions of all arguments.
        s3'libraries' (if supplied) must be a list of stringss6'library_dirs' (if supplied) must be a list of stringss%'runtime_library_dirs' (if supplied) smust be a list of stringsN(RRR&RHR.R1RR(RRRR((s+/usr/lib64/python2.7/distutils/ccompiler.pyt
_fix_lib_args�s*	cCsE|jr
dS|jr.t||dd�}nt||�}|SdS(sjReturn true if we need to relink the files listed in 'objects'
        to recreate 'output_file'.
        itmissingtnewerN(RRR(RRtoutput_fileRc((s+/usr/lib64/python2.7/distutils/ccompiler.pyt
_need_link�s		c	Cs�t|t�s|g}nd}t|j�}x}|D]u}tjj|�\}}|jj	|�}y1|jj
|�}||kr�|}|}nWq7tk
r�q7Xq7W|S(s|Detect the language of a given file, or list of files. Uses
        language_map, and language_order to do the job.
        N(R&RHRR/tlanguage_orderRLRMRNtlanguage_maptgettindexR!(	RRRtlangRitsourcetbaseRYtextlangtextindex((s+/usr/lib64/python2.7/distutils/ccompiler.pytdetect_language�s


cCsdS(s�Preprocess a single C/C++ source file, named in 'source'.
        Output will be written to file named 'output_file', or stdout if
        'output_file' not supplied.  'macros' is a list of macro
        definitions as for 'compile()', which will augment the macros set
        with 'define_macro()' and 'undefine_macro()'.  'include_dirs' is a
        list of directory names that will be added to the default list.

        Raises PreprocessError on failure.
        N((RRkRdRRt
extra_preargstextra_postargs((s+/usr/lib64/python2.7/distutils/ccompiler.pyt
preprocess�sc	Cs�|j||||||�\}}	}}
}|j|
||�}xU|	D]M}
y||
\}}Wntk
ryqInX|j|
|||||
�qIW|	S(sK	Compile one or more source files.

        'sources' must be a list of filenames, most likely C/C++
        files, but in reality anything that can be handled by a
        particular compiler and compiler class (eg. MSVCCompiler can
        handle resource files in 'sources').  Return a list of object
        filenames, one per source filename in 'sources'.  Depending on
        the implementation, not all source files will necessarily be
        compiled, but all corresponding object filenames will be
        returned.

        If 'output_dir' is given, object files will be put under it, while
        retaining their original path component.  That is, "foo/bar.c"
        normally compiles to "foo/bar.o" (for a Unix implementation); if
        'output_dir' is "build", then it would compile to
        "build/foo/bar.o".

        'macros', if given, must be a list of macro definitions.  A macro
        definition is either a (name, value) 2-tuple or a (name,) 1-tuple.
        The former defines a macro; if the value is None, the macro is
        defined without an explicit value.  The 1-tuple case undefines a
        macro.  Later definitions/redefinitions/ undefinitions take
        precedence.

        'include_dirs', if given, must be a list of strings, the
        directories to add to the default include file search path for this
        compilation only.

        'debug' is a boolean; if true, the compiler will be instructed to
        output debug symbols in (or alongside) the object file(s).

        'extra_preargs' and 'extra_postargs' are implementation- dependent.
        On platforms that have the notion of a command-line (e.g. Unix,
        DOS/Windows), they are most likely lists of strings: extra
        command-line arguments to prepand/append to the compiler command
        line.  On other platforms, consult the implementation class
        documentation.  In any event, they are intended as an escape hatch
        for those occasions when the abstract compiler framework doesn't
        cut the mustard.

        'depends', if given, is a list of filenames that all targets
        depend on.  If a source file is older than any file in
        depends, then the source file will be recompiled.  This
        supports dependency tracking, but only at a coarse
        granularity.

        Raises CompileError on failure.
        (RZR^tKeyErrort_compile(RRRRRRR[RpRqRSRRURVR]RXRWRY((s+/usr/lib64/python2.7/distutils/ccompiler.pytcompile�s7

 cCsdS(sCompile 'src' to product 'obj'.N((RRXRWRYR]RqRU((s+/usr/lib64/python2.7/distutils/ccompiler.pyRtCscCsdS(s&Link a bunch of stuff together to create a static library file.
        The "bunch of stuff" consists of the list of object files supplied
        as 'objects', the extra object files supplied to
        'add_link_object()' and/or 'set_link_objects()', the libraries
        supplied to 'add_library()' and/or 'set_libraries()', and the
        libraries supplied as 'libraries' (if any).

        'output_libname' should be a library name, not a filename; the
        filename will be inferred from the library name.  'output_dir' is
        the directory where the library file will be put.

        'debug' is a boolean; if true, debugging information will be
        included in the library (note that on most platforms, it is the
        compile step where this matters: the 'debug' flag is included here
        just for consistency).

        'target_lang' is the target language for which the given objects
        are being compiled. This allows specific linkage time treatment of
        certain languages.

        Raises LibError on failure.
        N((RRtoutput_libnameRR[ttarget_lang((s+/usr/lib64/python2.7/distutils/ccompiler.pytcreate_static_libJst
shared_objecttshared_libraryt
executablecCs
t�dS(suLink a bunch of stuff together to create an executable or
        shared library file.

        The "bunch of stuff" consists of the list of object files supplied
        as 'objects'.  'output_filename' should be a filename.  If
        'output_dir' is supplied, 'output_filename' is relative to it
        (i.e. 'output_filename' can provide directory components if
        needed).

        'libraries' is a list of libraries to link against.  These are
        library names, not filenames, since they're translated into
        filenames in a platform-specific way (eg. "foo" becomes "libfoo.a"
        on Unix and "foo.lib" on DOS/Windows).  However, they can include a
        directory component, which means the linker will look in that
        specific directory rather than searching all the normal locations.

        'library_dirs', if supplied, should be a list of directories to
        search for libraries that were specified as bare library names
        (ie. no directory component).  These are on top of the system
        default and those supplied to 'add_library_dir()' and/or
        'set_library_dirs()'.  'runtime_library_dirs' is a list of
        directories that will be embedded into the shared library and used
        to search for other shared libraries that *it* depends on at
        run-time.  (This may only be relevant on Unix.)

        'export_symbols' is a list of symbols that the shared library will
        export.  (This appears to be relevant only on Windows.)

        'debug' is as for 'compile()' and 'create_static_lib()', with the
        slight distinction that it actually matters on most platforms (as
        opposed to 'create_static_lib()', which includes a 'debug' flag
        mostly for form's sake).

        'extra_preargs' and 'extra_postargs' are as for 'compile()' (except
        of course that they supply command-line arguments for the
        particular linker being used).

        'target_lang' is the target language for which the given objects
        are being compiled. This allows specific linkage time treatment of
        certain languages.

        Raises LinkError on failure.
        N(tNotImplementedError(Rttarget_descRtoutput_filenameRRRRtexport_symbolsR[RpRqt
build_tempRw((s+/usr/lib64/python2.7/distutils/ccompiler.pytlinkis/c

CsG|jtj||j|dd�|||||||	|
||�
dS(Ntlib_typetshared(R�R
tSHARED_LIBRARYtlibrary_filename(
RRRvRRRRRR[RpRqR�Rw((s+/usr/lib64/python2.7/distutils/ccompiler.pytlink_shared_lib�s	c

Cs8|jtj|||||||||	|
||�
dS(N(R�R
t
SHARED_OBJECT(
RRR~RRRRRR[RpRqR�Rw((s+/usr/lib64/python2.7/distutils/ccompiler.pytlink_shared_object�s
	cCsA|jtj||j|�||||d|||	d|
�
dS(N(R�R
t
EXECUTABLEtexecutable_filenameR(RRtoutput_prognameRRRRR[RpRqRw((s+/usr/lib64/python2.7/distutils/ccompiler.pytlink_executable�scCs
t�dS(skReturn the compiler option to add 'dir' to the list of
        directories searched for libraries.
        N(R|(RR8((s+/usr/lib64/python2.7/distutils/ccompiler.pytlibrary_dir_option�scCs
t�dS(ssReturn the compiler option to add 'dir' to the list of
        directories searched for runtime libraries.
        N(R|(RR8((s+/usr/lib64/python2.7/distutils/ccompiler.pytruntime_library_dir_option�scCs
t�dS(sReturn the compiler option to add 'lib' to the list of libraries
        linked into the shared library or executable.
        N(R|(Rtlib((s+/usr/lib64/python2.7/distutils/ccompiler.pytlibrary_option�scCsEddl}|dkr!g}n|dkr6g}n|dkrKg}n|dkr`g}n|jd|dt�\}}tj|d�}	z7x|D]}
|	jd|
�q�W|	jd|�Wd|	j�Xy|j|gd|�}Wnt	k
rt
SXy |j|d	d
|d|�Wntt
fk
r@t
SXtS(s�Return a boolean indicating whether funcname is supported on
        the current platform.  The optional arguments can be used to
        augment the compilation environment.
        i����Ns.cttexttws#include "%s"
s=int main (int argc, char **argv) {
    %s();
    return 0;
}
Rsa.outRR(ttempfileRtmkstemptTrueRLtfdopentwritetcloseRuRtFalseR�RR1(RtfuncnametincludesRRRR�tfdtfnametftinclR((s+/usr/lib64/python2.7/distutils/ccompiler.pythas_function�s8
				

cCs
t�dS(sHSearch the specified list of directories for a static or shared
        library file 'lib' and return the full path to that file.  If
        'debug' true, look for a debugging version (if that makes sense on
        the current platform).  Return None if 'lib' wasn't found in any of
        the specified directories.
        N(R|(RR:R�R[((s+/usr/lib64/python2.7/distutils/ccompiler.pytfind_library_filestcCs�|dkrd}ng}x�|D]�}tjj|�\}}tjj|�d}|tjj|�}||jkr�td||f�n|r�tjj|�}n|j	tjj
|||j��q"W|S(NR�is"unknown file type '%s' (from '%s')(RRLRMRNt
splitdrivetisabstsrc_extensionsRtbasenameR4tjoint
obj_extension(Rtsource_filenamesRGRt	obj_namestsrc_nameRlRY((s+/usr/lib64/python2.7/distutils/ccompiler.pyRI.s	
cCs5|rtjj|�}ntjj|||j�S(N(RLRMR�R�tshared_lib_extension(RR�RGR((s+/usr/lib64/python2.7/distutils/ccompiler.pytshared_object_filename?scCs;|rtjj|�}ntjj|||jp6d�S(NR�(RLRMR�R�t
exe_extension(RR�RGR((s+/usr/lib64/python2.7/distutils/ccompiler.pyR�Eststaticc
Cs�|d	krtd�nt||d�}t||d�}tjj|�\}}|||f}	|rud}ntjj|||	�S(
NR�R�tdylibt
xcode_stubs@'lib_type' must be "static", "shared", "dylib", or "xcode_stub".t_lib_formatt_lib_extensionR�(R�R�R�R�(R!tgetattrRLRMtsplitR�(
RR<R�RGRtfmtRYR8Rltfilename((s+/usr/lib64/python2.7/distutils/ccompiler.pyR�Ks	icCstj|�dS(N(RR[(Rtmsgtlevel((s+/usr/lib64/python2.7/distutils/ccompiler.pytannounce^scCs"ddlm}|r|GHndS(Ni����(tDEBUG(tdistutils.debugR�(RR�R�((s+/usr/lib64/python2.7/distutils/ccompiler.pytdebug_printascCstjjd|�dS(Nswarning: %s
(tsyststderrR�(RR�((s+/usr/lib64/python2.7/distutils/ccompiler.pytwarnfscCst||||j�dS(N(R
R(RtfuncR$R�R�((s+/usr/lib64/python2.7/distutils/ccompiler.pyR
iscCst|d|j�dS(NR(RR(Rtcmd((s+/usr/lib64/python2.7/distutils/ccompiler.pyRlscCst||d|j�S(NR(RR(RRWtdst((s+/usr/lib64/python2.7/distutils/ccompiler.pyRosi�cCst||d|j�dS(NR(RR(RR*tmode((s+/usr/lib64/python2.7/distutils/ccompiler.pyRrsN(AR#t
__module__t__doc__Rt
compiler_typeR�R�tstatic_lib_extensionR�tstatic_lib_formattshared_lib_formatR�RgRfR R%RR-R3R5R7R9R;R=R?R@RARBRCRERFRZR^R_R`RaReRoRrRuRtRxR�R�R�R�R�R�R�R�R�R�R�R�RIR�R�R�R�R�R�R
RRR(((s+/usr/lib64/python2.7/distutils/ccompiler.pyR
s�


$	!						
										,			 		#	
		C			1							,+				scygwin.*tunixtos2emxtemxtposixtnttmsvccCs|dkrtj}n|dkr0tj}nxHtD]@\}}tj||�dk	sstj||�dk	r7|Sq7WdS(sr Determine the default compiler to use for the given platform.

        osname should be one of the standard Python OS names (i.e. the
        ones returned by os.name) and platform the common value
        returned by sys.platform for the platform in question.

        The default values are os.name and sys.platform in case the
        parameters are not given.

    R�N(RRLR*R�tplatformt_default_compilerstretmatch(tosnameR�tpatterntcompiler((s+/usr/lib64/python2.7/distutils/ccompiler.pytget_default_compiler�st
unixccompilert
UnixCCompilersstandard UNIX-style compilertmsvccompilertMSVCCompilersMicrosoft Visual C++tcygwinccompilertCygwinCCompilers'Cygwin port of GNU C Compiler for Win32tcygwintMingw32CCompilers(Mingw32 port of GNU C Compiler for Win32tmingw32tbcppcompilertBCPPCompilersBorland C++ CompilertbcpptemxccompilertEMXCCompilers#EMX port of GNU C Compiler for OS/2cCsvddlm}g}x6tj�D](}|jd|dt|df�q#W|j�||�}|jd�dS(syPrint list of available compilers (used by the "--help-compiler"
    options to "build", "build_ext", "build_clib").
    i����(tFancyGetopts	compiler=isList of available compilers:N(tdistutils.fancy_getoptR�tcompiler_classRR4Rtsortt
print_help(R�t	compilersR�tpretty_printer((s+/usr/lib64/python2.7/distutils/ccompiler.pytshow_compilers�s
icCs|dkrtj}ny2|dkr6t|�}nt|\}}}WnAtk
r�d|}|dk	r�|d|}nt|�nXy5d|}t|�tj	|}	t
|	�|}
WnEtk
r�td|�n(tk
r
tdd||f�nX|
d||�S(s[Generate an instance of some CCompiler subclass for the supplied
    platform/compiler combination.  'plat' defaults to 'os.name'
    (eg. 'posix', 'nt'), and 'compiler' defaults to the default compiler
    for that platform.  Currently only 'posix' and 'nt' are supported, and
    the default compilers are "traditional Unix interface" (UnixCCompiler
    class) and Visual C++ (MSVCCompiler class).  Note that it's perfectly
    possible to ask for a Unix compiler object under Windows, and a
    Microsoft compiler object under Unix -- if you supply a value for
    'compiler', 'plat' is ignored.
    s5don't know how to compile C/C++ code on platform '%s's with '%s' compilers
distutils.s4can't compile C/C++ code: unable to load module '%s's4can't compile C/C++ code: unable to find class '%s' sin module '%s'N(
RRLR*R�R�RsRt
__import__R�tmodulestvarstImportErrorR(tplatR�RRRtmodule_namet
class_nametlong_descriptionR�tmoduletklass((s+/usr/lib64/python2.7/distutils/ccompiler.pytnew_compiler�s2








cCs�g}x�|D]�}t|t�oAdt|�ko?dknsXtdd|�nt|�dkr�|jd|d�q
t|�dkr
|dd
kr�|jd|d�q�|jd|�q
q
Wx|D]}|jd	|�q�W|S(sGenerate C pre-processor options (-D, -U, -I) as used by at least
    two types of compilers: the typical Unix compiler and Visual C++.
    'macros' is the usual thing, a list of 1- or 2-tuples, where (name,)
    means undefine (-U) macro 'name', and (name,value) means define (-D)
    macro 'name' to 'value'.  'include_dirs' is just a list of directory
    names to be added to the header file search path (-I).  Returns a list
    of command-line options suitable for either Unix compilers or Visual
    C++.
    iisbad macro definition '%s': s5each element of 'macros' list must be a 1- or 2-tuples-U%sis-D%ss-D%s=%ss-I%sN(R&R.R/R1R4R(RRRUtmacroR8((s+/usr/lib64/python2.7/distutils/ccompiler.pyRJ�s"
"

cCs
g}x$|D]}|j|j|��q
WxI|D]A}|j|�}t|t�rh|j|�q4|j|�q4Wx�|D]�}tjj|�\}}	|dkr�|j	|g|	�}
|
dk	r�|j|
�q|jd|�q�|j|j|��q�W|S(sgGenerate linker options for searching library directories and
    linking with specific libraries.

    'libraries' and 'library_dirs' are, respectively, lists of library names
    (not filenames!) and search directories.  Returns a list of command-line
    options suitable for use with some compiler (depending on the two format
    strings passed in).
    R�s6no library file corresponding to '%s' found (skipping)N(
R4R�R�R&RHtextendRLRMR�R�RR�R�(R�RRRtlib_optsR8toptR�tlib_dirtlib_nametlib_file((s+/usr/lib64/python2.7/distutils/ccompiler.pytgen_lib_options"s$	


	(#R�t__revision__R�RLR�tdistutils.errorsRRRRRtdistutils.spawnRtdistutils.file_utilRtdistutils.dir_utilRtdistutils.dep_utilRtdistutils.utilR	R
t	distutilsRtdistutils.sysconfigRR
R�RR�R�R�R�RJR(((s+/usr/lib64/python2.7/distutils/ccompiler.pyt<module>sJ(���o				





	-	1PKW[�R��
�
log.pyonu�[����
{fc@s�dZdZdZdZdZdZddlZddd	��YZe�Zej	Z	ej
Z
ejZejZej
Z
ejZd
�Zd�ZdS(
s,A simple log mechanism styled after PEP 282.iiiiii����NtLogcBsSeZed�Zd�Zd�Zd�Zd�Zd�Zd�Z	d�Z
RS(cCs
||_dS(N(t	threshold(tselfR((s%/usr/lib64/python2.7/distutils/log.pyt__init__scCs�|tttttfkr4tdt|���n||jkr�|rV||}n|tttfkrwtj	}n	tj
}|jd|�|j�ndS(Ns%s wrong log levels%s
(
tDEBUGtINFOtWARNtERRORtFATALt
ValueErrortstrRtsyststderrtstdouttwritetflush(Rtleveltmsgtargststream((s%/usr/lib64/python2.7/distutils/log.pyt_logs
	cGs|j|||�dS(N(R(RRRR((s%/usr/lib64/python2.7/distutils/log.pytlog!scGs|jt||�dS(N(RR(RRR((s%/usr/lib64/python2.7/distutils/log.pytdebug$scGs|jt||�dS(N(RR(RRR((s%/usr/lib64/python2.7/distutils/log.pytinfo'scGs|jt||�dS(N(RR(RRR((s%/usr/lib64/python2.7/distutils/log.pytwarn*scGs|jt||�dS(N(RR(RRR((s%/usr/lib64/python2.7/distutils/log.pyterror-scGs|jt||�dS(N(RR(RRR((s%/usr/lib64/python2.7/distutils/log.pytfatal0s(t__name__t
__module__RRRRRRRRR(((s%/usr/lib64/python2.7/distutils/log.pyRs						cCstj}|t_|S(N(t_global_logR(Rtold((s%/usr/lib64/python2.7/distutils/log.pyt
set_threshold;s		cCsO|dkrtt�n2|dkr2tt�n|dkrKtt�ndS(Niii(RRRR(tv((s%/usr/lib64/python2.7/distutils/log.pyt
set_verbosityAs

((t__doc__RRRRRRRRRRRRRRRR!(((s%/usr/lib64/python2.7/distutils/log.pyt<module>s %								PKW[b�{�++emxccompiler.pyonu�[����
{fc@s�dZdZddlZddlZddlZddlmZmZddlm	Z	ddl
mZddlm
Z
mZmZddlmZd	e	fd
��YZdZdZd
Zd�Zd�ZdS(s�distutils.emxccompiler

Provides the EMXCCompiler class, a subclass of UnixCCompiler that
handles the EMX port of the GNU C compiler to OS/2.
s$Id$i����N(tgen_preprocess_optionstgen_lib_options(t
UnixCCompiler(t
write_file(tDistutilsExecErrortCompileErrortUnknownFileError(tlogtEMXCCompilercBs�eZdZdZdZdZdZdZdZdZ	dddd�Z
d	�Zddddddddddd
�
Z
ddd�Zdd
�ZRS(temxs.objs.libs.dlls%s%ss.ress.exeic	Cs�tj||||�t�\}}|jd||f�|tk	rd|jdd|d�nt�\|_|_|j|j	d|j|jf�|j
ddddd	d
dd�d
g|_dS(Ns%Python's GCC status: %s (details: %s)s<Python's pyconfig.h doesn't seem to support your compiler.  sReason: %s.s<Compiling may fail because of undefined preprocessor macros.s: gcc %s, ld %s
tcompilers5gcc -Zomf -Zmt -O3 -fomit-frame-pointer -mprobe -Walltcompiler_sot
linker_exesgcc -Zomf -Zmt -Zcrtdllt	linker_sosgcc -Zomf -Zmt -Zcrtdll -Zdlltgcc(Rt__init__tcheck_config_htdebug_printtCONFIG_H_OKtwarntget_versionstgcc_versiont
ld_versiont
compiler_typetset_executablest
dll_libraries(tselftverbosetdry_runtforcetstatustdetails((s./usr/lib64/python2.7/distutils/emxccompiler.pyR*s"	cCs�|dkrHy|jdd|g�Wq�tk
rD}t|�q�XnHy)|j|j||d|g|�Wntk
r�}t|�nXdS(Ns.rctrcs-rs-o(tspawnRRR(Rtobjtsrctexttcc_argstextra_postargstpp_optstmsg((s./usr/lib64/python2.7/distutils/emxccompiler.pyt_compileMscCs�tj|
pg�}
tj|p$g�}tj|p9g�}|j|j�|dk	r;||jkr;tjj|d�}tjjtjj	|��\}}tjj
||d�}dtjjtjj	|��dddg}x|D]}|jd|�q�W|jt
||fd|�|j|�n|	sQ|
jd�ntj||||||||d|	|
|||
�dS(	Nis.defs$LIBRARY %s INITINSTANCE TERMINSTANCEsDATA MULTIPLE NONSHAREDtEXPORTSs  "%s"s
writing %ss-s(tcopytextendRtNonet
EXECUTABLEtostpathtdirnametsplitexttbasenametjointappendtexecuteRRtlink(Rttarget_desctobjectstoutput_filenamet
output_dirt	librariestlibrary_dirstruntime_library_dirstexport_symbolstdebugt
extra_preargsR&t
build_tempttarget_langttemp_dirtdll_namet
dll_extensiontdef_filetcontentstsym((s./usr/lib64/python2.7/distutils/emxccompiler.pyR7[sF		 	
	tcCs�|dkrd}ng}x�|D]�}tjjtjj|��\}}||jdgkrxtd||f�n|r�tjj|�}n|dkr�|jtjj	|||j
��q"|jtjj	|||j��q"W|S(NRJs.rcs"unknown file type '%s' (from '%s')(R-R/R0R2tnormcasetsrc_extensionsRR3R5R4t
res_extensiont
obj_extension(Rtsource_filenamest	strip_dirR;t	obj_namestsrc_nametbaseR$((s./usr/lib64/python2.7/distutils/emxccompiler.pytobject_filenames�s"	
$c
Cs�d|}d|}ytjdjd�}Wntk
rGg}nXxh||D]\}tjj||�}tjj||�}	tjj|�r�|Stjj|	�rS|	SqSWdS(Ns%s.libs	lib%s.libtLIBRARY_PATHt;(R/tenvirontsplittKeyErrorR0R4texistsR-(
RtdirstlibR@tshortlibtlonglibtemx_dirstdirt	shortlibptlonglibp((s./usr/lib64/python2.7/distutils/emxccompiler.pytfind_library_file�s



N(t__name__t
__module__RRNtstatic_lib_extensiontshared_lib_extensiontstatic_lib_formattshared_lib_formatRMt
exe_extensionRR)R-R7RTRc(((s./usr/lib64/python2.7/distutils/emxccompiler.pyRs2 	Ptoksnot okt	uncertaincCs�ddlm}ddl}|jtjd�dkrAtdfS|j�}y.t|�}z|j	�}Wd|j
�XWn'tk
r�}td||j
ffSX|j|d�dkr�td	|fStd
|fSdS(s�Check if the current Python installation (specifically, pyconfig.h)
    appears amenable to building extensions with GCC.  Returns a tuple
    (status, details), where 'status' is one of the following constants:
      CONFIG_H_OK
        all is well, go ahead and compile
      CONFIG_H_NOTOK
        doesn't look good
      CONFIG_H_UNCERTAIN
        not sure -- unable to read pyconfig.h
    'details' is a human-readable string explaining the situation.

    Note there are two ways to conclude "OK": either 'sys.version' contains
    the string "GCC" (implying that this Python was built with GCC), or the
    installed "pyconfig.h" contains the string "__GNUC__".
    i����(t	sysconfigNtGCCissys.version mentions 'GCC'scouldn't read '%s': %st__GNUC__s'%s' mentions '__GNUC__'s '%s' does not mention '__GNUC__'(t	distutilsRmtstringtfindtsystversionRtget_config_h_filenametopentreadtclosetIOErrortCONFIG_H_UNCERTAINtstrerrortCONFIG_H_NOTOK(RmRqtfntftstexc((s./usr/lib64/python2.7/distutils/emxccompiler.pyR�s 
c	Cs�ddlm}ddlm}ddl}|d�}|r�tj|dd�}z|j�}Wd|j�X|j	d|�}|r�||j
d	��}q�d}nd}d}||fS(
sa Try to find out the versions of gcc and ld.
        If not possible it returns None for it.
    i����(t
StrictVersion(tfind_executableNRs
 -dumpversiontrs(\d+\.\d+\.\d+)i(tdistutils.versionR�tdistutils.spawnR�treR/tpopenRwRxtsearchtgroupR-(	R�R�R�tgcc_exetoutt
out_stringtresultRR((s./usr/lib64/python2.7/distutils/emxccompiler.pyR&s 	(t__doc__t__revision__R/RsR+tdistutils.ccompilerRRtdistutils.unixccompilerRtdistutils.file_utilRtdistutils.errorsRRRRpRRRR|RzRR(((s./usr/lib64/python2.7/distutils/emxccompiler.pyt<module>s$�	4PKW[}�J��dist.pycnu�[����
{fc@s&dZdZddlZddlZddlZddlmZyddlZWnek
rie	ZnXddl
mZmZm
Z
mZddlmZmZddlmZmZmZddlmZdd	lmZd
Zejd�Zdfd
��YZdfd��YZd�ZdS(s}distutils.dist

Provides the Distribution class, which represents the module distribution
being built/installed/distributed.
s$Id$i����N(tmessage_from_file(tDistutilsOptionErrortDistutilsArgErrortDistutilsModuleErrortDistutilsClassError(tFancyGetoptttranslate_longopt(t
check_environt	strtoboolt
rfc822_escape(tlog(tDEBUGsutf-8s^[a-zA-Z]([a-zA-Z0-9_]*)$tDistributioncBs�eZdZd]d^d_d`dbgZdZdcdddedfdgdhdidjdkdldmdndodpdqdrdsdtdudvdwgZed<�e�Zidd6Z	dad=�Z
d>�Zdadad?d@�ZdA�Z
dadB�ZdC�ZdD�ZdE�ZdF�ZddgdG�ZdH�ZdI�ZdJ�ZdK�ZdL�ZdM�ZddN�ZdadO�ZdPdQ�ZejdR�ZdS�Z dT�Z!dU�Z"dV�Z#dW�Z$dX�Z%dY�Z&dZ�Z'd[�Z(d\�Z)RS(xs�The core of the Distutils.  Most of the work hiding behind 'setup'
    is really done within a Distribution instance, which farms the work out
    to the Distutils commands specified on the command line.

    Setup scripts will almost never instantiate Distribution directly,
    unless the 'setup()' function is totally inadequate to their needs.
    However, it is conceivable that a setup script might wish to subclass
    Distribution for some specialized purpose, and then pass the subclass
    to 'setup()' as the 'distclass' keyword argument.  If so, it is
    necessary to respect the expectations that 'setup' has of Distribution.
    See the code for 'setup()', in core.py, for details.
    tverbosetvsrun verbosely (default)itquiettqs!run quietly (turns verbosity off)sdry-runtnsdon't actually do anythingthelpthsshow detailed help messagesno-user-cfgs-ignore pydistutils.cfg in your home directorys�Common commands: (see '--help-commands' for more)

  setup.py build      will build the package underneath 'build/'
  setup.py install    will install the package
s
help-commandsslist all available commandstnamesprint package nametversiontVsprint package versiontfullnamesprint <package name>-<version>tauthorsprint the author's namesauthor-emails print the author's email addresst
maintainersprint the maintainer's namesmaintainer-emails$print the maintainer's email addresstcontacts7print the maintainer's name if known, else the author'ss
contact-emails@print the maintainer's email address if known, else the author'sturlsprint the URL for this packagetlicenses print the license of the packagetlicencesalias for --licensetdescriptionsprint the package descriptionslong-descriptions"print the long package descriptiont	platformssprint the list of platformstclassifierssprint the list of classifierstkeywordssprint the list of keywordstprovidess+print the list of packages/modules providedtrequiress+print the list of packages/modules requiredt	obsoletess0print the list of packages/modules made obsoletecCst|d�S(Ni(R(tx((s&/usr/lib64/python2.7/distutils/dist.pyt<lambda>wtcCsid|_d|_d|_x!|jD]}t||d�q%Wt�|_x:|jjD],}d|}t||t|j|��qXWi|_	d|_d|_d|_
i|_g|_d|_i|_d|_d|_d|_d|_d|_d|_d|_d|_d|_d|_d|_i|_i|_|r|jd�}|dk	r�|d=xY|j �D]H\}}|j!|�}x*|j �D]\}	}
d|
f||	<q�WqzWnd|kr#|d|d<|d=d	}t"dk	rt"j#|�q#t$j%j&|d
�nx�|j �D]�\}}
t'|jd|�rot|jd|�|
�q0t'|j|�r�t|j||
�q0t'||�r�t|||
�q0dt(|�}t"dk	r�t"j#|�q0t$j%j&|d
�q0Wnt)|_*|j
dk	r[x@|j
D]2}
|
j+d
�s;Pn|
dkr"t,|_*Pq"q"Wn|j-�dS(s0Construct a new Distribution instance: initialize all the
        attributes of a Distribution, and then use 'attrs' (a dictionary
        mapping attribute names to values) to assign some of those
        attributes their "real" values.  (Any attributes not mentioned in
        'attrs' will be assigned to some null value: 0, None, an empty list
        or dictionary, etc.)  Most importantly, initialize the
        'command_obj' attribute to the empty dictionary; this will be
        filled in with real command objects by 'parse_command_line()'.
        iitget_R'toptionsssetup scriptRRs:'licence' distribution option is deprecated; use 'license's
tset_sUnknown distribution option: %st-s
--no-user-cfgN(.R
tdry_runRtdisplay_option_namestsetattrtDistributionMetadatatmetadatat_METHOD_BASENAMEStgetattrtcmdclasstNonetcommand_packagestscript_nametscript_argstcommand_optionst
dist_filestpackagestpackage_datatpackage_dirt
py_modulest	librariestheaderstext_modulestext_packagetinclude_dirst
extra_pathtscriptst
data_filestpasswordtcommand_objthave_runtgettitemstget_option_dicttwarningstwarntsyststderrtwritethasattrtreprtTruet
want_user_cfgt
startswithtFalsetfinalize_options(tselftattrstattrtbasenametmethod_nameR)tcommandtcmd_optionstopt_dicttopttvaltmsgtkeytarg((s&/usr/lib64/python2.7/distutils/dist.pyt__init__�s�			
 																							cCs6|jj|�}|dkr2i}|j|<n|S(s�Get the option dictionary for a given command.  If that
        command's option dictionary hasn't been created yet, then create it
        and return the new dictionary; otherwise, return the existing
        option dictionary.
        N(R8RIR4(RXR]tdict((s&/usr/lib64/python2.7/distutils/dist.pyRK!sR'c	Csddlm}|dkr8|jj�}|j�n|dk	rb|j||�|d}n|s}|j|d�dSx�|D]�}|jj|�}|dkr�|j|d|�q�|j|d|�||�}x,|jd�D]}|j|d|�q�Wq�WdS(Ni����(tpformats  sno commands known yetsno option dict for '%s' commandsoption dict for '%s' command:s
(	tpprintRgR4R8tkeystsorttannounceRItsplit(	RXtheadertcommandstindentRgtcmd_nameR_touttline((s&/usr/lib64/python2.7/distutils/dist.pytdump_option_dicts,s(


		cCsg}t�tjjtjdj�}tjj|d�}tjj|�r`|j	|�ntj
dkrxd}nd}|jr�tjjtjjd�|�}tjj|�r�|j	|�q�nd}tjj|�r�|j	|�nt
r|jdd	j|��n|S(
s�Find as many configuration files as should be processed for this
        platform, and return a list of filenames in the order in which they
        should be parsed.  The filenames returned are guaranteed to exist
        (modulo nasty race conditions).

        There are three possible config files: distutils.cfg in the
        Distutils installation directory (ie. where the top-level
        Distutils __inst__.py file lives), a file in the user's home
        directory named .pydistutils.cfg on Unix and pydistutils.cfg
        on Windows/Mac; and setup.cfg in the current directory.

        The file in the user's home directory can be disabled with the
        --no-user-cfg option.
        t	distutilss
distutils.cfgtposixs.pydistutils.cfgspydistutils.cfgt~s	setup.cfgsusing config files: %ss, (RtostpathtdirnameRNtmodulest__file__tjointisfiletappendRRTt
expanduserRRk(RXtfilestsys_dirtsys_filet
user_filenamet	user_filet
local_file((s&/usr/lib64/python2.7/distutils/dist.pytfind_config_filesIs&		!c
Cs�ddlm}|dkr+|j�}ntrA|jd�n|�}x�|D]�}trq|jd|�n|j|�x�|j�D]x}|j|�}|j|�}xQ|D]I}|dkr�|j	||�}	|j
dd�}||	f||<q�q�Wq�W|j�qQWd|jkr�x�|jdj
�D]�\}\}
}	|jj	|�}yY|rt||t|	��n5|dkr�t||t|	��nt|||	�Wq8tk
r�}t|�q8Xq8WndS(Ni����(tConfigParsers"Distribution.parse_config_files():s  reading %st__name__R+t_tglobalR
R,(R
R,(R�R4R�RRktreadtsectionsR)RKRItreplaceReR8RJtnegative_optR.Rt
ValueErrorR(
RXt	filenamesR�tparsertfilenametsectionR)R_R`RatsrctaliasRb((s&/usr/lib64/python2.7/distutils/dist.pytparse_config_filesys<	


&cCs|j�}g|_t||j�}|j|j�|jidd6�|jd|jd|�}|j	�}t
j|j�|j
|�r�dSx,|r�|j||�}|dkr�dSq�W|jr�|j|dt|j�dkd|j�dS|jstd	�nd
S(s�Parse the setup script's command line, taken from the
        'script_args' instance attribute (which defaults to 'sys.argv[1:]'
        -- see 'setup()' in core.py).  This list is first processed for
        "global options" -- options that set attributes of the Distribution
        instance.  Then, it is alternately scanned for Distutils commands
        and options for that command.  Each new command terminates the
        options for the previous command.  The allowed options for a
        command are determined by the 'user_options' attribute of the
        command class -- thus, we have to be able to load command classes
        in order to parse the command line.  Any error in that 'options'
        attribute raises DistutilsGetoptError; any error on the
        command-line raises DistutilsArgError.  If no Distutils commands
        were found on the command line, raises DistutilsArgError.  Return
        true if command-line was successfully parsed and we should carry
        on with executing commands; false if no errors but we shouldn't
        execute commands (currently, this only happens if user asks for
        help).
        RRtargstobjectNtdisplay_optionsiRnsno commands suppliedi(t_get_toplevel_optionsRnRR�tset_negative_aliasesR�tset_aliasestgetoptR7tget_option_orderR
t
set_verbosityR
thandle_display_optionst_parse_command_optsR4Rt
_show_helptlenR(RXttoplevel_optionsR�R�toption_order((s&/usr/lib64/python2.7/distutils/dist.pytparse_command_line�s,				
	cCs|jdgS(s�Return the non-display options recognized at the top level.

        This includes options that are recognized *only* at the top
        level as well as options recognized for commands.
        scommand-packages=s0list of packages that provide distutils commandsN(scommand-packages=Ns0list of packages that provide distutils commands(tglobal_optionsR4(RX((s&/usr/lib64/python2.7/distutils/dist.pyR��scCs�ddlm}|d}tj|�s9td|�n|jj|�y|j|�}Wntk
rz}t	|�nXt
||�s�td|�nt|d�o�t
|jt�s�tdd|�n|j}t|d	�r|j�}|j|j�nt|d
�r9t
|jt�r9t|j�}ng}|j|j|j|�|j|�|j|d�\}}	t|	d�r�|	jr�|j|d
dd|g�dSt|d
�r\t
|jt�r\d}
xm|jD]b\}}}
}t|	|j|��r�d}
t|d�r2|�qKtd||f��q�q�W|
r\dSn|j|�}x0t|	�j�D]\}}d|f||<q~W|S(s�Parse the command-line options for a single command.
        'parser' must be a FancyGetopt instance; 'args' must be the list
        of arguments, starting with the current command (whose options
        we are about to parse).  Returns a new version of 'args' with
        the next command at the front of the list; will be the empty
        list if there are no more commands on the command line.  Returns
        None if the user asked for help on this command.
        i����(tCommandisinvalid command name '%s's&command class %s must subclass Commandtuser_optionsscommand class %s must provide s+'user_options' attribute (a list of tuples)R�thelp_optionsiRR�RnNt__call__sYinvalid help function %r for help option '%s': must be a callable object (function, etc.)scommand line(t
distutils.cmdR�t
command_retmatcht
SystemExitRnR~tget_command_classRRt
issubclassRRQt
isinstanceR�tlistR�tcopytupdateR�tfix_help_optionstset_option_tableR�R�R�RR�t
get_attr_nameRKtvarsRJ(RXR�R�R�R]t	cmd_classRbR�R�toptsthelp_option_foundthelp_optiontshorttdesctfuncR_Rtvalue((s&/usr/lib64/python2.7/distutils/dist.pyR��sf




	


cCs�xdD]w}t|j|�}|dkr1qnt|t�rg|jd�D]}|j�^qP}t|j||�qqWdS(s�Set final values for all the options on the Distribution
        instance, analogous to the .finalize_options() method of Command
        objects.
        R!Rt,N(R!R(R2R0R4R�tstrRltstripR.(RXRZR�telm((s&/usr/lib64/python2.7/distutils/dist.pyRWRs
(c
Csbddlm}ddlm}|rm|r;|j�}n	|j}|j|�|j|jd�dGHn|r�|j|j	�|jdd�dGHnx�|j
D]�}t|t�r�t
||�r�|}	n|j|�}	t|	d�r#t|	jt�r#|j|	jt|	j��n|j|	j�|jd	|	j�dGHq�W||j�GHd
S(sbShow help for the setup script command-line in the form of
        several lists of command-line options.  'parser' should be a
        FancyGetopt instance; do not expect it to be returned in the
        same state, as its option table will be reset to make it
        generate the correct help text.

        If 'global_options' is true, lists the global options:
        --verbose, --dry-run, etc.  If 'display_options' is true, lists
        the "display-only" options: --name, --version, etc.  Finally,
        lists per-command help for every command name or command class
        in 'commands'.
        i����(t	gen_usage(R�s
Global options:R's*Information display options (just display s!information, ignore any commands)R�sOptions for '%s' command:N(tdistutils.coreR�R�R�R�R�R�t
print_helptcommon_usageR�RnR�ttypeR�R�RQR�R�R�R�R�R6(
RXR�R�R�RnR�R�R)R]tklass((s&/usr/lib64/python2.7/distutils/dist.pyR�_s6	
		c	Csddlm}|jr:|j�dGH||j�GHdSd}i}x|jD]}d||d<qPWx�|D]�\}}|ro|j|�rot|�}t|j	d|��}|dkr�d	j
|�GHn"|dkr�dj
|�GHn|GHd}qoqoW|S(s�If there were any non-global "display-only" options
        (--help-commands or the metadata display options) on the command
        line, display the requested info and return true; else return
        false.
        i����(R�R'iiR(R!RR�R R"R#R$s
(R!R(R R"R#R$(R�R�t
help_commandstprint_commandsR6R�RIRR2R0R|(	RXR�R�tany_display_optionstis_display_optiontoptionR`RaR�((s&/usr/lib64/python2.7/distutils/dist.pyR��s,	
	
cCs�|dGHxq|D]i}|jj|�}|s@|j|�}ny
|j}Wntk
rfd}nXd|||fGHqWdS(sZPrint a subset of the list of all commands -- used by
        'print_commands()'.
        t:s(no description available)s
  %-*s  %sN(R3RIR�RtAttributeError(RXRnRmt
max_lengthtcmdR�R((s&/usr/lib64/python2.7/distutils/dist.pytprint_command_list�s	



cCs�ddl}|jj}i}x|D]}d||<q%Wg}x6|jj�D]%}|j|�sO|j|�qOqOWd}x3||D]'}t|�|kr�t|�}q�q�W|j|d|�|r�H|j|d|�ndS(snPrint out a help message listing all available commands with a
        description of each.  The list is divided into "standard commands"
        (listed in distutils.command.__all__) and "extra commands"
        (mentioned in self.cmdclass, but not a standard command).  The
        descriptions come from the command class attribute
        'description'.
        i����NiisStandard commandssExtra commands(	tdistutils.commandR]t__all__R3RiRIR~R�R�(RXRttstd_commandstis_stdR�textra_commandsR�((s&/usr/lib64/python2.7/distutils/dist.pyR��s*
		c	Cs�ddl}|jj}i}x|D]}d||<q%Wg}x6|jj�D]%}|j|�sO|j|�qOqOWg}xv||D]j}|jj|�}|s�|j|�}ny
|j}Wnt	k
r�d}nX|j||f�q�W|S(s>Get a list of (command, description) tuples.
        The list is divided into "standard commands" (listed in
        distutils.command.__all__) and "extra commands" (mentioned in
        self.cmdclass, but not a standard command).  The descriptions come
        from the command class attribute 'description'.
        i����Nis(no description available)(
R�R]R�R3RiRIR~R�RR�(	RXRtR�R�R�R�trvR�R((s&/usr/lib64/python2.7/distutils/dist.pytget_command_list�s(




cCs�|j}t|t�s�|dkr-d}ng|jd�D]}|dkr=|j�^q=}d|kr�|jdd�n||_n|S(s9Return a list of packages from which commands are loaded.R'R�sdistutils.commandiN(R5R�R�R4RlR�tinsert(RXtpkgstpkg((s&/usr/lib64/python2.7/distutils/dist.pytget_command_packagess		4cCs�|jj|�}|r|Sx�|j�D]�}d||f}|}yt|�tj|}Wntk
rvq)nXyt||�}Wn'tk
r�t	d|||f�nX||j|<|SWt	d|��dS(soReturn the class that implements the Distutils command named by
        'command'.  First we check the 'cmdclass' dictionary; if the
        command is mentioned there, we fetch the class object from the
        dictionary and return it.  Otherwise we load the command module
        ("distutils.command." + command) and fetch the command class from
        the module.  The loaded class is also stored in 'cmdclass'
        to speed future calls to 'get_command_class()'.

        Raises DistutilsModuleError if the expected module could not be
        found, or if that module does not define the expected class.
        s%s.%ss3invalid command '%s' (no class '%s' in module '%s')sinvalid command '%s'N(
R3RIR�t
__import__RNRztImportErrorR2R�R(RXR]R�tpkgnametmodule_namet
klass_nametmodule((s&/usr/lib64/python2.7/distutils/dist.pyR�s(



cCs�|jj|�}|r�|r�tr9|jd|�n|j|�}||�}|j|<d|j|<|jj|�}|r�|j||�q�n|S(sReturn the command object for 'command'.  Normally this object
        is cached on a previous call to 'get_command_obj()'; if no command
        object for 'command' is in the cache, then we either create and
        return it (if 'create' is true) or return None.
        s<Distribution.get_command_obj(): creating '%s' command objecti(RGRIRRkR�RHR8t_set_command_options(RXR]tcreatetcmd_objR�R)((s&/usr/lib64/python2.7/distutils/dist.pytget_command_objAs
	
cCs�|j�}|dkr*|j|�}ntrD|jd|�nx_|j�D]Q\}\}}tr�|jd|||f�nytt|j�}Wnt	k
r�g}nXy
|j
}Wnt	k
r�i}nXy�t|t�}	||kr|	rt
|||t|��nc||krJ|	rJt
||t|��n8t||�rlt
|||�ntd|||f�WqQtk
r�}
t|
�qQXqQWdS(sySet the options for 'command_obj' from 'option_dict'.  Basically
        this means copying elements of a dictionary ('option_dict') to
        attributes of an instance ('command').

        'command_obj' must be a Command instance.  If 'option_dict' is not
        supplied, uses the standard option dictionary for this command
        (from 'self.command_options').
        s#  setting options for '%s' command:s    %s = %s (from %s)s1error in %s: command '%s' has no such option '%s'N(tget_command_nameR4RKRRkRJtmapRtboolean_optionsR�R�R�R�R.RRQRR�(RXRGtoption_dicttcommand_nameR�tsourceR�t	bool_optstneg_optt	is_stringRb((s&/usr/lib64/python2.7/distutils/dist.pyR�\s<	




icCs�ddlm}t||�s7|}|j|�}n|j�}|jsP|S|j�d|_d|j|<|j|�|r�x'|j	�D]}|j
||�q�Wn|S(s�Reinitializes a command to the state it was in when first
        returned by 'get_command_obj()': ie., initialized but not yet
        finalized.  This provides the opportunity to sneak option
        values in programmatically, overriding or supplementing
        user-supplied values from the config files and command line.
        You'll have to re-finalize the command object (by calling
        'finalize_options()' or 'ensure_finalized()') before using it for
        real.

        'command' should be a command name (string) or command object.  If
        'reinit_subcommands' is true, also reinitializes the command's
        sub-commands, as declared by the 'sub_commands' class attribute (if
        it has one).  See the "install" command for an example.  Only
        reinitializes the sub-commands that actually matter, ie. those
        whose test predicates return true.

        Returns the reinitialized command object.
        i����(R�i(R�R�R�R�R�t	finalizedtinitialize_optionsRHR�tget_sub_commandstreinitialize_command(RXR]treinit_subcommandsR�R�tsub((s&/usr/lib64/python2.7/distutils/dist.pyR��s	
	

cCstj||�dS(N(R
(RXRbtlevel((s&/usr/lib64/python2.7/distutils/dist.pyRk�scCs%x|jD]}|j|�q
WdS(s�Run each command that was seen on the setup script command line.
        Uses the list of commands found and cache of command objects
        created by 'get_command_obj()'.
        N(Rntrun_command(RXR�((s&/usr/lib64/python2.7/distutils/dist.pytrun_commands�scCsZ|jj|�rdStjd|�|j|�}|j�|j�d|j|<dS(s�Do whatever it takes to run a command (including nothing at all,
        if the command has already been run).  Specifically: if we have
        already created and run the command named by 'command', return
        silently without doing anything.  If the command named by 'command'
        doesn't even have a command object yet, create one.  Then invoke
        'run()' on that command object (or an existing one).
        Ns
running %si(RHRIR
tinfoR�tensure_finalizedtrun(RXR]R�((s&/usr/lib64/python2.7/distutils/dist.pyR��s	

cCs"t|jp|jpg�dkS(Ni(R�R:R=(RX((s&/usr/lib64/python2.7/distutils/dist.pythas_pure_modules�scCs|jot|j�dkS(Ni(R@R�(RX((s&/usr/lib64/python2.7/distutils/dist.pythas_ext_modules�scCs|jot|j�dkS(Ni(R>R�(RX((s&/usr/lib64/python2.7/distutils/dist.pythas_c_libraries�scCs|j�p|j�S(N(RR(RX((s&/usr/lib64/python2.7/distutils/dist.pythas_modules�scCs|jot|j�dkS(Ni(R?R�(RX((s&/usr/lib64/python2.7/distutils/dist.pythas_headers�scCs|jot|j�dkS(Ni(RDR�(RX((s&/usr/lib64/python2.7/distutils/dist.pythas_scripts�scCs|jot|j�dkS(Ni(RER�(RX((s&/usr/lib64/python2.7/distutils/dist.pythas_data_files�scCs$|j�o#|j�o#|j�S(N(RRR(RX((s&/usr/lib64/python2.7/distutils/dist.pytis_pure�s
(R
Rsrun verbosely (default)i(RRs!run quietly (turns verbosity off)(sdry-runRsdon't actually do anything(RRsshow detailed help messageN(sno-user-cfgNs-ignore pydistutils.cfg in your home directory(s
help-commandsNslist all available commands(RNsprint package name(RRsprint package version(RNsprint <package name>-<version>(RNsprint the author's name(sauthor-emailNs print the author's email address(RNsprint the maintainer's name(smaintainer-emailNs$print the maintainer's email address(RNs7print the maintainer's name if known, else the author's(s
contact-emailNs@print the maintainer's email address if known, else the author's(RNsprint the URL for this package(RNs print the license of the package(RNsalias for --license(RNsprint the package description(slong-descriptionNs"print the long package description(RNsprint the list of platforms(R Nsprint the list of classifiers(R!Nsprint the list of keywords(R"Ns+print the list of packages/modules provided(R#Ns+print the list of packages/modules required(R$Ns0print the list of packages/modules made obsolete(*R�t
__module__t__doc__R4R�R�R�R�R-R�ReRKRsR�R�R�R�R�RWR�R�R�R�R�R�R�R�R�R�R
tINFORkR�R�RRRRRRRR(((s&/usr/lib64/python2.7/distutils/dist.pyR"s�	
			
�		0.	C		]	
1	(		!	#		'+)	
								R/cBs+eZdZd3Zd4d�Zd�Zd�Zd�Zd�Z	d�Z
d�Zd�Zd�Z
d�Zd�Zd �Zd!�Zd"�Zd#�Zd$�Zd%�Zd&�ZeZd'�Zd(�Zd)�Zd*�Zd+�Zd,�Zd-�Zd.�Zd/�Z d0�Z!d1�Z"d2�Z#RS(5s]Dummy class to hold the distribution meta-data: name, version,
    author, and so forth.
    RRRtauthor_emailRtmaintainer_emailRRRtlong_descriptionR!RRRt
contact_emailR tdownload_urlR"R#R$cCs�|dk	r"|jt|��n�d|_d|_d|_d|_d|_d|_d|_	d|_
d|_d|_d|_
d|_d|_d|_d|_d|_d|_dS(N(R4t
read_pkg_filetopenRRRRRRRRRR
R!RR RR"R#R$(RXRx((s&/usr/lib64/python2.7/distutils/dist.pyRes&																cs�t|���fd�}�fd�}�d}|d�|_|d�|_|d�|_|d�|_d|_|d�|_d|_|d	�|_	|d
�|_
d�kr�|d�|_n	d|_|d�|_|d�|_d
�kr|d
�j
d�|_n|d�|_|d�|_|dkru|d�|_|d�|_|d�|_nd|_d|_d|_dS(s-Reads the metadata values from a file object.cs�|}|dkrdS|S(NtUNKNOWN(R4(RR�(Rb(s&/usr/lib64/python2.7/distutils/dist.pyt_read_fields
cs&�j|d�}|gkr"dS|S(N(tget_allR4(Rtvalues(Rb(s&/usr/lib64/python2.7/distutils/dist.pyt
_read_list#ssmetadata-versionRRtsummaryRsauthor-emails	home-pageRsdownload-urlRR!R�tplatformt
classifiers1.1R#R"R$N(RRRRRR4RRRRRRR
RlR!RR R#R"R$(RXtfileRRtmetadata_version((Rbs&/usr/lib64/python2.7/distutils/dist.pyRs:
					cCsAttjj|d�d�}z|j|�Wd|j�XdS(s7Write the PKG-INFO file into the release tree.
        sPKG-INFOtwN(RRwRxR|twrite_pkg_filetclose(RXtbase_dirtpkg_info((s&/usr/lib64/python2.7/distutils/dist.pytwrite_pkg_infoMscCs�d}|js3|js3|js3|js3|jr<d}n|j|d|�|j|d|j��|j|d|j��|j|d|j��|j|d|j	��|j|d|j
��|j|d	|j��|j|d
|j��|jr |j|d|j�nt
|j��}|j|d|�d
j|j��}|rv|j|d|�n|j|d|j��|j|d|j��|j|d|j��|j|d|j��|j|d|j��dS(s9Write the PKG-INFO format data to a file object.
        s1.0s1.1sMetadata-VersiontNametVersiontSummarys	Home-pagetAuthorsAuthor-emailtLicensesDownload-URLtDescriptionR�tKeywordstPlatformt
ClassifiertRequirestProvidest	ObsoletesN(R"R#R$R Rt_write_fieldtget_nametget_versiontget_descriptiontget_urltget_contacttget_contact_emailtget_licenseR	tget_long_descriptionR|tget_keywordst_write_listt
get_platformstget_classifierstget_requirestget_providest
get_obsoletes(RXRRt	long_descR!((s&/usr/lib64/python2.7/distutils/dist.pyRVs0		cCs$|jd||j|�f�dS(Ns%s: %s
(RPt
_encode_field(RXRRR�((s&/usr/lib64/python2.7/distutils/dist.pyR.xscCs(x!|D]}|j|||�qWdS(N(R.(RXRRRR�((s&/usr/lib64/python2.7/distutils/dist.pyR8{s
cCs6|dkrdSt|t�r,|jt�St|�S(N(R4R�tunicodetencodetPKG_INFO_ENCODINGR�(RXR�((s&/usr/lib64/python2.7/distutils/dist.pyR?s

cCs
|jpdS(NR(R(RX((s&/usr/lib64/python2.7/distutils/dist.pyR/�scCs
|jpdS(Ns0.0.0(R(RX((s&/usr/lib64/python2.7/distutils/dist.pyR0�scCsd|j�|j�fS(Ns%s-%s(R/R0(RX((s&/usr/lib64/python2.7/distutils/dist.pytget_fullname�scCs|j|j�pdS(NR(R?R(RX((s&/usr/lib64/python2.7/distutils/dist.pyt
get_author�scCs
|jpdS(NR(R(RX((s&/usr/lib64/python2.7/distutils/dist.pytget_author_email�scCs|j|j�pdS(NR(R?R(RX((s&/usr/lib64/python2.7/distutils/dist.pytget_maintainer�scCs
|jpdS(NR(R(RX((s&/usr/lib64/python2.7/distutils/dist.pytget_maintainer_email�scCs(|j|j�p'|j|j�p'dS(NR(R?RR(RX((s&/usr/lib64/python2.7/distutils/dist.pyR3�scCs|jp|jpdS(NR(RR(RX((s&/usr/lib64/python2.7/distutils/dist.pyR4�scCs
|jpdS(NR(R(RX((s&/usr/lib64/python2.7/distutils/dist.pyR2�scCs
|jpdS(NR(R(RX((s&/usr/lib64/python2.7/distutils/dist.pyR5�scCs|j|j�pdS(NR(R?R(RX((s&/usr/lib64/python2.7/distutils/dist.pyR1�scCs|j|j�pdS(NR(R?R
(RX((s&/usr/lib64/python2.7/distutils/dist.pyR6�scCs
|jpgS(N(R!(RX((s&/usr/lib64/python2.7/distutils/dist.pyR7�scCs|jpdgS(NR(R(RX((s&/usr/lib64/python2.7/distutils/dist.pyR9�scCs
|jpgS(N(R (RX((s&/usr/lib64/python2.7/distutils/dist.pyR:�scCs
|jpdS(NR(R(RX((s&/usr/lib64/python2.7/distutils/dist.pytget_download_url�scCs
|jpgS(N(R#(RX((s&/usr/lib64/python2.7/distutils/dist.pyR;�scCs:ddl}x|D]}|jj|�qW||_dS(Ni����(tdistutils.versionpredicatetversionpredicatetVersionPredicateR#(RXR�RtR((s&/usr/lib64/python2.7/distutils/dist.pytset_requires�s
cCs
|jpgS(N(R"(RX((s&/usr/lib64/python2.7/distutils/dist.pyR<�scCsYg|D]}|j�^q}x*|D]"}ddl}|jj|�q&W||_dS(Ni����(R�RIRJtsplit_provisionR"(RXR�RRt((s&/usr/lib64/python2.7/distutils/dist.pytset_provides�s

cCs
|jpgS(N(R$(RX((s&/usr/lib64/python2.7/distutils/dist.pyR=�scCs:ddl}x|D]}|jj|�qW||_dS(Ni����(RIRJRKR$(RXR�RtR((s&/usr/lib64/python2.7/distutils/dist.pyt
set_obsoletes�s
(RRRRRRRRRR
R!RRRRRR RR"R#R$N($R�RR	R1R4ReRR!RR.R8R?R/R0RCRDRERFRGR3R4R2R5tget_licenceR1R6R7R9R:RHR;RLR<RNR=RO(((s&/usr/lib64/python2.7/distutils/dist.pyR/�sN	4			"																										cCs/g}x"|D]}|j|dd!�q
W|S(sConvert a 4-tuple 'help_options' list as found in various command
    classes to the 3-tuple form required by FancyGetopt.
    ii(R~(R)tnew_optionst
help_tuple((s&/usr/lib64/python2.7/distutils/dist.pyR��s
( R	t__revision__RNRwtretemailRRLR�R4tdistutils.errorsRRRRtdistutils.fancy_getoptRRtdistutils.utilRRR	RtR
tdistutils.debugRRBtcompileR�RR/R�(((s&/usr/lib64/python2.7/distutils/dist.pyt<module>s($

"�����PKW[�Y�*((version.pyonu�[����
{fc@sqdZddlZddlZddlmZdd
d��YZdefd��YZdefd	��YZdS(s�Provides classes to represent module version numbers (one class for
each style of version numbering).  There are currently two such classes
implemented: StrictVersion and LooseVersion.

Every version number class implements the following interface:
  * the 'parse' method takes a string and parses it to some internal
    representation; if the string is an invalid version number,
    'parse' raises a ValueError exception
  * the class constructor takes an optional string argument which,
    if supplied, is passed to 'parse'
  * __str__ reconstructs the string that was passed to 'parse' (or
    an equivalent string -- ie. one that will generate an equivalent
    version number instance)
  * __repr__ generates Python code to recreate the version number instance
  * __cmp__ compares the current instance with either another instance
    of the same class or a string (which will be parsed to an instance
    of the same class, thus must follow the same rules)
i����N(t
StringTypetVersioncBs#eZdZdd�Zd�ZRS(s�Abstract base class for version numbering classes.  Just provides
    constructor (__init__) and reproducer (__repr__), because those
    seem to be the same for all version numbering classes.
    cCs|r|j|�ndS(N(tparse(tselftvstring((s)/usr/lib64/python2.7/distutils/version.pyt__init__&scCsd|jjt|�fS(Ns	%s ('%s')(t	__class__t__name__tstr(R((s)/usr/lib64/python2.7/distutils/version.pyt__repr__*sN(Rt
__module__t__doc__tNoneRR	(((s)/usr/lib64/python2.7/distutils/version.pyR st
StrictVersioncBs>eZdZejdej�Zd�Zd�Zd�Z	RS(s?Version numbering for anal retentives and software idealists.
    Implements the standard interface for version number classes as
    described above.  A version number consists of two or three
    dot-separated numeric components, with an optional "pre-release" tag
    on the end.  The pre-release tag consists of the letter 'a' or 'b'
    followed by a number.  If the numeric components of two version
    numbers are equal, then one with a pre-release tag will always
    be deemed earlier (lesser) than one without.

    The following are valid version numbers (shown in the order that
    would be obtained by sorting according to the supplied cmp function):

        0.4       0.4.0  (these two are equivalent)
        0.4.1
        0.5a1
        0.5b3
        0.5
        0.9.6
        1.0
        1.0.4a3
        1.0.4b1
        1.0.4

    The following are examples of invalid version numbers:

        1
        2.7.2.2
        1.3.a4
        1.3pl1
        1.3c4

    The rationale for this version numbering system will be explained
    in the distutils documentation.
    s)^(\d+) \. (\d+) (\. (\d+))? ([ab](\d+))?$cCs�|jj|�}|s(td|�n|jddddd�\}}}}}|rtttj|||g��|_n(tttj||g�dg�|_|r�|dtj|�f|_	n	d|_	dS(Nsinvalid version number '%s'iiiiii(t
version_retmatcht
ValueErrortgroupttupletmaptstringtatoitversiont
prereleaseR(RRRtmajortminortpatchRtprerelease_num((s)/usr/lib64/python2.7/distutils/version.pyRhs*'(cCs�|jddkr;tjtt|jdd!�d�}ntjtt|j�d�}|jr�||jdt|jd�}n|S(Niit.i(RRtjoinRRR(RR((s)/usr/lib64/python2.7/distutils/version.pyt__str__{s(	%cCs�t|t�rt|�}nt|j|j�}|dkr�|jrW|jrWdS|jrn|jrndS|jr�|jr�dS|jr�|jr�t|j|j�Sn|SdS(Nii����i(t
isinstanceRR
tcmpRR(Rtothertcompare((s)/usr/lib64/python2.7/distutils/version.pyt__cmp__�s(
RR
RtretcompiletVERBOSERRRR#(((s)/usr/lib64/python2.7/distutils/version.pyR
?s#			
tLooseVersioncBsSeZdZejdej�Zdd�Zd�Z	d�Z
d�Zd�ZRS(s�Version numbering for anarchists and software realists.
    Implements the standard interface for version number classes as
    described above.  A version number consists of a series of numbers,
    separated by either periods or strings of letters.  When comparing
    version numbers, the numeric components will be compared
    numerically, and the alphabetic components lexically.  The following
    are all valid version numbers, in no particular order:

        1.5.1
        1.5.2b2
        161
        3.10a
        8.02
        3.4j
        1996.07.12
        3.2.pl0
        3.1.1.6
        2g6
        11g
        0.960923
        2.2beta29
        1.13++
        5.5.kw
        2.0b1pl0

    In fact, there is no such thing as an invalid version number under
    this scheme; the rules for comparison are simple and predictable,
    but may not always give the results you want (for some definition
    of "want").
    s(\d+ | [a-z]+ | \.)cCs|r|j|�ndS(N(R(RR((s)/usr/lib64/python2.7/distutils/version.pyRscCs}||_td�|jj|��}xFtt|��D]2}yt||�||<Wq:tk
rkq:Xq:W||_dS(NcSs|o|dkS(NR((tx((s)/usr/lib64/python2.7/distutils/version.pyt<lambda>t(	Rtfiltertcomponent_retsplittrangetlentintRR(RRt
componentsti((s)/usr/lib64/python2.7/distutils/version.pyRs		
cCs|jS(N(R(R((s)/usr/lib64/python2.7/distutils/version.pyRscCsdt|�S(NsLooseVersion ('%s')(R(R((s)/usr/lib64/python2.7/distutils/version.pyR	 scCs1t|t�rt|�}nt|j|j�S(N(RRR'R R(RR!((s)/usr/lib64/python2.7/distutils/version.pyR#$sN(
RR
RR$R%R&R,RRRRR	R#(((s)/usr/lib64/python2.7/distutils/version.pyR'�s			((RRR$ttypesRRR
R'(((s)/usr/lib64/python2.7/distutils/version.pyt<module>s
�PKW[;�(�2828util.pycnu�[����
{fc@s1dZdZddlZddlZddlZddlZddlmZddlm	Z	ddl
mZddlm
Z
ddlmZd	�Zd
�Zd�Zdad
�Zd�Zdd�Zdaaad�Zd�Zdddd�Zd�Zdddddddd�Zd�ZdS(sudistutils.util

Miscellaneous utility functions -- anything that doesn't fit into
one of the other *util.py modules.
s$Id$i����N(tDistutilsPlatformError(tnewer(tspawn(tlog(tDistutilsByteCompileErrorcCs�tjdkr�d}tjtj|�}|dkr=tjStjtjd|�}tj|t|�|!j�}|dkr�dS|dkr�dStjSd	tj	kr�tj	d	Stjd
ks�t
td�r�tjStj�\}}}}}tj|�}tj|dd
�}tj|dd�}tj|dd�}|d dkrcd||fS|d dkr�|ddkr�d}dt
|d�d|df}idd6dd6}	|d|	tj7}q�n�|d  d!kr�d||fS|d d"krd#|||fS|d$ d%kred%}tjd&�}
|
j|�}|r�|j�}q�nU|d$ d'kr�dd(l}dd(l}
|j|
jj�|||�\}}}nd)|||fS(*s�Return a string that identifies the current platform.  This is used
    mainly to distinguish platform-specific build directories and
    platform-specific built distributions.  Typically includes the OS name
    and version and the architecture (as supplied by 'os.uname()'),
    although the exact information included depends on the OS; eg. for IRIX
    the architecture isn't particularly important (IRIX only runs on SGI
    hardware), but for Linux the kernel version isn't particularly
    important.

    Examples of returned values:
       linux-i586
       linux-alpha (?)
       solaris-2.6-sun4u
       irix-5.3
       irix64-6.2

    Windows will return one of:
       win-amd64 (64bit Windows on AMD64 (aka x86_64, Intel64, EM64T, etc)
       win-ia64 (64bit Windows on Itanium)
       win32 (all others - specifically, sys.platform is returned)

    For other non-POSIX platforms, currently just returns 'sys.platform'.
    tnts bit (i����t)tamd64s	win-amd64titaniumswin-ia64t_PYTHON_HOST_PLATFORMtposixtunamet/tt t_t-itlinuxs%s-%stsunosit5tsolariss%d.%siit32biti���t64bitI�������s.%sitirixtaixs%s-%s.%sitcygwins[\d.]+tdarwinNs%s-%s-%s(tostnametstringtfindtsystversiontplatformtlentlowertenvironthasattrRtreplacetinttmaxinttretcompiletmatchtgroupt_osx_supporttdistutils.sysconfigtget_platform_osxt	sysconfigtget_config_vars(tprefixtitjtlooktosnamethosttreleaseR tmachinetbitnesstrel_retmR-t	distutils((s&/usr/lib64/python2.7/distutils/util.pytget_platformsZ "cCs�tjdkr|S|s|S|ddkr=td|�n|ddkr]td|�ntj|d�}xd|kr�|jd�qrW|s�tjStjj|�S(s�Return 'pathname' as a name that will work on the native filesystem,
    i.e. split it on '/' and put it back together again using the current
    directory separator.  Needed because filenames in the setup script are
    always supplied in Unix style, and have to be converted to the local
    convention before we can actually use them in the filesystem.  Raises
    ValueError on non-Unix-ish systems if 'pathname' either starts or
    ends with a slash.
    Rispath '%s' cannot be absolutei����spath '%s' cannot end with '/'t.(	Rtsept
ValueErrorRtsplittremovetcurdirtpathtjoin(tpathnametpaths((s&/usr/lib64/python2.7/distutils/util.pytconvert_pathns	cCstjdkrNtjj|�s4tjj||�Stjj||d�Sn�tjdkr�tjj|�\}}|ddkr�|d}ntjj||�Stjdkr�tjj|�\}}|dtjkr�|d}ntjj||�Stdtj�dS(	s	Return 'pathname' with 'new_root' prepended.  If 'pathname' is
    relative, this is equivalent to "os.path.join(new_root,pathname)".
    Otherwise, it requires making 'pathname' relative and then joining the
    two, which is tricky on DOS/Windows and Mac OS.
    R
iRis\tos2s!nothing known about platform '%s'N(RRREtisabsRFt
splitdriveR@R(tnew_rootRGtdriveRE((s&/usr/lib64/python2.7/distutils/util.pytchange_root�s 

icCs�tr
dStjdkrudtjkruy0ddl}|jtj��dtjd<Wquttfk
rqquXndtjkr�t	�tjd<ndadS(sLEnsure that 'os.environ' has all the environment variables we
    guarantee that users can use in config files, command-line options,
    etc.  Currently this includes:
      HOME - user's home directory (Unix only)
      PLAT - description of the current platform, including hardware
             and OS (see 'get_platform()')
    NR
tHOMEi����itPLATi(
t_environ_checkedRRR$tpwdtgetpwuidtgetuidtImportErrortKeyErrorR>(RS((s&/usr/lib64/python2.7/distutils/util.pyt
check_environ�s	$cCsQt�|d�}ytjd||�SWn tk
rL}td|�nXdS(s�Perform shell/Perl-style variable substitution on 'string'.  Every
    occurrence of '$' followed by a name is considered a variable, and
    variable is substituted by the value found in the 'local_vars'
    dictionary, or in 'os.environ' if it's not in 'local_vars'.
    'os.environ' is first checked/augmented to guarantee that it contains
    certain values: see 'check_environ()'.  Raise ValueError for any
    variables not found in either 'local_vars' or 'os.environ'.
    cSs8|jd�}||kr)t||�Stj|SdS(Ni(R,tstrRR$(R+t
local_varstvar_name((s&/usr/lib64/python2.7/distutils/util.pyt_subst�ss\$([a-zA-Z_][a-zA-Z_0-9]*)sinvalid variable '$%s'N(RXR)tsubRWRA(tsRZR\tvar((s&/usr/lib64/python2.7/distutils/util.pyt
subst_vars�s	serror: cCs|t|�S(N(RY(texcR2((s&/usr/lib64/python2.7/distutils/util.pytgrok_environment_error�scCs8tjdtj�atjd�atjd�adS(Ns
[^\\\'\"%s ]*s'(?:[^'\\]|\\.)*'s"(?:[^"\\]|\\.)*"(R)R*Rt
whitespacet
_wordchars_ret
_squote_ret
_dquote_re(((s&/usr/lib64/python2.7/distutils/util.pyt_init_regex�scCs�td	krt�ntj|�}g}d}x�|r�tj||�}|j�}|t|�kr|j|| �Pn||tj	kr�|j|| �tj
||�}d}n�||dkr�|| ||d}|d}n�||dkrtj||�}n6||dkr<tj||�}nt
d||�|d	krmtd||�n|j�\}}|| ||d|d!||}|j�d}|t|�kr4|j|�Pq4q4W|S(
sSplit a string up according to Unix shell-like rules for quotes and
    backslashes.  In short: words are delimited by spaces, as long as those
    spaces are not escaped by a backslash, or inside a quoted string.
    Single and double quotes are equivalent, and the quote characters can
    be backslash-escaped.  The backslash is stripped from any two-character
    escape sequence, leaving only the escaped character.  The quote
    characters are stripped from any quoted string.  Returns a list of
    words.
    is\it't"s!this can't happen (bad char '%c')s"bad string (mismatched %s quotes?)iN(RdtNoneRgRtstripR+tendR"tappendRctlstripReRftRuntimeErrorRAtspan(R^twordstposR<Rltbeg((s&/usr/lib64/python2.7/distutils/util.pytsplit_quoted�sD
		
%
cCsj|dkrFd|j|f}|ddkrF|dd!d}qFntj|�|sf||�ndS(s�Perform some action that affects the outside world (eg.  by
    writing to the filesystem).  Such actions are special because they
    are disabled by the 'dry_run' flag.  This method takes care of all
    that bureaucracy for you; all you have to do is supply the
    function to call and an argument tuple for it (to embody the
    "external action" being performed), and an optional message to
    print.
    s%s%ri����s,)iRN(Rjt__name__Rtinfo(tfunctargstmsgtverbosetdry_run((s&/usr/lib64/python2.7/distutils/util.pytexecute*s	
cCsCtj|�}|dkrdS|dkr/dStd|f�dS(s�Convert a string representation of truth to true (1) or false (0).

    True values are 'y', 'yes', 't', 'true', 'on', and '1'; false values
    are 'n', 'no', 'f', 'false', 'off', and '0'.  Raises ValueError if
    'val' is anything else.
    tytyesttttruetont1itntnotftfalsetofft0isinvalid truth value %rN(R}R~RR�R�R�(R�R�R�R�R�R�(RR#RA(tval((s&/usr/lib64/python2.7/distutils/util.pyt	strtobool=sicCs�tjrtd��n|dkr9to3|dk}n|s�y&ddlm}|d�\}	}
Wn4tk
r�ddlm}d|d�}	}
nXt	j
d|
�|sB|	dk	r�tj|	d�}nt
|
d�}|jd	�|jtjtt|�d
�d�|jd|||||f�|j�ntj|
g}
|d
krp|
jd
d�n|dkr�|
jd
d�nt|
d|�ttj|
fd|
d|�n(ddlm}x|D]
}|ddkr�q�n|trdpd}|}|rV|t|� |krCtd||f�n|t|�}n|rttjj||�}ntjj|�}|r�|s�t||�r�t	j
d||�|s�||||�q�q�t	j d||�q�q�WdS(s�Byte-compile a collection of Python source files to either .pyc
    or .pyo files in the same directory.  'py_files' is a list of files
    to compile; any files that don't end in ".py" are silently skipped.
    'optimize' must be one of the following:
      0 - don't optimize (generate .pyc)
      1 - normal optimization (like "python -O")
      2 - extra optimization (like "python -OO")
    If 'force' is true, all files are recompiled regardless of
    timestamps.

    The source filename encoded in each bytecode file defaults to the
    filenames listed in 'py_files'; you can modify these with 'prefix' and
    'basedir'.  'prefix' is a string that will be stripped off of each
    source filename, and 'base_dir' is a directory name that will be
    prepended (after 'prefix' is stripped).  You can supply either or both
    (or neither) of 'prefix' and 'base_dir', as you wish.

    If 'dry_run' is true, doesn't actually do anything that would
    affect the filesystem.

    Byte-compilation is either done directly in this interpreter process
    with the standard py_compile module, or indirectly by writing a
    temporary script and executing it.  Normally, you should let
    'byte_compile()' figure out to use direct compilation or not (see
    the source for details).  The 'direct' flag is used by the script
    generated in indirect mode; unless you know what you're doing, leave
    it set to None.
    sbyte-compiling is disabled.ii����(tmkstemps.py(tmktemps$writing byte-compilation script '%s'tws2from distutils.util import byte_compile
files = [
s,
s]
s�
byte_compile(files, optimize=%r, force=%r,
             prefix=%r, base_dir=%r,
             verbose=%r, dry_run=0,
             direct=1)
is-Ois-OOR{sremoving %s(R*i����tctos1invalid prefix: filename %r doesn't start with %rsbyte-compiling %s to %ss%skipping byte-compilation of %s to %sN(!Rtdont_write_bytecodeRRjt	__debug__ttempfileR�RVR�RRvRtfdopentopentwriteRRFtmaptreprtcloset
executabletinsertRR|RCt
py_compileR*R"RAREtbasenameRtdebug(tpy_filestoptimizetforceR2tbase_dirRzR{tdirectR�t	script_fdtscript_nameR�tscripttcmdR*tfiletcfiletdfilet
cfile_base((s&/usr/lib64/python2.7/distutils/util.pytbyte_compileMsh"	
&


	cCs,tj|d�}tj|dd�}|S(s�Return a version of the string escaped for inclusion in an
    RFC-822 header, by ensuring there are 8 spaces space after each newline.
    s
iRs        (RRBRF(theadertlines((s&/usr/lib64/python2.7/distutils/util.pyt
rfc822_escape�s( t__doc__t__revision__RRRR)tdistutils.errorsRtdistutils.dep_utilRtdistutils.spawnRR=RRR>RIRORRRXR`RbRjRdReRfRgRtR|R�R�R�(((s&/usr/lib64/python2.7/distutils/util.pyt<module>s00	^						?	�PKW[5㑂�dir_util.pyonu�[����
{fc@s�dZdZddlZddlZddlmZmZddlmZia	dddd	�Z
dddd
�Zddddddd�Zd�Z
ddd
�Zd�ZdS(sWdistutils.dir_util

Utility functions for manipulating directories and directory trees.s$Id$i����N(tDistutilsFileErrortDistutilsInternalError(tlogi�iicCs�t|t�s"td|f�ntjj|�}g}tjj|�sX|dkr\|Stjtjj	|��r{|Stjj
|�\}}|g}xK|r�|r�tjj|�r�tjj
|�\}}|jd|�q�Wx�|D]�}tjj||�}tjj	|�}	tj|	�r3q�n|dkrRt
jd|�n|s�ytj||�WnWtk
r�}
|
jtjko�tjj|�s�td||
jdf��q�nX|j|�ndt|	<q�W|S(s�Create a directory and any missing ancestor directories.

    If the directory already exists (or if 'name' is the empty string, which
    means the current directory, which of course exists), then do nothing.
    Raise DistutilsFileError if unable to create some directory along the way
    (eg. some sub-path exists, but is a file rather than a directory).
    If 'verbose' is true, print a one-line summary of each mkdir to stdout.
    Return the list of directories actually created.
    s(mkpath: 'name' must be a string (got %r)tiiscreating %sscould not create '%s': %si����(t
isinstancet
basestringRtostpathtnormpathtisdirt
_path_createdtgettabspathtsplittinserttjoinRtinfotmkdirtOSErrorterrnotEEXISTRtargstappend(tnametmodetverbosetdry_runtcreated_dirstheadttailttailstdtabs_headtexc((s*/usr/lib64/python2.7/distutils/dir_util.pytmkpaths>	"
$!c	Cs�i}x3|D]+}d|tjj|tjj|��<q
W|j�}|j�x'|D]}t||d|d|�qYWdS(s�Create all the empty directories under 'base_dir' needed to put 'files'
    there.

    'base_dir' is just the name of a directory which doesn't necessarily
    exist yet; 'files' is a list of filenames to be interpreted relative to
    'base_dir'.  'base_dir' + the directory portion of every file in 'files'
    will be created if it doesn't already exist.  'mode', 'verbose' and
    'dry_run' flags are as for 'mkpath()'.
    iRRN(RRRtdirnametkeystsortR"(	tbase_dirtfilesRRRtneed_dirtfilet	need_dirstdir((s*/usr/lib64/python2.7/distutils/dir_util.pytcreate_treeRs
)

c
Cs�ddlm}|r:tjj|�r:td|�nytj|�}	Wn>tjk
r�\}
}|rwg}	q�td||f�nX|s�t|d|�ng}x1|	D])}
tjj	||
�}tjj	||
�}|
j
d�r�q�n|rktjj|�rktj|�}|dkrBt
jd||�n|s[tj||�n|j|�q�tjj|�r�|jt||||||d|d	|��q�||||||d|d	|�|j|�q�W|S(
sCopy an entire directory tree 'src' to a new location 'dst'.

    Both 'src' and 'dst' must be directory names.  If 'src' is not a
    directory, raise DistutilsFileError.  If 'dst' does not exist, it is
    created with 'mkpath()'.  The end result of the copy is that every
    file in 'src' is copied to 'dst', and directories under 'src' are
    recursively copied to 'dst'.  Return the list of files that were
    copied or might have been copied, using their output name.  The
    return value is unaffected by 'update' or 'dry_run': it is simply
    the list of all files under 'src', with the names changed to be
    under 'dst'.

    'preserve_mode' and 'preserve_times' are the same as for
    'copy_file'; note that they only apply to regular files, not to
    directories.  If 'preserve_symlinks' is true, symlinks will be
    copied as symlinks (on platforms that support them!); otherwise
    (the default), the destination of the symlink will be copied.
    'update' and 'verbose' are the same as for 'copy_file'.
    i����(t	copy_files&cannot copy tree '%s': not a directoryserror listing files in '%s': %sRs.nfsislinking %s -> %sR(tdistutils.file_utilR-RRR	RtlistdirterrorR"Rt
startswithtislinktreadlinkRRtsymlinkRtextendt	copy_tree(tsrctdstt
preserve_modetpreserve_timestpreserve_symlinkstupdateRRR-tnamesRterrstrtoutputstntsrc_nametdst_namet	link_dest((s*/usr/lib64/python2.7/distutils/dir_util.pyR6gsH
	
cCs�xwtj|�D]f}tjj||�}tjj|�r`tjj|�r`t||�q|jtj|f�qW|jtj	|f�dS(sHelper for remove_tree().N(
RR/RRR	R2t_build_cmdtupleRtremovetrmdir(Rt	cmdtuplestftreal_f((s*/usr/lib64/python2.7/distutils/dir_util.pyRD�s%cCs�|dkrtjd|�n|r)dSg}t||�x|D]w}yB|d|d�tjj|d�}|tkr�t|=nWqCttfk
r�}tj	d||�qCXqCWdS(s�Recursively remove an entire directory tree.

    Any errors are ignored (apart from being reported to stdout if 'verbose'
    is true).
    is'removing '%s' (and everything under it)Niserror removing %s: %s(
RRRDRRRR
tIOErrorRtwarn(t	directoryRRRGtcmdRR!((s*/usr/lib64/python2.7/distutils/dir_util.pytremove_tree�s

cCsCtjj|�\}}|dd!tjkr?||d}n|S(s�Take the full path 'path', and make it a relative path.

    This is useful to make 'path' the second argument to os.path.join().
    ii(RRt
splitdrivetsep(Rtdrive((s*/usr/lib64/python2.7/distutils/dir_util.pytensure_relative�s(t__doc__t__revision__RRtdistutils.errorsRRt	distutilsRR
R"R,R6RDRNRR(((s*/usr/lib64/python2.7/distutils/dir_util.pyt<module>s?D	
PKW[F5f#��bcppcompiler.pyonu�[����
{fc@s�dZdZddlZddlmZmZmZmZmZddl	m
Z
mZddlm
Z
ddlmZddlmZd	e
fd
��YZdS(s�distutils.bcppcompiler

Contains BorlandCCompiler, an implementation of the abstract CCompiler class
for the Borland C++ compiler.
s$Id$i����N(tDistutilsExecErrortCompileErrortLibErrort	LinkErrortUnknownFileError(t	CCompilertgen_preprocess_options(t
write_file(tnewer(tlogtBCPPCompilercBs�eZdZdZiZdgZdddgZeeZdZdZ	dZ
d	ZZd
Z
dddd�Zdddddddd
�Zdddd�Zddddddddddd�
Zdd�Zddd�Zdddddd�ZRS(sConcrete class that implements an interface to the Borland C/C++
    compiler, as defined by the CCompiler abstract class.
    tbcpps.cs.ccs.cpps.cxxs.objs.libs.dlls%s%ss.exeicCs�tj||||�d|_d|_d|_d|_ddddg|_ddddg|_d	d
ddg|_	d	d
ddg|_
g|_d
ddg|_d
dddg|_
dS(
Ns	bcc32.exesilink32.exestlib.exes/tWMs/O2s/qs/g0s/Ods/Tpds/Gns/xs/r(Rt__init__tcctlinkertlibtNonetpreprocess_optionstcompile_optionstcompile_options_debugtldflags_sharedtldflags_shared_debugtldflags_statictldflags_exetldflags_exe_debug(tselftverbosetdry_runtforce((s./usr/lib64/python2.7/distutils/bcppcompiler.pyR5s					c	Cs�|j||||||�\}}	}}
}|p6g}|jd�|r_|j|j�n|j|j�xi|	D]a}
y||
\}}Wntk
r�qvnXtjj|�}tjj|
�}
|j	tjj
|
��|dkr�qvn|dkrDy|jdd|
|g�Wqvtk
r=}t
|�qvXqvn||jkr\d}n||jkrtd}nd}d|
}y4|j|jg||
||g||g�Wqvtk
r�}t
|�qvXqvW|	S(	Ns-cs.ress.rctbrcc32s-fots-Ps-o(t_setup_compiletappendtextendRRtKeyErrortostpathtnormpathtmkpathtdirnametspawnRRt
_c_extensionst_cpp_extensionsR
(Rtsourcest
output_dirtmacrostinclude_dirstdebugt
extra_preargstextra_postargstdependstobjectstpp_optstbuildtcompile_optstobjtsrctexttmsgt	input_optt
output_opt((s./usr/lib64/python2.7/distutils/bcppcompiler.pytcompileQsF



		
.c	Cs�|j||�\}}|j|d|�}|j||�r�|dg|}|rXny|j|jg|�Wq�tk
r�}t|�q�Xntjd|�dS(NR,s/usskipping %s (up-to-date)(	t_fix_object_argstlibrary_filenamet
_need_linkR(RRRR	R/(	RR3toutput_libnameR,R/ttarget_langtoutput_filenametlib_argsR:((s./usr/lib64/python2.7/distutils/bcppcompiler.pytcreate_static_lib�sc Cs�|j||�\}}|j|||�\}}}|rUtjdt|��n|dk	rytjj||�}n|j	||�r�|t
jkr�d}|	r�|j}q�|j
}n#d}|	r�|j}n
|j}|dkr�d}n�tjj|�\}}tjj|�\}}tjj|d�}tjj|d|�}dg}x+|plgD]}|jd||f�qmW|jt||fd	|�ttjj|�}|g}g}x[|D]S}tjjtjj|��\}}|d
kr|j|�q�|j|�q�Wx+|D]#}|jdtjj|��q4W|jd�|j|�|jd
|g�|jd�xL|D]D}|j|||	�}|dkr�|j|�q�|j|�q�W|jd�|jd�|jd
|g�|jd
�|j|�|
r>|
|d*n|rT|j|�n|jtjj|��y|j|jg|�Wq�tk
r�}t|�q�Xntj d|�dS(Ns7I don't know what to do with 'runtime_library_dirs': %stc0w32tc0d32Ris%s.deftEXPORTSs  %s=_%ss
writing %ss.ress/L%ss/L.t,s,,timport32tcw32mtsskipping %s (up-to-date)(!R>t
_fix_lib_argsR	twarntstrRR#R$tjoinR@Rt
EXECUTABLERRRRtsplittsplitextR'R texecuteRtmapR%tnormcaseR!tfind_library_fileR&R(RRRR/( Rttarget_descR3RCR,t	librariestlibrary_dirstruntime_library_dirstexport_symbolsR/R0R1t
build_tempRBtstartup_objtld_argstdef_filetheadttailtmodnameR9ttemp_dirtcontentstsymtobjects2t	resourcestfiletbasetlRtlibfileR:((s./usr/lib64/python2.7/distutils/bcppcompiler.pytlink�s|	



			
$
!









c	Cs�|r-|d}|d|d||f}n|d|f}xW|D]K}xB|D]:}tjj||j|��}tjj|�rQ|SqQWqDWdSdS(Nt_dt_bcpp(R#R$ROR?texistsR(	RtdirsRR/tdlibt	try_namestdirtnameRk((s./usr/lib64/python2.7/distutils/bcppcompiler.pyRV4s



RcCs|dkrd}ng}x�|D]�}tjjtjj|��\}}||jddgkr{td||f�n|r�tjj|�}n|dkr�|jtjj	|||��q"|dkr�|jtjj	||d��q"|jtjj	|||j
��q"W|S(NRs.rcs.ress"unknown file type '%s' (from '%s')(RR#R$RRRUtsrc_extensionsRtbasenameR ROt
obj_extension(Rtsource_filenamest	strip_dirR,t	obj_namestsrc_nameRiR9((s./usr/lib64/python2.7/distutils/bcppcompiler.pytobject_filenamesNs$	
$##cCs|jd||�\}}}t||�}dg|}	|dk	rZ|	jd|�n|rm||	d*n|r�|	j|�n|	j|�|js�|dks�t||�r|r�|jtj	j
|��ny|j|	�Wqtk
r
}
|
GHt
|
�qXndS(Ns	cpp32.exes-oi(t_fix_compile_argsRRR R!RRR&R#R$R'R(RR(Rtsourcetoutput_fileR-R.R0R1t_R4tpp_argsR:((s./usr/lib64/python2.7/distutils/bcppcompiler.pyt
preprocessjs$	


$N(t__name__t
__module__t__doc__t
compiler_typetexecutablesR)R*RuRwtstatic_lib_extensiontshared_lib_extensiontstatic_lib_formattshared_lib_formatt
exe_extensionRRR=RERlRVR|R�(((s./usr/lib64/python2.7/distutils/bcppcompiler.pyR
sJ	

B|(R�t__revision__R#tdistutils.errorsRRRRRtdistutils.ccompilerRRtdistutils.file_utilRtdistutils.dep_utilRt	distutilsR	R
(((s./usr/lib64/python2.7/distutils/bcppcompiler.pyt<module>s	(PKW[�^�	spawn.pycnu�[����
{fc@s�dZdZddlZddlZddlmZmZddlmZddl	m
Z
dddd	�Zd
�Zdddd�Z
dddd�Zejd
kr�ddl	mZdadandddd�Zdd�ZdS(s�distutils.spawn

Provides the 'spawn()' function, a front-end to various platform-
specific functions for launching another program in a sub-process.
Also provides the 'find_executable()' to search the path for a given
executable name.
s$Id$i����N(tDistutilsPlatformErrortDistutilsExecError(tDEBUG(tlogiicCs�t|�}tjdkr1t||d|�nZtjdkrVt||d|�n5tjdkr{t||d|�ntdtj�dS(s�Run another program, specified as a command list 'cmd', in a new process.

    'cmd' is just the argument list for the new process, ie.
    cmd[0] is the program to run and cmd[1:] are the rest of its arguments.
    There is no way to run a program with a name different from that of its
    executable.

    If 'search_path' is true (the default), the system's executable
    search path will be used to find the program; otherwise, cmd[0]
    must be the exact path to the executable.  If 'dry_run' is true,
    the command will not actually be run.

    Raise DistutilsExecError if running the program fails in any way; just
    return on success.
    tposixtdry_runtnttos2s1don't know how to spawn programs on platform '%s'N(tlisttostnamet_spawn_posixt	_spawn_ntt
_spawn_os2R(tcmdtsearch_pathtverboseR((s'/usr/lib64/python2.7/distutils/spawn.pytspawnscCs>x7t|�D])\}}d|kr
d|||<q
q
W|S(s�Quote command-line arguments for DOS/Windows conventions.

    Just wraps every argument which contains blanks in double quotes, and
    returns a new argument list.
    t s"%s"(t	enumerate(targstitarg((s'/usr/lib64/python2.7/distutils/spawn.pyt_nt_quote_args/scCs�|d}t|�}|r1t|�p+|}ntjdj|g|d��|s�ytjtj||�}Wn9tk
r�}t	s�|}nt
d||df�nX|dkr�t	s�|}nt
d||f�q�ndS(NiRiscommand %r failed: %si����s%command %r failed with exit status %d(Rtfind_executableRtinfotjoinR	tspawnvtP_WAITtOSErrorRR(RRRRt
executabletrctexc((s'/usr/lib64/python2.7/distutils/spawn.pyR?s$
!		cCs�|d}|r%t|�p|}ntjdj|g|d��|s�ytjtj||�}Wn9tk
r�}ts�|}nt	d||df�nX|dkr�ts�|}ntj
d||f�t	d||f�q�ndS(NiRiscommand %r failed: %si����s%command %r failed with exit status %d(RRRRR	RRRRRtdebug(RRRRRRR ((s'/usr/lib64/python2.7/distutils/spawn.pyR
Ws$
!		tdarwin(t	sysconfigcCs_tjdj|��|r dS|d}|r9tjp?tj}d}tjdkrGt	dkr�t
jd�puda	t	r�gt	jd�D]}t
|�^q�aq�nt	rGtjjdt	�}tg|jd�D]}t
|�^q�krd|t	f}	t|	��nttjd|�}|r8tjp>tj}qGntj�}
|
dkry0|dkr~|||�n||||�WnLtk
r�}ts�|}ntjjd||jf�tjd	�nXts�|}ntjjd
|�tjd	�nJxGytj|
d�\}
}Wn]tk
r�}
ddl}|
j|jkrfqntsu|}ntd||
df�nXtj |�r�ts�|}ntd
|tj!|�f�qtj"|�r tj#|�}|dkr�dSts
|}ntd||f�qtj$|�r5qqtsD|}ntd||f�qWdS(NRiR"tMACOSX_DEPLOYMENT_TARGETtt.sF$MACOSX_DEPLOYMENT_TARGET mismatch: now "%s" but "%s" during configuresunable to execute %r: %s
is(unable to execute %r for unknown reasonsi����scommand %r failed: %ss"command %r terminated by signal %ds%command %r failed with exit status %ds1unknown error executing %r: termination status %d(%RRRR	texecvptexecvtNonetsystplatformt_cfg_targetR#tget_config_vartsplittintt_cfg_target_splittenvirontgetRtdicttexecvpetexecvetforkRRtstderrtwritetstrerrort_exittwaitpidterrnotEINTRRtWIFSIGNALEDtWTERMSIGt	WIFEXITEDtWEXITSTATUSt
WIFSTOPPED(RRRRRtexec_fntenvtxt
cur_targettmy_msgtpidtetstatusR R<texit_status((s'/usr/lib64/python2.7/distutils/spawn.pyRts�
..
							cCs�|dkr'tjjdtj�}n|jtj�}tjj|�\}}t	j
dksotjdkr�|dkr�|d}ntjj|�s�x9|D]1}tjj
||�}tjj|�r�|Sq�WdS|SdS(s�Tries to find 'executable' in the directories listed in 'path'.

    A string listing directories separated by 'os.pathsep'; defaults to
    os.environ['PATH'].  Returns the complete filename or None if not found.
    tPATHtwin32Rs.exeN(R)R	R1R2tdefpathR.tpathseptpathtsplitextR*R+R
tisfileR(RRPtpathstbasetexttptf((s'/usr/lib64/python2.7/distutils/spawn.pyR�s*

(t__doc__t__revision__R*R	tdistutils.errorsRRtdistutils.debugRt	distutilsRRRRR
R+R#R)R,R0RR(((s'/usr/lib64/python2.7/distutils/spawn.pyt<module>s 		XPKX[���~�!�!0__pycache__/cygwinccompiler.cpython-38.opt-1.pycnu�[���U

e5d^@�@s�dZddlZddlZddlZddlmZmZmZddlZddl	m
Z
mZddlm
Z
ddlmZddlmZmZmZmZddlmZdd	lmZdd
lmZdd�ZGd
d�de
�ZGdd�de�ZdZdZdZ dd�Z!e�"d�Z#dd�Z$dd�Z%dd�Z&dS)adistutils.cygwinccompiler

Provides the CygwinCCompiler class, a subclass of UnixCCompiler that
handles the Cygwin port of the GNU C compiler to Windows.  It also contains
the Mingw32CCompiler class which handles the mingw32 port of GCC (same as
cygwin in no-cygwin mode).
�N)�Popen�PIPE�check_output)�gen_preprocess_options�gen_lib_options)�
UnixCCompiler)�
write_file)�DistutilsExecError�CCompilerError�CompileError�UnknownFileError)�log)�LooseVersion)�find_executablecCs�tj�d�}|dkr|tj|d|d�}|dkr8dgS|dkrFdgS|d	krTd
gS|dkrbdgS|d
krpdgStd|��dS)zaInclude the appropriate MSVC runtime library if Python was built
    with MSVC 7.0 or later.
    zMSC v.�����
Z1300Zmsvcr70Z1310Zmsvcr71Z1400Zmsvcr80Z1500Zmsvcr90Z1600Zmsvcr100zUnknown MS Compiler version %s N)�sys�version�find�
ValueError)Zmsc_posZmsc_ver�r�1/usr/lib64/python3.8/distutils/cygwinccompiler.py�	get_msvcr?src
@sReZdZdZdZdZdZdZdZdZ	dZ
dd
d�Zdd
�Zddd�Z
ddd�ZdS)�CygwinCCompilerz? Handles the Cygwin port of the GNU C compiler to Windows.
    �cygwinz.o�.az.dllzlib%s%sz%s%sz.exercCs�t�||||�t�\}}|�d||f�|tk	rB|�d|�t�\|_|_|_	|�|j
d|j|j|j	f�|jdkr�d|_nd|_|jdkr�d}nd	}|jd
ddd
d|j|fd�|jdkr�dg|_
|�d�nt�|_
dS)Nz%Python's GCC status: %s (details: %s)z�Python's pyconfig.h doesn't seem to support your compiler. Reason: %s. Compiling may fail because of undefined preprocessor macros.z: gcc %s, ld %s, dllwrap %s
z2.10.90�gcc�dllwrap�2.13�-shared�
-mdll -staticzgcc -mcygwin -O -Wallzgcc -mcygwin -mdll -O -Wallzg++ -mcygwin -O -Wallzgcc -mcygwinz%s -mcygwin %s�Zcompiler�compiler_soZcompiler_cxxZ
linker_exeZ	linker_so�2.91.57Zmsvcrtz,Consider upgrading to a newer version of gcc)r�__init__�check_config_hZdebug_print�CONFIG_H_OK�warn�get_versions�gcc_version�
ld_versionZdllwrap_version�
compiler_type�
linker_dll�set_executables�
dll_librariesr)�self�verbose�dry_run�forceZstatusZdetails�
shared_optionrrrr%dsN
����
��


��
�zCygwinCCompiler.__init__c
Cs�|dks|dkrVz|�dd|d|g�Wq�tk
rR}zt|��W5d}~XYq�XnNz"|�|j||d|g|�Wn*tk
r�}zt|��W5d}~XYnXdS)z:Compiles the source by spawning GCC and windres if needed.�.rc�.resZwindresz-iz-oN)Zspawnr	rr#)r0�obj�src�extZcc_args�extra_postargsZpp_opts�msgrrr�_compile�s�
zCygwinCCompiler._compileNcCsPt�|
p
g�}
t�|pg�}t�|p&g�}|�|j�|dk	�r||jksV|jdk�rtj�|d�}tj�tj�	|��\}}tj�
||d�}tj�
|d|d�}dtj�	|�dg}|D]}|�|�q�|�t
||fd	|�|jd
k�r|
�d|g�|
�d|g�n
|�|�|	�s(|
�d
�t�||||||||d|	|
|||
�dS)zLink the objects.Nrrz.def�librz
LIBRARY %sZEXPORTSz
writing %srz--output-libz--defz-s)�copy�extendr/Z
EXECUTABLEr-�os�path�dirname�splitext�basename�join�appendZexecuterr�link)r0Ztarget_descZobjectsZoutput_filename�
output_dirZ	librariesZlibrary_dirsZruntime_library_dirsZexport_symbols�debugZ
extra_preargsr:Z
build_tempZtarget_langZtemp_dirZdll_nameZ
dll_extensionZdef_fileZlib_file�contentsZsymrrrrG�sR
��

���

�zCygwinCCompiler.link�cCs�|dkrd}g}|D]�}tj�tj�|��\}}||jddgkrRtd||f��|rbtj�|�}|dkr�|�tj�||||j	��q|�tj�|||j	��q|S)z#Adds supports for rc and res files.NrKr5r6z"unknown file type '%s' (from '%s'))r6r5)
r@rArC�normcaseZsrc_extensionsrrDrFrE�
obj_extension)r0Zsource_filenamesZ	strip_dirrHZ	obj_namesZsrc_name�baser9rrr�object_filenames�s&���z CygwinCCompiler.object_filenames)rrr)
NNNNNrNNNN)rrK)�__name__�
__module__�__qualname__�__doc__r,rMZstatic_lib_extensionZshared_lib_extensionZstatic_lib_formatZshared_lib_formatZ
exe_extensionr%r<rGrOrrrrrYs,
;�
Nrc@seZdZdZdZddd�ZdS)�Mingw32CCompilerz@ Handles the Mingw32 port of the GNU C compiler to Windows.
    Zmingw32rc	Csxt�||||�|jdkr d}nd}|jdkr4d}nd}t�rFtd��|jdd	d
dd|j||fd
�g|_t	�|_dS)Nrr r!r$z--entry _DllMain@12rKz1Cygwin gcc cannot be used with --compiler=mingw32zgcc -O -Wallzgcc -mdll -O -Wallzg++ -O -Wallrz%s %s %sr")
rr%r+r*�is_cygwingccr
r.r-r/r)r0r1r2r3r4Zentry_pointrrrr%s.

����zMingw32CCompiler.__init__N)rrr)rPrQrRrSr,r%rrrrrTsrT�okznot okZ	uncertainc
Cs�ddlm}dtjkrtdfS|��}zLt|�}z4d|��krPtd|fW�WSt	d|fW�WSW5|��XWn8t
k
r�}ztd||jffWY�Sd	}~XYnXd	S)
awCheck if the current Python installation appears amenable to building
    extensions with GCC.

    Returns a tuple (status, details), where 'status' is one of the following
    constants:

    - CONFIG_H_OK: all is well, go ahead and compile
    - CONFIG_H_NOTOK: doesn't look good
    - CONFIG_H_UNCERTAIN: not sure -- unable to read pyconfig.h

    'details' is a human-readable string explaining the situation.

    Note there are two ways to conclude "OK": either 'sys.version' contains
    the string "GCC" (implying that this Python was built with GCC), or the
    installed "pyconfig.h" contains the string "__GNUC__".
    r)�	sysconfigZGCCzsys.version mentions 'GCC'Z__GNUC__z'%s' mentions '__GNUC__'z '%s' does not mention '__GNUC__'zcouldn't read '%s': %sN)
�	distutilsrWrrr'Zget_config_h_filename�open�close�read�CONFIG_H_NOTOK�OSError�CONFIG_H_UNCERTAIN�strerror)rW�fnZconfig_h�excrrrr&Hs
�r&s(\d+\.\d+(\.\d+)*)cCsl|��d}t|�dkrdSt|dtd�j}z|��}W5|��Xt�|�}|dkrZdSt	|�
d����S)z�Find the version of an executable by running `cmd` in the shell.

    If the command is not found, or the output does not match
    `RE_VERSION`, returns None.
    rNT)�shell�stdout�)�splitrrrrcrZr[�
RE_VERSION�searchr�group�decode)�cmd�
executable�out�
out_string�resultrrr�_find_exe_versionus

rocCsdddg}tdd�|D��S)zg Try to find out the versions of gcc, ld and dllwrap.

    If not possible it returns None for it.
    zgcc -dumpversionzld -vzdllwrap --versioncSsg|]}t|��qSr)ro)�.0rjrrr�
<listcomp>�sz get_versions.<locals>.<listcomp>)�tuple)Zcommandsrrrr)�s
r)cCstddg�}|���d�S)z>Try to determine if the gcc that would be used is from cygwin.rz-dumpmachinescygwin)r�strip�endswith)rmrrrrU�srU)'rSr@rr>�
subprocessrrr�reZdistutils.ccompilerrrZdistutils.unixccompilerrZdistutils.file_utilrZdistutils.errorsr	r
rrrXr
Zdistutils.versionrZdistutils.spawnrrrrTr'r\r^r&�compilerfror)rUrrrr�<module>s0/;1+
PKX[���G��$__pycache__/ccompiler.cpython-38.pycnu�[���U

e5dI��@s�dZddlZddlZddlZddlTddlmZddlmZddl	m
Z
ddlmZm
Z
ddlmZmZdd	lmZGd
d�d�ZdZdd
d�Zdddddd�Zdd�Zddd�Zdd�Zdd�ZdS)z�distutils.ccompiler

Contains CCompiler, an abstract base class that defines the interface
for the Distutils compiler abstraction model.�N)�*)�spawn)�	move_file)�mkpath)�newer_pairwise�newer_group)�split_quoted�execute)�logc
@seZdZdZdZdZdZdZdZdZ	dZ
dZdddddd�ZdddgZ
dqdd	�Zd
d�Zdd
�Zdd�Zdd�Zdrdd�Zdd�Zdd�Zdd�Zdd�Zdd�Zdd�Zd d!�Zd"d#�Zd$d%�Zd&d'�Zd(d)�Zd*d+�Zd,d-�Z d.d/�Z!dsd0d1�Z"d2d3�Z#d4d5�Z$d6d7�Z%d8d9�Z&dtd:d;�Z'dud<d=�Z(d>d?�Z)dvd@dA�Z*dBZ+dCZ,dDZ-dwdEdF�Z.dxdGdH�Z/dydIdJ�Z0dzdKdL�Z1dMdN�Z2dOdP�Z3dQdR�Z4d{dSdT�Z5d|dUdV�Z6d}dXdY�Z7d~dZd[�Z8dd\d]�Z9d�d_d`�Z:d�dbdc�Z;ddde�Z<dfdg�Z=d�dhdi�Z>djdk�Z?dldm�Z@d�dodp�ZAdS)��	CCompilera�Abstract base class to define the interface that must be implemented
    by real compiler classes.  Also has some utility methods used by
    several compiler classes.

    The basic idea behind a compiler abstraction class is that each
    instance can be used for all the compile/link steps in building a
    single project.  Thus, attributes common to all of those compile and
    link steps -- include directories, macros to define, libraries to link
    against, etc. -- are attributes of the compiler instance.  To allow for
    variability in how individual files are treated, most of those
    attributes may be varied on a per-compilation or per-link basis.
    N�czc++Zobjc)�.cz.ccz.cppz.cxxz.mrcCsb||_||_||_d|_g|_g|_g|_g|_g|_g|_	|j
��D]}|�||j
|�qFdS�N)
�dry_run�force�verbose�
output_dir�macros�include_dirs�	libraries�library_dirs�runtime_library_dirs�objects�executables�keys�set_executable)�selfrrr�key�r�+/usr/lib64/python3.8/distutils/ccompiler.py�__init__UszCCompiler.__init__cKs<|D]2}||jkr&td||jjf��|�|||�qdS)a�Define the executables (and options for them) that will be run
        to perform the various stages of compilation.  The exact set of
        executables that may be specified here depends on the compiler
        class (via the 'executables' class attribute), but most will have:
          compiler      the C/C++ compiler
          linker_so     linker used to create shared objects and libraries
          linker_exe    linker used to create binary executables
          archiver      static library creator

        On platforms with a command-line (Unix, DOS/Windows), each of these
        is a string that will be split into executable name and (optional)
        list of arguments.  (Splitting the string is done similarly to how
        Unix shells operate: words are delimited by spaces, but quotes and
        backslashes can override this.  See
        'distutils.util.split_quoted()'.)
        z$unknown executable '%s' for class %sN)r�
ValueError�	__class__�__name__r)r�kwargsrrrr�set_executablesys

�zCCompiler.set_executablescCs,t|t�rt||t|��nt|||�dSr)�
isinstance�str�setattrr)rr�valuerrrr�s
zCCompiler.set_executablecCs0d}|jD] }|d|kr"|S|d7}q
dS)Nr�)r)r�name�i�defnrrr�_find_macro�s

zCCompiler._find_macrocCs`|D]V}t|t�rFt|�dkrFt|dt�s8|ddkrFt|dt�std|dd��qdS)z�Ensures that every element of 'definitions' is a valid macro
        definition, ie. either (name,value) 2-tuple or a (name,) tuple.  Do
        nothing if all definitions are OK, raise TypeError otherwise.
        )r*�r*Nrzinvalid macro definition '%s': z.must be tuple (string,), (string, string), or z(string, None))r&�tuple�lenr'�	TypeError)rZdefinitionsr-rrr�_check_macro_definitions�s

��
����z"CCompiler._check_macro_definitionscCs.|�|�}|dk	r|j|=|j�||f�dS)a_Define a preprocessor macro for all compilations driven by this
        compiler object.  The optional parameter 'value' should be a
        string; if it is not supplied, then the macro will be defined
        without an explicit value and the exact outcome depends on the
        compiler used (XXX true? does ANSI say anything about this?)
        N�r.r�append)rr+r)r,rrr�define_macro�s	
zCCompiler.define_macrocCs0|�|�}|dk	r|j|=|f}|j�|�dS)a�Undefine a preprocessor macro for all compilations driven by
        this compiler object.  If the same macro is defined by
        'define_macro()' and undefined by 'undefine_macro()' the last call
        takes precedence (including multiple redefinitions or
        undefinitions).  If the macro is redefined/undefined on a
        per-compilation basis (ie. in the call to 'compile()'), then that
        takes precedence.
        Nr4)rr+r,Zundefnrrr�undefine_macro�s

zCCompiler.undefine_macrocCs|j�|�dS)z�Add 'dir' to the list of directories that will be searched for
        header files.  The compiler is instructed to search directories in
        the order in which they are supplied by successive calls to
        'add_include_dir()'.
        N)rr5�r�dirrrr�add_include_dir�szCCompiler.add_include_dircCs|dd�|_dS)aySet the list of directories that will be searched to 'dirs' (a
        list of strings).  Overrides any preceding calls to
        'add_include_dir()'; subsequence calls to 'add_include_dir()' add
        to the list passed to 'set_include_dirs()'.  This does not affect
        any list of standard include directories that the compiler may
        search by default.
        N�r�r�dirsrrr�set_include_dirs�szCCompiler.set_include_dirscCs|j�|�dS)a�Add 'libname' to the list of libraries that will be included in
        all links driven by this compiler object.  Note that 'libname'
        should *not* be the name of a file containing a library, but the
        name of the library itself: the actual filename will be inferred by
        the linker, the compiler, or the compiler class (depending on the
        platform).

        The linker will be instructed to link against libraries in the
        order they were supplied to 'add_library()' and/or
        'set_libraries()'.  It is perfectly valid to duplicate library
        names; the linker will be instructed to link against libraries as
        many times as they are mentioned.
        N)rr5)r�libnamerrr�add_library�szCCompiler.add_librarycCs|dd�|_dS)z�Set the list of libraries to be included in all links driven by
        this compiler object to 'libnames' (a list of strings).  This does
        not affect any standard system libraries that the linker may
        include by default.
        N)r)rZlibnamesrrr�
set_libraries�szCCompiler.set_librariescCs|j�|�dS)a'Add 'dir' to the list of directories that will be searched for
        libraries specified to 'add_library()' and 'set_libraries()'.  The
        linker will be instructed to search for libraries in the order they
        are supplied to 'add_library_dir()' and/or 'set_library_dirs()'.
        N)rr5r8rrr�add_library_dirszCCompiler.add_library_dircCs|dd�|_dS)z�Set the list of library search directories to 'dirs' (a list of
        strings).  This does not affect any standard library search path
        that the linker may search by default.
        N)rr<rrr�set_library_dirsszCCompiler.set_library_dirscCs|j�|�dS)zlAdd 'dir' to the list of directories that will be searched for
        shared libraries at runtime.
        N)rr5r8rrr�add_runtime_library_dirsz!CCompiler.add_runtime_library_dircCs|dd�|_dS)z�Set the list of directories to search for shared libraries at
        runtime to 'dirs' (a list of strings).  This does not affect any
        standard search path that the runtime linker may search by
        default.
        N)rr<rrr�set_runtime_library_dirssz"CCompiler.set_runtime_library_dirscCs|j�|�dS)z�Add 'object' to the list of object files (or analogues, such as
        explicitly named library files or the output of "resource
        compilers") to be included in every link driven by this compiler
        object.
        N)rr5)r�objectrrr�add_link_object szCCompiler.add_link_objectcCs|dd�|_dS)z�Set the list of object files (or analogues) to be included in
        every link to 'objects'.  This does not affect any standard object
        files that the linker may include by default (such as system
        libraries).
        N)r)rrrrr�set_link_objects(szCCompiler.set_link_objectscCs*|dkr|j}nt|t�s"td��|dkr2|j}n"t|t�rL||jpFg}ntd��|dkrd|j}n*t|ttf�r�t|�|jp�g}ntd��|dkr�g}|j|d|d�}t	|�t	|�ks�t
�t||�}i}	tt	|��D]B}
||
}||
}t
j�|�d}
|�t
j�|��||
f|	|<q�|||||	fS)z;Process arguments and decide which source files to compile.N�%'output_dir' must be a string or None�/'macros' (if supplied) must be a list of tuples�6'include_dirs' (if supplied) must be a list of stringsr)�	strip_dirrr*)rr&r'r2r�listrr0�object_filenamesr1�AssertionError�gen_preprocess_options�range�os�path�splitextr�dirname)rZoutdirrZincdirs�sources�dependsZextrar�pp_opts�buildr,�src�obj�extrrr�_setup_compile6s>

��
zCCompiler._setup_compilecCs0|dg}|rdg|dd�<|r,||dd�<|S)Nz-cz-grr)rrX�debugZbefore�cc_argsrrr�_get_cc_argsas
zCCompiler._get_cc_argscCs�|dkr|j}nt|t�s"td��|dkr2|j}n"t|t�rL||jpFg}ntd��|dkrd|j}n*t|ttf�r�t|�|jp�g}ntd��|||fS)a'Typecheck and fix-up some of the arguments to the 'compile()'
        method, and return fixed-up values.  Specifically: if 'output_dir'
        is None, replaces it with 'self.output_dir'; ensures that 'macros'
        is a list, and augments it with 'self.macros'; ensures that
        'include_dirs' is a list, and augments it with 'self.include_dirs'.
        Guarantees that the returned values are of the correct type,
        i.e. for 'output_dir' either string or None, and for 'macros' and
        'include_dirs' either list or None.
        NrIrJrK)rr&r'r2rrMrr0)rrrrrrr�_fix_compile_argsjs"


�zCCompiler._fix_compile_argscCs*|j||d�}t|�t|�ks"t�|ifS)a+Decide which souce files must be recompiled.

        Determine the list of object files corresponding to 'sources',
        and figure out which ones really need to be recompiled.
        Return a list of all object files and a dictionary telling
        which source files can be skipped.
        )r)rNr1rO)rrVrrWrrrr�
_prep_compile�s	zCCompiler._prep_compilecCsHt|ttf�std��t|�}|dkr.|j}nt|t�s@td��||fS)z�Typecheck and fix up some arguments supplied to various methods.
        Specifically: ensure that 'objects' is a list; if output_dir is
        None, replace with self.output_dir.  Return fixed versions of
        'objects' and 'output_dir'.
        z,'objects' must be a list or tuple of stringsNrI)r&rMr0r2rr')rrrrrr�_fix_object_args�s
zCCompiler._fix_object_argscCs�|dkr|j}n*t|ttf�r2t|�|jp,g}ntd��|dkrJ|j}n*t|ttf�rlt|�|jpfg}ntd��|dkr�|j}n*t|ttf�r�t|�|jp�g}ntd��|||fS)a;Typecheck and fix up some of the arguments supplied to the
        'link_*' methods.  Specifically: ensure that all arguments are
        lists, and augment them with their permanent versions
        (eg. 'self.libraries' augments 'libraries').  Return a tuple with
        fixed versions of all arguments.
        Nz3'libraries' (if supplied) must be a list of stringsz6'library_dirs' (if supplied) must be a list of stringsz>'runtime_library_dirs' (if supplied) must be a list of strings)rr&rMr0r2rr)rrrrrrr�
_fix_lib_args�s,���zCCompiler._fix_lib_argscCs2|jr
dS|jr t||dd�}n
t||�}|SdS)zjReturn true if we need to relink the files listed in 'objects'
        to recreate 'output_file'.
        T�newer)ZmissingN)rrr)rr�output_filererrr�
_need_link�s
zCCompiler._need_linkc		Cs~t|t�s|g}d}t|j�}|D]V}tj�|�\}}|j�|�}z |j�	|�}||kr`|}|}Wq"t
k
rvYq"Xq"|S)z|Detect the language of a given file, or list of files. Uses
        language_map, and language_order to do the job.
        N)r&rMr1�language_orderrRrSrT�language_map�get�indexr!)	rrVZlangrk�source�baser\ZextlangZextindexrrr�detect_language�s

zCCompiler.detect_languagecCsdS)a�Preprocess a single C/C++ source file, named in 'source'.
        Output will be written to file named 'output_file', or stdout if
        'output_file' not supplied.  'macros' is a list of macro
        definitions as for 'compile()', which will augment the macros set
        with 'define_macro()' and 'undefine_macro()'.  'include_dirs' is a
        list of directory names that will be added to the default list.

        Raises PreprocessError on failure.
        Nr)rrlrfrr�
extra_preargs�extra_postargsrrr�
preprocess�szCCompiler.preprocessc		Csx|�||||||�\}}	}}
}|�|
||�}|	D]B}
z||
\}}Wntk
r\Yq0YnX|�|
|||||
�q0|	S)aK	Compile one or more source files.

        'sources' must be a list of filenames, most likely C/C++
        files, but in reality anything that can be handled by a
        particular compiler and compiler class (eg. MSVCCompiler can
        handle resource files in 'sources').  Return a list of object
        filenames, one per source filename in 'sources'.  Depending on
        the implementation, not all source files will necessarily be
        compiled, but all corresponding object filenames will be
        returned.

        If 'output_dir' is given, object files will be put under it, while
        retaining their original path component.  That is, "foo/bar.c"
        normally compiles to "foo/bar.o" (for a Unix implementation); if
        'output_dir' is "build", then it would compile to
        "build/foo/bar.o".

        'macros', if given, must be a list of macro definitions.  A macro
        definition is either a (name, value) 2-tuple or a (name,) 1-tuple.
        The former defines a macro; if the value is None, the macro is
        defined without an explicit value.  The 1-tuple case undefines a
        macro.  Later definitions/redefinitions/ undefinitions take
        precedence.

        'include_dirs', if given, must be a list of strings, the
        directories to add to the default include file search path for this
        compilation only.

        'debug' is a boolean; if true, the compiler will be instructed to
        output debug symbols in (or alongside) the object file(s).

        'extra_preargs' and 'extra_postargs' are implementation- dependent.
        On platforms that have the notion of a command-line (e.g. Unix,
        DOS/Windows), they are most likely lists of strings: extra
        command-line arguments to prepend/append to the compiler command
        line.  On other platforms, consult the implementation class
        documentation.  In any event, they are intended as an escape hatch
        for those occasions when the abstract compiler framework doesn't
        cut the mustard.

        'depends', if given, is a list of filenames that all targets
        depend on.  If a source file is older than any file in
        depends, then the source file will be recompiled.  This
        supports dependency tracking, but only at a coarse
        granularity.

        Raises CompileError on failure.
        )r]r`�KeyError�_compile)rrVrrrr^rorprWrrXrYr_r[rZr\rrr�compile�s6��
zCCompiler.compilecCsdS)zCompile 'src' to product 'obj'.Nr)rr[rZr\r_rprXrrrrsCszCCompiler._compilecCsdS)a&Link a bunch of stuff together to create a static library file.
        The "bunch of stuff" consists of the list of object files supplied
        as 'objects', the extra object files supplied to
        'add_link_object()' and/or 'set_link_objects()', the libraries
        supplied to 'add_library()' and/or 'set_libraries()', and the
        libraries supplied as 'libraries' (if any).

        'output_libname' should be a library name, not a filename; the
        filename will be inferred from the library name.  'output_dir' is
        the directory where the library file will be put.

        'debug' is a boolean; if true, debugging information will be
        included in the library (note that on most platforms, it is the
        compile step where this matters: the 'debug' flag is included here
        just for consistency).

        'target_lang' is the target language for which the given objects
        are being compiled. This allows specific linkage time treatment of
        certain languages.

        Raises LibError on failure.
        Nr)rr�output_libnamerr^�target_langrrr�create_static_libIszCCompiler.create_static_libZ
shared_objectZshared_library�
executablecCst�dS)auLink a bunch of stuff together to create an executable or
        shared library file.

        The "bunch of stuff" consists of the list of object files supplied
        as 'objects'.  'output_filename' should be a filename.  If
        'output_dir' is supplied, 'output_filename' is relative to it
        (i.e. 'output_filename' can provide directory components if
        needed).

        'libraries' is a list of libraries to link against.  These are
        library names, not filenames, since they're translated into
        filenames in a platform-specific way (eg. "foo" becomes "libfoo.a"
        on Unix and "foo.lib" on DOS/Windows).  However, they can include a
        directory component, which means the linker will look in that
        specific directory rather than searching all the normal locations.

        'library_dirs', if supplied, should be a list of directories to
        search for libraries that were specified as bare library names
        (ie. no directory component).  These are on top of the system
        default and those supplied to 'add_library_dir()' and/or
        'set_library_dirs()'.  'runtime_library_dirs' is a list of
        directories that will be embedded into the shared library and used
        to search for other shared libraries that *it* depends on at
        run-time.  (This may only be relevant on Unix.)

        'export_symbols' is a list of symbols that the shared library will
        export.  (This appears to be relevant only on Windows.)

        'debug' is as for 'compile()' and 'create_static_lib()', with the
        slight distinction that it actually matters on most platforms (as
        opposed to 'create_static_lib()', which includes a 'debug' flag
        mostly for form's sake).

        'extra_preargs' and 'extra_postargs' are as for 'compile()' (except
        of course that they supply command-line arguments for the
        particular linker being used).

        'target_lang' is the target language for which the given objects
        are being compiled. This allows specific linkage time treatment of
        certain languages.

        Raises LinkError on failure.
        N��NotImplementedError)rZtarget_descr�output_filenamerrrr�export_symbolsr^rorp�
build_temprvrrr�linkis9zCCompiler.linkc

Cs2|�tj||j|dd�|||||||	|
||�
dS)N�shared)�lib_type)r~r�SHARED_LIBRARY�library_filename)
rrrurrrrr|r^rorpr}rvrrr�link_shared_lib�s
�zCCompiler.link_shared_libc

Cs(|�tj|||||||||	|
||�
dSr)r~r�
SHARED_OBJECT)
rrr{rrrrr|r^rorpr}rvrrr�link_shared_object�s
�zCCompiler.link_shared_objectcCs.|�tj||�|�||||d|||	d|
�
dSr)r~r�
EXECUTABLE�executable_filename)rrZoutput_prognamerrrrr^rorprvrrr�link_executable�s
�zCCompiler.link_executablecCst�dS)zkReturn the compiler option to add 'dir' to the list of
        directories searched for libraries.
        Nryr8rrr�library_dir_option�szCCompiler.library_dir_optioncCst�dS)zsReturn the compiler option to add 'dir' to the list of
        directories searched for runtime libraries.
        Nryr8rrr�runtime_library_dir_option�sz$CCompiler.runtime_library_dir_optioncCst�dS)zReturn the compiler option to add 'lib' to the list of libraries
        linked into the shared library or executable.
        Nry)r�librrr�library_option�szCCompiler.library_optionc	Cs�ddl}|dkrg}|dkr g}|dkr,g}|dkr8g}|jd|dd�\}}t�|d�}	z*|D]}
|	�d|
�q^|	�d|�W5|	��Xz|j|g|d	�}Wntk
r�Yd
SXz|j|d||d�Wnt	t
fk
r�Yd
SXdS)
z�Return a boolean indicating whether funcname is supported on
        the current platform.  The optional arguments can be used to
        augment the compilation environment.
        rNr
T)�text�wz#include "%s"
z=int main (int argc, char **argv) {
    %s();
    return 0;
}
r;Fza.out)rr)�tempfileZmkstemprR�fdopen�close�writertZCompileErrorr�Z	LinkErrorr2)r�funcnameZincludesrrrr��fdZfname�fZinclrrrr�has_function�s<	�

�
zCCompiler.has_functioncCst�dS)aHSearch the specified list of directories for a static or shared
        library file 'lib' and return the full path to that file.  If
        'debug' true, look for a debugging version (if that makes sense on
        the current platform).  Return None if 'lib' wasn't found in any of
        the specified directories.
        Nry)rr=r�r^rrr�find_library_file$szCCompiler.find_library_file�cCs�|dkrd}g}|D]|}tj�|�\}}tj�|�d}|tj�|�d�}||jkrftd||f��|rvtj�|�}|�tj�	|||j
��q|S)Nr�r*z"unknown file type '%s' (from '%s'))rRrSrT�
splitdrive�isabs�src_extensionsZUnknownFileError�basenamer5�join�
obj_extension)rZsource_filenamesrLrZ	obj_namesZsrc_namermr\rrrrNOs"

��zCCompiler.object_filenamescCs0|dk	st�|rtj�|�}tj�|||j�Sr)rOrRrSr�r��shared_lib_extension�rr�rLrrrr�shared_object_filename`sz CCompiler.shared_object_filenamecCs4|dk	st�|rtj�|�}tj�|||jp.d�S)Nr�)rOrRrSr�r��
exe_extensionr�rrrr�fszCCompiler.executable_filename�staticc
Csl|dk	st�|dkrtd��t||d�}t||d�}tj�|�\}}|||f}	|r\d}tj�|||	�S)N)r�rZdylibZ
xcode_stubz?'lib_type' must be "static", "shared", "dylib", or "xcode_stub"Z_lib_formatZ_lib_extensionr�)rOr!�getattrrRrS�splitr�)
rr?r�rLrZfmtr\r9rm�filenamerrrr�ls�zCCompiler.library_filenamer*cCst�|�dSr)r
r^)r�msg�levelrrr�announceszCCompiler.announcecCsddlm}|rt|�dS)Nr)�DEBUG)Zdistutils.debugr��print)rr�r�rrr�debug_print�szCCompiler.debug_printcCstj�d|�dS)Nzwarning: %s
)�sys�stderrr�)rr�rrr�warn�szCCompiler.warncCst||||j�dSr)r	r)r�func�argsr�r�rrrr	�szCCompiler.executecCst||jd�dS�N)r)rr)r�cmdrrrr�szCCompiler.spawncCst|||jd�Sr�)rr)rrZZdstrrrr�szCCompiler.move_file�cCst|||jd�dSr�)rr)rr+�moderrrr�szCCompiler.mkpath)rrr)N)N)NNNNN)NNNrNNN)NrN)
NNNNNrNNNN)
NNNNNrNNNN)
NNNNNrNNNN)NNNNrNNN)NNNN)r)rr�)rr�)rr�)r�rr�)r*)Nr*)r�)Br#�
__module__�__qualname__�__doc__Z
compiler_typer�r�Zstatic_lib_extensionr�Zstatic_lib_formatZshared_lib_formatr�rirhr r%rr.r3r6r7r:r>r@rArBrCrDrErGrHr]r`rarbrcrdrgrnrqrtrsrwr�r�r�r~r�r�r�r�r�r�r�r�rNr�r�r�r�r�r�r	rrrrrrrrs��

$ 

+	 
"
�

�
D�
�
A�
�
�
�
,
+


�


r))zcygwin.*�unix)�posixr�)�nt�msvccCsV|dkrtj}|dkrtj}tD]0\}}t�||�dk	sHt�||�dk	r |Sq dS)akDetermine the default compiler to use for the given platform.

       osname should be one of the standard Python OS names (i.e. the
       ones returned by os.name) and platform the common value
       returned by sys.platform for the platform in question.

       The default values are os.name and sys.platform in case the
       parameters are not given.
    Nr�)rRr+r��platform�_default_compilers�re�match)Zosnamer��pattern�compilerrrr�get_default_compiler�s
�
r�)Z
unixccompilerZ
UnixCCompilerzstandard UNIX-style compiler)Z
_msvccompilerZMSVCCompilerzMicrosoft Visual C++)�cygwinccompilerZCygwinCCompilerz'Cygwin port of GNU C Compiler for Win32)r�ZMingw32CCompilerz(Mingw32 port of GNU C Compiler for Win32)ZbcppcompilerZBCPPCompilerzBorland C++ Compiler)r�r��cygwinZmingw32ZbcppcCsXddlm}g}t��D] }|�d|dt|df�q|��||�}|�d�dS)zyPrint list of available compilers (used by the "--help-compiler"
    options to "build", "build_ext", "build_clib").
    r)�FancyGetoptz	compiler=Nr/zList of available compilers:)Zdistutils.fancy_getoptr��compiler_classrr5�sortZ
print_help)r�Z	compilersr�Zpretty_printerrrr�show_compilers�s
�r�cCs�|dkrtj}z"|dkr t|�}t|\}}}Wn8tk
rhd|}|dk	r\|d|}t|��YnXz*d|}t|�tj|}	t	|	�|}
WnBt
k
r�td|��Yn$tk
r�td||f��YnX|
d||�S)a[Generate an instance of some CCompiler subclass for the supplied
    platform/compiler combination.  'plat' defaults to 'os.name'
    (eg. 'posix', 'nt'), and 'compiler' defaults to the default compiler
    for that platform.  Currently only 'posix' and 'nt' are supported, and
    the default compilers are "traditional Unix interface" (UnixCCompiler
    class) and Visual C++ (MSVCCompiler class).  Note that it's perfectly
    possible to ask for a Unix compiler object under Windows, and a
    Microsoft compiler object under Unix -- if you supply a value for
    'compiler', 'plat' is ignored.
    Nz5don't know how to compile C/C++ code on platform '%s'z with '%s' compilerz
distutils.z4can't compile C/C++ code: unable to load module '%s'zBcan't compile C/C++ code: unable to find class '%s' in module '%s')rRr+r�r�rrZDistutilsPlatformError�
__import__r��modules�vars�ImportErrorZDistutilsModuleError)Zplatr�rrrZmodule_name�
class_nameZlong_descriptionr��module�klassrrr�new_compiler�s:
����
r�cCs�g}|D]�}t|t�r0dt|�kr.dks<ntd|��t|�dkr\|�d|d�qt|�dkr|ddkr�|�d|d�q|�d|�q|D]}|�d	|�q�|S)
aGenerate C pre-processor options (-D, -U, -I) as used by at least
    two types of compilers: the typical Unix compiler and Visual C++.
    'macros' is the usual thing, a list of 1- or 2-tuples, where (name,)
    means undefine (-U) macro 'name', and (name,value) means define (-D)
    macro 'name' to 'value'.  'include_dirs' is just a list of directory
    names to be added to the header file search path (-I).  Returns a list
    of command-line options suitable for either Unix compilers or Visual
    C++.
    r*r/zPbad macro definition '%s': each element of 'macros' list must be a 1- or 2-tuplez-U%srNz-D%sz-D%s=%sz-I%s)r&r0r1r2r5)rrrXZmacror9rrrrPs"$��rPcCs�g}|D]}|�|�|��q|D],}|�|�}t|t�rD||}q"|�|�q"|D]V}tj�|�\}}	|r�|�|g|	�}
|
r�|�|
�q�|�	d|�qT|�|�
|��qT|S)acGenerate linker options for searching library directories and
    linking with specific libraries.  'libraries' and 'library_dirs' are,
    respectively, lists of library names (not filenames!) and search
    directories.  Returns a list of command-line options suitable for use
    with some compiler (depending on the two format strings passed in).
    z6no library file corresponding to '%s' found (skipping))r5r�r�r&rMrRrSr�r�r�r�)r�rrrZlib_optsr9�optr�Zlib_dirZlib_nameZlib_filerrr�gen_lib_options8s&


�r�)NN)NNrrr)r�r�rRr�Zdistutils.errorsZdistutils.spawnrZdistutils.file_utilrZdistutils.dir_utilrZdistutils.dep_utilrrZdistutils.utilrr	Z	distutilsr
rr�r�r�r�r�rPr�rrrr�<module>s8
�
--PKX[`=x��-__pycache__/archive_util.cpython-38.opt-2.pycnu�[���U

e5d|!�@s@ddlZddlmZddlZzddlZWnek
r@dZYnXddlmZddlm	Z	ddl
mZddlm
Z
zddlmZWnek
r�dZYnXzddlmZWnek
r�dZYnXd	d
�Zdd�Zd"dd�Zd#dd�Zedgdfedgdfedgdfedgdfedgdfegdfd�Zdd�Zd$d d!�ZdS)%�N)�warn)�DistutilsExecError)�spawn)�mkpath)�log)�getpwnam)�getgrnamcCsNtdks|dkrdSzt|�}Wntk
r8d}YnX|dk	rJ|dSdS�N�)r�KeyError��name�result�r�./usr/lib64/python3.8/distutils/archive_util.py�_get_gids
rcCsNtdks|dkrdSzt|�}Wntk
r8d}YnX|dk	rJ|dSdSr	)rrrrrr�_get_uid+s
r�gzipcs.dddddd�}dddd	d
�}|dk	r:||��kr:td��|d}	|d
krZ|	|�|d�7}	ttj�|	�|d�ddl}
t�	d�t
���t�������fdd�}|s�|
�|	d||�}z|j||d�W5|�
�X|d
k�r*tdt�|	||}
tjdk�r||	|
g}n
|d|	g}t||d�|
S|	S)NZgz�bz2�xz�)r�bzip2rN�compressz.gzz.bz2z.xzz.Z)rrrrzKbad value for 'compress': must be None, 'gzip', 'bzip2', 'xz' or 'compress'z.tarr��dry_runrzCreating tar archivecs,�dk	r�|_�|_�dk	r(�|_�|_|S�N)�gidZgname�uid�uname)Ztarinfo�r�group�ownerrrr�_set_uid_gidasz"make_tarball.<locals>._set_uid_gidzw|%s)�filterz'compress' will be deprecated.Zwin32z-f)�keys�
ValueError�getr�os�path�dirname�tarfiler�inforr�open�close�addr�PendingDeprecationWarning�sys�platformr)�	base_name�base_dirr�verboserr!r Ztar_compressionZcompress_extZarchive_namer*r"�tarZcompressed_name�cmdrrr�make_tarball7sB���
	



r7c
Cs�|d}ttj�|�|d�tdkrp|r.d}nd}ztd|||g|d�Wn tk
rjtd|��YnX�n8t�d||�|�s�ztj	|dtj
d	�}Wn&tk
r�tj	|dtjd	�}YnX|��|tj
k�rtj�tj�|d
��}|�||�t�d|�t�|�D]�\}}	}
|	D]6}tj�tj�||d
��}|�||�t�d|��q|
D]B}tj�tj�||��}tj�|��rV|�||�t�d|��qV�qW5QRX|S)Nz.ziprz-rz-rq�zipzkunable to create zip file '%s': could neither import the 'zipfile' module nor find a standalone zip utilityz#creating '%s' and adding '%s' to it�w)Zcompressionrzadding '%s')rr'r(r)�zipfilerrrr+ZZipFileZZIP_DEFLATED�RuntimeErrorZ
ZIP_STORED�curdir�normpath�join�write�walk�isfile)r2r3r4rZzip_filenameZ
zipoptionsr8r(�dirpathZdirnames�	filenamesr
rrr�make_zipfilesV	�
���
�rD)rrzgzip'ed tar-file)rrzbzip2'ed tar-file)rrzxz'ed tar-file)rrzcompressed tar file)rNzuncompressed tar filezZIP file)ZgztarZbztarZxztarZztarr5r8cCs|D]}|tkr|SqdSr)�ARCHIVE_FORMATS)Zformats�formatrrr�check_archive_formats�s
rGc
Cs�t��}|dk	r6t�d|�tj�|�}|s6t�|�|dkrDtj}d|i}	zt|}
Wn t	k
rxt
d|��YnX|
d}|
dD]\}}
|
|	|<q�|dkr�||	d<||	d<z|||f|	�}W5|dk	r�t�d	|�t�|�X|S)
Nzchanging into '%s'rzunknown archive format '%s'r�r8r!r zchanging back to '%s')r'�getcwdr�debugr(�abspath�chdirr<rErr%)r2rFZroot_dirr3r4rr!r Zsave_cwd�kwargsZformat_info�func�arg�val�filenamerrr�make_archive�s2

rR)rrrNN)rr)NNrrNN)r'�warningsrr0r:�ImportErrorZdistutils.errorsrZdistutils.spawnrZdistutils.dir_utilrZ	distutilsr�pwdrZgrprrrr7rDrErGrRrrrr�<module>sL


�
H
=




�	
�PKX[\�p���"__pycache__/version.cpython-38.pycnu�[���U

e5d90�@s>dZddlZGdd�d�ZGdd�de�ZGdd�de�ZdS)	a�Provides classes to represent module version numbers (one class for
each style of version numbering).  There are currently two such classes
implemented: StrictVersion and LooseVersion.

Every version number class implements the following interface:
  * the 'parse' method takes a string and parses it to some internal
    representation; if the string is an invalid version number,
    'parse' raises a ValueError exception
  * the class constructor takes an optional string argument which,
    if supplied, is passed to 'parse'
  * __str__ reconstructs the string that was passed to 'parse' (or
    an equivalent string -- ie. one that will generate an equivalent
    version number instance)
  * __repr__ generates Python code to recreate the version number instance
  * _cmp compares the current instance with either another instance
    of the same class or a string (which will be parsed to an instance
    of the same class, thus must follow the same rules)
�Nc@sJeZdZdZddd�Zdd�Zdd�Zd	d
�Zdd�Zd
d�Z	dd�Z
dS)�Versionz�Abstract base class for version numbering classes.  Just provides
    constructor (__init__) and reproducer (__repr__), because those
    seem to be the same for all version numbering classes; and route
    rich comparisons to _cmp.
    NcCs|r|�|�dS�N��parse��self�vstring�r	�)/usr/lib64/python3.8/distutils/version.py�__init__&szVersion.__init__cCsd|jjt|�fS)Nz	%s ('%s'))�	__class__�__name__�str�rr	r	r
�__repr__*szVersion.__repr__cCs|�|�}|tkr|S|dkS�Nr��_cmp�NotImplemented�r�other�cr	r	r
�__eq__-s
zVersion.__eq__cCs|�|�}|tkr|S|dkSrrrr	r	r
�__lt__3s
zVersion.__lt__cCs|�|�}|tkr|S|dkSrrrr	r	r
�__le__9s
zVersion.__le__cCs|�|�}|tkr|S|dkSrrrr	r	r
�__gt__?s
zVersion.__gt__cCs|�|�}|tkr|S|dkSrrrr	r	r
�__ge__Es
zVersion.__ge__)N)r
�
__module__�__qualname__�__doc__rrrrrrrr	r	r	r
rs
rc@s<eZdZdZe�dejejB�Zdd�Z	dd�Z
dd�Zd	S)
�
StrictVersiona?Version numbering for anal retentives and software idealists.
    Implements the standard interface for version number classes as
    described above.  A version number consists of two or three
    dot-separated numeric components, with an optional "pre-release" tag
    on the end.  The pre-release tag consists of the letter 'a' or 'b'
    followed by a number.  If the numeric components of two version
    numbers are equal, then one with a pre-release tag will always
    be deemed earlier (lesser) than one without.

    The following are valid version numbers (shown in the order that
    would be obtained by sorting according to the supplied cmp function):

        0.4       0.4.0  (these two are equivalent)
        0.4.1
        0.5a1
        0.5b3
        0.5
        0.9.6
        1.0
        1.0.4a3
        1.0.4b1
        1.0.4

    The following are examples of invalid version numbers:

        1
        2.7.2.2
        1.3.a4
        1.3pl1
        1.3c4

    The rationale for this version numbering system will be explained
    in the distutils documentation.
    z)^(\d+) \. (\d+) (\. (\d+))? ([ab](\d+))?$cCs�|j�|�}|std|��|�ddddd�\}}}}}|rTttt|||g��|_nttt||g��d|_|r�|dt|�f|_nd|_dS)	Nzinvalid version number '%s'�����)rr)	�
version_re�match�
ValueError�group�tuple�map�int�version�
prerelease)rrr'�major�minorZpatchr.Zprerelease_numr	r	r
r�s�zStrictVersion.parsecCsb|jddkr*d�tt|jdd���}nd�tt|j��}|jr^||jdt|jd�}|S)Nr"r�.r!)r-�joinr+rr.rr	r	r
�__str__�szStrictVersion.__str__cCs�t|t�rt|�}|j|jkr2|j|jkr.dSdS|jsB|jsBdS|jrR|jsRdS|jsb|jrbdS|jr�|jr�|j|jkr~dS|j|jkr�dSdSnds�td��dS)N���r!rFznever get here)�
isinstancerr r-r.�AssertionError�rrr	r	r
r�s&
zStrictVersion._cmpN)r
rrr�re�compile�VERBOSE�ASCIIr&rr3rr	r	r	r
r ]s#
�
r c@sHeZdZdZe�dej�Zddd�Zdd�Z	dd	�Z
d
d�Zdd
�ZdS)�LooseVersiona�Version numbering for anarchists and software realists.
    Implements the standard interface for version number classes as
    described above.  A version number consists of a series of numbers,
    separated by either periods or strings of letters.  When comparing
    version numbers, the numeric components will be compared
    numerically, and the alphabetic components lexically.  The following
    are all valid version numbers, in no particular order:

        1.5.1
        1.5.2b2
        161
        3.10a
        8.02
        3.4j
        1996.07.12
        3.2.pl0
        3.1.1.6
        2g6
        11g
        0.960923
        2.2beta29
        1.13++
        5.5.kw
        2.0b1pl0

    In fact, there is no such thing as an invalid version number under
    this scheme; the rules for comparison are simple and predictable,
    but may not always give the results you want (for some definition
    of "want").
    z(\d+ | [a-z]+ | \.)NcCs|r|�|�dSrrrr	r	r
r.szLooseVersion.__init__c	Cs^||_dd�|j�|�D�}t|�D].\}}zt|�||<Wq$tk
rPYq$Xq$||_dS)NcSsg|]}|r|dkr|�qS)r1r	)�.0�xr	r	r
�
<listcomp>8s�z&LooseVersion.parse.<locals>.<listcomp>)r�component_re�split�	enumerater,r(r-)rrZ
components�i�objr	r	r
r3szLooseVersion.parsecCs|jSr)rrr	r	r
r3CszLooseVersion.__str__cCsdt|�S)NzLooseVersion ('%s'))rrr	r	r
rGszLooseVersion.__repr__cCsFt|t�rt|�}|j|jkr"dS|j|jkr2dS|j|jkrBdSdS)Nrr4r!)r5rr<r-r7r	r	r
rKs
zLooseVersion._cmp)N)
r
rrrr8r9r:r@rrr3rrr	r	r	r
r<s
r<)rr8rr r<r	r	r	r
�<module>
s
>/PKX[6��1�2�2(__pycache__/_msvccompiler.cpython-38.pycnu�[���U

e5dRN�@s�dZddlZddlZddlZddlZddlZddlmZmZm	Z	m
Z
mZddlm
Z
mZddlmZddlmZddlmZdd	�Zd
d�Zdd
ddd�Zdd�Zdd�Zddd�Zddddd�ZGdd�de
�ZdS)adistutils._msvccompiler

Contains MSVCCompiler, an implementation of the abstract CCompiler class
for Microsoft Visual Studio 2015.

The module is compatible with VS 2015 and later. You can find legacy support
for older versions in distutils.msvc9compiler and distutils.msvccompiler.
�N)�DistutilsExecError�DistutilsPlatformError�CompileError�LibError�	LinkError)�	CCompiler�gen_lib_options)�log)�get_platform)�countcCsztjtjdtjtjBd�}Wn tk
r>t�d�YdSXd}d}|��t�D]�}zt�	||�\}}}Wntk
r�Yq�YnX|rT|tj
krTtj�
|�rTztt|��}Wnttfk
r�YqTYnX|dkrT||krT||}}qTW5QRX||fS)Nz'Software\Microsoft\VisualStudio\SxS\VC7)�accesszVisual C++ is not registered�NNr�)�winregZ	OpenKeyEx�HKEY_LOCAL_MACHINEZKEY_READZKEY_WOW64_32KEY�OSErrorr	�debugrZ	EnumValueZREG_SZ�os�path�isdir�int�float�
ValueError�	TypeError)�key�best_version�best_dir�i�vZvc_dirZvt�version�r �//usr/lib64/python3.8/distutils/_msvccompiler.py�_find_vc2015s2
�



r"c
Cs�ddl}tj�d�ptj�d�}|s(dSz8tjtj�|ddd�d	d
ddd
dddg	ddd���}Wntj	t
tfk
r~YdSXtj�|ddd�}tj�|�r�d|fSdS)aJReturns "15, path" based on the result of invoking vswhere.exe
    If no install is found, returns "None, None"

    The version is returned to avoid unnecessarily changing the function
    result. It may be ignored when the path is not None.

    If vswhere.exe is not available, by definition, VS 2017 is not
    installed.
    rNzProgramFiles(x86)ZProgramFilesr
zMicrosoft Visual StudioZ	Installerzvswhere.exez-latestz-prereleasez	-requiresz1Microsoft.VisualStudio.Component.VC.Tools.x86.x64z	-propertyZinstallationPathz	-products�*�mbcs�strict)�encoding�errorsZVCZ	AuxiliaryZBuild�)
�jsonr�environ�get�
subprocess�check_outputr�join�strip�CalledProcessErrorr�UnicodeDecodeErrorr)r)�rootrr r r!�_find_vc2017:s2
��r3�x86Zx64ZarmZarm64)r4�	x86_amd64�x86_arm�	x86_arm64cCs\t�\}}|st�\}}|s*t�d�dStj�|d�}tj�|�sTt�d|�dS|dfS)Nz$No suitable Visual C++ version foundr
z
vcvarsall.batz%s cannot be found)r3r"r	rrrr.�isfile)�	plat_spec�_rr�	vcvarsallr r r!�_find_vcvarsallcs


r<c
Cs�t�d�rdd�tj��D�St|�\}}|s6td��z&tjd�||�tj	d�j
ddd	�}Wn@tjk
r�}z t�
|j�td
�|j���W5d}~XYnXdd�dd
�|��D�D�}|S)NZDISTUTILS_USE_SDKcSsi|]\}}|��|�qSr ��lower)�.0r�valuer r r!�
<dictcomp>ws�z_get_vc_env.<locals>.<dictcomp>zUnable to find vcvarsall.batzcmd /u /c "{}" {} && set)�stderrzutf-16le�replace)r'zError executing {}cSs$i|]\}}}|r|r|��|�qSr r=)r?rr:r@r r r!rA�s
�css|]}|�d�VqdS)�=N)�	partition)r?�liner r r!�	<genexpr>�sz_get_vc_env.<locals>.<genexpr>)r�getenvr*�itemsr<rr,r-�formatZSTDOUT�decoder0r	�error�output�cmd�
splitlines)r9r;r:�out�exc�envr r r!�_get_vc_envus0
�
��
��rScCsN|st�d��tj�}|D].}tj�tj�|�|�}tj�|�r|Sq|S)atReturn path to an MSVC executable program.

    Tries to find the program in several places: first, one of the
    MSVC program search paths from the registry; next, the directories
    in the PATH environment variable.  If any of those work, return an
    absolute path that is known to exist.  If none of them work, just
    return the original program name, 'exe'.
    r)rrH�split�pathseprr.�abspathr8)Zexe�paths�p�fnr r r!�	_find_exe�s	
rZr5r6r7)Zwin32z	win-amd64z	win-arm32z	win-arm64c
s�eZdZdZdZiZdgZdddgZdgZdgZ	eeee	Z
d	Zd
ZdZ
dZd
ZZdZd(dd�Zd)dd�Zd*dd�Zd+dd�Zd,dd�Zd-dd�Z�fdd�Zd d!�Zd"d#�Zd$d%�Zd.d&d'�Z�ZS)/�MSVCCompilerzwConcrete class that implements an interface to Microsoft Visual C++,
       as defined by the CCompiler abstract class.Zmsvcz.cz.ccz.cppz.cxx�.rcz.mcz.resz.objz.libz.dllz%s%sz.exercCs t�||||�d|_d|_dS)NF)r�__init__�	plat_name�initialized)�self�verboseZdry_runZforcer r r!r]�szMSVCCompiler.__init__NcCs
|jrtd��|dkrt�}|tkr6td�tt����t|}t|�}|sRtd��|�dd�|_	|j	�
tj�}t
d|�|_t
d|�|_t
d|�|_t
d	|�|_t
d
|�|_t
d|�|_|�dd��
tj�D]}|r�|�|�tj��q�|�d
d��
tj�D]}|r�|�|�tj��q�d|_ddddddg|_ddddddg|_dddg}ddddg}|d!�|_|d"�|_|d#�|_|d$�|_|�|_|�|_ t!j"df|jt!j"df|jt!j"d f|jt!j#df|jt!j#df|jt!j#d f|jt!j$df|jt!j$df|jt!j$d f|j i	|_%d |_dS)%Nzdon't init multiple timesz--plat-name must be one of {}z7Unable to find a compatible Visual Studio installation.r�zcl.exezlink.exezlib.exezrc.exezmc.exezmt.exeZinclude�libz/nologoz/Oxz/W3z/GLz/DNDEBUGz/MDz/Odz/MDdz/Ziz/D_DEBUGz/INCREMENTAL:NOz/LTCGz/DEBUG:FULL�/MANIFEST:EMBED,ID=1�/DLL�/MANIFEST:EMBED,ID=2�/MANIFESTUAC:NOFT)rd)rd)rerfrg)rerfrg)&r_�AssertionErrorr
�PLAT_TO_VCVARSrrJ�tuplerSr+�_pathsrTrrUrZ�cc�linkerrc�rc�mcZmtZadd_include_dir�rstrip�sepZadd_library_dirZpreprocess_options�compile_options�compile_options_debugZldflags_exeZldflags_exe_debugZldflags_sharedZldflags_shared_debugZldflags_staticZldflags_static_debugrZ
EXECUTABLEZ
SHARED_OBJECTZSHARED_LIBRARY�_ldflags)r`r^r9Zvc_envrW�dir�ldflagsZ
ldflags_debugr r r!�
initialize�s������



�zMSVCCompiler.initializerbcsT�fdd��jD��fdd��j�jD����p4d����fdd�}tt||��S)Ncsi|]}|�j�qSr )�
obj_extension�r?�ext�r`r r!rA&sz1MSVCCompiler.object_filenames.<locals>.<dictcomp>csi|]}|�j�qSr )�
res_extensionryr{r r!rA'srbcs�tj�|�\}}�r"tj�|�}n2tj�|�\}}|�tjjtjjf�rT|dd�}ztj��|�|�WSt	k
r�t
d�|���YnXdS)N�zDon't know how to compile {})rr�splitext�basename�
splitdrive�
startswithrq�altsepr.�LookupErrorrrJ)rX�baserzr:)�ext_map�
output_dir�	strip_dirr r!�
make_out_path,sz4MSVCCompiler.object_filenames.<locals>.make_out_path)�src_extensions�_rc_extensions�_mc_extensions�list�map)r`Zsource_filenamesr�r�r�r )r�r�r`r�r!�object_filenames!s�zMSVCCompiler.object_filenamesc	Cs�|js|��|�||||||�}	|	\}}
}}}|p6g}
|
�d�|rT|
�|j�n|
�|j�d}|
D�]}z||\}}Wntk
r�YqhYnX|r�tj	�
|�}||jkr�d|}�nD||jkr�d|}d}�n*||j
k�r@|}d|}z|�|jg|||g�Wqhtk
�r:}zt|��W5d}~XYqhXqhn�||jk�r�tj	�|�}tj	�|�}z\|�|jd|d||g�tj	�tj	�|��\}}tj	�||d	�}|�|jd||g�Wqhtk
�r�}zt|��W5d}~XYqhXqhntd
�||���|jg|
|}|�r"|�d�|�|�|�d|�|�|�z|�|�Wqhtk
�r~}zt|��W5d}~XYqhXqh|
S)
Nz/cFz/Tcz/TpTz/foz-hz-rr\z"Don't know how to compile {} to {}z/EHscz/Fo)r_rwZ_setup_compile�append�extendrsrr�KeyErrorrrrV�
_c_extensions�_cpp_extensionsr��spawnrnrrr��dirnameror~rr.rJrl)r`Zsourcesr�ZmacrosZinclude_dirsr�
extra_preargs�extra_postargsZdependsZcompile_info�objectsZpp_optsZbuildZcompile_optsZadd_cpp_opts�obj�srcrzZ	input_optZ
output_opt�msgZh_dirZrc_dirr�r:Zrc_file�argsr r r!�compileBsx
�




�


zMSVCCompiler.compilec	
Cs�|js|��|�||�\}}|j||d�}|�||�r�|d|g}|rJz,t�d|jd�|��|�	|jg|�Wq�t
k
r�}zt|��W5d}~XYq�Xnt�d|�dS)N)r��/OUT:�Executing "%s" %s� �skipping %s (up-to-date))r_rw�_fix_object_args�library_filename�
_need_linkr	rrcr.r�rr)	r`r�Zoutput_libnamer�r�target_lang�output_filenameZlib_argsr�r r r!�create_static_lib�s�zMSVCCompiler.create_static_libc
Cs�|js|��|�||�\}}|�|||�}|\}}}|rL|�dt|��t||||�}|dk	rptj�	||�}|�
||��r�|j||	f}dd�|p�gD�}||||d|g}tj�|d�}|dk	�rtj�
tj�|��\}}tj�	||�|��}|�d|�|
�r|
|dd�<|�r.|�|�tj�tj�|��}|�|�z,t�d|jd�	|��|�|jg|�Wn,tk
�r�}zt|��W5d}~XYnXnt�d	|�dS)
Nz5I don't know what to do with 'runtime_library_dirs': cSsg|]}d|�qS)z/EXPORT:r )r?Zsymr r r!�
<listcomp>�sz%MSVCCompiler.link.<locals>.<listcomp>r�rz/IMPLIB:r�r�r�)r_rwr�Z
_fix_lib_args�warn�strrrrr.r�rtr�r~rr�r�r�rVZmkpathr	rrmr�rr)r`Ztarget_descr�r�r�Z	librariesZlibrary_dirsZruntime_library_dirsZexport_symbolsrr�r�Z
build_tempr�Z
fixed_argsZlib_optsrvZexport_optsZld_argsZdll_nameZdll_extZimplib_filer�r r r!�link�s`�
��
��

��

zMSVCCompiler.linkc	s8t�d�}z|jtjd<t��|�W�S|tjd<XdS)Nr)rrHr*rk�superr�)r`rNZold_path��	__class__r r!r��s

zMSVCCompiler.spawncCsd|S)Nz	/LIBPATH:r �r`rur r r!�library_dir_optionszMSVCCompiler.library_dir_optioncCstd��dS)Nz:don't know how to set runtime library search path for MSVC)rr�r r r!�runtime_library_dir_option
s�z'MSVCCompiler.runtime_library_dir_optioncCs
|�|�S)N)r�)r`rcr r r!�library_optionszMSVCCompiler.library_optioncCs\|r|d|g}n|g}|D]:}|D]0}tj�||�|��}tj�|�r$|Sq$qdS)NZ_d)rrr.r�r8)r`�dirsrcrZ	try_namesru�nameZlibfiler r r!�find_library_fileszMSVCCompiler.find_library_file)rrr)N)rrb)NNNrNNN)NrN)
NNNNNrNNNN)r)�__name__�
__module__�__qualname__�__doc__Z
compiler_typeZexecutablesr�r�r�r�r�r|rxZstatic_lib_extensionZshared_lib_extensionZstatic_lib_formatZshared_lib_formatZ
exe_extensionr]rwr�r�r�r�r�r�r�r�r��
__classcell__r r r�r!r[�sf
��

P�
"�
]�
�
Er[)N)r�rZshutil�statr,rZdistutils.errorsrrrrrZdistutils.ccompilerrrZ	distutilsr	Zdistutils.utilr
�	itertoolsrr"r3ZPLAT_SPEC_TO_RUNTIMEr<rSrZrir[r r r r!�<module>s4#�
�PKX[|�W�!�!*__pycache__/sysconfig.cpython-38.opt-2.pycnu�[���U

��.eP�@s�ddlZddlZddlZddlZddlmZddlmZmZej	�
ej�Zej	�
ej
�Zej	�
ej�Zej	�
ej�Zdejkr�ej	�ejd�Zn&ejr�ej	�ej	�ej��Zne��Zdd�Zeedd�Zejd	kr�d
d�Zee�Zee�Zdd
�Ze�ZdZ ze�sej!Z Wne"k
�r&YnXdd�Z#d,dd�Z$d-dd�Z%dd�Z&dd�Z'dd�Z(d.dd�Z)e�*d�Z+e�*d�Z,e�*d�Z-d/d d!�Z.d"d#�Z/da0d$d%�Z1d&d'�Z2d(d)�Z3d*d+�Z4dS)0�N�)�DistutilsPlatformError)�get_platform�get_host_platformZ_PYTHON_PROJECT_BASEcCs,dD]"}tj�tj�|d|��rdSqdS)N)ZSetupzSetup.localZModulesTF)�os�path�isfile�join)�d�fn�r�+/usr/lib64/python3.8/distutils/sysconfig.py�_is_python_source_dir+sr�_home�ntcCs0|r,tj�|��tj�tj�td���r,tS|S)NZPCbuild)rr�normcase�
startswithr	�PREFIX)r
rrr
�_fix_pcbuild4s
�rcCstrtt�Stt�S)N)�	_sys_homer�project_baserrrr
�
_python_build<sr�cCsdtjdd�S)Nz%d.%d�)�sys�version_inforrrr
�get_python_versionPsrcCs�|dkr|rtpt}tjdkrjtrL|r.tp,tStj�t	d�d�}tj�
|�Sdt�t}tj�|d|�Stjdkr�tr�tj�|d�tjj
tj�|d�Stj�|d�Stdtj��dS)	N�posix�srcdirZInclude�pythonZincluder�PCzFI don't know where Python installs its C header files on platform '%s')�BASE_EXEC_PREFIX�BASE_PREFIXr�name�python_buildrrrr	�get_config_var�normpathr�build_flags�pathsepr)�
plat_specific�prefixZincdirZ
python_dirrrr
�get_python_incXs*

���r+cCs�|dkr&|r|rtpt}n|r"tp$t}tjdkrp|s8|r>d}nd}tj�||dt��}|r`|Stj�|d�Sn<tjdkr�|r�tj�|d�Stj�|dd�Snt	dtj��dS)	Nr�lib64�librz
site-packagesrZLibz?I don't know where Python installs its library on platform '%s')
r!r"�EXEC_PREFIXrrr#rr	rr)r)�standard_libr*r-Z	libpythonrrr
�get_python_lib�s0
�
��r0c	Cs�|jdk�r�tjdkr8td�s8ddl}|�t�dtd<tdddd	d
ddd
�\}}}}}}}}	dtj	kr�tj	d}
tjdkr�d
tj	kr�|�
|�r�|
|t|�d�}|
}dtj	kr�tj	d}d
tj	kr�tj	d
}dtj	kr�tj	d}n|d}dtj	k�r|dtj	d}dtj	k�r<|dtj	d}|dtj	d}dtj	k�r~|dtj	d}|dtj	d}|dtj	d}dtj	k�r�tj	d}d
tj	k�r�|dtj	d
}n|d|	}|d|}
|j||
|
d|||||d�||_
dS)NZunix�darwinZCUSTOMIZED_OSX_COMPILERr�TrueZCCZCXX�CFLAGSZCCSHAREDZLDSHAREDZSHLIB_SUFFIXZARZARFLAGSZCPPz -E�LDFLAGS� �CPPFLAGS)Zpreprocessor�compilerZcompiler_soZcompiler_cxxZ	linker_soZ
linker_exe�archiver)Z
compiler_typer�platformr%�_osx_support�customize_compiler�_config_vars�get_config_varsr�environr�lenZset_executablesZshared_lib_extension)r7r:ZccZcxxZcflagsZccsharedZldsharedZshlib_suffixZarZar_flagsZnewccZcppr8Zcc_cmdrrr
r;�sn

��


��






�	r;cCsDtr,tjdkr"tj�tptd�}q6tp(t}n
tdd�}tj�|d�S)Nrr r�r)z
pyconfig-64.h)r$rr#rr	rrr+)Zinc_dirrrr
�get_config_h_filename�s


rAcCs\trtj�tptd�Stddd�}d�t�t	�}t
tjd�rL|dtjj
7}tj�||d�S)NZMakefilerr�r)r/zconfig-{}{}�
_multiarchz-%s)r$rrr	rrr0�formatrr'�hasattrr�implementationrC)Zlib_dirZconfig_filerrr
�get_makefile_filenamesrGcCs�|dkri}t�d�}t�d�}|��}|s.q�|�|�}|rx|�dd�\}}zt|�}Wntk
rlYnX|||<q |�|�}|r d||�d�<q |S)Nz"#define ([A-Z][A-Za-z0-9_]+) (.*)
z&/[*] #undef ([A-Z][A-Za-z0-9_]+) [*]/
rrr)�re�compile�readline�match�group�int�
ValueError)�fp�gZ	define_rxZundef_rx�line�m�n�vrrr
�parse_config_hs&




rUz"([a-zA-Z][a-zA-Z0-9_]+)\s*=\s*(.*)z\$\(([A-Za-z][A-Za-z0-9_]*)\)z\${([A-Za-z][A-Za-z0-9_]*)}c	Cs�ddlm}||ddddd�}|dkr*i}i}i}|��}|dkrDq�t�|�}|r2|�dd�\}}	|	��}	|	�dd�}
d	|
kr�|	||<q2zt|	�}	Wn$t	k
r�|	�dd	�||<Yq2X|	||<q2d
}|�rtt
|�D�]�}||}
t�|
�p�t
�|
�}|�rj|�d�}d}||k�r$t||�}n�||k�r4d}nx|tjk�rLtj|}n`||k�r�|�d
��rz|dd�|k�rzd}n$d
||k�r�d}nt|d
|�}nd||<}|�rp|
|��d�}|
d|���||}
d	|k�r�|
||<nzzt|
�}
Wn"t	k
�r|
��||<Yn
X|
||<||=|�d
��rp|dd�|k�rp|dd�}||k�rp|
||<q�||=q�q�|��|��D]"\}}	t|	t��r�|	��||<�q�|�|�|S)Nr)�TextFiler�surrogateescape)Zstrip_commentsZskip_blanksZ
join_lines�errorsrz$$r�$)r3r4r6TFZPY_�)Zdistutils.text_filerVrJ�_variable_rxrKrL�strip�replacerMrN�list�_findvar1_rx�search�_findvar2_rx�strrr>r�end�start�close�items�
isinstance�update)rrPrVrOZdoneZnotdonerQrRrSrTZtmpvZrenamed_variablesr#�value�found�itemZafter�krrr
�parse_makefile/s�








�



rmcCsVt�|�pt�|�}|rR|��\}}|d|�|�|�d��||d�}qqRq|S)Nrr)r_r`ra�span�getrL)�s�varsrRZbegrcrrr
�expand_makefile_vars�s*rrc
CsVtj�ddjtjtjttjdd�d��}t	|t
�t�dgd�}|j}ia
t
�|�dS)NZ_PYTHON_SYSCONFIGDATA_NAMEz+_sysconfigdata_{abi}_{platform}_{multiarch}rCr)Zabir9Z	multiarch�build_time_varsr)rr>rorDr�abiflagsr9�getattrrF�
__import__�globals�localsrsr<rh)r#Z_temprsrrr
�_init_posix�s��rycCs~i}tddd�|d<tddd�|d<tdd�|d<t��d|d<d	|d
<t��dd�|d
<tj�tj�	t
j��|d<|adS)NrrrBZLIBDESTZ
BINLIBDESTr@Z	INCLUDEPY�
EXT_SUFFIXz.exeZEXE�.rZVERSIONZBINDIR)
r0r+�_imp�extension_suffixesrr]rr�dirname�abspathr�
executabler<)rPrrr
�_init_nt�sr�cGs\tdk�r*t��dtj�}|r(|�niattd<ttd<t�d�}|dk	rV|td<t�dt�}tjdkr�tr�tj	�
t��}tj	�||�}ntj	�
t��}tj	�
tj	�|��td<t�rtjdk�rt}tj	�td��s|t��k�rtj	�|td�}tj	�|�td<tjdk�r*d	dl}|�t�|�rTg}|D]}|�t�|���q8|StSdS)
NZ_init_r*�exec_prefixrz�SOrrr1r)r<rwrorr#rr.rr$rr~rGr	rr&�isabs�getcwdrr9r:Zcustomize_config_vars�append)�args�funcr�r�baser:Zvalsr#rrr
r=�sB



�
r=cCs*|dkrddl}|�dtd�t��|�S)Nr�rz SO is deprecated, use EXT_SUFFIXr)�warnings�warn�DeprecationWarningr=ro)r#r�rrr
r%!sr%)rN)rrN)N)N)5r|rrHrrXr�utilrrrr&r*rr�r.�base_prefixr"�base_exec_prefixr!r>rrr�r~r�rrurr#rrr$r'rt�AttributeErrorrr+r0r;rArGrUrIr[r_rarmrrr<ryr�r=r%rrrr
�<module>sZ



(
+I





jJPKX[e9-1__pycache__/versionpredicate.cpython-38.opt-1.pycnu�[���U

e5d
�@s�dZddlZddlZddlZe�dej�Ze�d�Ze�d�Z	dd�Z
ejejej
ejejejd�ZGd	d
�d
�Zdadd�ZdS)
zBModule for parsing and testing package version predicate strings.
�Nz'(?i)^\s*([a-z_]\w*(?:\.[a-z_]\w*)*)(.*)z^\s*\((.*)\)\s*$z%^\s*(<=|>=|<|>|!=|==)\s*([^\s,]+)\s*$cCs6t�|�}|std|��|��\}}|tj�|�fS)zVParse a single version comparison.

    Return (comparison string, StrictVersion)
    z"bad package restriction syntax: %r)�re_splitComparison�match�
ValueError�groups�	distutils�version�
StrictVersion)�pred�res�compZverStr�r�2/usr/lib64/python3.8/distutils/versionpredicate.py�splitUps

r)�<z<=z==�>z>=z!=c@s(eZdZdZdd�Zdd�Zdd�ZdS)	�VersionPredicatea�Parse and test package version predicates.

    >>> v = VersionPredicate('pyepat.abc (>1.0, <3333.3a1, !=1555.1b3)')

    The `name` attribute provides the full dotted name that is given::

    >>> v.name
    'pyepat.abc'

    The str() of a `VersionPredicate` provides a normalized
    human-readable version of the expression::

    >>> print(v)
    pyepat.abc (> 1.0, < 3333.3a1, != 1555.1b3)

    The `satisfied_by()` method can be used to determine with a given
    version number is included in the set described by the version
    restrictions::

    >>> v.satisfied_by('1.1')
    True
    >>> v.satisfied_by('1.4')
    True
    >>> v.satisfied_by('1.0')
    False
    >>> v.satisfied_by('4444.4')
    False
    >>> v.satisfied_by('1555.1b3')
    False

    `VersionPredicate` is flexible in accepting extra whitespace::

    >>> v = VersionPredicate(' pat( ==  0.1  )  ')
    >>> v.name
    'pat'
    >>> v.satisfied_by('0.1')
    True
    >>> v.satisfied_by('0.2')
    False

    If any version numbers passed in do not conform to the
    restrictions of `StrictVersion`, a `ValueError` is raised::

    >>> v = VersionPredicate('p1.p2.p3.p4(>=1.0, <=1.3a1, !=1.2zb3)')
    Traceback (most recent call last):
      ...
    ValueError: invalid version number '1.2zb3'

    It the module or package name given does not conform to what's
    allowed as a legal module or package name, `ValueError` is
    raised::

    >>> v = VersionPredicate('foo-bar')
    Traceback (most recent call last):
      ...
    ValueError: expected parenthesized list: '-bar'

    >>> v = VersionPredicate('foo bar (12.21)')
    Traceback (most recent call last):
      ...
    ValueError: expected parenthesized list: 'bar (12.21)'

    cCs�|��}|std��t�|�}|s.td|��|��\|_}|��}|r�t�|�}|sbtd|��|��d}dd�|�d�D�|_|js�td|��ng|_d	S)
z*Parse a version predicate string.
        zempty package restrictionzbad package name in %rzexpected parenthesized list: %rrcSsg|]}t|��qSr)r)�.0ZaPredrrr
�
<listcomp>tsz-VersionPredicate.__init__.<locals>.<listcomp>�,zempty parenthesized list in %rN)	�stripr�re_validPackagerr�name�re_paren�splitr	)�selfZversionPredicateStrrZparen�strrrr
�__init__`s&

�zVersionPredicate.__init__cCs8|jr.dd�|jD�}|jdd�|�dS|jSdS)NcSs g|]\}}|dt|��qS)� )r)r�cond�verrrr
r}sz,VersionPredicate.__str__.<locals>.<listcomp>z (z, �))r	r�join)r�seqrrr
�__str__{szVersionPredicate.__str__cCs(|jD]\}}t|||�sdSqdS)z�True if version is compatible with all the predicates in self.
        The parameter version must be acceptable to the StrictVersion
        constructor.  It may be either a string or StrictVersion.
        FT)r	�compmap)rrrrrrr
�satisfied_by�szVersionPredicate.satisfied_byN)�__name__�
__module__�__qualname__�__doc__rr#r%rrrr
rs@rcCsdtdkrt�dtj�a|��}t�|�}|s8td|��|�d�pDd}|rVtj	�
|�}|�d�|fS)a9Return the name and optional version number of a provision.

    The version number, if given, will be returned as a `StrictVersion`
    instance, otherwise it will be `None`.

    >>> split_provision('mypkg')
    ('mypkg', None)
    >>> split_provision(' mypkg( 1.2 ) ')
    ('mypkg', StrictVersion ('1.2'))
    Nz=([a-zA-Z_]\w*(?:\.[a-zA-Z_]\w*)*)(?:\s*\(\s*([^)\s]+)\s*\))?$z"illegal provides specification: %r��)�
_provision_rx�re�compile�ASCIIrrr�grouprrr)�value�mrrrr
�split_provision�s�
r3)r)r-Zdistutils.versionr�operatorr.r/rrrr�lt�le�eq�gt�ge�ner$rr,r3rrrr
�<module>s"�

�nPKX[��ES��&__pycache__/debug.cpython-38.opt-1.pycnu�[���U

e5d��@sddlZej�d�ZdS)�NZDISTUTILS_DEBUG)�os�environ�get�DEBUG�rr�'/usr/lib64/python3.8/distutils/debug.py�<module>sPKX[�Ɓ�k
k
*__pycache__/extension.cpython-38.opt-2.pycnu�[���U

e5d)�@s*ddlZddlZGdd�d�Zdd�ZdS)�Nc@seZdZddd�Zdd�ZdS)�	ExtensionNcKst|t�std��t|t�r.tdd�|D��s6td��||_||_|pHg|_|pRg|_|p\g|_	|pfg|_
|ppg|_|pzg|_|	p�g|_
|
p�g|_|p�g|_|p�g|_|
p�g|_|p�g|_||_||_t|�dk�rdd�|D�}d�t|��}d	|}t�|�dS)
Nz'name' must be a stringcss|]}t|t�VqdS)N)�
isinstance�str)�.0�v�r�+/usr/lib64/python3.8/distutils/extension.py�	<genexpr>jsz%Extension.__init__.<locals>.<genexpr>z#'sources' must be a list of stringsrcSsg|]}t|��qSr)�repr)rZoptionrrr�
<listcomp>�sz&Extension.__init__.<locals>.<listcomp>z, zUnknown Extension options: %s)rr�AssertionError�list�all�name�sources�include_dirs�
define_macros�undef_macros�library_dirs�	libraries�runtime_library_dirs�
extra_objects�extra_compile_args�extra_link_args�export_symbols�	swig_opts�depends�language�optional�len�join�sorted�warnings�warn)�selfrrrrrrrrrrrrrrrr�kwZoptions�msgrrr�__init__Vs6

�











zExtension.__init__cCsd|jj|jj|jt|�fS)Nz<%s.%s(%r) at %#x>)�	__class__�
__module__�__qualname__r�id)r$rrr�__repr__�s�zExtension.__repr__)NNNNNNNNNNNNNN)�__name__r)r*r'r,rrrrrs D�
/rcCs�ddlm}m}m}ddlm}ddlm}||�}||dddddd�}�z^g}|�	�}	|	dkrd�q�|�
|	�rpqP|	d|	dkr�dkr�nn|�d	|	�qP||	|�}	||	�}
|
d}t|g�}d}
|
dd�D�]�}|
dk	r�|
�
|�d}
q�tj�|�d}|dd
�}|d
d�}|dk�r2|j�
|�q�|dk�rJ|j�
|�q�|d
k�r�|�d�}|dk�rz|j�
|df�n$|j�
|d|�||d
d�f�q�|dk�r�|j�
|�q�|dk�r�|j�
|�q�|dk�r�|j�
|�q�|dk�r|j�
|�q�|dk�r|j�
|�q�|dk�r*|j}
q�|dk�r<|j}
q�|dk�rN|j}
q�|dk�rr|j�
|�|�s�|j}
q�|dk�r�|j�
|�q�|�d|�q�|�
|�qPW5|��X|S)Nr)�parse_makefile�expand_makefile_vars�_variable_rx)�TextFile)�split_quoted�)Zstrip_commentsZskip_blanksZ
join_linesZ	lstrip_wsZ	rstrip_ws����*z'%s' lines not handled yet�)z.cz.ccz.cppz.cxxz.c++z.mz.mmz-Iz-D�=z-Uz-Cz-lz-Lz-Rz-rpathz-Xlinkerz
-Xcompilerz-u)z.az.soz.slz.oz.dylibzunrecognized argument '%s')Zdistutils.sysconfigr.r/r0Zdistutils.text_filer1Zdistutils.utilr2�close�readline�matchr#r�append�os�path�splitextrr�findrrrrrrrr)�filenamer.r/r0r1r2�vars�file�
extensions�lineZwords�moduleZextZappend_next_wordZword�suffixZswitch�valueZequalsrrr�read_setup_file�s��
 







�










rH)r<r"rrHrrrr�<module>szPKX[4��!�
�
!__pycache__/config.cpython-38.pycnu�[���U

e5d��@s<dZddlZddlmZddlmZdZGdd�de�ZdS)z�distutils.pypirc

Provides the PyPIRCCommand class, the base class for the command classes
that uses .pypirc in the distutils.command package.
�N)�RawConfigParser)�CommandzE[distutils]
index-servers =
    pypi

[pypi]
username:%s
password:%s
c@sheZdZdZdZdZdZdZdddefdgZd	gZ	d
d�Z
dd
�Zdd�Zdd�Z
dd�Zdd�ZdS)�
PyPIRCCommandz;Base command that knows how to handle the .pypirc file
    zhttps://upload.pypi.org/legacy/�pypiNzrepository=�rzurl of repository [default: %s])�
show-responseNz&display full response text from serverrcCstj�tj�d�d�S)zReturns rc file path.�~z.pypirc)�os�path�join�
expanduser��self�r�(/usr/lib64/python3.8/distutils/config.py�_get_rc_file&szPyPIRCCommand._get_rc_filec	CsH|��}t�t�|tjtjBd�d��}|�t||f�W5QRXdS)zCreates a default .pypirc file.i��wN)rr	�fdopen�open�O_CREAT�O_WRONLY�write�DEFAULT_PYPIRC)r�username�password�rc�frrr�
_store_pypirc*s zPyPIRCCommand._store_pypirccCs�|��}tj�|��r�|�d|�|jp.|j}t�}|�|�|�	�}d|k�rF|�
dd�}dd�|�d�D�}|gkr�d|kr�dg}niS|D]�}d|i}|�
|d	�|d	<d
|jfd|jfdfD].\}	}
|�
||	�r�|�
||	�||	<q�|
||	<q�|dk�r ||jdfk�r |j|d
<|S|d|k�s:|d
|kr�|Sq�nRd
|k�r�d
}|�
|d
��rp|�
|d
�}n|j}|�
|d	�|�
|d�|||jd�SiS)zReads the .pypirc file.zUsing PyPI login from %sZ	distutilsz
index-serverscSs g|]}|��dkr|���qS)�)�strip)�.0�serverrrr�
<listcomp>=s�z.PyPIRCCommand._read_pypirc.<locals>.<listcomp>�
rr!r�
repository�realm)rNzserver-loginr)rrr$r!r%)rr	r
�existsZannouncer$�DEFAULT_REPOSITORYr�read�sections�get�split�
DEFAULT_REALMZ
has_option)rrr$Zconfigr)Z
index_serversZ_serversr!Zcurrent�key�defaultrrr�_read_pypirc0sb

���

�

�


�zPyPIRCCommand._read_pypirccCs8ddl}|�dd�}|�|�d�dd�}|���|�S)z%Read and decode a PyPI HTTP response.rNzcontent-typez
text/plain��charset�ascii)�cgiZ	getheaderZparse_headerr*r(�decode)rZresponser3Zcontent_type�encodingrrr�_read_pypi_responsepsz!PyPIRCCommand._read_pypi_responsecCsd|_d|_d|_dS)zInitialize options.Nr)r$r%Z
show_responser
rrr�initialize_optionswsz PyPIRCCommand.initialize_optionscCs(|jdkr|j|_|jdkr$|j|_dS)zFinalizes options.N)r$r'r%r,r
rrr�finalize_options}s

zPyPIRCCommand.finalize_options)�__name__�
__module__�__qualname__�__doc__r'r,r$r%Zuser_optionsZboolean_optionsrrr/r6r7r8rrrrrs&���@r)r<r	ZconfigparserrZ
distutils.cmdrrrrrrr�<module>s

PKX[0�oa����__pycache__/dist.cpython-38.pycnu�[���U

e5d���@s�dZddlZddlZddlZddlmZzddlZWnek
rLdZYnXddlTddl	m
Z
mZddlm
Z
mZmZddlmZddlmZe�d	�Zd
d�ZGdd
�d
�ZGdd�d�Zdd�ZdS)z}distutils.dist

Provides the Distribution class, which represents the module distribution
being built/installed/distributed.
�N)�message_from_file)�*)�FancyGetopt�translate_longopt)�
check_environ�	strtobool�
rfc822_escape��log)�DEBUGz^[a-zA-Z]([a-zA-Z0-9_]*)$cCsLt|t�rn<t|t�sHt|�j}d|�d|�d�}t�tj|�t|�}|S)Nz
Warning: 'z' should be a list, got type '�')�
isinstance�str�list�type�__name__r
ZWARN)�valueZ	fieldname�typename�msg�r�&/usr/lib64/python3.8/distutils/dist.py�_ensure_lists


rc@speZdZdZdddddgZdZdd	d
ddd
dddddddddddddddgZdd�eD�Zdd iZdad"d#�Z	d$d%�Z
dbd'd(�Zd)d*�Zdcd+d,�Z
d-d.�Zd/d0�Zd1d2�Zd3d4�Zd5d5gfd6d7�Zd8d9�Zd:d;�Zd<d=�Zd>d?�Zd@dA�ZdBdC�ZdddDdE�ZdedFdG�ZdfdIdJ�ZejfdKdL�ZdMdN�ZdOdP�Z dQdR�Z!dSdT�Z"dUdV�Z#dWdX�Z$dYdZ�Z%d[d\�Z&d]d^�Z'd_d`�Z(d!S)g�Distributiona�The core of the Distutils.  Most of the work hiding behind 'setup'
    is really done within a Distribution instance, which farms the work out
    to the Distutils commands specified on the command line.

    Setup scripts will almost never instantiate Distribution directly,
    unless the 'setup()' function is totally inadequate to their needs.
    However, it is conceivable that a setup script might wish to subclass
    Distribution for some specialized purpose, and then pass the subclass
    to 'setup()' as the 'distclass' keyword argument.  If so, it is
    necessary to respect the expectations that 'setup' has of Distribution.
    See the code for 'setup()', in core.py, for details.
    )�verbose�vzrun verbosely (default)�)�quiet�qz!run quietly (turns verbosity off))zdry-run�nzdon't actually do anything)�help�hzshow detailed help message)zno-user-cfgNz-ignore pydistutils.cfg in your home directoryz�Common commands: (see '--help-commands' for more)

  setup.py build      will build the package underneath 'build/'
  setup.py install    will install the package
)z
help-commandsNzlist all available commands)�nameNzprint package name)�version�Vzprint package version)�fullnameNzprint <package name>-<version>)�authorNzprint the author's name)�author-emailNz print the author's email address)�
maintainerNzprint the maintainer's name)zmaintainer-emailNz$print the maintainer's email address)�contactNz7print the maintainer's name if known, else the author's)z
contact-emailNz@print the maintainer's email address if known, else the author's)�urlNzprint the URL for this package)�licenseNz print the license of the package)�licenceNzalias for --license)�descriptionNzprint the package description)zlong-descriptionNz"print the long package description)�	platformsNzprint the list of platforms)�classifiersNzprint the list of classifiers)�keywordsNzprint the list of keywords)�providesNz+print the list of packages/modules provided)�requiresNz+print the list of packages/modules required)�	obsoletesNz0print the list of packages/modules made obsoletecCsg|]}t|d��qS)r�r)�.0�xrrr�
<listcomp>�szDistribution.<listcomp>rrNcCs\d|_d|_d|_|jD]}t||d�qt�|_|jjD] }d|}t||t|j|��q:i|_	d|_
d|_d|_i|_
g|_d|_i|_d|_d|_d|_d|_d|_d|_d|_d|_d|_d|_d|_i|_i|_|�r|�d�}|dk	�r8|d=|��D]4\}}|� |�}|��D]\}	}
d|
f||	<�q�qd|k�r~|d|d	<|d=d
}t!dk	�rnt!�"|�nt#j$�%|d�|��D]�\}}
t&|jd|��r�t|jd|�|
�nNt&|j|��r�t|j||
�n0t&||��r�t|||
�nd
t'|�}t!�"|��q�d|_(|jdk	�rP|jD].}
|
�)d��s6�qP|
dk�r d|_(�qP�q |�*�dS)a0Construct a new Distribution instance: initialize all the
        attributes of a Distribution, and then use 'attrs' (a dictionary
        mapping attribute names to values) to assign some of those
        attributes their "real" values.  (Any attributes not mentioned in
        'attrs' will be assigned to some null value: 0, None, an empty list
        or dictionary, etc.)  Most importantly, initialize the
        'command_obj' attribute to the empty dictionary; this will be
        filled in with real command objects by 'parse_command_line()'.
        rr�get_N��optionszsetup scriptr+r*z:'licence' distribution option is deprecated; use 'license'�
Zset_zUnknown distribution option: %sT�-z
--no-user-cfgF)+r�dry_runr�display_option_names�setattr�DistributionMetadata�metadata�_METHOD_BASENAMES�getattr�cmdclass�command_packages�script_name�script_args�command_optionsZ
dist_files�packagesZpackage_dataZpackage_dir�
py_modules�	libraries�headers�ext_modulesZext_packageZinclude_dirsZ
extra_path�scripts�
data_filesZpassword�command_obj�have_run�get�items�get_option_dict�warnings�warn�sys�stderr�write�hasattr�repr�
want_user_cfg�
startswith�finalize_options)�self�attrs�attr�basenameZmethod_namer9�commandZcmd_options�opt_dict�opt�valr�key�argrrr�__init__�s~








zDistribution.__init__cCs&|j�|�}|dkr"i}|j|<|S)z�Get the option dictionary for a given command.  If that
        command's option dictionary hasn't been created yet, then create it
        and return the new dictionary; otherwise, return the existing
        option dictionary.
        N)rGrQ)r^rb�dictrrrrS&szDistribution.get_option_dictr8c	Cs�ddlm}|dkr"t|j���}|dk	r@|�||�|d}|sV|�|d�dS|D]h}|j�|�}|dkr�|�|d|�qZ|�|d|�||�}|�d�D]}|�|d|�q�qZdS)Nr)�pformatz  zno commands known yetzno option dict for '%s' commandzoption dict for '%s' command:r:)Zpprintrj�sortedrG�keys�announcerQ�split)	r^�header�commands�indentrjZcmd_namerc�out�linerrr�dump_option_dicts1s*��zDistribution.dump_option_dictscCs�g}t�tj�tjdj�}tj�|d�}tj�|�rB|�	|�tj
dkrRd}nd}|jr�tj�tj�d�|�}tj�|�r�|�	|�d}tj�|�r�|�	|�t
r�|�dd	�|��|S)
a�Find as many configuration files as should be processed for this
        platform, and return a list of filenames in the order in which they
        should be parsed.  The filenames returned are guaranteed to exist
        (modulo nasty race conditions).

        There are three possible config files: distutils.cfg in the
        Distutils installation directory (ie. where the top-level
        Distutils __inst__.py file lives), a file in the user's home
        directory named .pydistutils.cfg on Unix and pydistutils.cfg
        on Windows/Mac; and setup.cfg in the current directory.

        The file in the user's home directory can be disabled with the
        --no-user-cfg option.
        �	distutilsz
distutils.cfg�posixz.pydistutils.cfgzpydistutils.cfg�~z	setup.cfgzusing config files: %sz, )r�os�path�dirnamerV�modules�__file__�join�isfile�appendr!r[�
expanduserrrm)r^�filesZsys_dirZsys_fileZ
user_filenameZ	user_fileZ
local_filerrr�find_config_filesMs&



zDistribution.find_config_filesc
Cs�ddlm}tjtjkr8ddddddd	d
ddd
ddg
}ng}t|�}|dkrT|��}trb|�d�|�}|D]�}tr�|�d|�|�	|�|�
�D]V}|�|�}|�|�}|D]8}	|	dkr�|	|kr�|�
||	�}
|	�dd�}	||
f||	<q�q�|��qld|jk�r�|jd��D]�\}	\}}
|j�
|	�}zF|�rDt||t|
��n(|	dk�r`t||	t|
��nt||	|
�Wn,tk
�r�}
zt|
��W5d}
~
XYnX�qdS)Nr)�ConfigParserzinstall-basezinstall-platbasezinstall-libzinstall-platlibzinstall-purelibzinstall-headerszinstall-scriptszinstall-data�prefixzexec-prefix�home�user�rootz"Distribution.parse_config_files():z  reading %srr;�_�global)rr<)Zconfigparserr�rVr��base_prefix�	frozensetr�rrm�readZsectionsr9rSrQ�replacerhrGrR�negative_optr>r�
ValueError�DistutilsOptionError)r^�	filenamesr�Zignore_options�parser�filenameZsectionr9rcrdre�src�aliasrrrr�parse_config_files}s^�





zDistribution.parse_config_filescCs�|��}g|_t||j�}|�|j�|�ddi�|j|j|d�}|�	�}t
�|j�|�
|�rhdS|r�|�||�}|dkrhdSqh|jr�|j|t|j�dk|jd�dS|js�td��dS)	a�Parse the setup script's command line, taken from the
        'script_args' instance attribute (which defaults to 'sys.argv[1:]'
        -- see 'setup()' in core.py).  This list is first processed for
        "global options" -- options that set attributes of the Distribution
        instance.  Then, it is alternately scanned for Distutils commands
        and options for that command.  Each new command terminates the
        options for the previous command.  The allowed options for a
        command are determined by the 'user_options' attribute of the
        command class -- thus, we have to be able to load command classes
        in order to parse the command line.  Any error in that 'options'
        attribute raises DistutilsGetoptError; any error on the
        command-line raises DistutilsArgError.  If no Distutils commands
        were found on the command line, raises DistutilsArgError.  Return
        true if command-line was successfully parsed and we should carry
        on with executing commands; false if no errors but we shouldn't
        execute commands (currently, this only happens if user asks for
        help).
        r+r*)�args�objectNr��display_optionsrpzno commands suppliedT)�_get_toplevel_optionsrprr��set_negative_aliasesr�Zset_aliases�getoptrFZget_option_orderr
Z
set_verbosityr�handle_display_options�_parse_command_optsr�
_show_help�len�DistutilsArgError)r^Ztoplevel_optionsr�r��option_orderrrr�parse_command_line�s.	
�zDistribution.parse_command_linecCs|jdgS)z�Return the non-display options recognized at the top level.

        This includes options that are recognized *only* at the top
        level as well as options recognized for commands.
        )zcommand-packages=Nz0list of packages that provide distutils commands)�global_options�r^rrrr��s�z"Distribution._get_toplevel_optionsc
Cs�ddlm}|d}t�|�s*td|��|j�|�z|�|�}Wn*tk
rn}zt	|��W5d}~XYnXt
||�s�td|��t|d�r�t
|jt�s�d}t||��|j}t|d�r�|��}|�|j�t|d	�r�t
|jt�r�t|j�}ng}|�|j|j|�|�|�|�|d
d��\}}	t|	d��rV|	j�rV|j|d|gd�dSt|d	��r�t
|jt��r�d}
|jD]F\}}}
}t|	|�|���rzd
}
t|��r�|�ntd
||f���qz|
�r�dS|�|�}t|	���D]\}}d|f||<�q�|S)a�Parse the command-line options for a single command.
        'parser' must be a FancyGetopt instance; 'args' must be the list
        of arguments, starting with the current command (whose options
        we are about to parse).  Returns a new version of 'args' with
        the next command at the front of the list; will be the empty
        list if there are no more commands on the command line.  Returns
        None if the user asked for help on this command.
        r��Commandzinvalid command name '%s'Nz&command class %s must subclass Command�user_optionszIcommand class %s must provide 'user_options' attribute (a list of tuples)r��help_optionsrrr�zYinvalid help function %r for help option '%s': must be a callable object (function, etc.)zcommand line) �
distutils.cmdr��
command_re�match�
SystemExitrpr�get_command_class�DistutilsModuleErrorr��
issubclassZDistutilsClassErrorrYr
r�rr��copy�updater��fix_help_options�set_option_tabler�r�r�rr�Z
get_attr_name�callablerS�varsrR)r^r�r�r�rbZ	cmd_classrr�r�ZoptsZhelp_option_foundZhelp_optionZshortZdesc�funcrcr!rrrrr�sr


�

�


���

�
��
z Distribution._parse_command_optscCsPdD]F}t|j|�}|dkrqt|t�rdd�|�d�D�}t|j||�qdS)z�Set final values for all the options on the Distribution
        instance, analogous to the .finalize_options() method of Command
        objects.
        �r/r-NcSsg|]}|���qSr��strip)r4Zelmrrrr6jsz1Distribution.finalize_options.<locals>.<listcomp>�,)rBr@r
rrnr>)r^r`rrrrr]`s
zDistribution.finalize_optionsrc
Csddlm}ddlm}|rR|r*|��}n|j}|�|�|�|jd�t	d�|rt|�|j
�|�d�t	d�|jD]z}t|t
�r�t||�r�|}	n
|�|�}	t|	d�r�t|	jt�r�|�|	jt|	j��n|�|	j�|�d|	j�t	d�qzt	||j��d	S)
abShow help for the setup script command-line in the form of
        several lists of command-line options.  'parser' should be a
        FancyGetopt instance; do not expect it to be returned in the
        same state, as its option table will be reset to make it
        generate the correct help text.

        If 'global_options' is true, lists the global options:
        --verbose, --dry-run, etc.  If 'display_options' is true, lists
        the "display-only" options: --name, --version, etc.  Finally,
        lists per-command help for every command name or command class
        in 'commands'.
        r��	gen_usager�z
Global options:r8zKInformation display options (just display information, ignore any commands)r�zOptions for '%s' command:N)�distutils.corer�r�r�r�r�r�Z
print_help�common_usage�printr�rpr
rr�r�rYr�rr�r�rrE)
r^r�r�r�rpr�r�r9rb�klassrrrr�ms:

�



��
zDistribution._show_helpc	Cs�ddlm}|jr4|��td�t||j��dSd}i}|jD]}d||d<qB|D]l\}}|rX|�|�rXt|�}t	|j
d|��}|dkr�td�|��n |dkr�td	�|��nt|�d}qX|S)
z�If there were any non-global "display-only" options
        (--help-commands or the metadata display options) on the command
        line, display the requested info and return true; else return
        false.
        rr�r8rr7r�r�)r.r0r1r2r:)r�r�Z
help_commands�print_commandsr�rEr�rQrrBr@r})	r^r�r�Zany_display_optionsZis_display_option�optionrdrerrrrr��s*
z#Distribution.handle_display_optionsc	Csjt|d�|D]T}|j�|�}|s.|�|�}z
|j}Wntk
rPd}YnXtd|||f�qdS)zZPrint a subset of the list of all commands -- used by
        'print_commands()'.
        �:�(no description available)z
  %-*s  %sN)r�rCrQr�r,�AttributeError)r^rpro�
max_length�cmdr�r,rrr�print_command_list�s


zDistribution.print_command_listcCs�ddl}|jj}i}|D]}d||<qg}|j��D]}|�|�s4|�|�q4d}||D]}t|�|krZt|�}qZ|�|d|�|r�t	�|�|d|�dS)anPrint out a help message listing all available commands with a
        description of each.  The list is divided into "standard commands"
        (listed in distutils.command.__all__) and "extra commands"
        (mentioned in self.cmdclass, but not a standard command).  The
        descriptions come from the command class attribute
        'description'.
        rNrzStandard commandszExtra commands)
�distutils.commandrb�__all__rCrlrQrr�r�r�)r^ru�std_commands�is_stdr��extra_commandsr�rrrr��s.


��zDistribution.print_commandsc		Cs�ddl}|jj}i}|D]}d||<qg}|j��D]}|�|�s4|�|�q4g}||D]P}|j�|�}|sx|�|�}z
|j}Wnt	k
r�d}YnX|�||f�qZ|S)a>Get a list of (command, description) tuples.
        The list is divided into "standard commands" (listed in
        distutils.command.__all__) and "extra commands" (mentioned in
        self.cmdclass, but not a standard command).  The descriptions come
        from the command class attribute 'description'.
        rNrr�)
r�rbr�rCrlrQrr�r,r�)	r^rur�r�r�r��rvr�r,rrr�get_command_list�s(	




zDistribution.get_command_listcCsN|j}t|t�sJ|dkrd}dd�|�d�D�}d|krD|�dd�||_|S)z9Return a list of packages from which commands are loaded.Nr8cSsg|]}|dkr|���qS)r8r�)r4Zpkgrrrr6!sz5Distribution.get_command_packages.<locals>.<listcomp>r�zdistutils.commandr)rDr
rrn�insert)r^Zpkgsrrr�get_command_packagess
z!Distribution.get_command_packagesc	Cs�|j�|�}|r|S|��D]�}d||f}|}zt|�tj|}Wntk
r^YqYnXzt||�}Wn&tk
r�t	d|||f��YnX||j|<|St	d|��dS)aoReturn the class that implements the Distutils command named by
        'command'.  First we check the 'cmdclass' dictionary; if the
        command is mentioned there, we fetch the class object from the
        dictionary and return it.  Otherwise we load the command module
        ("distutils.command." + command) and fetch the command class from
        the module.  The loaded class is also stored in 'cmdclass'
        to speed future calls to 'get_command_class()'.

        Raises DistutilsModuleError if the expected module could not be
        found, or if that module does not define the expected class.
        z%s.%sz3invalid command '%s' (no class '%s' in module '%s')zinvalid command '%s'N)
rCrQr��
__import__rVr{�ImportErrorrBr�r�)r^rbr�ZpkgnameZmodule_nameZ
klass_name�modulerrrr�'s,
��

zDistribution.get_command_classcCsl|j�|�}|sh|rhtr&|�d|�|�|�}||�}|j|<d|j|<|j�|�}|rh|�||�|S)aReturn the command object for 'command'.  Normally this object
        is cached on a previous call to 'get_command_obj()'; if no command
        object for 'command' is in the cache, then we either create and
        return it (if 'create' is true) or return None.
        z<Distribution.get_command_obj(): creating '%s' command objectr)rOrQrrmr�rPrG�_set_command_options)r^rbZcreate�cmd_objr�r9rrr�get_command_objMs�

zDistribution.get_command_objcCs\|��}|dkr|�|�}tr,|�d|�|��D�] \}\}}trZ|�d|||f�zdd�|jD�}Wntk
r�g}YnXz
|j}Wntk
r�i}YnXz|t|t	�}	||kr�|	r�t
|||t|��nJ||kr�|	r�t
||t|��n,t||��rt
|||�nt
d|||f��Wq4tk
�rT}
zt
|
��W5d}
~
XYq4Xq4dS)aySet the options for 'command_obj' from 'option_dict'.  Basically
        this means copying elements of a dictionary ('option_dict') to
        attributes of an instance ('command').

        'command_obj' must be a Command instance.  If 'option_dict' is not
        supplied, uses the standard option dictionary for this command
        (from 'self.command_options').
        Nz#  setting options for '%s' command:z    %s = %s (from %s)cSsg|]}t|��qSrr3)r4�orrrr6|s�z5Distribution._set_command_options.<locals>.<listcomp>z1error in %s: command '%s' has no such option '%s')�get_command_namerSrrmrRZboolean_optionsr�r�r
rr>rrYr�r�)r^rOZoption_dict�command_namer��sourcerZ	bool_optsZneg_optZ	is_stringrrrrr�hsF	

��




��z!Distribution._set_command_optionsrcCs|ddlm}t||�s&|}|�|�}n|��}|js8|S|��d|_d|j|<|�|�|rx|�	�D]}|�
||�qf|S)a�Reinitializes a command to the state it was in when first
        returned by 'get_command_obj()': ie., initialized but not yet
        finalized.  This provides the opportunity to sneak option
        values in programmatically, overriding or supplementing
        user-supplied values from the config files and command line.
        You'll have to re-finalize the command object (by calling
        'finalize_options()' or 'ensure_finalized()') before using it for
        real.

        'command' should be a command name (string) or command object.  If
        'reinit_subcommands' is true, also reinitializes the command's
        sub-commands, as declared by the 'sub_commands' class attribute (if
        it has one).  See the "install" command for an example.  Only
        reinitializes the sub-commands that actually matter, ie. those
        whose test predicates return true.

        Returns the reinitialized command object.
        rr�)r�r�r
r�r�Z	finalizedZinitialize_optionsrPr�Zget_sub_commands�reinitialize_command)r^rbZreinit_subcommandsr�r��subrrrr��s


z!Distribution.reinitialize_commandcCst�||�dS�Nr	)r^r�levelrrrrm�szDistribution.announcecCs|jD]}|�|�qdS)z�Run each command that was seen on the setup script command line.
        Uses the list of commands found and cache of command objects
        created by 'get_command_obj()'.
        N)rp�run_command)r^r�rrr�run_commands�s
zDistribution.run_commandscCsD|j�|�rdSt�d|�|�|�}|��|��d|j|<dS)a�Do whatever it takes to run a command (including nothing at all,
        if the command has already been run).  Specifically: if we have
        already created and run the command named by 'command', return
        silently without doing anything.  If the command named by 'command'
        doesn't even have a command object yet, create one.  Then invoke
        'run()' on that command object (or an existing one).
        Nz
running %sr)rPrQr
�infor�Zensure_finalized�run)r^rbr�rrrr��s	
zDistribution.run_commandcCst|jp|jpg�dkS�Nr)r�rHrIr�rrr�has_pure_modules�szDistribution.has_pure_modulescCs|jot|j�dkSr�)rLr�r�rrr�has_ext_modules�szDistribution.has_ext_modulescCs|jot|j�dkSr�)rJr�r�rrr�has_c_libraries�szDistribution.has_c_librariescCs|��p|��Sr�)r�r�r�rrr�has_modules�szDistribution.has_modulescCs|jot|j�dkSr�)rKr�r�rrr�has_headers�szDistribution.has_headerscCs|jot|j�dkSr�)rMr�r�rrr�has_scripts�szDistribution.has_scriptscCs|jot|j�dkSr�)rNr�r�rrr�has_data_files�szDistribution.has_data_filescCs|��o|��o|��Sr�)r�r�r�r�rrr�is_pure�s
��zDistribution.is_pure)N)NNr8)N)r)N)r))r�
__module__�__qualname__�__doc__r�r�r�r=r�rhrSrtr�r�r�r�r�r]r�r�r�r�r�r�r�r�r�r�r
�INFOrmr�r�r�r�r�r�r�r�r�r�rrrrr,s��	�,

0
:C[
�
2(!"&

,
)
rc@seZdZdZdZdBdd�Zdd�Zdd	�Zd
d�Zdd
�Z	dd�Z
dd�Zdd�Zdd�Z
dd�Zdd�Zdd�Zdd�Zdd�Zd d!�Zd"d#�ZeZd$d%�Zd&d'�Zd(d)�Zd*d+�Zd,d-�Zd.d/�Zd0d1�Zd2d3�Zd4d5�Zd6d7�Zd8d9�Z d:d;�Z!d<d=�Z"d>d?�Z#d@dA�Z$dS)Cr?z]Dummy class to hold the distribution meta-data: name, version,
    author, and so forth.
    )r!r"r%�author_emailr'�maintainer_emailr)r*r,�long_descriptionr/r-r$r(Z
contact_emailr.�download_urlr0r1r2NcCs�|dk	r|�t|��nfd|_d|_d|_d|_d|_d|_d|_d|_	d|_
d|_d|_d|_
d|_d|_d|_d|_d|_dSr�)�
read_pkg_file�openr!r"r%r�r'r�r)r*r,r�r/r-r.r�r0r1r2)r^ryrrrrh
s&zDistributionMetadata.__init__cst|���fdd�}�fdd�}�d}|d�|_|d�|_|d�|_|d	�|_d
|_|d�|_d
|_|d�|_|d
�|_	d�kr�|d�|_
nd
|_
|d�|_|d�|_d�kr�|d��d�|_
|d�|_|d�|_|dkr�|d�|_|d�|_|d�|_nd
|_d
|_d
|_d
S)z-Reads the metadata values from a file object.cs�|}|dkrdS|S�NZUNKNOWNr)r!r�rrr�_read_field(sz7DistributionMetadata.read_pkg_file.<locals>._read_fieldcs��|d�}|gkrdS|Sr�)Zget_all)r!�valuesr�rr�
_read_list.sz6DistributionMetadata.read_pkg_file.<locals>._read_listzmetadata-versionr!r"Zsummaryr%Nr&z	home-pager*zdownload-urlr,r/r��platformZ
classifier�1.1r1r0r2)rr!r"r,r%r'r�r�r)r*r�r�rnr/r-r.r1r0r2)r^�filer�r�Zmetadata_versionrr�rr�$s:












z"DistributionMetadata.read_pkg_filec	Cs2ttj�|d�ddd��}|�|�W5QRXdS)z7Write the PKG-INFO file into the release tree.
        zPKG-INFO�wzUTF-8)�encodingN)r�rxryr}�write_pkg_file)r^Zbase_dirZpkg_inforrr�write_pkg_infoXs
�z#DistributionMetadata.write_pkg_infocCsbd}|js"|js"|js"|js"|jr&d}|�d|�|�d|���|�d|���|�d|���|�d|�	��|�d|�
��|�d	|���|�d
|���|jr�|�d|j�t
|���}|�d|�d
�|���}|�r|�d|�|�|d|���|�|d|���|�|d|���|�|d|���|�|d|���dS)z9Write the PKG-INFO format data to a file object.
        z1.0r�zMetadata-Version: %s
z	Name: %s
zVersion: %s
zSummary: %s
zHome-page: %s
zAuthor: %s
zAuthor-email: %s
zLicense: %s
zDownload-URL: %s
zDescription: %s
r�z
Keywords: %s
ZPlatformZ
ClassifierZRequiresZProvidesZ	ObsoletesN)r0r1r2r.r�rX�get_name�get_version�get_description�get_url�get_contact�get_contact_email�get_licenser�get_long_descriptionr}�get_keywords�_write_list�
get_platforms�get_classifiers�get_requires�get_provides�
get_obsoletes)r^rr"Z	long_descr/rrrr_s6��z#DistributionMetadata.write_pkg_filecCs |D]}|�d||f�qdS)Nz%s: %s
)rX)r^rr!r�rrrrr�sz DistributionMetadata._write_listcCs
|jpdSr�)r!r�rrrr�szDistributionMetadata.get_namecCs
|jpdS)Nz0.0.0)r"r�rrrr�sz DistributionMetadata.get_versioncCsd|��|��fS)Nz%s-%s)rrr�rrr�get_fullname�sz!DistributionMetadata.get_fullnamecCs
|jpdSr�)r%r�rrr�
get_author�szDistributionMetadata.get_authorcCs
|jpdSr�)r�r�rrr�get_author_email�sz%DistributionMetadata.get_author_emailcCs
|jpdSr�)r'r�rrr�get_maintainer�sz#DistributionMetadata.get_maintainercCs
|jpdSr�)r�r�rrr�get_maintainer_email�sz)DistributionMetadata.get_maintainer_emailcCs|jp|jpdSr�)r'r%r�rrrr	�sz DistributionMetadata.get_contactcCs|jp|jpdSr�)r�r�r�rrrr
�sz&DistributionMetadata.get_contact_emailcCs
|jpdSr�)r)r�rrrr�szDistributionMetadata.get_urlcCs
|jpdSr�)r*r�rrrr�sz DistributionMetadata.get_licensecCs
|jpdSr�)r,r�rrrr�sz$DistributionMetadata.get_descriptioncCs
|jpdSr�)r�r�rrrr�sz)DistributionMetadata.get_long_descriptioncCs
|jpgSr�)r/r�rrrr
�sz!DistributionMetadata.get_keywordscCst|d�|_dS)Nr/)rr/�r^rrrr�set_keywords�sz!DistributionMetadata.set_keywordscCs|jp
dgSr�)r-r�rrrr�sz"DistributionMetadata.get_platformscCst|d�|_dS)Nr-)rr-rrrr�
set_platforms�sz"DistributionMetadata.set_platformscCs
|jpgSr�)r.r�rrrr�sz$DistributionMetadata.get_classifierscCst|d�|_dS)Nr.)rr.rrrr�set_classifiers�sz$DistributionMetadata.set_classifierscCs
|jpdSr�)r�r�rrr�get_download_url�sz%DistributionMetadata.get_download_urlcCs
|jpgSr�)r1r�rrrr�sz!DistributionMetadata.get_requirescCs,ddl}|D]}|j�|�qt|�|_dSr�)�distutils.versionpredicate�versionpredicate�VersionPredicaterr1�r^rrurrrr�set_requires�sz!DistributionMetadata.set_requirescCs
|jpgSr�)r0r�rrrr�sz!DistributionMetadata.get_providescCs6dd�|D�}|D]}ddl}|j�|�q||_dS)NcSsg|]}|���qSrr�)r4rrrrr6�sz5DistributionMetadata.set_provides.<locals>.<listcomp>r)rrZsplit_provisionr0)r^rrrurrr�set_provides�s
z!DistributionMetadata.set_providescCs
|jpgSr�)r2r�rrrr�sz"DistributionMetadata.get_obsoletescCs,ddl}|D]}|j�|�qt|�|_dSr�)rrr rr2r!rrr�
set_obsoletes�sz"DistributionMetadata.set_obsoletes)N)%rr�r�r�rArhr�rrrrrrrrrrr	r
rrZget_licencerrr
rrrrrrrr"rr#rr$rrrrr?�sD	
4"r?cCs$g}|D]}|�|dd��q|S)zConvert a 4-tuple 'help_options' list as found in various command
    classes to the 3-tuple form required by FancyGetopt.
    r�)r)r9Znew_optionsZ
help_tuplerrrr��sr�)r�rVrx�reZemailrrTr�Zdistutils.errorsZdistutils.fancy_getoptrrZdistutils.utilrrrrur
Zdistutils.debugr�compiler�rrr?r�rrrr�<module>s4

ZcPKX[�*���)__pycache__/__init__.cpython-38.opt-2.pycnu�[���U

e5d��@s"ddlZejdej�d��ZdS)�N� )�sys�version�index�__version__�rr�*/usr/lib64/python3.8/distutils/__init__.py�<module>sPKX[�w��
�
'__pycache__/errors.cpython-38.opt-2.pycnu�[���U

e5d�
�@s4Gdd�de�ZGdd�de�ZGdd�de�ZGdd�de�ZGdd	�d	e�ZGd
d�de�ZGdd
�d
e�ZGdd�de�ZGdd�de�Z	Gdd�de�Z
Gdd�de�ZGdd�de�ZGdd�de�Z
Gdd�de�ZGdd�de�ZGdd�de�ZGd d!�d!e�ZGd"d#�d#e�ZGd$d%�d%e�Zd&S)'c@seZdZdS)�DistutilsErrorN��__name__�
__module__�__qualname__�rr�(/usr/lib64/python3.8/distutils/errors.pyrsrc@seZdZdS)�DistutilsModuleErrorNrrrrrrsrc@seZdZdS)�DistutilsClassErrorNrrrrrr	sr	c@seZdZdS)�DistutilsGetoptErrorNrrrrrr
sr
c@seZdZdS)�DistutilsArgErrorNrrrrrrsrc@seZdZdS)�DistutilsFileErrorNrrrrrr$src@seZdZdS)�DistutilsOptionErrorNrrrrrr
*sr
c@seZdZdS)�DistutilsSetupErrorNrrrrrr3src@seZdZdS)�DistutilsPlatformErrorNrrrrrr8src@seZdZdS)�DistutilsExecErrorNrrrrrr>src@seZdZdS)�DistutilsInternalErrorNrrrrrrCsrc@seZdZdS)�DistutilsTemplateErrorNrrrrrrHsrc@seZdZdS)�DistutilsByteCompileErrorNrrrrrrKsrc@seZdZdS)�CCompilerErrorNrrrrrrOsrc@seZdZdS)�PreprocessErrorNrrrrrrRsrc@seZdZdS)�CompileErrorNrrrrrrUsrc@seZdZdS)�LibErrorNrrrrrrXsrc@seZdZdS)�	LinkErrorNrrrrrr\src@seZdZdS)�UnknownFileErrorNrrrrrr`srN)�	Exceptionrrr	r
rrr
rrrrrrrrrrrrrrrr�<module>s$	PKX[�VH9�-�-.__pycache__/_msvccompiler.cpython-38.opt-2.pycnu�[���U

e5dRN�@s�ddlZddlZddlZddlZddlZddlmZmZmZm	Z	m
Z
ddlmZm
Z
ddlmZddlmZddlmZdd�Zd	d
�Zddd
dd�Zdd�Zdd�Zddd�Zddddd�ZGdd�de�ZdS)�N)�DistutilsExecError�DistutilsPlatformError�CompileError�LibError�	LinkError)�	CCompiler�gen_lib_options)�log)�get_platform)�countcCsztjtjdtjtjBd�}Wn tk
r>t�d�YdSXd}d}|��t�D]�}zt�	||�\}}}Wntk
r�Yq�YnX|rT|tj
krTtj�
|�rTztt|��}Wnttfk
r�YqTYnX|dkrT||krT||}}qTW5QRX||fS)Nz'Software\Microsoft\VisualStudio\SxS\VC7)�accesszVisual C++ is not registered�NNr�)�winregZ	OpenKeyEx�HKEY_LOCAL_MACHINEZKEY_READZKEY_WOW64_32KEY�OSErrorr	�debugrZ	EnumValueZREG_SZ�os�path�isdir�int�float�
ValueError�	TypeError)�key�best_version�best_dir�i�vZvc_dirZvt�version�r �//usr/lib64/python3.8/distutils/_msvccompiler.py�_find_vc2015s2
�



r"c
Cs�ddl}tj�d�ptj�d�}|s(dSz8tjtj�|ddd�dd	d
ddd
ddg	ddd���}Wntj	t
tfk
r~YdSXtj�|ddd�}tj�|�r�d|fSdS)NrzProgramFiles(x86)ZProgramFilesr
zMicrosoft Visual StudioZ	Installerzvswhere.exez-latestz-prereleasez	-requiresz1Microsoft.VisualStudio.Component.VC.Tools.x86.x64z	-propertyZinstallationPathz	-products�*�mbcs�strict)�encoding�errorsZVCZ	AuxiliaryZBuild�)
�jsonr�environ�get�
subprocess�check_outputr�join�strip�CalledProcessErrorr�UnicodeDecodeErrorr)r)�rootrr r r!�_find_vc2017:s2
��r3�x86Zx64ZarmZarm64)r4�	x86_amd64�x86_arm�	x86_arm64cCs\t�\}}|st�\}}|s*t�d�dStj�|d�}tj�|�sTt�d|�dS|dfS)Nz$No suitable Visual C++ version foundr
z
vcvarsall.batz%s cannot be found)r3r"r	rrrr.�isfile)�	plat_spec�_rr�	vcvarsallr r r!�_find_vcvarsallcs


r<c
Cs�t�d�rdd�tj��D�St|�\}}|s6td��z&tjd�||�tj	d�j
ddd	�}Wn@tjk
r�}z t�
|j�td
�|j���W5d}~XYnXdd�dd
�|��D�D�}|S)NZDISTUTILS_USE_SDKcSsi|]\}}|��|�qSr ��lower)�.0r�valuer r r!�
<dictcomp>ws�z_get_vc_env.<locals>.<dictcomp>zUnable to find vcvarsall.batzcmd /u /c "{}" {} && set)�stderrzutf-16le�replace)r'zError executing {}cSs$i|]\}}}|r|r|��|�qSr r=)r?rr:r@r r r!rA�s
�css|]}|�d�VqdS)�=N)�	partition)r?�liner r r!�	<genexpr>�sz_get_vc_env.<locals>.<genexpr>)r�getenvr*�itemsr<rr,r-�formatZSTDOUT�decoder0r	�error�output�cmd�
splitlines)r9r;r:�out�exc�envr r r!�_get_vc_envus0
�
��
��rScCsN|st�d��tj�}|D].}tj�tj�|�|�}tj�|�r|Sq|S�Nr)rrH�split�pathseprr.�abspathr8)Zexe�paths�p�fnr r r!�	_find_exe�s	
r[r5r6r7)Zwin32z	win-amd64z	win-arm32z	win-arm64c
s�eZdZdZiZdgZdddgZdgZdgZeeeeZ	dZ
d	Zd
ZdZ
dZZd
Zd'dd�Zd(dd�Zd)dd�Zd*dd�Zd+dd�Zd,dd�Z�fdd�Zdd �Zd!d"�Zd#d$�Zd-d%d&�Z�ZS).�MSVCCompilerZmsvcz.cz.ccz.cppz.cxx�.rcz.mcz.resz.objz.libz.dllz%s%sz.exercCs t�||||�d|_d|_dS)NF)r�__init__�	plat_name�initialized)�self�verboseZdry_runZforcer r r!r^�szMSVCCompiler.__init__NcCs�|dkrt�}|tkr(td�tt����t|}t|�}|sDtd��|�dd�|_|j�t	j
�}td|�|_td|�|_
td|�|_td|�|_td	|�|_td
|�|_|�dd��t	j
�D]}|r�|�|�t	j��q�|�dd��t	j
�D]}|r�|�|�t	j��q�d|_d
dddddg|_d
dddddg|_d
ddg}d
dddg}|d �|_|d!�|_|d"�|_|d#�|_|�|_|�|_tj df|jtj df|jtj df|jtj!df|jtj!df|jtj!df|jtj"df|jtj"df|jtj"df|ji	|_#d|_$dS)$Nz--plat-name must be one of {}z7Unable to find a compatible Visual Studio installation.r�zcl.exezlink.exezlib.exezrc.exezmc.exezmt.exeZinclude�libz/nologoz/Oxz/W3z/GLz/DNDEBUGz/MDz/Odz/MDdz/Ziz/D_DEBUGz/INCREMENTAL:NOz/LTCGz/DEBUG:FULL�/MANIFEST:EMBED,ID=1�/DLL�/MANIFEST:EMBED,ID=2�/MANIFESTUAC:NOFT)re)re)rfrgrh)rfrgrh)%r
�PLAT_TO_VCVARSrrJ�tuplerSr+�_pathsrUrrVr[�cc�linkerrd�rc�mcZmtZadd_include_dir�rstrip�sepZadd_library_dirZpreprocess_options�compile_options�compile_options_debugZldflags_exeZldflags_exe_debugZldflags_sharedZldflags_shared_debugZldflags_staticZldflags_static_debugrZ
EXECUTABLEZ
SHARED_OBJECTZSHARED_LIBRARY�_ldflagsr`)rar_r9Zvc_envrX�dir�ldflagsZ
ldflags_debugr r r!�
initialize�s������



�zMSVCCompiler.initializerccsT�fdd��jD��fdd��j�jD����p4d����fdd�}tt||��S)Ncsi|]}|�j�qSr )�
obj_extension�r?�ext�rar r!rA&sz1MSVCCompiler.object_filenames.<locals>.<dictcomp>csi|]}|�j�qSr )�
res_extensionryr{r r!rA'srccs�tj�|�\}}�r"tj�|�}n2tj�|�\}}|�tjjtjjf�rT|dd�}ztj��|�|�WSt	k
r�t
d�|���YnXdS)N�zDon't know how to compile {})rr�splitext�basename�
splitdrive�
startswithrq�altsepr.�LookupErrorrrJ)rY�baserzr:)�ext_map�
output_dir�	strip_dirr r!�
make_out_path,sz4MSVCCompiler.object_filenames.<locals>.make_out_path)�src_extensions�_rc_extensions�_mc_extensions�list�map)raZsource_filenamesr�r�r�r )r�r�rar�r!�object_filenames!s�zMSVCCompiler.object_filenamesc	Cs�|js|��|�||||||�}	|	\}}
}}}|p6g}
|
�d�|rT|
�|j�n|
�|j�d}|
D�]}z||\}}Wntk
r�YqhYnX|r�tj	�
|�}||jkr�d|}�nD||jkr�d|}d}�n*||j
k�r@|}d|}z|�|jg|||g�Wqhtk
�r:}zt|��W5d}~XYqhXqhn�||jk�r�tj	�|�}tj	�|�}z\|�|jd|d||g�tj	�tj	�|��\}}tj	�||d	�}|�|jd||g�Wqhtk
�r�}zt|��W5d}~XYqhXqhntd
�||���|jg|
|}|�r"|�d�|�|�|�d|�|�|�z|�|�Wqhtk
�r~}zt|��W5d}~XYqhXqh|
S)
Nz/cFz/Tcz/TpTz/foz-hz-rr]z"Don't know how to compile {} to {}z/EHscz/Fo)r`rwZ_setup_compile�append�extendrsrr�KeyErrorrrrW�
_c_extensions�_cpp_extensionsr��spawnrnrrr��dirnameror~rr.rJrl)raZsourcesr�ZmacrosZinclude_dirsr�
extra_preargs�extra_postargsZdependsZcompile_info�objectsZpp_optsZbuildZcompile_optsZadd_cpp_opts�obj�srcrzZ	input_optZ
output_opt�msgZh_dirZrc_dirr�r:Zrc_file�argsr r r!�compileBsx
�




�


zMSVCCompiler.compilec	
Cs�|js|��|�||�\}}|j||d�}|�||�r�|d|g}|rJz,t�d|jd�|��|�	|jg|�Wq�t
k
r�}zt|��W5d}~XYq�Xnt�d|�dS)N)r��/OUT:�Executing "%s" %s� �skipping %s (up-to-date))r`rw�_fix_object_args�library_filename�
_need_linkr	rrdr.r�rr)	rar�Zoutput_libnamer�r�target_lang�output_filenameZlib_argsr�r r r!�create_static_lib�s�zMSVCCompiler.create_static_libc
Cs�|js|��|�||�\}}|�|||�}|\}}}|rL|�dt|��t||||�}|dk	rptj�	||�}|�
||��r�|j||	f}dd�|p�gD�}||||d|g}tj�|d�}|dk	�rtj�
tj�|��\}}tj�	||�|��}|�d|�|
�r|
|dd�<|�r.|�|�tj�tj�|��}|�|�z,t�d|jd�	|��|�|jg|�Wn,tk
�r�}zt|��W5d}~XYnXnt�d	|�dS)
Nz5I don't know what to do with 'runtime_library_dirs': cSsg|]}d|�qS)z/EXPORT:r )r?Zsymr r r!�
<listcomp>�sz%MSVCCompiler.link.<locals>.<listcomp>r�rz/IMPLIB:r�r�r�)r`rwr�Z
_fix_lib_args�warn�strrrrr.r�rtr�r~rr�r�r�rWZmkpathr	rrmr�rr)raZtarget_descr�r�r�Z	librariesZlibrary_dirsZruntime_library_dirsZexport_symbolsrr�r�Z
build_tempr�Z
fixed_argsZlib_optsrvZexport_optsZld_argsZdll_nameZdll_extZimplib_filer�r r r!�link�s`�
��
��

��

zMSVCCompiler.linkc	s8t�d�}z|jtjd<t��|�W�S|tjd<XdSrT)rrHr*rk�superr�)rarNZold_path��	__class__r r!r��s

zMSVCCompiler.spawncCsd|S)Nz	/LIBPATH:r �rarur r r!�library_dir_optionszMSVCCompiler.library_dir_optioncCstd��dS)Nz:don't know how to set runtime library search path for MSVC)rr�r r r!�runtime_library_dir_option
s�z'MSVCCompiler.runtime_library_dir_optioncCs
|�|�S)N)r�)rardr r r!�library_optionszMSVCCompiler.library_optioncCs\|r|d|g}n|g}|D]:}|D]0}tj�||�|��}tj�|�r$|Sq$qdS)NZ_d)rrr.r�r8)ra�dirsrdrZ	try_namesru�nameZlibfiler r r!�find_library_fileszMSVCCompiler.find_library_file)rrr)N)rrc)NNNrNNN)NrN)
NNNNNrNNNN)r)�__name__�
__module__�__qualname__Z
compiler_typeZexecutablesr�r�r�r�r�r|rxZstatic_lib_extensionZshared_lib_extensionZstatic_lib_formatZshared_lib_formatZ
exe_extensionr^rwr�r�r�r�r�r�r�r�r��
__classcell__r r r�r!r\�sd
��

P�
"�
]�
�
Er\)N)rZshutil�statr,rZdistutils.errorsrrrrrZdistutils.ccompilerrrZ	distutilsr	Zdistutils.utilr
�	itertoolsrr"r3ZPLAT_SPEC_TO_RUNTIMEr<rSr[rir\r r r r!�<module>s2#�
�PKX[p|t���(__pycache__/version.cpython-38.opt-2.pycnu�[���U

e5d90�@s:ddlZGdd�d�ZGdd�de�ZGdd�de�ZdS)�Nc@sFeZdZddd�Zdd�Zdd�Zdd	�Zd
d�Zdd
�Zdd�Z	dS)�VersionNcCs|r|�|�dS�N��parse��self�vstring�r	�)/usr/lib64/python3.8/distutils/version.py�__init__&szVersion.__init__cCsd|jjt|�fS)Nz	%s ('%s'))�	__class__�__name__�str�rr	r	r
�__repr__*szVersion.__repr__cCs|�|�}|tkr|S|dkS�Nr��_cmp�NotImplemented�r�other�cr	r	r
�__eq__-s
zVersion.__eq__cCs|�|�}|tkr|S|dkSrrrr	r	r
�__lt__3s
zVersion.__lt__cCs|�|�}|tkr|S|dkSrrrr	r	r
�__le__9s
zVersion.__le__cCs|�|�}|tkr|S|dkSrrrr	r	r
�__gt__?s
zVersion.__gt__cCs|�|�}|tkr|S|dkSrrrr	r	r
�__ge__Es
zVersion.__ge__)N)
r
�
__module__�__qualname__rrrrrrrr	r	r	r
rs
rc@s8eZdZe�dejejB�Zdd�Zdd�Z	dd�Z
dS)	�
StrictVersionz)^(\d+) \. (\d+) (\. (\d+))? ([ab](\d+))?$cCs�|j�|�}|std|��|�ddddd�\}}}}}|rTttt|||g��|_nttt||g��d|_|r�|dt|�f|_nd|_dS)	Nzinvalid version number '%s'�����)rr)	�
version_re�match�
ValueError�group�tuple�map�int�version�
prerelease)rrr&�major�minorZpatchr-Zprerelease_numr	r	r
r�s�zStrictVersion.parsecCsb|jddkr*d�tt|jdd���}nd�tt|j��}|jr^||jdt|jd�}|S)Nr!r�.r )r,�joinr*rr-rr	r	r
�__str__�szStrictVersion.__str__cCs�t|t�rt|�}|j|jkr2|j|jkr.dSdS|jsB|jsBdS|jrR|jsRdS|jsb|jrbdS|jr�|jr�|j|jkr~dS|j|jkr�dSdSndS)N���r r)�
isinstancerrr,r-�rrr	r	r
r�s&
zStrictVersion._cmpN)r
rr�re�compile�VERBOSE�ASCIIr%rr2rr	r	r	r
r]s%
�
rc@sDeZdZe�dej�Zd
dd�Zdd�Zdd�Z	d	d
�Z
dd�ZdS)�LooseVersionz(\d+ | [a-z]+ | \.)NcCs|r|�|�dSrrrr	r	r
r.szLooseVersion.__init__c	Cs^||_dd�|j�|�D�}t|�D].\}}zt|�||<Wq$tk
rPYq$Xq$||_dS)NcSsg|]}|r|dkr|�qS)r0r	)�.0�xr	r	r
�
<listcomp>8s�z&LooseVersion.parse.<locals>.<listcomp>)r�component_re�split�	enumerater+r'r,)rrZ
components�i�objr	r	r
r3szLooseVersion.parsecCs|jSr)rrr	r	r
r2CszLooseVersion.__str__cCsdt|�S)NzLooseVersion ('%s'))rrr	r	r
rGszLooseVersion.__repr__cCsFt|t�rt|�}|j|jkr"dS|j|jkr2dS|j|jkrBdSdS)Nrr3r )r4rr:r,r5r	r	r
rKs
zLooseVersion._cmp)N)r
rrr6r7r8r>rrr2rrr	r	r	r
r:s!
r:)r6rrr:r	r	r	r
�<module>s>/PKX[zw�\HH0__pycache__/cygwinccompiler.cpython-38.opt-2.pycnu�[���U

e5d^@�@s�ddlZddlZddlZddlmZmZmZddlZddlm	Z	m
Z
ddlmZddl
mZddlmZmZmZmZddlmZddlmZdd	lmZd
d�ZGdd
�d
e�ZGdd�de�ZdZdZdZdd�Z e�!d�Z"dd�Z#dd�Z$dd�Z%dS)�N)�Popen�PIPE�check_output)�gen_preprocess_options�gen_lib_options)�
UnixCCompiler)�
write_file)�DistutilsExecError�CCompilerError�CompileError�UnknownFileError)�log)�LooseVersion)�find_executablecCs�tj�d�}|dkr|tj|d|d�}|dkr8dgS|dkrFdgS|d	krTd
gS|dkrbdgS|d
krpdgStd|��dS)NzMSC v.�����
Z1300Zmsvcr70Z1310Zmsvcr71Z1400Zmsvcr80Z1500Zmsvcr90Z1600Zmsvcr100zUnknown MS Compiler version %s )�sys�version�find�
ValueError)Zmsc_posZmsc_ver�r�1/usr/lib64/python3.8/distutils/cygwinccompiler.py�	get_msvcr?src
@sNeZdZdZdZdZdZdZdZdZ	dd	d
�Z
dd�Zddd�Zddd�Z
d
S)�CygwinCCompiler�cygwinz.o�.az.dllzlib%s%sz%s%sz.exercCs�t�||||�t�\}}|�d||f�|tk	rB|�d|�t�\|_|_|_	|�|j
d|j|j|j	f�|jdkr�d|_nd|_|jdkr�d}nd	}|jd
ddd
d|j|fd�|jdkr�dg|_
|�d�nt�|_
dS)Nz%Python's GCC status: %s (details: %s)z�Python's pyconfig.h doesn't seem to support your compiler. Reason: %s. Compiling may fail because of undefined preprocessor macros.z: gcc %s, ld %s, dllwrap %s
z2.10.90�gcc�dllwrap�2.13�-shared�
-mdll -staticzgcc -mcygwin -O -Wallzgcc -mcygwin -mdll -O -Wallzg++ -mcygwin -O -Wallzgcc -mcygwinz%s -mcygwin %s�Zcompiler�compiler_soZcompiler_cxxZ
linker_exeZ	linker_so�2.91.57Zmsvcrtz,Consider upgrading to a newer version of gcc)r�__init__�check_config_hZdebug_print�CONFIG_H_OK�warn�get_versions�gcc_version�
ld_versionZdllwrap_version�
compiler_type�
linker_dll�set_executables�
dll_librariesr)�self�verbose�dry_run�forceZstatusZdetails�
shared_optionrrrr%dsN
����
��


��
�zCygwinCCompiler.__init__c
Cs�|dks|dkrVz|�dd|d|g�Wq�tk
rR}zt|��W5d}~XYq�XnNz"|�|j||d|g|�Wn*tk
r�}zt|��W5d}~XYnXdS)N�.rc�.resZwindresz-iz-o)Zspawnr	rr#)r0�obj�src�extZcc_args�extra_postargsZpp_opts�msgrrr�_compile�s�
zCygwinCCompiler._compileNcCsPt�|
p
g�}
t�|pg�}t�|p&g�}|�|j�|dk	�r||jksV|jdk�rtj�|d�}tj�tj�	|��\}}tj�
||d�}tj�
|d|d�}dtj�	|�dg}|D]}|�|�q�|�t
||fd|�|jd	k�r|
�d
|g�|
�d|g�n
|�|�|	�s(|
�d�t�||||||||d|	|
|||
�dS)
Nrrz.def�librz
LIBRARY %sZEXPORTSz
writing %srz--output-libz--defz-s)�copy�extendr/Z
EXECUTABLEr-�os�path�dirname�splitext�basename�join�appendZexecuterr�link)r0Ztarget_descZobjectsZoutput_filename�
output_dirZ	librariesZlibrary_dirsZruntime_library_dirsZexport_symbols�debugZ
extra_preargsr:Z
build_tempZtarget_langZtemp_dirZdll_nameZ
dll_extensionZdef_fileZlib_file�contentsZsymrrrrG�sR
��

���

�zCygwinCCompiler.link�cCs�|dkrd}g}|D]�}tj�tj�|��\}}||jddgkrRtd||f��|rbtj�|�}|dkr�|�tj�||||j	��q|�tj�|||j	��q|S)NrKr5r6z"unknown file type '%s' (from '%s'))r6r5)
r@rArC�normcaseZsrc_extensionsrrDrFrE�
obj_extension)r0Zsource_filenamesZ	strip_dirrHZ	obj_namesZsrc_name�baser9rrr�object_filenames�s&���z CygwinCCompiler.object_filenames)rrr)
NNNNNrNNNN)rrK)�__name__�
__module__�__qualname__r,rMZstatic_lib_extensionZshared_lib_extensionZstatic_lib_formatZshared_lib_formatZ
exe_extensionr%r<rGrOrrrrrYs*
;�
Nrc@seZdZdZddd�ZdS)�Mingw32CCompilerZmingw32rc	Csxt�||||�|jdkr d}nd}|jdkr4d}nd}t�rFtd��|jdd	d
dd|j||fd
�g|_t	�|_dS)Nrr r!r$z--entry _DllMain@12rKz1Cygwin gcc cannot be used with --compiler=mingw32zgcc -O -Wallzgcc -mdll -O -Wallzg++ -O -Wallrz%s %s %sr")
rr%r+r*�is_cygwingccr
r.r-r/r)r0r1r2r3r4Zentry_pointrrrr%s.

����zMingw32CCompiler.__init__N)rrr)rPrQrRr,r%rrrrrSsrS�okznot okZ	uncertainc
Cs�ddlm}dtjkrtdfS|��}zLt|�}z4d|��krPtd|fW�WSt	d|fW�WSW5|��XWn8t
k
r�}ztd||jffWY�Sd}~XYnXdS)	Nr)�	sysconfigZGCCzsys.version mentions 'GCC'Z__GNUC__z'%s' mentions '__GNUC__'z '%s' does not mention '__GNUC__'zcouldn't read '%s': %s)
�	distutilsrVrrr'Zget_config_h_filename�open�close�read�CONFIG_H_NOTOK�OSError�CONFIG_H_UNCERTAIN�strerror)rV�fnZconfig_h�excrrrr&Hs
�r&s(\d+\.\d+(\.\d+)*)cCsl|��d}t|�dkrdSt|dtd�j}z|��}W5|��Xt�|�}|dkrZdSt	|�
d����S)NrT)�shell�stdout�)�splitrrrrbrYrZ�
RE_VERSION�searchr�group�decode)�cmd�
executable�out�
out_string�resultrrr�_find_exe_versionus

rncCsdddg}tdd�|D��S)Nzgcc -dumpversionzld -vzdllwrap --versioncSsg|]}t|��qSr)rn)�.0rirrr�
<listcomp>�sz get_versions.<locals>.<listcomp>)�tuple)Zcommandsrrrr)�s
r)cCstddg�}|���d�S)Nrz-dumpmachinescygwin)r�strip�endswith)rlrrrrT�srT)&r@rr>�
subprocessrrr�reZdistutils.ccompilerrrZdistutils.unixccompilerrZdistutils.file_utilrZdistutils.errorsr	r
rrrWr
Zdistutils.versionrZdistutils.spawnrrrrSr'r[r]r&�compilerernr)rTrrrr�<module>0s.;1+
PKX[�Z@+n/n/*__pycache__/sysconfig.cpython-38.opt-1.pycnu�[���U

��.eP�@s�dZddlZddlZddlZddlZddlmZddlmZm	Z	ej
�ej�Z
ej
�ej�Zej
�ej�Zej
�ej�Zdejkr�ej
�ejd�Zn&ejr�ej
�ej
�ej��Zne��Zdd�Zeed	d�Zejd
kr�dd�Zee�Zee�Zd
d�Ze�Z dZ!ze �sej"Z!Wne#k
�r*YnXdd�Z$d-dd�Z%d.dd�Z&dd�Z'dd�Z(dd�Z)d/dd�Z*e�+d�Z,e�+d�Z-e�+d �Z.d0d!d"�Z/d#d$�Z0da1d%d&�Z2d'd(�Z3d)d*�Z4d+d,�Z5dS)1a�Provide access to Python's configuration information.  The specific
configuration variables available depend heavily on the platform and
configuration.  The values may be retrieved using
get_config_var(name), and the list of variables is available via
get_config_vars().keys().  Additional convenience functions are also
available.

Written by:   Fred L. Drake, Jr.
Email:        <fdrake@acm.org>
�N�)�DistutilsPlatformError)�get_platform�get_host_platformZ_PYTHON_PROJECT_BASEcCs,dD]"}tj�tj�|d|��rdSqdS)N)ZSetupzSetup.localZModulesTF)�os�path�isfile�join)�d�fn�r�+/usr/lib64/python3.8/distutils/sysconfig.py�_is_python_source_dir+sr�_home�ntcCs0|r,tj�|��tj�tj�td���r,tS|S)NZPCbuild)rr�normcase�
startswithr	�PREFIX)r
rrr
�_fix_pcbuild4s
�rcCstrtt�Stt�S)N)�	_sys_homer�project_baserrrr
�
_python_build<sr�cCsdtjdd�S)z�Return a string containing the major and minor Python version,
    leaving off the patchlevel.  Sample return values could be '1.5'
    or '2.2'.
    z%d.%dN�)�sys�version_inforrrr
�get_python_versionPsrcCs�|dkr|rtpt}tjdkrjtrL|r.tp,tStj�t	d�d�}tj�
|�Sdt�t}tj�|d|�Stjdkr�tr�tj�|d�tjj
tj�|d�Stj�|d�Std	tj��dS)
a�Return the directory containing installed Python header files.

    If 'plat_specific' is false (the default), this is the path to the
    non-platform-specific header files, i.e. Python.h and so on;
    otherwise, this is the path to platform-specific header files
    (namely pyconfig.h).

    If 'prefix' is supplied, use it instead of sys.base_prefix or
    sys.base_exec_prefix -- i.e., ignore 'plat_specific'.
    N�posix�srcdirZInclude�pythonZincluder�PCzFI don't know where Python installs its C header files on platform '%s')�BASE_EXEC_PREFIX�BASE_PREFIXr�name�python_buildrrrr	�get_config_var�normpathr�build_flags�pathsepr)�
plat_specific�prefixZincdirZ
python_dirrrr
�get_python_incXs*

���r+cCs�|dkr&|r|rtpt}n|r"tp$t}tjdkrp|s8|r>d}nd}tj�||dt��}|r`|Stj�|d�Sn<tjdkr�|r�tj�|d�Stj�|dd�Snt	d	tj��dS)
aSReturn the directory containing the Python library (standard or
    site additions).

    If 'plat_specific' is true, return the directory containing
    platform-specific modules, i.e. any module from a non-pure-Python
    module distribution; otherwise, return the platform-shared library
    directory.  If 'standard_lib' is true, return the directory
    containing standard Python library modules; otherwise, return the
    directory for site-specific modules.

    If 'prefix' is supplied, use it instead of sys.base_prefix or
    sys.base_exec_prefix -- i.e., ignore 'plat_specific'.
    Nr�lib64�librz
site-packagesrZLibz?I don't know where Python installs its library on platform '%s')
r!r"�EXEC_PREFIXrrr#rr	rr)r)�standard_libr*r-Z	libpythonrrr
�get_python_lib�s0
�
��r0c	Cs�|jdk�r�tjdkr8td�s8ddl}|�t�dtd<tddd	d
ddd
d�\}}}}}}}}	dtj	kr�tj	d}
tjdkr�dtj	kr�|�
|�r�|
|t|�d�}|
}dtj	kr�tj	d}dtj	kr�tj	d}dtj	kr�tj	d}n|d}dtj	k�r|dtj	d}d	tj	k�r<|dtj	d	}|dtj	d	}dtj	k�r~|dtj	d}|dtj	d}|dtj	d}d
tj	k�r�tj	d
}dtj	k�r�|dtj	d}n|d|	}|d|}
|j||
|
d|||||d�||_
dS)z�Do any platform-specific customization of a CCompiler instance.

    Mainly needed on Unix, so we can plug in the information that
    varies across Unices and is stored in Python's Makefile.
    Zunix�darwinZCUSTOMIZED_OSX_COMPILERrN�TrueZCCZCXX�CFLAGSZCCSHAREDZLDSHAREDZSHLIB_SUFFIXZARZARFLAGSZCPPz -E�LDFLAGS� �CPPFLAGS)Zpreprocessor�compilerZcompiler_soZcompiler_cxxZ	linker_soZ
linker_exe�archiver)Z
compiler_typer�platformr%�_osx_support�customize_compiler�_config_vars�get_config_varsr�environr�lenZset_executablesZshared_lib_extension)r7r:ZccZcxxZcflagsZccsharedZldsharedZshlib_suffixZarZar_flagsZnewccZcppr8Zcc_cmdrrr
r;�sn

��


��






�	r;cCsDtr,tjdkr"tj�tptd�}q6tp(t}n
tdd�}tj�|d�S)z2Return full pathname of installed pyconfig.h file.rr r�r)z
pyconfig-64.h)r$rr#rr	rrr+)Zinc_dirrrr
�get_config_h_filename�s


rAcCs\trtj�tptd�Stddd�}d�t�t	�}t
tjd�rL|dtjj
7}tj�||d�S)zAReturn full pathname of installed Makefile from the Python build.ZMakefilerr�r)r/zconfig-{}{}�
_multiarchz-%s)r$rrr	rrr0�formatrr'�hasattrr�implementationrC)Zlib_dirZconfig_filerrr
�get_makefile_filenamesrGcCs�|dkri}t�d�}t�d�}|��}|s.q�|�|�}|rx|�dd�\}}zt|�}Wntk
rlYnX|||<q |�|�}|r d||�d�<q |S)z�Parse a config.h-style file.

    A dictionary containing name/value pairs is returned.  If an
    optional dictionary is passed in as the second argument, it is
    used instead of a new dictionary.
    Nz"#define ([A-Z][A-Za-z0-9_]+) (.*)
z&/[*] #undef ([A-Z][A-Za-z0-9_]+) [*]/
rrr)�re�compile�readline�match�group�int�
ValueError)�fp�gZ	define_rxZundef_rx�line�m�n�vrrr
�parse_config_hs&




rUz"([a-zA-Z][a-zA-Z0-9_]+)\s*=\s*(.*)z\$\(([A-Za-z][A-Za-z0-9_]*)\)z\${([A-Za-z][A-Za-z0-9_]*)}c	Cs�ddlm}||ddddd�}|dkr*i}i}i}|��}|dkrDq�t�|�}|r2|�dd�\}}	|	��}	|	�dd	�}
d
|
kr�|	||<q2zt|	�}	Wn$t	k
r�|	�dd
�||<Yq2X|	||<q2d}|�rtt
|�D�]�}||}
t�|
�p�t
�|
�}|�rj|�d�}d}||k�r$t||�}n�||k�r4d
}nx|tjk�rLtj|}n`||k�r�|�d��rz|dd�|k�rzd	}n$d||k�r�d
}nt|d|�}nd	||<}|�rp|
|��d�}|
d|���||}
d
|k�r�|
||<nzzt|
�}
Wn"t	k
�r|
��||<Yn
X|
||<||=|�d��rp|dd�|k�rp|dd�}||k�rp|
||<q�||=q�q�|��|��D]"\}}	t|	t��r�|	��||<�q�|�|�|S)z�Parse a Makefile-style file.

    A dictionary containing name/value pairs is returned.  If an
    optional dictionary is passed in as the second argument, it is
    used instead of a new dictionary.
    r)�TextFiler�surrogateescape)Zstrip_commentsZskip_blanksZ
join_lines�errorsNrz$$r�$)r3r4r6TFZPY_�)Zdistutils.text_filerVrJ�_variable_rxrKrL�strip�replacerMrN�list�_findvar1_rx�search�_findvar2_rx�strrr>r�end�start�close�items�
isinstance�update)rrPrVrOZdoneZnotdonerQrRrSrTZtmpvZrenamed_variablesr#�value�found�itemZafter�krrr
�parse_makefile/s�








�



rmcCsVt�|�pt�|�}|rR|��\}}|d|�|�|�d��||d�}qqRq|S)a�Expand Makefile-style variables -- "${foo}" or "$(foo)" -- in
    'string' according to 'vars' (a dictionary mapping variable names to
    values).  Variables not present in 'vars' are silently expanded to the
    empty string.  The variable values in 'vars' should not contain further
    variable expansions; if 'vars' is the output of 'parse_makefile()',
    you're fine.  Returns a variable-expanded version of 's'.
    rrN)r_r`ra�span�getrL)�s�varsrRZbegrcrrr
�expand_makefile_vars�s*rrc
CsVtj�ddjtjtjttjdd�d��}t	|t
�t�dgd�}|j}ia
t
�|�dS)	z7Initialize the module as appropriate for POSIX systems.Z_PYTHON_SYSCONFIGDATA_NAMEz+_sysconfigdata_{abi}_{platform}_{multiarch}rCr)Zabir9Z	multiarch�build_time_varsrN)rr>rorDr�abiflagsr9�getattrrF�
__import__�globals�localsrsr<rh)r#Z_temprsrrr
�_init_posix�s��rycCs~i}tddd�|d<tddd�|d<tdd�|d<t��d|d<d	|d
<t��dd�|d
<tj�tj�	t
j��|d<|adS)z+Initialize the module as appropriate for NTrrrBZLIBDESTZ
BINLIBDESTr@Z	INCLUDEPY�
EXT_SUFFIXz.exeZEXE�.rZVERSIONZBINDIRN)
r0r+�_imp�extension_suffixesrr]rr�dirname�abspathr�
executabler<)rPrrr
�_init_nt�sr�cGs\tdk�r*t��dtj�}|r(|�niattd<ttd<t�d�}|dk	rV|td<t�dt�}tjdkr�tr�tj	�
t��}tj	�||�}ntj	�
t��}tj	�
tj	�|��td<t�rtjdk�rt}tj	�td��s|t��k�rtj	�|td�}tj	�|�td<tjd	k�r*d
dl}|�t�|�rTg}|D]}|�t�|���q8|StSdS)a�With no arguments, return a dictionary of all configuration
    variables relevant for the current platform.  Generally this includes
    everything needed to build extensions and install both pure modules and
    extensions.  On Unix, this means every variable defined in Python's
    installed Makefile; on Windows it's a much smaller set.

    With arguments, return a list of values that result from looking up
    each argument in the configuration variable dictionary.
    NZ_init_r*�exec_prefixrz�SOrrr1r)r<rwrorr#rr.rr$rr~rGr	rr&�isabs�getcwdrr9r:Zcustomize_config_vars�append)�args�funcr�r�baser:Zvalsr#rrr
r=�sB



�
r=cCs*|dkrddl}|�dtd�t��|�S)z�Return the value of a single variable using the dictionary
    returned by 'get_config_vars()'.  Equivalent to
    get_config_vars().get(name)
    r�rNz SO is deprecated, use EXT_SUFFIXr)�warnings�warn�DeprecationWarningr=ro)r#r�rrr
r%!sr%)rN)rrN)N)N)6�__doc__r|rrHrrXr�utilrrrr&r*rr�r.�base_prefixr"�base_exec_prefixr!r>rrr�r~r�rrurr#rrr$r'rt�AttributeErrorrr+r0r;rArGrUrIr[r_rarmrrr<ryr�r=r%rrrr
�<module>s\



(
+I





jJPKX[�~��//*__pycache__/file_util.cpython-38.opt-1.pycnu�[���U

e5d��@sZdZddlZddlmZddlmZdddd�Zdd
d�Zdd
d�Zddd�Z	dd�Z
dS)zFdistutils.file_util

Utility functions for operating on single files.
�N)�DistutilsFileError)�logZcopyingzhard linkingzsymbolically linking)N�hard�sym�@c
Cs�d}d}�ztzt|d�}Wn4tk
rN}ztd||jf��W5d}~XYnXtj�|�r�zt�|�Wn4tk
r�}ztd||jf��W5d}~XYnXzt|d�}Wn4tk
r�}ztd||jf��W5d}~XYnXz|�	|�}Wn6tk
�r(}ztd||jf��W5d}~XYnX|�s4�q|z|�
|�Wq�tk
�rx}ztd||jf��W5d}~XYq�Xq�W5|�r�|��|�r�|��XdS)	a5Copy the file 'src' to 'dst'; both must be filenames.  Any error
    opening either file, reading from 'src', or writing to 'dst', raises
    DistutilsFileError.  Data is read/written in chunks of 'buffer_size'
    bytes (default 16k).  No attempt is made to handle anything apart from
    regular files.
    N�rbzcould not open '%s': %szcould not delete '%s': %s�wbzcould not create '%s': %szcould not read from '%s': %szcould not write to '%s': %s)�close�open�OSErrorr�strerror�os�path�exists�unlink�read�write)�src�dstZbuffer_sizeZfsrcZfdst�eZbuf�r�+/usr/lib64/python3.8/distutils/file_util.py�_copy_file_contentssL	$����r�cCsddlm}ddlm}	m}
m}m}tj�	|�s<t
d|��tj�|�rd|}
tj�|tj�
|��}ntj�|�}
|r�|||�s�|dkr�t�d|�|dfSzt|}Wn tk
r�td|��YnX|dk�rtj�
|�tj�
|�kr�t�d|||
�nt�d|||�|�r|dfS|d	k�rrtj�|��rBtj�||��s�zt�||�|dfWStk
�rnYnXn<|d
k�r�tj�|��r�tj�||��s�t�||�|dfSt||�|�s�|�rt�|�}|�r�t�|||	||
f�|�rt�||||��|dfS)aCopy a file 'src' to 'dst'.  If 'dst' is a directory, then 'src' is
    copied there with the same name; otherwise, it must be a filename.  (If
    the file exists, it will be ruthlessly clobbered.)  If 'preserve_mode'
    is true (the default), the file's mode (type and permission bits, or
    whatever is analogous on the current platform) is copied.  If
    'preserve_times' is true (the default), the last-modified and
    last-access times are copied as well.  If 'update' is true, 'src' will
    only be copied if 'dst' does not exist, or if 'dst' does exist but is
    older than 'src'.

    'link' allows you to make hard links (os.link) or symbolic links
    (os.symlink) instead of copying: set it to "hard" or "sym"; if it is
    None (the default), files are copied.  Don't set 'link' on systems that
    don't support it: 'copy_file()' doesn't check if hard or symbolic
    linking is available. If hardlink fails, falls back to
    _copy_file_contents().

    Under Mac OS, uses the native file copy function in macostools; on
    other systems, uses '_copy_file_contents()' to copy file contents.

    Return a tuple (dest_name, copied): 'dest_name' is the actual name of
    the output file, and 'copied' is true if the file was copied (or would
    have been copied, if 'dry_run' true).
    r)�newer)�ST_ATIME�ST_MTIME�ST_MODE�S_IMODEz4can't copy '%s': doesn't exist or not a regular filerz"not copying %s (output up-to-date)z&invalid value '%s' for 'link' argumentz%s %s -> %srr)Zdistutils.dep_utilr�statrrrrr
r�isfiler�isdir�join�basename�dirnamer�debug�_copy_action�KeyError�
ValueError�infor�samefile�linkr�symlinkr�utime�chmod)rrZ
preserve_modeZpreserve_times�updater+�verbose�dry_runrrrrr�dir�action�strrr�	copy_fileCsV!�





r5cCs�ddlm}m}m}m}m}ddl}	|dkr:t�d||�|rB|S||�sVt	d|��||�rrt
j�|||��}n||�r�t	d||f��|||��s�t	d||f��d	}
zt
�
||�WnPtk
�r
}z0|j\}}
||	jkr�d
}
nt	d|||
f��W5d}~XYnX|
�r�t|||d�zt
�|�Wnhtk
�r�}zH|j\}}
zt
�|�Wntk
�rpYnXt	d
||||
f��W5d}~XYnX|S)a%Move a file 'src' to 'dst'.  If 'dst' is a directory, the file will
    be moved into it with the same name; otherwise, 'src' is just renamed
    to 'dst'.  Return the new full name of the file.

    Handles cross-device moves on Unix using 'copy_file()'.  What about
    other systems???
    r)rr r!r#r$Nrzmoving %s -> %sz#can't move '%s': not a regular filez0can't move '%s': destination '%s' already existsz2can't move '%s': destination '%s' not a valid pathFTzcouldn't move '%s' to '%s': %s)r0zAcouldn't move '%s' to '%s' by copy/delete: delete '%s' failed: %s)Zos.pathrr r!r#r$�errnorr)rr
rr"�renamer�argsZEXDEVr5r)rrr0r1rr r!r#r$r6Zcopy_itrZnum�msgrrr�	move_file�s`����

�

��r:cCs6t|d�}z|D]}|�|d�qW5|��XdS)z{Create a file with the specified name and write 'contents' (a
    sequence of strings without line terminators) to it.
    �w�
N)r
r	r)�filename�contents�f�linerrr�
write_file�s

rA)r)rrrNrr)rr)�__doc__r
Zdistutils.errorsrZ	distutilsrr&rr5r:rArrrr�<module>s"�
3�
d�
?PKX[�ht+�9�9-__pycache__/msvccompiler.cpython-38.opt-1.pycnu�[���U

e5d\�@s�dZddlZddlZddlmZmZmZmZmZddl	m
Z
mZmZddl
mZdZz,ddlZdZeZejZejZejZejZWnhek
r�z4ddlZddlZdZeZejZejZejZejZWnek
r�e�d�YnXYnXe�rejejej ej!fZ"d	d
�Z#dd�Z$d
d�Z%Gdd�d�Z&dd�Z'dd�Z(dd�Z)Gdd�de
�Z*e'�dk�r�e�+d�e*Z,ddl-m*Z*ddl-m&Z&dS)z�distutils.msvccompiler

Contains MSVCCompiler, an implementation of the abstract CCompiler class
for the Microsoft Visual Studio.
�N)�DistutilsExecError�DistutilsPlatformError�CompileError�LibError�	LinkError)�	CCompiler�gen_preprocess_options�gen_lib_options)�logFTz�Warning: Can't read registry to find the necessary compiler setting
Make sure that Python modules winreg, win32api or win32con are installed.cCsnzt||�}Wntk
r$YdSXg}d}zt||�}Wntk
rTYqjYnX|�|�|d7}q.|S)zReturn list of registry keys.Nr�)�RegOpenKeyEx�RegError�
RegEnumKey�append)�base�key�handle�L�i�k�r�./usr/lib64/python3.8/distutils/msvccompiler.py�	read_keys7s


rcCs�zt||�}Wntk
r$YdSXi}d}zt||�\}}}Wntk
rZYq~YnX|��}t|�|t|�<|d7}q.|S)zXReturn dict of registry keys and values.

    All names are converted to lowercase.
    Nrr)rr
�RegEnumValue�lower�convert_mbcs)rrr�dr�name�value�typerrr�read_valuesHs

r cCs:t|dd�}|dk	r6z|d�}Wntk
r4YnX|S)N�decode�mbcs)�getattr�UnicodeError)�sZdecrrrr]src@s,eZdZdd�Zdd�Zdd�Zdd�Zd	S)
�
MacroExpandercCsi|_|�|�dS�N)�macros�load_macros)�self�versionrrr�__init__gszMacroExpander.__init__cCs2tD](}t||�}|r|||jd|<q.qdS)Nz$(%s))�HKEYSr r()r*Zmacro�pathrrrrrr�	set_macroks

zMacroExpander.set_macroc

Cs�d|}|�d|dd�|�d|dd�d}|�d|d	�z*|d
krX|�d|d�n|�d|d
�Wn*tk
r�}ztd��W5d}~XYnXd}tD]V}zt||�}Wntk
r�Yq�YnXt|d�}t|d||f�}	|	d|jd<q�dS)Nz%Software\Microsoft\VisualStudio\%0.1fZVCInstallDirz	\Setup\VCZ
productdirZVSInstallDirz	\Setup\VSz Software\Microsoft\.NETFrameworkZFrameworkDirZinstallrootg@ZFrameworkSDKDirzsdkinstallrootv1.1ZsdkinstallrootaPython was built with Visual Studio 2003;
extensions must be built with a compiler than can generate compatible binaries.
Visual Studio 2003 was not found on this system. If you have Cygwin installed,
you can try compiling with MingW32, by passing "-c mingw32" to setup.py.z.Software\Microsoft\NET Framework Setup\Productrz%s\%sr+z$(FrameworkVersion))	r/�KeyErrorrr-rr
rr r()
r*r+ZvsbaseZnet�exc�pr�hrrrrrr)rs,�

zMacroExpander.load_macroscCs$|j��D]\}}|�||�}q
|Sr')r(�items�replace)r*r%r�vrrr�sub�szMacroExpander.subN)�__name__�
__module__�__qualname__r,r/r)r7rrrrr&fsr&cCs�d}tj�|�}|dkrdS|t|�}tj|d��dd�\}}t|dd��d}|dkrf|d7}t|d	d
��d}|dkr�d}|dkr�||SdS)
z�Return the version of MSVC that was used to build Python.

    For Python 2.3 and up, the version number is included in
    sys.version.  For earlier versions, assume the compiler is MSVC 6.
    zMSC v.����N� r����
��g$@r)�sysr+�find�len�split�int)�prefixrr%�restZmajorVersionZminorVersionrrr�get_build_version�srIcCs@d}tj�|�}|dkrdStj�d|�}tj|t|�|�S)zUReturn the processor architecture.

    Possible results are "Intel" or "AMD64".
    z bit (r;�Intel�))rBr+rCrD)rGr�jrrr�get_build_architecture�srMcCs0g}|D]"}tj�|�}||kr|�|�q|S)znReturn a list of normalized paths with duplicates removed.

    The current order of paths is maintained.
    )�osr.�normpathr)�pathsZ
reduced_pathsr2Znprrr�normalize_and_reduce_paths�srQc
@s�eZdZdZdZiZdgZdddgZdgZdgZ	eeee	Z
d	Zd
ZdZ
dZd
ZZdZd-dd�Zdd�Zd.dd�Zd/dd�Zd0dd�Zd1dd�Zdd�Zd d!�Zd"d#�Zd2d$d%�Zd&d'�Zd3d)d*�Zd+d,�ZdS)4�MSVCCompilerzwConcrete class that implements an interface to Microsoft Visual C++,
       as defined by the CCompiler abstract class.Zmsvcz.cz.ccz.cppz.cxx�.rcz.mcz.resz.objz.libz.dllz%s%sz.exercCsvt�||||�t�|_t�|_|jdkr\|jdkrHd|_t|j�|_nd|_d|j|_	nd|jd|_	d|_
dS)	NrJ�zSoftware\Microsoft\VisualStudiozSoftware\Microsoft\DevstudiozVisual Studio version %szMicrosoft SDK compiler %sr<F)rr,rI�_MSVCCompiler__versionrM�_MSVCCompiler__arch�_MSVCCompiler__rootr&�_MSVCCompiler__macros�_MSVCCompiler__product�initialized)r*�verboseZdry_runZforcerrrr,�s

zMSVCCompiler.__init__cCs�g|_dtjkrDdtjkrD|�d�rDd|_d|_d|_d|_d|_nx|�	d�|_t
|j�d	krltd
|j��|�d�|_|�d�|_|�d�|_|�d�|_|�d�|_|�
d�|�
d�z&tjd�d
�D]}|j�|�q�Wntk
r�YnXt|j�|_d
�|j�tjd<d|_|jdk�rPddddddg|_dddddddg|_n&ddddddg|_dddddddg|_dddg|_|jdk�r�ddddg|_ndddddg|_dg|_d |_dS)!NZDISTUTILS_USE_SDKZMSSdkzcl.exezlink.exezlib.exezrc.exezmc.exer.rzxPython was built with %s, and extensions need to be built with the same version of the compiler, but it isn't installed.�libZinclude�;rJz/nologoz/Oxz/MDz/W3z/GXz/DNDEBUGz/Odz/MDdz/Z7z/D_DEBUGz/GS-z/DLLz/INCREMENTAL:NOrTz/INCREMENTAL:noz/DEBUGz	/pdb:NoneT)�_MSVCCompiler__pathsrN�environ�find_exe�cc�linkerr\�rc�mc�get_msvc_pathsrDrrY�set_path_env_varrErr0rQ�joinZpreprocess_optionsrV�compile_options�compile_options_debug�ldflags_sharedrU�ldflags_shared_debugZldflags_staticrZ)r*r2rrr�
initialize�sr�


�
�
�
���zMSVCCompiler.initialize�cCs�|dkrd}g}|D]�}tj�|�\}}tj�|�d}|tj�|�d�}||jkrbtd|��|rrtj�|�}||jkr�|�	tj�
|||j��q||jkr�|�	tj�
|||j��q|�	tj�
|||j
��q|S)NrmrzDon't know how to compile %s)rNr.�splitext�
splitdrive�isabs�src_extensionsr�basename�_rc_extensionsrrg�
res_extension�_mc_extensions�
obj_extension)r*Zsource_filenamesZ	strip_dir�
output_dirZ	obj_namesZsrc_namer�extrrr�object_filenames8s.

�
��zMSVCCompiler.object_filenamesNc	Csp|js|��|�||||||�}	|	\}}
}}}|p6g}
|
�d�|rT|
�|j�n|
�|j�|
D�]}z||\}}Wntk
r�YqdYnX|r�tj	�
|�}||jkr�d|}�nT||jkr�d|}�n>||j
k�r<|}d|}z"|�|jg||g|g�Wqdtk
�r6}zt|��W5d}~XYqdXqdn�||jk�r�tj	�|�}tj	�|�}zl|�|jgd|d|g|g�tj	�tj	�|��\}}tj	�||d�}|�|jgd|g|g�Wqdtk
�r�}zt|��W5d}~XYqdXqdntd||f��d	|}z&|�|jg|
|||g|�Wqdtk
�rh}zt|��W5d}~XYqdXqd|
S)
Nz/cz/Tcz/Tpz/foz-hz-rrSz"Don't know how to compile %s to %sz/Fo)rZrlZ_setup_compiler�extendrirhr0rNr.�abspath�
_c_extensions�_cpp_extensionsrs�spawnrcrrru�dirnamerdrnrrrgra)r*Zsourcesrwr(Zinclude_dirs�debug�
extra_preargs�extra_postargsZdependsZcompile_info�objectsZpp_optsZbuildZcompile_opts�obj�srcrxZ	input_optZ
output_opt�msgZh_dirZrc_dirr�_Zrc_filerrr�compileWs�
�




��


��
��
���
zMSVCCompiler.compilec	
Cs�|js|��|�||�\}}|j||d�}|�||�r�|d|g}|rJz|�|jg|�Wq�tk
r�}zt|��W5d}~XYq�Xnt	�
d|�dS)N)rw�/OUT:�skipping %s (up-to-date))rZrl�_fix_object_args�library_filename�
_need_linkr~r\rrr
r�)	r*r�Zoutput_libnamerwr��target_lang�output_filenameZlib_argsr�rrr�create_static_lib�s�zMSVCCompiler.create_static_libc
Cs�|js|��|�||�\}}|�|||�}|\}}}|rL|�dt|��t||||�}|dk	rptj�	||�}|�
||��r�|tjkr�|	r�|j
dd�}q�|jdd�}n|	r�|j
}n|j}g}|p�gD]}|�d|�q�||||d|g}|dk	�rHtj�tj�|��\}}tj�	tj�|d�|�|��}|�d|�|
�rZ|
|dd�<|�rj|�|�|�tj�|��z|�|jg|�Wn,tk
�r�}zt|��W5d}~XYnXnt�d|�dS)Nz5I don't know what to do with 'runtime_library_dirs': rz/EXPORT:r�rz/IMPLIB:r�)rZrlr�Z
_fix_lib_args�warn�strr	rNr.rgr�rZ
EXECUTABLErkrjrrnrrrr�rzZmkpathr~rbrrr
r�)r*Ztarget_descr�r�rwZ	librariesZlibrary_dirsZruntime_library_dirsZexport_symbolsr�r�r�Z
build_tempr�Z
fixed_argsZlib_optsZldflagsZexport_optsZsymZld_argsZdll_nameZdll_extZimplib_filer�rrr�link�sj�
��

��

��
zMSVCCompiler.linkcCsd|S)Nz	/LIBPATH:r�r*�dirrrr�library_dir_optionszMSVCCompiler.library_dir_optioncCstd��dS)Nz<don't know how to set runtime library search path for MSVC++)rr�rrr�runtime_library_dir_options�z'MSVCCompiler.runtime_library_dir_optioncCs
|�|�Sr')r�)r*r\rrr�library_optionszMSVCCompiler.library_optioncCs\|r|d|g}n|g}|D]:}|D]0}tj�||�|��}tj�|�r$|Sq$qdS)NZ_d)rNr.rgr��exists)r*�dirsr\r�Z	try_namesr�rZlibfilerrr�find_library_file#szMSVCCompiler.find_library_filecCsz|jD].}tj�tj�|�|�}tj�|�r|Sqtjd�d�D].}tj�tj�|�|�}tj�|�rF|SqF|S)a�Return path to an MSVC executable program.

        Tries to find the program in several places: first, one of the
        MSVC program search paths from the registry; next, the directories
        in the PATH environment variable.  If any of those work, return an
        absolute path that is known to exist.  If none of them work, just
        return the original program name, 'exe'.
        �Pathr])r^rNr.rgr{�isfiler_rE)r*Zexer2�fnrrrr`5s	


zMSVCCompiler.find_exe�x86cCs�tsgS|d}|jdkr,d|j|jf}nd|j|f}tD]H}t||�}|r>|jdkrt|j�||��d�S||�d�Sq>|jdkr�tD]&}t|d|j�dk	r�|�d	�q�q�gS)
z�Get a list of devstudio directories (include, lib or path).

        Return a list of strings.  The list will be empty if unable to
        access the registry or appropriate registry keys not found.
        z dirsrTz6%s\%0.1f\VC\VC_OBJECTS_PLATFORM_INFO\Win32\Directoriesz?%s\6.0\Build System\Components\Platforms\Win32 (%s)\Directoriesr]r<z%s\6.0Nz�It seems you have Visual Studio 6 installed, but the expected registry settings are not present.
You must at least run the Visual Studio GUI once so that these entries are created.)	�
_can_read_regrUrWr-r rXr7rEr�)r*r.�platformrrrrrrreKs,

��



zMSVCCompiler.get_msvc_pathscCs6|dkr|�d�}n
|�|�}|r2d�|�tj|<dS)z�Set environment variable 'name' to an MSVC path type value.

        This is equivalent to a SET command prior to execution of spawned
        commands.
        r\Zlibraryr]N)rergrNr_)r*rr2rrrrfos

zMSVCCompiler.set_path_env_var)rrr)rrm)NNNrNNN)NrN)
NNNNNrNNNN)r)r�)r8r9r:�__doc__Z
compiler_typeZexecutablesr|r}rsrurqrtrvZstatic_lib_extensionZshared_lib_extensionZstatic_lib_formatZshared_lib_formatZ
exe_extensionr,rlryr�r�r�r�r�r�r�r`rerfrrrrrR�sj
��
B�
 �
X�
�
S

$rRg @z3Importing new compiler from distutils.msvc9compiler)rR)r&).r�rBrNZdistutils.errorsrrrrrZdistutils.ccompilerrrr	Z	distutilsr
r��winregZhkey_modZ	OpenKeyExrZEnumKeyrZ	EnumValuer�errorr
�ImportErrorZwin32apiZwin32con�infoZ
HKEY_USERS�HKEY_CURRENT_USER�HKEY_LOCAL_MACHINEZHKEY_CLASSES_ROOTr-rr rr&rIrMrQrRr�ZOldMSVCCompilerZdistutils.msvc9compilerrrrr�<module>s`



�	-
9
PKX[���^3^3-__pycache__/msvccompiler.cpython-38.opt-2.pycnu�[���U

e5d\�@s�ddlZddlZddlmZmZmZmZmZddlm	Z	m
Z
mZddlm
Z
dZz,ddlZdZeZejZejZejZejZWnhek
r�z4ddlZddlZdZeZejZejZejZejZWnek
r�e
�d�YnXYnXer�ejejejej fZ!dd	�Z"d
d�Z#dd
�Z$Gdd�d�Z%dd�Z&dd�Z'dd�Z(Gdd�de	�Z)e&�dk�r~e
�*d�e)Z+ddl,m)Z)ddl,m%Z%dS)�N)�DistutilsExecError�DistutilsPlatformError�CompileError�LibError�	LinkError)�	CCompiler�gen_preprocess_options�gen_lib_options)�logFTz�Warning: Can't read registry to find the necessary compiler setting
Make sure that Python modules winreg, win32api or win32con are installed.cCsnzt||�}Wntk
r$YdSXg}d}zt||�}Wntk
rTYqjYnX|�|�|d7}q.|S�Nr�)�RegOpenKeyEx�RegError�
RegEnumKey�append)�base�key�handle�L�i�k�r�./usr/lib64/python3.8/distutils/msvccompiler.py�	read_keys7s


rcCs�zt||�}Wntk
r$YdSXi}d}zt||�\}}}Wntk
rZYq~YnX|��}t|�|t|�<|d7}q.|Sr)r
r�RegEnumValue�lower�convert_mbcs)rrr�dr�name�value�typerrr�read_valuesHs

r!cCs:t|dd�}|dk	r6z|d�}Wntk
r4YnX|S)N�decode�mbcs)�getattr�UnicodeError)�sZdecrrrr]src@s,eZdZdd�Zdd�Zdd�Zdd�Zd	S)
�
MacroExpandercCsi|_|�|�dS�N)�macros�load_macros)�self�versionrrr�__init__gszMacroExpander.__init__cCs2tD](}t||�}|r|||jd|<q.qdS)Nz$(%s))�HKEYSr!r))r+Zmacro�pathrrrrrr�	set_macroks

zMacroExpander.set_macroc

Cs�d|}|�d|dd�|�d|dd�d}|�d|d	�z*|d
krX|�d|d�n|�d|d
�Wn*tk
r�}ztd��W5d}~XYnXd}tD]V}zt||�}Wntk
r�Yq�YnXt|d�}t|d||f�}	|	d|jd<q�dS)Nz%Software\Microsoft\VisualStudio\%0.1fZVCInstallDirz	\Setup\VCZ
productdirZVSInstallDirz	\Setup\VSz Software\Microsoft\.NETFrameworkZFrameworkDirZinstallrootg@ZFrameworkSDKDirzsdkinstallrootv1.1ZsdkinstallrootaPython was built with Visual Studio 2003;
extensions must be built with a compiler than can generate compatible binaries.
Visual Studio 2003 was not found on this system. If you have Cygwin installed,
you can try compiling with MingW32, by passing "-c mingw32" to setup.py.z.Software\Microsoft\NET Framework Setup\Productrz%s\%sr,z$(FrameworkVersion))	r0�KeyErrorrr.r
rrr!r))
r+r,ZvsbaseZnet�exc�pr�hrrrrrr*rs,�

zMacroExpander.load_macroscCs$|j��D]\}}|�||�}q
|Sr()r)�items�replace)r+r&r�vrrr�sub�szMacroExpander.subN)�__name__�
__module__�__qualname__r-r0r*r8rrrrr'fsr'cCs�d}tj�|�}|dkrdS|t|�}tj|d��dd�\}}t|dd��d}|dkrf|d7}t|dd	��d
}|dkr�d}|dkr�||SdS)NzMSC v.����� r����
��g$@r)�sysr,�find�len�split�int)�prefixrr&�restZmajorVersionZminorVersionrrr�get_build_version�srJcCs@d}tj�|�}|dkrdStj�d|�}tj|t|�|�S)Nz bit (r<�Intel�))rCr,rDrE)rHr�jrrr�get_build_architecture�srNcCs0g}|D]"}tj�|�}||kr|�|�q|Sr()�osr/�normpathr)�pathsZ
reduced_pathsr3Znprrr�normalize_and_reduce_paths�srRc
@s�eZdZdZiZdgZdddgZdgZdgZeeeeZ	dZ
d	Zd
ZdZ
dZZd
Zd,dd�Zdd�Zd-dd�Zd.dd�Zd/dd�Zd0dd�Zdd�Zdd �Zd!d"�Zd1d#d$�Zd%d&�Zd2d(d)�Zd*d+�ZdS)3�MSVCCompilerZmsvcz.cz.ccz.cppz.cxx�.rcz.mcz.resz.objz.libz.dllz%s%sz.exercCsvt�||||�t�|_t�|_|jdkr\|jdkrHd|_t|j�|_nd|_d|j|_	nd|jd|_	d|_
dS)	NrK�zSoftware\Microsoft\VisualStudiozSoftware\Microsoft\DevstudiozVisual Studio version %szMicrosoft SDK compiler %sr=F)rr-rJ�_MSVCCompiler__versionrN�_MSVCCompiler__arch�_MSVCCompiler__rootr'�_MSVCCompiler__macros�_MSVCCompiler__product�initialized)r+�verboseZdry_runZforcerrrr-�s

zMSVCCompiler.__init__cCs�g|_dtjkrDdtjkrD|�d�rDd|_d|_d|_d|_d|_nx|�	d�|_t
|j�d	krltd
|j��|�d�|_|�d�|_|�d�|_|�d�|_|�d�|_|�
d�|�
d�z&tjd�d
�D]}|j�|�q�Wntk
r�YnXt|j�|_d
�|j�tjd<d|_|jdk�rPddddddg|_dddddddg|_n&ddddddg|_dddddddg|_dddg|_|jdk�r�ddddg|_ndddddg|_dg|_d |_dS)!NZDISTUTILS_USE_SDKZMSSdkzcl.exezlink.exezlib.exezrc.exezmc.exer/rzxPython was built with %s, and extensions need to be built with the same version of the compiler, but it isn't installed.�libZinclude�;rKz/nologoz/Oxz/MDz/W3z/GXz/DNDEBUGz/Odz/MDdz/Z7z/D_DEBUGz/GS-z/DLLz/INCREMENTAL:NOrUz/INCREMENTAL:noz/DEBUGz	/pdb:NoneT)�_MSVCCompiler__pathsrO�environ�find_exe�cc�linkerr]�rc�mc�get_msvc_pathsrErrZ�set_path_env_varrFrr1rR�joinZpreprocess_optionsrW�compile_options�compile_options_debug�ldflags_sharedrV�ldflags_shared_debugZldflags_staticr[)r+r3rrr�
initialize�sr�


�
�
�
���zMSVCCompiler.initialize�cCs�|dkrd}g}|D]�}tj�|�\}}tj�|�d}|tj�|�d�}||jkrbtd|��|rrtj�|�}||jkr�|�	tj�
|||j��q||jkr�|�	tj�
|||j��q|�	tj�
|||j
��q|S)NrnrzDon't know how to compile %s)rOr/�splitext�
splitdrive�isabs�src_extensionsr�basename�_rc_extensionsrrh�
res_extension�_mc_extensions�
obj_extension)r+Zsource_filenamesZ	strip_dir�
output_dirZ	obj_namesZsrc_namer�extrrr�object_filenames8s.

�
��zMSVCCompiler.object_filenamesNc	Csp|js|��|�||||||�}	|	\}}
}}}|p6g}
|
�d�|rT|
�|j�n|
�|j�|
D�]}z||\}}Wntk
r�YqdYnX|r�tj	�
|�}||jkr�d|}�nT||jkr�d|}�n>||j
k�r<|}d|}z"|�|jg||g|g�Wqdtk
�r6}zt|��W5d}~XYqdXqdn�||jk�r�tj	�|�}tj	�|�}zl|�|jgd|d|g|g�tj	�tj	�|��\}}tj	�||d�}|�|jgd|g|g�Wqdtk
�r�}zt|��W5d}~XYqdXqdntd||f��d	|}z&|�|jg|
|||g|�Wqdtk
�rh}zt|��W5d}~XYqdXqd|
S)
Nz/cz/Tcz/Tpz/foz-hz-rrTz"Don't know how to compile %s to %sz/Fo)r[rmZ_setup_compiler�extendrjrir1rOr/�abspath�
_c_extensions�_cpp_extensionsrt�spawnrdrrrv�dirnamererorsrhrb)r+Zsourcesrxr)Zinclude_dirs�debug�
extra_preargs�extra_postargsZdependsZcompile_info�objectsZpp_optsZbuildZcompile_opts�obj�srcryZ	input_optZ
output_opt�msgZh_dirZrc_dirr�_Zrc_filerrr�compileWs�
�




��


��
��
���
zMSVCCompiler.compilec	
Cs�|js|��|�||�\}}|j||d�}|�||�r�|d|g}|rJz|�|jg|�Wq�tk
r�}zt|��W5d}~XYq�Xnt	�
d|�dS)N)rx�/OUT:�skipping %s (up-to-date))r[rm�_fix_object_args�library_filename�
_need_linkrr]rrr
r�)	r+r�Zoutput_libnamerxr��target_lang�output_filenameZlib_argsr�rrr�create_static_lib�s�zMSVCCompiler.create_static_libc
Cs�|js|��|�||�\}}|�|||�}|\}}}|rL|�dt|��t||||�}|dk	rptj�	||�}|�
||��r�|tjkr�|	r�|j
dd�}q�|jdd�}n|	r�|j
}n|j}g}|p�gD]}|�d|�q�||||d|g}|dk	�rHtj�tj�|��\}}tj�	tj�|d�|�|��}|�d|�|
�rZ|
|dd�<|�rj|�|�|�tj�|��z|�|jg|�Wn,tk
�r�}zt|��W5d}~XYnXnt�d|�dS)Nz5I don't know what to do with 'runtime_library_dirs': rz/EXPORT:r�rz/IMPLIB:r�)r[rmr�Z
_fix_lib_args�warn�strr	rOr/rhr�rZ
EXECUTABLErlrkrrorsr�r�r{Zmkpathrrcrrr
r�)r+Ztarget_descr�r�rxZ	librariesZlibrary_dirsZruntime_library_dirsZexport_symbolsr�r�r�Z
build_tempr�Z
fixed_argsZlib_optsZldflagsZexport_optsZsymZld_argsZdll_nameZdll_extZimplib_filer�rrr�link�sj�
��

��

��
zMSVCCompiler.linkcCsd|S)Nz	/LIBPATH:r�r+�dirrrr�library_dir_optionszMSVCCompiler.library_dir_optioncCstd��dS)Nz<don't know how to set runtime library search path for MSVC++)rr�rrr�runtime_library_dir_options�z'MSVCCompiler.runtime_library_dir_optioncCs
|�|�Sr()r�)r+r]rrr�library_optionszMSVCCompiler.library_optioncCs\|r|d|g}n|g}|D]:}|D]0}tj�||�|��}tj�|�r$|Sq$qdS)NZ_d)rOr/rhr��exists)r+�dirsr]r�Z	try_namesr�rZlibfilerrr�find_library_file#szMSVCCompiler.find_library_filecCsz|jD].}tj�tj�|�|�}tj�|�r|Sqtjd�d�D].}tj�tj�|�|�}tj�|�rF|SqF|S)N�Pathr^)r_rOr/rhr|�isfiler`rF)r+Zexer3�fnrrrra5s	


zMSVCCompiler.find_exe�x86cCs�tsgS|d}|jdkr,d|j|jf}nd|j|f}tD]H}t||�}|r>|jdkrt|j�||��d�S||�d�Sq>|jdkr�tD]&}t|d|j�dk	r�|�d�q�q�gS)	Nz dirsrUz6%s\%0.1f\VC\VC_OBJECTS_PLATFORM_INFO\Win32\Directoriesz?%s\6.0\Build System\Components\Platforms\Win32 (%s)\Directoriesr^r=z%s\6.0z�It seems you have Visual Studio 6 installed, but the expected registry settings are not present.
You must at least run the Visual Studio GUI once so that these entries are created.)	�
_can_read_regrVrXr.r!rYr8rFr�)r+r/�platformrrrrrrrfKs,

��



zMSVCCompiler.get_msvc_pathscCs6|dkr|�d�}n
|�|�}|r2d�|�tj|<dS)Nr]Zlibraryr^)rfrhrOr`)r+rr3rrrrgos

zMSVCCompiler.set_path_env_var)rrr)rrn)NNNrNNN)NrN)
NNNNNrNNNN)r)r�)r9r:r;Z
compiler_typeZexecutablesr}r~rtrvrrrurwZstatic_lib_extensionZshared_lib_extensionZstatic_lib_formatZshared_lib_formatZ
exe_extensionr-rmrzr�r�r�r�r�r�r�rarfrgrrrrrS�sh
��
B�
 �
X�
�
S

$rSg @z3Importing new compiler from distutils.msvc9compiler)rS)r')-rCrOZdistutils.errorsrrrrrZdistutils.ccompilerrrr	Z	distutilsr
r��winregZhkey_modZ	OpenKeyExr
ZEnumKeyrZ	EnumValuer�errorr�ImportErrorZwin32apiZwin32con�infoZ
HKEY_USERS�HKEY_CURRENT_USER�HKEY_LOCAL_MACHINEZHKEY_CLASSES_ROOTr.rr!rr'rJrNrRrSr�ZOldMSVCCompilerZdistutils.msvc9compilerrrrr�<module>s^


�	-
9
PKX[��˰��&__pycache__/spawn.cpython-38.opt-2.pycnu�[���U

e5d��@s~ddlZddlZddlmZmZddlmZddlmZddd�Z	dd	�Z
dd
d�Zejdkrfda
dadd
d�Zddd�ZdS)�N)�DistutilsPlatformError�DistutilsExecError)�DEBUG)�log�cCsNt|�}tjdkr"t|||d�n(tjdkr<t|||d�ntdtj��dS)N�posix)�dry_run�ntz1don't know how to spawn programs on platform '%s')�list�os�name�_spawn_posix�	_spawn_ntr)�cmd�search_path�verboser�r�'/usr/lib64/python3.8/distutils/spawn.py�spawns

�rcCs*t|�D]\}}d|krd|||<q|S)N� z"%s")�	enumerate)�args�i�argrrr�_nt_quote_args+src
Cs�|d}t|�}|r t|�p|}t�d�|g|dd���|s�zt�tj||�}Wn@tk
r�}z"t	sp|}t
d||jdf��W5d}~XYnX|dkr�t	s�|}t
d||f��dS)Nrrr�command %r failed: %s����%command %r failed with exit status %d)r�find_executabler�info�joinr�spawnv�P_WAIT�OSErrorrrr)rrrr�
executableZrc�excrrrr;s(�
�r�darwinc
Cs|t�d�|��|rdS|d}|r*tjp.tj}d}tjdkr�tdkrxddl	m
}|�d�p^datrxdd�t�d	�D�a
tr�tj�dt�}t
d
d�|�d	�D�kr�d|tf}	t|	��ttj|d�}|r�tjp�tj}t��}
|
dk�r�z$|dkr�|||�n||||�WnNtk
�rX}z.t�s(|}tj�d
||jf�t�d�W5d}~XYnXt�sd|}tj�d|�t�d�n�zt�|
d�\}
}WnDtk
�r�}
z$t�s�|}td||
jdf��W5d}
~
XYnXt�|��rt�s�|}td|t�|�f��nlt� |��rHt�!|�}|dk�r,dSt�s6|}td||f��n,t�"|��rZ�q�nt�sd|}td||f���q�dS)Nrrr&)�	sysconfig�MACOSX_DEPLOYMENT_TARGET�cSsg|]}t|��qSr��int��.0�xrrr�
<listcomp>esz _spawn_posix.<locals>.<listcomp>�.cSsg|]}t|��qSrr*r,rrrr/kszF$MACOSX_DEPLOYMENT_TARGET mismatch: now "%s" but "%s" during configure)r(zunable to execute %r: %s
rz(unable to execute %r for unknown reasonsrrz"command %r terminated by signal %drz1unknown error executing %r: termination status %d)#rrr r�execvp�execv�sys�platform�_cfg_target�	distutilsr'Zget_config_var�split�_cfg_target_split�environ�getr�dict�execvpe�execve�forkr#r�stderr�write�strerror�_exit�waitpidrr�WIFSIGNALED�WTERMSIG�	WIFEXITED�WEXITSTATUS�
WIFSTOPPED)rrrrr$Zexec_fn�envr'Z
cur_targetZmy_msg�pid�eZstatusr%Zexit_statusrrrr
Ws�
����
����

����r
c	Cs�tj�|�\}}tjdkr*|dkr*|d}tj�|�r:|S|dkr�tj�dd�}|dkr�zt�d�}Wnt	t
fk
r�tj}YnX|s�dS|�tj
�}|D]&}tj�||�}tj�|�r�|Sq�dS)NZwin32z.exe�PATH�CS_PATH)r�path�splitextr3r4�isfiler9r:�confstr�AttributeError�
ValueError�defpathr7�pathsepr )r$rN�_Zext�paths�p�frrrr�s(
r)rrr)rrr)rrr)N)r3rZdistutils.errorsrrZdistutils.debugrr6rrrrr4r5r8r
rrrrr�<module>	s



RPKX[�٢�<�<__pycache__/util.cpython-38.pycnu�[���U

e5d�Q�@sdZddlZddlZddlZddlZddlZddlmZddl	m
Z
ddlmZddl
mZddlmZdd	�Zd
d�Zdd
�Zdd�Zdadd�Zdd�Zd*dd�Zdaaadd�Zdd�Zd+dd�Zdd�Zd,d d!�Zd"d#�Z d-d$d%�Z!d.d&d'�Z"Gd(d)�d)�Z#dS)/zudistutils.util

Miscellaneous utility functions -- anything that doesn't fit into
one of the other *util.py modules.
�N)�DistutilsPlatformError)�newer)�spawn)�log)�DistutilsByteCompileErrorc
Cs�tjdkrFdtj��krdSdtj��kr.dSdtj��kr@dStjSdtjkrZtjdStjd	ksnttd
�sttjSt��\}}}}}|���	dd�}|�	d
d�}|�	dd�}|dd�dkr�d||fS|dd�dk�r,|ddk�r�d}dt
|d�d|dd�f}ddd�}|d|tj7}n�|dd�dk�rLd |||fS|dd!�d"k�r�d"}t�
d#tj�}|�|�}|�r�|��}n>|dd!�d$k�r�ddl}ddl}	|�|	j��|||�\}}}d%|||fS)&a�Return a string that identifies the current platform.  This is used mainly to
    distinguish platform-specific build directories and platform-specific built
    distributions.  Typically includes the OS name and version and the
    architecture (as supplied by 'os.uname()'), although the exact information
    included depends on the OS; eg. on Linux, the kernel version isn't
    particularly important.

    Examples of returned values:
       linux-i586
       linux-alpha (?)
       solaris-2.6-sun4u

    Windows will return one of:
       win-amd64 (64bit Windows on AMD64 (aka x86_64, Intel64, EM64T, etc)
       win32 (all others - specifically, sys.platform is returned)

    For other non-POSIX platforms, currently just returns 'sys.platform'.

    �ntZamd64�	win-amd64z(arm)�	win-arm32z(arm64)z	win-arm64Z_PYTHON_HOST_PLATFORM�posix�uname�/�� �_�-N�Zlinuxz%s-%sZsunosr�5Zsolarisz%d.%s��Z32bitZ64bit)i���l����z.%sZaixz%s-%s.%s��cygwinz[\d.]+�darwinz%s-%s-%s)�os�name�sys�version�lower�platform�environ�hasattrr�replace�int�maxsize�re�compile�ASCII�match�group�_osx_supportZdistutils.sysconfigZget_platform_osxZ	sysconfigZget_config_vars)
ZosnameZhost�releaser�machineZbitnessZrel_re�mr(�	distutils�r-�&/usr/lib64/python3.8/distutils/util.py�get_host_platformsR


 


�
r/cCs8tjdkr.dddd�}|�tj�d��p,t�St�SdS)NrZwin32rr	)Zx86Zx64ZarmZVSCMD_ARG_TGT_ARCH)rr�getrr/)ZTARGET_TO_PLATr-r-r.�get_platformas
�r1cCsztjdkr|S|s|S|ddkr.td|��|ddkrFtd|��|�d�}d|krd|�d�qP|sntjStjj|�S)a�Return 'pathname' as a name that will work on the native filesystem,
    i.e. split it on '/' and put it back together again using the current
    directory separator.  Needed because filenames in the setup script are
    always supplied in Unix style, and have to be converted to the local
    convention before we can actually use them in the filesystem.  Raises
    ValueError on non-Unix-ish systems if 'pathname' either starts or
    ends with a slash.
    rrzpath '%s' cannot be absolute���zpath '%s' cannot end with '/'�.)r�sep�
ValueError�split�remove�curdir�path�join)�pathname�pathsr-r-r.�convert_pathls	

r=cCs�tjdkr<tj�|�s$tj�||�Stj�||dd��SnNtjdkr|tj�|�\}}|ddkrn|dd�}tj�||�Stdtj��dS)a	Return 'pathname' with 'new_root' prepended.  If 'pathname' is
    relative, this is equivalent to "os.path.join(new_root,pathname)".
    Otherwise, it requires making 'pathname' relative and then joining the
    two, which is tricky on DOS/Windows and Mac OS.
    r
�Nrr�\z!nothing known about platform '%s')rrr9�isabsr:�
splitdriver)Znew_rootr;Zdriver9r-r-r.�change_root�s

rBc	CsxtrdStjdkrZdtjkrZz$ddl}|�t���dtjd<Wnttfk
rXYnXdtjkrpt	�tjd<dadS)aLEnsure that 'os.environ' has all the environment variables we
    guarantee that users can use in config files, command-line options,
    etc.  Currently this includes:
      HOME - user's home directory (Unix only)
      PLAT - description of the current platform, including hardware
             and OS (see 'get_platform()')
    Nr
�HOMErrZPLATr>)
�_environ_checkedrrr�pwd�getpwuid�getuid�ImportError�KeyErrorr1)rEr-r-r.�
check_environ�s	
rJc
CsVt�|fdd�}zt�d||�WStk
rP}ztd|��W5d}~XYnXdS)a�Perform shell/Perl-style variable substitution on 'string'.  Every
    occurrence of '$' followed by a name is considered a variable, and
    variable is substituted by the value found in the 'local_vars'
    dictionary, or in 'os.environ' if it's not in 'local_vars'.
    'os.environ' is first checked/augmented to guarantee that it contains
    certain values: see 'check_environ()'.  Raise ValueError for any
    variables not found in either 'local_vars' or 'os.environ'.
    cSs,|�d�}||krt||�Stj|SdS)Nr>)r'�strrr)r&�
local_varsZvar_namer-r-r.�_subst�s
zsubst_vars.<locals>._substz\$([a-zA-Z_][a-zA-Z_0-9]*)zinvalid variable '$%s'N)rJr#�subrIr5)�srLrM�varr-r-r.�
subst_vars�s	rQ�error: cCs|t|�S�N)rK)�exc�prefixr-r-r.�grok_environment_error�srVcCs(t�dtj�at�d�at�d�adS)Nz
[^\\\'\"%s ]*z'(?:[^'\\]|\\.)*'z"(?:[^"\\]|\\.)*")r#r$�string�
whitespace�
_wordchars_re�
_squote_re�
_dquote_rer-r-r-r.�_init_regex�s
r\cCs�tdkrt�|��}g}d}|�r�t�||�}|��}|t|�krZ|�|d|���q�||tjkr�|�|d|��||d��	�}d}n�||dkr�|d|�||dd�}|d}n�||dkr�t
�||�}n*||dkr�t�||�}ntd||��|dk�r t
d||��|��\}}|d|�||d|d�||d�}|��d	}|t|�kr|�|��q�q|S)
aSplit a string up according to Unix shell-like rules for quotes and
    backslashes.  In short: words are delimited by spaces, as long as those
    spaces are not escaped by a backslash, or inside a quoted string.
    Single and double quotes are equivalent, and the quote characters can
    be backslash-escaped.  The backslash is stripped from any two-character
    escape sequence, leaving only the escaped character.  The quote
    characters are stripped from any quoted string.  Returns a list of
    words.
    Nrr?r>�'�"z!this can't happen (bad char '%c')z"bad string (mismatched %s quotes?)r)rYr\�stripr&�end�len�appendrWrX�lstriprZr[�RuntimeErrorr5�span)rOZwords�posr+r`Zbegr-r-r.�split_quoted�s@

,
rgcCsP|dkr6d|j|f}|dd�dkr6|dd�d}t�|�|sL||�dS)a�Perform some action that affects the outside world (eg.  by
    writing to the filesystem).  Such actions are special because they
    are disabled by the 'dry_run' flag.  This method takes care of all
    that bureaucracy for you; all you have to do is supply the
    function to call and an argument tuple for it (to embody the
    "external action" being performed), and an optional message to
    print.
    Nz%s%r���z,)r�))�__name__r�info)�func�args�msg�verbose�dry_runr-r-r.�executes	
rqcCs2|��}|dkrdS|dkr dStd|f��dS)z�Convert a string representation of truth to true (1) or false (0).

    True values are 'y', 'yes', 't', 'true', 'on', and '1'; false values
    are 'n', 'no', 'f', 'false', 'off', and '0'.  Raises ValueError if
    'val' is anything else.
    )�yZyes�t�trueZon�1r>)�nZno�fZfalseZoff�0rzinvalid truth value %rN)rr5)�valr-r-r.�	strtobool2srzr>c	CsTddl}tjrtd��|dkr*do(|dk}|�s@zddlm}	|	d�\}
}Wn.tk
rzddlm}d|d�}
}YnXt�	d|�|s�|
dk	r�t
�|
d	�}
n
t|d	�}
|
�B|
�
d
�|
�
d�tt|��d�|
�
d
|||||f�W5QRXtjg}|�|���|�|�t||d�tt
j|fd||d��nddlm}|D]�}|dd�dk�rj�qP|dk�r�|dk�r�dn|}tjj||d�}ntj�|�}|}|�r�|dt|��|k�r�td||f��|t|�d�}|�r�t
j�||�}t
j� |�}|�rP|�st!||��r>t�	d||�|�sL||||�nt�"d||��qPdS)a~Byte-compile a collection of Python source files to .pyc
    files in a __pycache__ subdirectory.  'py_files' is a list
    of files to compile; any files that don't end in ".py" are silently
    skipped.  'optimize' must be one of the following:
      0 - don't optimize
      1 - normal optimization (like "python -O")
      2 - extra optimization (like "python -OO")
    If 'force' is true, all files are recompiled regardless of
    timestamps.

    The source filename encoded in each bytecode file defaults to the
    filenames listed in 'py_files'; you can modify these with 'prefix' and
    'basedir'.  'prefix' is a string that will be stripped off of each
    source filename, and 'base_dir' is a directory name that will be
    prepended (after 'prefix' is stripped).  You can supply either or both
    (or neither) of 'prefix' and 'base_dir', as you wish.

    If 'dry_run' is true, doesn't actually do anything that would
    affect the filesystem.

    Byte-compilation is either done directly in this interpreter process
    with the standard py_compile module, or indirectly by writing a
    temporary script and executing it.  Normally, you should let
    'byte_compile()' figure out to use direct compilation or not (see
    the source for details).  The 'direct' flag is used by the script
    generated in indirect mode; unless you know what you're doing, leave
    it set to None.
    rNzbyte-compiling is disabled.T)�mkstemp�.py)�mktempz$writing byte-compilation script '%s'�wz2from distutils.util import byte_compile
files = [
z,
z]
z�
byte_compile(files, optimize=%r, force=%r,
             prefix=%r, base_dir=%r,
             verbose=%r, dry_run=0,
             direct=1)
)rpzremoving %s)r$���r
)�optimizationz1invalid prefix: filename %r doesn't start with %rzbyte-compiling %s to %sz%skipping byte-compilation of %s to %s)#�
subprocessr�dont_write_bytecoderZtempfiler{rHr}rrkr�fdopen�open�writer:�map�repr�
executable�extendZ"_optim_args_from_interpreter_flagsrbrrqr7�
py_compiler$�	importlib�util�cache_from_sourcerar5r9�basenamer�debug)Zpy_files�optimizeZforcerUZbase_dirrorpZdirectr�r{Z	script_fdZscript_namer}Zscript�cmdr$�file�opt�cfile�dfileZ
cfile_baser-r-r.�byte_compileBsx$

�
�

���r�cCs|�d�}d}|�|�S)z�Return a version of the string escaped for inclusion in an
    RFC-822 header, by ensuring there are 8 spaces space after each newline.
    �
z	
        )r6r:)�header�linesr4r-r-r.�
rfc822_escape�s
r�cCsV|sdSddlm}m}Gdd�d|�}|dkr8|d�}|||d�}|j|dd	�dS)
aInvoke 2to3 on a list of Python files.
    The files should all come from the build area, as the
    modification is done in-place. To reduce the build time,
    only files modified since the last invocation of this
    function should be passed in the files argument.Nr)�RefactoringTool�get_fixers_from_packagec@s$eZdZdd�Zdd�Zdd�ZdS)z*run_2to3.<locals>.DistutilsRefactoringToolc_stj|f|��dSrS)r�error)�selfrnrm�kwr-r-r.�	log_error�sz4run_2to3.<locals>.DistutilsRefactoringTool.log_errorcWstj|f|��dSrS)rrk�r�rnrmr-r-r.�log_message�sz6run_2to3.<locals>.DistutilsRefactoringTool.log_messagecWstj|f|��dSrS)rr�r�r-r-r.�	log_debug�sz4run_2to3.<locals>.DistutilsRefactoringTool.log_debugN)rj�
__module__�__qualname__r�r�r�r-r-r-r.�DistutilsRefactoringTool�sr�z
lib2to3.fixes)�optionsT)r�)Zlib2to3.refactorr�r�Zrefactor)�files�fixer_namesr��explicitr�r�r��rr-r-r.�run_2to3�s
r�c	Csddlm}ddlm}ddlm}|�}	t��}
t�|�z|	�	�W5t�|
�X|	j
|	jdd�<|r�|��D]}|�
�}|s�qr|	�|�qrg}|	jD]L}
tj�||
�}|tj�|��|tj�||
�|dd�}|dr�|�|�q�tdd	�|D�|||d
�|S)z�Recursively copy a directory, only copying new and changed files,
    running run_2to3 over all newly copied Python modules afterward.

    If you give a template string, it's parsed like a MANIFEST.in.
    r)�mkpath)�	copy_file)�FileListNr>)�updatecSsg|]}|���d�r|�qS)r|)r�endswith)�.0�fnr-r-r.�
<listcomp>sz$copydir_run_2to3.<locals>.<listcomp>)r�r�r�)Zdistutils.dir_utilr�Zdistutils.file_utilr�Zdistutils.filelistr�r�getcwd�chdir�findallZallfilesr��
splitlinesr_Zprocess_template_liner9r:�dirnamerbr�)�src�dest�templater�r�r�r�r�r�Zfilelistr8�lineZcopied�filenameZoutname�resr-r-r.�copydir_run_2to3�s:

�r�c@s$eZdZdZdZdZdZdd�ZdS)�	Mixin2to3z�Mixin class for commands that run 2to3.
    To configure 2to3, setup scripts may either change
    the class variables, or inherit from individual commands
    to override how 2to3 is invoked.NcCst||j|j|j�SrS)r�r�r�r�)r�r�r-r-r.r�-szMixin2to3.run_2to3)rjr�r��__doc__r�r�r�r�r-r-r-r.r�s
r�)rR)Nrr)rrNNr>rN)NNN)NNNN)$r�rr#�importlib.utilr�rWrZdistutils.errorsrZdistutils.dep_utilrZdistutils.spawnrr,rrr/r1r=rBrDrJrQrVrYrZr[r\rgrqrzr�r�r�r�r�r-r-r-r.�<module>sNO
=
�


�
!PKX[U�����.__pycache__/unixccompiler.cpython-38.opt-2.pycnu�[���U

&�.e�;�@s�ddlZddlZddlZddlmZddlmZddlmZm	Z	m
Z
ddlmZm
Z
mZmZddlmZejdkrzddlZGdd	�d	e�ZdS)
�N)�	sysconfig)�newer)�	CCompiler�gen_preprocess_options�gen_lib_options)�DistutilsExecError�CompileError�LibError�	LinkError)�log�darwinc
s�eZdZdZddgdgdgddgdgddgdd�Zejdd�d	krNd
ged
<ddd
dddgZdZdZ	dZ
dZdZdZ
ZZeZejdkr�dZ�fdd�Zd.dd�Zdd�Zd/d d!�Zd0d"d#�Zd$d%�Zd&d'�Zd(d)�Zd*d+�Zd1d,d-�Z�ZS)2�
UnixCCompilerZunixNZccz-sharedZarz-cr)�preprocessor�compiler�compiler_so�compiler_cxx�	linker_so�
linker_exe�archiver�ranlib�rrz.cz.Cz.ccz.cxxz.cppz.mz.oz.az.soz.dylibz.tbdzlib%s%s�cygwinz.execs@t��|||�\}}}t�d�}|r6||kr6|�|�|||fS)NZLIBDIR)�super�
_fix_lib_argsr�get_config_var�remove)�self�	libraries�library_dirs�runtime_library_dirsZlibdir��	__class__��//usr/lib64/python3.8/distutils/unixccompiler.pyrUs�


zUnixCCompiler._fix_lib_argsc
Cs�|�d||�}|\}}}t||�}	|j|	}
|r>|
�d|g�|rN||
dd�<|r\|
�|�|
�|�|js~|dks~t||�r�|r�|�tj	�
|��z|�|
�Wn*tk
r�}zt
|��W5d}~XYnXdS)N�-or)Z_fix_compile_argsrr�extend�appendZforcer�mkpath�os�path�dirname�spawnrr)r�sourceZoutput_fileZmacrosZinclude_dirs�
extra_preargs�extra_postargs�
fixed_args�ignore�pp_optsZpp_args�msgr"r"r#�
preprocess^s$




zUnixCCompiler.preprocessc	
Csp|j}tjdkr t�|||�}z |�|||d|g|�Wn*tk
rj}zt|��W5d}~XYnXdS)Nrr$)r�sys�platform�_osx_support�compiler_fixupr+rr)	r�obj�srcZextZcc_argsr.r1rr2r"r"r#�_compilexs
��
zUnixCCompiler._compilerc
Cs�|�||�\}}|j||d�}|�||�r�|�tj�|��|�|j|g||j	�|j
r�z|�|j
|g�Wq�tk
r�}zt|��W5d}~XYq�Xnt
�d|�dS)N)�
output_dir�skipping %s (up-to-date))�_fix_object_args�library_filename�
_need_linkr'r(r)r*r+r�objectsrrr	r�debug)rr@Zoutput_libnamer;rA�target_lang�output_filenamer2r"r"r#�create_static_lib�s$����	zUnixCCompiler.create_static_libc
Cs�|�||�\}}|�|||�}|\}}}t||||�}t|ttd�f�sPtd��|dk	rftj�	||�}|�
||��r�||j|d|g}|	r�dg|dd�<|
r�|
|dd�<|r�|�|�|�
tj�|��z�|tjkr�|jdd�}n|jdd�}|
dk�rr|j�rrd}tj�|d�dk�r@d}d||k�r@|d7}�q&tj�||�d	k�r\d}nd}|j||||<tjd
k�r�t�||�}|�||�Wn,tk
�r�}zt|��W5d}~XYnXnt�d|�dS)Nz%'output_dir' must be a string or Noner$z-grzc++�env��=Z	ld_so_aixrr<)r=rr�
isinstance�str�type�	TypeErrorr(r)�joinr?r@r%r'r*rZ
EXECUTABLErrr�basenamer4r5r6r7r+rr
rrA)rZtarget_descr@rCr;rrrZexport_symbolsrAr-r.Z
build_temprBr/Zlib_optsZld_argsZlinker�i�offsetr2r"r"r#�link�sZ�
���

zUnixCCompiler.linkcCsd|S)N�-Lr")r�dirr"r"r#�library_dir_option�sz UnixCCompiler.library_dir_optioncCsd|kpd|kS)NZgcczg++r")rZ
compiler_namer"r"r#�_is_gcc�szUnixCCompiler._is_gcccCs�tj�t�d��}tjdd�dkr,d|Stjdd�dkrFd|Stjdd�d	krz|�|�rnd
d|gSdd|gS|�|�r�t�d�d
kr�d|Sd|Snd|SdS)N�CCrrrQ�Zfreebsdz-Wl,-rpath=�zhp-uxz-Wl,+sz+sZGNULDZyesz-Wl,--enable-new-dtags,-Rz-Wl,-Rz-R)r(r)rMrrr4r5rT)rrRrr"r"r#�runtime_library_dir_option�s


z(UnixCCompiler.runtime_library_dir_optioncCsd|S)Nz-lr")r�libr"r"r#�library_optionszUnixCCompiler.library_optioncCs�|j|dd�}|j|dd�}|j|dd�}|j|dd�}tjdkr|t�d�}t�d|�}	|	dkrrt�t�d	��}
n
|	�	d
�}
|D�] }t
j�||�}t
j�||�}
t
j�||�}t
j�||�}tjdk�rL|�
d�s�|�
d��rL|�
d
��sLt
j�|
|d
d�|�}t
j�|
|d
d�|�}
t
j�|
|d
d�|�}t
j�|
|d
d�|�}t
j�|
��rb|
St
j�|��rx|St
j�|��r�|St
j�|�r�|Sq�dS)N�shared)Zlib_type�dylib�
xcode_stub�staticrZCFLAGSz-isysroot\s*(\S+)rUrFz/System/z/usr/z/usr/local/)r>r4r5rr�re�searchr6Z_default_sysroot�groupr(r)rL�
startswith�exists)r�dirsrYrAZshared_fZdylib_fZxcode_stub_fZstatic_fZcflags�mZsysrootrRr[r\r^r]r"r"r#�find_library_filesF



���
zUnixCCompiler.find_library_file)NNNNN)NrN)
NNNNNrNNNN)r)�__name__�
__module__�__qualname__Z
compiler_typeZexecutablesr4r5Zsrc_extensionsZ
obj_extensionZstatic_lib_extensionZshared_lib_extensionZdylib_lib_extensionZxcode_stub_lib_extensionZstatic_lib_formatZshared_lib_formatZdylib_lib_formatZxcode_stub_lib_formatZ
exe_extensionrr3r:rDrPrSrTrXrZrf�
__classcell__r"r"r r#r
-sb�


	�
�
�
B*r
)r(r4r_Z	distutilsrZdistutils.dep_utilrZdistutils.ccompilerrrrZdistutils.errorsrrr	r
rr5r6r
r"r"r"r#�<module>s
PKX[�J���<�<%__pycache__/util.cpython-38.opt-1.pycnu�[���U

e5d�Q�@sdZddlZddlZddlZddlZddlZddlmZddl	m
Z
ddlmZddl
mZddlmZdd	�Zd
d�Zdd
�Zdd�Zdadd�Zdd�Zd*dd�Zdaaadd�Zdd�Zd+dd�Zdd�Zd,d d!�Zd"d#�Z d-d$d%�Z!d.d&d'�Z"Gd(d)�d)�Z#dS)/zudistutils.util

Miscellaneous utility functions -- anything that doesn't fit into
one of the other *util.py modules.
�N)�DistutilsPlatformError)�newer)�spawn)�log)�DistutilsByteCompileErrorc
Cs�tjdkrFdtj��krdSdtj��kr.dSdtj��kr@dStjSdtjkrZtjdStjd	ksnttd
�sttjSt��\}}}}}|���	dd�}|�	d
d�}|�	dd�}|dd�dkr�d||fS|dd�dk�r,|ddk�r�d}dt
|d�d|dd�f}ddd�}|d|tj7}n�|dd�dk�rLd |||fS|dd!�d"k�r�d"}t�
d#tj�}|�|�}|�r�|��}n>|dd!�d$k�r�ddl}ddl}	|�|	j��|||�\}}}d%|||fS)&a�Return a string that identifies the current platform.  This is used mainly to
    distinguish platform-specific build directories and platform-specific built
    distributions.  Typically includes the OS name and version and the
    architecture (as supplied by 'os.uname()'), although the exact information
    included depends on the OS; eg. on Linux, the kernel version isn't
    particularly important.

    Examples of returned values:
       linux-i586
       linux-alpha (?)
       solaris-2.6-sun4u

    Windows will return one of:
       win-amd64 (64bit Windows on AMD64 (aka x86_64, Intel64, EM64T, etc)
       win32 (all others - specifically, sys.platform is returned)

    For other non-POSIX platforms, currently just returns 'sys.platform'.

    �ntZamd64�	win-amd64z(arm)�	win-arm32z(arm64)z	win-arm64Z_PYTHON_HOST_PLATFORM�posix�uname�/�� �_�-N�Zlinuxz%s-%sZsunosr�5Zsolarisz%d.%s��Z32bitZ64bit)i���l����z.%sZaixz%s-%s.%s��cygwinz[\d.]+�darwinz%s-%s-%s)�os�name�sys�version�lower�platform�environ�hasattrr�replace�int�maxsize�re�compile�ASCII�match�group�_osx_supportZdistutils.sysconfigZget_platform_osxZ	sysconfigZget_config_vars)
ZosnameZhost�releaser�machineZbitnessZrel_re�mr(�	distutils�r-�&/usr/lib64/python3.8/distutils/util.py�get_host_platformsR


 


�
r/cCs8tjdkr.dddd�}|�tj�d��p,t�St�SdS)NrZwin32rr	)Zx86Zx64ZarmZVSCMD_ARG_TGT_ARCH)rr�getrr/)ZTARGET_TO_PLATr-r-r.�get_platformas
�r1cCsztjdkr|S|s|S|ddkr.td|��|ddkrFtd|��|�d�}d|krd|�d�qP|sntjStjj|�S)a�Return 'pathname' as a name that will work on the native filesystem,
    i.e. split it on '/' and put it back together again using the current
    directory separator.  Needed because filenames in the setup script are
    always supplied in Unix style, and have to be converted to the local
    convention before we can actually use them in the filesystem.  Raises
    ValueError on non-Unix-ish systems if 'pathname' either starts or
    ends with a slash.
    rrzpath '%s' cannot be absolute���zpath '%s' cannot end with '/'�.)r�sep�
ValueError�split�remove�curdir�path�join)�pathname�pathsr-r-r.�convert_pathls	

r=cCs�tjdkr<tj�|�s$tj�||�Stj�||dd��SnNtjdkr|tj�|�\}}|ddkrn|dd�}tj�||�Stdtj��dS)a	Return 'pathname' with 'new_root' prepended.  If 'pathname' is
    relative, this is equivalent to "os.path.join(new_root,pathname)".
    Otherwise, it requires making 'pathname' relative and then joining the
    two, which is tricky on DOS/Windows and Mac OS.
    r
�Nrr�\z!nothing known about platform '%s')rrr9�isabsr:�
splitdriver)Znew_rootr;Zdriver9r-r-r.�change_root�s

rBc	CsxtrdStjdkrZdtjkrZz$ddl}|�t���dtjd<Wnttfk
rXYnXdtjkrpt	�tjd<dadS)aLEnsure that 'os.environ' has all the environment variables we
    guarantee that users can use in config files, command-line options,
    etc.  Currently this includes:
      HOME - user's home directory (Unix only)
      PLAT - description of the current platform, including hardware
             and OS (see 'get_platform()')
    Nr
�HOMErrZPLATr>)
�_environ_checkedrrr�pwd�getpwuid�getuid�ImportError�KeyErrorr1)rEr-r-r.�
check_environ�s	
rJc
CsVt�|fdd�}zt�d||�WStk
rP}ztd|��W5d}~XYnXdS)a�Perform shell/Perl-style variable substitution on 'string'.  Every
    occurrence of '$' followed by a name is considered a variable, and
    variable is substituted by the value found in the 'local_vars'
    dictionary, or in 'os.environ' if it's not in 'local_vars'.
    'os.environ' is first checked/augmented to guarantee that it contains
    certain values: see 'check_environ()'.  Raise ValueError for any
    variables not found in either 'local_vars' or 'os.environ'.
    cSs,|�d�}||krt||�Stj|SdS)Nr>)r'�strrr)r&�
local_varsZvar_namer-r-r.�_subst�s
zsubst_vars.<locals>._substz\$([a-zA-Z_][a-zA-Z_0-9]*)zinvalid variable '$%s'N)rJr#�subrIr5)�srLrM�varr-r-r.�
subst_vars�s	rQ�error: cCs|t|�S�N)rK)�exc�prefixr-r-r.�grok_environment_error�srVcCs(t�dtj�at�d�at�d�adS)Nz
[^\\\'\"%s ]*z'(?:[^'\\]|\\.)*'z"(?:[^"\\]|\\.)*")r#r$�string�
whitespace�
_wordchars_re�
_squote_re�
_dquote_rer-r-r-r.�_init_regex�s
r\cCs�tdkrt�|��}g}d}|�r�t�||�}|��}|t|�krZ|�|d|���q�||tjkr�|�|d|��||d��	�}d}n�||dkr�|d|�||dd�}|d}n�||dkr�t
�||�}n*||dkr�t�||�}ntd||��|dk�r t
d||��|��\}}|d|�||d|d�||d�}|��d	}|t|�kr|�|��q�q|S)
aSplit a string up according to Unix shell-like rules for quotes and
    backslashes.  In short: words are delimited by spaces, as long as those
    spaces are not escaped by a backslash, or inside a quoted string.
    Single and double quotes are equivalent, and the quote characters can
    be backslash-escaped.  The backslash is stripped from any two-character
    escape sequence, leaving only the escaped character.  The quote
    characters are stripped from any quoted string.  Returns a list of
    words.
    Nrr?r>�'�"z!this can't happen (bad char '%c')z"bad string (mismatched %s quotes?)r)rYr\�stripr&�end�len�appendrWrX�lstriprZr[�RuntimeErrorr5�span)rOZwords�posr+r`Zbegr-r-r.�split_quoted�s@

,
rgcCsP|dkr6d|j|f}|dd�dkr6|dd�d}t�|�|sL||�dS)a�Perform some action that affects the outside world (eg.  by
    writing to the filesystem).  Such actions are special because they
    are disabled by the 'dry_run' flag.  This method takes care of all
    that bureaucracy for you; all you have to do is supply the
    function to call and an argument tuple for it (to embody the
    "external action" being performed), and an optional message to
    print.
    Nz%s%r���z,)r�))�__name__r�info)�func�args�msg�verbose�dry_runr-r-r.�executes	
rqcCs2|��}|dkrdS|dkr dStd|f��dS)z�Convert a string representation of truth to true (1) or false (0).

    True values are 'y', 'yes', 't', 'true', 'on', and '1'; false values
    are 'n', 'no', 'f', 'false', 'off', and '0'.  Raises ValueError if
    'val' is anything else.
    )�yZyes�t�trueZon�1r>)�nZno�fZfalseZoff�0rzinvalid truth value %rN)rr5)�valr-r-r.�	strtobool2srzr>c	CsTddl}tjrtd��|dkr*do(|dk}|�s@zddlm}	|	d�\}
}Wn.tk
rzddlm}d|d�}
}YnXt�	d|�|s�|
dk	r�t
�|
d	�}
n
t|d	�}
|
�B|
�
d
�|
�
d�tt|��d�|
�
d
|||||f�W5QRXtjg}|�|���|�|�t||d�tt
j|fd||d��nddlm}|D]�}|dd�dk�rj�qP|dk�r�|dk�r�dn|}tjj||d�}ntj�|�}|}|�r�|dt|��|k�r�td||f��|t|�d�}|�r�t
j�||�}t
j� |�}|�rP|�st!||��r>t�	d||�|�sL||||�nt�"d||��qPdS)a~Byte-compile a collection of Python source files to .pyc
    files in a __pycache__ subdirectory.  'py_files' is a list
    of files to compile; any files that don't end in ".py" are silently
    skipped.  'optimize' must be one of the following:
      0 - don't optimize
      1 - normal optimization (like "python -O")
      2 - extra optimization (like "python -OO")
    If 'force' is true, all files are recompiled regardless of
    timestamps.

    The source filename encoded in each bytecode file defaults to the
    filenames listed in 'py_files'; you can modify these with 'prefix' and
    'basedir'.  'prefix' is a string that will be stripped off of each
    source filename, and 'base_dir' is a directory name that will be
    prepended (after 'prefix' is stripped).  You can supply either or both
    (or neither) of 'prefix' and 'base_dir', as you wish.

    If 'dry_run' is true, doesn't actually do anything that would
    affect the filesystem.

    Byte-compilation is either done directly in this interpreter process
    with the standard py_compile module, or indirectly by writing a
    temporary script and executing it.  Normally, you should let
    'byte_compile()' figure out to use direct compilation or not (see
    the source for details).  The 'direct' flag is used by the script
    generated in indirect mode; unless you know what you're doing, leave
    it set to None.
    rNzbyte-compiling is disabled.F)�mkstemp�.py)�mktempz$writing byte-compilation script '%s'�wz2from distutils.util import byte_compile
files = [
z,
z]
z�
byte_compile(files, optimize=%r, force=%r,
             prefix=%r, base_dir=%r,
             verbose=%r, dry_run=0,
             direct=1)
)rpzremoving %s)r$���r
)�optimizationz1invalid prefix: filename %r doesn't start with %rzbyte-compiling %s to %sz%skipping byte-compilation of %s to %s)#�
subprocessr�dont_write_bytecoderZtempfiler{rHr}rrkr�fdopen�open�writer:�map�repr�
executable�extendZ"_optim_args_from_interpreter_flagsrbrrqr7�
py_compiler$�	importlib�util�cache_from_sourcerar5r9�basenamer�debug)Zpy_files�optimizeZforcerUZbase_dirrorpZdirectr�r{Z	script_fdZscript_namer}Zscript�cmdr$�file�opt�cfile�dfileZ
cfile_baser-r-r.�byte_compileBsx$

�
�

���r�cCs|�d�}d}|�|�S)z�Return a version of the string escaped for inclusion in an
    RFC-822 header, by ensuring there are 8 spaces space after each newline.
    �
z	
        )r6r:)�header�linesr4r-r-r.�
rfc822_escape�s
r�cCsV|sdSddlm}m}Gdd�d|�}|dkr8|d�}|||d�}|j|dd	�dS)
aInvoke 2to3 on a list of Python files.
    The files should all come from the build area, as the
    modification is done in-place. To reduce the build time,
    only files modified since the last invocation of this
    function should be passed in the files argument.Nr)�RefactoringTool�get_fixers_from_packagec@s$eZdZdd�Zdd�Zdd�ZdS)z*run_2to3.<locals>.DistutilsRefactoringToolc_stj|f|��dSrS)r�error)�selfrnrm�kwr-r-r.�	log_error�sz4run_2to3.<locals>.DistutilsRefactoringTool.log_errorcWstj|f|��dSrS)rrk�r�rnrmr-r-r.�log_message�sz6run_2to3.<locals>.DistutilsRefactoringTool.log_messagecWstj|f|��dSrS)rr�r�r-r-r.�	log_debug�sz4run_2to3.<locals>.DistutilsRefactoringTool.log_debugN)rj�
__module__�__qualname__r�r�r�r-r-r-r.�DistutilsRefactoringTool�sr�z
lib2to3.fixes)�optionsT)r�)Zlib2to3.refactorr�r�Zrefactor)�files�fixer_namesr��explicitr�r�r��rr-r-r.�run_2to3�s
r�c	Csddlm}ddlm}ddlm}|�}	t��}
t�|�z|	�	�W5t�|
�X|	j
|	jdd�<|r�|��D]}|�
�}|s�qr|	�|�qrg}|	jD]L}
tj�||
�}|tj�|��|tj�||
�|dd�}|dr�|�|�q�tdd	�|D�|||d
�|S)z�Recursively copy a directory, only copying new and changed files,
    running run_2to3 over all newly copied Python modules afterward.

    If you give a template string, it's parsed like a MANIFEST.in.
    r)�mkpath)�	copy_file)�FileListNr>)�updatecSsg|]}|���d�r|�qS)r|)r�endswith)�.0�fnr-r-r.�
<listcomp>sz$copydir_run_2to3.<locals>.<listcomp>)r�r�r�)Zdistutils.dir_utilr�Zdistutils.file_utilr�Zdistutils.filelistr�r�getcwd�chdir�findallZallfilesr��
splitlinesr_Zprocess_template_liner9r:�dirnamerbr�)�src�dest�templater�r�r�r�r�r�Zfilelistr8�lineZcopied�filenameZoutname�resr-r-r.�copydir_run_2to3�s:

�r�c@s$eZdZdZdZdZdZdd�ZdS)�	Mixin2to3z�Mixin class for commands that run 2to3.
    To configure 2to3, setup scripts may either change
    the class variables, or inherit from individual commands
    to override how 2to3 is invoked.NcCst||j|j|j�SrS)r�r�r�r�)r�r�r-r-r.r�-szMixin2to3.run_2to3)rjr�r��__doc__r�r�r�r�r-r-r-r.r�s
r�)rR)Nrr)rrNNr>rN)NNN)NNNN)$r�rr#�importlib.utilr�rWrZdistutils.errorsrZdistutils.dep_utilrZdistutils.spawnrr,rrr/r1r=rBrDrJrQrVrYrZr[r\rgrqrzr�r�r�r�r�r-r-r-r.�<module>sNO
=
�


�
!PKX[�^(�=�=.__pycache__/msvc9compiler.cpython-38.opt-2.pycnu�[���U

e5d/w�@sNddlZddlZddlZddlZddlmZmZmZmZm	Z	ddl
mZmZm
Z
ddlmZddlmZddlZejZejZejZejZejejejejfZej dko�ej!dkZ"e"r�dZ#d	Z$d
Z%ndZ#dZ$d
Z%ddd�Z&Gdd�d�Z'Gdd�d�Z(dd�Z)dd�Z*dd�Z+dd�Z,d#dd�Z-e)�Z.e.dk�r:ed e.��Gd!d"�d"e�Z/dS)$�N)�DistutilsExecError�DistutilsPlatformError�CompileError�LibError�	LinkError)�	CCompiler�gen_preprocess_options�gen_lib_options)�log)�get_platform�win32lz1Software\Wow6432Node\Microsoft\VisualStudio\%0.1fz5Software\Wow6432Node\Microsoft\Microsoft SDKs\Windowsz,Software\Wow6432Node\Microsoft\.NETFrameworkz%Software\Microsoft\VisualStudio\%0.1fz)Software\Microsoft\Microsoft SDKs\Windowsz Software\Microsoft\.NETFramework�x86Zamd64�rz	win-amd64c@sLeZdZdd�Zee�Zdd�Zee�Zdd�Zee�Zdd�Zee�Zd	S)
�RegcCs:tD](}|�||�}|r||kr||Sqt|��dS�N)�HKEYS�read_values�KeyError)�cls�path�key�base�d�r�//usr/lib64/python3.8/distutils/msvc9compiler.py�	get_value@s
z
Reg.get_valuecCsnzt||�}Wntk
r$YdSXg}d}zt||�}Wntk
rTYqjYnX|�|�|d7}q.|S�Nr�)�RegOpenKeyEx�RegError�
RegEnumKey�append)rrr�handle�L�i�krrr�	read_keysHs


z
Reg.read_keysc	Cs�zt||�}Wntk
r$YdSXi}d}zt||�\}}}Wntk
rZYq�YnX|��}|�|�||�|�<|d7}q.|Sr)rr�RegEnumValue�lower�convert_mbcs)	rrrr"rr$�name�value�typerrrrZs

zReg.read_valuescCs:t|dd�}|dk	r6z|d�}Wntk
r4YnX|S)N�decode�mbcs)�getattr�UnicodeError)�sZdecrrrr)pszReg.convert_mbcsN)	�__name__�
__module__�__qualname__r�classmethodr&rr)�staticmethodrrrrr<src@s,eZdZdd�Zdd�Zdd�Zdd�Zd	S)
�
MacroExpandercCsi|_t||_|�|�dSr)�macros�VS_BASE�vsbase�load_macros)�self�versionrrr�__init__|s
zMacroExpander.__init__cCst�||�|jd|<dS)Nz$(%s))rrr8)r<Zmacrorrrrr�	set_macro�szMacroExpander.set_macroc	Cs|�d|jdd�|�d|jdd�|�dtd�z$|dkrP|�d	td
�ntd
��Wntk
rvtd��YnX|dkr�|�d
|jd�|�dtd�nbd}tD]X}zt||�}Wntk
r�Yq�YnXt	|d�}t
�|d||f�}|d|jd<q�dS)NZVCInstallDirz	\Setup\VC�
productdirZVSInstallDirz	\Setup\VSZFrameworkDirZinstallroot� @ZFrameworkSDKDirzsdkinstallrootv2.0aPython was built with Visual Studio 2008;
extensions must be built with a compiler than can generate compatible binaries.
Visual Studio 2008 was not found on this system. If you have Cygwin installed,
you can try compiling with MingW32, by passing "-c mingw32" to setup.py.g"@ZFrameworkVersionzclr versionZ
WindowsSdkDirZcurrentinstallfolderz.Software\Microsoft\NET Framework Setup\Productrz%s\%sr=z$(FrameworkVersion))
r?r:�NET_BASErr�WINSDK_BASErrrr rrr8)r<r=�pr�hrrrrrr;�s2��


zMacroExpander.load_macroscCs$|j��D]\}}|�||�}q
|Sr)r8�items�replace)r<r1r%�vrrr�sub�szMacroExpander.subN)r2r3r4r>r?r;rIrrrrr7zsr7cCs�d}tj�|�}|dkrdS|t|�}tj|d��dd�\}}t|dd��d}|dkrf|d7}t|dd	��d
}|dkr�d}|dkr�||SdS)NzMSC v.����� r����
��g$@r)�sysr=�find�len�split�int)�prefixr$r1�restZmajorVersionZminorVersionrrr�get_build_version�srXcCs0g}|D]"}tj�|�}||kr|�|�q|Sr)�osr�normpathr!)�pathsZ
reduced_pathsrDZnprrr�normalize_and_reduce_paths�sr\cCs<|�tj�}g}|D]}||kr|�|�qtj�|�}|Sr)rTrY�pathsepr!�join)ZvariableZoldListZnewListr$ZnewVariablerrr�removeDuplicates�sr_cCst|}zt�d|d�}Wn"tk
r>t�d�d}YnX|rPtj�|�s�d|}tj	�
|d�}|r�tj�|�r�tj�|tjtjd�}tj�
|�}tj�|�s�t�d|�dSnt�d|�|s�t�d�dStj�|d	�}tj�|�r�|St�d
�dS)Nz%s\Setup\VCr@z%Unable to find productdir in registryzVS%0.f0COMNTOOLSZVCz%s is not a valid directoryz Env var %s is not set or invalidzNo productdir foundz
vcvarsall.bat�Unable to find vcvarsall.bat)r9rrrr
�debugrYr�isdir�environ�getr^�pardir�abspath�isfile)r=r:r@ZtoolskeyZtoolsdir�	vcvarsallrrr�find_vcvarsall�s4
�



ricCs8t|�}ddddh}i}|dkr(td��t�d||�tjd||ftjtjd�}z�|�
�\}}|��d	krzt|�d
���|�d
�}|�
d�D]d}t�|�}d|kr�q�|��}|�
dd
�\}	}
|	��}	|	|kr�|
�tj�r�|
dd�}
t|
�||	<q�W5|j��|j	��Xt|�t|�k�r4ttt|������|S)N�include�libZlibpathrr`z'Calling 'vcvarsall.bat %s' (version=%s)z
"%s" %s & set)�stdout�stderrrr.�
�=rrJ)rirr
ra�
subprocess�Popen�PIPErl�closermZcommunicate�waitr-rTrr)�stripr(�endswithrYr]r_rS�
ValueError�str�list�keys)r=ZarchrhZinteresting�result�popenrlrm�linerr+rrr�query_vcvarsall�s>�


r~rAz(VC %0.1f is not supported by this modulec
@s�eZdZdZiZdgZdddgZdgZdgZeeeeZ	dZ
d	Zd
ZdZ
dZZd
Zd-dd�Zd.dd�Zd/dd�Zd0dd�Zd1dd�Zd2dd�Zdd�Zdd �Zd!d"�Zd#d$�Zd%d&�Zd'd(�Zd3d)d*�Zd+d,�ZdS)4�MSVCCompilerZmsvcz.cz.ccz.cppz.cxx�.rcz.mcz.resz.objz.libz.dllz%s%sz.exercCs8t�||||�t|_d|_g|_d|_d|_d|_dS)NzSoftware\Microsoft\VisualStudioF)	rr>�VERSION�_MSVCCompiler__versionZ_MSVCCompiler__root�_MSVCCompiler__paths�	plat_name�_MSVCCompiler__arch�initialized)r<�verboseZdry_runZforcerrrr>IszMSVCCompiler.__init__NcCs|dkrt�}d}||kr(td|f��dtjkrfdtjkrf|�d�rfd|_d|_d|_d|_d	|_	n�|t�ksx|d
kr�t
|}nt
t�dt
|}tt|�}|d�
tj�|_|d
tjd
<|dtjd<t|j�dkr�td|j��|�d�|_|�d�|_|�d�|_|�d�|_|�d	�|_	z(tjd�
d�D]}|j�|��q:Wntk
�rfYnXt|j�|_d�|j�tjd<d|_|jdk�r�dddddg|_ddddddg|_n&ddddddg|_dddddddg|_dddg|_|jdk�rddd d!g|_dg|_d"|_dS)#Nrz--plat-name must be one of %sZDISTUTILS_USE_SDKZMSSdkzcl.exezlink.exezlib.exezrc.exezmc.exer�_rrkrjrzxPython was built with %s, and extensions need to be built with the same version of the compiler, but it isn't installed.�;r
z/nologoz/Oxz/MDz/W3z/DNDEBUGz/Odz/MDdz/Z7z/D_DEBUGz/GS-z/DLLz/INCREMENTAL:NO�z/INCREMENTAL:noz/DEBUGT)rrrYrc�find_exe�cc�linkerrk�rc�mc�PLAT_TO_VCVARSr~r�rTr]r�rSZ_MSVCCompiler__productr!rr\r^Zpreprocess_optionsr��compile_options�compile_options_debug�ldflags_sharedr��ldflags_shared_debugZldflags_staticr�)r<r�Zok_platsZ	plat_specZvc_envrDrrr�
initializeTs~�
�
���
�
��zMSVCCompiler.initialize�cCs�|dkrd}g}|D]�}tj�|�\}}tj�|�d}|tj�|�d�}||jkrbtd|��|rrtj�|�}||jkr�|�	tj�
|||j��q||jkr�|�	tj�
|||j��q|�	tj�
|||j
��q|S)Nr�rzDon't know how to compile %s)rYr�splitext�
splitdrive�isabs�src_extensionsr�basename�_rc_extensionsr!r^�
res_extension�_mc_extensions�
obj_extension)r<Zsource_filenamesZ	strip_dir�
output_dirZ	obj_namesZsrc_namer�extrrr�object_filenames�s.

�
��zMSVCCompiler.object_filenamesc	Csp|js|��|�||||||�}	|	\}}
}}}|p6g}
|
�d�|rT|
�|j�n|
�|j�|
D�]}z||\}}Wntk
r�YqdYnX|r�tj	�
|�}||jkr�d|}�nT||jkr�d|}�n>||j
k�r<|}d|}z"|�|jg||g|g�Wqdtk
�r6}zt|��W5d}~XYqdXqdn�||jk�r�tj	�|�}tj	�|�}zl|�|jgd|d|g|g�tj	�tj	�|��\}}tj	�||d�}|�|jgd|g|g�Wqdtk
�r�}zt|��W5d}~XYqdXqdntd||f��d	|}z&|�|jg|
|||g|�Wqdtk
�rh}zt|��W5d}~XYqdXqd|
S)
Nz/cz/Tcz/Tpz/foz-hz-rr�z"Don't know how to compile %s to %sz/Fo)r�r�Z_setup_compiler!�extendr�r�rrYrrf�
_c_extensions�_cpp_extensionsr��spawnr�rrr��dirnamer�r�r�r^r�)r<Zsourcesr�r8Zinclude_dirsra�
extra_preargs�extra_postargsZdependsZcompile_info�objectsZpp_optsZbuildZcompile_opts�obj�srcr�Z	input_optZ
output_opt�msgZh_dirZrc_dirrr�Zrc_filerrr�compile�s�
�




��


��
��
���
zMSVCCompiler.compilec	
Cs�|js|��|�||�\}}|j||d�}|�||�r�|d|g}|rJz|�|jg|�Wq�tk
r�}zt|��W5d}~XYq�Xnt	�
d|�dS)N)r��/OUT:�skipping %s (up-to-date))r�r��_fix_object_args�library_filename�
_need_linkr�rkrrr
ra)	r<r�Zoutput_libnamer�ra�target_lang�output_filenameZlib_argsr�rrr�create_static_libs�zMSVCCompiler.create_static_libc
CsT|js|��|�||�\}}|�|||�}|\}}}|rL|�dt|��t||||�}|dk	rptj�	||�}|�
||��rD|tjkr�|	r�|j
dd�}q�|jdd�}n|	r�|j
}n|j}g}|p�gD]}|�d|�q�||||d|g}tj�|d�}|dk	�rLtj�tj�|��\}}tj�	||�|��}|�d|�|�|||�|
�rl|
|dd�<|�r||�|�|�tj�|��z|�|jg|�Wn,tk
�r�}zt|��W5d}~XYnX|�||�}|dk	�rP|\}}d||f}z|�dd	d
||g�Wn,tk
�r@}zt|��W5d}~XYnXnt�d|�dS)Nz5I don't know what to do with 'runtime_library_dirs': rz/EXPORT:r�rz/IMPLIB:z-outputresource:%s;%szmt.exez-nologoz	-manifestr�)r�r�r�Z
_fix_lib_args�warnrxr	rYrr^r�r�
EXECUTABLEr�r�r!r�r�r�r��manifest_setup_ldargsr�Zmkpathr�r�rr�manifest_get_embed_infor
ra)r<�target_descr�r�r�Z	librariesZlibrary_dirsZruntime_library_dirsZexport_symbolsrar�r��
build_tempr�Z
fixed_argsZlib_optsZldflagsZexport_optsZsym�ld_argsZdll_nameZdll_extZimplib_filer�ZmfinfoZ
mffilename�mfidZout_argrrr�link6s��
��

��

��


�
zMSVCCompiler.linkcCs,tj�|tj�|�d�}|�d|�dS)Nz	.manifest�/MANIFESTFILE:)rYrr^r�r!)r<r�r�r��
temp_manifestrrrr��s
�z"MSVCCompiler.manifest_setup_ldargscCs^|D]"}|�d�r|�dd�d}q,qdS|tjkr<d}nd}|�|�}|dkrVdS||fS)Nr��:rrO)�
startswithrTrr��_remove_visual_c_ref)r<r�r��argr�r�rrrr��s


z$MSVCCompiler.manifest_get_embed_infocCs�z�t|�}z|��}W5|��Xt�dtj�}t�|d|�}d}t�|d|�}t�dtj�}t�||�dkrtWdSt|d�}z|�|�|W�WS|��XWnt	k
r�YnXdS)NzU<assemblyIdentity.*?name=("|')Microsoft\.VC\d{2}\.CRT("|').*?(/>|</assemblyIdentity>)r�z*<dependentAssembly>\s*</dependentAssembly>zI<assemblyIdentity.*?name=(?:"|')(.+?)(?:"|').*?(?:/>|</assemblyIdentity>)�w)
�openrs�read�rer��DOTALLrI�search�write�OSError)r<Z
manifest_fileZ
manifest_fZmanifest_buf�patternrrrr��s2	
��


z!MSVCCompiler._remove_visual_c_refcCsd|S)Nz	/LIBPATH:r�r<�dirrrr�library_dir_option�szMSVCCompiler.library_dir_optioncCstd��dS)Nz<don't know how to set runtime library search path for MSVC++)rr�rrr�runtime_library_dir_option�s�z'MSVCCompiler.runtime_library_dir_optioncCs
|�|�Sr)r�)r<rkrrr�library_option�szMSVCCompiler.library_optioncCs\|r|d|g}n|g}|D]:}|D]0}tj�||�|��}tj�|�r$|Sq$qdS)NZ_d)rYrr^r��exists)r<�dirsrkraZ	try_namesr�r*Zlibfilerrr�find_library_file�szMSVCCompiler.find_library_filecCsz|jD].}tj�tj�|�|�}tj�|�r|Sqtjd�d�D].}tj�tj�|�|�}tj�|�rF|SqF|S)N�Pathr�)r�rYrr^rfrgrcrT)r<ZexerD�fnrrrr�s	


zMSVCCompiler.find_exe)rrr)N)rr�)NNNrNNN)NrN)
NNNNNrNNNN)r)r2r3r4Z
compiler_typeZexecutablesr�r�r�r�r�r�r�Zstatic_lib_extensionZshared_lib_extensionZstatic_lib_formatZshared_lib_formatZ
exe_extensionr>r�r�r�r�r�r�r�r�r�r�r�r�r�rrrrr+sj
��

W�
 �
X�
�
_+
r)r
)0rYrprQr�Zdistutils.errorsrrrrrZdistutils.ccompilerrrr	Z	distutilsr
Zdistutils.utilr�winregZ	OpenKeyExrZEnumKeyr Z	EnumValuer'�errorrZ
HKEY_USERS�HKEY_CURRENT_USER�HKEY_LOCAL_MACHINEZHKEY_CLASSES_ROOTr�platform�maxsizeZNATIVE_WIN64r9rCrBr�rr7rXr\r_rir~r�rrrrr�<module>sN��>.#
)
PKX[��V����*__pycache__/ccompiler.cpython-38.opt-1.pycnu�[���U

e5dI��@s�dZddlZddlZddlZddlTddlmZddlmZddl	m
Z
ddlmZm
Z
ddlmZmZdd	lmZGd
d�d�ZdZdd
d�Zdddddd�Zdd�Zddd�Zdd�Zdd�ZdS)z�distutils.ccompiler

Contains CCompiler, an abstract base class that defines the interface
for the Distutils compiler abstraction model.�N)�*)�spawn)�	move_file)�mkpath)�newer_pairwise�newer_group)�split_quoted�execute)�logc
@seZdZdZdZdZdZdZdZdZ	dZ
dZdddddd�ZdddgZ
dqdd	�Zd
d�Zdd
�Zdd�Zdd�Zdrdd�Zdd�Zdd�Zdd�Zdd�Zdd�Zdd�Zd d!�Zd"d#�Zd$d%�Zd&d'�Zd(d)�Zd*d+�Zd,d-�Z d.d/�Z!dsd0d1�Z"d2d3�Z#d4d5�Z$d6d7�Z%d8d9�Z&dtd:d;�Z'dud<d=�Z(d>d?�Z)dvd@dA�Z*dBZ+dCZ,dDZ-dwdEdF�Z.dxdGdH�Z/dydIdJ�Z0dzdKdL�Z1dMdN�Z2dOdP�Z3dQdR�Z4d{dSdT�Z5d|dUdV�Z6d}dXdY�Z7d~dZd[�Z8dd\d]�Z9d�d_d`�Z:d�dbdc�Z;ddde�Z<dfdg�Z=d�dhdi�Z>djdk�Z?dldm�Z@d�dodp�ZAdS)��	CCompilera�Abstract base class to define the interface that must be implemented
    by real compiler classes.  Also has some utility methods used by
    several compiler classes.

    The basic idea behind a compiler abstraction class is that each
    instance can be used for all the compile/link steps in building a
    single project.  Thus, attributes common to all of those compile and
    link steps -- include directories, macros to define, libraries to link
    against, etc. -- are attributes of the compiler instance.  To allow for
    variability in how individual files are treated, most of those
    attributes may be varied on a per-compilation or per-link basis.
    N�czc++Zobjc)�.cz.ccz.cppz.cxxz.mrcCsb||_||_||_d|_g|_g|_g|_g|_g|_g|_	|j
��D]}|�||j
|�qFdS�N)
�dry_run�force�verbose�
output_dir�macros�include_dirs�	libraries�library_dirs�runtime_library_dirs�objects�executables�keys�set_executable)�selfrrr�key�r�+/usr/lib64/python3.8/distutils/ccompiler.py�__init__UszCCompiler.__init__cKs<|D]2}||jkr&td||jjf��|�|||�qdS)a�Define the executables (and options for them) that will be run
        to perform the various stages of compilation.  The exact set of
        executables that may be specified here depends on the compiler
        class (via the 'executables' class attribute), but most will have:
          compiler      the C/C++ compiler
          linker_so     linker used to create shared objects and libraries
          linker_exe    linker used to create binary executables
          archiver      static library creator

        On platforms with a command-line (Unix, DOS/Windows), each of these
        is a string that will be split into executable name and (optional)
        list of arguments.  (Splitting the string is done similarly to how
        Unix shells operate: words are delimited by spaces, but quotes and
        backslashes can override this.  See
        'distutils.util.split_quoted()'.)
        z$unknown executable '%s' for class %sN)r�
ValueError�	__class__�__name__r)r�kwargsrrrr�set_executablesys

�zCCompiler.set_executablescCs,t|t�rt||t|��nt|||�dSr)�
isinstance�str�setattrr)rr�valuerrrr�s
zCCompiler.set_executablecCs0d}|jD] }|d|kr"|S|d7}q
dS)Nr�)r)r�name�i�defnrrr�_find_macro�s

zCCompiler._find_macrocCs`|D]V}t|t�rFt|�dkrFt|dt�s8|ddkrFt|dt�std|dd��qdS)z�Ensures that every element of 'definitions' is a valid macro
        definition, ie. either (name,value) 2-tuple or a (name,) tuple.  Do
        nothing if all definitions are OK, raise TypeError otherwise.
        )r*�r*Nrzinvalid macro definition '%s': z.must be tuple (string,), (string, string), or z(string, None))r&�tuple�lenr'�	TypeError)rZdefinitionsr-rrr�_check_macro_definitions�s

��
����z"CCompiler._check_macro_definitionscCs.|�|�}|dk	r|j|=|j�||f�dS)a_Define a preprocessor macro for all compilations driven by this
        compiler object.  The optional parameter 'value' should be a
        string; if it is not supplied, then the macro will be defined
        without an explicit value and the exact outcome depends on the
        compiler used (XXX true? does ANSI say anything about this?)
        N�r.r�append)rr+r)r,rrr�define_macro�s	
zCCompiler.define_macrocCs0|�|�}|dk	r|j|=|f}|j�|�dS)a�Undefine a preprocessor macro for all compilations driven by
        this compiler object.  If the same macro is defined by
        'define_macro()' and undefined by 'undefine_macro()' the last call
        takes precedence (including multiple redefinitions or
        undefinitions).  If the macro is redefined/undefined on a
        per-compilation basis (ie. in the call to 'compile()'), then that
        takes precedence.
        Nr4)rr+r,Zundefnrrr�undefine_macro�s

zCCompiler.undefine_macrocCs|j�|�dS)z�Add 'dir' to the list of directories that will be searched for
        header files.  The compiler is instructed to search directories in
        the order in which they are supplied by successive calls to
        'add_include_dir()'.
        N)rr5�r�dirrrr�add_include_dir�szCCompiler.add_include_dircCs|dd�|_dS)aySet the list of directories that will be searched to 'dirs' (a
        list of strings).  Overrides any preceding calls to
        'add_include_dir()'; subsequence calls to 'add_include_dir()' add
        to the list passed to 'set_include_dirs()'.  This does not affect
        any list of standard include directories that the compiler may
        search by default.
        N�r�r�dirsrrr�set_include_dirs�szCCompiler.set_include_dirscCs|j�|�dS)a�Add 'libname' to the list of libraries that will be included in
        all links driven by this compiler object.  Note that 'libname'
        should *not* be the name of a file containing a library, but the
        name of the library itself: the actual filename will be inferred by
        the linker, the compiler, or the compiler class (depending on the
        platform).

        The linker will be instructed to link against libraries in the
        order they were supplied to 'add_library()' and/or
        'set_libraries()'.  It is perfectly valid to duplicate library
        names; the linker will be instructed to link against libraries as
        many times as they are mentioned.
        N)rr5)r�libnamerrr�add_library�szCCompiler.add_librarycCs|dd�|_dS)z�Set the list of libraries to be included in all links driven by
        this compiler object to 'libnames' (a list of strings).  This does
        not affect any standard system libraries that the linker may
        include by default.
        N)r)rZlibnamesrrr�
set_libraries�szCCompiler.set_librariescCs|j�|�dS)a'Add 'dir' to the list of directories that will be searched for
        libraries specified to 'add_library()' and 'set_libraries()'.  The
        linker will be instructed to search for libraries in the order they
        are supplied to 'add_library_dir()' and/or 'set_library_dirs()'.
        N)rr5r8rrr�add_library_dirszCCompiler.add_library_dircCs|dd�|_dS)z�Set the list of library search directories to 'dirs' (a list of
        strings).  This does not affect any standard library search path
        that the linker may search by default.
        N)rr<rrr�set_library_dirsszCCompiler.set_library_dirscCs|j�|�dS)zlAdd 'dir' to the list of directories that will be searched for
        shared libraries at runtime.
        N)rr5r8rrr�add_runtime_library_dirsz!CCompiler.add_runtime_library_dircCs|dd�|_dS)z�Set the list of directories to search for shared libraries at
        runtime to 'dirs' (a list of strings).  This does not affect any
        standard search path that the runtime linker may search by
        default.
        N)rr<rrr�set_runtime_library_dirssz"CCompiler.set_runtime_library_dirscCs|j�|�dS)z�Add 'object' to the list of object files (or analogues, such as
        explicitly named library files or the output of "resource
        compilers") to be included in every link driven by this compiler
        object.
        N)rr5)r�objectrrr�add_link_object szCCompiler.add_link_objectcCs|dd�|_dS)z�Set the list of object files (or analogues) to be included in
        every link to 'objects'.  This does not affect any standard object
        files that the linker may include by default (such as system
        libraries).
        N)r)rrrrr�set_link_objects(szCCompiler.set_link_objectscCs|dkr|j}nt|t�s"td��|dkr2|j}n"t|t�rL||jpFg}ntd��|dkrd|j}n*t|ttf�r�t|�|jp�g}ntd��|dkr�g}|j|d|d�}t	||�}i}	t
t|��D]B}
||
}||
}tj
�|�d}
|�tj
�|��||
f|	|<q�|||||	fS)z;Process arguments and decide which source files to compile.N�%'output_dir' must be a string or None�/'macros' (if supplied) must be a list of tuples�6'include_dirs' (if supplied) must be a list of stringsr)�	strip_dirrr*)rr&r'r2r�listrr0�object_filenames�gen_preprocess_options�ranger1�os�path�splitextr�dirname)rZoutdirrZincdirs�sources�dependsZextrar�pp_opts�buildr,�src�obj�extrrr�_setup_compile6s<

��
zCCompiler._setup_compilecCs0|dg}|rdg|dd�<|r,||dd�<|S)Nz-cz-grr)rrW�debugZbefore�cc_argsrrr�_get_cc_argsas
zCCompiler._get_cc_argscCs�|dkr|j}nt|t�s"td��|dkr2|j}n"t|t�rL||jpFg}ntd��|dkrd|j}n*t|ttf�r�t|�|jp�g}ntd��|||fS)a'Typecheck and fix-up some of the arguments to the 'compile()'
        method, and return fixed-up values.  Specifically: if 'output_dir'
        is None, replaces it with 'self.output_dir'; ensures that 'macros'
        is a list, and augments it with 'self.macros'; ensures that
        'include_dirs' is a list, and augments it with 'self.include_dirs'.
        Guarantees that the returned values are of the correct type,
        i.e. for 'output_dir' either string or None, and for 'macros' and
        'include_dirs' either list or None.
        NrIrJrK)rr&r'r2rrMrr0)rrrrrrr�_fix_compile_argsjs"


�zCCompiler._fix_compile_argscCs|j||d�}|ifS)a+Decide which souce files must be recompiled.

        Determine the list of object files corresponding to 'sources',
        and figure out which ones really need to be recompiled.
        Return a list of all object files and a dictionary telling
        which source files can be skipped.
        )r)rN)rrUrrVrrrr�
_prep_compile�s	zCCompiler._prep_compilecCsHt|ttf�std��t|�}|dkr.|j}nt|t�s@td��||fS)z�Typecheck and fix up some arguments supplied to various methods.
        Specifically: ensure that 'objects' is a list; if output_dir is
        None, replace with self.output_dir.  Return fixed versions of
        'objects' and 'output_dir'.
        z,'objects' must be a list or tuple of stringsNrI)r&rMr0r2rr')rrrrrr�_fix_object_args�s
zCCompiler._fix_object_argscCs�|dkr|j}n*t|ttf�r2t|�|jp,g}ntd��|dkrJ|j}n*t|ttf�rlt|�|jpfg}ntd��|dkr�|j}n*t|ttf�r�t|�|jp�g}ntd��|||fS)a;Typecheck and fix up some of the arguments supplied to the
        'link_*' methods.  Specifically: ensure that all arguments are
        lists, and augment them with their permanent versions
        (eg. 'self.libraries' augments 'libraries').  Return a tuple with
        fixed versions of all arguments.
        Nz3'libraries' (if supplied) must be a list of stringsz6'library_dirs' (if supplied) must be a list of stringsz>'runtime_library_dirs' (if supplied) must be a list of strings)rr&rMr0r2rr)rrrrrrr�
_fix_lib_args�s,���zCCompiler._fix_lib_argscCs2|jr
dS|jr t||dd�}n
t||�}|SdS)zjReturn true if we need to relink the files listed in 'objects'
        to recreate 'output_file'.
        T�newer)ZmissingN)rrr)rr�output_filerdrrr�
_need_link�s
zCCompiler._need_linkc		Cs~t|t�s|g}d}t|j�}|D]V}tj�|�\}}|j�|�}z |j�	|�}||kr`|}|}Wq"t
k
rvYq"Xq"|S)z|Detect the language of a given file, or list of files. Uses
        language_map, and language_order to do the job.
        N)r&rMr1�language_orderrQrRrS�language_map�get�indexr!)	rrUZlangrj�source�baser[ZextlangZextindexrrr�detect_language�s

zCCompiler.detect_languagecCsdS)a�Preprocess a single C/C++ source file, named in 'source'.
        Output will be written to file named 'output_file', or stdout if
        'output_file' not supplied.  'macros' is a list of macro
        definitions as for 'compile()', which will augment the macros set
        with 'define_macro()' and 'undefine_macro()'.  'include_dirs' is a
        list of directory names that will be added to the default list.

        Raises PreprocessError on failure.
        Nr)rrkrerr�
extra_preargs�extra_postargsrrr�
preprocess�szCCompiler.preprocessc		Csx|�||||||�\}}	}}
}|�|
||�}|	D]B}
z||
\}}Wntk
r\Yq0YnX|�|
|||||
�q0|	S)aK	Compile one or more source files.

        'sources' must be a list of filenames, most likely C/C++
        files, but in reality anything that can be handled by a
        particular compiler and compiler class (eg. MSVCCompiler can
        handle resource files in 'sources').  Return a list of object
        filenames, one per source filename in 'sources'.  Depending on
        the implementation, not all source files will necessarily be
        compiled, but all corresponding object filenames will be
        returned.

        If 'output_dir' is given, object files will be put under it, while
        retaining their original path component.  That is, "foo/bar.c"
        normally compiles to "foo/bar.o" (for a Unix implementation); if
        'output_dir' is "build", then it would compile to
        "build/foo/bar.o".

        'macros', if given, must be a list of macro definitions.  A macro
        definition is either a (name, value) 2-tuple or a (name,) 1-tuple.
        The former defines a macro; if the value is None, the macro is
        defined without an explicit value.  The 1-tuple case undefines a
        macro.  Later definitions/redefinitions/ undefinitions take
        precedence.

        'include_dirs', if given, must be a list of strings, the
        directories to add to the default include file search path for this
        compilation only.

        'debug' is a boolean; if true, the compiler will be instructed to
        output debug symbols in (or alongside) the object file(s).

        'extra_preargs' and 'extra_postargs' are implementation- dependent.
        On platforms that have the notion of a command-line (e.g. Unix,
        DOS/Windows), they are most likely lists of strings: extra
        command-line arguments to prepend/append to the compiler command
        line.  On other platforms, consult the implementation class
        documentation.  In any event, they are intended as an escape hatch
        for those occasions when the abstract compiler framework doesn't
        cut the mustard.

        'depends', if given, is a list of filenames that all targets
        depend on.  If a source file is older than any file in
        depends, then the source file will be recompiled.  This
        supports dependency tracking, but only at a coarse
        granularity.

        Raises CompileError on failure.
        )r\r_�KeyError�_compile)rrUrrrr]rnrorVrrWrXr^rZrYr[rrr�compile�s6��
zCCompiler.compilecCsdS)zCompile 'src' to product 'obj'.Nr)rrZrYr[r^rorWrrrrrCszCCompiler._compilecCsdS)a&Link a bunch of stuff together to create a static library file.
        The "bunch of stuff" consists of the list of object files supplied
        as 'objects', the extra object files supplied to
        'add_link_object()' and/or 'set_link_objects()', the libraries
        supplied to 'add_library()' and/or 'set_libraries()', and the
        libraries supplied as 'libraries' (if any).

        'output_libname' should be a library name, not a filename; the
        filename will be inferred from the library name.  'output_dir' is
        the directory where the library file will be put.

        'debug' is a boolean; if true, debugging information will be
        included in the library (note that on most platforms, it is the
        compile step where this matters: the 'debug' flag is included here
        just for consistency).

        'target_lang' is the target language for which the given objects
        are being compiled. This allows specific linkage time treatment of
        certain languages.

        Raises LibError on failure.
        Nr)rr�output_libnamerr]�target_langrrr�create_static_libIszCCompiler.create_static_libZ
shared_objectZshared_library�
executablecCst�dS)auLink a bunch of stuff together to create an executable or
        shared library file.

        The "bunch of stuff" consists of the list of object files supplied
        as 'objects'.  'output_filename' should be a filename.  If
        'output_dir' is supplied, 'output_filename' is relative to it
        (i.e. 'output_filename' can provide directory components if
        needed).

        'libraries' is a list of libraries to link against.  These are
        library names, not filenames, since they're translated into
        filenames in a platform-specific way (eg. "foo" becomes "libfoo.a"
        on Unix and "foo.lib" on DOS/Windows).  However, they can include a
        directory component, which means the linker will look in that
        specific directory rather than searching all the normal locations.

        'library_dirs', if supplied, should be a list of directories to
        search for libraries that were specified as bare library names
        (ie. no directory component).  These are on top of the system
        default and those supplied to 'add_library_dir()' and/or
        'set_library_dirs()'.  'runtime_library_dirs' is a list of
        directories that will be embedded into the shared library and used
        to search for other shared libraries that *it* depends on at
        run-time.  (This may only be relevant on Unix.)

        'export_symbols' is a list of symbols that the shared library will
        export.  (This appears to be relevant only on Windows.)

        'debug' is as for 'compile()' and 'create_static_lib()', with the
        slight distinction that it actually matters on most platforms (as
        opposed to 'create_static_lib()', which includes a 'debug' flag
        mostly for form's sake).

        'extra_preargs' and 'extra_postargs' are as for 'compile()' (except
        of course that they supply command-line arguments for the
        particular linker being used).

        'target_lang' is the target language for which the given objects
        are being compiled. This allows specific linkage time treatment of
        certain languages.

        Raises LinkError on failure.
        N��NotImplementedError)rZtarget_descr�output_filenamerrrr�export_symbolsr]rnro�
build_temprurrr�linkis9zCCompiler.linkc

Cs2|�tj||j|dd�|||||||	|
||�
dS)N�shared)�lib_type)r}r�SHARED_LIBRARY�library_filename)
rrrtrrrrr{r]rnror|rurrr�link_shared_lib�s
�zCCompiler.link_shared_libc

Cs(|�tj|||||||||	|
||�
dSr)r}r�
SHARED_OBJECT)
rrrzrrrrr{r]rnror|rurrr�link_shared_object�s
�zCCompiler.link_shared_objectcCs.|�tj||�|�||||d|||	d|
�
dSr)r}r�
EXECUTABLE�executable_filename)rrZoutput_prognamerrrrr]rnrorurrr�link_executable�s
�zCCompiler.link_executablecCst�dS)zkReturn the compiler option to add 'dir' to the list of
        directories searched for libraries.
        Nrxr8rrr�library_dir_option�szCCompiler.library_dir_optioncCst�dS)zsReturn the compiler option to add 'dir' to the list of
        directories searched for runtime libraries.
        Nrxr8rrr�runtime_library_dir_option�sz$CCompiler.runtime_library_dir_optioncCst�dS)zReturn the compiler option to add 'lib' to the list of libraries
        linked into the shared library or executable.
        Nrx)r�librrr�library_option�szCCompiler.library_optionc	Cs�ddl}|dkrg}|dkr g}|dkr,g}|dkr8g}|jd|dd�\}}t�|d�}	z*|D]}
|	�d|
�q^|	�d|�W5|	��Xz|j|g|d	�}Wntk
r�Yd
SXz|j|d||d�Wnt	t
fk
r�Yd
SXdS)
z�Return a boolean indicating whether funcname is supported on
        the current platform.  The optional arguments can be used to
        augment the compilation environment.
        rNr
T)�text�wz#include "%s"
z=int main (int argc, char **argv) {
    %s();
    return 0;
}
r;Fza.out)rr)�tempfileZmkstemprQ�fdopen�close�writersZCompileErrorr�Z	LinkErrorr2)r�funcnameZincludesrrrr��fdZfname�fZinclrrrr�has_function�s<	�

�
zCCompiler.has_functioncCst�dS)aHSearch the specified list of directories for a static or shared
        library file 'lib' and return the full path to that file.  If
        'debug' true, look for a debugging version (if that makes sense on
        the current platform).  Return None if 'lib' wasn't found in any of
        the specified directories.
        Nrx)rr=r�r]rrr�find_library_file$szCCompiler.find_library_file�cCs�|dkrd}g}|D]|}tj�|�\}}tj�|�d}|tj�|�d�}||jkrftd||f��|rvtj�|�}|�tj�	|||j
��q|S)Nr�r*z"unknown file type '%s' (from '%s'))rQrRrS�
splitdrive�isabs�src_extensionsZUnknownFileError�basenamer5�join�
obj_extension)rZsource_filenamesrLrZ	obj_namesZsrc_namerlr[rrrrNOs"

��zCCompiler.object_filenamescCs$|rtj�|�}tj�|||j�Sr)rQrRr�r��shared_lib_extension�rr�rLrrrr�shared_object_filename`sz CCompiler.shared_object_filenamecCs(|rtj�|�}tj�|||jp"d�S)Nr�)rQrRr�r��
exe_extensionr�rrrr�fszCCompiler.executable_filename�staticc
Cs`|dkrtd��t||d�}t||d�}tj�|�\}}|||f}	|rPd}tj�|||	�S)N)r�r~ZdylibZ
xcode_stubz?'lib_type' must be "static", "shared", "dylib", or "xcode_stub"Z_lib_formatZ_lib_extensionr�)r!�getattrrQrR�splitr�)
rr?rrLrZfmtr[r9rl�filenamerrrr�ls�zCCompiler.library_filenamer*cCst�|�dSr)r
r])r�msg�levelrrr�announceszCCompiler.announcecCsddlm}|rt|�dS)Nr)�DEBUG)Zdistutils.debugr��print)rr�r�rrr�debug_print�szCCompiler.debug_printcCstj�d|�dS)Nzwarning: %s
)�sys�stderrr�)rr�rrr�warn�szCCompiler.warncCst||||j�dSr)r	r)r�func�argsr�r�rrrr	�szCCompiler.executecCst||jd�dS�N)r)rr)r�cmdrrrr�szCCompiler.spawncCst|||jd�Sr�)rr)rrYZdstrrrr�szCCompiler.move_file�cCst|||jd�dSr�)rr)rr+�moderrrr�szCCompiler.mkpath)rrr)N)N)NNNNN)NNNrNNN)NrN)
NNNNNrNNNN)
NNNNNrNNNN)
NNNNNrNNNN)NNNNrNNN)NNNN)r)rr�)rr�)rr�)r�rr�)r*)Nr*)r�)Br#�
__module__�__qualname__�__doc__Z
compiler_typer�r�Zstatic_lib_extensionr�Zstatic_lib_formatZshared_lib_formatr�rhrgr r%rr.r3r6r7r:r>r@rArBrCrDrErGrHr\r_r`rarbrcrfrmrprsrrrvr�r�r�r}r�r�r�r�r�r�r�r�rNr�r�r�r�r�r�r	rrrrrrrrs��

$ 

+	 
"
�

�
D�
�
A�
�
�
�
,
+


�


r))zcygwin.*�unix)�posixr�)�nt�msvccCsV|dkrtj}|dkrtj}tD]0\}}t�||�dk	sHt�||�dk	r |Sq dS)akDetermine the default compiler to use for the given platform.

       osname should be one of the standard Python OS names (i.e. the
       ones returned by os.name) and platform the common value
       returned by sys.platform for the platform in question.

       The default values are os.name and sys.platform in case the
       parameters are not given.
    Nr�)rQr+r��platform�_default_compilers�re�match)Zosnamer��pattern�compilerrrr�get_default_compiler�s
�
r�)Z
unixccompilerZ
UnixCCompilerzstandard UNIX-style compiler)Z
_msvccompilerZMSVCCompilerzMicrosoft Visual C++)�cygwinccompilerZCygwinCCompilerz'Cygwin port of GNU C Compiler for Win32)r�ZMingw32CCompilerz(Mingw32 port of GNU C Compiler for Win32)ZbcppcompilerZBCPPCompilerzBorland C++ Compiler)r�r��cygwinZmingw32ZbcppcCsXddlm}g}t��D] }|�d|dt|df�q|��||�}|�d�dS)zyPrint list of available compilers (used by the "--help-compiler"
    options to "build", "build_ext", "build_clib").
    r)�FancyGetoptz	compiler=Nr/zList of available compilers:)Zdistutils.fancy_getoptr��compiler_classrr5�sortZ
print_help)r�Z	compilersr�Zpretty_printerrrr�show_compilers�s
�r�cCs�|dkrtj}z"|dkr t|�}t|\}}}Wn8tk
rhd|}|dk	r\|d|}t|��YnXz*d|}t|�tj|}	t	|	�|}
WnBt
k
r�td|��Yn$tk
r�td||f��YnX|
d||�S)a[Generate an instance of some CCompiler subclass for the supplied
    platform/compiler combination.  'plat' defaults to 'os.name'
    (eg. 'posix', 'nt'), and 'compiler' defaults to the default compiler
    for that platform.  Currently only 'posix' and 'nt' are supported, and
    the default compilers are "traditional Unix interface" (UnixCCompiler
    class) and Visual C++ (MSVCCompiler class).  Note that it's perfectly
    possible to ask for a Unix compiler object under Windows, and a
    Microsoft compiler object under Unix -- if you supply a value for
    'compiler', 'plat' is ignored.
    Nz5don't know how to compile C/C++ code on platform '%s'z with '%s' compilerz
distutils.z4can't compile C/C++ code: unable to load module '%s'zBcan't compile C/C++ code: unable to find class '%s' in module '%s')rQr+r�r�rqZDistutilsPlatformError�
__import__r��modules�vars�ImportErrorZDistutilsModuleError)Zplatr�rrrZmodule_name�
class_nameZlong_descriptionr��module�klassrrr�new_compiler�s:
����
r�cCs�g}|D]�}t|t�r0dt|�kr.dks<ntd|��t|�dkr\|�d|d�qt|�dkr|ddkr�|�d|d�q|�d|�q|D]}|�d	|�q�|S)
aGenerate C pre-processor options (-D, -U, -I) as used by at least
    two types of compilers: the typical Unix compiler and Visual C++.
    'macros' is the usual thing, a list of 1- or 2-tuples, where (name,)
    means undefine (-U) macro 'name', and (name,value) means define (-D)
    macro 'name' to 'value'.  'include_dirs' is just a list of directory
    names to be added to the header file search path (-I).  Returns a list
    of command-line options suitable for either Unix compilers or Visual
    C++.
    r*r/zPbad macro definition '%s': each element of 'macros' list must be a 1- or 2-tuplez-U%srNz-D%sz-D%s=%sz-I%s)r&r0r1r2r5)rrrWZmacror9rrrrOs"$��rOcCs�g}|D]}|�|�|��q|D],}|�|�}t|t�rD||}q"|�|�q"|D]V}tj�|�\}}	|r�|�|g|	�}
|
r�|�|
�q�|�	d|�qT|�|�
|��qT|S)acGenerate linker options for searching library directories and
    linking with specific libraries.  'libraries' and 'library_dirs' are,
    respectively, lists of library names (not filenames!) and search
    directories.  Returns a list of command-line options suitable for use
    with some compiler (depending on the two format strings passed in).
    z6no library file corresponding to '%s' found (skipping))r5r�r�r&rMrQrRr�r�r�r�)r�rrrZlib_optsr9�optr�Zlib_dirZlib_nameZlib_filerrr�gen_lib_options8s&


�r�)NN)NNrrr)r�r�rQr�Zdistutils.errorsZdistutils.spawnrZdistutils.file_utilrZdistutils.dir_utilrZdistutils.dep_utilrrZdistutils.utilrr	Z	distutilsr
rr�r�r�r�r�rOr�rrrr�<module>s8
�
--PKX[�{<���'__pycache__/archive_util.cpython-38.pycnu�[���U

e5d|!�@sDdZddlZddlmZddlZzddlZWnek
rDdZYnXddlmZddl	m
Z
ddlmZddl
mZzddlmZWnek
r�dZYnXzdd	lmZWnek
r�dZYnXd
d�Zdd
�Zd#dd�Zd$dd�Zedgdfedgdfedgdfedgdfedgdfegdfd�Zdd �Zd%d!d"�ZdS)&zodistutils.archive_util

Utility functions for creating archive files (tarballs, zip files,
that sort of thing).�N)�warn)�DistutilsExecError)�spawn)�mkpath)�log)�getpwnam)�getgrnamcCsNtdks|dkrdSzt|�}Wntk
r8d}YnX|dk	rJ|dSdS)z"Returns a gid, given a group name.N�)r�KeyError��name�result�r�./usr/lib64/python3.8/distutils/archive_util.py�_get_gids
rcCsNtdks|dkrdSzt|�}Wntk
r8d}YnX|dk	rJ|dSdS)z"Returns an uid, given a user name.Nr	)rr
rrrr�_get_uid+s
r�gzipcs.dddddd�}dddd	d
�}|dk	r:||��kr:td��|d
}	|dkrZ|	|�|d�7}	ttj�|	�|d�ddl}
t�	d�t
���t�������fdd�}|s�|
�|	d||�}z|j||d�W5|�
�X|dk�r*tdt�|	||}
tjdk�r||	|
g}n
|d|	g}t||d�|
S|	S)a=Create a (possibly compressed) tar file from all the files under
    'base_dir'.

    'compress' must be "gzip" (the default), "bzip2", "xz", "compress", or
    None.  ("compress" will be deprecated in Python 3.2)

    'owner' and 'group' can be used to define an owner and a group for the
    archive that is being built. If not provided, the current owner and group
    will be used.

    The output tar file will be named 'base_dir' +  ".tar", possibly plus
    the appropriate compression extension (".gz", ".bz2", ".xz" or ".Z").

    Returns the output filename.
    Zgz�bz2�xz�)r�bzip2rN�compressz.gzz.bz2z.xzz.Z)rrrrNzKbad value for 'compress': must be None, 'gzip', 'bzip2', 'xz' or 'compress'z.tarr��dry_runrzCreating tar archivecs,�dk	r�|_�|_�dk	r(�|_�|_|S)N)�gidZgname�uid�uname)Ztarinfo�r�group�ownerrrr�_set_uid_gidasz"make_tarball.<locals>._set_uid_gidzw|%s)�filterz'compress' will be deprecated.Zwin32z-f)�keys�
ValueError�getr�os�path�dirname�tarfiler�inforr�open�close�addr�PendingDeprecationWarning�sys�platformr)�	base_name�base_dirr�verboserrrZtar_compressionZcompress_extZarchive_namer(r �tarZcompressed_name�cmdrrr�make_tarball7sB���
	



r5c
Cs�|d}ttj�|�|d�tdkrp|r.d}nd}ztd|||g|d�Wn tk
rjtd|��YnX�n8t�d||�|�s�ztj	|d	tj
d
�}Wn&tk
r�tj	|d	tjd
�}YnX|��|tj
k�rtj�tj�|d��}|�||�t�d|�t�|�D]�\}}	}
|	D]6}tj�tj�||d��}|�||�t�d|��q|
D]B}tj�tj�||��}tj�|��rV|�||�t�d|��qV�qW5QRX|S)
avCreate a zip file from all the files under 'base_dir'.

    The output zip file will be named 'base_name' + ".zip".  Uses either the
    "zipfile" Python module (if available) or the InfoZIP "zip" utility
    (if installed and found on the default search path).  If neither tool is
    available, raises DistutilsExecError.  Returns the name of the output zip
    file.
    z.ziprNz-rz-rq�zipzkunable to create zip file '%s': could neither import the 'zipfile' module nor find a standalone zip utilityz#creating '%s' and adding '%s' to it�w)Zcompressionrzadding '%s')rr%r&r'�zipfilerrrr)ZZipFileZZIP_DEFLATED�RuntimeErrorZ
ZIP_STORED�curdir�normpath�join�write�walk�isfile)r0r1r2rZzip_filenameZ
zipoptionsr6r&�dirpathZdirnames�	filenamesrrrr�make_zipfilesV	�
���
�rB)rrzgzip'ed tar-file)rrzbzip2'ed tar-file)rrzxz'ed tar-file)rrzcompressed tar file)rNzuncompressed tar filezZIP file)ZgztarZbztarZxztarZztarr3r6cCs|D]}|tkr|SqdS)zqReturns the first format from the 'format' list that is unknown.

    If all formats are known, returns None
    N)�ARCHIVE_FORMATS)Zformats�formatrrr�check_archive_formats�s
rEc
Cs�t��}|dk	r6t�d|�tj�|�}|s6t�|�|dkrDtj}d|i}	zt|}
Wn t	k
rxt
d|��YnX|
d}|
dD]\}}
|
|	|<q�|dkr�||	d<||	d	<z|||f|	�}W5|dk	r�t�d
|�t�|�X|S)a�Create an archive file (eg. zip or tar).

    'base_name' is the name of the file to create, minus any format-specific
    extension; 'format' is the archive format: one of "zip", "tar", "gztar",
    "bztar", "xztar", or "ztar".

    'root_dir' is a directory that will be the root directory of the
    archive; ie. we typically chdir into 'root_dir' before creating the
    archive.  'base_dir' is the directory where we start archiving from;
    ie. 'base_dir' will be the common prefix of all files and
    directories in the archive.  'root_dir' and 'base_dir' both default
    to the current directory.  Returns the name of the archive file.

    'owner' and 'group' are used when creating a tar archive. By default,
    uses the current owner and group.
    Nzchanging into '%s'rzunknown archive format '%s'r�r6rrzchanging back to '%s')r%�getcwdr�debugr&�abspath�chdirr:rCr
r#)r0rDZroot_dirr1r2rrrZsave_cwd�kwargsZformat_info�func�arg�val�filenamerrr�make_archive�s2

rP)rrrNN)rr)NNrrNN)�__doc__r%�warningsrr.r8�ImportErrorZdistutils.errorsrZdistutils.spawnrZdistutils.dir_utilrZ	distutilsr�pwdrZgrprrrr5rBrCrErPrrrr�<module>sN


�
H
=




�	
�PKX[�5����__pycache__/core.cpython-38.pycnu�[���U

e5d�"�@s�dZddlZddlZddlmZddlTddlmZddlm	Z	ddl
mZddlm
Z
d	Zd
d�ZdadadZd
Zdd�Zddd�ZdS)a#distutils.core

The only module that needs to be imported to use the Distutils; provides
the 'setup' function (which is to be called from the setup script).  Also
indirectly provides the Distribution and Command classes, although they are
really defined in distutils.dist and distutils.cmd.
�N)�DEBUG)�*)�Distribution)�Command)�
PyPIRCCommand)�	Extensionz�usage: %(script)s [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]
   or: %(script)s --help [cmd1 cmd2 ...]
   or: %(script)s --help-commands
   or: %(script)s cmd --help
cCstj�|�}tt�S)N)�os�path�basename�USAGE�vars)�script_nameZscript�r�&/usr/lib64/python3.8/distutils/core.py�	gen_usage sr)�	distclassr
�script_argsZoptions�name�versionZauthorZauthor_emailZ
maintainerZmaintainer_emailZurl�licenseZdescriptionZlong_description�keywordsZ	platformsZclassifiersZdownload_urlZrequiresZprovidesZ	obsoletes)rZsourcesZinclude_dirsZ
define_macrosZundef_macrosZlibrary_dirsZ	librariesZruntime_library_dirsZ
extra_objectsZextra_compile_argsZextra_link_argsZ	swig_optsZexport_symbolsZdependsZlanguagec
Ks|�d�}|r|d=nt}d|kr8tj�tjd�|d<d|krRtjdd�|d<z||�a}WnLtk
r�}z.d|kr�t	d|��nt	d	|d|f��W5d}~XYnXt
d
kr�|S|��tr�t
d�|��t
dkr�|Sz|��}Wn:tk
�r*}zt	t|j�d
|��W5d}~XYnXt�rBt
d�|��t
dk�rP|S|�rz|��Wn�tk
�r�t	d��Yn�tk
�r�}z.t�r�tj�d|f��nt	d|f��W5d}~XYnBttfk
�r}zt�r�nt	dt|���W5d}~XYnX|S)a�The gateway to the Distutils: do everything your setup script needs
    to do, in a highly flexible and user-driven way.  Briefly: create a
    Distribution instance; find and parse config files; parse the command
    line; run each Distutils command found there, customized by the options
    supplied to 'setup()' (as keyword arguments), in config files, and on
    the command line.

    The Distribution instance might be an instance of a class supplied via
    the 'distclass' keyword argument to 'setup'; if no such class is
    supplied, then the Distribution class (in dist.py) is instantiated.
    All other arguments to 'setup' (except for 'cmdclass') are used to set
    attributes of the Distribution instance.

    The 'cmdclass' argument, if supplied, is a dictionary mapping command
    names to command classes.  Each command encountered on the command line
    will be turned into a command class, which is in turn instantiated; any
    class found in 'cmdclass' is used in place of the default, which is
    (for command 'foo_bar') class 'foo_bar' in module
    'distutils.command.foo_bar'.  The command class must provide a
    'user_options' attribute which is a list of option specifiers for
    'distutils.fancy_getopt'.  Any command-line options between the current
    and the next command are used to set attributes of the current command
    object.

    When the entire command-line has been successfully parsed, calls the
    'run()' method on each command object in turn.  This method will be
    driven entirely by the Distribution object (which each command object
    has a reference to, thanks to its constructor), and the
    command-specific options that became attributes of each command
    object.
    rr
rr�Nrzerror in setup command: %szerror in %s setup command: %s�initz%options (after parsing config files):�configz

error: %sz%options (after parsing command line):�commandlineZinterruptedz
error: %s
z	error: %szerror: )�getrrr	r
�sys�argv�_setup_distributionZDistutilsSetupError�
SystemExit�_setup_stop_afterZparse_config_filesr�printZdump_option_dictsZparse_command_lineZDistutilsArgErrorrr
Zrun_commands�KeyboardInterrupt�OSError�stderr�writeZDistutilsErrorZCCompilerError�str)�attrs�klassZdist�msg�ok�excrrr�setup9sd%

�(
�"r,�runc	Cs�|dkrtd|f��|atj��}d|i}zZzH|tjd<|dk	rP|tjdd�<t|d��}t|��|�W5QRXW5|t_daXWntk
r�YnXt	dkr�t
d|��t	S)	a.Run a setup script in a somewhat controlled environment, and
    return the Distribution instance that drives things.  This is useful
    if you need to find out the distribution meta-data (passed as
    keyword args from 'script' to 'setup()', or the contents of the
    config files or command-line.

    'script_name' is a file that will be read and run with 'exec()';
    'sys.argv[0]' will be replaced with 'script' for the duration of the
    call.  'script_args' is a list of strings; if supplied,
    'sys.argv[1:]' will be replaced by 'script_args' for the duration of
    the call.

    'stop_after' tells 'setup()' when to stop processing; possible
    values:
      init
        stop after the Distribution instance has been created and
        populated with the keyword arguments to 'setup()'
      config
        stop after config files have been parsed (and their data
        stored in the Distribution instance)
      commandline
        stop after the command-line ('sys.argv[1:]' or 'script_args')
        have been parsed (and the data stored in the Distribution)
      run [default]
        stop after all commands have been run (the same as if 'setup()'
        had been called in the usual way

    Returns the Distribution instance, which provides all information
    used to drive the Distutils.
    )rrrr-z"invalid value for 'stop_after': %r�__file__Nrr�rbzZ'distutils.core.setup()' was never called -- perhaps '%s' is not a Distutils setup script?)�
ValueErrorr rr�copy�open�exec�readrr�RuntimeError)r
rZ
stop_afterZ	save_argv�g�frrr�	run_setup�s*


�r8)Nr-)�__doc__rrZdistutils.debugrZdistutils.errorsZdistutils.distrZ
distutils.cmdrZdistutils.configrZdistutils.extensionrrrr rZsetup_keywordsZextension_keywordsr,r8rrrr�<module>s 	qPKX[O�

$__pycache__/extension.cpython-38.pycnu�[���U

e5d)�@s.dZddlZddlZGdd�d�Zdd�ZdS)zmdistutils.extension

Provides the Extension class, used to describe C/C++ extension
modules in setup scripts.�Nc@s"eZdZdZddd�Zdd�ZdS)�	Extensiona�Just a collection of attributes that describes an extension
    module and everything needed to build it (hopefully in a portable
    way, but there are hooks that let you be as unportable as you need).

    Instance attributes:
      name : string
        the full name of the extension, including any packages -- ie.
        *not* a filename or pathname, but Python dotted name
      sources : [string]
        list of source filenames, relative to the distribution root
        (where the setup script lives), in Unix form (slash-separated)
        for portability.  Source files may be C, C++, SWIG (.i),
        platform-specific resource files, or whatever else is recognized
        by the "build_ext" command as source for a Python extension.
      include_dirs : [string]
        list of directories to search for C/C++ header files (in Unix
        form for portability)
      define_macros : [(name : string, value : string|None)]
        list of macros to define; each macro is defined using a 2-tuple,
        where 'value' is either the string to define it to or None to
        define it without a particular value (equivalent of "#define
        FOO" in source or -DFOO on Unix C compiler command line)
      undef_macros : [string]
        list of macros to undefine explicitly
      library_dirs : [string]
        list of directories to search for C/C++ libraries at link time
      libraries : [string]
        list of library names (not filenames or paths) to link against
      runtime_library_dirs : [string]
        list of directories to search for C/C++ libraries at run time
        (for shared extensions, this is when the extension is loaded)
      extra_objects : [string]
        list of extra files to link with (eg. object files not implied
        by 'sources', static library that must be explicitly specified,
        binary resource files, etc.)
      extra_compile_args : [string]
        any extra platform- and compiler-specific information to use
        when compiling the source files in 'sources'.  For platforms and
        compilers where "command line" makes sense, this is typically a
        list of command-line arguments, but for other platforms it could
        be anything.
      extra_link_args : [string]
        any extra platform- and compiler-specific information to use
        when linking object files together to create the extension (or
        to create a new static Python interpreter).  Similar
        interpretation as for 'extra_compile_args'.
      export_symbols : [string]
        list of symbols to be exported from a shared extension.  Not
        used on all platforms, and not generally necessary for Python
        extensions, which typically export exactly one symbol: "init" +
        extension_name.
      swig_opts : [string]
        any extra options to pass to SWIG if a source file has the .i
        extension.
      depends : [string]
        list of files that the extension depends on
      language : string
        extension language (i.e. "c", "c++", "objc"). Will be detected
        from the source extensions if not provided.
      optional : boolean
        specifies that a build failure in the extension should not abort the
        build process, but simply not install the failing extension.
    NcKst|t�std��t|t�r.tdd�|D��s6td��||_||_|pHg|_|pRg|_|p\g|_	|pfg|_
|ppg|_|pzg|_|	p�g|_
|
p�g|_|p�g|_|p�g|_|
p�g|_|p�g|_||_||_t|�dk�rdd�|D�}d�t|��}d	|}t�|�dS)
Nz'name' must be a stringcss|]}t|t�VqdS)N)�
isinstance�str)�.0�v�r�+/usr/lib64/python3.8/distutils/extension.py�	<genexpr>jsz%Extension.__init__.<locals>.<genexpr>z#'sources' must be a list of stringsrcSsg|]}t|��qSr)�repr)rZoptionrrr�
<listcomp>�sz&Extension.__init__.<locals>.<listcomp>z, zUnknown Extension options: %s)rr�AssertionError�list�all�name�sources�include_dirs�
define_macros�undef_macros�library_dirs�	libraries�runtime_library_dirs�
extra_objects�extra_compile_args�extra_link_args�export_symbols�	swig_opts�depends�language�optional�len�join�sorted�warnings�warn)�selfrrrrrrrrrrrrrrrr�kwZoptions�msgrrr�__init__Vs6

�











zExtension.__init__cCsd|jj|jj|jt|�fS)Nz<%s.%s(%r) at %#x>)�	__class__�
__module__�__qualname__r�id)r$rrr�__repr__�s�zExtension.__repr__)NNNNNNNNNNNNNN)�__name__r)r*�__doc__r'r,rrrrrs"C�
/rcCs�ddlm}m}m}ddlm}ddlm}||�}||dddddd�}�z^g}|�	�}	|	dkrd�q�|�
|	�rpqP|	d|	dkr�d	kr�nn|�d
|	�qP||	|�}	||	�}
|
d}t|g�}d}
|
dd�D�]�}|
dk	r�|
�
|�d}
q�tj�|�d}|dd�}|dd�}|dk�r2|j�
|�q�|d
k�rJ|j�
|�q�|dk�r�|�d�}|dk�rz|j�
|df�n$|j�
|d|�||dd�f�q�|dk�r�|j�
|�q�|dk�r�|j�
|�q�|dk�r�|j�
|�q�|dk�r|j�
|�q�|dk�r|j�
|�q�|dk�r*|j}
q�|dk�r<|j}
q�|dk�rN|j}
q�|dk�rr|j�
|�|�s�|j}
q�|dk�r�|j�
|�q�|�d|�q�|�
|�qPW5|��X|S)z3Reads a Setup file and returns Extension instances.r)�parse_makefile�expand_makefile_vars�_variable_rx)�TextFile)�split_quoted�)Zstrip_commentsZskip_blanksZ
join_linesZ	lstrip_wsZ	rstrip_wsN����*z'%s' lines not handled yet�)z.cz.ccz.cppz.cxxz.c++z.mz.mmz-Iz-D�=z-Uz-Cz-lz-Lz-Rz-rpathz-Xlinkerz
-Xcompilerz-u)z.az.soz.slz.oz.dylibzunrecognized argument '%s')Zdistutils.sysconfigr/r0r1Zdistutils.text_filer2Zdistutils.utilr3�close�readline�matchr#r�append�os�path�splitextrr�findrrrrrrrr)�filenamer/r0r1r2r3�vars�file�
extensions�lineZwords�moduleZextZappend_next_wordZword�suffixZswitch�valueZequalsrrr�read_setup_file�s��
 







�










rI)r.r=r"rrIrrrr�<module>szPKX[4#�Z��#__pycache__/dir_util.cpython-38.pycnu�[���U

e5db�@spdZddlZddlZddlmZmZddlmZiaddd�Z	dd	d
�Z
ddd�Zd
d�Zddd�Z
dd�ZdS)zWdistutils.dir_util

Utility functions for manipulating directories and directory trees.�N)�DistutilsFileError�DistutilsInternalError)�log��cCsft|t�std|f��tj�|�}g}tj�|�s<|dkr@|St�tj�	|��rV|Stj�
|�\}}|g}|r�|r�tj�|�s�tj�
|�\}}|�d|�ql|D]�}tj�||�}tj�	|�}	t�|	�r�q�|dkr�t
�d|�|�sXzt�||�WnVtk
�rL}
z6|
jtjk�r&tj�|��s<td||
jdf��W5d}
~
XYnX|�|�dt|	<q�|S)	a�Create a directory and any missing ancestor directories.

    If the directory already exists (or if 'name' is the empty string, which
    means the current directory, which of course exists), then do nothing.
    Raise DistutilsFileError if unable to create some directory along the way
    (eg. some sub-path exists, but is a file rather than a directory).
    If 'verbose' is true, print a one-line summary of each mkdir to stdout.
    Return the list of directories actually created.
    z(mkpath: 'name' must be a string (got %r)�rrzcreating %szcould not create '%s': %s���N)�
isinstance�strr�os�path�normpath�isdir�
_path_created�get�abspath�split�insert�joinr�info�mkdir�OSError�errnoZEEXISTr�args�append)�name�mode�verbose�dry_runZcreated_dirs�head�tailZtails�dZabs_head�exc�r#�*/usr/lib64/python3.8/distutils/dir_util.py�mkpathsB
�
�

r%c	CsNt�}|D] }|�tj�|tj�|���q
t|�D]}t||||d�q4dS)a�Create all the empty directories under 'base_dir' needed to put 'files'
    there.

    'base_dir' is just the name of a directory which doesn't necessarily
    exist yet; 'files' is a list of filenames to be interpreted relative to
    'base_dir'.  'base_dir' + the directory portion of every file in 'files'
    will be created if it doesn't already exist.  'mode', 'verbose' and
    'dry_run' flags are as for 'mkpath()'.
    �rrN)�set�addrrr�dirname�sortedr%)Zbase_dir�filesrrrZneed_dir�file�dirr#r#r$�create_treePs
r.c
Cs^ddlm}|s(tj�|�s(td|��zt�|�}	Wn>tk
rt}
z |rRg}	ntd||
jf��W5d}
~
XYnX|s�t	||d�g}|	D]�}tj�
||�}
tj�
||�}|�d�r�q�|�r
tj�|
��r
t�
|
�}|dkr�t�d	||�|s�t�||�|�|�q�tj�|
��r8|�t|
|||||||d
��q�||
||||||d
�|�|�q�|S)aCopy an entire directory tree 'src' to a new location 'dst'.

    Both 'src' and 'dst' must be directory names.  If 'src' is not a
    directory, raise DistutilsFileError.  If 'dst' does not exist, it is
    created with 'mkpath()'.  The end result of the copy is that every
    file in 'src' is copied to 'dst', and directories under 'src' are
    recursively copied to 'dst'.  Return the list of files that were
    copied or might have been copied, using their output name.  The
    return value is unaffected by 'update' or 'dry_run': it is simply
    the list of all files under 'src', with the names changed to be
    under 'dst'.

    'preserve_mode' and 'preserve_times' are the same as for
    'copy_file'; note that they only apply to regular files, not to
    directories.  If 'preserve_symlinks' is true, symlinks will be
    copied as symlinks (on platforms that support them!); otherwise
    (the default), the destination of the symlink will be copied.
    'update' and 'verbose' are the same as for 'copy_file'.
    r)�	copy_filez&cannot copy tree '%s': not a directoryzerror listing files in '%s': %sN)rz.nfsrzlinking %s -> %sr&)Zdistutils.file_utilr/rrrr�listdirr�strerrorr%r�
startswith�islink�readlinkrr�symlinkr�extend�	copy_tree)�srcZdstZ
preserve_modeZpreserve_timesZpreserve_symlinks�updaterrr/�names�eZoutputs�nZsrc_nameZdst_nameZ	link_destr#r#r$r7cs\��

���r7cCsft�|�D]F}tj�||�}tj�|�r@tj�|�s@t||�q
|�tj|f�q
|�tj	|f�dS)zHelper for remove_tree().N)
rr0rrrr3�_build_cmdtupler�remove�rmdir)r�	cmdtuples�fZreal_fr#r#r$r=�sr=cCs�|dkrt�d|�|rdSg}t||�|D]h}z2|d|d�tj�|d�}|tkrbt|=Wq.tk
r�}zt�d||�W5d}~XYq.Xq.dS)z�Recursively remove an entire directory tree.

    Any errors are ignored (apart from being reported to stdout if 'verbose'
    is true).
    rz'removing '%s' (and everything under it)Nrzerror removing %s: %s)	rrr=rrrrr�warn)Z	directoryrrr@�cmdrr"r#r#r$�remove_tree�s

rDcCs6tj�|�\}}|dd�tjkr2||dd�}|S)z�Take the full path 'path', and make it a relative path.

    This is useful to make 'path' the second argument to os.path.join().
    rrN)rr�
splitdrive�sep)rZdriver#r#r$�ensure_relative�srG)rrr)rrr)rrrrrr)rr)�__doc__rrZdistutils.errorsrrZ	distutilsrrr%r.r7r=rDrGr#r#r#r$�<module>s 
?
�
E

PKX[e9-+__pycache__/versionpredicate.cpython-38.pycnu�[���U

e5d
�@s�dZddlZddlZddlZe�dej�Ze�d�Ze�d�Z	dd�Z
ejejej
ejejejd�ZGd	d
�d
�Zdadd�ZdS)
zBModule for parsing and testing package version predicate strings.
�Nz'(?i)^\s*([a-z_]\w*(?:\.[a-z_]\w*)*)(.*)z^\s*\((.*)\)\s*$z%^\s*(<=|>=|<|>|!=|==)\s*([^\s,]+)\s*$cCs6t�|�}|std|��|��\}}|tj�|�fS)zVParse a single version comparison.

    Return (comparison string, StrictVersion)
    z"bad package restriction syntax: %r)�re_splitComparison�match�
ValueError�groups�	distutils�version�
StrictVersion)�pred�res�compZverStr�r�2/usr/lib64/python3.8/distutils/versionpredicate.py�splitUps

r)�<z<=z==�>z>=z!=c@s(eZdZdZdd�Zdd�Zdd�ZdS)	�VersionPredicatea�Parse and test package version predicates.

    >>> v = VersionPredicate('pyepat.abc (>1.0, <3333.3a1, !=1555.1b3)')

    The `name` attribute provides the full dotted name that is given::

    >>> v.name
    'pyepat.abc'

    The str() of a `VersionPredicate` provides a normalized
    human-readable version of the expression::

    >>> print(v)
    pyepat.abc (> 1.0, < 3333.3a1, != 1555.1b3)

    The `satisfied_by()` method can be used to determine with a given
    version number is included in the set described by the version
    restrictions::

    >>> v.satisfied_by('1.1')
    True
    >>> v.satisfied_by('1.4')
    True
    >>> v.satisfied_by('1.0')
    False
    >>> v.satisfied_by('4444.4')
    False
    >>> v.satisfied_by('1555.1b3')
    False

    `VersionPredicate` is flexible in accepting extra whitespace::

    >>> v = VersionPredicate(' pat( ==  0.1  )  ')
    >>> v.name
    'pat'
    >>> v.satisfied_by('0.1')
    True
    >>> v.satisfied_by('0.2')
    False

    If any version numbers passed in do not conform to the
    restrictions of `StrictVersion`, a `ValueError` is raised::

    >>> v = VersionPredicate('p1.p2.p3.p4(>=1.0, <=1.3a1, !=1.2zb3)')
    Traceback (most recent call last):
      ...
    ValueError: invalid version number '1.2zb3'

    It the module or package name given does not conform to what's
    allowed as a legal module or package name, `ValueError` is
    raised::

    >>> v = VersionPredicate('foo-bar')
    Traceback (most recent call last):
      ...
    ValueError: expected parenthesized list: '-bar'

    >>> v = VersionPredicate('foo bar (12.21)')
    Traceback (most recent call last):
      ...
    ValueError: expected parenthesized list: 'bar (12.21)'

    cCs�|��}|std��t�|�}|s.td|��|��\|_}|��}|r�t�|�}|sbtd|��|��d}dd�|�d�D�|_|js�td|��ng|_d	S)
z*Parse a version predicate string.
        zempty package restrictionzbad package name in %rzexpected parenthesized list: %rrcSsg|]}t|��qSr)r)�.0ZaPredrrr
�
<listcomp>tsz-VersionPredicate.__init__.<locals>.<listcomp>�,zempty parenthesized list in %rN)	�stripr�re_validPackagerr�name�re_paren�splitr	)�selfZversionPredicateStrrZparen�strrrr
�__init__`s&

�zVersionPredicate.__init__cCs8|jr.dd�|jD�}|jdd�|�dS|jSdS)NcSs g|]\}}|dt|��qS)� )r)r�cond�verrrr
r}sz,VersionPredicate.__str__.<locals>.<listcomp>z (z, �))r	r�join)r�seqrrr
�__str__{szVersionPredicate.__str__cCs(|jD]\}}t|||�sdSqdS)z�True if version is compatible with all the predicates in self.
        The parameter version must be acceptable to the StrictVersion
        constructor.  It may be either a string or StrictVersion.
        FT)r	�compmap)rrrrrrr
�satisfied_by�szVersionPredicate.satisfied_byN)�__name__�
__module__�__qualname__�__doc__rr#r%rrrr
rs@rcCsdtdkrt�dtj�a|��}t�|�}|s8td|��|�d�pDd}|rVtj	�
|�}|�d�|fS)a9Return the name and optional version number of a provision.

    The version number, if given, will be returned as a `StrictVersion`
    instance, otherwise it will be `None`.

    >>> split_provision('mypkg')
    ('mypkg', None)
    >>> split_provision(' mypkg( 1.2 ) ')
    ('mypkg', StrictVersion ('1.2'))
    Nz=([a-zA-Z_]\w*(?:\.[a-zA-Z_]\w*)*)(?:\s*\(\s*([^)\s]+)\s*\))?$z"illegal provides specification: %r��)�
_provision_rx�re�compile�ASCIIrrr�grouprrr)�value�mrrrr
�split_provision�s�
r3)r)r-Zdistutils.versionr�operatorr.r/rrrr�lt�le�eq�gt�ge�ner$rr,r3rrrr
�<module>s"�

�nPKX[�$�

*__pycache__/text_file.cpython-38.opt-2.pycnu�[���U

e5d�0�@s"ddlZddlZGdd�d�ZdS)�Nc@speZdZdddddddd�Zddd�Zdd	�Zd
d�Zddd
�Zddd�Zddd�Z	dd�Z
dd�Zdd�ZdS)�TextFile�r�strict)�strip_comments�skip_blanks�	lstrip_ws�	rstrip_ws�
join_lines�
collapse_join�errorsNcKs�|dkr|dkrtd��|j��D]0}||kr@t||||�q"t|||j|�q"|��D]}||jkr\td|��q\|dkr�|�|�n||_||_d|_g|_	dS)Nz7you must supply either or both of 'filename' and 'file'zinvalid TextFile option '%s'r)
�RuntimeError�default_options�keys�setattr�KeyError�open�filename�file�current_line�linebuf)�selfrrZoptions�opt�r�+/usr/lib64/python3.8/distutils/text_file.py�__init__Ns
zTextFile.__init__cCs&||_tj|jd|jd�|_d|_dS)N�r)rr)r�iorrrr)rrrrrrosz
TextFile.opencCs$|j}d|_d|_d|_|��dS�N)rrr�close)rrrrrrvs
zTextFile.closecCsjg}|dkr|j}|�|jd�t|ttf�rD|�dt|��n|�d|�|�t|��d�|�S)Nz, z
lines %d-%d: z	line %d: �)r�appendr�
isinstance�list�tuple�str�join)r�msg�lineZoutmsgrrr�	gen_errorszTextFile.gen_errorcCstd|�||���dS)Nzerror: )�
ValueErrorr(�rr&r'rrr�error�szTextFile.errorcCs tj�d|�||�d�dS)Nz	warning: �
)�sys�stderr�writer(r*rrr�warn�sz
TextFile.warncCs�|jr|jd}|jd=|Sd}|j��}|dkr6d}|jr�|r�|�d�}|dkrTnX|dksl||ddkr�|ddkr|dp~d}|d|�|}|��dkr�q n|�dd�}|j�r|�r|dkr�|�d	�|S|j	r�|�
�}||}t|jt
��r
|jdd|jd<n|j|jdg|_n:|dk�r,dSt|jt
��rL|jdd|_n|jd|_|j�rr|j�rr|��}n"|j�r�|�
�}n|j�r�|��}|dk�s�|dk�r�|j�r�q |j�r�|ddk�r�|dd�}q |d
d�dk�r�|dd
�d}q |S)N���r�#rr�\r,z\#z2continuation line immediately precedes end-of-file���z\
)rr�readliner�find�strip�replacer	r0r
�lstripr!rr"rr�rstripr)rr'Zbuildup_line�posZeolrrrr5�sf




	
�


zTextFile.readlinecCs(g}|��}|dkr|S|�|�qdSr)r5r )r�linesr'rrr�	readliness
zTextFile.readlinescCs|j�|�dSr)rr )rr'rrr�
unreadlineszTextFile.unreadline)NN)N)N)N)
�__name__�
__module__�__qualname__r
rrrr(r+r0r5r=r>rrrrr
s";�	
!	



x
r)r-rrrrrr�<module>sPKX[�5����%__pycache__/core.cpython-38.opt-1.pycnu�[���U

e5d�"�@s�dZddlZddlZddlmZddlTddlmZddlm	Z	ddl
mZddlm
Z
d	Zd
d�ZdadadZd
Zdd�Zddd�ZdS)a#distutils.core

The only module that needs to be imported to use the Distutils; provides
the 'setup' function (which is to be called from the setup script).  Also
indirectly provides the Distribution and Command classes, although they are
really defined in distutils.dist and distutils.cmd.
�N)�DEBUG)�*)�Distribution)�Command)�
PyPIRCCommand)�	Extensionz�usage: %(script)s [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]
   or: %(script)s --help [cmd1 cmd2 ...]
   or: %(script)s --help-commands
   or: %(script)s cmd --help
cCstj�|�}tt�S)N)�os�path�basename�USAGE�vars)�script_nameZscript�r�&/usr/lib64/python3.8/distutils/core.py�	gen_usage sr)�	distclassr
�script_argsZoptions�name�versionZauthorZauthor_emailZ
maintainerZmaintainer_emailZurl�licenseZdescriptionZlong_description�keywordsZ	platformsZclassifiersZdownload_urlZrequiresZprovidesZ	obsoletes)rZsourcesZinclude_dirsZ
define_macrosZundef_macrosZlibrary_dirsZ	librariesZruntime_library_dirsZ
extra_objectsZextra_compile_argsZextra_link_argsZ	swig_optsZexport_symbolsZdependsZlanguagec
Ks|�d�}|r|d=nt}d|kr8tj�tjd�|d<d|krRtjdd�|d<z||�a}WnLtk
r�}z.d|kr�t	d|��nt	d	|d|f��W5d}~XYnXt
d
kr�|S|��tr�t
d�|��t
dkr�|Sz|��}Wn:tk
�r*}zt	t|j�d
|��W5d}~XYnXt�rBt
d�|��t
dk�rP|S|�rz|��Wn�tk
�r�t	d��Yn�tk
�r�}z.t�r�tj�d|f��nt	d|f��W5d}~XYnBttfk
�r}zt�r�nt	dt|���W5d}~XYnX|S)a�The gateway to the Distutils: do everything your setup script needs
    to do, in a highly flexible and user-driven way.  Briefly: create a
    Distribution instance; find and parse config files; parse the command
    line; run each Distutils command found there, customized by the options
    supplied to 'setup()' (as keyword arguments), in config files, and on
    the command line.

    The Distribution instance might be an instance of a class supplied via
    the 'distclass' keyword argument to 'setup'; if no such class is
    supplied, then the Distribution class (in dist.py) is instantiated.
    All other arguments to 'setup' (except for 'cmdclass') are used to set
    attributes of the Distribution instance.

    The 'cmdclass' argument, if supplied, is a dictionary mapping command
    names to command classes.  Each command encountered on the command line
    will be turned into a command class, which is in turn instantiated; any
    class found in 'cmdclass' is used in place of the default, which is
    (for command 'foo_bar') class 'foo_bar' in module
    'distutils.command.foo_bar'.  The command class must provide a
    'user_options' attribute which is a list of option specifiers for
    'distutils.fancy_getopt'.  Any command-line options between the current
    and the next command are used to set attributes of the current command
    object.

    When the entire command-line has been successfully parsed, calls the
    'run()' method on each command object in turn.  This method will be
    driven entirely by the Distribution object (which each command object
    has a reference to, thanks to its constructor), and the
    command-specific options that became attributes of each command
    object.
    rr
rr�Nrzerror in setup command: %szerror in %s setup command: %s�initz%options (after parsing config files):�configz

error: %sz%options (after parsing command line):�commandlineZinterruptedz
error: %s
z	error: %szerror: )�getrrr	r
�sys�argv�_setup_distributionZDistutilsSetupError�
SystemExit�_setup_stop_afterZparse_config_filesr�printZdump_option_dictsZparse_command_lineZDistutilsArgErrorrr
Zrun_commands�KeyboardInterrupt�OSError�stderr�writeZDistutilsErrorZCCompilerError�str)�attrs�klassZdist�msg�ok�excrrr�setup9sd%

�(
�"r,�runc	Cs�|dkrtd|f��|atj��}d|i}zZzH|tjd<|dk	rP|tjdd�<t|d��}t|��|�W5QRXW5|t_daXWntk
r�YnXt	dkr�t
d|��t	S)	a.Run a setup script in a somewhat controlled environment, and
    return the Distribution instance that drives things.  This is useful
    if you need to find out the distribution meta-data (passed as
    keyword args from 'script' to 'setup()', or the contents of the
    config files or command-line.

    'script_name' is a file that will be read and run with 'exec()';
    'sys.argv[0]' will be replaced with 'script' for the duration of the
    call.  'script_args' is a list of strings; if supplied,
    'sys.argv[1:]' will be replaced by 'script_args' for the duration of
    the call.

    'stop_after' tells 'setup()' when to stop processing; possible
    values:
      init
        stop after the Distribution instance has been created and
        populated with the keyword arguments to 'setup()'
      config
        stop after config files have been parsed (and their data
        stored in the Distribution instance)
      commandline
        stop after the command-line ('sys.argv[1:]' or 'script_args')
        have been parsed (and the data stored in the Distribution)
      run [default]
        stop after all commands have been run (the same as if 'setup()'
        had been called in the usual way

    Returns the Distribution instance, which provides all information
    used to drive the Distutils.
    )rrrr-z"invalid value for 'stop_after': %r�__file__Nrr�rbzZ'distutils.core.setup()' was never called -- perhaps '%s' is not a Distutils setup script?)�
ValueErrorr rr�copy�open�exec�readrr�RuntimeError)r
rZ
stop_afterZ	save_argv�g�frrr�	run_setup�s*


�r8)Nr-)�__doc__rrZdistutils.debugrZdistutils.errorsZdistutils.distrZ
distutils.cmdrZdistutils.configrZdistutils.extensionrrrr rZsetup_keywordsZextension_keywordsr,r8rrrr�<module>s 	qPKX[@c.�
	
	$__pycache__/log.cpython-38.opt-1.pycnu�[���U

e5d��@sldZdZdZdZdZdZddlZGdd	�d	�Ze�Zej	Z	ej
Z
ejZejZej
Z
ejZd
d�Zdd
�ZdS)z,A simple log mechanism styled after PEP 282.������Nc@sPeZdZefdd�Zdd�Zdd�Zdd�Zd	d
�Zdd�Z	d
d�Z
dd�ZdS)�LogcCs
||_dS�N)�	threshold)�selfr	�r�%/usr/lib64/python3.8/distutils/log.py�__init__szLog.__init__cCs�|tttttfkr"tdt|���||jkr�|r8||}|tttfkrNtj	}ntj
}z|�d|�Wn:tk
r�|j
}|�|d��|�}|�d|�YnX|��dS)Nz%s wrong log levelz%s
�backslashreplace)�DEBUG�INFO�WARN�ERROR�FATAL�
ValueError�strr	�sys�stderr�stdout�write�UnicodeEncodeError�encoding�encode�decode�flush)r
�level�msg�args�streamrrrr�_logs
zLog._logcGs|�|||�dSr)r#)r
rr r!rrr�log'szLog.logcGs|�t||�dSr)r#r�r
r r!rrr�debug*sz	Log.debugcGs|�t||�dSr)r#rr%rrr�info-szLog.infocGs|�t||�dSr)r#rr%rrr�warn0szLog.warncGs|�t||�dSr)r#rr%rrr�error3sz	Log.errorcGs|�t||�dSr)r#rr%rrr�fatal6sz	Log.fatalN)�__name__�
__module__�__qualname__rr
r#r$r&r'r(r)r*rrrrrsrcCstj}|t_|Sr)�_global_logr	)r�oldrrr�
set_thresholdAsr0cCs8|dkrtt�n"|dkr$tt�n|dkr4tt�dS)Nrrr)r0rrr)�vrrr�
set_verbosityGs

r2)�__doc__rrrrrrrr.r$r&r'r(r)r*r0r2rrrr�<module>s +PKX[/h��hDhD(__pycache__/msvc9compiler.cpython-38.pycnu�[���U

e5d/w�@sRdZddlZddlZddlZddlZddlmZmZmZm	Z	m
Z
ddlmZm
Z
mZddlmZddlmZddlZejZejZejZejZejejejejfZ ej!dko�ej"dkZ#e#r�d	Z$d
Z%dZ&ndZ$d
Z%dZ&ddd�Z'Gdd�d�Z(Gdd�d�Z)dd�Z*dd�Z+dd�Z,dd�Z-d$dd�Z.e*�Z/e/d k�r>ed!e/��Gd"d#�d#e�Z0dS)%adistutils.msvc9compiler

Contains MSVCCompiler, an implementation of the abstract CCompiler class
for the Microsoft Visual Studio 2008.

The module is compatible with VS 2005 and VS 2008. You can find legacy support
for older versions of VS in distutils.msvccompiler.
�N)�DistutilsExecError�DistutilsPlatformError�CompileError�LibError�	LinkError)�	CCompiler�gen_preprocess_options�gen_lib_options)�log)�get_platform�win32lz1Software\Wow6432Node\Microsoft\VisualStudio\%0.1fz5Software\Wow6432Node\Microsoft\Microsoft SDKs\Windowsz,Software\Wow6432Node\Microsoft\.NETFrameworkz%Software\Microsoft\VisualStudio\%0.1fz)Software\Microsoft\Microsoft SDKs\Windowsz Software\Microsoft\.NETFramework�x86Zamd64�rz	win-amd64c@sPeZdZdZdd�Zee�Zdd�Zee�Zdd�Zee�Zdd	�Ze	e�Zd
S)�Regz2Helper class to read values from the registry
    cCs:tD](}|�||�}|r||kr||Sqt|��dS�N)�HKEYS�read_values�KeyError)�cls�path�key�base�d�r�//usr/lib64/python3.8/distutils/msvc9compiler.py�	get_value@s
z
Reg.get_valuecCsnzt||�}Wntk
r$YdSXg}d}zt||�}Wntk
rTYqjYnX|�|�|d7}q.|S)zReturn list of registry keys.Nr�)�RegOpenKeyEx�RegError�
RegEnumKey�append)rrr�handle�L�i�krrr�	read_keysHs


z
Reg.read_keysc	Cs�zt||�}Wntk
r$YdSXi}d}zt||�\}}}Wntk
rZYq�YnX|��}|�|�||�|�<|d7}q.|S)z`Return dict of registry keys and values.

        All names are converted to lowercase.
        Nrr)rr�RegEnumValue�lower�convert_mbcs)	rrrr!rr#�name�value�typerrrrZs

zReg.read_valuescCs:t|dd�}|dk	r6z|d�}Wntk
r4YnX|S)N�decode�mbcs)�getattr�UnicodeError)�sZdecrrrr(pszReg.convert_mbcsN)
�__name__�
__module__�__qualname__�__doc__r�classmethodr%rr(�staticmethodrrrrr<src@s,eZdZdd�Zdd�Zdd�Zdd�Zd	S)
�
MacroExpandercCsi|_t||_|�|�dSr)�macros�VS_BASE�vsbase�load_macros)�self�versionrrr�__init__|s
zMacroExpander.__init__cCst�||�|jd|<dS)Nz$(%s))rrr8)r<Zmacrorrrrr�	set_macro�szMacroExpander.set_macroc	Cs|�d|jdd�|�d|jdd�|�dtd�z$|dkrP|�d	td
�ntd
��Wntk
rvtd��YnX|dkr�|�d
|jd�|�dtd�nbd}tD]X}zt||�}Wntk
r�Yq�YnXt	|d�}t
�|d||f�}|d|jd<q�dS)NZVCInstallDirz	\Setup\VC�
productdirZVSInstallDirz	\Setup\VSZFrameworkDirZinstallroot� @ZFrameworkSDKDirzsdkinstallrootv2.0aPython was built with Visual Studio 2008;
extensions must be built with a compiler than can generate compatible binaries.
Visual Studio 2008 was not found on this system. If you have Cygwin installed,
you can try compiling with MingW32, by passing "-c mingw32" to setup.py.g"@ZFrameworkVersionzclr versionZ
WindowsSdkDirZcurrentinstallfolderz.Software\Microsoft\NET Framework Setup\Productrz%s\%sr=z$(FrameworkVersion))
r?r:�NET_BASErr�WINSDK_BASErrrrrrr8)r<r=�pr�hrrrrrr;�s2��


zMacroExpander.load_macroscCs$|j��D]\}}|�||�}q
|Sr)r8�items�replace)r<r0r$�vrrr�sub�szMacroExpander.subN)r1r2r3r>r?r;rIrrrrr7zsr7cCs�d}tj�|�}|dkrdS|t|�}tj|d��dd�\}}t|dd��d}|dkrf|d7}t|d	d
��d}|dkr�d}|dkr�||SdS)
z�Return the version of MSVC that was used to build Python.

    For Python 2.3 and up, the version number is included in
    sys.version.  For earlier versions, assume the compiler is MSVC 6.
    zMSC v.����N� r����
��g$@r)�sysr=�find�len�split�int)�prefixr#r0�restZmajorVersionZminorVersionrrr�get_build_version�srXcCs0g}|D]"}tj�|�}||kr|�|�q|S)znReturn a list of normalized paths with duplicates removed.

    The current order of paths is maintained.
    )�osr�normpathr )�pathsZ
reduced_pathsrDZnprrr�normalize_and_reduce_paths�sr\cCs<|�tj�}g}|D]}||kr|�|�qtj�|�}|S)z8Remove duplicate values of an environment variable.
    )rTrY�pathsepr �join)ZvariableZoldListZnewListr#ZnewVariablerrr�removeDuplicates�sr_cCst|}zt�d|d�}Wn"tk
r>t�d�d}YnX|rPtj�|�s�d|}tj	�
|d�}|r�tj�|�r�tj�|tjtjd�}tj�
|�}tj�|�s�t�d|�dSnt�d|�|s�t�d	�dStj�|d
�}tj�|�r�|St�d�dS)z�Find the vcvarsall.bat file

    At first it tries to find the productdir of VS 2008 in the registry. If
    that fails it falls back to the VS90COMNTOOLS env var.
    z%s\Setup\VCr@z%Unable to find productdir in registryNzVS%0.f0COMNTOOLSZVCz%s is not a valid directoryz Env var %s is not set or invalidzNo productdir foundz
vcvarsall.bat�Unable to find vcvarsall.bat)r9rrrr
�debugrYr�isdir�environ�getr^�pardir�abspath�isfile)r=r:r@ZtoolskeyZtoolsdir�	vcvarsallrrr�find_vcvarsall�s4
�



ricCs8t|�}ddddh}i}|dkr(td��t�d||�tjd||ftjtjd	�}z�|�
�\}}|��d
krzt|�d���|�d�}|�
d�D]d}t�|�}d
|kr�q�|��}|�
d
d�\}	}
|	��}	|	|kr�|
�tj�r�|
dd�}
t|
�||	<q�W5|j��|j	��Xt|�t|�k�r4ttt|������|S)zDLaunch vcvarsall.bat and read the settings from its environment
    �include�libZlibpathrNr`z'Calling 'vcvarsall.bat %s' (version=%s)z
"%s" %s & set)�stdout�stderrrr-�
�=rrJ)rirr
ra�
subprocess�Popen�PIPErl�closermZcommunicate�waitr,rTrr(�stripr'�endswithrYr]r_rS�
ValueError�str�list�keys)r=ZarchrhZinteresting�result�popenrlrm�linerr*rrr�query_vcvarsall�s>�


r~rAz(VC %0.1f is not supported by this modulec
@s�eZdZdZdZiZdgZdddgZdgZdgZ	eeee	Z
d	Zd
ZdZ
dZd
ZZdZd.dd�Zd/dd�Zd0dd�Zd1dd�Zd2dd�Zd3dd�Zdd�Zd d!�Zd"d#�Zd$d%�Zd&d'�Zd(d)�Zd4d*d+�Zd,d-�ZdS)5�MSVCCompilerzwConcrete class that implements an interface to Microsoft Visual C++,
       as defined by the CCompiler abstract class.Zmsvcz.cz.ccz.cppz.cxx�.rcz.mcz.resz.objz.libz.dllz%s%sz.exercCs8t�||||�t|_d|_g|_d|_d|_d|_dS)NzSoftware\Microsoft\VisualStudioF)	rr>�VERSION�_MSVCCompiler__versionZ_MSVCCompiler__root�_MSVCCompiler__paths�	plat_name�_MSVCCompiler__arch�initialized)r<�verboseZdry_runZforcerrrr>IszMSVCCompiler.__init__NcCs(|jrtd��|dkrt�}d}||kr6td|f��dtjkrtdtjkrt|�d�rtd|_d|_d|_	d	|_
d
|_n�|t�ks�|dkr�t|}ntt�dt|}t
t|�}|d
�tj�|_|dtjd<|dtjd<t|j�dkr�td|j��|�d�|_|�d�|_|�d�|_	|�d	�|_
|�d
�|_z(tjd
�d�D]}|j�|��qHWntk
�rtYnXt|j�|_d�|j�tjd
<d|_|jdk�r�dddddg|_ddddddg|_n&ddddddg|_dddddddg|_dddg|_|jd k�rddd!d"g|_dg|_d#|_dS)$Nzdon't init multiple timesrz--plat-name must be one of %sZDISTUTILS_USE_SDKZMSSdkzcl.exezlink.exezlib.exezrc.exezmc.exer�_rrkrjrzxPython was built with %s, and extensions need to be built with the same version of the compiler, but it isn't installed.�;r
z/nologoz/Oxz/MDz/W3z/DNDEBUGz/Odz/MDdz/Z7z/D_DEBUGz/GS-z/DLLz/INCREMENTAL:NO�z/INCREMENTAL:noz/DEBUGT) r��AssertionErrorrrrYrc�find_exe�cc�linkerrk�rc�mc�PLAT_TO_VCVARSr~r�rTr]r�rSZ_MSVCCompiler__productr rr\r^Zpreprocess_optionsr��compile_options�compile_options_debug�ldflags_sharedr��ldflags_shared_debugZldflags_static)r<r�Zok_platsZ	plat_specZvc_envrDrrr�
initializeTs��
�
���
�
��zMSVCCompiler.initialize�cCs�|dkrd}g}|D]�}tj�|�\}}tj�|�d}|tj�|�d�}||jkrbtd|��|rrtj�|�}||jkr�|�	tj�
|||j��q||jkr�|�	tj�
|||j��q|�	tj�
|||j
��q|S)Nr�rzDon't know how to compile %s)rYr�splitext�
splitdrive�isabs�src_extensionsr�basename�_rc_extensionsr r^�
res_extension�_mc_extensions�
obj_extension)r<Zsource_filenamesZ	strip_dir�
output_dirZ	obj_namesZsrc_namer�extrrr�object_filenames�s.

�
��zMSVCCompiler.object_filenamesc	Csp|js|��|�||||||�}	|	\}}
}}}|p6g}
|
�d�|rT|
�|j�n|
�|j�|
D�]}z||\}}Wntk
r�YqdYnX|r�tj	�
|�}||jkr�d|}�nT||jkr�d|}�n>||j
k�r<|}d|}z"|�|jg||g|g�Wqdtk
�r6}zt|��W5d}~XYqdXqdn�||jk�r�tj	�|�}tj	�|�}zl|�|jgd|d|g|g�tj	�tj	�|��\}}tj	�||d�}|�|jgd|g|g�Wqdtk
�r�}zt|��W5d}~XYqdXqdntd||f��d	|}z&|�|jg|
|||g|�Wqdtk
�rh}zt|��W5d}~XYqdXqd|
S)
Nz/cz/Tcz/Tpz/foz-hz-rr�z"Don't know how to compile %s to %sz/Fo)r�r�Z_setup_compiler �extendr�r�rrYrrf�
_c_extensions�_cpp_extensionsr��spawnr�rrr��dirnamer�r�r�r^r�)r<Zsourcesr�r8Zinclude_dirsra�
extra_preargs�extra_postargsZdependsZcompile_info�objectsZpp_optsZbuildZcompile_opts�obj�srcr�Z	input_optZ
output_opt�msgZh_dirZrc_dirrr�Zrc_filerrr�compile�s�
�




��


��
��
���
zMSVCCompiler.compilec	
Cs�|js|��|�||�\}}|j||d�}|�||�r�|d|g}|rJz|�|jg|�Wq�tk
r�}zt|��W5d}~XYq�Xnt	�
d|�dS)N)r��/OUT:�skipping %s (up-to-date))r�r��_fix_object_args�library_filename�
_need_linkr�rkrrr
ra)	r<r�Zoutput_libnamer�ra�target_lang�output_filenameZlib_argsr�rrr�create_static_libs�zMSVCCompiler.create_static_libc
CsT|js|��|�||�\}}|�|||�}|\}}}|rL|�dt|��t||||�}|dk	rptj�	||�}|�
||��rD|tjkr�|	r�|j
dd�}q�|jdd�}n|	r�|j
}n|j}g}|p�gD]}|�d|�q�||||d|g}tj�|d�}|dk	�rLtj�tj�|��\}}tj�	||�|��}|�d|�|�|||�|
�rl|
|dd�<|�r||�|�|�tj�|��z|�|jg|�Wn,tk
�r�}zt|��W5d}~XYnX|�||�}|dk	�rP|\}}d||f}z|�dd	d
||g�Wn,tk
�r@}zt|��W5d}~XYnXnt�d|�dS)Nz5I don't know what to do with 'runtime_library_dirs': rz/EXPORT:r�rz/IMPLIB:z-outputresource:%s;%szmt.exez-nologoz	-manifestr�)r�r�r�Z
_fix_lib_args�warnrxr	rYrr^r�r�
EXECUTABLEr�r�r r�r�r�r��manifest_setup_ldargsr�Zmkpathr�r�rr�manifest_get_embed_infor
ra)r<�target_descr�r�r�Z	librariesZlibrary_dirsZruntime_library_dirsZexport_symbolsrar�r��
build_tempr�Z
fixed_argsZlib_optsZldflagsZexport_optsZsym�ld_argsZdll_nameZdll_extZimplib_filer�ZmfinfoZ
mffilename�mfidZout_argrrr�link6s��
��

��

��


�
zMSVCCompiler.linkcCs,tj�|tj�|�d�}|�d|�dS)Nz	.manifest�/MANIFESTFILE:)rYrr^r�r )r<r�r�r��
temp_manifestrrrr��s
�z"MSVCCompiler.manifest_setup_ldargscCs^|D]"}|�d�r|�dd�d}q,qdS|tjkr<d}nd}|�|�}|dkrVdS||fS)Nr��:rrO)�
startswithrTrr��_remove_visual_c_ref)r<r�r��argr�r�rrrr��s


z$MSVCCompiler.manifest_get_embed_infocCs�z�t|�}z|��}W5|��Xt�dtj�}t�|d|�}d}t�|d|�}t�dtj�}t�||�dkrtWdSt|d�}z|�|�|W�WS|��XWnt	k
r�YnXdS)NzU<assemblyIdentity.*?name=("|')Microsoft\.VC\d{2}\.CRT("|').*?(/>|</assemblyIdentity>)r�z*<dependentAssembly>\s*</dependentAssembly>zI<assemblyIdentity.*?name=(?:"|')(.+?)(?:"|').*?(?:/>|</assemblyIdentity>)�w)
�openrs�read�rer��DOTALLrI�search�write�OSError)r<Z
manifest_fileZ
manifest_fZmanifest_buf�patternrrrr��s2	
��


z!MSVCCompiler._remove_visual_c_refcCsd|S)Nz	/LIBPATH:r�r<�dirrrr�library_dir_option�szMSVCCompiler.library_dir_optioncCstd��dS)Nz<don't know how to set runtime library search path for MSVC++)rr�rrr�runtime_library_dir_option�s�z'MSVCCompiler.runtime_library_dir_optioncCs
|�|�Sr)r�)r<rkrrr�library_option�szMSVCCompiler.library_optioncCs\|r|d|g}n|g}|D]:}|D]0}tj�||�|��}tj�|�r$|Sq$qdS)NZ_d)rYrr^r��exists)r<�dirsrkraZ	try_namesr�r)Zlibfilerrr�find_library_file�szMSVCCompiler.find_library_filecCsz|jD].}tj�tj�|�|�}tj�|�r|Sqtjd�d�D].}tj�tj�|�|�}tj�|�rF|SqF|S)a�Return path to an MSVC executable program.

        Tries to find the program in several places: first, one of the
        MSVC program search paths from the registry; next, the directories
        in the PATH environment variable.  If any of those work, return an
        absolute path that is known to exist.  If none of them work, just
        return the original program name, 'exe'.
        �Pathr�)r�rYrr^rfrgrcrT)r<ZexerD�fnrrrr�s	


zMSVCCompiler.find_exe)rrr)N)rr�)NNNrNNN)NrN)
NNNNNrNNNN)r) r1r2r3r4Z
compiler_typeZexecutablesr�r�r�r�r�r�r�Zstatic_lib_extensionZshared_lib_extensionZstatic_lib_formatZshared_lib_formatZ
exe_extensionr>r�r�r�r�r�r�r�r�r�r�r�r�r�rrrrr+sl
��

W�
 �
X�
�
_+
r)r
)1r4rYrprQr�Zdistutils.errorsrrrrrZdistutils.ccompilerrrr	Z	distutilsr
Zdistutils.utilr�winregZ	OpenKeyExrZEnumKeyrZ	EnumValuer&�errorrZ
HKEY_USERS�HKEY_CURRENT_USER�HKEY_LOCAL_MACHINEZHKEY_CLASSES_ROOTr�platform�maxsizeZNATIVE_WIN64r9rCrBr�rr7rXr\r_rir~r�rrrrr�<module>sP��>.#
)
PKX[
d�"~6~6$__pycache__/cmd.cpython-38.opt-1.pycnu�[���U

e5d�F�@sbdZddlZddlZddlZddlmZddlmZmZm	Z	m
Z
mZddlmZGdd�d�Z
dS)ztdistutils.cmd

Provides the Command class, the base class for the command classes
in the distutils.command package.
�N)�DistutilsOptionError)�util�dir_util�	file_util�archive_util�dep_util��logc@s"eZdZdZgZdd�Zdd�Zdd�Zdd	�Zd
d�Z	dCdd�Z
dd�ZdDdd�Zdd�Z
dEdd�ZdFdd�Zdd�ZdGdd�Zdd �Zd!d"�Zd#d$�Zd%d&�ZdHd'd(�ZdId*d+�Zd,d-�Zd.d/�Zd0d1�ZdJd2d3�ZdKd5d6�ZdLd7d8�ZdMd9d:�ZdNd;d<�ZdOd=d>�Z dPd?d@�Z!dQdAdB�Z"dS)R�Commanda}Abstract base class for defining command classes, the "worker bees"
    of the Distutils.  A useful analogy for command classes is to think of
    them as subroutines with local variables called "options".  The options
    are "declared" in 'initialize_options()' and "defined" (given their
    final values, aka "finalized") in 'finalize_options()', both of which
    must be defined by every command class.  The distinction between the
    two is necessary because option values might come from the outside
    world (command line, config file, ...), and any options dependent on
    other options must be computed *after* these outside influences have
    been processed -- hence 'finalize_options()'.  The "body" of the
    subroutine, where it does all its work based on the values of its
    options, is the 'run()' method, which must also be implemented by every
    command class.
    cCsbddlm}t||�std��|jtkr0td��||_|��d|_	|j
|_
d|_d|_d|_
dS)z�Create and initialize a new Command object.  Most importantly,
        invokes the 'initialize_options()' method, which is the real
        initializer and depends on the actual command being
        instantiated.
        r)�Distributionz$dist must be a Distribution instancezCommand is an abstract classN)Zdistutils.distr�
isinstance�	TypeError�	__class__r
�RuntimeError�distribution�initialize_optionsZ_dry_run�verbose�force�help�	finalized)�selfZdistr�r�%/usr/lib64/python3.8/distutils/cmd.py�__init__/s


zCommand.__init__cCs<|dkr0t|d|�}|dkr*t|j|�S|Snt|��dS)N�dry_run�_)�getattrr�AttributeError)r�attrZmyvalrrr�__getattr___szCommand.__getattr__cCs|js|��d|_dS)N�)r�finalize_options�rrrr�ensure_finalizediszCommand.ensure_finalizedcCstd|j��dS)a�Set default values for all the options that this command
        supports.  Note that these defaults may be overridden by other
        commands, by the setup script, by config files, or by the
        command-line.  Thus, this is not the place to code dependencies
        between options; generally, 'initialize_options()' implementations
        are just a bunch of "self.foo = None" assignments.

        This method must be implemented by all command classes.
        �,abstract method -- subclass %s must overrideN�rrr"rrrr{s
�zCommand.initialize_optionscCstd|j��dS)aSet final values for all the options that this command supports.
        This is always called as late as possible, ie.  after any option
        assignments from the command-line or from other commands have been
        done.  Thus, this is the place to code option dependencies: if
        'foo' depends on 'bar', then it is safe to set 'foo' from 'bar' as
        long as 'foo' still has the same value it was assigned in
        'initialize_options()'.

        This method must be implemented by all command classes.
        r$Nr%r"rrrr!�s�zCommand.finalize_optionsN�cCs�ddlm}|dkr d|��}|j||tjd�|d}|jD]R\}}}|�|�}|ddkrn|dd�}t||�}|j|d||ftjd�qBdS)	Nr)�
longopt_xlatezcommand options for '%s':)�levelz  ����=z%s = %s)	Zdistutils.fancy_getoptr'�get_command_name�announcer	�INFOZuser_options�	translater)r�header�indentr'�optionr�valuerrr�dump_options�s

�zCommand.dump_optionscCstd|j��dS)a�A command's raison d'etre: carry out the action it exists to
        perform, controlled by the options initialized in
        'initialize_options()', customized by other commands, the setup
        script, the command-line, and config files, and finalized in
        'finalize_options()'.  All terminal output and filesystem
        interaction should be done by 'run()'.

        This method must be implemented by all command classes.
        r$Nr%r"rrr�run�s
�zCommand.runr cCst�||�dS)zmIf the current verbosity level is of greater than or equal to
        'level' print 'msg' to stdout.
        Nr)r�msgr(rrrr,�szCommand.announcecCs&ddlm}|r"t|�tj��dS)z~Print 'msg' to stdout if the global DEBUG (taken from the
        DISTUTILS_DEBUG environment variable) flag is true.
        r)�DEBUGN)Zdistutils.debugr6�print�sys�stdout�flush)rr5r6rrr�debug_print�szCommand.debug_printcCsBt||�}|dkr"t|||�|St|t�s>td|||f��|S)Nz'%s' must be a %s (got `%s`))r�setattrr�strr)rr1�what�default�valrrr�_ensure_stringlike�s

�zCommand._ensure_stringlikecCs|�|d|�dS)zWEnsure that 'option' is a string; if not defined, set it to
        'default'.
        �stringN)rA)rr1r?rrr�
ensure_string�szCommand.ensure_stringcCspt||�}|dkrdSt|t�r6t||t�d|��n6t|t�rTtdd�|D��}nd}|sltd||f��dS)z�Ensure that 'option' is a list of strings.  If 'option' is
        currently a string, we split it either on /,\s*/ or /\s+/, so
        "foo bar baz", "foo,bar,baz", and "foo,   bar baz" all become
        ["foo", "bar", "baz"].
        Nz,\s*|\s+css|]}t|t�VqdS�N)rr=)�.0�vrrr�	<genexpr>�sz-Command.ensure_string_list.<locals>.<genexpr>Fz''%s' must be a list of strings (got %r))	rrr=r<�re�split�list�allr)rr1r@�okrrr�ensure_string_list�s


��zCommand.ensure_string_listcCs6|�|||�}|dk	r2||�s2td|||f��dS)Nzerror in '%s' option: )rAr)rr1Ztesterr>Z	error_fmtr?r@rrr�_ensure_tested_string�s
�zCommand._ensure_tested_stringcCs|�|tjjdd�dS)z5Ensure that 'option' is the name of an existing file.�filenamez$'%s' does not exist or is not a fileN)rN�os�path�isfile�rr1rrr�ensure_filename�s�zCommand.ensure_filenamecCs|�|tjjdd�dS)Nzdirectory namez)'%s' does not exist or is not a directory)rNrPrQ�isdirrSrrr�ensure_dirnames�zCommand.ensure_dirnamecCst|d�r|jS|jjSdS)N�command_name)�hasattrrWr�__name__r"rrrr+	s
zCommand.get_command_namecGsF|j�|�}|��|D](\}}t||�dkrt||t||��qdS)a>Set the values of any "undefined" options from corresponding
        option values in some other command object.  "Undefined" here means
        "is None", which is the convention used to indicate that an option
        has not been changed between 'initialize_options()' and
        'finalize_options()'.  Usually called from 'finalize_options()' for
        options that depend on some other command rather than another
        option of the same command.  'src_cmd' is the other command from
        which option values will be taken (a command object will be created
        for it if necessary); the remaining arguments are
        '(src_option,dst_option)' tuples which mean "take the value of
        'src_option' in the 'src_cmd' command object, and copy it to
        'dst_option' in the current command object".
        N)r�get_command_objr#rr<)rZsrc_cmdZoption_pairsZsrc_cmd_objZ
src_optionZ
dst_optionrrr�set_undefined_optionss
zCommand.set_undefined_optionscCs|j�||�}|��|S)z�Wrapper around Distribution's 'get_command_obj()' method: find
        (create if necessary and 'create' is true) the command object for
        'command', call its 'ensure_finalized()' method, and return the
        finalized command object.
        )rrZr#)r�commandZcreateZcmd_objrrr�get_finalized_command$szCommand.get_finalized_commandrcCs|j�||�SrD)r�reinitialize_command)rr\Zreinit_subcommandsrrrr^0s�zCommand.reinitialize_commandcCs|j�|�dS)z�Run some other command: uses the 'run_command()' method of
        Distribution, which creates and finalizes the command object if
        necessary and then invokes its 'run()' method.
        N)r�run_command)rr\rrrr_4szCommand.run_commandcCs2g}|jD]"\}}|dks"||�r
|�|�q
|S)akDetermine the sub-commands that are relevant in the current
        distribution (ie., that need to be run).  This is based on the
        'sub_commands' class attribute: each tuple in that list may include
        a method that we call to determine if the subcommand needs to be
        run for the current distribution.  Return a list of command names.
        N)�sub_commands�append)rZcommandsZcmd_name�methodrrr�get_sub_commands;s
zCommand.get_sub_commandscCst�d|��|�dS)Nzwarning: %s: %s
)r	�warnr+)rr5rrrrdKszCommand.warncCstj||||jd�dS�N�r)r�executer)r�func�argsr5r(rrrrgNszCommand.execute�cCstj|||jd�dSre)r�mkpathr)r�name�moderrrrkQszCommand.mkpathc	Cstj|||||j||jd�S)z�Copy a file respecting verbose, dry-run and force flags.  (The
        former two default to whatever is in the Distribution object, and
        the latter defaults to false for commands that don't define it.)rf)r�	copy_filerr)r�infile�outfile�
preserve_mode�preserve_times�linkr(rrrrnTs
�zCommand.copy_filec	Cstj||||||j|jd�S)z\Copy an entire directory tree respecting verbose, dry-run,
        and force flags.
        rf)r�	copy_treerr)rrorprqrrZpreserve_symlinksr(rrrrt]s
�zCommand.copy_treecCstj|||jd�S)z$Move a file respecting dry-run flag.rf)r�	move_filer)r�srcZdstr(rrrrufszCommand.move_filecCs ddlm}||||jd�dS)z2Spawn an external command respecting dry-run flag.r)�spawnrfN)Zdistutils.spawnrwr)r�cmdZsearch_pathr(rwrrrrwjsz
Command.spawnc	Cstj|||||j||d�S)N)r�owner�group)r�make_archiver)rZ	base_name�formatZroot_dirZbase_dirryrzrrrr{os
�zCommand.make_archivecCs�|dkrd|}t|t�r"|f}nt|ttf�s8td��|dkrRd|d�|�f}|jsdt�||�rv|�	||||�n
t
�|�dS)a�Special case of 'execute()' for operations that process one or
        more input files and generate one output file.  Works just like
        'execute()', except the operation is skipped and a different
        message printed if 'outfile' already exists and is newer than all
        files listed in 'infiles'.  If the command defined 'self.force',
        and it is true, then the command is unconditionally run -- does no
        timestamp checks.
        Nzskipping %s (inputs unchanged)z9'infiles' must be a string, or a list or tuple of stringszgenerating %s from %sz, )rr=rJ�tupler
�joinrrZnewer_grouprgr	�debug)rZinfilesrprhriZexec_msgZskip_msgr(rrr�	make_fileus

�zCommand.make_file)Nr&)r )N)N)N)r )r)Nr )rj)r r Nr )r r rr )r )r r )NNNN)NNr )#rY�
__module__�__qualname__�__doc__r`rrr#rr!r3r4r,r;rArCrMrNrTrVr+r[r]r^r_rcrdrgrkrnrtrurwr{r�rrrrr
sZ0






�




�
	�
	

�
�r
)r�r8rPrHZdistutils.errorsrZ	distutilsrrrrrr	r
rrrr�<module>s
PKX[�T� � $__pycache__/text_file.cpython-38.pycnu�[���U

e5d�0�@s&dZddlZddlZGdd�d�ZdS)z�text_file

provides the TextFile class, which gives an interface to text files
that (optionally) takes care of stripping comments, ignoring blank
lines, and joining lines with backslashes.�Nc@steZdZdZdddddddd�Zddd�Zd	d
�Zdd�Zdd
d�Zddd�Z	ddd�Z
dd�Zdd�Zdd�Z
dS)�TextFilea�Provides a file-like object that takes care of all the things you
       commonly want to do when processing a text file that has some
       line-by-line syntax: strip comments (as long as "#" is your
       comment character), skip blank lines, join adjacent lines by
       escaping the newline (ie. backslash at end of line), strip
       leading and/or trailing whitespace.  All of these are optional
       and independently controllable.

       Provides a 'warn()' method so you can generate warning messages that
       report physical line number, even if the logical line in question
       spans multiple physical lines.  Also provides 'unreadline()' for
       implementing line-at-a-time lookahead.

       Constructor is called as:

           TextFile (filename=None, file=None, **options)

       It bombs (RuntimeError) if both 'filename' and 'file' are None;
       'filename' should be a string, and 'file' a file object (or
       something that provides 'readline()' and 'close()' methods).  It is
       recommended that you supply at least 'filename', so that TextFile
       can include it in warning messages.  If 'file' is not supplied,
       TextFile creates its own using 'io.open()'.

       The options are all boolean, and affect the value returned by
       'readline()':
         strip_comments [default: true]
           strip from "#" to end-of-line, as well as any whitespace
           leading up to the "#" -- unless it is escaped by a backslash
         lstrip_ws [default: false]
           strip leading whitespace from each line before returning it
         rstrip_ws [default: true]
           strip trailing whitespace (including line terminator!) from
           each line before returning it
         skip_blanks [default: true}
           skip lines that are empty *after* stripping comments and
           whitespace.  (If both lstrip_ws and rstrip_ws are false,
           then some lines may consist of solely whitespace: these will
           *not* be skipped, even if 'skip_blanks' is true.)
         join_lines [default: false]
           if a backslash is the last non-newline character on a line
           after stripping comments and whitespace, join the following line
           to it to form one "logical line"; if N consecutive lines end
           with a backslash, then N+1 physical lines will be joined to
           form one logical line.
         collapse_join [default: false]
           strip leading whitespace from lines that are joined to their
           predecessor; only matters if (join_lines and not lstrip_ws)
         errors [default: 'strict']
           error handler used to decode the file content

       Note that since 'rstrip_ws' can strip the trailing newline, the
       semantics of 'readline()' must differ from those of the builtin file
       object's 'readline()' method!  In particular, 'readline()' returns
       None for end-of-file: an empty string might just be a blank line (or
       an all-whitespace line), if 'rstrip_ws' is true but 'skip_blanks' is
       not.�r�strict)�strip_comments�skip_blanks�	lstrip_ws�	rstrip_ws�
join_lines�
collapse_join�errorsNcKs�|dkr|dkrtd��|j��D]0}||kr@t||||�q"t|||j|�q"|��D]}||jkr\td|��q\|dkr�|�|�n||_||_d|_g|_	dS)z�Construct a new TextFile object.  At least one of 'filename'
           (a string) and 'file' (a file-like object) must be supplied.
           They keyword argument options are described above and affect
           the values returned by 'readline()'.Nz7you must supply either or both of 'filename' and 'file'zinvalid TextFile option '%s'r)
�RuntimeError�default_options�keys�setattr�KeyError�open�filename�file�current_line�linebuf)�selfrrZoptions�opt�r�+/usr/lib64/python3.8/distutils/text_file.py�__init__Ns
zTextFile.__init__cCs&||_tj|jd|jd�|_d|_dS)zyOpen a new file named 'filename'.  This overrides both the
           'filename' and 'file' arguments to the constructor.�r)rrN)r�iorrrr)rrrrrrosz
TextFile.opencCs$|j}d|_d|_d|_|��dS)ziClose the current file and forget everything we know about it
           (filename, current line number).N)rrr�close)rrrrrrvs
zTextFile.closecCsjg}|dkr|j}|�|jd�t|ttf�rD|�dt|��n|�d|�|�t|��d�|�S)Nz, z
lines %d-%d: z	line %d: �)r�appendr�
isinstance�list�tuple�str�join)r�msg�lineZoutmsgrrr�	gen_errorszTextFile.gen_errorcCstd|�||���dS)Nzerror: )�
ValueErrorr'�rr%r&rrr�error�szTextFile.errorcCs tj�d|�||�d�dS)a�Print (to stderr) a warning message tied to the current logical
           line in the current file.  If the current logical line in the
           file spans multiple physical lines, the warning refers to the
           whole range, eg. "lines 3-5".  If 'line' supplied, it overrides
           the current line number; it may be a list or tuple to indicate a
           range of physical lines, or an integer for a single physical
           line.z	warning: �
N)�sys�stderr�writer'r)rrr�warn�sz
TextFile.warncCs�|jr|jd}|jd=|Sd}|j��}|dkr6d}|jr�|r�|�d�}|dkrTnX|dksl||ddkr�|ddkr|dp~d}|d|�|}|��dkr�q n|�d	d�}|j�r|�r|dkr�|�d
�|S|j	r�|�
�}||}t|jt
��r
|jdd|jd<n|j|jdg|_n:|dk�r,dSt|jt
��rL|jdd|_n|jd|_|j�rr|j�rr|��}n"|j�r�|�
�}n|j�r�|��}|dk�s�|dk�r�|j�r�q |j�r�|ddk�r�|dd�}q |dd�dk�r�|dd�d}q |S)
aURead and return a single logical line from the current file (or
           from an internal buffer if lines have previously been "unread"
           with 'unreadline()').  If the 'join_lines' option is true, this
           may involve reading multiple physical lines concatenated into a
           single string.  Updates the current line number, so calling
           'warn()' after 'readline()' emits a warning about the physical
           line(s) just read.  Returns None on end-of-file, since the empty
           string can occur if 'rstrip_ws' is true but 'strip_blanks' is
           not.���rN�#rr�\r+z\#z2continuation line immediately precedes end-of-file���z\
)rr�readliner�find�strip�replacer	r/r
�lstripr rr!rr�rstripr)rr&Zbuildup_line�posZeolrrrr4�sf




	
�


zTextFile.readlinecCs(g}|��}|dkr|S|�|�qdS)zWRead and return the list of all logical lines remaining in the
           current file.N)r4r)r�linesr&rrr�	readliness
zTextFile.readlinescCs|j�|�dS)z�Push 'line' (a string) onto an internal buffer that will be
           checked by future 'readline()' calls.  Handy for implementing
           a parser with line-at-a-time lookahead.N)rr)rr&rrr�
unreadlineszTextFile.unreadline)NN)N)N)N)�__name__�
__module__�__qualname__�__doc__r
rrrr'r*r/r4r<r=rrrrr
s$:�	
!	



x
r)rAr,rrrrrr�<module>sPKX[�YyF�&�&#__pycache__/filelist.cpython-38.pycnu�[���U

e5d 2�@s�dZddlZddlZddlZddlZddlmZddlmZm	Z	ddl
mZGdd�d�Zdd	�Z
ejfd
d�Zdd
�Zddd�ZdS)zsdistutils.filelist

Provides the FileList class, used for poking about the filesystem
and building lists of files.
�N��convert_path)�DistutilsTemplateError�DistutilsInternalError)�logc@s|eZdZdZddd�Zdd�Zejfdd�Zd	d
�Z	dd�Z
d
d�Zdd�Zdd�Z
dd�Zdd�Zddd�Zddd�ZdS) �FileLista�A list of files built by on exploring the filesystem and filtered by
    applying various patterns to what we find there.

    Instance attributes:
      dir
        directory from which files will be taken -- only used if
        'allfiles' not supplied to constructor
      files
        list of filenames currently being built/filtered/manipulated
      allfiles
        complete list of files under consideration (ie. without any
        filtering applied)
    NcCsd|_g|_dS�N)�allfiles�files)�self�warn�debug_print�r�*/usr/lib64/python3.8/distutils/filelist.py�__init__szFileList.__init__cCs
||_dSr)r	)rr	rrr�set_allfiles#szFileList.set_allfilescCst|�|_dSr)�findallr	)r�dirrrrr&szFileList.findallcCsddlm}|rt|�dS)z~Print 'msg' to stdout if the global DEBUG (taken from the
        DISTUTILS_DEBUG environment variable) flag is true.
        r)�DEBUGN)Zdistutils.debugr�print)r�msgrrrrr
)szFileList.debug_printcCs|j�|�dSr)r
�append)r�itemrrrr3szFileList.appendcCs|j�|�dSr)r
�extend)r�itemsrrrr6szFileList.extendcCs<tttjj|j��}g|_|D]}|j�tjj|��qdSr)�sorted�map�os�path�splitr
r�join)rZsortable_filesZ
sort_tuplerrr�sort9sz
FileList.sortcCs@tt|j�ddd�D]$}|j||j|dkr|j|=qdS)N�r���)�range�lenr
)r�irrr�remove_duplicatesCszFileList.remove_duplicatescCs�|��}|d}d}}}|dkrTt|�dkr<td|��dd�|dd�D�}n~|dkr�t|�d	krttd
|��t|d�}dd�|dd�D�}n:|dkr�t|�dkr�td
|��t|d�}ntd|��||||fS)Nr)�include�exclude�global-include�global-exclude�z&'%s' expects <pattern1> <pattern2> ...cSsg|]}t|��qSrr��.0�wrrr�
<listcomp>Wsz1FileList._parse_template_line.<locals>.<listcomp>r")�recursive-include�recursive-exclude�z,'%s' expects <dir> <pattern1> <pattern2> ...cSsg|]}t|��qSrrr-rrrr0]s)�graft�prunez#'%s' expects a single <dir_pattern>zunknown action '%s')rr%rr)r�lineZwords�action�patternsr�dir_patternrrr�_parse_template_lineLs0���zFileList._parse_template_linecCs@|�|�\}}}}|dkrV|�dd�|��|D]}|j|dd�s2t�d|�q2�n�|dkr�|�dd�|��|D]}|j|dd�svt�d	|�qv�n�|d
kr�|�dd�|��|D]}|j|dd�s�t�d
|�q��n^|dk�r(|�dd�|��|D]"}|j|dd��st�d|��q�n|dk�rv|�d|d�|�f�|D]$}|j||d��sNt�d||��qNn�|dk�r�|�d|d�|�f�|D]$}|j||d��s�t�d||��q�nx|dk�r�|�d|�|jd|d��s<t�d|�nB|dk�r0|�d|�|jd|d��s<t�d|�ntd|��dS)Nr(zinclude � r")�anchorz%warning: no files found matching '%s'r)zexclude z9warning: no previously-included files found matching '%s'r*zglobal-include rz>warning: no files found matching '%s' anywhere in distributionr+zglobal-exclude zRwarning: no previously-included files matching '%s' found anywhere in distributionr1zrecursive-include %s %s)�prefixz:warning: no files found matching '%s' under directory '%s'r2zrecursive-exclude %s %szNwarning: no previously-included files matching '%s' found under directory '%s'r4zgraft z+warning: no directories found matching '%s'r5zprune z6no previously-included directories found matching '%s'z'this cannot happen: invalid action '%s')r:r
r �include_patternrr�exclude_patternr)rr6r7r8rr9�patternrrr�process_template_linehs��
�
�

�
��

��

�
��zFileList.process_template_liner"rcCsld}t||||�}|�d|j�|jdkr4|��|jD],}|�|�r:|�d|�|j�|�d}q:|S)a�Select strings (presumably filenames) from 'self.files' that
        match 'pattern', a Unix-style wildcard (glob) pattern.  Patterns
        are not quite the same as implemented by the 'fnmatch' module: '*'
        and '?'  match non-special characters, where "special" is platform-
        dependent: slash on Unix; colon, slash, and backslash on
        DOS/Windows; and colon on Mac OS.

        If 'anchor' is true (the default), then the pattern match is more
        stringent: "*.py" will match "foo.py" but not "foo/bar.py".  If
        'anchor' is false, both of these will match.

        If 'prefix' is supplied, then only filenames starting with 'prefix'
        (itself a pattern) and ending with 'pattern', with anything in between
        them, will match.  'anchor' is ignored in this case.

        If 'is_regex' is true, 'anchor' and 'prefix' are ignored, and
        'pattern' is assumed to be either a string containing a regex or a
        regex object -- no translation is done, the regex is just compiled
        and used as-is.

        Selected strings will be added to self.files.

        Return True if files are found, False otherwise.
        Fz%include_pattern: applying regex r'%s'Nz adding T)�translate_patternr
r@r	r�searchr
r)rr@r<r=�is_regex�files_found�
pattern_re�namerrrr>�s�


zFileList.include_patterncCsrd}t||||�}|�d|j�tt|j�ddd�D]4}|�|j|�r8|�d|j|�|j|=d}q8|S)aRemove strings (presumably filenames) from 'files' that match
        'pattern'.  Other parameters are the same as for
        'include_pattern()', above.
        The list 'self.files' is modified in place.
        Return True if files are found, False otherwise.
        Fz%exclude_pattern: applying regex r'%s'r"r#z
 removing T)rBr
r@r$r%r
rC)rr@r<r=rDrErFr&rrrr?�s�zFileList.exclude_pattern)NN)r"Nr)r"Nr)�__name__�
__module__�__qualname__�__doc__rrr�curdirrr
rrr!r'r:rAr>r?rrrrrs 


	L
,�rcCs&dd�tj|dd�D�}ttjj|�S)z%
    Find all files under 'path'
    css,|]$\}}}|D]}tj�||�VqqdSr)rrr )r.�base�dirsr
�filerrr�	<genexpr>�s�z#_find_all_simple.<locals>.<genexpr>T)�followlinks)r�walk�filterr�isfile)rZresultsrrr�_find_all_simple�s�rUcCs6t|�}|tjkr.tjtjj|d�}t||�}t|�S)z�
    Find all files under 'dir' and return the list of full filenames.
    Unless dir is '.', return full filenames with dir prepended.
    )�start)	rUrrL�	functools�partialr�relpathr�list)rr
Zmake_relrrrrs


rcCs8t�|�}tj}tjdkrd}d|}t�d||�}|S)z�Translate a shell-like glob pattern to a regular expression; return
    a string containing the regex.  Differs from 'fnmatch.translate()' in
    that '*' does not match "special characters" (which are
    platform-specific).
    �\z\\\\z\1[^%s]z((?<!\\)(\\\\)*)\.)�fnmatch�	translater�sep�re�sub)r@rFr^Zescapedrrr�
glob_to_res

rar"c
Cs
|rt|t�rt�|�S|Std��d�\}}}|rVt|�}|�|�rP|�|�sZt�nd}|dk	r�t|�}|�|�r~|�|�s�t�|t	|�t	|�t	|��}t
j}	t
jdkr�d}	|t	|�t	|�t	|��}d|||	||f}n|�rd||t	|�d�f}t�|�S)aTranslate a shell-like wildcard pattern to a compiled regular
    expression.  Return the compiled regex.  If 'is_regex' true,
    then 'pattern' is directly compiled to a regex (if it's a string)
    or just returned as-is (assumes it's a regex object).
    �_�Nr[z\\z%s\A%s%s.*%s%sz%s\A%s)�
isinstance�strr_�compilera�	partition�
startswith�endswith�AssertionErrorr%rr^)
r@r<r=rDrVrb�endrFZ	prefix_rer^rrrrB%s*


rB)r"Nr)rKrr_r\rWZdistutils.utilrZdistutils.errorsrrZ	distutilsrrrUrLrrarBrrrr�<module>siPKX[�fIx��*__pycache__/file_util.cpython-38.opt-2.pycnu�[���U

e5d��@sVddlZddlmZddlmZdddd�Zdd	d
�Zddd
�Zddd�Zdd�Z	dS)�N)�DistutilsFileError)�logZcopyingzhard linkingzsymbolically linking)N�hard�sym�@c
Cs�d}d}�ztzt|d�}Wn4tk
rN}ztd||jf��W5d}~XYnXtj�|�r�zt�|�Wn4tk
r�}ztd||jf��W5d}~XYnXzt|d�}Wn4tk
r�}ztd||jf��W5d}~XYnXz|�	|�}Wn6tk
�r(}ztd||jf��W5d}~XYnX|�s4�q|z|�
|�Wq�tk
�rx}ztd||jf��W5d}~XYq�Xq�W5|�r�|��|�r�|��XdS)N�rbzcould not open '%s': %szcould not delete '%s': %s�wbzcould not create '%s': %szcould not read from '%s': %szcould not write to '%s': %s)�close�open�OSErrorr�strerror�os�path�exists�unlink�read�write)�src�dstZbuffer_sizeZfsrcZfdst�eZbuf�r�+/usr/lib64/python3.8/distutils/file_util.py�_copy_file_contentssL	$����r�cCsddlm}ddlm}	m}
m}m}tj�	|�s<t
d|��tj�|�rd|}
tj�|tj�
|��}ntj�|�}
|r�|||�s�|dkr�t�d|�|dfSzt|}Wn tk
r�td|��YnX|dk�rtj�
|�tj�
|�kr�t�d|||
�nt�d|||�|�r|dfS|d	k�rrtj�|��rBtj�||��s�zt�||�|dfWStk
�rnYnXn<|d
k�r�tj�|��r�tj�||��s�t�||�|dfSt||�|�s�|�rt�|�}|�r�t�|||	||
f�|�rt�||||��|dfS)Nr)�newer)�ST_ATIME�ST_MTIME�ST_MODE�S_IMODEz4can't copy '%s': doesn't exist or not a regular filerz"not copying %s (output up-to-date)z&invalid value '%s' for 'link' argumentz%s %s -> %srr)Zdistutils.dep_utilr�statrrrrr
r�isfiler�isdir�join�basename�dirnamer�debug�_copy_action�KeyError�
ValueError�infor�samefile�linkr�symlinkr�utime�chmod)rrZ
preserve_modeZpreserve_times�updater+�verbose�dry_runrrrrr�dir�action�strrr�	copy_fileCsV!�





r5cCs�ddlm}m}m}m}m}ddl}	|dkr:t�d||�|rB|S||�sVt	d|��||�rrt
j�|||��}n||�r�t	d||f��|||��s�t	d||f��d}
zt
�
||�WnPtk
�r
}z0|j\}}
||	jkr�d	}
nt	d
|||
f��W5d}~XYnX|
�r�t|||d�zt
�|�Wnhtk
�r�}zH|j\}}
zt
�|�Wntk
�rpYnXt	d||||
f��W5d}~XYnX|S)
Nr)rr r!r#r$rzmoving %s -> %sz#can't move '%s': not a regular filez0can't move '%s': destination '%s' already existsz2can't move '%s': destination '%s' not a valid pathFTzcouldn't move '%s' to '%s': %s)r0zAcouldn't move '%s' to '%s' by copy/delete: delete '%s' failed: %s)Zos.pathrr r!r#r$�errnorr)rr
rr"�renamer�argsZEXDEVr5r)rrr0r1rr r!r#r$r6Zcopy_itrZnum�msgrrr�	move_file�s`����

�

��r:cCs6t|d�}z|D]}|�|d�qW5|��XdS)N�w�
)r
r	r)�filename�contents�f�linerrr�
write_file�s

rA)r)rrrNrr)rr)
r
Zdistutils.errorsrZ	distutilsrr&rr5r:rArrrr�<module>s �
3�
d�
?PKX[I��%__pycache__/core.cpython-38.opt-2.pycnu�[���U

e5d�"�@s�ddlZddlZddlmZddlTddlmZddlmZddl	m
Z
ddlmZdZ
d	d
�ZdadadZdZd
d�Zddd�ZdS)�N)�DEBUG)�*)�Distribution)�Command)�
PyPIRCCommand)�	Extensionz�usage: %(script)s [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]
   or: %(script)s --help [cmd1 cmd2 ...]
   or: %(script)s --help-commands
   or: %(script)s cmd --help
cCstj�|�}tt�S)N)�os�path�basename�USAGE�vars)�script_nameZscript�r�&/usr/lib64/python3.8/distutils/core.py�	gen_usage sr)�	distclassr
�script_argsZoptions�name�versionZauthorZauthor_emailZ
maintainerZmaintainer_emailZurl�licenseZdescriptionZlong_description�keywordsZ	platformsZclassifiersZdownload_urlZrequiresZprovidesZ	obsoletes)rZsourcesZinclude_dirsZ
define_macrosZundef_macrosZlibrary_dirsZ	librariesZruntime_library_dirsZ
extra_objectsZextra_compile_argsZextra_link_argsZ	swig_optsZexport_symbolsZdependsZlanguagec
Ks|�d�}|r|d=nt}d|kr8tj�tjd�|d<d|krRtjdd�|d<z||�a}WnLtk
r�}z.d|kr�t	d|��nt	d|d|f��W5d}~XYnXt
d	kr�|S|��tr�t
d
�|��t
dkr�|Sz|��}Wn:tk
�r*}zt	t|j�d|��W5d}~XYnXt�rBt
d
�|��t
dk�rP|S|�rz|��Wn�tk
�r�t	d��Yn�tk
�r�}z.t�r�tj�d|f��nt	d|f��W5d}~XYnBttfk
�r}zt�r�nt	dt|���W5d}~XYnX|S)Nrr
rr�rzerror in setup command: %szerror in %s setup command: %s�initz%options (after parsing config files):�configz

error: %sz%options (after parsing command line):�commandlineZinterruptedz
error: %s
z	error: %szerror: )�getrrr	r
�sys�argv�_setup_distributionZDistutilsSetupError�
SystemExit�_setup_stop_afterZparse_config_filesr�printZdump_option_dictsZparse_command_lineZDistutilsArgErrorrr
Zrun_commands�KeyboardInterrupt�OSError�stderr�writeZDistutilsErrorZCCompilerError�str)�attrs�klassZdist�msg�ok�excrrr�setup9sd%

�(
�"r,�runc	Cs�|dkrtd|f��|atj��}d|i}zZzH|tjd<|dk	rP|tjdd�<t|d��}t|��|�W5QRXW5|t_daXWntk
r�YnXt	dkr�t
d|��t	S)N)rrrr-z"invalid value for 'stop_after': %r�__file__rr�rbzZ'distutils.core.setup()' was never called -- perhaps '%s' is not a Distutils setup script?)�
ValueErrorr rr�copy�open�exec�readrr�RuntimeError)r
rZ
stop_afterZ	save_argv�g�frrr�	run_setup�s*


�r8)Nr-)rrZdistutils.debugrZdistutils.errorsZdistutils.distrZ
distutils.cmdrZdistutils.configrZdistutils.extensionrrrr rZsetup_keywordsZextension_keywordsr,r8rrrr�<module>	s	qPKX[��(S��)__pycache__/filelist.cpython-38.opt-2.pycnu�[���U

e5d 2�@s�ddlZddlZddlZddlZddlmZddlmZmZddl	m
Z
Gdd�d�Zdd�Zej
fd	d
�Zdd�Zddd�ZdS)�N��convert_path)�DistutilsTemplateError�DistutilsInternalError)�logc@sxeZdZddd�Zdd�Zejfdd�Zdd	�Zd
d�Z	dd
�Z
dd�Zdd�Zdd�Z
dd�Zddd�Zddd�ZdS)�FileListNcCsd|_g|_dS�N)�allfiles�files)�self�warn�debug_print�r�*/usr/lib64/python3.8/distutils/filelist.py�__init__szFileList.__init__cCs
||_dSr)r	)rr	rrr�set_allfiles#szFileList.set_allfilescCst|�|_dSr)�findallr	)r�dirrrrr&szFileList.findallcCsddlm}|rt|�dS)Nr)�DEBUG)Zdistutils.debugr�print)r�msgrrrrr
)szFileList.debug_printcCs|j�|�dSr)r
�append)r�itemrrrr3szFileList.appendcCs|j�|�dSr)r
�extend)r�itemsrrrr6szFileList.extendcCs<tttjj|j��}g|_|D]}|j�tjj|��qdSr)�sorted�map�os�path�splitr
r�join)rZsortable_filesZ
sort_tuplerrr�sort9sz
FileList.sortcCs@tt|j�ddd�D]$}|j||j|dkr|j|=qdS)N�r���)�range�lenr
)r�irrr�remove_duplicatesCszFileList.remove_duplicatescCs�|��}|d}d}}}|dkrTt|�dkr<td|��dd�|dd�D�}n~|dkr�t|�d	krttd
|��t|d�}dd�|dd�D�}n:|dkr�t|�dkr�td
|��t|d�}ntd|��||||fS)Nr)�include�exclude�global-include�global-exclude�z&'%s' expects <pattern1> <pattern2> ...cSsg|]}t|��qSrr��.0�wrrr�
<listcomp>Wsz1FileList._parse_template_line.<locals>.<listcomp>r")�recursive-include�recursive-exclude�z,'%s' expects <dir> <pattern1> <pattern2> ...cSsg|]}t|��qSrrr-rrrr0]s)�graft�prunez#'%s' expects a single <dir_pattern>zunknown action '%s')rr%rr)r�lineZwords�action�patternsr�dir_patternrrr�_parse_template_lineLs0���zFileList._parse_template_linecCs@|�|�\}}}}|dkrV|�dd�|��|D]}|j|dd�s2t�d|�q2�n�|dkr�|�dd�|��|D]}|j|dd�svt�d	|�qv�n�|d
kr�|�dd�|��|D]}|j|dd�s�t�d
|�q��n^|dk�r(|�dd�|��|D]"}|j|dd��st�d|��q�n|dk�rv|�d|d�|�f�|D]$}|j||d��sNt�d||��qNn�|dk�r�|�d|d�|�f�|D]$}|j||d��s�t�d||��q�nx|dk�r�|�d|�|jd|d��s<t�d|�nB|dk�r0|�d|�|jd|d��s<t�d|�ntd|��dS)Nr(zinclude � r")�anchorz%warning: no files found matching '%s'r)zexclude z9warning: no previously-included files found matching '%s'r*zglobal-include rz>warning: no files found matching '%s' anywhere in distributionr+zglobal-exclude zRwarning: no previously-included files matching '%s' found anywhere in distributionr1zrecursive-include %s %s)�prefixz:warning: no files found matching '%s' under directory '%s'r2zrecursive-exclude %s %szNwarning: no previously-included files matching '%s' found under directory '%s'r4zgraft z+warning: no directories found matching '%s'r5zprune z6no previously-included directories found matching '%s'z'this cannot happen: invalid action '%s')r:r
r �include_patternrr�exclude_patternr)rr6r7r8rr9�patternrrr�process_template_linehs��
�
�

�
��

��

�
��zFileList.process_template_liner"rcCsld}t||||�}|�d|j�|jdkr4|��|jD],}|�|�r:|�d|�|j�|�d}q:|S)NFz%include_pattern: applying regex r'%s'z adding T)�translate_patternr
r@r	r�searchr
r)rr@r<r=�is_regex�files_found�
pattern_re�namerrrr>�s�


zFileList.include_patterncCsrd}t||||�}|�d|j�tt|j�ddd�D]4}|�|j|�r8|�d|j|�|j|=d}q8|S)NFz%exclude_pattern: applying regex r'%s'r"r#z
 removing T)rBr
r@r$r%r
rC)rr@r<r=rDrErFr&rrrr?�s�zFileList.exclude_pattern)NN)r"Nr)r"Nr)�__name__�
__module__�__qualname__rrr�curdirrr
rrr!r'r:rAr>r?rrrrrs


	L
,�rcCs&dd�tj|dd�D�}ttjj|�S)Ncss,|]$\}}}|D]}tj�||�VqqdSr)rrr )r.�base�dirsr
�filerrr�	<genexpr>�s�z#_find_all_simple.<locals>.<genexpr>T)�followlinks)r�walk�filterr�isfile)rZresultsrrr�_find_all_simple�s�rTcCs6t|�}|tjkr.tjtjj|d�}t||�}t|�S)N)�start)	rTrrK�	functools�partialr�relpathr�list)rr
Zmake_relrrrrs


rcCs8t�|�}tj}tjdkrd}d|}t�d||�}|S)N�\z\\\\z\1[^%s]z((?<!\\)(\\\\)*)\.)�fnmatch�	translater�sep�re�sub)r@rFr]Zescapedrrr�
glob_to_res

r`r"c
Cs�|rt|t�rt�|�S|Std��d�\}}}|r>t|�}nd}|dk	r�t|�}|t|�t|�t|��}tj}	tjdkr�d}	|t|�t|�t|��}d|||	||f}n|r�d||t|�d�f}t�|�S)N�_�rZz\\z%s\A%s%s.*%s%sz%s\A%s)	�
isinstance�strr^�compiler`�	partitionr%rr])
r@r<r=rDrUra�endrFZ	prefix_rer]rrrrB%s(


rB)r"Nr)rr^r[rVZdistutils.utilrZdistutils.errorsrrZ	distutilsrrrTrKrr`rBrrrr�<module>siPKX[��-���!__pycache__/errors.cpython-38.pycnu�[���U

e5d�
�@s8dZGdd�de�ZGdd�de�ZGdd�de�ZGdd�de�ZGd	d
�d
e�ZGdd�de�ZGd
d�de�ZGdd�de�Z	Gdd�de�Z
Gdd�de�ZGdd�de�ZGdd�de�Z
Gdd�de�ZGdd�de�ZGdd�de�ZGdd �d e�ZGd!d"�d"e�ZGd#d$�d$e�ZGd%d&�d&e�Zd'S)(a�distutils.errors

Provides exceptions used by the Distutils modules.  Note that Distutils
modules may raise standard exceptions; in particular, SystemExit is
usually raised for errors that are obviously the end-user's fault
(eg. bad command-line arguments).

This module is safe to use in "from ... import *" mode; it only exports
symbols whose names start with "Distutils" and end with "Error".c@seZdZdZdS)�DistutilsErrorzThe root of all Distutils evil.N��__name__�
__module__�__qualname__�__doc__�rr�(/usr/lib64/python3.8/distutils/errors.pyrsrc@seZdZdZdS)�DistutilsModuleErrorz�Unable to load an expected module, or to find an expected class
    within some module (in particular, command modules and classes).Nrrrrrr	sr	c@seZdZdZdS)�DistutilsClassErrorz�Some command class (or possibly distribution class, if anyone
    feels a need to subclass Distribution) is found not to be holding
    up its end of the bargain, ie. implementing some part of the
    "command "interface.Nrrrrrr
sr
c@seZdZdZdS)�DistutilsGetoptErrorz7The option table provided to 'fancy_getopt()' is bogus.Nrrrrrrsrc@seZdZdZdS)�DistutilsArgErrorzaRaised by fancy_getopt in response to getopt.error -- ie. an
    error in the command line usage.Nrrrrrrsrc@seZdZdZdS)�DistutilsFileErrorz�Any problems in the filesystem: expected file not found, etc.
    Typically this is for problems that we detect before OSError
    could be raised.Nrrrrrr
$sr
c@seZdZdZdS)�DistutilsOptionErrora�Syntactic/semantic errors in command options, such as use of
    mutually conflicting options, or inconsistent options,
    badly-spelled values, etc.  No distinction is made between option
    values originating in the setup script, the command line, config
    files, or what-have-you -- but if we *know* something originated in
    the setup script, we'll raise DistutilsSetupError instead.Nrrrrrr*src@seZdZdZdS)�DistutilsSetupErrorzqFor errors that can be definitely blamed on the setup script,
    such as invalid keyword arguments to 'setup()'.Nrrrrrr3src@seZdZdZdS)�DistutilsPlatformErrorz�We don't know how to do something on the current platform (but
    we do know how to do it on some platform) -- eg. trying to compile
    C files on a platform not supported by a CCompiler subclass.Nrrrrrr8src@seZdZdZdS)�DistutilsExecErrorz`Any problems executing an external program (such as the C
    compiler, when compiling C files).Nrrrrrr>src@seZdZdZdS)�DistutilsInternalErrorzoInternal inconsistencies or impossibilities (obviously, this
    should never be seen if the code is working!).NrrrrrrCsrc@seZdZdZdS)�DistutilsTemplateErrorz%Syntax error in a file list template.NrrrrrrHsrc@seZdZdZdS)�DistutilsByteCompileErrorzByte compile error.NrrrrrrKsrc@seZdZdZdS)�CCompilerErrorz#Some compile/link operation failed.NrrrrrrOsrc@seZdZdZdS)�PreprocessErrorz.Failure to preprocess one or more C/C++ files.NrrrrrrRsrc@seZdZdZdS)�CompileErrorz2Failure to compile one or more C/C++ source files.NrrrrrrUsrc@seZdZdZdS)�LibErrorzKFailure to create a static library from one or more C/C++ object
    files.NrrrrrrXsrc@seZdZdZdS)�	LinkErrorz]Failure to link one or more C/C++ object files into an executable
    or shared library file.Nrrrrrr\src@seZdZdZdS)�UnknownFileErrorz(Attempt to process an unknown file type.Nrrrrrr`srN)r�	Exceptionrr	r
rrr
rrrrrrrrrrrrrrrrr�<module>s&
	PKX[�z�%��)__pycache__/__init__.cpython-38.opt-1.pycnu�[���U

e5d��@s&dZddlZejdej�d��ZdS)z�distutils

The main package for the Python Module Distribution Utilities.  Normally
used from a setup script as

   from distutils.core import setup

   setup (...)
�N� )�__doc__�sys�version�index�__version__�rr�*/usr/lib64/python3.8/distutils/__init__.py�<module>s
PKX[O�

*__pycache__/extension.cpython-38.opt-1.pycnu�[���U

e5d)�@s.dZddlZddlZGdd�d�Zdd�ZdS)zmdistutils.extension

Provides the Extension class, used to describe C/C++ extension
modules in setup scripts.�Nc@s"eZdZdZddd�Zdd�ZdS)�	Extensiona�Just a collection of attributes that describes an extension
    module and everything needed to build it (hopefully in a portable
    way, but there are hooks that let you be as unportable as you need).

    Instance attributes:
      name : string
        the full name of the extension, including any packages -- ie.
        *not* a filename or pathname, but Python dotted name
      sources : [string]
        list of source filenames, relative to the distribution root
        (where the setup script lives), in Unix form (slash-separated)
        for portability.  Source files may be C, C++, SWIG (.i),
        platform-specific resource files, or whatever else is recognized
        by the "build_ext" command as source for a Python extension.
      include_dirs : [string]
        list of directories to search for C/C++ header files (in Unix
        form for portability)
      define_macros : [(name : string, value : string|None)]
        list of macros to define; each macro is defined using a 2-tuple,
        where 'value' is either the string to define it to or None to
        define it without a particular value (equivalent of "#define
        FOO" in source or -DFOO on Unix C compiler command line)
      undef_macros : [string]
        list of macros to undefine explicitly
      library_dirs : [string]
        list of directories to search for C/C++ libraries at link time
      libraries : [string]
        list of library names (not filenames or paths) to link against
      runtime_library_dirs : [string]
        list of directories to search for C/C++ libraries at run time
        (for shared extensions, this is when the extension is loaded)
      extra_objects : [string]
        list of extra files to link with (eg. object files not implied
        by 'sources', static library that must be explicitly specified,
        binary resource files, etc.)
      extra_compile_args : [string]
        any extra platform- and compiler-specific information to use
        when compiling the source files in 'sources'.  For platforms and
        compilers where "command line" makes sense, this is typically a
        list of command-line arguments, but for other platforms it could
        be anything.
      extra_link_args : [string]
        any extra platform- and compiler-specific information to use
        when linking object files together to create the extension (or
        to create a new static Python interpreter).  Similar
        interpretation as for 'extra_compile_args'.
      export_symbols : [string]
        list of symbols to be exported from a shared extension.  Not
        used on all platforms, and not generally necessary for Python
        extensions, which typically export exactly one symbol: "init" +
        extension_name.
      swig_opts : [string]
        any extra options to pass to SWIG if a source file has the .i
        extension.
      depends : [string]
        list of files that the extension depends on
      language : string
        extension language (i.e. "c", "c++", "objc"). Will be detected
        from the source extensions if not provided.
      optional : boolean
        specifies that a build failure in the extension should not abort the
        build process, but simply not install the failing extension.
    NcKst|t�std��t|t�r.tdd�|D��s6td��||_||_|pHg|_|pRg|_|p\g|_	|pfg|_
|ppg|_|pzg|_|	p�g|_
|
p�g|_|p�g|_|p�g|_|
p�g|_|p�g|_||_||_t|�dk�rdd�|D�}d�t|��}d	|}t�|�dS)
Nz'name' must be a stringcss|]}t|t�VqdS)N)�
isinstance�str)�.0�v�r�+/usr/lib64/python3.8/distutils/extension.py�	<genexpr>jsz%Extension.__init__.<locals>.<genexpr>z#'sources' must be a list of stringsrcSsg|]}t|��qSr)�repr)rZoptionrrr�
<listcomp>�sz&Extension.__init__.<locals>.<listcomp>z, zUnknown Extension options: %s)rr�AssertionError�list�all�name�sources�include_dirs�
define_macros�undef_macros�library_dirs�	libraries�runtime_library_dirs�
extra_objects�extra_compile_args�extra_link_args�export_symbols�	swig_opts�depends�language�optional�len�join�sorted�warnings�warn)�selfrrrrrrrrrrrrrrrr�kwZoptions�msgrrr�__init__Vs6

�











zExtension.__init__cCsd|jj|jj|jt|�fS)Nz<%s.%s(%r) at %#x>)�	__class__�
__module__�__qualname__r�id)r$rrr�__repr__�s�zExtension.__repr__)NNNNNNNNNNNNNN)�__name__r)r*�__doc__r'r,rrrrrs"C�
/rcCs�ddlm}m}m}ddlm}ddlm}||�}||dddddd�}�z^g}|�	�}	|	dkrd�q�|�
|	�rpqP|	d|	dkr�d	kr�nn|�d
|	�qP||	|�}	||	�}
|
d}t|g�}d}
|
dd�D�]�}|
dk	r�|
�
|�d}
q�tj�|�d}|dd�}|dd�}|dk�r2|j�
|�q�|d
k�rJ|j�
|�q�|dk�r�|�d�}|dk�rz|j�
|df�n$|j�
|d|�||dd�f�q�|dk�r�|j�
|�q�|dk�r�|j�
|�q�|dk�r�|j�
|�q�|dk�r|j�
|�q�|dk�r|j�
|�q�|dk�r*|j}
q�|dk�r<|j}
q�|dk�rN|j}
q�|dk�rr|j�
|�|�s�|j}
q�|dk�r�|j�
|�q�|�d|�q�|�
|�qPW5|��X|S)z3Reads a Setup file and returns Extension instances.r)�parse_makefile�expand_makefile_vars�_variable_rx)�TextFile)�split_quoted�)Zstrip_commentsZskip_blanksZ
join_linesZ	lstrip_wsZ	rstrip_wsN����*z'%s' lines not handled yet�)z.cz.ccz.cppz.cxxz.c++z.mz.mmz-Iz-D�=z-Uz-Cz-lz-Lz-Rz-rpathz-Xlinkerz
-Xcompilerz-u)z.az.soz.slz.oz.dylibzunrecognized argument '%s')Zdistutils.sysconfigr/r0r1Zdistutils.text_filer2Zdistutils.utilr3�close�readline�matchr#r�append�os�path�splitextrr�findrrrrrrrr)�filenamer/r0r1r2r3�vars�file�
extensions�lineZwords�moduleZextZappend_next_wordZword�suffixZswitch�valueZequalsrrr�read_setup_file�s��
 







�










rI)r.r=r"rrIrrrr�<module>szPKX[xQ%udd(__pycache__/version.cpython-38.opt-1.pycnu�[���U

e5d90�@s>dZddlZGdd�d�ZGdd�de�ZGdd�de�ZdS)	a�Provides classes to represent module version numbers (one class for
each style of version numbering).  There are currently two such classes
implemented: StrictVersion and LooseVersion.

Every version number class implements the following interface:
  * the 'parse' method takes a string and parses it to some internal
    representation; if the string is an invalid version number,
    'parse' raises a ValueError exception
  * the class constructor takes an optional string argument which,
    if supplied, is passed to 'parse'
  * __str__ reconstructs the string that was passed to 'parse' (or
    an equivalent string -- ie. one that will generate an equivalent
    version number instance)
  * __repr__ generates Python code to recreate the version number instance
  * _cmp compares the current instance with either another instance
    of the same class or a string (which will be parsed to an instance
    of the same class, thus must follow the same rules)
�Nc@sJeZdZdZddd�Zdd�Zdd�Zd	d
�Zdd�Zd
d�Z	dd�Z
dS)�Versionz�Abstract base class for version numbering classes.  Just provides
    constructor (__init__) and reproducer (__repr__), because those
    seem to be the same for all version numbering classes; and route
    rich comparisons to _cmp.
    NcCs|r|�|�dS�N��parse��self�vstring�r	�)/usr/lib64/python3.8/distutils/version.py�__init__&szVersion.__init__cCsd|jjt|�fS)Nz	%s ('%s'))�	__class__�__name__�str�rr	r	r
�__repr__*szVersion.__repr__cCs|�|�}|tkr|S|dkS�Nr��_cmp�NotImplemented�r�other�cr	r	r
�__eq__-s
zVersion.__eq__cCs|�|�}|tkr|S|dkSrrrr	r	r
�__lt__3s
zVersion.__lt__cCs|�|�}|tkr|S|dkSrrrr	r	r
�__le__9s
zVersion.__le__cCs|�|�}|tkr|S|dkSrrrr	r	r
�__gt__?s
zVersion.__gt__cCs|�|�}|tkr|S|dkSrrrr	r	r
�__ge__Es
zVersion.__ge__)N)r
�
__module__�__qualname__�__doc__rrrrrrrr	r	r	r
rs
rc@s<eZdZdZe�dejejB�Zdd�Z	dd�Z
dd�Zd	S)
�
StrictVersiona?Version numbering for anal retentives and software idealists.
    Implements the standard interface for version number classes as
    described above.  A version number consists of two or three
    dot-separated numeric components, with an optional "pre-release" tag
    on the end.  The pre-release tag consists of the letter 'a' or 'b'
    followed by a number.  If the numeric components of two version
    numbers are equal, then one with a pre-release tag will always
    be deemed earlier (lesser) than one without.

    The following are valid version numbers (shown in the order that
    would be obtained by sorting according to the supplied cmp function):

        0.4       0.4.0  (these two are equivalent)
        0.4.1
        0.5a1
        0.5b3
        0.5
        0.9.6
        1.0
        1.0.4a3
        1.0.4b1
        1.0.4

    The following are examples of invalid version numbers:

        1
        2.7.2.2
        1.3.a4
        1.3pl1
        1.3c4

    The rationale for this version numbering system will be explained
    in the distutils documentation.
    z)^(\d+) \. (\d+) (\. (\d+))? ([ab](\d+))?$cCs�|j�|�}|std|��|�ddddd�\}}}}}|rTttt|||g��|_nttt||g��d|_|r�|dt|�f|_nd|_dS)	Nzinvalid version number '%s'�����)rr)	�
version_re�match�
ValueError�group�tuple�map�int�version�
prerelease)rrr'�major�minorZpatchr.Zprerelease_numr	r	r
r�s�zStrictVersion.parsecCsb|jddkr*d�tt|jdd���}nd�tt|j��}|jr^||jdt|jd�}|S)Nr"r�.r!)r-�joinr+rr.rr	r	r
�__str__�szStrictVersion.__str__cCs�t|t�rt|�}|j|jkr2|j|jkr.dSdS|jsB|jsBdS|jrR|jsRdS|jsb|jrbdS|jr�|jr�|j|jkr~dS|j|jkr�dSdSndS)N���r!r)�
isinstancerr r-r.�rrr	r	r
r�s&
zStrictVersion._cmpN)r
rrr�re�compile�VERBOSE�ASCIIr&rr3rr	r	r	r
r ]s#
�
r c@sHeZdZdZe�dej�Zddd�Zdd�Z	dd	�Z
d
d�Zdd
�ZdS)�LooseVersiona�Version numbering for anarchists and software realists.
    Implements the standard interface for version number classes as
    described above.  A version number consists of a series of numbers,
    separated by either periods or strings of letters.  When comparing
    version numbers, the numeric components will be compared
    numerically, and the alphabetic components lexically.  The following
    are all valid version numbers, in no particular order:

        1.5.1
        1.5.2b2
        161
        3.10a
        8.02
        3.4j
        1996.07.12
        3.2.pl0
        3.1.1.6
        2g6
        11g
        0.960923
        2.2beta29
        1.13++
        5.5.kw
        2.0b1pl0

    In fact, there is no such thing as an invalid version number under
    this scheme; the rules for comparison are simple and predictable,
    but may not always give the results you want (for some definition
    of "want").
    z(\d+ | [a-z]+ | \.)NcCs|r|�|�dSrrrr	r	r
r.szLooseVersion.__init__c	Cs^||_dd�|j�|�D�}t|�D].\}}zt|�||<Wq$tk
rPYq$Xq$||_dS)NcSsg|]}|r|dkr|�qS)r1r	)�.0�xr	r	r
�
<listcomp>8s�z&LooseVersion.parse.<locals>.<listcomp>)r�component_re�split�	enumerater,r(r-)rrZ
components�i�objr	r	r
r3szLooseVersion.parsecCs|jSr)rrr	r	r
r3CszLooseVersion.__str__cCsdt|�S)NzLooseVersion ('%s'))rrr	r	r
rGszLooseVersion.__repr__cCsFt|t�rt|�}|j|jkr"dS|j|jkr2dS|j|jkrBdSdS)Nrr4r!)r5rr;r-r6r	r	r
rKs
zLooseVersion._cmp)N)
r
rrrr7r8r9r?rrr3rrr	r	r	r
r;s
r;)rr7rr r;r	r	r	r
�<module>
s
>/PKX[�{<���-__pycache__/archive_util.cpython-38.opt-1.pycnu�[���U

e5d|!�@sDdZddlZddlmZddlZzddlZWnek
rDdZYnXddlmZddl	m
Z
ddlmZddl
mZzddlmZWnek
r�dZYnXzdd	lmZWnek
r�dZYnXd
d�Zdd
�Zd#dd�Zd$dd�Zedgdfedgdfedgdfedgdfedgdfegdfd�Zdd �Zd%d!d"�ZdS)&zodistutils.archive_util

Utility functions for creating archive files (tarballs, zip files,
that sort of thing).�N)�warn)�DistutilsExecError)�spawn)�mkpath)�log)�getpwnam)�getgrnamcCsNtdks|dkrdSzt|�}Wntk
r8d}YnX|dk	rJ|dSdS)z"Returns a gid, given a group name.N�)r�KeyError��name�result�r�./usr/lib64/python3.8/distutils/archive_util.py�_get_gids
rcCsNtdks|dkrdSzt|�}Wntk
r8d}YnX|dk	rJ|dSdS)z"Returns an uid, given a user name.Nr	)rr
rrrr�_get_uid+s
r�gzipcs.dddddd�}dddd	d
�}|dk	r:||��kr:td��|d
}	|dkrZ|	|�|d�7}	ttj�|	�|d�ddl}
t�	d�t
���t�������fdd�}|s�|
�|	d||�}z|j||d�W5|�
�X|dk�r*tdt�|	||}
tjdk�r||	|
g}n
|d|	g}t||d�|
S|	S)a=Create a (possibly compressed) tar file from all the files under
    'base_dir'.

    'compress' must be "gzip" (the default), "bzip2", "xz", "compress", or
    None.  ("compress" will be deprecated in Python 3.2)

    'owner' and 'group' can be used to define an owner and a group for the
    archive that is being built. If not provided, the current owner and group
    will be used.

    The output tar file will be named 'base_dir' +  ".tar", possibly plus
    the appropriate compression extension (".gz", ".bz2", ".xz" or ".Z").

    Returns the output filename.
    Zgz�bz2�xz�)r�bzip2rN�compressz.gzz.bz2z.xzz.Z)rrrrNzKbad value for 'compress': must be None, 'gzip', 'bzip2', 'xz' or 'compress'z.tarr��dry_runrzCreating tar archivecs,�dk	r�|_�|_�dk	r(�|_�|_|S)N)�gidZgname�uid�uname)Ztarinfo�r�group�ownerrrr�_set_uid_gidasz"make_tarball.<locals>._set_uid_gidzw|%s)�filterz'compress' will be deprecated.Zwin32z-f)�keys�
ValueError�getr�os�path�dirname�tarfiler�inforr�open�close�addr�PendingDeprecationWarning�sys�platformr)�	base_name�base_dirr�verboserrrZtar_compressionZcompress_extZarchive_namer(r �tarZcompressed_name�cmdrrr�make_tarball7sB���
	



r5c
Cs�|d}ttj�|�|d�tdkrp|r.d}nd}ztd|||g|d�Wn tk
rjtd|��YnX�n8t�d||�|�s�ztj	|d	tj
d
�}Wn&tk
r�tj	|d	tjd
�}YnX|��|tj
k�rtj�tj�|d��}|�||�t�d|�t�|�D]�\}}	}
|	D]6}tj�tj�||d��}|�||�t�d|��q|
D]B}tj�tj�||��}tj�|��rV|�||�t�d|��qV�qW5QRX|S)
avCreate a zip file from all the files under 'base_dir'.

    The output zip file will be named 'base_name' + ".zip".  Uses either the
    "zipfile" Python module (if available) or the InfoZIP "zip" utility
    (if installed and found on the default search path).  If neither tool is
    available, raises DistutilsExecError.  Returns the name of the output zip
    file.
    z.ziprNz-rz-rq�zipzkunable to create zip file '%s': could neither import the 'zipfile' module nor find a standalone zip utilityz#creating '%s' and adding '%s' to it�w)Zcompressionrzadding '%s')rr%r&r'�zipfilerrrr)ZZipFileZZIP_DEFLATED�RuntimeErrorZ
ZIP_STORED�curdir�normpath�join�write�walk�isfile)r0r1r2rZzip_filenameZ
zipoptionsr6r&�dirpathZdirnames�	filenamesrrrr�make_zipfilesV	�
���
�rB)rrzgzip'ed tar-file)rrzbzip2'ed tar-file)rrzxz'ed tar-file)rrzcompressed tar file)rNzuncompressed tar filezZIP file)ZgztarZbztarZxztarZztarr3r6cCs|D]}|tkr|SqdS)zqReturns the first format from the 'format' list that is unknown.

    If all formats are known, returns None
    N)�ARCHIVE_FORMATS)Zformats�formatrrr�check_archive_formats�s
rEc
Cs�t��}|dk	r6t�d|�tj�|�}|s6t�|�|dkrDtj}d|i}	zt|}
Wn t	k
rxt
d|��YnX|
d}|
dD]\}}
|
|	|<q�|dkr�||	d<||	d	<z|||f|	�}W5|dk	r�t�d
|�t�|�X|S)a�Create an archive file (eg. zip or tar).

    'base_name' is the name of the file to create, minus any format-specific
    extension; 'format' is the archive format: one of "zip", "tar", "gztar",
    "bztar", "xztar", or "ztar".

    'root_dir' is a directory that will be the root directory of the
    archive; ie. we typically chdir into 'root_dir' before creating the
    archive.  'base_dir' is the directory where we start archiving from;
    ie. 'base_dir' will be the common prefix of all files and
    directories in the archive.  'root_dir' and 'base_dir' both default
    to the current directory.  Returns the name of the archive file.

    'owner' and 'group' are used when creating a tar archive. By default,
    uses the current owner and group.
    Nzchanging into '%s'rzunknown archive format '%s'r�r6rrzchanging back to '%s')r%�getcwdr�debugr&�abspath�chdirr:rCr
r#)r0rDZroot_dirr1r2rrrZsave_cwd�kwargsZformat_info�func�arg�val�filenamerrr�make_archive�s2

rP)rrrNN)rr)NNrrNN)�__doc__r%�warningsrr.r8�ImportErrorZdistutils.errorsrZdistutils.spawnrZdistutils.dir_utilrZ	distutilsr�pwdrZgrprrrr5rBrCrErPrrrr�<module>sN


�
H
=




�	
�PKX[�
�,JJ(__pycache__/unixccompiler.cpython-38.pycnu�[���U

&�.e�;�@s�dZddlZddlZddlZddlmZddlmZddlm	Z	m
Z
mZddlm
Z
mZmZmZddlmZejdkr~ddlZGd	d
�d
e	�ZdS)a9distutils.unixccompiler

Contains the UnixCCompiler class, a subclass of CCompiler that handles
the "typical" Unix-style command-line C compiler:
  * macros defined with -Dname[=value]
  * macros undefined with -Uname
  * include search directories specified with -Idir
  * libraries specified with -lllib
  * library search directories specified with -Ldir
  * compile handled by 'cc' (or similar) executable with -c option:
    compiles .c to .o
  * link static library handled by 'ar' command (possibly with 'ranlib')
  * link shared library handled by 'cc -shared'
�N)�	sysconfig)�newer)�	CCompiler�gen_preprocess_options�gen_lib_options)�DistutilsExecError�CompileError�LibError�	LinkError)�log�darwinc
s�eZdZdZddgdgdgddgdgddgdd�Zejdd�d	krNd
ged
<ddd
dddgZdZdZ	dZ
dZdZdZ
ZZeZejdkr�dZ�fdd�Zd.dd�Zdd�Zd/d d!�Zd0d"d#�Zd$d%�Zd&d'�Zd(d)�Zd*d+�Zd1d,d-�Z�ZS)2�
UnixCCompilerZunixNZccz-sharedZarz-cr)�preprocessor�compiler�compiler_so�compiler_cxx�	linker_so�
linker_exe�archiver�ranlib�rrz.cz.Cz.ccz.cxxz.cppz.mz.oz.az.soz.dylibz.tbdzlib%s%s�cygwinz.execs@t��|||�\}}}t�d�}|r6||kr6|�|�|||fS)z'Remove standard library path from rpathZLIBDIR)�super�
_fix_lib_argsr�get_config_var�remove)�self�	libraries�library_dirs�runtime_library_dirsZlibdir��	__class__��//usr/lib64/python3.8/distutils/unixccompiler.pyrUs�


zUnixCCompiler._fix_lib_argsc
Cs�|�d||�}|\}}}t||�}	|j|	}
|r>|
�d|g�|rN||
dd�<|r\|
�|�|
�|�|js~|dks~t||�r�|r�|�tj	�
|��z|�|
�Wn*tk
r�}zt
|��W5d}~XYnXdS)N�-or)Z_fix_compile_argsrr�extend�appendZforcer�mkpath�os�path�dirname�spawnrr)r�sourceZoutput_fileZmacrosZinclude_dirs�
extra_preargs�extra_postargs�
fixed_args�ignore�pp_optsZpp_args�msgr"r"r#�
preprocess^s$




zUnixCCompiler.preprocessc	
Csp|j}tjdkr t�|||�}z |�|||d|g|�Wn*tk
rj}zt|��W5d}~XYnXdS)Nrr$)r�sys�platform�_osx_support�compiler_fixupr+rr)	r�obj�srcZextZcc_argsr.r1rr2r"r"r#�_compilexs
��
zUnixCCompiler._compilerc
Cs�|�||�\}}|j||d�}|�||�r�|�tj�|��|�|j|g||j	�|j
r�z|�|j
|g�Wq�tk
r�}zt|��W5d}~XYq�Xnt
�d|�dS)N)�
output_dir�skipping %s (up-to-date))�_fix_object_args�library_filename�
_need_linkr'r(r)r*r+r�objectsrrr	r�debug)rr@Zoutput_libnamer;rA�target_lang�output_filenamer2r"r"r#�create_static_lib�s$����	zUnixCCompiler.create_static_libc
Cs�|�||�\}}|�|||�}|\}}}t||||�}t|ttd�f�sPtd��|dk	rftj�	||�}|�
||��r�||j|d|g}|	r�dg|dd�<|
r�|
|dd�<|r�|�|�|�
tj�|��z�|tjkr�|jdd�}n|jdd�}|
dk�rr|j�rrd}tj�|d�dk�r@d}d||k�r@|d7}�q&tj�||�d	k�r\d}nd}|j||||<tjd
k�r�t�||�}|�||�Wn,tk
�r�}zt|��W5d}~XYnXnt�d|�dS)Nz%'output_dir' must be a string or Noner$z-grzc++�env��=Z	ld_so_aixrr<)r=rr�
isinstance�str�type�	TypeErrorr(r)�joinr?r@r%r'r*rZ
EXECUTABLErrr�basenamer4r5r6r7r+rr
rrA)rZtarget_descr@rCr;rrrZexport_symbolsrAr-r.Z
build_temprBr/Zlib_optsZld_argsZlinker�i�offsetr2r"r"r#�link�sZ�
���

zUnixCCompiler.linkcCsd|S)N�-Lr")r�dirr"r"r#�library_dir_option�sz UnixCCompiler.library_dir_optioncCsd|kpd|kS)NZgcczg++r")rZ
compiler_namer"r"r#�_is_gcc�szUnixCCompiler._is_gcccCs�tj�t�d��}tjdd�dkr,d|Stjdd�dkrFd|Stjdd�d	krz|�|�rnd
d|gSdd|gS|�|�r�t�d�d
kr�d|Sd|Snd|SdS)N�CCrrrQ�Zfreebsdz-Wl,-rpath=�zhp-uxz-Wl,+sz+sZGNULDZyesz-Wl,--enable-new-dtags,-Rz-Wl,-Rz-R)r(r)rMrrr4r5rT)rrRrr"r"r#�runtime_library_dir_option�s


z(UnixCCompiler.runtime_library_dir_optioncCsd|S)Nz-lr")r�libr"r"r#�library_optionszUnixCCompiler.library_optioncCs�|j|dd�}|j|dd�}|j|dd�}|j|dd�}tjdkr|t�d�}t�d|�}	|	dkrrt�t�d	��}
n
|	�	d
�}
|D�] }t
j�||�}t
j�||�}
t
j�||�}t
j�||�}tjdk�rL|�
d�s�|�
d��rL|�
d
��sLt
j�|
|d
d�|�}t
j�|
|d
d�|�}
t
j�|
|d
d�|�}t
j�|
|d
d�|�}t
j�|
��rb|
St
j�|��rx|St
j�|��r�|St
j�|�r�|Sq�dS)N�shared)Zlib_type�dylib�
xcode_stub�staticrZCFLAGSz-isysroot\s*(\S+)rUrFz/System/z/usr/z/usr/local/)r>r4r5rr�re�searchr6Z_default_sysroot�groupr(r)rL�
startswith�exists)r�dirsrYrAZshared_fZdylib_fZxcode_stub_fZstatic_fZcflags�mZsysrootrRr[r\r^r]r"r"r#�find_library_filesF



���
zUnixCCompiler.find_library_file)NNNNN)NrN)
NNNNNrNNNN)r)�__name__�
__module__�__qualname__Z
compiler_typeZexecutablesr4r5Zsrc_extensionsZ
obj_extensionZstatic_lib_extensionZshared_lib_extensionZdylib_lib_extensionZxcode_stub_lib_extensionZstatic_lib_formatZshared_lib_formatZdylib_lib_formatZxcode_stub_lib_formatZ
exe_extensionrr3r:rDrPrSrTrXrZrf�
__classcell__r"r"r r#r
-sb�


	�
�
�
B*r
)�__doc__r(r4r_Z	distutilsrZdistutils.dep_utilrZdistutils.ccompilerrrrZdistutils.errorsrrr	r
rr5r6r
r"r"r"r#�<module>s
PKX[��))-__pycache__/fancy_getopt.cpython-38.opt-1.pycnu�[���U

e5dxE�@s�dZddlZddlZddlZddlZddlTdZe�de�Ze�deef�Z	e
�dd�ZGd	d
�d
�Z
dd�Zd
d�ejD�Zdd�Zdd�ZGdd�d�Zedkr�dZdD]*Zede�ed�eee���e�q�dS)a6distutils.fancy_getopt

Wrapper around the standard getopt module that provides the following
additional features:
  * short and long options are tied together
  * options have help strings, so fancy_getopt could potentially
    create a complete usage summary
  * options set attributes of a passed-in object
�N)�*z[a-zA-Z](?:[a-zA-Z0-9-]*)z^%s$z^(%s)=!(%s)$�-�_c@s�eZdZdZddd�Zdd�Zdd�Zd d	d
�Zdd�Zd
d�Z	dd�Z
dd�Zdd�Zdd�Z
d!dd�Zdd�Zd"dd�Zd#dd�ZdS)$�FancyGetopta�Wrapper around the standard 'getopt()' module that provides some
    handy extra functionality:
      * short and long options are tied together
      * options have help strings, and help text can be assembled
        from them
      * options set attributes of a passed-in object
      * boolean options can have "negative aliases" -- eg. if
        --quiet is the "negative alias" of --verbose, then "--quiet"
        on the command line sets 'verbose' to false
    NcCsN||_i|_|jr|��i|_i|_g|_g|_i|_i|_i|_	g|_
dS�N)�option_table�option_index�_build_index�alias�negative_alias�
short_opts�	long_opts�
short2long�	attr_name�	takes_arg�option_order��selfr�r�./usr/lib64/python3.8/distutils/fancy_getopt.py�__init__)s	zFancyGetopt.__init__cCs(|j��|jD]}||j|d<qdS)Nr)r�clearr)r�optionrrrr	Qs

zFancyGetopt._build_indexcCs||_|��dSr)rr	rrrr�set_option_tableVszFancyGetopt.set_option_tablecCs<||jkrtd|��n |||f}|j�|�||j|<dS)Nz'option conflict: already an option '%s')r�DistutilsGetoptErrorr�append)r�long_optionZshort_optionZhelp_stringrrrr�
add_optionZs
�
zFancyGetopt.add_optioncCs
||jkS)zcReturn true if the option table for this parser has an
        option with long name 'long_option'.)r�rrrrr�
has_optioncszFancyGetopt.has_optioncCs
|�t�S)z�Translate long option name 'long_option' to the form it
        has as an attribute of some object: ie., translate hyphens
        to underscores.��	translate�
longopt_xlaterrrr�
get_attr_namehszFancyGetopt.get_attr_namecCsN|��D]@\}}||jkr,td|||f��||jkrtd|||f��qdS)Nz(invalid %s '%s': option '%s' not definedz0invalid %s '%s': aliased option '%s' not defined)�itemsrr)r�aliasesZwhatr
�optrrr�_check_alias_dictns
�
�zFancyGetopt._check_alias_dictcCs|�|d�||_dS)z'Set the aliases for this option parser.r
N)r'r
)rr
rrr�set_aliasesxszFancyGetopt.set_aliasescCs|�|d�||_dS)z�Set the negative aliases for this option parser.
        'negative_alias' should be a dictionary mapping option names to
        option names, both the key and value must already be defined
        in the option table.znegative aliasN)r'r)rrrrr�set_negative_aliases}sz FancyGetopt.set_negative_aliasescCs�g|_g|_|j��i|_|jD�]�}t|�dkrD|\}}}d}n(t|�dkr^|\}}}}ntd|f��t|t	�r�t|�dkr�t
d|��|dks�t|t	�r�t|�dks�t
d	|��||j|<|j�|�|d
dkr�|r�|d}|dd
�}d|j|<nF|j
�|�}|dk	�r:|j|�r0t
d
||f��||jd
<d|j|<|j�|�}|dk	�r�|j||j|k�r�t
d||f��t�|��s�t
d|��|�|�|j|<|r"|j�|�||j|d<q"dS)z�Populate the various data structures that keep tabs on the
        option table.  Called by 'getopt()' before it can do anything
        worthwhile.
        �r�zinvalid option tuple: %r�z9invalid long option '%s': must be a string of length >= 2N�z:invalid short option '%s': must a single character or None����=�:z>invalid negative alias '%s': aliased option '%s' takes a valuezginvalid alias '%s': inconsistent with aliased option '%s' (one of them takes a value, the other doesn'tzEinvalid long option name '%s' (must be letters, numbers, hyphens only)r
rrr�repeatr�len�
ValueError�
isinstance�strrrrr�getr
�
longopt_re�matchr#r)rr�long�short�helpr1Zalias_torrr�_grok_option_table�st

��
��

��


��
��zFancyGetopt._grok_option_tablec
Csn|dkrtjdd�}|dkr*t�}d}nd}|��d�|j�}zt�|||j�\}}Wn,tjk
r�}zt	|��W5d}~XYnX|D]�\}}t
|�dkr�|ddkr�|j|d}n|dd�}|j�
|�}	|	r�|	}|j|�s|j�
|�}	|	�r|	}d}nd}|j|}
|�r:|j�
|
�dk	�r:t||
d�d}t||
|�|j�||f�q�|�rf||fS|SdS)	aParse command-line options in args. Store as attributes on object.

        If 'args' is None or not supplied, uses 'sys.argv[1:]'.  If
        'object' is None or not supplied, creates a new OptionDummy
        object, stores option values there, and returns a tuple (args,
        object).  If 'object' is supplied, it is modified in place and
        'getopt()' just returns 'args'; in both cases, the returned
        'args' is a modified copy of the passed-in 'args' list, which
        is left untouched.
        Nr-TF� r,rr)�sys�argv�OptionDummyr<�joinr�getoptr
�errorZDistutilsArgErrorr2rr
r6rrrr1�getattr�setattrrr)r�args�objectZcreated_objectrZopts�msgr&�valr
�attrrrrrB�sB
zFancyGetopt.getoptcCs|jdkrtd��n|jSdS)z�Returns the list of (option, value) tuples processed by the
        previous run of 'getopt()'.  Raises RuntimeError if
        'getopt()' hasn't been called yet.
        Nz!'getopt()' hasn't been called yet)r�RuntimeError)rrrr�get_option_orders

zFancyGetopt.get_option_ordercCsjd}|jD]L}|d}|d}t|�}|ddkr:|d}|dk	rJ|d}||kr
|}q
|ddd}d}||}	d	|}
|r�|g}nd
g}|jD]�}|dd�\}}}t||	�}
|ddkr�|dd�}|dk�r|
r�|�d|||
df�n|�d
||f�n:d||f}|
�r4|�d|||
df�n|�d|�|
dd�D]}|�|
|��qNq�|S)z�Generate help text (a list of strings, one per suggested line of
        output) from the option table for this FancyGetopt object.
        rr-r.r/N�r,�Nr=zOption summary:r*z  --%-*s  %sz
  --%-*s  z%s (-%s)z  --%-*s)rr2�	wrap_textr)r�headerZmax_optrr9r:�lZ	opt_widthZ
line_widthZ
text_widthZ
big_indent�linesr;�textZ	opt_namesrrr�
generate_helpsH



�zFancyGetopt.generate_helpcCs0|dkrtj}|�|�D]}|�|d�qdS)N�
)r>�stdoutrT�write)rrP�file�linerrr�
print_helphszFancyGetopt.print_help)N)NN)NN)N)NN)�__name__�
__module__�__qualname__�__doc__rr	rrrr#r'r(r)r<rBrLrTrZrrrrrs
(
	
M
=

OrcCst|�}|�|�|�||�Sr)rr)rB)�optionsZnegative_optrGrF�parserrrr�fancy_getoptos
racCsi|]}t|�d�qS)r=)�ord)�.0Z_wscharrrr�
<dictcomp>usrdcCs|dkrgSt|�|kr|gS|��}|�t�}t�d|�}dd�|D�}g}|�rg}d}|r�t|d�}|||kr�|�|d�|d=||}q\|r�|dddkr�|d=q�q\|�r|dkr�|�|dd|��|d|d�|d<|dddk�r|d=|�d�|��qN|S)	z�wrap_text(text : string, width : int) -> [string]

    Split 'text' into multiple lines of no more than 'width' characters
    each, and return the list of strings that results.
    Nz( +|-+)cSsg|]}|r|�qSrr)rcZchrrr�
<listcomp>�szwrap_text.<locals>.<listcomp>rr.r=�)r2�
expandtabsr!�WS_TRANS�re�splitrrA)rS�widthZchunksrRZcur_lineZcur_lenrQrrrrOws:

rOcCs
|�t�S)zXConvert a long option name to a valid Python identifier by
    changing "-" to "_".
    r )r&rrr�translate_longopt�srlc@seZdZdZgfdd�ZdS)r@z_Dummy class just used as a place to hold command-line option
    values as instance attributes.cCs|D]}t||d�qdS)zkCreate a new OptionDummy instance.  The attributes listed in
        'options' will be initialized to None.N)rE)rr_r&rrrr�szOptionDummy.__init__N)r[r\r]r^rrrrrr@�sr@�__main__z�Tra-la-la, supercalifragilisticexpialidocious.
How *do* you spell that odd word, anyways?
(Someone ask Mary -- she'll know [or she'll
say, "How should I know?"].))�
���(z	width: %drU)r^r>�stringrirBZdistutils.errorsZlongopt_pat�compiler7Zneg_alias_rer5�	maketransr"rraZ
whitespacerhrOrlr@r[rS�w�printrArrrr�<module>s*
T6PKX[�z�%��#__pycache__/__init__.cpython-38.pycnu�[���U

e5d��@s&dZddlZejdej�d��ZdS)z�distutils

The main package for the Python Module Distribution Utilities.  Normally
used from a setup script as

   from distutils.core import setup

   setup (...)
�N� )�__doc__�sys�version�index�__version__�rr�*/usr/lib64/python3.8/distutils/__init__.py�<module>s
PKX[�v��
�
#__pycache__/dep_util.cpython-38.pycnu�[���U

e5d�
�@s6dZddlZddlmZdd�Zdd�Zdd	d
�ZdS)z�distutils.dep_util

Utility functions for simple, timestamp-based dependency of files
and groups of files; also, function based entirely on such
timestamp dependency analysis.�N)�DistutilsFileErrorcCs`tj�|�s tdtj�|���tj�|�s0dSddlm}t�|�|}t�|�|}||kS)aReturn true if 'source' exists and is more recently modified than
    'target', or if 'source' exists and 'target' doesn't.  Return false if
    both exist and 'target' is the same age or younger than 'source'.
    Raise DistutilsFileError if 'source' does not exist.
    zfile '%s' does not exist�r��ST_MTIME)�os�path�existsr�abspath�statr)�source�targetrZmtime1Zmtime2�r
�*/usr/lib64/python3.8/distutils/dep_util.py�newers
�rcCsht|�t|�krtd��g}g}tt|��D]2}t||||�r,|�||�|�||�q,||fS)z�Walk two filename lists in parallel, testing if each source is newer
    than its corresponding target.  Return a pair of lists (sources,
    targets) where source is newer than target, according to the semantics
    of 'newer()'.
    z+'sources' and 'targets' must be same length)�len�
ValueError�ranger�append)�sourcesZtargetsZ	n_sourcesZ	n_targets�ir
r
r�newer_pairwise sr�errorcCs�tj�|�sdSddlm}t�|�|}|D]P}tj�|�sb|dkrHn|dkrTq.n|dkrbdSt�|�|}||kr.dSq.dS)a�Return true if 'target' is out-of-date with respect to any file
    listed in 'sources'.  In other words, if 'target' exists and is newer
    than every file in 'sources', return false; otherwise return true.
    'missing' controls what we do when a source file is missing; the
    default ("error") is to blow up with an OSError from inside 'stat()';
    if it is "ignore", we silently drop any missing source files; if it is
    "newer", any missing source files make us assume that 'target' is
    out-of-date (this is handy in "dry-run" mode: it'll make you pretend to
    carry out commands that wouldn't work because inputs are missing, but
    that doesn't matter because you're not actually going to run the
    commands).
    rrrr�ignorerN)rrrr
r)rrZmissingrZtarget_mtimer�source_mtimer
r
r�newer_group6s r)r)�__doc__rZdistutils.errorsrrrrr
r
r
r�<module>s
PKX[
d�"~6~6__pycache__/cmd.cpython-38.pycnu�[���U

e5d�F�@sbdZddlZddlZddlZddlmZddlmZmZm	Z	m
Z
mZddlmZGdd�d�Z
dS)ztdistutils.cmd

Provides the Command class, the base class for the command classes
in the distutils.command package.
�N)�DistutilsOptionError)�util�dir_util�	file_util�archive_util�dep_util��logc@s"eZdZdZgZdd�Zdd�Zdd�Zdd	�Zd
d�Z	dCdd�Z
dd�ZdDdd�Zdd�Z
dEdd�ZdFdd�Zdd�ZdGdd�Zdd �Zd!d"�Zd#d$�Zd%d&�ZdHd'd(�ZdId*d+�Zd,d-�Zd.d/�Zd0d1�ZdJd2d3�ZdKd5d6�ZdLd7d8�ZdMd9d:�ZdNd;d<�ZdOd=d>�Z dPd?d@�Z!dQdAdB�Z"dS)R�Commanda}Abstract base class for defining command classes, the "worker bees"
    of the Distutils.  A useful analogy for command classes is to think of
    them as subroutines with local variables called "options".  The options
    are "declared" in 'initialize_options()' and "defined" (given their
    final values, aka "finalized") in 'finalize_options()', both of which
    must be defined by every command class.  The distinction between the
    two is necessary because option values might come from the outside
    world (command line, config file, ...), and any options dependent on
    other options must be computed *after* these outside influences have
    been processed -- hence 'finalize_options()'.  The "body" of the
    subroutine, where it does all its work based on the values of its
    options, is the 'run()' method, which must also be implemented by every
    command class.
    cCsbddlm}t||�std��|jtkr0td��||_|��d|_	|j
|_
d|_d|_d|_
dS)z�Create and initialize a new Command object.  Most importantly,
        invokes the 'initialize_options()' method, which is the real
        initializer and depends on the actual command being
        instantiated.
        r)�Distributionz$dist must be a Distribution instancezCommand is an abstract classN)Zdistutils.distr�
isinstance�	TypeError�	__class__r
�RuntimeError�distribution�initialize_optionsZ_dry_run�verbose�force�help�	finalized)�selfZdistr�r�%/usr/lib64/python3.8/distutils/cmd.py�__init__/s


zCommand.__init__cCs<|dkr0t|d|�}|dkr*t|j|�S|Snt|��dS)N�dry_run�_)�getattrr�AttributeError)r�attrZmyvalrrr�__getattr___szCommand.__getattr__cCs|js|��d|_dS)N�)r�finalize_options�rrrr�ensure_finalizediszCommand.ensure_finalizedcCstd|j��dS)a�Set default values for all the options that this command
        supports.  Note that these defaults may be overridden by other
        commands, by the setup script, by config files, or by the
        command-line.  Thus, this is not the place to code dependencies
        between options; generally, 'initialize_options()' implementations
        are just a bunch of "self.foo = None" assignments.

        This method must be implemented by all command classes.
        �,abstract method -- subclass %s must overrideN�rrr"rrrr{s
�zCommand.initialize_optionscCstd|j��dS)aSet final values for all the options that this command supports.
        This is always called as late as possible, ie.  after any option
        assignments from the command-line or from other commands have been
        done.  Thus, this is the place to code option dependencies: if
        'foo' depends on 'bar', then it is safe to set 'foo' from 'bar' as
        long as 'foo' still has the same value it was assigned in
        'initialize_options()'.

        This method must be implemented by all command classes.
        r$Nr%r"rrrr!�s�zCommand.finalize_optionsN�cCs�ddlm}|dkr d|��}|j||tjd�|d}|jD]R\}}}|�|�}|ddkrn|dd�}t||�}|j|d||ftjd�qBdS)	Nr)�
longopt_xlatezcommand options for '%s':)�levelz  ����=z%s = %s)	Zdistutils.fancy_getoptr'�get_command_name�announcer	�INFOZuser_options�	translater)r�header�indentr'�optionr�valuerrr�dump_options�s

�zCommand.dump_optionscCstd|j��dS)a�A command's raison d'etre: carry out the action it exists to
        perform, controlled by the options initialized in
        'initialize_options()', customized by other commands, the setup
        script, the command-line, and config files, and finalized in
        'finalize_options()'.  All terminal output and filesystem
        interaction should be done by 'run()'.

        This method must be implemented by all command classes.
        r$Nr%r"rrr�run�s
�zCommand.runr cCst�||�dS)zmIf the current verbosity level is of greater than or equal to
        'level' print 'msg' to stdout.
        Nr)r�msgr(rrrr,�szCommand.announcecCs&ddlm}|r"t|�tj��dS)z~Print 'msg' to stdout if the global DEBUG (taken from the
        DISTUTILS_DEBUG environment variable) flag is true.
        r)�DEBUGN)Zdistutils.debugr6�print�sys�stdout�flush)rr5r6rrr�debug_print�szCommand.debug_printcCsBt||�}|dkr"t|||�|St|t�s>td|||f��|S)Nz'%s' must be a %s (got `%s`))r�setattrr�strr)rr1�what�default�valrrr�_ensure_stringlike�s

�zCommand._ensure_stringlikecCs|�|d|�dS)zWEnsure that 'option' is a string; if not defined, set it to
        'default'.
        �stringN)rA)rr1r?rrr�
ensure_string�szCommand.ensure_stringcCspt||�}|dkrdSt|t�r6t||t�d|��n6t|t�rTtdd�|D��}nd}|sltd||f��dS)z�Ensure that 'option' is a list of strings.  If 'option' is
        currently a string, we split it either on /,\s*/ or /\s+/, so
        "foo bar baz", "foo,bar,baz", and "foo,   bar baz" all become
        ["foo", "bar", "baz"].
        Nz,\s*|\s+css|]}t|t�VqdS�N)rr=)�.0�vrrr�	<genexpr>�sz-Command.ensure_string_list.<locals>.<genexpr>Fz''%s' must be a list of strings (got %r))	rrr=r<�re�split�list�allr)rr1r@�okrrr�ensure_string_list�s


��zCommand.ensure_string_listcCs6|�|||�}|dk	r2||�s2td|||f��dS)Nzerror in '%s' option: )rAr)rr1Ztesterr>Z	error_fmtr?r@rrr�_ensure_tested_string�s
�zCommand._ensure_tested_stringcCs|�|tjjdd�dS)z5Ensure that 'option' is the name of an existing file.�filenamez$'%s' does not exist or is not a fileN)rN�os�path�isfile�rr1rrr�ensure_filename�s�zCommand.ensure_filenamecCs|�|tjjdd�dS)Nzdirectory namez)'%s' does not exist or is not a directory)rNrPrQ�isdirrSrrr�ensure_dirnames�zCommand.ensure_dirnamecCst|d�r|jS|jjSdS)N�command_name)�hasattrrWr�__name__r"rrrr+	s
zCommand.get_command_namecGsF|j�|�}|��|D](\}}t||�dkrt||t||��qdS)a>Set the values of any "undefined" options from corresponding
        option values in some other command object.  "Undefined" here means
        "is None", which is the convention used to indicate that an option
        has not been changed between 'initialize_options()' and
        'finalize_options()'.  Usually called from 'finalize_options()' for
        options that depend on some other command rather than another
        option of the same command.  'src_cmd' is the other command from
        which option values will be taken (a command object will be created
        for it if necessary); the remaining arguments are
        '(src_option,dst_option)' tuples which mean "take the value of
        'src_option' in the 'src_cmd' command object, and copy it to
        'dst_option' in the current command object".
        N)r�get_command_objr#rr<)rZsrc_cmdZoption_pairsZsrc_cmd_objZ
src_optionZ
dst_optionrrr�set_undefined_optionss
zCommand.set_undefined_optionscCs|j�||�}|��|S)z�Wrapper around Distribution's 'get_command_obj()' method: find
        (create if necessary and 'create' is true) the command object for
        'command', call its 'ensure_finalized()' method, and return the
        finalized command object.
        )rrZr#)r�commandZcreateZcmd_objrrr�get_finalized_command$szCommand.get_finalized_commandrcCs|j�||�SrD)r�reinitialize_command)rr\Zreinit_subcommandsrrrr^0s�zCommand.reinitialize_commandcCs|j�|�dS)z�Run some other command: uses the 'run_command()' method of
        Distribution, which creates and finalizes the command object if
        necessary and then invokes its 'run()' method.
        N)r�run_command)rr\rrrr_4szCommand.run_commandcCs2g}|jD]"\}}|dks"||�r
|�|�q
|S)akDetermine the sub-commands that are relevant in the current
        distribution (ie., that need to be run).  This is based on the
        'sub_commands' class attribute: each tuple in that list may include
        a method that we call to determine if the subcommand needs to be
        run for the current distribution.  Return a list of command names.
        N)�sub_commands�append)rZcommandsZcmd_name�methodrrr�get_sub_commands;s
zCommand.get_sub_commandscCst�d|��|�dS)Nzwarning: %s: %s
)r	�warnr+)rr5rrrrdKszCommand.warncCstj||||jd�dS�N�r)r�executer)r�func�argsr5r(rrrrgNszCommand.execute�cCstj|||jd�dSre)r�mkpathr)r�name�moderrrrkQszCommand.mkpathc	Cstj|||||j||jd�S)z�Copy a file respecting verbose, dry-run and force flags.  (The
        former two default to whatever is in the Distribution object, and
        the latter defaults to false for commands that don't define it.)rf)r�	copy_filerr)r�infile�outfile�
preserve_mode�preserve_times�linkr(rrrrnTs
�zCommand.copy_filec	Cstj||||||j|jd�S)z\Copy an entire directory tree respecting verbose, dry-run,
        and force flags.
        rf)r�	copy_treerr)rrorprqrrZpreserve_symlinksr(rrrrt]s
�zCommand.copy_treecCstj|||jd�S)z$Move a file respecting dry-run flag.rf)r�	move_filer)r�srcZdstr(rrrrufszCommand.move_filecCs ddlm}||||jd�dS)z2Spawn an external command respecting dry-run flag.r)�spawnrfN)Zdistutils.spawnrwr)r�cmdZsearch_pathr(rwrrrrwjsz
Command.spawnc	Cstj|||||j||d�S)N)r�owner�group)r�make_archiver)rZ	base_name�formatZroot_dirZbase_dirryrzrrrr{os
�zCommand.make_archivecCs�|dkrd|}t|t�r"|f}nt|ttf�s8td��|dkrRd|d�|�f}|jsdt�||�rv|�	||||�n
t
�|�dS)a�Special case of 'execute()' for operations that process one or
        more input files and generate one output file.  Works just like
        'execute()', except the operation is skipped and a different
        message printed if 'outfile' already exists and is newer than all
        files listed in 'infiles'.  If the command defined 'self.force',
        and it is true, then the command is unconditionally run -- does no
        timestamp checks.
        Nzskipping %s (inputs unchanged)z9'infiles' must be a string, or a list or tuple of stringszgenerating %s from %sz, )rr=rJ�tupler
�joinrrZnewer_grouprgr	�debug)rZinfilesrprhriZexec_msgZskip_msgr(rrr�	make_fileus

�zCommand.make_file)Nr&)r )N)N)N)r )r)Nr )rj)r r Nr )r r rr )r )r r )NNNN)NNr )#rY�
__module__�__qualname__�__doc__r`rrr#rr!r3r4r,r;rArCrMrNrTrVr+r[r]r^r_rcrdrgrkrnrtrurwr{r�rrrrr
sZ0






�




�
	�
	

�
�r
)r�r8rPrHZdistutils.errorsrZ	distutilsrrrrrr	r
rrrr�<module>s
PKX[%E�,}}'__pycache__/bcppcompiler.cpython-38.pycnu�[���U

e5dW:�@sxdZddlZddlmZmZmZmZmZmZddl	m
Z
mZmZddl
mZddlmZddlmZGdd	�d	e
�ZdS)
z�distutils.bcppcompiler

Contains BorlandCCompiler, an implementation of the abstract CCompiler class
for the Borland C++ compiler.
�N)�DistutilsExecError�DistutilsPlatformError�CompileError�LibError�	LinkError�UnknownFileError)�	CCompiler�gen_preprocess_options�gen_lib_options)�
write_file)�newer)�logc
@s�eZdZdZdZiZdgZdddgZeeZdZ	dZ
d	Zd
ZZ
dZdd
d�Zddd�Zddd�Zd dd�Zd!dd�Zd"dd�Zd#dd�ZdS)$�BCPPCompilerzConcrete class that implements an interface to the Borland C/C++
    compiler, as defined by the CCompiler abstract class.
    Zbcppz.cz.ccz.cppz.cxxz.objz.libz.dllz%s%sz.exercCs�t�||||�d|_d|_d|_d|_ddddg|_ddddg|_d	d
ddg|_d	d
ddg|_	g|_
d
ddg|_d
dddg|_dS)
Nz	bcc32.exezilink32.exeztlib.exez/tWMz/O2z/qz/g0z/Odz/Tpdz/Gnz/xz/r)
r�__init__�cc�linker�libZpreprocess_options�compile_options�compile_options_debug�ldflags_shared�ldflags_shared_debugZldflags_static�ldflags_exe�ldflags_exe_debug)�self�verboseZdry_run�force�r�./usr/lib64/python3.8/distutils/bcppcompiler.pyr5szBCPPCompiler.__init__Nc	Cs�|�||||||�\}}	}}
}|p$g}|�d�|rB|�|j�n|�|j�|	D�]<}
z||
\}}Wntk
r�YqRYnXtj�|�}tj�|
�}
|�	tj�
|
��|dkr�qR|dk�rz|�dd|
|g�WqRtk
�r}zt
|��W5d}~XYqRXqR||jk�rd}n||jk�r*d}nd}d|
}z,|�|jg||
||g||g�WqRtk
�r�}zt
|��W5d}~XYqRXqR|	S)	Nz-c�.res�.rcZbrcc32z-fo�z-P�-o)Z_setup_compile�append�extendrr�KeyError�os�path�normpath�mkpath�dirname�spawnrr�
_c_extensions�_cpp_extensionsr)rZsources�
output_dir�macros�include_dirs�debug�
extra_preargs�extra_postargsZdepends�objects�pp_optsZbuildZcompile_opts�obj�src�ext�msgZ	input_optZ
output_optrrr�compileQsV��



���
zBCPPCompiler.compilec	
Cs�|�||�\}}|j||d�}|�||�r~|dg|}|r:z|�|jg|�Wq�tk
rz}zt|��W5d}~XYq�Xnt�d|�dS)N)r-z/u�skipping %s (up-to-date))	�_fix_object_args�library_filename�
_need_linkr*rrrr
r0)	rr3Zoutput_libnamer-r0�target_lang�output_filenameZlib_argsr8rrr�create_static_lib�s�zBCPPCompiler.create_static_libc 
Cs�|�||�\}}|�|||�\}}}|r8t�dt|��|dk	rNtj�||�}|�||��r�|t	j
kr�d}|	r~|jdd�}q�|jdd�}n&d}|	r�|j
dd�}n|jdd�}|dkr�d}n�tj�|�\}}tj�|�\}}tj�|d�}tj�|d|�}dg}|�pgD]}|�d||f��q|�t||fd	|�ttjj|�}|g}g}|D]>}tj�tj�|��\}}|d
k�r�|�|�n
|�|��q`|D]}|�dtj�|���q�|�d�|�|�|�d
|g�|�d�|D]4}|�|||	�}|dk�r|�|�n
|�|��q�|�d�|�d�|�d
|g�|�d
�|�|�|
�rp|
|dd�<|�r�|�|�|�tj�|��z|�|jg|�Wn,tk
�r�}zt|��W5d}~XYnXnt�d|�dS)Nz7I don't know what to do with 'runtime_library_dirs': %sZc0w32Zc0d32r rz%s.defZEXPORTSz  %s=_%sz
writing %srz/L%sz/L.�,z,,Zimport32Zcw32mtr:) r;Z
_fix_lib_argsr
�warn�strr%r&�joinr=rZ
EXECUTABLErrrr�split�splitextr)r"Zexecuter�mapr'�normcaser#�find_library_filer(r*rrrr0) rZtarget_descr3r?r-Z	librariesZlibrary_dirsZruntime_library_dirsZexport_symbolsr0r1r2Z
build_tempr>Zstartup_objZld_argsZdef_file�head�tail�modnamer7Ztemp_dir�contentsZsymZobjects2Z	resources�file�base�lr�libfiler8rrr�link�s���
�










zBCPPCompiler.linkc	Csr|r"|d}|d|d||f}n|d|f}|D]:}|D]0}tj�||�|��}tj�|�r:|Sq:q2dS)NZ_dZ_bcpp)r%r&rDr<�exists)	r�dirsrr0ZdlibZ	try_names�dir�namerQrrrrI4s
zBCPPCompiler.find_library_filer cCs�|dkrd}g}|D]�}tj�tj�|��\}}||jddgkrRtd||f��|rbtj�|�}|dkr�|�tj�|||��q|dkr�|�tj�||d��q|�tj�|||j	��q|S)Nr rrz"unknown file type '%s' (from '%s'))
r%r&rFrH�src_extensionsr�basenamer"rD�
obj_extension)rZsource_filenamesZ	strip_dirr-Z	obj_namesZsrc_namerOr7rrr�object_filenamesNs&��zBCPPCompiler.object_filenamesc
Cs�|�d||�\}}}t||�}dg|}	|dk	r>|	�d|�|rN||	dd�<|r\|	�|�|	�|�|js~|dks~t||�r�|r�|�tj�	|��z|�
|	�Wn2tk
r�}
zt|
�t
|
��W5d}
~
XYnXdS)Nz	cpp32.exer!r)Z_fix_compile_argsr	r"r#rrr(r%r&r)r*r�printr)r�sourceZoutput_filer.r/r1r2�_r4Zpp_argsr8rrr�
preprocessis&	�



zBCPPCompiler.preprocess)rrr)NNNrNNN)NrN)
NNNNNrNNNN)r)rr )NNNNN)�__name__�
__module__�__qualname__�__doc__Z
compiler_typeZexecutablesr+r,rWrYZstatic_lib_extensionZshared_lib_extensionZstatic_lib_formatZshared_lib_formatZ
exe_extensionrr9r@rRrIrZr^rrrrrsb
�
�
D�
�


�
�r)rbr%Zdistutils.errorsrrrrrrZdistutils.ccompilerrr	r
Zdistutils.file_utilrZdistutils.dep_utilrZ	distutilsr
rrrrr�<module>s PKX[��cE-__pycache__/fancy_getopt.cpython-38.opt-2.pycnu�[���U

e5dxE�@s�ddlZddlZddlZddlZddlTdZe�de�Ze�deef�Ze	�
dd�ZGdd	�d	�Zd
d�Z
dd
�ejD�Zdd�Zdd�ZGdd�d�Zedkr�dZdD]*Zede�ed�eee���e�q�dS)�N)�*z[a-zA-Z](?:[a-zA-Z0-9-]*)z^%s$z^(%s)=!(%s)$�-�_c@s�eZdZddd�Zdd�Zdd�Zddd	�Zd
d�Zdd
�Zdd�Z	dd�Z
dd�Zdd�Zd dd�Z
dd�Zd!dd�Zd"dd�ZdS)#�FancyGetoptNcCsN||_i|_|jr|��i|_i|_g|_g|_i|_i|_i|_	g|_
dS�N)�option_table�option_index�_build_index�alias�negative_alias�
short_opts�	long_opts�
short2long�	attr_name�	takes_arg�option_order��selfr�r�./usr/lib64/python3.8/distutils/fancy_getopt.py�__init__)s	zFancyGetopt.__init__cCs(|j��|jD]}||j|d<qdS)Nr)r�clearr)r�optionrrrr	Qs

zFancyGetopt._build_indexcCs||_|��dSr)rr	rrrr�set_option_tableVszFancyGetopt.set_option_tablecCs<||jkrtd|��n |||f}|j�|�||j|<dS)Nz'option conflict: already an option '%s')r�DistutilsGetoptErrorr�append)r�long_optionZshort_optionZhelp_stringrrrr�
add_optionZs
�
zFancyGetopt.add_optioncCs
||jkSr)r�rrrrr�
has_optioncszFancyGetopt.has_optioncCs
|�t�Sr��	translate�
longopt_xlaterrrr�
get_attr_namehszFancyGetopt.get_attr_namecCsN|��D]@\}}||jkr,td|||f��||jkrtd|||f��qdS)Nz(invalid %s '%s': option '%s' not definedz0invalid %s '%s': aliased option '%s' not defined)�itemsrr)r�aliasesZwhatr
�optrrr�_check_alias_dictns
�
�zFancyGetopt._check_alias_dictcCs|�|d�||_dS)Nr
)r'r
)rr
rrr�set_aliasesxszFancyGetopt.set_aliasescCs|�|d�||_dS)Nznegative alias)r'r)rrrrr�set_negative_aliases}sz FancyGetopt.set_negative_aliasescCs�g|_g|_|j��i|_|jD�]�}t|�dkrD|\}}}d}n(t|�dkr^|\}}}}ntd|f��t|t	�r�t|�dkr�t
d|��|dks�t|t	�r�t|�dks�t
d|��||j|<|j�|�|d	d
kr�|r�|d}|dd	�}d|j|<nF|j
�|�}|dk	�r:|j|�r0t
d||f��||jd	<d|j|<|j�|�}|dk	�r�|j||j|k�r�t
d
||f��t�|��s�t
d|��|�|�|j|<|r"|j�|�||j|d<q"dS)N�r�zinvalid option tuple: %r�z9invalid long option '%s': must be a string of length >= 2�z:invalid short option '%s': must a single character or None����=�:z>invalid negative alias '%s': aliased option '%s' takes a valuezginvalid alias '%s': inconsistent with aliased option '%s' (one of them takes a value, the other doesn'tzEinvalid long option name '%s' (must be letters, numbers, hyphens only)r
rrr�repeatr�len�
ValueError�
isinstance�strrrrr�getr
�
longopt_re�matchr#r)rr�long�short�helpr1Zalias_torrr�_grok_option_table�st

��
��

��


��
��zFancyGetopt._grok_option_tablec
Csn|dkrtjdd�}|dkr*t�}d}nd}|��d�|j�}zt�|||j�\}}Wn,tjk
r�}zt	|��W5d}~XYnX|D]�\}}t
|�dkr�|ddkr�|j|d}n|dd�}|j�
|�}	|	r�|	}|j|�s|j�
|�}	|	�r|	}d}nd}|j|}
|�r:|j�
|
�dk	�r:t||
d�d}t||
|�|j�||f�q�|�rf||fS|SdS)Nr-TF� r,rr)�sys�argv�OptionDummyr<�joinr�getoptr
�errorZDistutilsArgErrorr2rr
r6rrrr1�getattr�setattrrr)r�args�objectZcreated_objectrZopts�msgr&�valr
�attrrrrrB�sB
zFancyGetopt.getoptcCs|jdkrtd��n|jSdS)Nz!'getopt()' hasn't been called yet)r�RuntimeError)rrrr�get_option_orders

zFancyGetopt.get_option_ordercCsjd}|jD]L}|d}|d}t|�}|ddkr:|d}|dk	rJ|d}||kr
|}q
|ddd}d}||}	d|}
|r�|g}nd	g}|jD]�}|dd
�\}}}t||	�}
|ddkr�|dd�}|dk�r|
r�|�d|||
df�n|�d||f�n:d
||f}|
�r4|�d|||
df�n|�d|�|
dd�D]}|�|
|��qNq�|S)Nrr-r.r/�r,�Nr=zOption summary:r*z  --%-*s  %sz
  --%-*s  z%s (-%s)z  --%-*s)rr2�	wrap_textr)r�headerZmax_optrr9r:�lZ	opt_widthZ
line_widthZ
text_widthZ
big_indent�linesr;�textZ	opt_namesrrr�
generate_helpsH



�zFancyGetopt.generate_helpcCs0|dkrtj}|�|�D]}|�|d�qdS)N�
)r>�stdoutrT�write)rrP�file�linerrr�
print_helphszFancyGetopt.print_help)N)NN)NN)N)NN)�__name__�
__module__�__qualname__rr	rrrr#r'r(r)r<rBrLrTrZrrrrrs
(
	
M
=

OrcCst|�}|�|�|�||�Sr)rr)rB)�optionsZnegative_optrGrF�parserrrr�fancy_getoptos
r`cCsi|]}t|�d�qS)r=)�ord)�.0Z_wscharrrr�
<dictcomp>usrccCs|dkrgSt|�|kr|gS|��}|�t�}t�d|�}dd�|D�}g}|�rg}d}|r�t|d�}|||kr�|�|d�|d=||}q\|r�|dddkr�|d=q�q\|�r|dkr�|�|dd|��|d|d�|d<|dddk�r|d=|�d�|��qN|S)Nz( +|-+)cSsg|]}|r|�qSrr)rbZchrrr�
<listcomp>�szwrap_text.<locals>.<listcomp>rr.r=�)r2�
expandtabsr!�WS_TRANS�re�splitrrA)rS�widthZchunksrRZcur_lineZcur_lenrQrrrrOws:

rOcCs
|�t�Srr )r&rrr�translate_longopt�srkc@seZdZgfdd�ZdS)r@cCs|D]}t||d�qdSr)rE)rr^r&rrrr�szOptionDummy.__init__N)r[r\r]rrrrrr@�sr@�__main__z�Tra-la-la, supercalifragilisticexpialidocious.
How *do* you spell that odd word, anyways?
(Someone ask Mary -- she'll know [or she'll
say, "How should I know?"].))�
���(z	width: %drU)r>�stringrhrBZdistutils.errorsZlongopt_pat�compiler7Zneg_alias_rer5�	maketransr"rr`Z
whitespacergrOrkr@r[rS�w�printrArrrr�<module>s(T6PKX[� ��)__pycache__/dep_util.cpython-38.opt-2.pycnu�[���U

e5d�
�@s2ddlZddlmZdd�Zdd�Zd
dd	�ZdS)�N)�DistutilsFileErrorcCs`tj�|�s tdtj�|���tj�|�s0dSddlm}t�|�|}t�|�|}||kS)Nzfile '%s' does not exist�r��ST_MTIME)�os�path�existsr�abspath�statr)�source�targetrZmtime1Zmtime2�r
�*/usr/lib64/python3.8/distutils/dep_util.py�newers
�rcCsht|�t|�krtd��g}g}tt|��D]2}t||||�r,|�||�|�||�q,||fS)Nz+'sources' and 'targets' must be same length)�len�
ValueError�ranger�append)�sourcesZtargetsZ	n_sourcesZ	n_targets�ir
r
r�newer_pairwise sr�errorcCs�tj�|�sdSddlm}t�|�|}|D]P}tj�|�sb|dkrHn|dkrTq.n|dkrbdSt�|�|}||kr.dSq.dS)Nrrrr�ignorer)rrrr
r)rrZmissingrZtarget_mtimer�source_mtimer
r
r�newer_group6s r)r)rZdistutils.errorsrrrrr
r
r
r�<module>sPKX[�x�a
a
1__pycache__/versionpredicate.cpython-38.opt-2.pycnu�[���U

e5d
�@s~ddlZddlZddlZe�dej�Ze�d�Ze�d�Zdd�Z	ej
ejejej
ejejd�ZGdd	�d	�Zdad
d�ZdS)�Nz'(?i)^\s*([a-z_]\w*(?:\.[a-z_]\w*)*)(.*)z^\s*\((.*)\)\s*$z%^\s*(<=|>=|<|>|!=|==)\s*([^\s,]+)\s*$cCs6t�|�}|std|��|��\}}|tj�|�fS)Nz"bad package restriction syntax: %r)�re_splitComparison�match�
ValueError�groups�	distutils�version�
StrictVersion)�pred�res�compZverStr�r�2/usr/lib64/python3.8/distutils/versionpredicate.py�splitUps

r)�<z<=z==�>z>=z!=c@s$eZdZdd�Zdd�Zdd�ZdS)�VersionPredicatecCs�|��}|std��t�|�}|s.td|��|��\|_}|��}|r�t�|�}|sbtd|��|��d}dd�|�d�D�|_|js�td|��ng|_dS)	Nzempty package restrictionzbad package name in %rzexpected parenthesized list: %rrcSsg|]}t|��qSr)r)�.0ZaPredrrr
�
<listcomp>tsz-VersionPredicate.__init__.<locals>.<listcomp>�,zempty parenthesized list in %r)	�stripr�re_validPackagerr�name�re_paren�splitr	)�selfZversionPredicateStrrZparen�strrrr
�__init__`s&

�zVersionPredicate.__init__cCs8|jr.dd�|jD�}|jdd�|�dS|jSdS)NcSs g|]\}}|dt|��qS)� )r)r�cond�verrrr
r}sz,VersionPredicate.__str__.<locals>.<listcomp>z (z, �))r	r�join)r�seqrrr
�__str__{szVersionPredicate.__str__cCs(|jD]\}}t|||�sdSqdS)NFT)r	�compmap)rrrrrrr
�satisfied_by�szVersionPredicate.satisfied_byN)�__name__�
__module__�__qualname__rr#r%rrrr
rsArcCsdtdkrt�dtj�a|��}t�|�}|s8td|��|�d�pDd}|rVtj	�
|�}|�d�|fS)Nz=([a-zA-Z_]\w*(?:\.[a-zA-Z_]\w*)*)(?:\s*\(\s*([^)\s]+)\s*\))?$z"illegal provides specification: %r��)�
_provision_rx�re�compile�ASCIIrrr�grouprrr)�value�mrrrr
�split_provision�s�
r2)r,Zdistutils.versionr�operatorr-r.rrrr�lt�le�eq�gt�ge�ner$rr+r2rrrr
�<module>s �

�nPKX[@c.�
	
	__pycache__/log.cpython-38.pycnu�[���U

e5d��@sldZdZdZdZdZdZddlZGdd	�d	�Ze�Zej	Z	ej
Z
ejZejZej
Z
ejZd
d�Zdd
�ZdS)z,A simple log mechanism styled after PEP 282.������Nc@sPeZdZefdd�Zdd�Zdd�Zdd�Zd	d
�Zdd�Z	d
d�Z
dd�ZdS)�LogcCs
||_dS�N)�	threshold)�selfr	�r�%/usr/lib64/python3.8/distutils/log.py�__init__szLog.__init__cCs�|tttttfkr"tdt|���||jkr�|r8||}|tttfkrNtj	}ntj
}z|�d|�Wn:tk
r�|j
}|�|d��|�}|�d|�YnX|��dS)Nz%s wrong log levelz%s
�backslashreplace)�DEBUG�INFO�WARN�ERROR�FATAL�
ValueError�strr	�sys�stderr�stdout�write�UnicodeEncodeError�encoding�encode�decode�flush)r
�level�msg�args�streamrrrr�_logs
zLog._logcGs|�|||�dSr)r#)r
rr r!rrr�log'szLog.logcGs|�t||�dSr)r#r�r
r r!rrr�debug*sz	Log.debugcGs|�t||�dSr)r#rr%rrr�info-szLog.infocGs|�t||�dSr)r#rr%rrr�warn0szLog.warncGs|�t||�dSr)r#rr%rrr�error3sz	Log.errorcGs|�t||�dSr)r#rr%rrr�fatal6sz	Log.fatalN)�__name__�
__module__�__qualname__rr
r#r$r&r'r(r)r*rrrrrsrcCstj}|t_|Sr)�_global_logr	)r�oldrrr�
set_thresholdAsr0cCs8|dkrtt�n"|dkr$tt�n|dkr4tt�dS)Nrrr)r0rrr)�vrrr�
set_verbosityGs

r2)�__doc__rrrrrrrr.r$r&r'r(r)r*r0r2rrrr�<module>s +PKX[�Z@+n/n/$__pycache__/sysconfig.cpython-38.pycnu�[���U

��.eP�@s�dZddlZddlZddlZddlZddlmZddlmZm	Z	ej
�ej�Z
ej
�ej�Zej
�ej�Zej
�ej�Zdejkr�ej
�ejd�Zn&ejr�ej
�ej
�ej��Zne��Zdd�Zeed	d�Zejd
kr�dd�Zee�Zee�Zd
d�Ze�Z dZ!ze �sej"Z!Wne#k
�r*YnXdd�Z$d-dd�Z%d.dd�Z&dd�Z'dd�Z(dd�Z)d/dd�Z*e�+d�Z,e�+d�Z-e�+d �Z.d0d!d"�Z/d#d$�Z0da1d%d&�Z2d'd(�Z3d)d*�Z4d+d,�Z5dS)1a�Provide access to Python's configuration information.  The specific
configuration variables available depend heavily on the platform and
configuration.  The values may be retrieved using
get_config_var(name), and the list of variables is available via
get_config_vars().keys().  Additional convenience functions are also
available.

Written by:   Fred L. Drake, Jr.
Email:        <fdrake@acm.org>
�N�)�DistutilsPlatformError)�get_platform�get_host_platformZ_PYTHON_PROJECT_BASEcCs,dD]"}tj�tj�|d|��rdSqdS)N)ZSetupzSetup.localZModulesTF)�os�path�isfile�join)�d�fn�r�+/usr/lib64/python3.8/distutils/sysconfig.py�_is_python_source_dir+sr�_home�ntcCs0|r,tj�|��tj�tj�td���r,tS|S)NZPCbuild)rr�normcase�
startswithr	�PREFIX)r
rrr
�_fix_pcbuild4s
�rcCstrtt�Stt�S)N)�	_sys_homer�project_baserrrr
�
_python_build<sr�cCsdtjdd�S)z�Return a string containing the major and minor Python version,
    leaving off the patchlevel.  Sample return values could be '1.5'
    or '2.2'.
    z%d.%dN�)�sys�version_inforrrr
�get_python_versionPsrcCs�|dkr|rtpt}tjdkrjtrL|r.tp,tStj�t	d�d�}tj�
|�Sdt�t}tj�|d|�Stjdkr�tr�tj�|d�tjj
tj�|d�Stj�|d�Std	tj��dS)
a�Return the directory containing installed Python header files.

    If 'plat_specific' is false (the default), this is the path to the
    non-platform-specific header files, i.e. Python.h and so on;
    otherwise, this is the path to platform-specific header files
    (namely pyconfig.h).

    If 'prefix' is supplied, use it instead of sys.base_prefix or
    sys.base_exec_prefix -- i.e., ignore 'plat_specific'.
    N�posix�srcdirZInclude�pythonZincluder�PCzFI don't know where Python installs its C header files on platform '%s')�BASE_EXEC_PREFIX�BASE_PREFIXr�name�python_buildrrrr	�get_config_var�normpathr�build_flags�pathsepr)�
plat_specific�prefixZincdirZ
python_dirrrr
�get_python_incXs*

���r+cCs�|dkr&|r|rtpt}n|r"tp$t}tjdkrp|s8|r>d}nd}tj�||dt��}|r`|Stj�|d�Sn<tjdkr�|r�tj�|d�Stj�|dd�Snt	d	tj��dS)
aSReturn the directory containing the Python library (standard or
    site additions).

    If 'plat_specific' is true, return the directory containing
    platform-specific modules, i.e. any module from a non-pure-Python
    module distribution; otherwise, return the platform-shared library
    directory.  If 'standard_lib' is true, return the directory
    containing standard Python library modules; otherwise, return the
    directory for site-specific modules.

    If 'prefix' is supplied, use it instead of sys.base_prefix or
    sys.base_exec_prefix -- i.e., ignore 'plat_specific'.
    Nr�lib64�librz
site-packagesrZLibz?I don't know where Python installs its library on platform '%s')
r!r"�EXEC_PREFIXrrr#rr	rr)r)�standard_libr*r-Z	libpythonrrr
�get_python_lib�s0
�
��r0c	Cs�|jdk�r�tjdkr8td�s8ddl}|�t�dtd<tddd	d
ddd
d�\}}}}}}}}	dtj	kr�tj	d}
tjdkr�dtj	kr�|�
|�r�|
|t|�d�}|
}dtj	kr�tj	d}dtj	kr�tj	d}dtj	kr�tj	d}n|d}dtj	k�r|dtj	d}d	tj	k�r<|dtj	d	}|dtj	d	}dtj	k�r~|dtj	d}|dtj	d}|dtj	d}d
tj	k�r�tj	d
}dtj	k�r�|dtj	d}n|d|	}|d|}
|j||
|
d|||||d�||_
dS)z�Do any platform-specific customization of a CCompiler instance.

    Mainly needed on Unix, so we can plug in the information that
    varies across Unices and is stored in Python's Makefile.
    Zunix�darwinZCUSTOMIZED_OSX_COMPILERrN�TrueZCCZCXX�CFLAGSZCCSHAREDZLDSHAREDZSHLIB_SUFFIXZARZARFLAGSZCPPz -E�LDFLAGS� �CPPFLAGS)Zpreprocessor�compilerZcompiler_soZcompiler_cxxZ	linker_soZ
linker_exe�archiver)Z
compiler_typer�platformr%�_osx_support�customize_compiler�_config_vars�get_config_varsr�environr�lenZset_executablesZshared_lib_extension)r7r:ZccZcxxZcflagsZccsharedZldsharedZshlib_suffixZarZar_flagsZnewccZcppr8Zcc_cmdrrr
r;�sn

��


��






�	r;cCsDtr,tjdkr"tj�tptd�}q6tp(t}n
tdd�}tj�|d�S)z2Return full pathname of installed pyconfig.h file.rr r�r)z
pyconfig-64.h)r$rr#rr	rrr+)Zinc_dirrrr
�get_config_h_filename�s


rAcCs\trtj�tptd�Stddd�}d�t�t	�}t
tjd�rL|dtjj
7}tj�||d�S)zAReturn full pathname of installed Makefile from the Python build.ZMakefilerr�r)r/zconfig-{}{}�
_multiarchz-%s)r$rrr	rrr0�formatrr'�hasattrr�implementationrC)Zlib_dirZconfig_filerrr
�get_makefile_filenamesrGcCs�|dkri}t�d�}t�d�}|��}|s.q�|�|�}|rx|�dd�\}}zt|�}Wntk
rlYnX|||<q |�|�}|r d||�d�<q |S)z�Parse a config.h-style file.

    A dictionary containing name/value pairs is returned.  If an
    optional dictionary is passed in as the second argument, it is
    used instead of a new dictionary.
    Nz"#define ([A-Z][A-Za-z0-9_]+) (.*)
z&/[*] #undef ([A-Z][A-Za-z0-9_]+) [*]/
rrr)�re�compile�readline�match�group�int�
ValueError)�fp�gZ	define_rxZundef_rx�line�m�n�vrrr
�parse_config_hs&




rUz"([a-zA-Z][a-zA-Z0-9_]+)\s*=\s*(.*)z\$\(([A-Za-z][A-Za-z0-9_]*)\)z\${([A-Za-z][A-Za-z0-9_]*)}c	Cs�ddlm}||ddddd�}|dkr*i}i}i}|��}|dkrDq�t�|�}|r2|�dd�\}}	|	��}	|	�dd	�}
d
|
kr�|	||<q2zt|	�}	Wn$t	k
r�|	�dd
�||<Yq2X|	||<q2d}|�rtt
|�D�]�}||}
t�|
�p�t
�|
�}|�rj|�d�}d}||k�r$t||�}n�||k�r4d
}nx|tjk�rLtj|}n`||k�r�|�d��rz|dd�|k�rzd	}n$d||k�r�d
}nt|d|�}nd	||<}|�rp|
|��d�}|
d|���||}
d
|k�r�|
||<nzzt|
�}
Wn"t	k
�r|
��||<Yn
X|
||<||=|�d��rp|dd�|k�rp|dd�}||k�rp|
||<q�||=q�q�|��|��D]"\}}	t|	t��r�|	��||<�q�|�|�|S)z�Parse a Makefile-style file.

    A dictionary containing name/value pairs is returned.  If an
    optional dictionary is passed in as the second argument, it is
    used instead of a new dictionary.
    r)�TextFiler�surrogateescape)Zstrip_commentsZskip_blanksZ
join_lines�errorsNrz$$r�$)r3r4r6TFZPY_�)Zdistutils.text_filerVrJ�_variable_rxrKrL�strip�replacerMrN�list�_findvar1_rx�search�_findvar2_rx�strrr>r�end�start�close�items�
isinstance�update)rrPrVrOZdoneZnotdonerQrRrSrTZtmpvZrenamed_variablesr#�value�found�itemZafter�krrr
�parse_makefile/s�








�



rmcCsVt�|�pt�|�}|rR|��\}}|d|�|�|�d��||d�}qqRq|S)a�Expand Makefile-style variables -- "${foo}" or "$(foo)" -- in
    'string' according to 'vars' (a dictionary mapping variable names to
    values).  Variables not present in 'vars' are silently expanded to the
    empty string.  The variable values in 'vars' should not contain further
    variable expansions; if 'vars' is the output of 'parse_makefile()',
    you're fine.  Returns a variable-expanded version of 's'.
    rrN)r_r`ra�span�getrL)�s�varsrRZbegrcrrr
�expand_makefile_vars�s*rrc
CsVtj�ddjtjtjttjdd�d��}t	|t
�t�dgd�}|j}ia
t
�|�dS)	z7Initialize the module as appropriate for POSIX systems.Z_PYTHON_SYSCONFIGDATA_NAMEz+_sysconfigdata_{abi}_{platform}_{multiarch}rCr)Zabir9Z	multiarch�build_time_varsrN)rr>rorDr�abiflagsr9�getattrrF�
__import__�globals�localsrsr<rh)r#Z_temprsrrr
�_init_posix�s��rycCs~i}tddd�|d<tddd�|d<tdd�|d<t��d|d<d	|d
<t��dd�|d
<tj�tj�	t
j��|d<|adS)z+Initialize the module as appropriate for NTrrrBZLIBDESTZ
BINLIBDESTr@Z	INCLUDEPY�
EXT_SUFFIXz.exeZEXE�.rZVERSIONZBINDIRN)
r0r+�_imp�extension_suffixesrr]rr�dirname�abspathr�
executabler<)rPrrr
�_init_nt�sr�cGs\tdk�r*t��dtj�}|r(|�niattd<ttd<t�d�}|dk	rV|td<t�dt�}tjdkr�tr�tj	�
t��}tj	�||�}ntj	�
t��}tj	�
tj	�|��td<t�rtjdk�rt}tj	�td��s|t��k�rtj	�|td�}tj	�|�td<tjd	k�r*d
dl}|�t�|�rTg}|D]}|�t�|���q8|StSdS)a�With no arguments, return a dictionary of all configuration
    variables relevant for the current platform.  Generally this includes
    everything needed to build extensions and install both pure modules and
    extensions.  On Unix, this means every variable defined in Python's
    installed Makefile; on Windows it's a much smaller set.

    With arguments, return a list of values that result from looking up
    each argument in the configuration variable dictionary.
    NZ_init_r*�exec_prefixrz�SOrrr1r)r<rwrorr#rr.rr$rr~rGr	rr&�isabs�getcwdrr9r:Zcustomize_config_vars�append)�args�funcr�r�baser:Zvalsr#rrr
r=�sB



�
r=cCs*|dkrddl}|�dtd�t��|�S)z�Return the value of a single variable using the dictionary
    returned by 'get_config_vars()'.  Equivalent to
    get_config_vars().get(name)
    r�rNz SO is deprecated, use EXT_SUFFIXr)�warnings�warn�DeprecationWarningr=ro)r#r�rrr
r%!sr%)rN)rrN)N)N)6�__doc__r|rrHrrXr�utilrrrr&r*rr�r.�base_prefixr"�base_exec_prefixr!r>rrr�r~r�rrurr#rrr$r'rt�AttributeErrorrr+r0r;rArGrUrIr[r_rarmrrr<ryr�r=r%rrrr
�<module>s\



(
+I





jJPKX[|����&__pycache__/spawn.cpython-38.opt-1.pycnu�[���U

e5d��@s�dZddlZddlZddlmZmZddlmZddlm	Z	ddd�Z
d	d
�Zddd�Zej
d
krjdadaddd�Zddd�ZdS)z�distutils.spawn

Provides the 'spawn()' function, a front-end to various platform-
specific functions for launching another program in a sub-process.
Also provides the 'find_executable()' to search the path for a given
executable name.
�N)�DistutilsPlatformError�DistutilsExecError)�DEBUG)�log�cCsNt|�}tjdkr"t|||d�n(tjdkr<t|||d�ntdtj��dS)a�Run another program, specified as a command list 'cmd', in a new process.

    'cmd' is just the argument list for the new process, ie.
    cmd[0] is the program to run and cmd[1:] are the rest of its arguments.
    There is no way to run a program with a name different from that of its
    executable.

    If 'search_path' is true (the default), the system's executable
    search path will be used to find the program; otherwise, cmd[0]
    must be the exact path to the executable.  If 'dry_run' is true,
    the command will not actually be run.

    Raise DistutilsExecError if running the program fails in any way; just
    return on success.
    �posix)�dry_run�ntz1don't know how to spawn programs on platform '%s'N)�list�os�name�_spawn_posix�	_spawn_ntr)�cmd�search_path�verboser�r�'/usr/lib64/python3.8/distutils/spawn.py�spawns

�rcCs*t|�D]\}}d|krd|||<q|S)z�Quote command-line arguments for DOS/Windows conventions.

    Just wraps every argument which contains blanks in double quotes, and
    returns a new argument list.
    � z"%s")�	enumerate)�args�i�argrrr�_nt_quote_args+src
Cs�|d}t|�}|r t|�p|}t�d�|g|dd���|s�zt�tj||�}Wn@tk
r�}z"t	sp|}t
d||jdf��W5d}~XYnX|dkr�t	s�|}t
d||f��dS)Nrrr�command %r failed: %s����%command %r failed with exit status %d)r�find_executabler�info�joinr�spawnv�P_WAIT�OSErrorrrr)rrrr�
executableZrc�excrrrr;s(�
�r�darwinc
Cs|t�d�|��|rdS|d}|r*tjp.tj}d}tjdkr�tdkrxddl	m
}|�d�p^datrxdd�t�d	�D�a
tr�tj�dt�}t
d
d�|�d	�D�kr�d|tf}	t|	��ttj|d�}|r�tjp�tj}t��}
|
dk�r�z$|dkr�|||�n||||�WnNtk
�rX}z.t�s(|}tj�d
||jf�t�d�W5d}~XYnXt�sd|}tj�d|�t�d�n�zt�|
d�\}
}WnDtk
�r�}
z$t�s�|}td||
jdf��W5d}
~
XYnXt�|��rt�s�|}td|t�|�f��nlt� |��rHt�!|�}|dk�r,dSt�s6|}td||f��n,t�"|��rZ�q�nt�sd|}td||f���q�dS)Nrrr&)�	sysconfig�MACOSX_DEPLOYMENT_TARGET�cSsg|]}t|��qSr��int��.0�xrrr�
<listcomp>esz _spawn_posix.<locals>.<listcomp>�.cSsg|]}t|��qSrr*r,rrrr/kszF$MACOSX_DEPLOYMENT_TARGET mismatch: now "%s" but "%s" during configure)r(zunable to execute %r: %s
rz(unable to execute %r for unknown reasonsrrz"command %r terminated by signal %drz1unknown error executing %r: termination status %d)#rrr r�execvp�execv�sys�platform�_cfg_target�	distutilsr'Zget_config_var�split�_cfg_target_split�environ�getr�dict�execvpe�execve�forkr#r�stderr�write�strerror�_exit�waitpidrr�WIFSIGNALED�WTERMSIG�	WIFEXITED�WEXITSTATUS�
WIFSTOPPED)rrrrr$Zexec_fn�envr'Z
cur_targetZmy_msg�pid�eZstatusr%Zexit_statusrrrr
Ws�
����
����

����r
c	Cs�tj�|�\}}tjdkr*|dkr*|d}tj�|�r:|S|dkr�tj�dd�}|dkr�zt�d�}Wnt	t
fk
r�tj}YnX|s�dS|�tj
�}|D]&}tj�||�}tj�|�r�|Sq�dS)z�Tries to find 'executable' in the directories listed in 'path'.

    A string listing directories separated by 'os.pathsep'; defaults to
    os.environ['PATH'].  Returns the complete filename or None if not found.
    Zwin32z.exeN�PATH�CS_PATH)r�path�splitextr3r4�isfiler9r:�confstr�AttributeError�
ValueError�defpathr7�pathsepr )r$rN�_Zext�paths�p�frrrr�s(
r)rrr)rrr)rrr)N)�__doc__r3rZdistutils.errorsrrZdistutils.debugrr6rrrrr4r5r8r
rrrrr�<module>s



RPKX[0�oa����%__pycache__/dist.cpython-38.opt-1.pycnu�[���U

e5d���@s�dZddlZddlZddlZddlmZzddlZWnek
rLdZYnXddlTddl	m
Z
mZddlm
Z
mZmZddlmZddlmZe�d	�Zd
d�ZGdd
�d
�ZGdd�d�Zdd�ZdS)z}distutils.dist

Provides the Distribution class, which represents the module distribution
being built/installed/distributed.
�N)�message_from_file)�*)�FancyGetopt�translate_longopt)�
check_environ�	strtobool�
rfc822_escape��log)�DEBUGz^[a-zA-Z]([a-zA-Z0-9_]*)$cCsLt|t�rn<t|t�sHt|�j}d|�d|�d�}t�tj|�t|�}|S)Nz
Warning: 'z' should be a list, got type '�')�
isinstance�str�list�type�__name__r
ZWARN)�valueZ	fieldname�typename�msg�r�&/usr/lib64/python3.8/distutils/dist.py�_ensure_lists


rc@speZdZdZdddddgZdZdd	d
ddd
dddddddddddddddgZdd�eD�Zdd iZdad"d#�Z	d$d%�Z
dbd'd(�Zd)d*�Zdcd+d,�Z
d-d.�Zd/d0�Zd1d2�Zd3d4�Zd5d5gfd6d7�Zd8d9�Zd:d;�Zd<d=�Zd>d?�Zd@dA�ZdBdC�ZdddDdE�ZdedFdG�ZdfdIdJ�ZejfdKdL�ZdMdN�ZdOdP�Z dQdR�Z!dSdT�Z"dUdV�Z#dWdX�Z$dYdZ�Z%d[d\�Z&d]d^�Z'd_d`�Z(d!S)g�Distributiona�The core of the Distutils.  Most of the work hiding behind 'setup'
    is really done within a Distribution instance, which farms the work out
    to the Distutils commands specified on the command line.

    Setup scripts will almost never instantiate Distribution directly,
    unless the 'setup()' function is totally inadequate to their needs.
    However, it is conceivable that a setup script might wish to subclass
    Distribution for some specialized purpose, and then pass the subclass
    to 'setup()' as the 'distclass' keyword argument.  If so, it is
    necessary to respect the expectations that 'setup' has of Distribution.
    See the code for 'setup()', in core.py, for details.
    )�verbose�vzrun verbosely (default)�)�quiet�qz!run quietly (turns verbosity off))zdry-run�nzdon't actually do anything)�help�hzshow detailed help message)zno-user-cfgNz-ignore pydistutils.cfg in your home directoryz�Common commands: (see '--help-commands' for more)

  setup.py build      will build the package underneath 'build/'
  setup.py install    will install the package
)z
help-commandsNzlist all available commands)�nameNzprint package name)�version�Vzprint package version)�fullnameNzprint <package name>-<version>)�authorNzprint the author's name)�author-emailNz print the author's email address)�
maintainerNzprint the maintainer's name)zmaintainer-emailNz$print the maintainer's email address)�contactNz7print the maintainer's name if known, else the author's)z
contact-emailNz@print the maintainer's email address if known, else the author's)�urlNzprint the URL for this package)�licenseNz print the license of the package)�licenceNzalias for --license)�descriptionNzprint the package description)zlong-descriptionNz"print the long package description)�	platformsNzprint the list of platforms)�classifiersNzprint the list of classifiers)�keywordsNzprint the list of keywords)�providesNz+print the list of packages/modules provided)�requiresNz+print the list of packages/modules required)�	obsoletesNz0print the list of packages/modules made obsoletecCsg|]}t|d��qS)r�r)�.0�xrrr�
<listcomp>�szDistribution.<listcomp>rrNcCs\d|_d|_d|_|jD]}t||d�qt�|_|jjD] }d|}t||t|j|��q:i|_	d|_
d|_d|_i|_
g|_d|_i|_d|_d|_d|_d|_d|_d|_d|_d|_d|_d|_d|_i|_i|_|�r|�d�}|dk	�r8|d=|��D]4\}}|� |�}|��D]\}	}
d|
f||	<�q�qd|k�r~|d|d	<|d=d
}t!dk	�rnt!�"|�nt#j$�%|d�|��D]�\}}
t&|jd|��r�t|jd|�|
�nNt&|j|��r�t|j||
�n0t&||��r�t|||
�nd
t'|�}t!�"|��q�d|_(|jdk	�rP|jD].}
|
�)d��s6�qP|
dk�r d|_(�qP�q |�*�dS)a0Construct a new Distribution instance: initialize all the
        attributes of a Distribution, and then use 'attrs' (a dictionary
        mapping attribute names to values) to assign some of those
        attributes their "real" values.  (Any attributes not mentioned in
        'attrs' will be assigned to some null value: 0, None, an empty list
        or dictionary, etc.)  Most importantly, initialize the
        'command_obj' attribute to the empty dictionary; this will be
        filled in with real command objects by 'parse_command_line()'.
        rr�get_N��optionszsetup scriptr+r*z:'licence' distribution option is deprecated; use 'license'�
Zset_zUnknown distribution option: %sT�-z
--no-user-cfgF)+r�dry_runr�display_option_names�setattr�DistributionMetadata�metadata�_METHOD_BASENAMES�getattr�cmdclass�command_packages�script_name�script_args�command_optionsZ
dist_files�packagesZpackage_dataZpackage_dir�
py_modules�	libraries�headers�ext_modulesZext_packageZinclude_dirsZ
extra_path�scripts�
data_filesZpassword�command_obj�have_run�get�items�get_option_dict�warnings�warn�sys�stderr�write�hasattr�repr�
want_user_cfg�
startswith�finalize_options)�self�attrs�attr�basenameZmethod_namer9�commandZcmd_options�opt_dict�opt�valr�key�argrrr�__init__�s~








zDistribution.__init__cCs&|j�|�}|dkr"i}|j|<|S)z�Get the option dictionary for a given command.  If that
        command's option dictionary hasn't been created yet, then create it
        and return the new dictionary; otherwise, return the existing
        option dictionary.
        N)rGrQ)r^rb�dictrrrrS&szDistribution.get_option_dictr8c	Cs�ddlm}|dkr"t|j���}|dk	r@|�||�|d}|sV|�|d�dS|D]h}|j�|�}|dkr�|�|d|�qZ|�|d|�||�}|�d�D]}|�|d|�q�qZdS)Nr)�pformatz  zno commands known yetzno option dict for '%s' commandzoption dict for '%s' command:r:)Zpprintrj�sortedrG�keys�announcerQ�split)	r^�header�commands�indentrjZcmd_namerc�out�linerrr�dump_option_dicts1s*��zDistribution.dump_option_dictscCs�g}t�tj�tjdj�}tj�|d�}tj�|�rB|�	|�tj
dkrRd}nd}|jr�tj�tj�d�|�}tj�|�r�|�	|�d}tj�|�r�|�	|�t
r�|�dd	�|��|S)
a�Find as many configuration files as should be processed for this
        platform, and return a list of filenames in the order in which they
        should be parsed.  The filenames returned are guaranteed to exist
        (modulo nasty race conditions).

        There are three possible config files: distutils.cfg in the
        Distutils installation directory (ie. where the top-level
        Distutils __inst__.py file lives), a file in the user's home
        directory named .pydistutils.cfg on Unix and pydistutils.cfg
        on Windows/Mac; and setup.cfg in the current directory.

        The file in the user's home directory can be disabled with the
        --no-user-cfg option.
        �	distutilsz
distutils.cfg�posixz.pydistutils.cfgzpydistutils.cfg�~z	setup.cfgzusing config files: %sz, )r�os�path�dirnamerV�modules�__file__�join�isfile�appendr!r[�
expanduserrrm)r^�filesZsys_dirZsys_fileZ
user_filenameZ	user_fileZ
local_filerrr�find_config_filesMs&



zDistribution.find_config_filesc
Cs�ddlm}tjtjkr8ddddddd	d
ddd
ddg
}ng}t|�}|dkrT|��}trb|�d�|�}|D]�}tr�|�d|�|�	|�|�
�D]V}|�|�}|�|�}|D]8}	|	dkr�|	|kr�|�
||	�}
|	�dd�}	||
f||	<q�q�|��qld|jk�r�|jd��D]�\}	\}}
|j�
|	�}zF|�rDt||t|
��n(|	dk�r`t||	t|
��nt||	|
�Wn,tk
�r�}
zt|
��W5d}
~
XYnX�qdS)Nr)�ConfigParserzinstall-basezinstall-platbasezinstall-libzinstall-platlibzinstall-purelibzinstall-headerszinstall-scriptszinstall-data�prefixzexec-prefix�home�user�rootz"Distribution.parse_config_files():z  reading %srr;�_�global)rr<)Zconfigparserr�rVr��base_prefix�	frozensetr�rrm�readZsectionsr9rSrQ�replacerhrGrR�negative_optr>r�
ValueError�DistutilsOptionError)r^�	filenamesr�Zignore_options�parser�filenameZsectionr9rcrdre�src�aliasrrrr�parse_config_files}s^�





zDistribution.parse_config_filescCs�|��}g|_t||j�}|�|j�|�ddi�|j|j|d�}|�	�}t
�|j�|�
|�rhdS|r�|�||�}|dkrhdSqh|jr�|j|t|j�dk|jd�dS|js�td��dS)	a�Parse the setup script's command line, taken from the
        'script_args' instance attribute (which defaults to 'sys.argv[1:]'
        -- see 'setup()' in core.py).  This list is first processed for
        "global options" -- options that set attributes of the Distribution
        instance.  Then, it is alternately scanned for Distutils commands
        and options for that command.  Each new command terminates the
        options for the previous command.  The allowed options for a
        command are determined by the 'user_options' attribute of the
        command class -- thus, we have to be able to load command classes
        in order to parse the command line.  Any error in that 'options'
        attribute raises DistutilsGetoptError; any error on the
        command-line raises DistutilsArgError.  If no Distutils commands
        were found on the command line, raises DistutilsArgError.  Return
        true if command-line was successfully parsed and we should carry
        on with executing commands; false if no errors but we shouldn't
        execute commands (currently, this only happens if user asks for
        help).
        r+r*)�args�objectNr��display_optionsrpzno commands suppliedT)�_get_toplevel_optionsrprr��set_negative_aliasesr�Zset_aliases�getoptrFZget_option_orderr
Z
set_verbosityr�handle_display_options�_parse_command_optsr�
_show_help�len�DistutilsArgError)r^Ztoplevel_optionsr�r��option_orderrrr�parse_command_line�s.	
�zDistribution.parse_command_linecCs|jdgS)z�Return the non-display options recognized at the top level.

        This includes options that are recognized *only* at the top
        level as well as options recognized for commands.
        )zcommand-packages=Nz0list of packages that provide distutils commands)�global_options�r^rrrr��s�z"Distribution._get_toplevel_optionsc
Cs�ddlm}|d}t�|�s*td|��|j�|�z|�|�}Wn*tk
rn}zt	|��W5d}~XYnXt
||�s�td|��t|d�r�t
|jt�s�d}t||��|j}t|d�r�|��}|�|j�t|d	�r�t
|jt�r�t|j�}ng}|�|j|j|�|�|�|�|d
d��\}}	t|	d��rV|	j�rV|j|d|gd�dSt|d	��r�t
|jt��r�d}
|jD]F\}}}
}t|	|�|���rzd
}
t|��r�|�ntd
||f���qz|
�r�dS|�|�}t|	���D]\}}d|f||<�q�|S)a�Parse the command-line options for a single command.
        'parser' must be a FancyGetopt instance; 'args' must be the list
        of arguments, starting with the current command (whose options
        we are about to parse).  Returns a new version of 'args' with
        the next command at the front of the list; will be the empty
        list if there are no more commands on the command line.  Returns
        None if the user asked for help on this command.
        r��Commandzinvalid command name '%s'Nz&command class %s must subclass Command�user_optionszIcommand class %s must provide 'user_options' attribute (a list of tuples)r��help_optionsrrr�zYinvalid help function %r for help option '%s': must be a callable object (function, etc.)zcommand line) �
distutils.cmdr��
command_re�match�
SystemExitrpr�get_command_class�DistutilsModuleErrorr��
issubclassZDistutilsClassErrorrYr
r�rr��copy�updater��fix_help_options�set_option_tabler�r�r�rr�Z
get_attr_name�callablerS�varsrR)r^r�r�r�rbZ	cmd_classrr�r�ZoptsZhelp_option_foundZhelp_optionZshortZdesc�funcrcr!rrrrr�sr


�

�


���

�
��
z Distribution._parse_command_optscCsPdD]F}t|j|�}|dkrqt|t�rdd�|�d�D�}t|j||�qdS)z�Set final values for all the options on the Distribution
        instance, analogous to the .finalize_options() method of Command
        objects.
        �r/r-NcSsg|]}|���qSr��strip)r4Zelmrrrr6jsz1Distribution.finalize_options.<locals>.<listcomp>�,)rBr@r
rrnr>)r^r`rrrrr]`s
zDistribution.finalize_optionsrc
Csddlm}ddlm}|rR|r*|��}n|j}|�|�|�|jd�t	d�|rt|�|j
�|�d�t	d�|jD]z}t|t
�r�t||�r�|}	n
|�|�}	t|	d�r�t|	jt�r�|�|	jt|	j��n|�|	j�|�d|	j�t	d�qzt	||j��d	S)
abShow help for the setup script command-line in the form of
        several lists of command-line options.  'parser' should be a
        FancyGetopt instance; do not expect it to be returned in the
        same state, as its option table will be reset to make it
        generate the correct help text.

        If 'global_options' is true, lists the global options:
        --verbose, --dry-run, etc.  If 'display_options' is true, lists
        the "display-only" options: --name, --version, etc.  Finally,
        lists per-command help for every command name or command class
        in 'commands'.
        r��	gen_usager�z
Global options:r8zKInformation display options (just display information, ignore any commands)r�zOptions for '%s' command:N)�distutils.corer�r�r�r�r�r�Z
print_help�common_usage�printr�rpr
rr�r�rYr�rr�r�rrE)
r^r�r�r�rpr�r�r9rb�klassrrrr�ms:

�



��
zDistribution._show_helpc	Cs�ddlm}|jr4|��td�t||j��dSd}i}|jD]}d||d<qB|D]l\}}|rX|�|�rXt|�}t	|j
d|��}|dkr�td�|��n |dkr�td	�|��nt|�d}qX|S)
z�If there were any non-global "display-only" options
        (--help-commands or the metadata display options) on the command
        line, display the requested info and return true; else return
        false.
        rr�r8rr7r�r�)r.r0r1r2r:)r�r�Z
help_commands�print_commandsr�rEr�rQrrBr@r})	r^r�r�Zany_display_optionsZis_display_option�optionrdrerrrrr��s*
z#Distribution.handle_display_optionsc	Csjt|d�|D]T}|j�|�}|s.|�|�}z
|j}Wntk
rPd}YnXtd|||f�qdS)zZPrint a subset of the list of all commands -- used by
        'print_commands()'.
        �:�(no description available)z
  %-*s  %sN)r�rCrQr�r,�AttributeError)r^rpro�
max_length�cmdr�r,rrr�print_command_list�s


zDistribution.print_command_listcCs�ddl}|jj}i}|D]}d||<qg}|j��D]}|�|�s4|�|�q4d}||D]}t|�|krZt|�}qZ|�|d|�|r�t	�|�|d|�dS)anPrint out a help message listing all available commands with a
        description of each.  The list is divided into "standard commands"
        (listed in distutils.command.__all__) and "extra commands"
        (mentioned in self.cmdclass, but not a standard command).  The
        descriptions come from the command class attribute
        'description'.
        rNrzStandard commandszExtra commands)
�distutils.commandrb�__all__rCrlrQrr�r�r�)r^ru�std_commands�is_stdr��extra_commandsr�rrrr��s.


��zDistribution.print_commandsc		Cs�ddl}|jj}i}|D]}d||<qg}|j��D]}|�|�s4|�|�q4g}||D]P}|j�|�}|sx|�|�}z
|j}Wnt	k
r�d}YnX|�||f�qZ|S)a>Get a list of (command, description) tuples.
        The list is divided into "standard commands" (listed in
        distutils.command.__all__) and "extra commands" (mentioned in
        self.cmdclass, but not a standard command).  The descriptions come
        from the command class attribute 'description'.
        rNrr�)
r�rbr�rCrlrQrr�r,r�)	r^rur�r�r�r��rvr�r,rrr�get_command_list�s(	




zDistribution.get_command_listcCsN|j}t|t�sJ|dkrd}dd�|�d�D�}d|krD|�dd�||_|S)z9Return a list of packages from which commands are loaded.Nr8cSsg|]}|dkr|���qS)r8r�)r4Zpkgrrrr6!sz5Distribution.get_command_packages.<locals>.<listcomp>r�zdistutils.commandr)rDr
rrn�insert)r^Zpkgsrrr�get_command_packagess
z!Distribution.get_command_packagesc	Cs�|j�|�}|r|S|��D]�}d||f}|}zt|�tj|}Wntk
r^YqYnXzt||�}Wn&tk
r�t	d|||f��YnX||j|<|St	d|��dS)aoReturn the class that implements the Distutils command named by
        'command'.  First we check the 'cmdclass' dictionary; if the
        command is mentioned there, we fetch the class object from the
        dictionary and return it.  Otherwise we load the command module
        ("distutils.command." + command) and fetch the command class from
        the module.  The loaded class is also stored in 'cmdclass'
        to speed future calls to 'get_command_class()'.

        Raises DistutilsModuleError if the expected module could not be
        found, or if that module does not define the expected class.
        z%s.%sz3invalid command '%s' (no class '%s' in module '%s')zinvalid command '%s'N)
rCrQr��
__import__rVr{�ImportErrorrBr�r�)r^rbr�ZpkgnameZmodule_nameZ
klass_name�modulerrrr�'s,
��

zDistribution.get_command_classcCsl|j�|�}|sh|rhtr&|�d|�|�|�}||�}|j|<d|j|<|j�|�}|rh|�||�|S)aReturn the command object for 'command'.  Normally this object
        is cached on a previous call to 'get_command_obj()'; if no command
        object for 'command' is in the cache, then we either create and
        return it (if 'create' is true) or return None.
        z<Distribution.get_command_obj(): creating '%s' command objectr)rOrQrrmr�rPrG�_set_command_options)r^rbZcreate�cmd_objr�r9rrr�get_command_objMs�

zDistribution.get_command_objcCs\|��}|dkr|�|�}tr,|�d|�|��D�] \}\}}trZ|�d|||f�zdd�|jD�}Wntk
r�g}YnXz
|j}Wntk
r�i}YnXz|t|t	�}	||kr�|	r�t
|||t|��nJ||kr�|	r�t
||t|��n,t||��rt
|||�nt
d|||f��Wq4tk
�rT}
zt
|
��W5d}
~
XYq4Xq4dS)aySet the options for 'command_obj' from 'option_dict'.  Basically
        this means copying elements of a dictionary ('option_dict') to
        attributes of an instance ('command').

        'command_obj' must be a Command instance.  If 'option_dict' is not
        supplied, uses the standard option dictionary for this command
        (from 'self.command_options').
        Nz#  setting options for '%s' command:z    %s = %s (from %s)cSsg|]}t|��qSrr3)r4�orrrr6|s�z5Distribution._set_command_options.<locals>.<listcomp>z1error in %s: command '%s' has no such option '%s')�get_command_namerSrrmrRZboolean_optionsr�r�r
rr>rrYr�r�)r^rOZoption_dict�command_namer��sourcerZ	bool_optsZneg_optZ	is_stringrrrrr�hsF	

��




��z!Distribution._set_command_optionsrcCs|ddlm}t||�s&|}|�|�}n|��}|js8|S|��d|_d|j|<|�|�|rx|�	�D]}|�
||�qf|S)a�Reinitializes a command to the state it was in when first
        returned by 'get_command_obj()': ie., initialized but not yet
        finalized.  This provides the opportunity to sneak option
        values in programmatically, overriding or supplementing
        user-supplied values from the config files and command line.
        You'll have to re-finalize the command object (by calling
        'finalize_options()' or 'ensure_finalized()') before using it for
        real.

        'command' should be a command name (string) or command object.  If
        'reinit_subcommands' is true, also reinitializes the command's
        sub-commands, as declared by the 'sub_commands' class attribute (if
        it has one).  See the "install" command for an example.  Only
        reinitializes the sub-commands that actually matter, ie. those
        whose test predicates return true.

        Returns the reinitialized command object.
        rr�)r�r�r
r�r�Z	finalizedZinitialize_optionsrPr�Zget_sub_commands�reinitialize_command)r^rbZreinit_subcommandsr�r��subrrrr��s


z!Distribution.reinitialize_commandcCst�||�dS�Nr	)r^r�levelrrrrm�szDistribution.announcecCs|jD]}|�|�qdS)z�Run each command that was seen on the setup script command line.
        Uses the list of commands found and cache of command objects
        created by 'get_command_obj()'.
        N)rp�run_command)r^r�rrr�run_commands�s
zDistribution.run_commandscCsD|j�|�rdSt�d|�|�|�}|��|��d|j|<dS)a�Do whatever it takes to run a command (including nothing at all,
        if the command has already been run).  Specifically: if we have
        already created and run the command named by 'command', return
        silently without doing anything.  If the command named by 'command'
        doesn't even have a command object yet, create one.  Then invoke
        'run()' on that command object (or an existing one).
        Nz
running %sr)rPrQr
�infor�Zensure_finalized�run)r^rbr�rrrr��s	
zDistribution.run_commandcCst|jp|jpg�dkS�Nr)r�rHrIr�rrr�has_pure_modules�szDistribution.has_pure_modulescCs|jot|j�dkSr�)rLr�r�rrr�has_ext_modules�szDistribution.has_ext_modulescCs|jot|j�dkSr�)rJr�r�rrr�has_c_libraries�szDistribution.has_c_librariescCs|��p|��Sr�)r�r�r�rrr�has_modules�szDistribution.has_modulescCs|jot|j�dkSr�)rKr�r�rrr�has_headers�szDistribution.has_headerscCs|jot|j�dkSr�)rMr�r�rrr�has_scripts�szDistribution.has_scriptscCs|jot|j�dkSr�)rNr�r�rrr�has_data_files�szDistribution.has_data_filescCs|��o|��o|��Sr�)r�r�r�r�rrr�is_pure�s
��zDistribution.is_pure)N)NNr8)N)r)N)r))r�
__module__�__qualname__�__doc__r�r�r�r=r�rhrSrtr�r�r�r�r�r]r�r�r�r�r�r�r�r�r�r�r
�INFOrmr�r�r�r�r�r�r�r�r�r�rrrrr,s��	�,

0
:C[
�
2(!"&

,
)
rc@seZdZdZdZdBdd�Zdd�Zdd	�Zd
d�Zdd
�Z	dd�Z
dd�Zdd�Zdd�Z
dd�Zdd�Zdd�Zdd�Zdd�Zd d!�Zd"d#�ZeZd$d%�Zd&d'�Zd(d)�Zd*d+�Zd,d-�Zd.d/�Zd0d1�Zd2d3�Zd4d5�Zd6d7�Zd8d9�Z d:d;�Z!d<d=�Z"d>d?�Z#d@dA�Z$dS)Cr?z]Dummy class to hold the distribution meta-data: name, version,
    author, and so forth.
    )r!r"r%�author_emailr'�maintainer_emailr)r*r,�long_descriptionr/r-r$r(Z
contact_emailr.�download_urlr0r1r2NcCs�|dk	r|�t|��nfd|_d|_d|_d|_d|_d|_d|_d|_	d|_
d|_d|_d|_
d|_d|_d|_d|_d|_dSr�)�
read_pkg_file�openr!r"r%r�r'r�r)r*r,r�r/r-r.r�r0r1r2)r^ryrrrrh
s&zDistributionMetadata.__init__cst|���fdd�}�fdd�}�d}|d�|_|d�|_|d�|_|d	�|_d
|_|d�|_d
|_|d�|_|d
�|_	d�kr�|d�|_
nd
|_
|d�|_|d�|_d�kr�|d��d�|_
|d�|_|d�|_|dkr�|d�|_|d�|_|d�|_nd
|_d
|_d
|_d
S)z-Reads the metadata values from a file object.cs�|}|dkrdS|S�NZUNKNOWNr)r!r�rrr�_read_field(sz7DistributionMetadata.read_pkg_file.<locals>._read_fieldcs��|d�}|gkrdS|Sr�)Zget_all)r!�valuesr�rr�
_read_list.sz6DistributionMetadata.read_pkg_file.<locals>._read_listzmetadata-versionr!r"Zsummaryr%Nr&z	home-pager*zdownload-urlr,r/r��platformZ
classifier�1.1r1r0r2)rr!r"r,r%r'r�r�r)r*r�r�rnr/r-r.r1r0r2)r^�filer�r�Zmetadata_versionrr�rr�$s:












z"DistributionMetadata.read_pkg_filec	Cs2ttj�|d�ddd��}|�|�W5QRXdS)z7Write the PKG-INFO file into the release tree.
        zPKG-INFO�wzUTF-8)�encodingN)r�rxryr}�write_pkg_file)r^Zbase_dirZpkg_inforrr�write_pkg_infoXs
�z#DistributionMetadata.write_pkg_infocCsbd}|js"|js"|js"|js"|jr&d}|�d|�|�d|���|�d|���|�d|���|�d|�	��|�d|�
��|�d	|���|�d
|���|jr�|�d|j�t
|���}|�d|�d
�|���}|�r|�d|�|�|d|���|�|d|���|�|d|���|�|d|���|�|d|���dS)z9Write the PKG-INFO format data to a file object.
        z1.0r�zMetadata-Version: %s
z	Name: %s
zVersion: %s
zSummary: %s
zHome-page: %s
zAuthor: %s
zAuthor-email: %s
zLicense: %s
zDownload-URL: %s
zDescription: %s
r�z
Keywords: %s
ZPlatformZ
ClassifierZRequiresZProvidesZ	ObsoletesN)r0r1r2r.r�rX�get_name�get_version�get_description�get_url�get_contact�get_contact_email�get_licenser�get_long_descriptionr}�get_keywords�_write_list�
get_platforms�get_classifiers�get_requires�get_provides�
get_obsoletes)r^rr"Z	long_descr/rrrr_s6��z#DistributionMetadata.write_pkg_filecCs |D]}|�d||f�qdS)Nz%s: %s
)rX)r^rr!r�rrrrr�sz DistributionMetadata._write_listcCs
|jpdSr�)r!r�rrrr�szDistributionMetadata.get_namecCs
|jpdS)Nz0.0.0)r"r�rrrr�sz DistributionMetadata.get_versioncCsd|��|��fS)Nz%s-%s)rrr�rrr�get_fullname�sz!DistributionMetadata.get_fullnamecCs
|jpdSr�)r%r�rrr�
get_author�szDistributionMetadata.get_authorcCs
|jpdSr�)r�r�rrr�get_author_email�sz%DistributionMetadata.get_author_emailcCs
|jpdSr�)r'r�rrr�get_maintainer�sz#DistributionMetadata.get_maintainercCs
|jpdSr�)r�r�rrr�get_maintainer_email�sz)DistributionMetadata.get_maintainer_emailcCs|jp|jpdSr�)r'r%r�rrrr	�sz DistributionMetadata.get_contactcCs|jp|jpdSr�)r�r�r�rrrr
�sz&DistributionMetadata.get_contact_emailcCs
|jpdSr�)r)r�rrrr�szDistributionMetadata.get_urlcCs
|jpdSr�)r*r�rrrr�sz DistributionMetadata.get_licensecCs
|jpdSr�)r,r�rrrr�sz$DistributionMetadata.get_descriptioncCs
|jpdSr�)r�r�rrrr�sz)DistributionMetadata.get_long_descriptioncCs
|jpgSr�)r/r�rrrr
�sz!DistributionMetadata.get_keywordscCst|d�|_dS)Nr/)rr/�r^rrrr�set_keywords�sz!DistributionMetadata.set_keywordscCs|jp
dgSr�)r-r�rrrr�sz"DistributionMetadata.get_platformscCst|d�|_dS)Nr-)rr-rrrr�
set_platforms�sz"DistributionMetadata.set_platformscCs
|jpgSr�)r.r�rrrr�sz$DistributionMetadata.get_classifierscCst|d�|_dS)Nr.)rr.rrrr�set_classifiers�sz$DistributionMetadata.set_classifierscCs
|jpdSr�)r�r�rrr�get_download_url�sz%DistributionMetadata.get_download_urlcCs
|jpgSr�)r1r�rrrr�sz!DistributionMetadata.get_requirescCs,ddl}|D]}|j�|�qt|�|_dSr�)�distutils.versionpredicate�versionpredicate�VersionPredicaterr1�r^rrurrrr�set_requires�sz!DistributionMetadata.set_requirescCs
|jpgSr�)r0r�rrrr�sz!DistributionMetadata.get_providescCs6dd�|D�}|D]}ddl}|j�|�q||_dS)NcSsg|]}|���qSrr�)r4rrrrr6�sz5DistributionMetadata.set_provides.<locals>.<listcomp>r)rrZsplit_provisionr0)r^rrrurrr�set_provides�s
z!DistributionMetadata.set_providescCs
|jpgSr�)r2r�rrrr�sz"DistributionMetadata.get_obsoletescCs,ddl}|D]}|j�|�qt|�|_dSr�)rrr rr2r!rrr�
set_obsoletes�sz"DistributionMetadata.set_obsoletes)N)%rr�r�r�rArhr�rrrrrrrrrrr	r
rrZget_licencerrr
rrrrrrrr"rr#rr$rrrrr?�sD	
4"r?cCs$g}|D]}|�|dd��q|S)zConvert a 4-tuple 'help_options' list as found in various command
    classes to the 3-tuple form required by FancyGetopt.
    r�)r)r9Znew_optionsZ
help_tuplerrrr��sr�)r�rVrx�reZemailrrTr�Zdistutils.errorsZdistutils.fancy_getoptrrZdistutils.utilrrrrur
Zdistutils.debugr�compiler�rrr?r�rrrr�<module>s4

ZcPKX[�ht+�9�9'__pycache__/msvccompiler.cpython-38.pycnu�[���U

e5d\�@s�dZddlZddlZddlmZmZmZmZmZddl	m
Z
mZmZddl
mZdZz,ddlZdZeZejZejZejZejZWnhek
r�z4ddlZddlZdZeZejZejZejZejZWnek
r�e�d�YnXYnXe�rejejej ej!fZ"d	d
�Z#dd�Z$d
d�Z%Gdd�d�Z&dd�Z'dd�Z(dd�Z)Gdd�de
�Z*e'�dk�r�e�+d�e*Z,ddl-m*Z*ddl-m&Z&dS)z�distutils.msvccompiler

Contains MSVCCompiler, an implementation of the abstract CCompiler class
for the Microsoft Visual Studio.
�N)�DistutilsExecError�DistutilsPlatformError�CompileError�LibError�	LinkError)�	CCompiler�gen_preprocess_options�gen_lib_options)�logFTz�Warning: Can't read registry to find the necessary compiler setting
Make sure that Python modules winreg, win32api or win32con are installed.cCsnzt||�}Wntk
r$YdSXg}d}zt||�}Wntk
rTYqjYnX|�|�|d7}q.|S)zReturn list of registry keys.Nr�)�RegOpenKeyEx�RegError�
RegEnumKey�append)�base�key�handle�L�i�k�r�./usr/lib64/python3.8/distutils/msvccompiler.py�	read_keys7s


rcCs�zt||�}Wntk
r$YdSXi}d}zt||�\}}}Wntk
rZYq~YnX|��}t|�|t|�<|d7}q.|S)zXReturn dict of registry keys and values.

    All names are converted to lowercase.
    Nrr)rr
�RegEnumValue�lower�convert_mbcs)rrr�dr�name�value�typerrr�read_valuesHs

r cCs:t|dd�}|dk	r6z|d�}Wntk
r4YnX|S)N�decode�mbcs)�getattr�UnicodeError)�sZdecrrrr]src@s,eZdZdd�Zdd�Zdd�Zdd�Zd	S)
�
MacroExpandercCsi|_|�|�dS�N)�macros�load_macros)�self�versionrrr�__init__gszMacroExpander.__init__cCs2tD](}t||�}|r|||jd|<q.qdS)Nz$(%s))�HKEYSr r()r*Zmacro�pathrrrrrr�	set_macroks

zMacroExpander.set_macroc

Cs�d|}|�d|dd�|�d|dd�d}|�d|d	�z*|d
krX|�d|d�n|�d|d
�Wn*tk
r�}ztd��W5d}~XYnXd}tD]V}zt||�}Wntk
r�Yq�YnXt|d�}t|d||f�}	|	d|jd<q�dS)Nz%Software\Microsoft\VisualStudio\%0.1fZVCInstallDirz	\Setup\VCZ
productdirZVSInstallDirz	\Setup\VSz Software\Microsoft\.NETFrameworkZFrameworkDirZinstallrootg@ZFrameworkSDKDirzsdkinstallrootv1.1ZsdkinstallrootaPython was built with Visual Studio 2003;
extensions must be built with a compiler than can generate compatible binaries.
Visual Studio 2003 was not found on this system. If you have Cygwin installed,
you can try compiling with MingW32, by passing "-c mingw32" to setup.py.z.Software\Microsoft\NET Framework Setup\Productrz%s\%sr+z$(FrameworkVersion))	r/�KeyErrorrr-rr
rr r()
r*r+ZvsbaseZnet�exc�pr�hrrrrrr)rs,�

zMacroExpander.load_macroscCs$|j��D]\}}|�||�}q
|Sr')r(�items�replace)r*r%r�vrrr�sub�szMacroExpander.subN)�__name__�
__module__�__qualname__r,r/r)r7rrrrr&fsr&cCs�d}tj�|�}|dkrdS|t|�}tj|d��dd�\}}t|dd��d}|dkrf|d7}t|d	d
��d}|dkr�d}|dkr�||SdS)
z�Return the version of MSVC that was used to build Python.

    For Python 2.3 and up, the version number is included in
    sys.version.  For earlier versions, assume the compiler is MSVC 6.
    zMSC v.����N� r����
��g$@r)�sysr+�find�len�split�int)�prefixrr%�restZmajorVersionZminorVersionrrr�get_build_version�srIcCs@d}tj�|�}|dkrdStj�d|�}tj|t|�|�S)zUReturn the processor architecture.

    Possible results are "Intel" or "AMD64".
    z bit (r;�Intel�))rBr+rCrD)rGr�jrrr�get_build_architecture�srMcCs0g}|D]"}tj�|�}||kr|�|�q|S)znReturn a list of normalized paths with duplicates removed.

    The current order of paths is maintained.
    )�osr.�normpathr)�pathsZ
reduced_pathsr2Znprrr�normalize_and_reduce_paths�srQc
@s�eZdZdZdZiZdgZdddgZdgZdgZ	eeee	Z
d	Zd
ZdZ
dZd
ZZdZd-dd�Zdd�Zd.dd�Zd/dd�Zd0dd�Zd1dd�Zdd�Zd d!�Zd"d#�Zd2d$d%�Zd&d'�Zd3d)d*�Zd+d,�ZdS)4�MSVCCompilerzwConcrete class that implements an interface to Microsoft Visual C++,
       as defined by the CCompiler abstract class.Zmsvcz.cz.ccz.cppz.cxx�.rcz.mcz.resz.objz.libz.dllz%s%sz.exercCsvt�||||�t�|_t�|_|jdkr\|jdkrHd|_t|j�|_nd|_d|j|_	nd|jd|_	d|_
dS)	NrJ�zSoftware\Microsoft\VisualStudiozSoftware\Microsoft\DevstudiozVisual Studio version %szMicrosoft SDK compiler %sr<F)rr,rI�_MSVCCompiler__versionrM�_MSVCCompiler__arch�_MSVCCompiler__rootr&�_MSVCCompiler__macros�_MSVCCompiler__product�initialized)r*�verboseZdry_runZforcerrrr,�s

zMSVCCompiler.__init__cCs�g|_dtjkrDdtjkrD|�d�rDd|_d|_d|_d|_d|_nx|�	d�|_t
|j�d	krltd
|j��|�d�|_|�d�|_|�d�|_|�d�|_|�d�|_|�
d�|�
d�z&tjd�d
�D]}|j�|�q�Wntk
r�YnXt|j�|_d
�|j�tjd<d|_|jdk�rPddddddg|_dddddddg|_n&ddddddg|_dddddddg|_dddg|_|jdk�r�ddddg|_ndddddg|_dg|_d |_dS)!NZDISTUTILS_USE_SDKZMSSdkzcl.exezlink.exezlib.exezrc.exezmc.exer.rzxPython was built with %s, and extensions need to be built with the same version of the compiler, but it isn't installed.�libZinclude�;rJz/nologoz/Oxz/MDz/W3z/GXz/DNDEBUGz/Odz/MDdz/Z7z/D_DEBUGz/GS-z/DLLz/INCREMENTAL:NOrTz/INCREMENTAL:noz/DEBUGz	/pdb:NoneT)�_MSVCCompiler__pathsrN�environ�find_exe�cc�linkerr\�rc�mc�get_msvc_pathsrDrrY�set_path_env_varrErr0rQ�joinZpreprocess_optionsrV�compile_options�compile_options_debug�ldflags_sharedrU�ldflags_shared_debugZldflags_staticrZ)r*r2rrr�
initialize�sr�


�
�
�
���zMSVCCompiler.initialize�cCs�|dkrd}g}|D]�}tj�|�\}}tj�|�d}|tj�|�d�}||jkrbtd|��|rrtj�|�}||jkr�|�	tj�
|||j��q||jkr�|�	tj�
|||j��q|�	tj�
|||j
��q|S)NrmrzDon't know how to compile %s)rNr.�splitext�
splitdrive�isabs�src_extensionsr�basename�_rc_extensionsrrg�
res_extension�_mc_extensions�
obj_extension)r*Zsource_filenamesZ	strip_dir�
output_dirZ	obj_namesZsrc_namer�extrrr�object_filenames8s.

�
��zMSVCCompiler.object_filenamesNc	Csp|js|��|�||||||�}	|	\}}
}}}|p6g}
|
�d�|rT|
�|j�n|
�|j�|
D�]}z||\}}Wntk
r�YqdYnX|r�tj	�
|�}||jkr�d|}�nT||jkr�d|}�n>||j
k�r<|}d|}z"|�|jg||g|g�Wqdtk
�r6}zt|��W5d}~XYqdXqdn�||jk�r�tj	�|�}tj	�|�}zl|�|jgd|d|g|g�tj	�tj	�|��\}}tj	�||d�}|�|jgd|g|g�Wqdtk
�r�}zt|��W5d}~XYqdXqdntd||f��d	|}z&|�|jg|
|||g|�Wqdtk
�rh}zt|��W5d}~XYqdXqd|
S)
Nz/cz/Tcz/Tpz/foz-hz-rrSz"Don't know how to compile %s to %sz/Fo)rZrlZ_setup_compiler�extendrirhr0rNr.�abspath�
_c_extensions�_cpp_extensionsrs�spawnrcrrru�dirnamerdrnrrrgra)r*Zsourcesrwr(Zinclude_dirs�debug�
extra_preargs�extra_postargsZdependsZcompile_info�objectsZpp_optsZbuildZcompile_opts�obj�srcrxZ	input_optZ
output_opt�msgZh_dirZrc_dirr�_Zrc_filerrr�compileWs�
�




��


��
��
���
zMSVCCompiler.compilec	
Cs�|js|��|�||�\}}|j||d�}|�||�r�|d|g}|rJz|�|jg|�Wq�tk
r�}zt|��W5d}~XYq�Xnt	�
d|�dS)N)rw�/OUT:�skipping %s (up-to-date))rZrl�_fix_object_args�library_filename�
_need_linkr~r\rrr
r�)	r*r�Zoutput_libnamerwr��target_lang�output_filenameZlib_argsr�rrr�create_static_lib�s�zMSVCCompiler.create_static_libc
Cs�|js|��|�||�\}}|�|||�}|\}}}|rL|�dt|��t||||�}|dk	rptj�	||�}|�
||��r�|tjkr�|	r�|j
dd�}q�|jdd�}n|	r�|j
}n|j}g}|p�gD]}|�d|�q�||||d|g}|dk	�rHtj�tj�|��\}}tj�	tj�|d�|�|��}|�d|�|
�rZ|
|dd�<|�rj|�|�|�tj�|��z|�|jg|�Wn,tk
�r�}zt|��W5d}~XYnXnt�d|�dS)Nz5I don't know what to do with 'runtime_library_dirs': rz/EXPORT:r�rz/IMPLIB:r�)rZrlr�Z
_fix_lib_args�warn�strr	rNr.rgr�rZ
EXECUTABLErkrjrrnrrrr�rzZmkpathr~rbrrr
r�)r*Ztarget_descr�r�rwZ	librariesZlibrary_dirsZruntime_library_dirsZexport_symbolsr�r�r�Z
build_tempr�Z
fixed_argsZlib_optsZldflagsZexport_optsZsymZld_argsZdll_nameZdll_extZimplib_filer�rrr�link�sj�
��

��

��
zMSVCCompiler.linkcCsd|S)Nz	/LIBPATH:r�r*�dirrrr�library_dir_optionszMSVCCompiler.library_dir_optioncCstd��dS)Nz<don't know how to set runtime library search path for MSVC++)rr�rrr�runtime_library_dir_options�z'MSVCCompiler.runtime_library_dir_optioncCs
|�|�Sr')r�)r*r\rrr�library_optionszMSVCCompiler.library_optioncCs\|r|d|g}n|g}|D]:}|D]0}tj�||�|��}tj�|�r$|Sq$qdS)NZ_d)rNr.rgr��exists)r*�dirsr\r�Z	try_namesr�rZlibfilerrr�find_library_file#szMSVCCompiler.find_library_filecCsz|jD].}tj�tj�|�|�}tj�|�r|Sqtjd�d�D].}tj�tj�|�|�}tj�|�rF|SqF|S)a�Return path to an MSVC executable program.

        Tries to find the program in several places: first, one of the
        MSVC program search paths from the registry; next, the directories
        in the PATH environment variable.  If any of those work, return an
        absolute path that is known to exist.  If none of them work, just
        return the original program name, 'exe'.
        �Pathr])r^rNr.rgr{�isfiler_rE)r*Zexer2�fnrrrr`5s	


zMSVCCompiler.find_exe�x86cCs�tsgS|d}|jdkr,d|j|jf}nd|j|f}tD]H}t||�}|r>|jdkrt|j�||��d�S||�d�Sq>|jdkr�tD]&}t|d|j�dk	r�|�d	�q�q�gS)
z�Get a list of devstudio directories (include, lib or path).

        Return a list of strings.  The list will be empty if unable to
        access the registry or appropriate registry keys not found.
        z dirsrTz6%s\%0.1f\VC\VC_OBJECTS_PLATFORM_INFO\Win32\Directoriesz?%s\6.0\Build System\Components\Platforms\Win32 (%s)\Directoriesr]r<z%s\6.0Nz�It seems you have Visual Studio 6 installed, but the expected registry settings are not present.
You must at least run the Visual Studio GUI once so that these entries are created.)	�
_can_read_regrUrWr-r rXr7rEr�)r*r.�platformrrrrrrreKs,

��



zMSVCCompiler.get_msvc_pathscCs6|dkr|�d�}n
|�|�}|r2d�|�tj|<dS)z�Set environment variable 'name' to an MSVC path type value.

        This is equivalent to a SET command prior to execution of spawned
        commands.
        r\Zlibraryr]N)rergrNr_)r*rr2rrrrfos

zMSVCCompiler.set_path_env_var)rrr)rrm)NNNrNNN)NrN)
NNNNNrNNNN)r)r�)r8r9r:�__doc__Z
compiler_typeZexecutablesr|r}rsrurqrtrvZstatic_lib_extensionZshared_lib_extensionZstatic_lib_formatZshared_lib_formatZ
exe_extensionr,rlryr�r�r�r�r�r�r�r`rerfrrrrrR�sj
��
B�
 �
X�
�
S

$rRg @z3Importing new compiler from distutils.msvc9compiler)rR)r&).r�rBrNZdistutils.errorsrrrrrZdistutils.ccompilerrrr	Z	distutilsr
r��winregZhkey_modZ	OpenKeyExrZEnumKeyrZ	EnumValuer�errorr
�ImportErrorZwin32apiZwin32con�infoZ
HKEY_USERS�HKEY_CURRENT_USER�HKEY_LOCAL_MACHINEZHKEY_CLASSES_ROOTr-rr rr&rIrMrQrRr�ZOldMSVCCompilerZdistutils.msvc9compilerrrrr�<module>s`



�	-
9
PKX[�uU]]-__pycache__/bcppcompiler.cpython-38.opt-2.pycnu�[���U

e5dW:�@stddlZddlmZmZmZmZmZmZddlm	Z	m
Z
mZddlm
Z
ddlmZddlmZGdd�de	�ZdS)	�N)�DistutilsExecError�DistutilsPlatformError�CompileError�LibError�	LinkError�UnknownFileError)�	CCompiler�gen_preprocess_options�gen_lib_options)�
write_file)�newer)�logc
@s�eZdZdZiZdgZdddgZeeZdZdZ	dZ
d	ZZd
Z
ddd
�Zddd�Zddd�Zddd�Zd dd�Zd!dd�Zd"dd�ZdS)#�BCPPCompilerZbcppz.cz.ccz.cppz.cxxz.objz.libz.dllz%s%sz.exercCs�t�||||�d|_d|_d|_d|_ddddg|_ddddg|_d	d
ddg|_d	d
ddg|_	g|_
d
ddg|_d
dddg|_dS)
Nz	bcc32.exezilink32.exeztlib.exez/tWMz/O2z/qz/g0z/Odz/Tpdz/Gnz/xz/r)
r�__init__�cc�linker�libZpreprocess_options�compile_options�compile_options_debug�ldflags_shared�ldflags_shared_debugZldflags_static�ldflags_exe�ldflags_exe_debug)�self�verboseZdry_run�force�r�./usr/lib64/python3.8/distutils/bcppcompiler.pyr5szBCPPCompiler.__init__Nc	Cs�|�||||||�\}}	}}
}|p$g}|�d�|rB|�|j�n|�|j�|	D�]<}
z||
\}}Wntk
r�YqRYnXtj�|�}tj�|
�}
|�	tj�
|
��|dkr�qR|dk�rz|�dd|
|g�WqRtk
�r}zt
|��W5d}~XYqRXqR||jk�rd}n||jk�r*d}nd}d|
}z,|�|jg||
||g||g�WqRtk
�r�}zt
|��W5d}~XYqRXqR|	S)	Nz-c�.res�.rcZbrcc32z-fo�z-P�-o)Z_setup_compile�append�extendrr�KeyError�os�path�normpath�mkpath�dirname�spawnrr�
_c_extensions�_cpp_extensionsr)rZsources�
output_dir�macros�include_dirs�debug�
extra_preargs�extra_postargsZdepends�objects�pp_optsZbuildZcompile_opts�obj�src�ext�msgZ	input_optZ
output_optrrr�compileQsV��



���
zBCPPCompiler.compilec	
Cs�|�||�\}}|j||d�}|�||�r~|dg|}|r:z|�|jg|�Wq�tk
rz}zt|��W5d}~XYq�Xnt�d|�dS)N)r-z/u�skipping %s (up-to-date))	�_fix_object_args�library_filename�
_need_linkr*rrrr
r0)	rr3Zoutput_libnamer-r0�target_lang�output_filenameZlib_argsr8rrr�create_static_lib�s�zBCPPCompiler.create_static_libc 
Cs�|�||�\}}|�|||�\}}}|r8t�dt|��|dk	rNtj�||�}|�||��r�|t	j
kr�d}|	r~|jdd�}q�|jdd�}n&d}|	r�|j
dd�}n|jdd�}|dkr�d}n�tj�|�\}}tj�|�\}}tj�|d�}tj�|d|�}dg}|�pgD]}|�d||f��q|�t||fd	|�ttjj|�}|g}g}|D]>}tj�tj�|��\}}|d
k�r�|�|�n
|�|��q`|D]}|�dtj�|���q�|�d�|�|�|�d
|g�|�d�|D]4}|�|||	�}|dk�r|�|�n
|�|��q�|�d�|�d�|�d
|g�|�d
�|�|�|
�rp|
|dd�<|�r�|�|�|�tj�|��z|�|jg|�Wn,tk
�r�}zt|��W5d}~XYnXnt�d|�dS)Nz7I don't know what to do with 'runtime_library_dirs': %sZc0w32Zc0d32r rz%s.defZEXPORTSz  %s=_%sz
writing %srz/L%sz/L.�,z,,Zimport32Zcw32mtr:) r;Z
_fix_lib_argsr
�warn�strr%r&�joinr=rZ
EXECUTABLErrrr�split�splitextr)r"Zexecuter�mapr'�normcaser#�find_library_filer(r*rrrr0) rZtarget_descr3r?r-Z	librariesZlibrary_dirsZruntime_library_dirsZexport_symbolsr0r1r2Z
build_tempr>Zstartup_objZld_argsZdef_file�head�tail�modnamer7Ztemp_dir�contentsZsymZobjects2Z	resources�file�base�lr�libfiler8rrr�link�s���
�










zBCPPCompiler.linkc	Csr|r"|d}|d|d||f}n|d|f}|D]:}|D]0}tj�||�|��}tj�|�r:|Sq:q2dS)NZ_dZ_bcpp)r%r&rDr<�exists)	r�dirsrr0ZdlibZ	try_names�dir�namerQrrrrI4s
zBCPPCompiler.find_library_filer cCs�|dkrd}g}|D]�}tj�tj�|��\}}||jddgkrRtd||f��|rbtj�|�}|dkr�|�tj�|||��q|dkr�|�tj�||d��q|�tj�|||j	��q|S)Nr rrz"unknown file type '%s' (from '%s'))
r%r&rFrH�src_extensionsr�basenamer"rD�
obj_extension)rZsource_filenamesZ	strip_dirr-Z	obj_namesZsrc_namerOr7rrr�object_filenamesNs&��zBCPPCompiler.object_filenamesc
Cs�|�d||�\}}}t||�}dg|}	|dk	r>|	�d|�|rN||	dd�<|r\|	�|�|	�|�|js~|dks~t||�r�|r�|�tj�	|��z|�
|	�Wn2tk
r�}
zt|
�t
|
��W5d}
~
XYnXdS)Nz	cpp32.exer!r)Z_fix_compile_argsr	r"r#rrr(r%r&r)r*r�printr)r�sourceZoutput_filer.r/r1r2�_r4Zpp_argsr8rrr�
preprocessis&	�



zBCPPCompiler.preprocess)rrr)NNNrNNN)NrN)
NNNNNrNNNN)r)rr )NNNNN)�__name__�
__module__�__qualname__Z
compiler_typeZexecutablesr+r,rWrYZstatic_lib_extensionZshared_lib_extensionZstatic_lib_formatZshared_lib_formatZ
exe_extensionrr9r@rRrIrZr^rrrrrs`
�
�
D�
�


�
�r)r%Zdistutils.errorsrrrrrrZdistutils.ccompilerrr	r
Zdistutils.file_utilrZdistutils.dep_utilrZ	distutilsr
rrrrr�<module>s PKX[|���� __pycache__/spawn.cpython-38.pycnu�[���U

e5d��@s�dZddlZddlZddlmZmZddlmZddlm	Z	ddd�Z
d	d
�Zddd�Zej
d
krjdadaddd�Zddd�ZdS)z�distutils.spawn

Provides the 'spawn()' function, a front-end to various platform-
specific functions for launching another program in a sub-process.
Also provides the 'find_executable()' to search the path for a given
executable name.
�N)�DistutilsPlatformError�DistutilsExecError)�DEBUG)�log�cCsNt|�}tjdkr"t|||d�n(tjdkr<t|||d�ntdtj��dS)a�Run another program, specified as a command list 'cmd', in a new process.

    'cmd' is just the argument list for the new process, ie.
    cmd[0] is the program to run and cmd[1:] are the rest of its arguments.
    There is no way to run a program with a name different from that of its
    executable.

    If 'search_path' is true (the default), the system's executable
    search path will be used to find the program; otherwise, cmd[0]
    must be the exact path to the executable.  If 'dry_run' is true,
    the command will not actually be run.

    Raise DistutilsExecError if running the program fails in any way; just
    return on success.
    �posix)�dry_run�ntz1don't know how to spawn programs on platform '%s'N)�list�os�name�_spawn_posix�	_spawn_ntr)�cmd�search_path�verboser�r�'/usr/lib64/python3.8/distutils/spawn.py�spawns

�rcCs*t|�D]\}}d|krd|||<q|S)z�Quote command-line arguments for DOS/Windows conventions.

    Just wraps every argument which contains blanks in double quotes, and
    returns a new argument list.
    � z"%s")�	enumerate)�args�i�argrrr�_nt_quote_args+src
Cs�|d}t|�}|r t|�p|}t�d�|g|dd���|s�zt�tj||�}Wn@tk
r�}z"t	sp|}t
d||jdf��W5d}~XYnX|dkr�t	s�|}t
d||f��dS)Nrrr�command %r failed: %s����%command %r failed with exit status %d)r�find_executabler�info�joinr�spawnv�P_WAIT�OSErrorrrr)rrrr�
executableZrc�excrrrr;s(�
�r�darwinc
Cs|t�d�|��|rdS|d}|r*tjp.tj}d}tjdkr�tdkrxddl	m
}|�d�p^datrxdd�t�d	�D�a
tr�tj�dt�}t
d
d�|�d	�D�kr�d|tf}	t|	��ttj|d�}|r�tjp�tj}t��}
|
dk�r�z$|dkr�|||�n||||�WnNtk
�rX}z.t�s(|}tj�d
||jf�t�d�W5d}~XYnXt�sd|}tj�d|�t�d�n�zt�|
d�\}
}WnDtk
�r�}
z$t�s�|}td||
jdf��W5d}
~
XYnXt�|��rt�s�|}td|t�|�f��nlt� |��rHt�!|�}|dk�r,dSt�s6|}td||f��n,t�"|��rZ�q�nt�sd|}td||f���q�dS)Nrrr&)�	sysconfig�MACOSX_DEPLOYMENT_TARGET�cSsg|]}t|��qSr��int��.0�xrrr�
<listcomp>esz _spawn_posix.<locals>.<listcomp>�.cSsg|]}t|��qSrr*r,rrrr/kszF$MACOSX_DEPLOYMENT_TARGET mismatch: now "%s" but "%s" during configure)r(zunable to execute %r: %s
rz(unable to execute %r for unknown reasonsrrz"command %r terminated by signal %drz1unknown error executing %r: termination status %d)#rrr r�execvp�execv�sys�platform�_cfg_target�	distutilsr'Zget_config_var�split�_cfg_target_split�environ�getr�dict�execvpe�execve�forkr#r�stderr�write�strerror�_exit�waitpidrr�WIFSIGNALED�WTERMSIG�	WIFEXITED�WEXITSTATUS�
WIFSTOPPED)rrrrr$Zexec_fn�envr'Z
cur_targetZmy_msg�pid�eZstatusr%Zexit_statusrrrr
Ws�
����
����

����r
c	Cs�tj�|�\}}tjdkr*|dkr*|d}tj�|�r:|S|dkr�tj�dd�}|dkr�zt�d�}Wnt	t
fk
r�tj}YnX|s�dS|�tj
�}|D]&}tj�||�}tj�|�r�|Sq�dS)z�Tries to find 'executable' in the directories listed in 'path'.

    A string listing directories separated by 'os.pathsep'; defaults to
    os.environ['PATH'].  Returns the complete filename or None if not found.
    Zwin32z.exeN�PATH�CS_PATH)r�path�splitextr3r4�isfiler9r:�confstr�AttributeError�
ValueError�defpathr7�pathsepr )r$rN�_Zext�paths�p�frrrr�s(
r)rrr)rrr)rrr)N)�__doc__r3rZdistutils.errorsrrZdistutils.debugrr6rrrrr4r5r8r
rrrrr�<module>s



RPKX[4��!�
�
'__pycache__/config.cpython-38.opt-1.pycnu�[���U

e5d��@s<dZddlZddlmZddlmZdZGdd�de�ZdS)z�distutils.pypirc

Provides the PyPIRCCommand class, the base class for the command classes
that uses .pypirc in the distutils.command package.
�N)�RawConfigParser)�CommandzE[distutils]
index-servers =
    pypi

[pypi]
username:%s
password:%s
c@sheZdZdZdZdZdZdZdddefdgZd	gZ	d
d�Z
dd
�Zdd�Zdd�Z
dd�Zdd�ZdS)�
PyPIRCCommandz;Base command that knows how to handle the .pypirc file
    zhttps://upload.pypi.org/legacy/�pypiNzrepository=�rzurl of repository [default: %s])�
show-responseNz&display full response text from serverrcCstj�tj�d�d�S)zReturns rc file path.�~z.pypirc)�os�path�join�
expanduser��self�r�(/usr/lib64/python3.8/distutils/config.py�_get_rc_file&szPyPIRCCommand._get_rc_filec	CsH|��}t�t�|tjtjBd�d��}|�t||f�W5QRXdS)zCreates a default .pypirc file.i��wN)rr	�fdopen�open�O_CREAT�O_WRONLY�write�DEFAULT_PYPIRC)r�username�password�rc�frrr�
_store_pypirc*s zPyPIRCCommand._store_pypirccCs�|��}tj�|��r�|�d|�|jp.|j}t�}|�|�|�	�}d|k�rF|�
dd�}dd�|�d�D�}|gkr�d|kr�dg}niS|D]�}d|i}|�
|d	�|d	<d
|jfd|jfdfD].\}	}
|�
||	�r�|�
||	�||	<q�|
||	<q�|dk�r ||jdfk�r |j|d
<|S|d|k�s:|d
|kr�|Sq�nRd
|k�r�d
}|�
|d
��rp|�
|d
�}n|j}|�
|d	�|�
|d�|||jd�SiS)zReads the .pypirc file.zUsing PyPI login from %sZ	distutilsz
index-serverscSs g|]}|��dkr|���qS)�)�strip)�.0�serverrrr�
<listcomp>=s�z.PyPIRCCommand._read_pypirc.<locals>.<listcomp>�
rr!r�
repository�realm)rNzserver-loginr)rrr$r!r%)rr	r
�existsZannouncer$�DEFAULT_REPOSITORYr�read�sections�get�split�
DEFAULT_REALMZ
has_option)rrr$Zconfigr)Z
index_serversZ_serversr!Zcurrent�key�defaultrrr�_read_pypirc0sb

���

�

�


�zPyPIRCCommand._read_pypirccCs8ddl}|�dd�}|�|�d�dd�}|���|�S)z%Read and decode a PyPI HTTP response.rNzcontent-typez
text/plain��charset�ascii)�cgiZ	getheaderZparse_headerr*r(�decode)rZresponser3Zcontent_type�encodingrrr�_read_pypi_responsepsz!PyPIRCCommand._read_pypi_responsecCsd|_d|_d|_dS)zInitialize options.Nr)r$r%Z
show_responser
rrr�initialize_optionswsz PyPIRCCommand.initialize_optionscCs(|jdkr|j|_|jdkr$|j|_dS)zFinalizes options.N)r$r'r%r,r
rrr�finalize_options}s

zPyPIRCCommand.finalize_options)�__name__�
__module__�__qualname__�__doc__r'r,r$r%Zuser_optionsZboolean_optionsrrr/r6r7r8rrrrrs&���@r)r<r	ZconfigparserrZ
distutils.cmdrrrrrrr�<module>s

PKX[
R4���$__pycache__/cmd.cpython-38.opt-2.pycnu�[���U

e5d�F�@s^ddlZddlZddlZddlmZddlmZmZmZm	Z	m
Z
ddlmZGdd�d�ZdS)�N)�DistutilsOptionError)�util�dir_util�	file_util�archive_util�dep_util��logc@seZdZgZdd�Zdd�Zdd�Zdd�Zd	d
�ZdBd
d�Z	dd�Z
dCdd�Zdd�ZdDdd�Z
dEdd�Zdd�ZdFdd�Zdd�Zd d!�Zd"d#�Zd$d%�ZdGd&d'�ZdHd)d*�Zd+d,�Zd-d.�Zd/d0�ZdId1d2�ZdJd4d5�ZdKd6d7�ZdLd8d9�ZdMd:d;�ZdNd<d=�ZdOd>d?�Z dPd@dA�Z!dS)Q�CommandcCsbddlm}t||�std��|jtkr0td��||_|��d|_	|j
|_
d|_d|_d|_
dS)Nr)�Distributionz$dist must be a Distribution instancezCommand is an abstract class)Zdistutils.distr�
isinstance�	TypeError�	__class__r
�RuntimeError�distribution�initialize_optionsZ_dry_run�verbose�force�help�	finalized)�selfZdistr�r�%/usr/lib64/python3.8/distutils/cmd.py�__init__/s


zCommand.__init__cCs<|dkr0t|d|�}|dkr*t|j|�S|Snt|��dS)N�dry_run�_)�getattrr�AttributeError)r�attrZmyvalrrr�__getattr___szCommand.__getattr__cCs|js|��d|_dS)N�)r�finalize_options�rrrr�ensure_finalizediszCommand.ensure_finalizedcCstd|j��dS�Nz,abstract method -- subclass %s must override�rrr"rrrr{s
�zCommand.initialize_optionscCstd|j��dSr$r%r"rrrr!�s�zCommand.finalize_optionsN�cCs�ddlm}|dkr d|��}|j||tjd�|d}|jD]R\}}}|�|�}|ddkrn|dd�}t||�}|j|d||ftjd�qBdS)	Nr)�
longopt_xlatezcommand options for '%s':)�levelz  ����=z%s = %s)	Zdistutils.fancy_getoptr'�get_command_name�announcer	�INFOZuser_options�	translater)r�header�indentr'�optionr�valuerrr�dump_options�s

�zCommand.dump_optionscCstd|j��dSr$r%r"rrr�run�s
�zCommand.runr cCst�||�dS�Nr)r�msgr(rrrr,�szCommand.announcecCs&ddlm}|r"t|�tj��dS)Nr)�DEBUG)Zdistutils.debugr7�print�sys�stdout�flush)rr6r7rrr�debug_print�szCommand.debug_printcCsBt||�}|dkr"t|||�|St|t�s>td|||f��|S)Nz'%s' must be a %s (got `%s`))r�setattrr�strr)rr1�what�default�valrrr�_ensure_stringlike�s

�zCommand._ensure_stringlikecCs|�|d|�dS)N�string)rB)rr1r@rrr�
ensure_string�szCommand.ensure_stringcCspt||�}|dkrdSt|t�r6t||t�d|��n6t|t�rTtdd�|D��}nd}|sltd||f��dS)Nz,\s*|\s+css|]}t|t�VqdSr5)rr>)�.0�vrrr�	<genexpr>�sz-Command.ensure_string_list.<locals>.<genexpr>Fz''%s' must be a list of strings (got %r))	rrr>r=�re�split�list�allr)rr1rA�okrrr�ensure_string_list�s


��zCommand.ensure_string_listcCs6|�|||�}|dk	r2||�s2td|||f��dS)Nzerror in '%s' option: )rBr)rr1Ztesterr?Z	error_fmtr@rArrr�_ensure_tested_string�s
�zCommand._ensure_tested_stringcCs|�|tjjdd�dS)N�filenamez$'%s' does not exist or is not a file)rN�os�path�isfile�rr1rrr�ensure_filename�s�zCommand.ensure_filenamecCs|�|tjjdd�dS)Nzdirectory namez)'%s' does not exist or is not a directory)rNrPrQ�isdirrSrrr�ensure_dirnames�zCommand.ensure_dirnamecCst|d�r|jS|jjSdS)N�command_name)�hasattrrWr�__name__r"rrrr+	s
zCommand.get_command_namecGsF|j�|�}|��|D](\}}t||�dkrt||t||��qdSr5)r�get_command_objr#rr=)rZsrc_cmdZoption_pairsZsrc_cmd_objZ
src_optionZ
dst_optionrrr�set_undefined_optionss
zCommand.set_undefined_optionscCs|j�||�}|��|Sr5)rrZr#)r�commandZcreateZcmd_objrrr�get_finalized_command$szCommand.get_finalized_commandrcCs|j�||�Sr5)r�reinitialize_command)rr\Zreinit_subcommandsrrrr^0s�zCommand.reinitialize_commandcCs|j�|�dSr5)r�run_command)rr\rrrr_4szCommand.run_commandcCs2g}|jD]"\}}|dks"||�r
|�|�q
|Sr5)�sub_commands�append)rZcommandsZcmd_name�methodrrr�get_sub_commands;s
zCommand.get_sub_commandscCst�d|��|�dS)Nzwarning: %s: %s
)r	�warnr+)rr6rrrrdKszCommand.warncCstj||||jd�dS�N�r)r�executer)r�func�argsr6r(rrrrgNszCommand.execute�cCstj|||jd�dSre)r�mkpathr)r�name�moderrrrkQszCommand.mkpathc	Cstj|||||j||jd�Sre)r�	copy_filerr)r�infile�outfile�
preserve_mode�preserve_times�linkr(rrrrnTs
�zCommand.copy_filec	Cstj||||||j|jd�Sre)r�	copy_treerr)rrorprqrrZpreserve_symlinksr(rrrrt]s
�zCommand.copy_treecCstj|||jd�Sre)r�	move_filer)r�srcZdstr(rrrrufszCommand.move_filecCs ddlm}||||jd�dS)Nr)�spawnrf)Zdistutils.spawnrwr)r�cmdZsearch_pathr(rwrrrrwjsz
Command.spawnc	Cstj|||||j||d�S)N)r�owner�group)r�make_archiver)rZ	base_name�formatZroot_dirZbase_dirryrzrrrr{os
�zCommand.make_archivecCs�|dkrd|}t|t�r"|f}nt|ttf�s8td��|dkrRd|d�|�f}|jsdt�||�rv|�	||||�n
t
�|�dS)Nzskipping %s (inputs unchanged)z9'infiles' must be a string, or a list or tuple of stringszgenerating %s from %sz, )rr>rJ�tupler
�joinrrZnewer_grouprgr	�debug)rZinfilesrprhriZexec_msgZskip_msgr(rrr�	make_fileus

�zCommand.make_file)Nr&)r )N)N)N)r )r)Nr )rj)r r Nr )r r rr )r )r r )NNNN)NNr )"rY�
__module__�__qualname__r`rrr#rr!r3r4r,r<rBrDrMrNrTrVr+r[r]r^r_rcrdrgrkrnrtrurwr{r�rrrrr
sX0






�




�
	�
	

�
�r
)
r9rPrHZdistutils.errorsrZ	distutilsrrrrrr	r
rrrr�<module>sPKX[�6�m2m2.__pycache__/_msvccompiler.cpython-38.opt-1.pycnu�[���U

e5dRN�@s�dZddlZddlZddlZddlZddlZddlmZmZm	Z	m
Z
mZddlm
Z
mZddlmZddlmZddlmZdd	�Zd
d�Zdd
ddd�Zdd�Zdd�Zddd�Zddddd�ZGdd�de
�ZdS)adistutils._msvccompiler

Contains MSVCCompiler, an implementation of the abstract CCompiler class
for Microsoft Visual Studio 2015.

The module is compatible with VS 2015 and later. You can find legacy support
for older versions in distutils.msvc9compiler and distutils.msvccompiler.
�N)�DistutilsExecError�DistutilsPlatformError�CompileError�LibError�	LinkError)�	CCompiler�gen_lib_options)�log)�get_platform)�countcCsztjtjdtjtjBd�}Wn tk
r>t�d�YdSXd}d}|��t�D]�}zt�	||�\}}}Wntk
r�Yq�YnX|rT|tj
krTtj�
|�rTztt|��}Wnttfk
r�YqTYnX|dkrT||krT||}}qTW5QRX||fS)Nz'Software\Microsoft\VisualStudio\SxS\VC7)�accesszVisual C++ is not registered�NNr�)�winregZ	OpenKeyEx�HKEY_LOCAL_MACHINEZKEY_READZKEY_WOW64_32KEY�OSErrorr	�debugrZ	EnumValueZREG_SZ�os�path�isdir�int�float�
ValueError�	TypeError)�key�best_version�best_dir�i�vZvc_dirZvt�version�r �//usr/lib64/python3.8/distutils/_msvccompiler.py�_find_vc2015s2
�



r"c
Cs�ddl}tj�d�ptj�d�}|s(dSz8tjtj�|ddd�d	d
ddd
dddg	ddd���}Wntj	t
tfk
r~YdSXtj�|ddd�}tj�|�r�d|fSdS)aJReturns "15, path" based on the result of invoking vswhere.exe
    If no install is found, returns "None, None"

    The version is returned to avoid unnecessarily changing the function
    result. It may be ignored when the path is not None.

    If vswhere.exe is not available, by definition, VS 2017 is not
    installed.
    rNzProgramFiles(x86)ZProgramFilesr
zMicrosoft Visual StudioZ	Installerzvswhere.exez-latestz-prereleasez	-requiresz1Microsoft.VisualStudio.Component.VC.Tools.x86.x64z	-propertyZinstallationPathz	-products�*�mbcs�strict)�encoding�errorsZVCZ	AuxiliaryZBuild�)
�jsonr�environ�get�
subprocess�check_outputr�join�strip�CalledProcessErrorr�UnicodeDecodeErrorr)r)�rootrr r r!�_find_vc2017:s2
��r3�x86Zx64ZarmZarm64)r4�	x86_amd64�x86_arm�	x86_arm64cCs\t�\}}|st�\}}|s*t�d�dStj�|d�}tj�|�sTt�d|�dS|dfS)Nz$No suitable Visual C++ version foundr
z
vcvarsall.batz%s cannot be found)r3r"r	rrrr.�isfile)�	plat_spec�_rr�	vcvarsallr r r!�_find_vcvarsallcs


r<c
Cs�t�d�rdd�tj��D�St|�\}}|s6td��z&tjd�||�tj	d�j
ddd	�}Wn@tjk
r�}z t�
|j�td
�|j���W5d}~XYnXdd�dd
�|��D�D�}|S)NZDISTUTILS_USE_SDKcSsi|]\}}|��|�qSr ��lower)�.0r�valuer r r!�
<dictcomp>ws�z_get_vc_env.<locals>.<dictcomp>zUnable to find vcvarsall.batzcmd /u /c "{}" {} && set)�stderrzutf-16le�replace)r'zError executing {}cSs$i|]\}}}|r|r|��|�qSr r=)r?rr:r@r r r!rA�s
�css|]}|�d�VqdS)�=N)�	partition)r?�liner r r!�	<genexpr>�sz_get_vc_env.<locals>.<genexpr>)r�getenvr*�itemsr<rr,r-�formatZSTDOUT�decoder0r	�error�output�cmd�
splitlines)r9r;r:�out�exc�envr r r!�_get_vc_envus0
�
��
��rScCsN|st�d��tj�}|D].}tj�tj�|�|�}tj�|�r|Sq|S)atReturn path to an MSVC executable program.

    Tries to find the program in several places: first, one of the
    MSVC program search paths from the registry; next, the directories
    in the PATH environment variable.  If any of those work, return an
    absolute path that is known to exist.  If none of them work, just
    return the original program name, 'exe'.
    r)rrH�split�pathseprr.�abspathr8)Zexe�paths�p�fnr r r!�	_find_exe�s	
rZr5r6r7)Zwin32z	win-amd64z	win-arm32z	win-arm64c
s�eZdZdZdZiZdgZdddgZdgZdgZ	eeee	Z
d	Zd
ZdZ
dZd
ZZdZd(dd�Zd)dd�Zd*dd�Zd+dd�Zd,dd�Zd-dd�Z�fdd�Zd d!�Zd"d#�Zd$d%�Zd.d&d'�Z�ZS)/�MSVCCompilerzwConcrete class that implements an interface to Microsoft Visual C++,
       as defined by the CCompiler abstract class.Zmsvcz.cz.ccz.cppz.cxx�.rcz.mcz.resz.objz.libz.dllz%s%sz.exercCs t�||||�d|_d|_dS)NF)r�__init__�	plat_name�initialized)�self�verboseZdry_runZforcer r r!r]�szMSVCCompiler.__init__NcCs�|dkrt�}|tkr(td�tt����t|}t|�}|sDtd��|�dd�|_|j�t	j
�}td|�|_td|�|_
td|�|_td|�|_td	|�|_td
|�|_|�dd��t	j
�D]}|r�|�|�t	j��q�|�dd��t	j
�D]}|r�|�|�t	j��q�d|_d
dddddg|_d
dddddg|_d
ddg}d
dddg}|d �|_|d!�|_|d"�|_|d#�|_|�|_|�|_tj df|jtj df|jtj df|jtj!df|jtj!df|jtj!df|jtj"df|jtj"df|jtj"df|ji	|_#d|_$dS)$Nz--plat-name must be one of {}z7Unable to find a compatible Visual Studio installation.r�zcl.exezlink.exezlib.exezrc.exezmc.exezmt.exeZinclude�libz/nologoz/Oxz/W3z/GLz/DNDEBUGz/MDz/Odz/MDdz/Ziz/D_DEBUGz/INCREMENTAL:NOz/LTCGz/DEBUG:FULL�/MANIFEST:EMBED,ID=1�/DLL�/MANIFEST:EMBED,ID=2�/MANIFESTUAC:NOFT)rd)rd)rerfrg)rerfrg)%r
�PLAT_TO_VCVARSrrJ�tuplerSr+�_pathsrTrrUrZ�cc�linkerrc�rc�mcZmtZadd_include_dir�rstrip�sepZadd_library_dirZpreprocess_options�compile_options�compile_options_debugZldflags_exeZldflags_exe_debugZldflags_sharedZldflags_shared_debugZldflags_staticZldflags_static_debugrZ
EXECUTABLEZ
SHARED_OBJECTZSHARED_LIBRARY�_ldflagsr_)r`r^r9Zvc_envrW�dir�ldflagsZ
ldflags_debugr r r!�
initialize�s������



�zMSVCCompiler.initializerbcsT�fdd��jD��fdd��j�jD����p4d����fdd�}tt||��S)Ncsi|]}|�j�qSr )�
obj_extension�r?�ext�r`r r!rA&sz1MSVCCompiler.object_filenames.<locals>.<dictcomp>csi|]}|�j�qSr )�
res_extensionrxrzr r!rA'srbcs�tj�|�\}}�r"tj�|�}n2tj�|�\}}|�tjjtjjf�rT|dd�}ztj��|�|�WSt	k
r�t
d�|���YnXdS)N�zDon't know how to compile {})rr�splitext�basename�
splitdrive�
startswithrp�altsepr.�LookupErrorrrJ)rX�baseryr:)�ext_map�
output_dir�	strip_dirr r!�
make_out_path,sz4MSVCCompiler.object_filenames.<locals>.make_out_path)�src_extensions�_rc_extensions�_mc_extensions�list�map)r`Zsource_filenamesr�r�r�r )r�r�r`r�r!�object_filenames!s�zMSVCCompiler.object_filenamesc	Cs�|js|��|�||||||�}	|	\}}
}}}|p6g}
|
�d�|rT|
�|j�n|
�|j�d}|
D�]}z||\}}Wntk
r�YqhYnX|r�tj	�
|�}||jkr�d|}�nD||jkr�d|}d}�n*||j
k�r@|}d|}z|�|jg|||g�Wqhtk
�r:}zt|��W5d}~XYqhXqhn�||jk�r�tj	�|�}tj	�|�}z\|�|jd|d||g�tj	�tj	�|��\}}tj	�||d	�}|�|jd||g�Wqhtk
�r�}zt|��W5d}~XYqhXqhntd
�||���|jg|
|}|�r"|�d�|�|�|�d|�|�|�z|�|�Wqhtk
�r~}zt|��W5d}~XYqhXqh|
S)
Nz/cFz/Tcz/TpTz/foz-hz-rr\z"Don't know how to compile {} to {}z/EHscz/Fo)r_rvZ_setup_compile�append�extendrrrq�KeyErrorrrrV�
_c_extensions�_cpp_extensionsr��spawnrmrrr��dirnamernr}r~r.rJrk)r`Zsourcesr�ZmacrosZinclude_dirsr�
extra_preargs�extra_postargsZdependsZcompile_info�objectsZpp_optsZbuildZcompile_optsZadd_cpp_opts�obj�srcryZ	input_optZ
output_opt�msgZh_dirZrc_dirr�r:Zrc_file�argsr r r!�compileBsx
�




�


zMSVCCompiler.compilec	
Cs�|js|��|�||�\}}|j||d�}|�||�r�|d|g}|rJz,t�d|jd�|��|�	|jg|�Wq�t
k
r�}zt|��W5d}~XYq�Xnt�d|�dS)N)r��/OUT:�Executing "%s" %s� �skipping %s (up-to-date))r_rv�_fix_object_args�library_filename�
_need_linkr	rrcr.r�rr)	r`r�Zoutput_libnamer�r�target_lang�output_filenameZlib_argsr�r r r!�create_static_lib�s�zMSVCCompiler.create_static_libc
Cs�|js|��|�||�\}}|�|||�}|\}}}|rL|�dt|��t||||�}|dk	rptj�	||�}|�
||��r�|j||	f}dd�|p�gD�}||||d|g}tj�|d�}|dk	�rtj�
tj�|��\}}tj�	||�|��}|�d|�|
�r|
|dd�<|�r.|�|�tj�tj�|��}|�|�z,t�d|jd�	|��|�|jg|�Wn,tk
�r�}zt|��W5d}~XYnXnt�d	|�dS)
Nz5I don't know what to do with 'runtime_library_dirs': cSsg|]}d|�qS)z/EXPORT:r )r?Zsymr r r!�
<listcomp>�sz%MSVCCompiler.link.<locals>.<listcomp>r�rz/IMPLIB:r�r�r�)r_rvr�Z
_fix_lib_args�warn�strrrrr.r�rsr�r}r~r�r�r�rVZmkpathr	rrlr�rr)r`Ztarget_descr�r�r�Z	librariesZlibrary_dirsZruntime_library_dirsZexport_symbolsrr�r�Z
build_tempr�Z
fixed_argsZlib_optsruZexport_optsZld_argsZdll_nameZdll_extZimplib_filer�r r r!�link�s`�
��
��

��

zMSVCCompiler.linkc	s8t�d�}z|jtjd<t��|�W�S|tjd<XdS)Nr)rrHr*rj�superr�)r`rNZold_path��	__class__r r!r��s

zMSVCCompiler.spawncCsd|S)Nz	/LIBPATH:r �r`rtr r r!�library_dir_optionszMSVCCompiler.library_dir_optioncCstd��dS)Nz:don't know how to set runtime library search path for MSVC)rr�r r r!�runtime_library_dir_option
s�z'MSVCCompiler.runtime_library_dir_optioncCs
|�|�S)N)r�)r`rcr r r!�library_optionszMSVCCompiler.library_optioncCs\|r|d|g}n|g}|D]:}|D]0}tj�||�|��}tj�|�r$|Sq$qdS)NZ_d)rrr.r�r8)r`�dirsrcrZ	try_namesrt�nameZlibfiler r r!�find_library_fileszMSVCCompiler.find_library_file)rrr)N)rrb)NNNrNNN)NrN)
NNNNNrNNNN)r)�__name__�
__module__�__qualname__�__doc__Z
compiler_typeZexecutablesr�r�r�r�r�r{rwZstatic_lib_extensionZshared_lib_extensionZstatic_lib_formatZshared_lib_formatZ
exe_extensionr]rvr�r�r�r�r�r�r�r�r��
__classcell__r r r�r!r[�sf
��

P�
"�
]�
�
Er[)N)r�rZshutil�statr,rZdistutils.errorsrrrrrZdistutils.ccompilerrrZ	distutilsr	Zdistutils.utilr
�	itertoolsrr"r3ZPLAT_SPEC_TO_RUNTIMEr<rSrZrhr[r r r r!�<module>s4#�
�PKX[LvV�00'__pycache__/config.cpython-38.opt-2.pycnu�[���U

e5d��@s8ddlZddlmZddlmZdZGdd�de�ZdS)�N)�RawConfigParser)�CommandzE[distutils]
index-servers =
    pypi

[pypi]
username:%s
password:%s
c@sdeZdZdZdZdZdZdddefdgZdgZd	d
�Z	dd�Z
d
d�Zdd�Zdd�Z
dd�ZdS)�
PyPIRCCommandzhttps://upload.pypi.org/legacy/�pypiNzrepository=�rzurl of repository [default: %s])�
show-responseNz&display full response text from serverrcCstj�tj�d�d�S)N�~z.pypirc)�os�path�join�
expanduser��self�r�(/usr/lib64/python3.8/distutils/config.py�_get_rc_file&szPyPIRCCommand._get_rc_filec	CsH|��}t�t�|tjtjBd�d��}|�t||f�W5QRXdS)Ni��w)rr	�fdopen�open�O_CREAT�O_WRONLY�write�DEFAULT_PYPIRC)r�username�password�rc�frrr�
_store_pypirc*s zPyPIRCCommand._store_pypirccCs�|��}tj�|��r�|�d|�|jp.|j}t�}|�|�|�	�}d|k�rF|�
dd�}dd�|�d�D�}|gkr�d|kr�dg}niS|D]�}d|i}|�
|d	�|d	<d
|jfd|jfdfD].\}	}
|�
||	�r�|�
||	�||	<q�|
||	<q�|dk�r ||jdfk�r |j|d
<|S|d|k�s:|d
|kr�|Sq�nRd
|k�r�d
}|�
|d
��rp|�
|d
�}n|j}|�
|d	�|�
|d�|||jd�SiS)NzUsing PyPI login from %sZ	distutilsz
index-serverscSs g|]}|��dkr|���qS)�)�strip)�.0�serverrrr�
<listcomp>=s�z.PyPIRCCommand._read_pypirc.<locals>.<listcomp>�
rr!r�
repository�realm)rNzserver-loginr)rrr$r!r%)rr	r
�existsZannouncer$�DEFAULT_REPOSITORYr�read�sections�get�split�
DEFAULT_REALMZ
has_option)rrr$Zconfigr)Z
index_serversZ_serversr!Zcurrent�key�defaultrrr�_read_pypirc0sb

���

�

�


�zPyPIRCCommand._read_pypirccCs8ddl}|�dd�}|�|�d�dd�}|���|�S)Nrzcontent-typez
text/plain��charset�ascii)�cgiZ	getheaderZparse_headerr*r(�decode)rZresponser3Zcontent_type�encodingrrr�_read_pypi_responsepsz!PyPIRCCommand._read_pypi_responsecCsd|_d|_d|_dS)Nr)r$r%Z
show_responser
rrr�initialize_optionswsz PyPIRCCommand.initialize_optionscCs(|jdkr|j|_|jdkr$|j|_dS)N)r$r'r%r,r
rrr�finalize_options}s

zPyPIRCCommand.finalize_options)�__name__�
__module__�__qualname__r'r,r$r%Zuser_optionsZboolean_optionsrrr/r6r7r8rrrrrs$���@r)r	ZconfigparserrZ
distutils.cmdrrrrrrr�<module>s
PKX[���~�!�!*__pycache__/cygwinccompiler.cpython-38.pycnu�[���U

e5d^@�@s�dZddlZddlZddlZddlmZmZmZddlZddl	m
Z
mZddlm
Z
ddlmZddlmZmZmZmZddlmZdd	lmZdd
lmZdd�ZGd
d�de
�ZGdd�de�ZdZdZdZ dd�Z!e�"d�Z#dd�Z$dd�Z%dd�Z&dS)adistutils.cygwinccompiler

Provides the CygwinCCompiler class, a subclass of UnixCCompiler that
handles the Cygwin port of the GNU C compiler to Windows.  It also contains
the Mingw32CCompiler class which handles the mingw32 port of GCC (same as
cygwin in no-cygwin mode).
�N)�Popen�PIPE�check_output)�gen_preprocess_options�gen_lib_options)�
UnixCCompiler)�
write_file)�DistutilsExecError�CCompilerError�CompileError�UnknownFileError)�log)�LooseVersion)�find_executablecCs�tj�d�}|dkr|tj|d|d�}|dkr8dgS|dkrFdgS|d	krTd
gS|dkrbdgS|d
krpdgStd|��dS)zaInclude the appropriate MSVC runtime library if Python was built
    with MSVC 7.0 or later.
    zMSC v.�����
Z1300Zmsvcr70Z1310Zmsvcr71Z1400Zmsvcr80Z1500Zmsvcr90Z1600Zmsvcr100zUnknown MS Compiler version %s N)�sys�version�find�
ValueError)Zmsc_posZmsc_ver�r�1/usr/lib64/python3.8/distutils/cygwinccompiler.py�	get_msvcr?src
@sReZdZdZdZdZdZdZdZdZ	dZ
dd
d�Zdd
�Zddd�Z
ddd�ZdS)�CygwinCCompilerz? Handles the Cygwin port of the GNU C compiler to Windows.
    �cygwinz.o�.az.dllzlib%s%sz%s%sz.exercCs�t�||||�t�\}}|�d||f�|tk	rB|�d|�t�\|_|_|_	|�|j
d|j|j|j	f�|jdkr�d|_nd|_|jdkr�d}nd	}|jd
ddd
d|j|fd�|jdkr�dg|_
|�d�nt�|_
dS)Nz%Python's GCC status: %s (details: %s)z�Python's pyconfig.h doesn't seem to support your compiler. Reason: %s. Compiling may fail because of undefined preprocessor macros.z: gcc %s, ld %s, dllwrap %s
z2.10.90�gcc�dllwrap�2.13�-shared�
-mdll -staticzgcc -mcygwin -O -Wallzgcc -mcygwin -mdll -O -Wallzg++ -mcygwin -O -Wallzgcc -mcygwinz%s -mcygwin %s�Zcompiler�compiler_soZcompiler_cxxZ
linker_exeZ	linker_so�2.91.57Zmsvcrtz,Consider upgrading to a newer version of gcc)r�__init__�check_config_hZdebug_print�CONFIG_H_OK�warn�get_versions�gcc_version�
ld_versionZdllwrap_version�
compiler_type�
linker_dll�set_executables�
dll_librariesr)�self�verbose�dry_run�forceZstatusZdetails�
shared_optionrrrr%dsN
����
��


��
�zCygwinCCompiler.__init__c
Cs�|dks|dkrVz|�dd|d|g�Wq�tk
rR}zt|��W5d}~XYq�XnNz"|�|j||d|g|�Wn*tk
r�}zt|��W5d}~XYnXdS)z:Compiles the source by spawning GCC and windres if needed.�.rc�.resZwindresz-iz-oN)Zspawnr	rr#)r0�obj�src�extZcc_args�extra_postargsZpp_opts�msgrrr�_compile�s�
zCygwinCCompiler._compileNcCsPt�|
p
g�}
t�|pg�}t�|p&g�}|�|j�|dk	�r||jksV|jdk�rtj�|d�}tj�tj�	|��\}}tj�
||d�}tj�
|d|d�}dtj�	|�dg}|D]}|�|�q�|�t
||fd	|�|jd
k�r|
�d|g�|
�d|g�n
|�|�|	�s(|
�d
�t�||||||||d|	|
|||
�dS)zLink the objects.Nrrz.def�librz
LIBRARY %sZEXPORTSz
writing %srz--output-libz--defz-s)�copy�extendr/Z
EXECUTABLEr-�os�path�dirname�splitext�basename�join�appendZexecuterr�link)r0Ztarget_descZobjectsZoutput_filename�
output_dirZ	librariesZlibrary_dirsZruntime_library_dirsZexport_symbols�debugZ
extra_preargsr:Z
build_tempZtarget_langZtemp_dirZdll_nameZ
dll_extensionZdef_fileZlib_file�contentsZsymrrrrG�sR
��

���

�zCygwinCCompiler.link�cCs�|dkrd}g}|D]�}tj�tj�|��\}}||jddgkrRtd||f��|rbtj�|�}|dkr�|�tj�||||j	��q|�tj�|||j	��q|S)z#Adds supports for rc and res files.NrKr5r6z"unknown file type '%s' (from '%s'))r6r5)
r@rArC�normcaseZsrc_extensionsrrDrFrE�
obj_extension)r0Zsource_filenamesZ	strip_dirrHZ	obj_namesZsrc_name�baser9rrr�object_filenames�s&���z CygwinCCompiler.object_filenames)rrr)
NNNNNrNNNN)rrK)�__name__�
__module__�__qualname__�__doc__r,rMZstatic_lib_extensionZshared_lib_extensionZstatic_lib_formatZshared_lib_formatZ
exe_extensionr%r<rGrOrrrrrYs,
;�
Nrc@seZdZdZdZddd�ZdS)�Mingw32CCompilerz@ Handles the Mingw32 port of the GNU C compiler to Windows.
    Zmingw32rc	Csxt�||||�|jdkr d}nd}|jdkr4d}nd}t�rFtd��|jdd	d
dd|j||fd
�g|_t	�|_dS)Nrr r!r$z--entry _DllMain@12rKz1Cygwin gcc cannot be used with --compiler=mingw32zgcc -O -Wallzgcc -mdll -O -Wallzg++ -O -Wallrz%s %s %sr")
rr%r+r*�is_cygwingccr
r.r-r/r)r0r1r2r3r4Zentry_pointrrrr%s.

����zMingw32CCompiler.__init__N)rrr)rPrQrRrSr,r%rrrrrTsrT�okznot okZ	uncertainc
Cs�ddlm}dtjkrtdfS|��}zLt|�}z4d|��krPtd|fW�WSt	d|fW�WSW5|��XWn8t
k
r�}ztd||jffWY�Sd	}~XYnXd	S)
awCheck if the current Python installation appears amenable to building
    extensions with GCC.

    Returns a tuple (status, details), where 'status' is one of the following
    constants:

    - CONFIG_H_OK: all is well, go ahead and compile
    - CONFIG_H_NOTOK: doesn't look good
    - CONFIG_H_UNCERTAIN: not sure -- unable to read pyconfig.h

    'details' is a human-readable string explaining the situation.

    Note there are two ways to conclude "OK": either 'sys.version' contains
    the string "GCC" (implying that this Python was built with GCC), or the
    installed "pyconfig.h" contains the string "__GNUC__".
    r)�	sysconfigZGCCzsys.version mentions 'GCC'Z__GNUC__z'%s' mentions '__GNUC__'z '%s' does not mention '__GNUC__'zcouldn't read '%s': %sN)
�	distutilsrWrrr'Zget_config_h_filename�open�close�read�CONFIG_H_NOTOK�OSError�CONFIG_H_UNCERTAIN�strerror)rW�fnZconfig_h�excrrrr&Hs
�r&s(\d+\.\d+(\.\d+)*)cCsl|��d}t|�dkrdSt|dtd�j}z|��}W5|��Xt�|�}|dkrZdSt	|�
d����S)z�Find the version of an executable by running `cmd` in the shell.

    If the command is not found, or the output does not match
    `RE_VERSION`, returns None.
    rNT)�shell�stdout�)�splitrrrrcrZr[�
RE_VERSION�searchr�group�decode)�cmd�
executable�out�
out_string�resultrrr�_find_exe_versionus

rocCsdddg}tdd�|D��S)zg Try to find out the versions of gcc, ld and dllwrap.

    If not possible it returns None for it.
    zgcc -dumpversionzld -vzdllwrap --versioncSsg|]}t|��qSr)ro)�.0rjrrr�
<listcomp>�sz get_versions.<locals>.<listcomp>)�tuple)Zcommandsrrrr)�s
r)cCstddg�}|���d�S)z>Try to determine if the gcc that would be used is from cygwin.rz-dumpmachinescygwin)r�strip�endswith)rmrrrrU�srU)'rSr@rr>�
subprocessrrr�reZdistutils.ccompilerrrZdistutils.unixccompilerrZdistutils.file_utilrZdistutils.errorsr	r
rrrXr
Zdistutils.versionrZdistutils.spawnrrrrTr'r\r^r&�compilerfror)rUrrrr�<module>s0/;1+
PKX[�~��//$__pycache__/file_util.cpython-38.pycnu�[���U

e5d��@sZdZddlZddlmZddlmZdddd�Zdd
d�Zdd
d�Zddd�Z	dd�Z
dS)zFdistutils.file_util

Utility functions for operating on single files.
�N)�DistutilsFileError)�logZcopyingzhard linkingzsymbolically linking)N�hard�sym�@c
Cs�d}d}�ztzt|d�}Wn4tk
rN}ztd||jf��W5d}~XYnXtj�|�r�zt�|�Wn4tk
r�}ztd||jf��W5d}~XYnXzt|d�}Wn4tk
r�}ztd||jf��W5d}~XYnXz|�	|�}Wn6tk
�r(}ztd||jf��W5d}~XYnX|�s4�q|z|�
|�Wq�tk
�rx}ztd||jf��W5d}~XYq�Xq�W5|�r�|��|�r�|��XdS)	a5Copy the file 'src' to 'dst'; both must be filenames.  Any error
    opening either file, reading from 'src', or writing to 'dst', raises
    DistutilsFileError.  Data is read/written in chunks of 'buffer_size'
    bytes (default 16k).  No attempt is made to handle anything apart from
    regular files.
    N�rbzcould not open '%s': %szcould not delete '%s': %s�wbzcould not create '%s': %szcould not read from '%s': %szcould not write to '%s': %s)�close�open�OSErrorr�strerror�os�path�exists�unlink�read�write)�src�dstZbuffer_sizeZfsrcZfdst�eZbuf�r�+/usr/lib64/python3.8/distutils/file_util.py�_copy_file_contentssL	$����r�cCsddlm}ddlm}	m}
m}m}tj�	|�s<t
d|��tj�|�rd|}
tj�|tj�
|��}ntj�|�}
|r�|||�s�|dkr�t�d|�|dfSzt|}Wn tk
r�td|��YnX|dk�rtj�
|�tj�
|�kr�t�d|||
�nt�d|||�|�r|dfS|d	k�rrtj�|��rBtj�||��s�zt�||�|dfWStk
�rnYnXn<|d
k�r�tj�|��r�tj�||��s�t�||�|dfSt||�|�s�|�rt�|�}|�r�t�|||	||
f�|�rt�||||��|dfS)aCopy a file 'src' to 'dst'.  If 'dst' is a directory, then 'src' is
    copied there with the same name; otherwise, it must be a filename.  (If
    the file exists, it will be ruthlessly clobbered.)  If 'preserve_mode'
    is true (the default), the file's mode (type and permission bits, or
    whatever is analogous on the current platform) is copied.  If
    'preserve_times' is true (the default), the last-modified and
    last-access times are copied as well.  If 'update' is true, 'src' will
    only be copied if 'dst' does not exist, or if 'dst' does exist but is
    older than 'src'.

    'link' allows you to make hard links (os.link) or symbolic links
    (os.symlink) instead of copying: set it to "hard" or "sym"; if it is
    None (the default), files are copied.  Don't set 'link' on systems that
    don't support it: 'copy_file()' doesn't check if hard or symbolic
    linking is available. If hardlink fails, falls back to
    _copy_file_contents().

    Under Mac OS, uses the native file copy function in macostools; on
    other systems, uses '_copy_file_contents()' to copy file contents.

    Return a tuple (dest_name, copied): 'dest_name' is the actual name of
    the output file, and 'copied' is true if the file was copied (or would
    have been copied, if 'dry_run' true).
    r)�newer)�ST_ATIME�ST_MTIME�ST_MODE�S_IMODEz4can't copy '%s': doesn't exist or not a regular filerz"not copying %s (output up-to-date)z&invalid value '%s' for 'link' argumentz%s %s -> %srr)Zdistutils.dep_utilr�statrrrrr
r�isfiler�isdir�join�basename�dirnamer�debug�_copy_action�KeyError�
ValueError�infor�samefile�linkr�symlinkr�utime�chmod)rrZ
preserve_modeZpreserve_times�updater+�verbose�dry_runrrrrr�dir�action�strrr�	copy_fileCsV!�





r5cCs�ddlm}m}m}m}m}ddl}	|dkr:t�d||�|rB|S||�sVt	d|��||�rrt
j�|||��}n||�r�t	d||f��|||��s�t	d||f��d	}
zt
�
||�WnPtk
�r
}z0|j\}}
||	jkr�d
}
nt	d|||
f��W5d}~XYnX|
�r�t|||d�zt
�|�Wnhtk
�r�}zH|j\}}
zt
�|�Wntk
�rpYnXt	d
||||
f��W5d}~XYnX|S)a%Move a file 'src' to 'dst'.  If 'dst' is a directory, the file will
    be moved into it with the same name; otherwise, 'src' is just renamed
    to 'dst'.  Return the new full name of the file.

    Handles cross-device moves on Unix using 'copy_file()'.  What about
    other systems???
    r)rr r!r#r$Nrzmoving %s -> %sz#can't move '%s': not a regular filez0can't move '%s': destination '%s' already existsz2can't move '%s': destination '%s' not a valid pathFTzcouldn't move '%s' to '%s': %s)r0zAcouldn't move '%s' to '%s' by copy/delete: delete '%s' failed: %s)Zos.pathrr r!r#r$�errnorr)rr
rr"�renamer�argsZEXDEVr5r)rrr0r1rr r!r#r$r6Zcopy_itrZnum�msgrrr�	move_file�s`����

�

��r:cCs6t|d�}z|D]}|�|d�qW5|��XdS)z{Create a file with the specified name and write 'contents' (a
    sequence of strings without line terminators) to it.
    �w�
N)r
r	r)�filename�contents�f�linerrr�
write_file�s

rA)r)rrrNrr)rr)�__doc__r
Zdistutils.errorsrZ	distutilsrr&rr5r:rArrrr�<module>s"�
3�
d�
?PKX[U�u��$__pycache__/log.cpython-38.opt-2.pycnu�[���U

e5d��@shdZdZdZdZdZddlZGdd�d�Ze�ZejZej	Z	ej
Z
ejZejZej
Z
d	d
�Zdd�ZdS)
������Nc@sPeZdZefdd�Zdd�Zdd�Zdd�Zd	d
�Zdd�Z	d
d�Z
dd�ZdS)�LogcCs
||_dS�N)�	threshold)�selfr	�r�%/usr/lib64/python3.8/distutils/log.py�__init__szLog.__init__cCs�|tttttfkr"tdt|���||jkr�|r8||}|tttfkrNtj	}ntj
}z|�d|�Wn:tk
r�|j
}|�|d��|�}|�d|�YnX|��dS)Nz%s wrong log levelz%s
�backslashreplace)�DEBUG�INFO�WARN�ERROR�FATAL�
ValueError�strr	�sys�stderr�stdout�write�UnicodeEncodeError�encoding�encode�decode�flush)r
�level�msg�args�streamrrrr�_logs
zLog._logcGs|�|||�dSr)r#)r
rr r!rrr�log'szLog.logcGs|�t||�dSr)r#r�r
r r!rrr�debug*sz	Log.debugcGs|�t||�dSr)r#rr%rrr�info-szLog.infocGs|�t||�dSr)r#rr%rrr�warn0szLog.warncGs|�t||�dSr)r#rr%rrr�error3sz	Log.errorcGs|�t||�dSr)r#rr%rrr�fatal6sz	Log.fatalN)�__name__�
__module__�__qualname__rr
r#r$r&r'r(r)r*rrrrrsrcCstj}|t_|Sr)�_global_logr	)r�oldrrr�
set_thresholdAsr0cCs8|dkrtt�n"|dkr$tt�n|dkr4tt�dS)Nrrr)r0rrr)�vrrr�
set_verbosityGs

r2)rrrrrrrr.r$r&r'r(r)r*r0r2rrrr�<module>s+PKX[�T� � *__pycache__/text_file.cpython-38.opt-1.pycnu�[���U

e5d�0�@s&dZddlZddlZGdd�d�ZdS)z�text_file

provides the TextFile class, which gives an interface to text files
that (optionally) takes care of stripping comments, ignoring blank
lines, and joining lines with backslashes.�Nc@steZdZdZdddddddd�Zddd�Zd	d
�Zdd�Zdd
d�Zddd�Z	ddd�Z
dd�Zdd�Zdd�Z
dS)�TextFilea�Provides a file-like object that takes care of all the things you
       commonly want to do when processing a text file that has some
       line-by-line syntax: strip comments (as long as "#" is your
       comment character), skip blank lines, join adjacent lines by
       escaping the newline (ie. backslash at end of line), strip
       leading and/or trailing whitespace.  All of these are optional
       and independently controllable.

       Provides a 'warn()' method so you can generate warning messages that
       report physical line number, even if the logical line in question
       spans multiple physical lines.  Also provides 'unreadline()' for
       implementing line-at-a-time lookahead.

       Constructor is called as:

           TextFile (filename=None, file=None, **options)

       It bombs (RuntimeError) if both 'filename' and 'file' are None;
       'filename' should be a string, and 'file' a file object (or
       something that provides 'readline()' and 'close()' methods).  It is
       recommended that you supply at least 'filename', so that TextFile
       can include it in warning messages.  If 'file' is not supplied,
       TextFile creates its own using 'io.open()'.

       The options are all boolean, and affect the value returned by
       'readline()':
         strip_comments [default: true]
           strip from "#" to end-of-line, as well as any whitespace
           leading up to the "#" -- unless it is escaped by a backslash
         lstrip_ws [default: false]
           strip leading whitespace from each line before returning it
         rstrip_ws [default: true]
           strip trailing whitespace (including line terminator!) from
           each line before returning it
         skip_blanks [default: true}
           skip lines that are empty *after* stripping comments and
           whitespace.  (If both lstrip_ws and rstrip_ws are false,
           then some lines may consist of solely whitespace: these will
           *not* be skipped, even if 'skip_blanks' is true.)
         join_lines [default: false]
           if a backslash is the last non-newline character on a line
           after stripping comments and whitespace, join the following line
           to it to form one "logical line"; if N consecutive lines end
           with a backslash, then N+1 physical lines will be joined to
           form one logical line.
         collapse_join [default: false]
           strip leading whitespace from lines that are joined to their
           predecessor; only matters if (join_lines and not lstrip_ws)
         errors [default: 'strict']
           error handler used to decode the file content

       Note that since 'rstrip_ws' can strip the trailing newline, the
       semantics of 'readline()' must differ from those of the builtin file
       object's 'readline()' method!  In particular, 'readline()' returns
       None for end-of-file: an empty string might just be a blank line (or
       an all-whitespace line), if 'rstrip_ws' is true but 'skip_blanks' is
       not.�r�strict)�strip_comments�skip_blanks�	lstrip_ws�	rstrip_ws�
join_lines�
collapse_join�errorsNcKs�|dkr|dkrtd��|j��D]0}||kr@t||||�q"t|||j|�q"|��D]}||jkr\td|��q\|dkr�|�|�n||_||_d|_g|_	dS)z�Construct a new TextFile object.  At least one of 'filename'
           (a string) and 'file' (a file-like object) must be supplied.
           They keyword argument options are described above and affect
           the values returned by 'readline()'.Nz7you must supply either or both of 'filename' and 'file'zinvalid TextFile option '%s'r)
�RuntimeError�default_options�keys�setattr�KeyError�open�filename�file�current_line�linebuf)�selfrrZoptions�opt�r�+/usr/lib64/python3.8/distutils/text_file.py�__init__Ns
zTextFile.__init__cCs&||_tj|jd|jd�|_d|_dS)zyOpen a new file named 'filename'.  This overrides both the
           'filename' and 'file' arguments to the constructor.�r)rrN)r�iorrrr)rrrrrrosz
TextFile.opencCs$|j}d|_d|_d|_|��dS)ziClose the current file and forget everything we know about it
           (filename, current line number).N)rrr�close)rrrrrrvs
zTextFile.closecCsjg}|dkr|j}|�|jd�t|ttf�rD|�dt|��n|�d|�|�t|��d�|�S)Nz, z
lines %d-%d: z	line %d: �)r�appendr�
isinstance�list�tuple�str�join)r�msg�lineZoutmsgrrr�	gen_errorszTextFile.gen_errorcCstd|�||���dS)Nzerror: )�
ValueErrorr'�rr%r&rrr�error�szTextFile.errorcCs tj�d|�||�d�dS)a�Print (to stderr) a warning message tied to the current logical
           line in the current file.  If the current logical line in the
           file spans multiple physical lines, the warning refers to the
           whole range, eg. "lines 3-5".  If 'line' supplied, it overrides
           the current line number; it may be a list or tuple to indicate a
           range of physical lines, or an integer for a single physical
           line.z	warning: �
N)�sys�stderr�writer'r)rrr�warn�sz
TextFile.warncCs�|jr|jd}|jd=|Sd}|j��}|dkr6d}|jr�|r�|�d�}|dkrTnX|dksl||ddkr�|ddkr|dp~d}|d|�|}|��dkr�q n|�d	d�}|j�r|�r|dkr�|�d
�|S|j	r�|�
�}||}t|jt
��r
|jdd|jd<n|j|jdg|_n:|dk�r,dSt|jt
��rL|jdd|_n|jd|_|j�rr|j�rr|��}n"|j�r�|�
�}n|j�r�|��}|dk�s�|dk�r�|j�r�q |j�r�|ddk�r�|dd�}q |dd�dk�r�|dd�d}q |S)
aURead and return a single logical line from the current file (or
           from an internal buffer if lines have previously been "unread"
           with 'unreadline()').  If the 'join_lines' option is true, this
           may involve reading multiple physical lines concatenated into a
           single string.  Updates the current line number, so calling
           'warn()' after 'readline()' emits a warning about the physical
           line(s) just read.  Returns None on end-of-file, since the empty
           string can occur if 'rstrip_ws' is true but 'strip_blanks' is
           not.���rN�#rr�\r+z\#z2continuation line immediately precedes end-of-file���z\
)rr�readliner�find�strip�replacer	r/r
�lstripr rr!rr�rstripr)rr&Zbuildup_line�posZeolrrrr4�sf




	
�


zTextFile.readlinecCs(g}|��}|dkr|S|�|�qdS)zWRead and return the list of all logical lines remaining in the
           current file.N)r4r)r�linesr&rrr�	readliness
zTextFile.readlinescCs|j�|�dS)z�Push 'line' (a string) onto an internal buffer that will be
           checked by future 'readline()' calls.  Handy for implementing
           a parser with line-at-a-time lookahead.N)rr)rr&rrr�
unreadlineszTextFile.unreadline)NN)N)N)N)�__name__�
__module__�__qualname__�__doc__r
rrrr'r*r/r4r<r=rrrrr
s$:�	
!	



x
r)rAr,rrrrrr�<module>sPKX[��ES��&__pycache__/debug.cpython-38.opt-2.pycnu�[���U

e5d��@sddlZej�d�ZdS)�NZDISTUTILS_DEBUG)�os�environ�get�DEBUG�rr�'/usr/lib64/python3.8/distutils/debug.py�<module>sPKX[kLjGsbsb%__pycache__/dist.cpython-38.opt-2.pycnu�[���U

e5d���@s�ddlZddlZddlZddlmZzddlZWnek
rHdZYnXddlTddlm	Z	m
Z
ddlmZm
Z
mZddlmZddlmZe�d�Zd	d
�ZGdd�d�ZGd
d�d�Zdd�ZdS)�N)�message_from_file)�*)�FancyGetopt�translate_longopt)�
check_environ�	strtobool�
rfc822_escape��log)�DEBUGz^[a-zA-Z]([a-zA-Z0-9_]*)$cCsLt|t�rn<t|t�sHt|�j}d|�d|�d�}t�tj|�t|�}|S)Nz
Warning: 'z' should be a list, got type '�')�
isinstance�str�list�type�__name__r
ZWARN)�valueZ	fieldname�typename�msg�r�&/usr/lib64/python3.8/distutils/dist.py�_ensure_lists


rc@sleZdZdddddgZdZddd	d
ddd
ddddddddddddddgZdd�eD�ZddiZd`d!d"�Zd#d$�Z	dad&d'�Z
d(d)�Zdbd*d+�Zd,d-�Z
d.d/�Zd0d1�Zd2d3�Zd4d4gfd5d6�Zd7d8�Zd9d:�Zd;d<�Zd=d>�Zd?d@�ZdAdB�ZdcdCdD�ZdddEdF�ZdedHdI�ZejfdJdK�ZdLdM�ZdNdO�ZdPdQ�Z dRdS�Z!dTdU�Z"dVdW�Z#dXdY�Z$dZd[�Z%d\d]�Z&d^d_�Z'd S)f�Distribution)�verbose�vzrun verbosely (default)�)�quiet�qz!run quietly (turns verbosity off))zdry-run�nzdon't actually do anything)�help�hzshow detailed help message)zno-user-cfgNz-ignore pydistutils.cfg in your home directoryz�Common commands: (see '--help-commands' for more)

  setup.py build      will build the package underneath 'build/'
  setup.py install    will install the package
)z
help-commandsNzlist all available commands)�nameNzprint package name)�version�Vzprint package version)�fullnameNzprint <package name>-<version>)�authorNzprint the author's name)�author-emailNz print the author's email address)�
maintainerNzprint the maintainer's name)zmaintainer-emailNz$print the maintainer's email address)�contactNz7print the maintainer's name if known, else the author's)z
contact-emailNz@print the maintainer's email address if known, else the author's)�urlNzprint the URL for this package)�licenseNz print the license of the package)�licenceNzalias for --license)�descriptionNzprint the package description)zlong-descriptionNz"print the long package description)�	platformsNzprint the list of platforms)�classifiersNzprint the list of classifiers)�keywordsNzprint the list of keywords)�providesNz+print the list of packages/modules provided)�requiresNz+print the list of packages/modules required)�	obsoletesNz0print the list of packages/modules made obsoletecCsg|]}t|d��qS)r�r)�.0�xrrr�
<listcomp>�szDistribution.<listcomp>rrNcCs\d|_d|_d|_|jD]}t||d�qt�|_|jjD] }d|}t||t|j|��q:i|_	d|_
d|_d|_i|_
g|_d|_i|_d|_d|_d|_d|_d|_d|_d|_d|_d|_d|_d|_i|_i|_|�r|�d�}|dk	�r8|d=|��D]4\}}|� |�}|��D]\}	}
d|
f||	<�q�qd|k�r~|d|d<|d=d	}t!dk	�rnt!�"|�nt#j$�%|d
�|��D]�\}}
t&|jd|��r�t|jd|�|
�nNt&|j|��r�t|j||
�n0t&||��r�t|||
�ndt'|�}t!�"|��q�d
|_(|jdk	�rP|jD].}
|
�)d��s6�qP|
dk�r d|_(�qP�q |�*�dS)Nrr�get_��optionszsetup scriptr+r*z:'licence' distribution option is deprecated; use 'license'�
Zset_zUnknown distribution option: %sT�-z
--no-user-cfgF)+r�dry_runr�display_option_names�setattr�DistributionMetadata�metadata�_METHOD_BASENAMES�getattr�cmdclass�command_packages�script_name�script_args�command_optionsZ
dist_files�packagesZpackage_dataZpackage_dir�
py_modules�	libraries�headers�ext_modulesZext_packageZinclude_dirsZ
extra_path�scripts�
data_filesZpassword�command_obj�have_run�get�items�get_option_dict�warnings�warn�sys�stderr�write�hasattr�repr�
want_user_cfg�
startswith�finalize_options)�self�attrs�attr�basenameZmethod_namer9�commandZcmd_options�opt_dict�opt�valr�key�argrrr�__init__�s~








zDistribution.__init__cCs&|j�|�}|dkr"i}|j|<|S�N)rGrQ)r^rb�dictrrrrS&szDistribution.get_option_dictr8c	Cs�ddlm}|dkr"t|j���}|dk	r@|�||�|d}|sV|�|d�dS|D]h}|j�|�}|dkr�|�|d|�qZ|�|d|�||�}|�d�D]}|�|d|�q�qZdS)Nr)�pformatz  zno commands known yetzno option dict for '%s' commandzoption dict for '%s' command:r:)Zpprintrk�sortedrG�keys�announcerQ�split)	r^�header�commands�indentrkZcmd_namerc�out�linerrr�dump_option_dicts1s*��zDistribution.dump_option_dictscCs�g}t�tj�tjdj�}tj�|d�}tj�|�rB|�	|�tj
dkrRd}nd}|jr�tj�tj�d�|�}tj�|�r�|�	|�d}tj�|�r�|�	|�t
r�|�dd	�|��|S)
N�	distutilsz
distutils.cfg�posixz.pydistutils.cfgzpydistutils.cfg�~z	setup.cfgzusing config files: %sz, )r�os�path�dirnamerV�modules�__file__�join�isfile�appendr!r[�
expanduserrrn)r^�filesZsys_dirZsys_fileZ
user_filenameZ	user_fileZ
local_filerrr�find_config_filesMs&



zDistribution.find_config_filesc
Cs�ddlm}tjtjkr8ddddddd	d
ddd
ddg
}ng}t|�}|dkrT|��}trb|�d�|�}|D]�}tr�|�d|�|�	|�|�
�D]V}|�|�}|�|�}|D]8}	|	dkr�|	|kr�|�
||	�}
|	�dd�}	||
f||	<q�q�|��qld|jk�r�|jd��D]�\}	\}}
|j�
|	�}zF|�rDt||t|
��n(|	dk�r`t||	t|
��nt||	|
�Wn,tk
�r�}
zt|
��W5d}
~
XYnX�qdS)Nr)�ConfigParserzinstall-basezinstall-platbasezinstall-libzinstall-platlibzinstall-purelibzinstall-headerszinstall-scriptszinstall-data�prefixzexec-prefix�home�user�rootz"Distribution.parse_config_files():z  reading %srr;�_�global)rr<)Zconfigparserr�rVr��base_prefix�	frozensetr�rrn�readZsectionsr9rSrQ�replacerhrGrR�negative_optr>r�
ValueError�DistutilsOptionError)r^�	filenamesr�Zignore_options�parser�filenameZsectionr9rcrdre�src�aliasrrrr�parse_config_files}s^�





zDistribution.parse_config_filescCs�|��}g|_t||j�}|�|j�|�ddi�|j|j|d�}|�	�}t
�|j�|�
|�rhdS|r�|�||�}|dkrhdSqh|jr�|j|t|j�dk|jd�dS|js�td��dS)Nr+r*)�args�objectr��display_optionsrqzno commands suppliedT)�_get_toplevel_optionsrqrr��set_negative_aliasesr�Zset_aliases�getoptrFZget_option_orderr
Z
set_verbosityr�handle_display_options�_parse_command_optsr�
_show_help�len�DistutilsArgError)r^Ztoplevel_optionsr�r��option_orderrrr�parse_command_line�s.	
�zDistribution.parse_command_linecCs|jdgS)N)zcommand-packages=Nz0list of packages that provide distutils commands)�global_options�r^rrrr��s�z"Distribution._get_toplevel_optionsc
Cs�ddlm}|d}t�|�s*td|��|j�|�z|�|�}Wn*tk
rn}zt	|��W5d}~XYnXt
||�s�td|��t|d�r�t
|jt�s�d}t||��|j}t|d�r�|��}|�|j�t|d�r�t
|jt�r�t|j�}ng}|�|j|j|�|�|�|�|d	d��\}}	t|	d
��rV|	j�rV|j|d|gd�dSt|d��r�t
|jt��r�d}
|jD]F\}}}
}t|	|�|���rzd	}
t|��r�|�ntd||f���qz|
�r�dS|�|�}t|	���D]\}}d
|f||<�q�|S)Nr��Commandzinvalid command name '%s'z&command class %s must subclass Command�user_optionszIcommand class %s must provide 'user_options' attribute (a list of tuples)r��help_optionsrrr�zYinvalid help function %r for help option '%s': must be a callable object (function, etc.)zcommand line) �
distutils.cmdr��
command_re�match�
SystemExitrqr��get_command_class�DistutilsModuleErrorr��
issubclassZDistutilsClassErrorrYr
r�rr��copy�updater��fix_help_options�set_option_tabler�r�r�rr�Z
get_attr_name�callablerS�varsrR)r^r�r�r�rbZ	cmd_classrr�r�ZoptsZhelp_option_foundZhelp_optionZshortZdesc�funcrcr!rrrrr�sr


�

�


���

�
��
z Distribution._parse_command_optscCsPdD]F}t|j|�}|dkrqt|t�rdd�|�d�D�}t|j||�qdS)N�r/r-cSsg|]}|���qSr��strip)r4Zelmrrrr6jsz1Distribution.finalize_options.<locals>.<listcomp>�,)rBr@r
rror>)r^r`rrrrr]`s
zDistribution.finalize_optionsrc
Csddlm}ddlm}|rR|r*|��}n|j}|�|�|�|jd�t	d�|rt|�|j
�|�d�t	d�|jD]z}t|t
�r�t||�r�|}	n
|�|�}	t|	d�r�t|	jt�r�|�|	jt|	j��n|�|	j�|�d|	j�t	d�qzt	||j��dS)	Nr��	gen_usager�z
Global options:r8zKInformation display options (just display information, ignore any commands)r�zOptions for '%s' command:)�distutils.corer�r�r�r�r�r�Z
print_help�common_usage�printr�rqr
rr�r�rYr�rr�r�rrE)
r^r�r�r�rqr�r�r9rb�klassrrrr�ms:

�



��
zDistribution._show_helpc	Cs�ddlm}|jr4|��td�t||j��dSd}i}|jD]}d||d<qB|D]l\}}|rX|�|�rXt|�}t	|j
d|��}|dkr�td�|��n |dkr�td	�|��nt|�d}qX|S)
Nrr�r8rr7r�r�)r.r0r1r2r:)r�r�Z
help_commands�print_commandsr�rEr�rQrrBr@r~)	r^r�r�Zany_display_optionsZis_display_option�optionrdrerrrrr��s*
z#Distribution.handle_display_optionsc	Csjt|d�|D]T}|j�|�}|s.|�|�}z
|j}Wntk
rPd}YnXtd|||f�qdS)N�:�(no description available)z
  %-*s  %s)r�rCrQr�r,�AttributeError)r^rqrp�
max_length�cmdr�r,rrr�print_command_list�s


zDistribution.print_command_listcCs�ddl}|jj}i}|D]}d||<qg}|j��D]}|�|�s4|�|�q4d}||D]}t|�|krZt|�}qZ|�|d|�|r�t	�|�|d|�dS)NrrzStandard commandszExtra commands)
�distutils.commandrb�__all__rCrmrQr�r�r�r�)r^rv�std_commands�is_stdr��extra_commandsr�rrrr��s.


��zDistribution.print_commandsc		Cs�ddl}|jj}i}|D]}d||<qg}|j��D]}|�|�s4|�|�q4g}||D]P}|j�|�}|sx|�|�}z
|j}Wnt	k
r�d}YnX|�||f�qZ|S)Nrrr�)
r�rbr�rCrmrQr�r�r,r�)	r^rvr�r�r�r��rvr�r,rrr�get_command_list�s(	




zDistribution.get_command_listcCsN|j}t|t�sJ|dkrd}dd�|�d�D�}d|krD|�dd�||_|S)Nr8cSsg|]}|dkr|���qS)r8r�)r4Zpkgrrrr6!sz5Distribution.get_command_packages.<locals>.<listcomp>r�zdistutils.commandr)rDr
rro�insert)r^Zpkgsrrr�get_command_packagess
z!Distribution.get_command_packagesc	Cs�|j�|�}|r|S|��D]�}d||f}|}zt|�tj|}Wntk
r^YqYnXzt||�}Wn&tk
r�t	d|||f��YnX||j|<|St	d|��dS)Nz%s.%sz3invalid command '%s' (no class '%s' in module '%s')zinvalid command '%s')
rCrQr��
__import__rVr|�ImportErrorrBr�r�)r^rbr�ZpkgnameZmodule_nameZ
klass_name�modulerrrr�'s,
��

zDistribution.get_command_classcCsl|j�|�}|sh|rhtr&|�d|�|�|�}||�}|j|<d|j|<|j�|�}|rh|�||�|S)Nz<Distribution.get_command_obj(): creating '%s' command objectr)rOrQrrnr�rPrG�_set_command_options)r^rbZcreate�cmd_objr�r9rrr�get_command_objMs�

zDistribution.get_command_objcCs\|��}|dkr|�|�}tr,|�d|�|��D�] \}\}}trZ|�d|||f�zdd�|jD�}Wntk
r�g}YnXz
|j}Wntk
r�i}YnXz|t|t	�}	||kr�|	r�t
|||t|��nJ||kr�|	r�t
||t|��n,t||��rt
|||�nt
d|||f��Wq4tk
�rT}
zt
|
��W5d}
~
XYq4Xq4dS)Nz#  setting options for '%s' command:z    %s = %s (from %s)cSsg|]}t|��qSrr3)r4�orrrr6|s�z5Distribution._set_command_options.<locals>.<listcomp>z1error in %s: command '%s' has no such option '%s')�get_command_namerSrrnrRZboolean_optionsr�r�r
rr>rrYr�r�)r^rOZoption_dict�command_namer��sourcerZ	bool_optsZneg_optZ	is_stringrrrrr�hsF	

��




��z!Distribution._set_command_optionsrcCs|ddlm}t||�s&|}|�|�}n|��}|js8|S|��d|_d|j|<|�|�|rx|�	�D]}|�
||�qf|S)Nrr�)r�r�r
r�r�Z	finalizedZinitialize_optionsrPr�Zget_sub_commands�reinitialize_command)r^rbZreinit_subcommandsr�r��subrrrr��s


z!Distribution.reinitialize_commandcCst�||�dSrir	)r^r�levelrrrrn�szDistribution.announcecCs|jD]}|�|�qdSri)rq�run_command)r^r�rrr�run_commands�s
zDistribution.run_commandscCsD|j�|�rdSt�d|�|�|�}|��|��d|j|<dS)Nz
running %sr)rPrQr
�infor�Zensure_finalized�run)r^rbr�rrrr��s	
zDistribution.run_commandcCst|jp|jpg�dkS�Nr)r�rHrIr�rrr�has_pure_modules�szDistribution.has_pure_modulescCs|jot|j�dkSr�)rLr�r�rrr�has_ext_modules�szDistribution.has_ext_modulescCs|jot|j�dkSr�)rJr�r�rrr�has_c_libraries�szDistribution.has_c_librariescCs|��p|��Sri)r�r�r�rrr�has_modules�szDistribution.has_modulescCs|jot|j�dkSr�)rKr�r�rrr�has_headers�szDistribution.has_headerscCs|jot|j�dkSr�)rMr�r�rrr�has_scripts�szDistribution.has_scriptscCs|jot|j�dkSr�)rNr�r�rrr�has_data_files�szDistribution.has_data_filescCs|��o|��o|��Sri)r�r�r�r�rrr�is_pure�s
��zDistribution.is_pure)N)NNr8)N)r)N)r)(r�
__module__�__qualname__r�r�r�r=r�rhrSrur�r�r�r�r�r]r�r�r�r�r�r�r�r�r�r�r
�INFOrnr�r�r�r�r�r�r�r�r�r�rrrrr,s��	�,

0
:C[
�
2(!"&

,
)
rc@seZdZdZdAdd�Zdd�Zdd�Zd	d
�Zdd�Zd
d�Z	dd�Z
dd�Zdd�Zdd�Z
dd�Zdd�Zdd�Zdd�Zdd �Zd!d"�ZeZd#d$�Zd%d&�Zd'd(�Zd)d*�Zd+d,�Zd-d.�Zd/d0�Zd1d2�Zd3d4�Zd5d6�Zd7d8�Zd9d:�Z d;d<�Z!d=d>�Z"d?d@�Z#dS)Br?)r!r"r%�author_emailr'�maintainer_emailr)r*r,�long_descriptionr/r-r$r(Z
contact_emailr.�download_urlr0r1r2NcCs�|dk	r|�t|��nfd|_d|_d|_d|_d|_d|_d|_d|_	d|_
d|_d|_d|_
d|_d|_d|_d|_d|_dSri)�
read_pkg_file�openr!r"r%r�r'r�r)r*r,r�r/r-r.r�r0r1r2)r^rzrrrrh
s&zDistributionMetadata.__init__cst|���fdd�}�fdd�}�d}|d�|_|d�|_|d�|_|d	�|_d|_|d
�|_d|_|d�|_|d�|_	d
�kr�|d
�|_
nd|_
|d�|_|d�|_d�kr�|d��d�|_
|d�|_|d�|_|dkr�|d�|_|d�|_|d�|_nd|_d|_d|_dS)Ncs�|}|dkrdS|S�NZUNKNOWNr)r!r�rrr�_read_field(sz7DistributionMetadata.read_pkg_file.<locals>._read_fieldcs��|d�}|gkrdS|Sri)Zget_all)r!�valuesr�rr�
_read_list.sz6DistributionMetadata.read_pkg_file.<locals>._read_listzmetadata-versionr!r"Zsummaryr%r&z	home-pager*zdownload-urlr,r/r��platformZ
classifier�1.1r1r0r2)rr!r"r,r%r'r�r�r)r*r�r�ror/r-r.r1r0r2)r^�filer�r�Zmetadata_versionrr�rr�$s:












z"DistributionMetadata.read_pkg_filec	Cs2ttj�|d�ddd��}|�|�W5QRXdS)NzPKG-INFO�wzUTF-8)�encoding)r�ryrzr~�write_pkg_file)r^Zbase_dirZpkg_inforrr�write_pkg_infoXs
�z#DistributionMetadata.write_pkg_infocCsbd}|js"|js"|js"|js"|jr&d}|�d|�|�d|���|�d|���|�d|���|�d|�	��|�d|�
��|�d	|���|�d
|���|jr�|�d|j�t
|���}|�d|�d
�|���}|�r|�d|�|�|d|���|�|d|���|�|d|���|�|d|���|�|d|���dS)Nz1.0r�zMetadata-Version: %s
z	Name: %s
zVersion: %s
zSummary: %s
zHome-page: %s
zAuthor: %s
zAuthor-email: %s
zLicense: %s
zDownload-URL: %s
zDescription: %s
r�z
Keywords: %s
ZPlatformZ
ClassifierZRequiresZProvidesZ	Obsoletes)r0r1r2r.r�rX�get_name�get_version�get_description�get_url�get_contact�get_contact_email�get_licenser�get_long_descriptionr~�get_keywords�_write_list�
get_platforms�get_classifiers�get_requires�get_provides�
get_obsoletes)r^r�r"Z	long_descr/rrrr_s6��z#DistributionMetadata.write_pkg_filecCs |D]}|�d||f�qdS)Nz%s: %s
)rX)r^r�r!r�rrrrr
�sz DistributionMetadata._write_listcCs
|jpdSr�)r!r�rrrr�szDistributionMetadata.get_namecCs
|jpdS)Nz0.0.0)r"r�rrrr�sz DistributionMetadata.get_versioncCsd|��|��fS)Nz%s-%s)rrr�rrr�get_fullname�sz!DistributionMetadata.get_fullnamecCs
|jpdSr�)r%r�rrr�
get_author�szDistributionMetadata.get_authorcCs
|jpdSr�)r�r�rrr�get_author_email�sz%DistributionMetadata.get_author_emailcCs
|jpdSr�)r'r�rrr�get_maintainer�sz#DistributionMetadata.get_maintainercCs
|jpdSr�)r�r�rrr�get_maintainer_email�sz)DistributionMetadata.get_maintainer_emailcCs|jp|jpdSr�)r'r%r�rrrr�sz DistributionMetadata.get_contactcCs|jp|jpdSr�)r�r�r�rrrr	�sz&DistributionMetadata.get_contact_emailcCs
|jpdSr�)r)r�rrrr�szDistributionMetadata.get_urlcCs
|jpdSr�)r*r�rrrr
�sz DistributionMetadata.get_licensecCs
|jpdSr�)r,r�rrrr�sz$DistributionMetadata.get_descriptioncCs
|jpdSr�)r�r�rrrr�sz)DistributionMetadata.get_long_descriptioncCs
|jpgSri)r/r�rrrr�sz!DistributionMetadata.get_keywordscCst|d�|_dS)Nr/)rr/�r^rrrr�set_keywords�sz!DistributionMetadata.set_keywordscCs|jp
dgSr�)r-r�rrrr�sz"DistributionMetadata.get_platformscCst|d�|_dS)Nr-)rr-rrrr�
set_platforms�sz"DistributionMetadata.set_platformscCs
|jpgSri)r.r�rrrr�sz$DistributionMetadata.get_classifierscCst|d�|_dS)Nr.)rr.rrrr�set_classifiers�sz$DistributionMetadata.set_classifierscCs
|jpdSr�)r�r�rrr�get_download_url�sz%DistributionMetadata.get_download_urlcCs
|jpgSri)r1r�rrrr�sz!DistributionMetadata.get_requirescCs,ddl}|D]}|j�|�qt|�|_dSr�)�distutils.versionpredicate�versionpredicate�VersionPredicaterr1�r^rrvrrrr�set_requires�sz!DistributionMetadata.set_requirescCs
|jpgSri)r0r�rrrr�sz!DistributionMetadata.get_providescCs6dd�|D�}|D]}ddl}|j�|�q||_dS)NcSsg|]}|���qSrr�)r4rrrrr6�sz5DistributionMetadata.set_provides.<locals>.<listcomp>r)rrZsplit_provisionr0)r^rrrvrrr�set_provides�s
z!DistributionMetadata.set_providescCs
|jpgSri)r2r�rrrr�sz"DistributionMetadata.get_obsoletescCs,ddl}|D]}|j�|�qt|�|_dSr�)rrrrr2r rrr�
set_obsoletes�sz"DistributionMetadata.set_obsoletes)N)$rr�r�rArhr�rrr
rrrrrrrrr	rr
Zget_licencerrrrrrrrrrr!rr"rr#rrrrr?�sB	
4"r?cCs$g}|D]}|�|dd��q|S)Nr�)r�)r9Znew_optionsZ
help_tuplerrrr��sr�)rVry�reZemailrrTr�Zdistutils.errorsZdistutils.fancy_getoptrrZdistutils.utilrrrrvr
Zdistutils.debugr�compiler�rrr?r�rrrr�<module>s2

ZcPKX[�u�3&3&)__pycache__/filelist.cpython-38.opt-1.pycnu�[���U

e5d 2�@s�dZddlZddlZddlZddlZddlmZddlmZm	Z	ddl
mZGdd�d�Zdd	�Z
ejfd
d�Zdd
�Zddd�ZdS)zsdistutils.filelist

Provides the FileList class, used for poking about the filesystem
and building lists of files.
�N��convert_path)�DistutilsTemplateError�DistutilsInternalError)�logc@s|eZdZdZddd�Zdd�Zejfdd�Zd	d
�Z	dd�Z
d
d�Zdd�Zdd�Z
dd�Zdd�Zddd�Zddd�ZdS) �FileLista�A list of files built by on exploring the filesystem and filtered by
    applying various patterns to what we find there.

    Instance attributes:
      dir
        directory from which files will be taken -- only used if
        'allfiles' not supplied to constructor
      files
        list of filenames currently being built/filtered/manipulated
      allfiles
        complete list of files under consideration (ie. without any
        filtering applied)
    NcCsd|_g|_dS�N)�allfiles�files)�self�warn�debug_print�r�*/usr/lib64/python3.8/distutils/filelist.py�__init__szFileList.__init__cCs
||_dSr)r	)rr	rrr�set_allfiles#szFileList.set_allfilescCst|�|_dSr)�findallr	)r�dirrrrr&szFileList.findallcCsddlm}|rt|�dS)z~Print 'msg' to stdout if the global DEBUG (taken from the
        DISTUTILS_DEBUG environment variable) flag is true.
        r)�DEBUGN)Zdistutils.debugr�print)r�msgrrrrr
)szFileList.debug_printcCs|j�|�dSr)r
�append)r�itemrrrr3szFileList.appendcCs|j�|�dSr)r
�extend)r�itemsrrrr6szFileList.extendcCs<tttjj|j��}g|_|D]}|j�tjj|��qdSr)�sorted�map�os�path�splitr
r�join)rZsortable_filesZ
sort_tuplerrr�sort9sz
FileList.sortcCs@tt|j�ddd�D]$}|j||j|dkr|j|=qdS)N�r���)�range�lenr
)r�irrr�remove_duplicatesCszFileList.remove_duplicatescCs�|��}|d}d}}}|dkrTt|�dkr<td|��dd�|dd�D�}n~|dkr�t|�d	krttd
|��t|d�}dd�|dd�D�}n:|dkr�t|�dkr�td
|��t|d�}ntd|��||||fS)Nr)�include�exclude�global-include�global-exclude�z&'%s' expects <pattern1> <pattern2> ...cSsg|]}t|��qSrr��.0�wrrr�
<listcomp>Wsz1FileList._parse_template_line.<locals>.<listcomp>r")�recursive-include�recursive-exclude�z,'%s' expects <dir> <pattern1> <pattern2> ...cSsg|]}t|��qSrrr-rrrr0]s)�graft�prunez#'%s' expects a single <dir_pattern>zunknown action '%s')rr%rr)r�lineZwords�action�patternsr�dir_patternrrr�_parse_template_lineLs0���zFileList._parse_template_linecCs@|�|�\}}}}|dkrV|�dd�|��|D]}|j|dd�s2t�d|�q2�n�|dkr�|�dd�|��|D]}|j|dd�svt�d	|�qv�n�|d
kr�|�dd�|��|D]}|j|dd�s�t�d
|�q��n^|dk�r(|�dd�|��|D]"}|j|dd��st�d|��q�n|dk�rv|�d|d�|�f�|D]$}|j||d��sNt�d||��qNn�|dk�r�|�d|d�|�f�|D]$}|j||d��s�t�d||��q�nx|dk�r�|�d|�|jd|d��s<t�d|�nB|dk�r0|�d|�|jd|d��s<t�d|�ntd|��dS)Nr(zinclude � r")�anchorz%warning: no files found matching '%s'r)zexclude z9warning: no previously-included files found matching '%s'r*zglobal-include rz>warning: no files found matching '%s' anywhere in distributionr+zglobal-exclude zRwarning: no previously-included files matching '%s' found anywhere in distributionr1zrecursive-include %s %s)�prefixz:warning: no files found matching '%s' under directory '%s'r2zrecursive-exclude %s %szNwarning: no previously-included files matching '%s' found under directory '%s'r4zgraft z+warning: no directories found matching '%s'r5zprune z6no previously-included directories found matching '%s'z'this cannot happen: invalid action '%s')r:r
r �include_patternrr�exclude_patternr)rr6r7r8rr9�patternrrr�process_template_linehs��
�
�

�
��

��

�
��zFileList.process_template_liner"rcCsld}t||||�}|�d|j�|jdkr4|��|jD],}|�|�r:|�d|�|j�|�d}q:|S)a�Select strings (presumably filenames) from 'self.files' that
        match 'pattern', a Unix-style wildcard (glob) pattern.  Patterns
        are not quite the same as implemented by the 'fnmatch' module: '*'
        and '?'  match non-special characters, where "special" is platform-
        dependent: slash on Unix; colon, slash, and backslash on
        DOS/Windows; and colon on Mac OS.

        If 'anchor' is true (the default), then the pattern match is more
        stringent: "*.py" will match "foo.py" but not "foo/bar.py".  If
        'anchor' is false, both of these will match.

        If 'prefix' is supplied, then only filenames starting with 'prefix'
        (itself a pattern) and ending with 'pattern', with anything in between
        them, will match.  'anchor' is ignored in this case.

        If 'is_regex' is true, 'anchor' and 'prefix' are ignored, and
        'pattern' is assumed to be either a string containing a regex or a
        regex object -- no translation is done, the regex is just compiled
        and used as-is.

        Selected strings will be added to self.files.

        Return True if files are found, False otherwise.
        Fz%include_pattern: applying regex r'%s'Nz adding T)�translate_patternr
r@r	r�searchr
r)rr@r<r=�is_regex�files_found�
pattern_re�namerrrr>�s�


zFileList.include_patterncCsrd}t||||�}|�d|j�tt|j�ddd�D]4}|�|j|�r8|�d|j|�|j|=d}q8|S)aRemove strings (presumably filenames) from 'files' that match
        'pattern'.  Other parameters are the same as for
        'include_pattern()', above.
        The list 'self.files' is modified in place.
        Return True if files are found, False otherwise.
        Fz%exclude_pattern: applying regex r'%s'r"r#z
 removing T)rBr
r@r$r%r
rC)rr@r<r=rDrErFr&rrrr?�s�zFileList.exclude_pattern)NN)r"Nr)r"Nr)�__name__�
__module__�__qualname__�__doc__rrr�curdirrr
rrr!r'r:rAr>r?rrrrrs 


	L
,�rcCs&dd�tj|dd�D�}ttjj|�S)z%
    Find all files under 'path'
    css,|]$\}}}|D]}tj�||�VqqdSr)rrr )r.�base�dirsr
�filerrr�	<genexpr>�s�z#_find_all_simple.<locals>.<genexpr>T)�followlinks)r�walk�filterr�isfile)rZresultsrrr�_find_all_simple�s�rUcCs6t|�}|tjkr.tjtjj|d�}t||�}t|�S)z�
    Find all files under 'dir' and return the list of full filenames.
    Unless dir is '.', return full filenames with dir prepended.
    )�start)	rUrrL�	functools�partialr�relpathr�list)rr
Zmake_relrrrrs


rcCs8t�|�}tj}tjdkrd}d|}t�d||�}|S)z�Translate a shell-like glob pattern to a regular expression; return
    a string containing the regex.  Differs from 'fnmatch.translate()' in
    that '*' does not match "special characters" (which are
    platform-specific).
    �\z\\\\z\1[^%s]z((?<!\\)(\\\\)*)\.)�fnmatch�	translater�sep�re�sub)r@rFr^Zescapedrrr�
glob_to_res

rar"c
Cs�|rt|t�rt�|�S|Std��d�\}}}|r>t|�}nd}|dk	r�t|�}|t|�t|�t|��}tj}	tjdkr�d}	|t|�t|�t|��}d|||	||f}n|r�d||t|�d�f}t�|�S)aTranslate a shell-like wildcard pattern to a compiled regular
    expression.  Return the compiled regex.  If 'is_regex' true,
    then 'pattern' is directly compiled to a regex (if it's a string)
    or just returned as-is (assumes it's a regex object).
    �_�Nr[z\\z%s\A%s%s.*%s%sz%s\A%s)	�
isinstance�strr_�compilera�	partitionr%rr^)
r@r<r=rDrVrb�endrFZ	prefix_rer^rrrrB%s(


rB)r"Nr)rKrr_r\rWZdistutils.utilrZdistutils.errorsrrZ	distutilsrrrUrLrrarBrrrr�<module>siPKX[�v��
�
)__pycache__/dep_util.cpython-38.opt-1.pycnu�[���U

e5d�
�@s6dZddlZddlmZdd�Zdd�Zdd	d
�ZdS)z�distutils.dep_util

Utility functions for simple, timestamp-based dependency of files
and groups of files; also, function based entirely on such
timestamp dependency analysis.�N)�DistutilsFileErrorcCs`tj�|�s tdtj�|���tj�|�s0dSddlm}t�|�|}t�|�|}||kS)aReturn true if 'source' exists and is more recently modified than
    'target', or if 'source' exists and 'target' doesn't.  Return false if
    both exist and 'target' is the same age or younger than 'source'.
    Raise DistutilsFileError if 'source' does not exist.
    zfile '%s' does not exist�r��ST_MTIME)�os�path�existsr�abspath�statr)�source�targetrZmtime1Zmtime2�r
�*/usr/lib64/python3.8/distutils/dep_util.py�newers
�rcCsht|�t|�krtd��g}g}tt|��D]2}t||||�r,|�||�|�||�q,||fS)z�Walk two filename lists in parallel, testing if each source is newer
    than its corresponding target.  Return a pair of lists (sources,
    targets) where source is newer than target, according to the semantics
    of 'newer()'.
    z+'sources' and 'targets' must be same length)�len�
ValueError�ranger�append)�sourcesZtargetsZ	n_sourcesZ	n_targets�ir
r
r�newer_pairwise sr�errorcCs�tj�|�sdSddlm}t�|�|}|D]P}tj�|�sb|dkrHn|dkrTq.n|dkrbdSt�|�|}||kr.dSq.dS)a�Return true if 'target' is out-of-date with respect to any file
    listed in 'sources'.  In other words, if 'target' exists and is newer
    than every file in 'sources', return false; otherwise return true.
    'missing' controls what we do when a source file is missing; the
    default ("error") is to blow up with an OSError from inside 'stat()';
    if it is "ignore", we silently drop any missing source files; if it is
    "newer", any missing source files make us assume that 'target' is
    out-of-date (this is handy in "dry-run" mode: it'll make you pretend to
    carry out commands that wouldn't work because inputs are missing, but
    that doesn't matter because you're not actually going to run the
    commands).
    rrrr�ignorerN)rrrr
r)rrZmissingrZtarget_mtimer�source_mtimer
r
r�newer_group6s r)r)�__doc__rZdistutils.errorsrrrrr
r
r
r�<module>s
PKX[�
�,JJ.__pycache__/unixccompiler.cpython-38.opt-1.pycnu�[���U

&�.e�;�@s�dZddlZddlZddlZddlmZddlmZddlm	Z	m
Z
mZddlm
Z
mZmZmZddlmZejdkr~ddlZGd	d
�d
e	�ZdS)a9distutils.unixccompiler

Contains the UnixCCompiler class, a subclass of CCompiler that handles
the "typical" Unix-style command-line C compiler:
  * macros defined with -Dname[=value]
  * macros undefined with -Uname
  * include search directories specified with -Idir
  * libraries specified with -lllib
  * library search directories specified with -Ldir
  * compile handled by 'cc' (or similar) executable with -c option:
    compiles .c to .o
  * link static library handled by 'ar' command (possibly with 'ranlib')
  * link shared library handled by 'cc -shared'
�N)�	sysconfig)�newer)�	CCompiler�gen_preprocess_options�gen_lib_options)�DistutilsExecError�CompileError�LibError�	LinkError)�log�darwinc
s�eZdZdZddgdgdgddgdgddgdd�Zejdd�d	krNd
ged
<ddd
dddgZdZdZ	dZ
dZdZdZ
ZZeZejdkr�dZ�fdd�Zd.dd�Zdd�Zd/d d!�Zd0d"d#�Zd$d%�Zd&d'�Zd(d)�Zd*d+�Zd1d,d-�Z�ZS)2�
UnixCCompilerZunixNZccz-sharedZarz-cr)�preprocessor�compiler�compiler_so�compiler_cxx�	linker_so�
linker_exe�archiver�ranlib�rrz.cz.Cz.ccz.cxxz.cppz.mz.oz.az.soz.dylibz.tbdzlib%s%s�cygwinz.execs@t��|||�\}}}t�d�}|r6||kr6|�|�|||fS)z'Remove standard library path from rpathZLIBDIR)�super�
_fix_lib_argsr�get_config_var�remove)�self�	libraries�library_dirs�runtime_library_dirsZlibdir��	__class__��//usr/lib64/python3.8/distutils/unixccompiler.pyrUs�


zUnixCCompiler._fix_lib_argsc
Cs�|�d||�}|\}}}t||�}	|j|	}
|r>|
�d|g�|rN||
dd�<|r\|
�|�|
�|�|js~|dks~t||�r�|r�|�tj	�
|��z|�|
�Wn*tk
r�}zt
|��W5d}~XYnXdS)N�-or)Z_fix_compile_argsrr�extend�appendZforcer�mkpath�os�path�dirname�spawnrr)r�sourceZoutput_fileZmacrosZinclude_dirs�
extra_preargs�extra_postargs�
fixed_args�ignore�pp_optsZpp_args�msgr"r"r#�
preprocess^s$




zUnixCCompiler.preprocessc	
Csp|j}tjdkr t�|||�}z |�|||d|g|�Wn*tk
rj}zt|��W5d}~XYnXdS)Nrr$)r�sys�platform�_osx_support�compiler_fixupr+rr)	r�obj�srcZextZcc_argsr.r1rr2r"r"r#�_compilexs
��
zUnixCCompiler._compilerc
Cs�|�||�\}}|j||d�}|�||�r�|�tj�|��|�|j|g||j	�|j
r�z|�|j
|g�Wq�tk
r�}zt|��W5d}~XYq�Xnt
�d|�dS)N)�
output_dir�skipping %s (up-to-date))�_fix_object_args�library_filename�
_need_linkr'r(r)r*r+r�objectsrrr	r�debug)rr@Zoutput_libnamer;rA�target_lang�output_filenamer2r"r"r#�create_static_lib�s$����	zUnixCCompiler.create_static_libc
Cs�|�||�\}}|�|||�}|\}}}t||||�}t|ttd�f�sPtd��|dk	rftj�	||�}|�
||��r�||j|d|g}|	r�dg|dd�<|
r�|
|dd�<|r�|�|�|�
tj�|��z�|tjkr�|jdd�}n|jdd�}|
dk�rr|j�rrd}tj�|d�dk�r@d}d||k�r@|d7}�q&tj�||�d	k�r\d}nd}|j||||<tjd
k�r�t�||�}|�||�Wn,tk
�r�}zt|��W5d}~XYnXnt�d|�dS)Nz%'output_dir' must be a string or Noner$z-grzc++�env��=Z	ld_so_aixrr<)r=rr�
isinstance�str�type�	TypeErrorr(r)�joinr?r@r%r'r*rZ
EXECUTABLErrr�basenamer4r5r6r7r+rr
rrA)rZtarget_descr@rCr;rrrZexport_symbolsrAr-r.Z
build_temprBr/Zlib_optsZld_argsZlinker�i�offsetr2r"r"r#�link�sZ�
���

zUnixCCompiler.linkcCsd|S)N�-Lr")r�dirr"r"r#�library_dir_option�sz UnixCCompiler.library_dir_optioncCsd|kpd|kS)NZgcczg++r")rZ
compiler_namer"r"r#�_is_gcc�szUnixCCompiler._is_gcccCs�tj�t�d��}tjdd�dkr,d|Stjdd�dkrFd|Stjdd�d	krz|�|�rnd
d|gSdd|gS|�|�r�t�d�d
kr�d|Sd|Snd|SdS)N�CCrrrQ�Zfreebsdz-Wl,-rpath=�zhp-uxz-Wl,+sz+sZGNULDZyesz-Wl,--enable-new-dtags,-Rz-Wl,-Rz-R)r(r)rMrrr4r5rT)rrRrr"r"r#�runtime_library_dir_option�s


z(UnixCCompiler.runtime_library_dir_optioncCsd|S)Nz-lr")r�libr"r"r#�library_optionszUnixCCompiler.library_optioncCs�|j|dd�}|j|dd�}|j|dd�}|j|dd�}tjdkr|t�d�}t�d|�}	|	dkrrt�t�d	��}
n
|	�	d
�}
|D�] }t
j�||�}t
j�||�}
t
j�||�}t
j�||�}tjdk�rL|�
d�s�|�
d��rL|�
d
��sLt
j�|
|d
d�|�}t
j�|
|d
d�|�}
t
j�|
|d
d�|�}t
j�|
|d
d�|�}t
j�|
��rb|
St
j�|��rx|St
j�|��r�|St
j�|�r�|Sq�dS)N�shared)Zlib_type�dylib�
xcode_stub�staticrZCFLAGSz-isysroot\s*(\S+)rUrFz/System/z/usr/z/usr/local/)r>r4r5rr�re�searchr6Z_default_sysroot�groupr(r)rL�
startswith�exists)r�dirsrYrAZshared_fZdylib_fZxcode_stub_fZstatic_fZcflags�mZsysrootrRr[r\r^r]r"r"r#�find_library_filesF



���
zUnixCCompiler.find_library_file)NNNNN)NrN)
NNNNNrNNNN)r)�__name__�
__module__�__qualname__Z
compiler_typeZexecutablesr4r5Zsrc_extensionsZ
obj_extensionZstatic_lib_extensionZshared_lib_extensionZdylib_lib_extensionZxcode_stub_lib_extensionZstatic_lib_formatZshared_lib_formatZdylib_lib_formatZxcode_stub_lib_formatZ
exe_extensionrr3r:rDrPrSrTrXrZrf�
__classcell__r"r"r r#r
-sb�


	�
�
�
B*r
)�__doc__r(r4r_Z	distutilsrZdistutils.dep_utilrZdistutils.ccompilerrrrZdistutils.errorsrrr	r
rr5r6r
r"r"r"r#�<module>s
PKX[#T�^�%�%%__pycache__/util.cpython-38.opt-2.pycnu�[���U

e5d�Q�@sddlZddlZddlZddlZddlZddlmZddlm	Z	ddl
mZddlm
Z
ddlmZdd�Zd	d
�Zdd�Zd
d�Zdadd�Zdd�Zd)dd�Zdaaadd�Zdd�Zd*dd�Zdd�Zd+dd �Zd!d"�Zd,d#d$�Z d-d%d&�Z!Gd'd(�d(�Z"dS).�N)�DistutilsPlatformError)�newer)�spawn)�log)�DistutilsByteCompileErrorc
Cs�tjdkrFdtj��krdSdtj��kr.dSdtj��kr@dStjSdtjkrZtjdStjd	ksnttd
�sttjSt��\}}}}}|���	dd�}|�	d
d�}|�	dd�}|dd�dkr�d||fS|dd�dk�r,|ddk�r�d}dt
|d�d|dd�f}ddd�}|d|tj7}n�|dd�dk�rLd|||fS|dd �d!k�r�d!}t�
d"tj�}|�|�}|�r�|��}n>|dd �d#k�r�ddl}ddl}	|�|	j��|||�\}}}d$|||fS)%N�ntZamd64�	win-amd64z(arm)�	win-arm32z(arm64)z	win-arm64Z_PYTHON_HOST_PLATFORM�posix�uname�/�� �_�-�Zlinuxz%s-%sZsunosr�5Zsolarisz%d.%s��Z32bitZ64bit)i���l����z.%sZaixz%s-%s.%s��cygwinz[\d.]+�darwinz%s-%s-%s)�os�name�sys�version�lower�platform�environ�hasattrr�replace�int�maxsize�re�compile�ASCII�match�group�_osx_supportZdistutils.sysconfigZget_platform_osxZ	sysconfigZget_config_vars)
ZosnameZhost�releaser�machineZbitnessZrel_re�mr(�	distutils�r-�&/usr/lib64/python3.8/distutils/util.py�get_host_platformsR


 


�
r/cCs8tjdkr.dddd�}|�tj�d��p,t�St�SdS)NrZwin32rr	)Zx86Zx64ZarmZVSCMD_ARG_TGT_ARCH)rr�getrr/)ZTARGET_TO_PLATr-r-r.�get_platformas
�r1cCsztjdkr|S|s|S|ddkr.td|��|ddkrFtd|��|�d�}d|krd|�d�qP|sntjStjj|�S)Nrrzpath '%s' cannot be absolute���zpath '%s' cannot end with '/'�.)r�sep�
ValueError�split�remove�curdir�path�join)�pathname�pathsr-r-r.�convert_pathls	

r=cCs�tjdkr<tj�|�s$tj�||�Stj�||dd��SnNtjdkr|tj�|�\}}|ddkrn|dd�}tj�||�Stdtj��dS)Nr
�rr�\z!nothing known about platform '%s')rrr9�isabsr:�
splitdriver)Znew_rootr;Zdriver9r-r-r.�change_root�s

rBc	CsxtrdStjdkrZdtjkrZz$ddl}|�t���dtjd<Wnttfk
rXYnXdtjkrpt	�tjd<dadS)Nr
�HOMErrZPLATr>)
�_environ_checkedrrr�pwd�getpwuid�getuid�ImportError�KeyErrorr1)rEr-r-r.�
check_environ�s	
rJc
CsVt�|fdd�}zt�d||�WStk
rP}ztd|��W5d}~XYnXdS)NcSs,|�d�}||krt||�Stj|SdS)Nr>)r'�strrr)r&�
local_varsZvar_namer-r-r.�_subst�s
zsubst_vars.<locals>._substz\$([a-zA-Z_][a-zA-Z_0-9]*)zinvalid variable '$%s')rJr#�subrIr5)�srLrM�varr-r-r.�
subst_vars�s	rQ�error: cCs|t|�S�N)rK)�exc�prefixr-r-r.�grok_environment_error�srVcCs(t�dtj�at�d�at�d�adS)Nz
[^\\\'\"%s ]*z'(?:[^'\\]|\\.)*'z"(?:[^"\\]|\\.)*")r#r$�string�
whitespace�
_wordchars_re�
_squote_re�
_dquote_rer-r-r-r.�_init_regex�s
r\cCs�tdkrt�|��}g}d}|�r�t�||�}|��}|t|�krZ|�|d|���q�||tjkr�|�|d|��||d��	�}d}n�||dkr�|d|�||dd�}|d}n�||dkr�t
�||�}n*||dkr�t�||�}ntd||��|dk�r t
d||��|��\}}|d|�||d|d�||d�}|��d}|t|�kr|�|��q�q|S)	Nrr?r>�'�"z!this can't happen (bad char '%c')z"bad string (mismatched %s quotes?)r)rYr\�stripr&�end�len�appendrWrX�lstriprZr[�RuntimeErrorr5�span)rOZwords�posr+r`Zbegr-r-r.�split_quoted�s@

,
rgcCsP|dkr6d|j|f}|dd�dkr6|dd�d}t�|�|sL||�dS)Nz%s%r���z,)r�))�__name__r�info)�func�args�msg�verbose�dry_runr-r-r.�executes	
rqcCs2|��}|dkrdS|dkr dStd|f��dS)N)�yZyes�t�trueZon�1r>)�nZno�fZfalseZoff�0rzinvalid truth value %r)rr5)�valr-r-r.�	strtobool2srzr>c	CsTddl}tjrtd��|dkr*do(|dk}|�s@zddlm}	|	d�\}
}Wn.tk
rzddlm}d|d�}
}YnXt�	d|�|s�|
dk	r�t
�|
d�}
n
t|d�}
|
�B|
�
d	�|
�
d
�tt|��d�|
�
d|||||f�W5QRXtjg}|�|���|�|�t||d
�tt
j|fd||d
��nddlm}|D]�}|dd�dk�rj�qP|dk�r�|dk�r�dn|}tjj||d�}ntj�|�}|}|�r�|dt|��|k�r�td||f��|t|�d�}|�r�t
j�||�}t
j� |�}|�rP|�st!||��r>t�	d||�|�sL||||�nt�"d||��qPdS)Nrzbyte-compiling is disabled.F)�mkstemp�.py)�mktempz$writing byte-compilation script '%s'�wz2from distutils.util import byte_compile
files = [
z,
z]
z�
byte_compile(files, optimize=%r, force=%r,
             prefix=%r, base_dir=%r,
             verbose=%r, dry_run=0,
             direct=1)
)rpzremoving %s)r$���r
)�optimizationz1invalid prefix: filename %r doesn't start with %rzbyte-compiling %s to %sz%skipping byte-compilation of %s to %s)#�
subprocessr�dont_write_bytecoderZtempfiler{rHr}rrkr�fdopen�open�writer:�map�repr�
executable�extendZ"_optim_args_from_interpreter_flagsrbrrqr7�
py_compiler$�	importlib�util�cache_from_sourcerar5r9�basenamer�debug)Zpy_files�optimizeZforcerUZbase_dirrorpZdirectr�r{Z	script_fdZscript_namer}Zscript�cmdr$�file�opt�cfile�dfileZ
cfile_baser-r-r.�byte_compileBsx$

�
�

���r�cCs|�d�}d}|�|�S)N�
z	
        )r6r:)�header�linesr4r-r-r.�
rfc822_escape�s
r�cCsV|sdSddlm}m}Gdd�d|�}|dkr8|d�}|||d�}|j|dd�dS)	Nr)�RefactoringTool�get_fixers_from_packagec@s$eZdZdd�Zdd�Zdd�ZdS)z*run_2to3.<locals>.DistutilsRefactoringToolc_stj|f|��dSrS)r�error)�selfrnrm�kwr-r-r.�	log_error�sz4run_2to3.<locals>.DistutilsRefactoringTool.log_errorcWstj|f|��dSrS)rrk�r�rnrmr-r-r.�log_message�sz6run_2to3.<locals>.DistutilsRefactoringTool.log_messagecWstj|f|��dSrS)rr�r�r-r-r.�	log_debug�sz4run_2to3.<locals>.DistutilsRefactoringTool.log_debugN)rj�
__module__�__qualname__r�r�r�r-r-r-r.�DistutilsRefactoringTool�sr�z
lib2to3.fixes)�optionsT)r�)Zlib2to3.refactorr�r�Zrefactor)�files�fixer_namesr��explicitr�r�r��rr-r-r.�run_2to3�s
r�c	Csddlm}ddlm}ddlm}|�}	t��}
t�|�z|	�	�W5t�|
�X|	j
|	jdd�<|r�|��D]}|�
�}|s�qr|	�|�qrg}|	jD]L}
tj�||
�}|tj�|��|tj�||
�|dd�}|dr�|�|�q�tdd�|D�|||d	�|S)
Nr)�mkpath)�	copy_file)�FileListr>)�updatecSsg|]}|���d�r|�qS)r|)r�endswith)�.0�fnr-r-r.�
<listcomp>sz$copydir_run_2to3.<locals>.<listcomp>)r�r�r�)Zdistutils.dir_utilr�Zdistutils.file_utilr�Zdistutils.filelistr�r�getcwd�chdir�findallZallfilesr��
splitlinesr_Zprocess_template_liner9r:�dirnamerbr�)�src�dest�templater�r�r�r�r�r�Zfilelistr8�lineZcopied�filenameZoutname�resr-r-r.�copydir_run_2to3�s:

�r�c@s eZdZdZdZdZdd�ZdS)�	Mixin2to3NcCst||j|j|j�SrS)r�r�r�r�)r�r�r-r-r.r�-szMixin2to3.run_2to3)rjr�r�r�r�r�r�r-r-r-r.r�sr�)rR)Nrr)rrNNr>rN)NNN)NNNN)#rr#�importlib.utilr�rWrZdistutils.errorsrZdistutils.dep_utilrZdistutils.spawnrr,rrr/r1r=rBrDrJrQrVrYrZr[r\rgrqrzr�r�r�r�r�r-r-r-r.�<module>sLO
=
�


�
!PKX[4#�Z��)__pycache__/dir_util.cpython-38.opt-1.pycnu�[���U

e5db�@spdZddlZddlZddlmZmZddlmZiaddd�Z	dd	d
�Z
ddd�Zd
d�Zddd�Z
dd�ZdS)zWdistutils.dir_util

Utility functions for manipulating directories and directory trees.�N)�DistutilsFileError�DistutilsInternalError)�log��cCsft|t�std|f��tj�|�}g}tj�|�s<|dkr@|St�tj�	|��rV|Stj�
|�\}}|g}|r�|r�tj�|�s�tj�
|�\}}|�d|�ql|D]�}tj�||�}tj�	|�}	t�|	�r�q�|dkr�t
�d|�|�sXzt�||�WnVtk
�rL}
z6|
jtjk�r&tj�|��s<td||
jdf��W5d}
~
XYnX|�|�dt|	<q�|S)	a�Create a directory and any missing ancestor directories.

    If the directory already exists (or if 'name' is the empty string, which
    means the current directory, which of course exists), then do nothing.
    Raise DistutilsFileError if unable to create some directory along the way
    (eg. some sub-path exists, but is a file rather than a directory).
    If 'verbose' is true, print a one-line summary of each mkdir to stdout.
    Return the list of directories actually created.
    z(mkpath: 'name' must be a string (got %r)�rrzcreating %szcould not create '%s': %s���N)�
isinstance�strr�os�path�normpath�isdir�
_path_created�get�abspath�split�insert�joinr�info�mkdir�OSError�errnoZEEXISTr�args�append)�name�mode�verbose�dry_runZcreated_dirs�head�tailZtails�dZabs_head�exc�r#�*/usr/lib64/python3.8/distutils/dir_util.py�mkpathsB
�
�

r%c	CsNt�}|D] }|�tj�|tj�|���q
t|�D]}t||||d�q4dS)a�Create all the empty directories under 'base_dir' needed to put 'files'
    there.

    'base_dir' is just the name of a directory which doesn't necessarily
    exist yet; 'files' is a list of filenames to be interpreted relative to
    'base_dir'.  'base_dir' + the directory portion of every file in 'files'
    will be created if it doesn't already exist.  'mode', 'verbose' and
    'dry_run' flags are as for 'mkpath()'.
    �rrN)�set�addrrr�dirname�sortedr%)Zbase_dir�filesrrrZneed_dir�file�dirr#r#r$�create_treePs
r.c
Cs^ddlm}|s(tj�|�s(td|��zt�|�}	Wn>tk
rt}
z |rRg}	ntd||
jf��W5d}
~
XYnX|s�t	||d�g}|	D]�}tj�
||�}
tj�
||�}|�d�r�q�|�r
tj�|
��r
t�
|
�}|dkr�t�d	||�|s�t�||�|�|�q�tj�|
��r8|�t|
|||||||d
��q�||
||||||d
�|�|�q�|S)aCopy an entire directory tree 'src' to a new location 'dst'.

    Both 'src' and 'dst' must be directory names.  If 'src' is not a
    directory, raise DistutilsFileError.  If 'dst' does not exist, it is
    created with 'mkpath()'.  The end result of the copy is that every
    file in 'src' is copied to 'dst', and directories under 'src' are
    recursively copied to 'dst'.  Return the list of files that were
    copied or might have been copied, using their output name.  The
    return value is unaffected by 'update' or 'dry_run': it is simply
    the list of all files under 'src', with the names changed to be
    under 'dst'.

    'preserve_mode' and 'preserve_times' are the same as for
    'copy_file'; note that they only apply to regular files, not to
    directories.  If 'preserve_symlinks' is true, symlinks will be
    copied as symlinks (on platforms that support them!); otherwise
    (the default), the destination of the symlink will be copied.
    'update' and 'verbose' are the same as for 'copy_file'.
    r)�	copy_filez&cannot copy tree '%s': not a directoryzerror listing files in '%s': %sN)rz.nfsrzlinking %s -> %sr&)Zdistutils.file_utilr/rrrr�listdirr�strerrorr%r�
startswith�islink�readlinkrr�symlinkr�extend�	copy_tree)�srcZdstZ
preserve_modeZpreserve_timesZpreserve_symlinks�updaterrr/�names�eZoutputs�nZsrc_nameZdst_nameZ	link_destr#r#r$r7cs\��

���r7cCsft�|�D]F}tj�||�}tj�|�r@tj�|�s@t||�q
|�tj|f�q
|�tj	|f�dS)zHelper for remove_tree().N)
rr0rrrr3�_build_cmdtupler�remove�rmdir)r�	cmdtuples�fZreal_fr#r#r$r=�sr=cCs�|dkrt�d|�|rdSg}t||�|D]h}z2|d|d�tj�|d�}|tkrbt|=Wq.tk
r�}zt�d||�W5d}~XYq.Xq.dS)z�Recursively remove an entire directory tree.

    Any errors are ignored (apart from being reported to stdout if 'verbose'
    is true).
    rz'removing '%s' (and everything under it)Nrzerror removing %s: %s)	rrr=rrrrr�warn)Z	directoryrrr@�cmdrr"r#r#r$�remove_tree�s

rDcCs6tj�|�\}}|dd�tjkr2||dd�}|S)z�Take the full path 'path', and make it a relative path.

    This is useful to make 'path' the second argument to os.path.join().
    rrN)rr�
splitdrive�sep)rZdriver#r#r$�ensure_relative�srG)rrr)rrr)rrrrrr)rr)�__doc__rrZdistutils.errorsrrZ	distutilsrrr%r.r7r=rDrGr#r#r#r$�<module>s 
?
�
E

PKX[��ES�� __pycache__/debug.cpython-38.pycnu�[���U

e5d��@sddlZej�d�ZdS)�NZDISTUTILS_DEBUG)�os�environ�get�DEBUG�rr�'/usr/lib64/python3.8/distutils/debug.py�<module>sPKX[����)�)'__pycache__/fancy_getopt.cpython-38.pycnu�[���U

e5dxE�@s�dZddlZddlZddlZddlZddlTdZe�de�Ze�deef�Z	e
�dd�ZGd	d
�d
�Z
dd�Zd
d�ejD�Zdd�Zdd�ZGdd�d�Zedkr�dZdD]*Zede�ed�eee���e�q�dS)a6distutils.fancy_getopt

Wrapper around the standard getopt module that provides the following
additional features:
  * short and long options are tied together
  * options have help strings, so fancy_getopt could potentially
    create a complete usage summary
  * options set attributes of a passed-in object
�N)�*z[a-zA-Z](?:[a-zA-Z0-9-]*)z^%s$z^(%s)=!(%s)$�-�_c@s�eZdZdZddd�Zdd�Zdd�Zd d	d
�Zdd�Zd
d�Z	dd�Z
dd�Zdd�Zdd�Z
d!dd�Zdd�Zd"dd�Zd#dd�ZdS)$�FancyGetopta�Wrapper around the standard 'getopt()' module that provides some
    handy extra functionality:
      * short and long options are tied together
      * options have help strings, and help text can be assembled
        from them
      * options set attributes of a passed-in object
      * boolean options can have "negative aliases" -- eg. if
        --quiet is the "negative alias" of --verbose, then "--quiet"
        on the command line sets 'verbose' to false
    NcCsN||_i|_|jr|��i|_i|_g|_g|_i|_i|_i|_	g|_
dS�N)�option_table�option_index�_build_index�alias�negative_alias�
short_opts�	long_opts�
short2long�	attr_name�	takes_arg�option_order��selfr�r�./usr/lib64/python3.8/distutils/fancy_getopt.py�__init__)s	zFancyGetopt.__init__cCs(|j��|jD]}||j|d<qdS)Nr)r�clearr)r�optionrrrr	Qs

zFancyGetopt._build_indexcCs||_|��dSr)rr	rrrr�set_option_tableVszFancyGetopt.set_option_tablecCs<||jkrtd|��n |||f}|j�|�||j|<dS)Nz'option conflict: already an option '%s')r�DistutilsGetoptErrorr�append)r�long_optionZshort_optionZhelp_stringrrrr�
add_optionZs
�
zFancyGetopt.add_optioncCs
||jkS)zcReturn true if the option table for this parser has an
        option with long name 'long_option'.)r�rrrrr�
has_optioncszFancyGetopt.has_optioncCs
|�t�S)z�Translate long option name 'long_option' to the form it
        has as an attribute of some object: ie., translate hyphens
        to underscores.��	translate�
longopt_xlaterrrr�
get_attr_namehszFancyGetopt.get_attr_namecCs\t|t�st�|��D]@\}}||jkr:td|||f��||jkrtd|||f��qdS)Nz(invalid %s '%s': option '%s' not definedz0invalid %s '%s': aliased option '%s' not defined)�
isinstance�dict�AssertionError�itemsrr)r�aliasesZwhatr
�optrrr�_check_alias_dictns
�
�zFancyGetopt._check_alias_dictcCs|�|d�||_dS)z'Set the aliases for this option parser.r
N)r*r
)rr
rrr�set_aliasesxszFancyGetopt.set_aliasescCs|�|d�||_dS)z�Set the negative aliases for this option parser.
        'negative_alias' should be a dictionary mapping option names to
        option names, both the key and value must already be defined
        in the option table.znegative aliasN)r*r)rrrrr�set_negative_aliases}sz FancyGetopt.set_negative_aliasescCs�g|_g|_|j��i|_|jD�]�}t|�dkrD|\}}}d}n(t|�dkr^|\}}}}ntd|f��t|t	�r�t|�dkr�t
d|��|dks�t|t	�r�t|�dks�t
d	|��||j|<|j�|�|d
dkr�|r�|d}|dd
�}d|j|<nF|j
�|�}|dk	�r:|j|�r0t
d
||f��||jd
<d|j|<|j�|�}|dk	�r�|j||j|k�r�t
d||f��t�|��s�t
d|��|�|�|j|<|r"|j�|�||j|d<q"dS)z�Populate the various data structures that keep tabs on the
        option table.  Called by 'getopt()' before it can do anything
        worthwhile.
        �r�zinvalid option tuple: %r�z9invalid long option '%s': must be a string of length >= 2N�z:invalid short option '%s': must a single character or None����=�:z>invalid negative alias '%s': aliased option '%s' takes a valuezginvalid alias '%s': inconsistent with aliased option '%s' (one of them takes a value, the other doesn'tzEinvalid long option name '%s' (must be letters, numbers, hyphens only)r
rrr�repeatr�len�
ValueErrorr$�strrrrr�getr
�
longopt_re�matchr#r)rr�long�short�helpr4Zalias_torrr�_grok_option_table�st

��
��

��


��
��zFancyGetopt._grok_option_tablec
Cs�|dkrtjdd�}|dkr*t�}d}nd}|��d�|j�}zt�|||j�\}}Wn,tjk
r�}zt	|��W5d}~XYnX|D]�\}}t
|�dkr�|ddkr�|j|d}n,t
|�dkr�|dd�d	ks�t�|dd�}|j
�|�}	|	r�|	}|j|�s:|d
k�std��|j�|�}	|	�r6|	}d}nd}|j|}
|�rl|j�|
�dk	�rlt||
d�d}t||
|�|j�||f�q�|�r�||fS|SdS)aParse command-line options in args. Store as attributes on object.

        If 'args' is None or not supplied, uses 'sys.argv[1:]'.  If
        'object' is None or not supplied, creates a new OptionDummy
        object, stores option values there, and returns a tuple (args,
        object).  If 'object' is supplied, it is modified in place and
        'getopt()' just returns 'args'; in both cases, the returned
        'args' is a modified copy of the passed-in 'args' list, which
        is left untouched.
        Nr0TF� r/rrz--�zboolean option can't have value)�sys�argv�OptionDummyr>�joinr�getoptr
�errorZDistutilsArgErrorr5rr&r
r8rrrr4�getattr�setattrrr)r�args�objectZcreated_objectrZopts�msgr)�valr
�attrrrrrE�sF 
zFancyGetopt.getoptcCs|jdkrtd��n|jSdS)z�Returns the list of (option, value) tuples processed by the
        previous run of 'getopt()'.  Raises RuntimeError if
        'getopt()' hasn't been called yet.
        Nz!'getopt()' hasn't been called yet)r�RuntimeError)rrrr�get_option_orders

zFancyGetopt.get_option_ordercCsjd}|jD]L}|d}|d}t|�}|ddkr:|d}|dk	rJ|d}||kr
|}q
|ddd}d}||}	d	|}
|r�|g}nd
g}|jD]�}|dd�\}}}t||	�}
|ddkr�|dd�}|dk�r|
r�|�d|||
df�n|�d
||f�n:d||f}|
�r4|�d|||
df�n|�d|�|
dd�D]}|�|
|��qNq�|S)z�Generate help text (a list of strings, one per suggested line of
        output) from the option table for this FancyGetopt object.
        rr0r1r2N�r/�Nr?zOption summary:r-z  --%-*s  %sz
  --%-*s  z%s (-%s)z  --%-*s)rr5�	wrap_textr)r�headerZmax_optrr;r<�lZ	opt_widthZ
line_widthZ
text_widthZ
big_indent�linesr=�textZ	opt_namesrrr�
generate_helpsH



�zFancyGetopt.generate_helpcCs0|dkrtj}|�|�D]}|�|d�qdS)N�
)rA�stdoutrW�write)rrS�file�linerrr�
print_helphszFancyGetopt.print_help)N)NN)NN)N)NN)�__name__�
__module__�__qualname__�__doc__rr	rrrr#r*r+r,r>rErOrWr]rrrrrs
(
	
M
=

OrcCst|�}|�|�|�||�Sr)rr,rE)�optionsZnegative_optrJrI�parserrrr�fancy_getoptos
rdcCsi|]}t|�d�qS)r?)�ord)�.0Z_wscharrrr�
<dictcomp>usrgcCs|dkrgSt|�|kr|gS|��}|�t�}t�d|�}dd�|D�}g}|�rg}d}|r�t|d�}|||kr�|�|d�|d=||}q\|r�|dddkr�|d=q�q\|�r|dkr�|�|dd|��|d|d�|d<|dddk�r|d=|�d�|��qN|S)	z�wrap_text(text : string, width : int) -> [string]

    Split 'text' into multiple lines of no more than 'width' characters
    each, and return the list of strings that results.
    Nz( +|-+)cSsg|]}|r|�qSrr)rfZchrrr�
<listcomp>�szwrap_text.<locals>.<listcomp>rr1r?r@)r5�
expandtabsr!�WS_TRANS�re�splitrrD)rV�widthZchunksrUZcur_lineZcur_lenrTrrrrRws:

rRcCs
|�t�S)zXConvert a long option name to a valid Python identifier by
    changing "-" to "_".
    r )r)rrr�translate_longopt�srnc@seZdZdZgfdd�ZdS)rCz_Dummy class just used as a place to hold command-line option
    values as instance attributes.cCs|D]}t||d�qdS)zkCreate a new OptionDummy instance.  The attributes listed in
        'options' will be initialized to None.N)rH)rrbr)rrrr�szOptionDummy.__init__N)r^r_r`rarrrrrrC�srC�__main__z�Tra-la-la, supercalifragilisticexpialidocious.
How *do* you spell that odd word, anyways?
(Someone ask Mary -- she'll know [or she'll
say, "How should I know?"].))�
���(z	width: %drX)rarA�stringrkrEZdistutils.errorsZlongopt_pat�compiler9Zneg_alias_rer7�	maketransr"rrdZ
whitespacerjrRrnrCr^rV�w�printrDrrrr�<module>s*
T6PKX[�g:-D-D.__pycache__/msvc9compiler.cpython-38.opt-1.pycnu�[���U

e5d/w�@sRdZddlZddlZddlZddlZddlmZmZmZm	Z	m
Z
ddlmZm
Z
mZddlmZddlmZddlZejZejZejZejZejejejejfZ ej!dko�ej"dkZ#e#r�d	Z$d
Z%dZ&ndZ$d
Z%dZ&ddd�Z'Gdd�d�Z(Gdd�d�Z)dd�Z*dd�Z+dd�Z,dd�Z-d$dd�Z.e*�Z/e/d k�r>ed!e/��Gd"d#�d#e�Z0dS)%adistutils.msvc9compiler

Contains MSVCCompiler, an implementation of the abstract CCompiler class
for the Microsoft Visual Studio 2008.

The module is compatible with VS 2005 and VS 2008. You can find legacy support
for older versions of VS in distutils.msvccompiler.
�N)�DistutilsExecError�DistutilsPlatformError�CompileError�LibError�	LinkError)�	CCompiler�gen_preprocess_options�gen_lib_options)�log)�get_platform�win32lz1Software\Wow6432Node\Microsoft\VisualStudio\%0.1fz5Software\Wow6432Node\Microsoft\Microsoft SDKs\Windowsz,Software\Wow6432Node\Microsoft\.NETFrameworkz%Software\Microsoft\VisualStudio\%0.1fz)Software\Microsoft\Microsoft SDKs\Windowsz Software\Microsoft\.NETFramework�x86Zamd64�rz	win-amd64c@sPeZdZdZdd�Zee�Zdd�Zee�Zdd�Zee�Zdd	�Ze	e�Zd
S)�Regz2Helper class to read values from the registry
    cCs:tD](}|�||�}|r||kr||Sqt|��dS�N)�HKEYS�read_values�KeyError)�cls�path�key�base�d�r�//usr/lib64/python3.8/distutils/msvc9compiler.py�	get_value@s
z
Reg.get_valuecCsnzt||�}Wntk
r$YdSXg}d}zt||�}Wntk
rTYqjYnX|�|�|d7}q.|S)zReturn list of registry keys.Nr�)�RegOpenKeyEx�RegError�
RegEnumKey�append)rrr�handle�L�i�krrr�	read_keysHs


z
Reg.read_keysc	Cs�zt||�}Wntk
r$YdSXi}d}zt||�\}}}Wntk
rZYq�YnX|��}|�|�||�|�<|d7}q.|S)z`Return dict of registry keys and values.

        All names are converted to lowercase.
        Nrr)rr�RegEnumValue�lower�convert_mbcs)	rrrr!rr#�name�value�typerrrrZs

zReg.read_valuescCs:t|dd�}|dk	r6z|d�}Wntk
r4YnX|S)N�decode�mbcs)�getattr�UnicodeError)�sZdecrrrr(pszReg.convert_mbcsN)
�__name__�
__module__�__qualname__�__doc__r�classmethodr%rr(�staticmethodrrrrr<src@s,eZdZdd�Zdd�Zdd�Zdd�Zd	S)
�
MacroExpandercCsi|_t||_|�|�dSr)�macros�VS_BASE�vsbase�load_macros)�self�versionrrr�__init__|s
zMacroExpander.__init__cCst�||�|jd|<dS)Nz$(%s))rrr8)r<Zmacrorrrrr�	set_macro�szMacroExpander.set_macroc	Cs|�d|jdd�|�d|jdd�|�dtd�z$|dkrP|�d	td
�ntd
��Wntk
rvtd��YnX|dkr�|�d
|jd�|�dtd�nbd}tD]X}zt||�}Wntk
r�Yq�YnXt	|d�}t
�|d||f�}|d|jd<q�dS)NZVCInstallDirz	\Setup\VC�
productdirZVSInstallDirz	\Setup\VSZFrameworkDirZinstallroot� @ZFrameworkSDKDirzsdkinstallrootv2.0aPython was built with Visual Studio 2008;
extensions must be built with a compiler than can generate compatible binaries.
Visual Studio 2008 was not found on this system. If you have Cygwin installed,
you can try compiling with MingW32, by passing "-c mingw32" to setup.py.g"@ZFrameworkVersionzclr versionZ
WindowsSdkDirZcurrentinstallfolderz.Software\Microsoft\NET Framework Setup\Productrz%s\%sr=z$(FrameworkVersion))
r?r:�NET_BASErr�WINSDK_BASErrrrrrr8)r<r=�pr�hrrrrrr;�s2��


zMacroExpander.load_macroscCs$|j��D]\}}|�||�}q
|Sr)r8�items�replace)r<r0r$�vrrr�sub�szMacroExpander.subN)r1r2r3r>r?r;rIrrrrr7zsr7cCs�d}tj�|�}|dkrdS|t|�}tj|d��dd�\}}t|dd��d}|dkrf|d7}t|d	d
��d}|dkr�d}|dkr�||SdS)
z�Return the version of MSVC that was used to build Python.

    For Python 2.3 and up, the version number is included in
    sys.version.  For earlier versions, assume the compiler is MSVC 6.
    zMSC v.����N� r����
��g$@r)�sysr=�find�len�split�int)�prefixr#r0�restZmajorVersionZminorVersionrrr�get_build_version�srXcCs0g}|D]"}tj�|�}||kr|�|�q|S)znReturn a list of normalized paths with duplicates removed.

    The current order of paths is maintained.
    )�osr�normpathr )�pathsZ
reduced_pathsrDZnprrr�normalize_and_reduce_paths�sr\cCs<|�tj�}g}|D]}||kr|�|�qtj�|�}|S)z8Remove duplicate values of an environment variable.
    )rTrY�pathsepr �join)ZvariableZoldListZnewListr#ZnewVariablerrr�removeDuplicates�sr_cCst|}zt�d|d�}Wn"tk
r>t�d�d}YnX|rPtj�|�s�d|}tj	�
|d�}|r�tj�|�r�tj�|tjtjd�}tj�
|�}tj�|�s�t�d|�dSnt�d|�|s�t�d	�dStj�|d
�}tj�|�r�|St�d�dS)z�Find the vcvarsall.bat file

    At first it tries to find the productdir of VS 2008 in the registry. If
    that fails it falls back to the VS90COMNTOOLS env var.
    z%s\Setup\VCr@z%Unable to find productdir in registryNzVS%0.f0COMNTOOLSZVCz%s is not a valid directoryz Env var %s is not set or invalidzNo productdir foundz
vcvarsall.bat�Unable to find vcvarsall.bat)r9rrrr
�debugrYr�isdir�environ�getr^�pardir�abspath�isfile)r=r:r@ZtoolskeyZtoolsdir�	vcvarsallrrr�find_vcvarsall�s4
�



ricCs8t|�}ddddh}i}|dkr(td��t�d||�tjd||ftjtjd	�}z�|�
�\}}|��d
krzt|�d���|�d�}|�
d�D]d}t�|�}d
|kr�q�|��}|�
d
d�\}	}
|	��}	|	|kr�|
�tj�r�|
dd�}
t|
�||	<q�W5|j��|j	��Xt|�t|�k�r4ttt|������|S)zDLaunch vcvarsall.bat and read the settings from its environment
    �include�libZlibpathrNr`z'Calling 'vcvarsall.bat %s' (version=%s)z
"%s" %s & set)�stdout�stderrrr-�
�=rrJ)rirr
ra�
subprocess�Popen�PIPErl�closermZcommunicate�waitr,rTrr(�stripr'�endswithrYr]r_rS�
ValueError�str�list�keys)r=ZarchrhZinteresting�result�popenrlrm�linerr*rrr�query_vcvarsall�s>�


r~rAz(VC %0.1f is not supported by this modulec
@s�eZdZdZdZiZdgZdddgZdgZdgZ	eeee	Z
d	Zd
ZdZ
dZd
ZZdZd.dd�Zd/dd�Zd0dd�Zd1dd�Zd2dd�Zd3dd�Zdd�Zd d!�Zd"d#�Zd$d%�Zd&d'�Zd(d)�Zd4d*d+�Zd,d-�ZdS)5�MSVCCompilerzwConcrete class that implements an interface to Microsoft Visual C++,
       as defined by the CCompiler abstract class.Zmsvcz.cz.ccz.cppz.cxx�.rcz.mcz.resz.objz.libz.dllz%s%sz.exercCs8t�||||�t|_d|_g|_d|_d|_d|_dS)NzSoftware\Microsoft\VisualStudioF)	rr>�VERSION�_MSVCCompiler__versionZ_MSVCCompiler__root�_MSVCCompiler__paths�	plat_name�_MSVCCompiler__arch�initialized)r<�verboseZdry_runZforcerrrr>IszMSVCCompiler.__init__NcCs|dkrt�}d}||kr(td|f��dtjkrfdtjkrf|�d�rfd|_d|_d|_d|_d	|_	n�|t�ksx|d
kr�t
|}nt
t�dt
|}tt|�}|d�
tj�|_|d
tjd
<|dtjd<t|j�dkr�td|j��|�d�|_|�d�|_|�d�|_|�d�|_|�d	�|_	z(tjd�
d�D]}|j�|��q:Wntk
�rfYnXt|j�|_d�|j�tjd<d|_|jdk�r�dddddg|_ddddddg|_n&ddddddg|_dddddddg|_dddg|_|jdk�rddd d!g|_dg|_d"|_dS)#Nrz--plat-name must be one of %sZDISTUTILS_USE_SDKZMSSdkzcl.exezlink.exezlib.exezrc.exezmc.exer�_rrkrjrzxPython was built with %s, and extensions need to be built with the same version of the compiler, but it isn't installed.�;r
z/nologoz/Oxz/MDz/W3z/DNDEBUGz/Odz/MDdz/Z7z/D_DEBUGz/GS-z/DLLz/INCREMENTAL:NO�z/INCREMENTAL:noz/DEBUGT)rrrYrc�find_exe�cc�linkerrk�rc�mc�PLAT_TO_VCVARSr~r�rTr]r�rSZ_MSVCCompiler__productr rr\r^Zpreprocess_optionsr��compile_options�compile_options_debug�ldflags_sharedr��ldflags_shared_debugZldflags_staticr�)r<r�Zok_platsZ	plat_specZvc_envrDrrr�
initializeTs~�
�
���
�
��zMSVCCompiler.initialize�cCs�|dkrd}g}|D]�}tj�|�\}}tj�|�d}|tj�|�d�}||jkrbtd|��|rrtj�|�}||jkr�|�	tj�
|||j��q||jkr�|�	tj�
|||j��q|�	tj�
|||j
��q|S)Nr�rzDon't know how to compile %s)rYr�splitext�
splitdrive�isabs�src_extensionsr�basename�_rc_extensionsr r^�
res_extension�_mc_extensions�
obj_extension)r<Zsource_filenamesZ	strip_dir�
output_dirZ	obj_namesZsrc_namer�extrrr�object_filenames�s.

�
��zMSVCCompiler.object_filenamesc	Csp|js|��|�||||||�}	|	\}}
}}}|p6g}
|
�d�|rT|
�|j�n|
�|j�|
D�]}z||\}}Wntk
r�YqdYnX|r�tj	�
|�}||jkr�d|}�nT||jkr�d|}�n>||j
k�r<|}d|}z"|�|jg||g|g�Wqdtk
�r6}zt|��W5d}~XYqdXqdn�||jk�r�tj	�|�}tj	�|�}zl|�|jgd|d|g|g�tj	�tj	�|��\}}tj	�||d�}|�|jgd|g|g�Wqdtk
�r�}zt|��W5d}~XYqdXqdntd||f��d	|}z&|�|jg|
|||g|�Wqdtk
�rh}zt|��W5d}~XYqdXqd|
S)
Nz/cz/Tcz/Tpz/foz-hz-rr�z"Don't know how to compile %s to %sz/Fo)r�r�Z_setup_compiler �extendr�r�rrYrrf�
_c_extensions�_cpp_extensionsr��spawnr�rrr��dirnamer�r�r�r^r�)r<Zsourcesr�r8Zinclude_dirsra�
extra_preargs�extra_postargsZdependsZcompile_info�objectsZpp_optsZbuildZcompile_opts�obj�srcr�Z	input_optZ
output_opt�msgZh_dirZrc_dirrr�Zrc_filerrr�compile�s�
�




��


��
��
���
zMSVCCompiler.compilec	
Cs�|js|��|�||�\}}|j||d�}|�||�r�|d|g}|rJz|�|jg|�Wq�tk
r�}zt|��W5d}~XYq�Xnt	�
d|�dS)N)r��/OUT:�skipping %s (up-to-date))r�r��_fix_object_args�library_filename�
_need_linkr�rkrrr
ra)	r<r�Zoutput_libnamer�ra�target_lang�output_filenameZlib_argsr�rrr�create_static_libs�zMSVCCompiler.create_static_libc
CsT|js|��|�||�\}}|�|||�}|\}}}|rL|�dt|��t||||�}|dk	rptj�	||�}|�
||��rD|tjkr�|	r�|j
dd�}q�|jdd�}n|	r�|j
}n|j}g}|p�gD]}|�d|�q�||||d|g}tj�|d�}|dk	�rLtj�tj�|��\}}tj�	||�|��}|�d|�|�|||�|
�rl|
|dd�<|�r||�|�|�tj�|��z|�|jg|�Wn,tk
�r�}zt|��W5d}~XYnX|�||�}|dk	�rP|\}}d||f}z|�dd	d
||g�Wn,tk
�r@}zt|��W5d}~XYnXnt�d|�dS)Nz5I don't know what to do with 'runtime_library_dirs': rz/EXPORT:r�rz/IMPLIB:z-outputresource:%s;%szmt.exez-nologoz	-manifestr�)r�r�r�Z
_fix_lib_args�warnrxr	rYrr^r�r�
EXECUTABLEr�r�r r�r�r�r��manifest_setup_ldargsr�Zmkpathr�r�rr�manifest_get_embed_infor
ra)r<�target_descr�r�r�Z	librariesZlibrary_dirsZruntime_library_dirsZexport_symbolsrar�r��
build_tempr�Z
fixed_argsZlib_optsZldflagsZexport_optsZsym�ld_argsZdll_nameZdll_extZimplib_filer�ZmfinfoZ
mffilename�mfidZout_argrrr�link6s��
��

��

��


�
zMSVCCompiler.linkcCs,tj�|tj�|�d�}|�d|�dS)Nz	.manifest�/MANIFESTFILE:)rYrr^r�r )r<r�r�r��
temp_manifestrrrr��s
�z"MSVCCompiler.manifest_setup_ldargscCs^|D]"}|�d�r|�dd�d}q,qdS|tjkr<d}nd}|�|�}|dkrVdS||fS)Nr��:rrO)�
startswithrTrr��_remove_visual_c_ref)r<r�r��argr�r�rrrr��s


z$MSVCCompiler.manifest_get_embed_infocCs�z�t|�}z|��}W5|��Xt�dtj�}t�|d|�}d}t�|d|�}t�dtj�}t�||�dkrtWdSt|d�}z|�|�|W�WS|��XWnt	k
r�YnXdS)NzU<assemblyIdentity.*?name=("|')Microsoft\.VC\d{2}\.CRT("|').*?(/>|</assemblyIdentity>)r�z*<dependentAssembly>\s*</dependentAssembly>zI<assemblyIdentity.*?name=(?:"|')(.+?)(?:"|').*?(?:/>|</assemblyIdentity>)�w)
�openrs�read�rer��DOTALLrI�search�write�OSError)r<Z
manifest_fileZ
manifest_fZmanifest_buf�patternrrrr��s2	
��


z!MSVCCompiler._remove_visual_c_refcCsd|S)Nz	/LIBPATH:r�r<�dirrrr�library_dir_option�szMSVCCompiler.library_dir_optioncCstd��dS)Nz<don't know how to set runtime library search path for MSVC++)rr�rrr�runtime_library_dir_option�s�z'MSVCCompiler.runtime_library_dir_optioncCs
|�|�Sr)r�)r<rkrrr�library_option�szMSVCCompiler.library_optioncCs\|r|d|g}n|g}|D]:}|D]0}tj�||�|��}tj�|�r$|Sq$qdS)NZ_d)rYrr^r��exists)r<�dirsrkraZ	try_namesr�r)Zlibfilerrr�find_library_file�szMSVCCompiler.find_library_filecCsz|jD].}tj�tj�|�|�}tj�|�r|Sqtjd�d�D].}tj�tj�|�|�}tj�|�rF|SqF|S)a�Return path to an MSVC executable program.

        Tries to find the program in several places: first, one of the
        MSVC program search paths from the registry; next, the directories
        in the PATH environment variable.  If any of those work, return an
        absolute path that is known to exist.  If none of them work, just
        return the original program name, 'exe'.
        �Pathr�)r�rYrr^rfrgrcrT)r<ZexerD�fnrrrr�s	


zMSVCCompiler.find_exe)rrr)N)rr�)NNNrNNN)NrN)
NNNNNrNNNN)r) r1r2r3r4Z
compiler_typeZexecutablesr�r�r�r�r�r�r�Zstatic_lib_extensionZshared_lib_extensionZstatic_lib_formatZshared_lib_formatZ
exe_extensionr>r�r�r�r�r�r�r�r�r�r�r�r�r�rrrrr+sl
��

W�
 �
X�
�
_+
r)r
)1r4rYrprQr�Zdistutils.errorsrrrrrZdistutils.ccompilerrrr	Z	distutilsr
Zdistutils.utilr�winregZ	OpenKeyExrZEnumKeyrZ	EnumValuer&�errorrZ
HKEY_USERS�HKEY_CURRENT_USER�HKEY_LOCAL_MACHINEZHKEY_CLASSES_ROOTr�platform�maxsizeZNATIVE_WIN64r9rCrBr�rr7rXr\r_rir~r�rrrrr�<module>sP��>.#
)
PKX[%E�,}}-__pycache__/bcppcompiler.cpython-38.opt-1.pycnu�[���U

e5dW:�@sxdZddlZddlmZmZmZmZmZmZddl	m
Z
mZmZddl
mZddlmZddlmZGdd	�d	e
�ZdS)
z�distutils.bcppcompiler

Contains BorlandCCompiler, an implementation of the abstract CCompiler class
for the Borland C++ compiler.
�N)�DistutilsExecError�DistutilsPlatformError�CompileError�LibError�	LinkError�UnknownFileError)�	CCompiler�gen_preprocess_options�gen_lib_options)�
write_file)�newer)�logc
@s�eZdZdZdZiZdgZdddgZeeZdZ	dZ
d	Zd
ZZ
dZdd
d�Zddd�Zddd�Zd dd�Zd!dd�Zd"dd�Zd#dd�ZdS)$�BCPPCompilerzConcrete class that implements an interface to the Borland C/C++
    compiler, as defined by the CCompiler abstract class.
    Zbcppz.cz.ccz.cppz.cxxz.objz.libz.dllz%s%sz.exercCs�t�||||�d|_d|_d|_d|_ddddg|_ddddg|_d	d
ddg|_d	d
ddg|_	g|_
d
ddg|_d
dddg|_dS)
Nz	bcc32.exezilink32.exeztlib.exez/tWMz/O2z/qz/g0z/Odz/Tpdz/Gnz/xz/r)
r�__init__�cc�linker�libZpreprocess_options�compile_options�compile_options_debug�ldflags_shared�ldflags_shared_debugZldflags_static�ldflags_exe�ldflags_exe_debug)�self�verboseZdry_run�force�r�./usr/lib64/python3.8/distutils/bcppcompiler.pyr5szBCPPCompiler.__init__Nc	Cs�|�||||||�\}}	}}
}|p$g}|�d�|rB|�|j�n|�|j�|	D�]<}
z||
\}}Wntk
r�YqRYnXtj�|�}tj�|
�}
|�	tj�
|
��|dkr�qR|dk�rz|�dd|
|g�WqRtk
�r}zt
|��W5d}~XYqRXqR||jk�rd}n||jk�r*d}nd}d|
}z,|�|jg||
||g||g�WqRtk
�r�}zt
|��W5d}~XYqRXqR|	S)	Nz-c�.res�.rcZbrcc32z-fo�z-P�-o)Z_setup_compile�append�extendrr�KeyError�os�path�normpath�mkpath�dirname�spawnrr�
_c_extensions�_cpp_extensionsr)rZsources�
output_dir�macros�include_dirs�debug�
extra_preargs�extra_postargsZdepends�objects�pp_optsZbuildZcompile_opts�obj�src�ext�msgZ	input_optZ
output_optrrr�compileQsV��



���
zBCPPCompiler.compilec	
Cs�|�||�\}}|j||d�}|�||�r~|dg|}|r:z|�|jg|�Wq�tk
rz}zt|��W5d}~XYq�Xnt�d|�dS)N)r-z/u�skipping %s (up-to-date))	�_fix_object_args�library_filename�
_need_linkr*rrrr
r0)	rr3Zoutput_libnamer-r0�target_lang�output_filenameZlib_argsr8rrr�create_static_lib�s�zBCPPCompiler.create_static_libc 
Cs�|�||�\}}|�|||�\}}}|r8t�dt|��|dk	rNtj�||�}|�||��r�|t	j
kr�d}|	r~|jdd�}q�|jdd�}n&d}|	r�|j
dd�}n|jdd�}|dkr�d}n�tj�|�\}}tj�|�\}}tj�|d�}tj�|d|�}dg}|�pgD]}|�d||f��q|�t||fd	|�ttjj|�}|g}g}|D]>}tj�tj�|��\}}|d
k�r�|�|�n
|�|��q`|D]}|�dtj�|���q�|�d�|�|�|�d
|g�|�d�|D]4}|�|||	�}|dk�r|�|�n
|�|��q�|�d�|�d�|�d
|g�|�d
�|�|�|
�rp|
|dd�<|�r�|�|�|�tj�|��z|�|jg|�Wn,tk
�r�}zt|��W5d}~XYnXnt�d|�dS)Nz7I don't know what to do with 'runtime_library_dirs': %sZc0w32Zc0d32r rz%s.defZEXPORTSz  %s=_%sz
writing %srz/L%sz/L.�,z,,Zimport32Zcw32mtr:) r;Z
_fix_lib_argsr
�warn�strr%r&�joinr=rZ
EXECUTABLErrrr�split�splitextr)r"Zexecuter�mapr'�normcaser#�find_library_filer(r*rrrr0) rZtarget_descr3r?r-Z	librariesZlibrary_dirsZruntime_library_dirsZexport_symbolsr0r1r2Z
build_tempr>Zstartup_objZld_argsZdef_file�head�tail�modnamer7Ztemp_dir�contentsZsymZobjects2Z	resources�file�base�lr�libfiler8rrr�link�s���
�










zBCPPCompiler.linkc	Csr|r"|d}|d|d||f}n|d|f}|D]:}|D]0}tj�||�|��}tj�|�r:|Sq:q2dS)NZ_dZ_bcpp)r%r&rDr<�exists)	r�dirsrr0ZdlibZ	try_names�dir�namerQrrrrI4s
zBCPPCompiler.find_library_filer cCs�|dkrd}g}|D]�}tj�tj�|��\}}||jddgkrRtd||f��|rbtj�|�}|dkr�|�tj�|||��q|dkr�|�tj�||d��q|�tj�|||j	��q|S)Nr rrz"unknown file type '%s' (from '%s'))
r%r&rFrH�src_extensionsr�basenamer"rD�
obj_extension)rZsource_filenamesZ	strip_dirr-Z	obj_namesZsrc_namerOr7rrr�object_filenamesNs&��zBCPPCompiler.object_filenamesc
Cs�|�d||�\}}}t||�}dg|}	|dk	r>|	�d|�|rN||	dd�<|r\|	�|�|	�|�|js~|dks~t||�r�|r�|�tj�	|��z|�
|	�Wn2tk
r�}
zt|
�t
|
��W5d}
~
XYnXdS)Nz	cpp32.exer!r)Z_fix_compile_argsr	r"r#rrr(r%r&r)r*r�printr)r�sourceZoutput_filer.r/r1r2�_r4Zpp_argsr8rrr�
preprocessis&	�



zBCPPCompiler.preprocess)rrr)NNNrNNN)NrN)
NNNNNrNNNN)r)rr )NNNNN)�__name__�
__module__�__qualname__�__doc__Z
compiler_typeZexecutablesr+r,rWrYZstatic_lib_extensionZshared_lib_extensionZstatic_lib_formatZshared_lib_formatZ
exe_extensionrr9r@rRrIrZr^rrrrrsb
�
�
D�
�


�
�r)rbr%Zdistutils.errorsrrrrrrZdistutils.ccompilerrr	r
Zdistutils.file_utilrZdistutils.dep_utilrZ	distutilsr
rrrrr�<module>s PKX[�(���A�A*__pycache__/ccompiler.cpython-38.opt-2.pycnu�[���U

e5dI��@s�ddlZddlZddlZddlTddlmZddlmZddlm	Z	ddl
mZmZddl
mZmZddlmZGd	d
�d
�ZdZddd
�Zdddddd�Zdd�Zddd�Zdd�Zdd�ZdS)�N)�*)�spawn)�	move_file)�mkpath)�newer_pairwise�newer_group)�split_quoted�execute)�logc
@seZdZdZdZdZdZdZdZdZ	dZ
dddddd�ZdddgZdpdd�Z
d	d
�Zdd�Zd
d�Zdd�Zdqdd�Zdd�Zdd�Zdd�Zdd�Zdd�Zdd�Zdd �Zd!d"�Zd#d$�Zd%d&�Zd'd(�Zd)d*�Zd+d,�Zd-d.�Z drd/d0�Z!d1d2�Z"d3d4�Z#d5d6�Z$d7d8�Z%dsd9d:�Z&dtd;d<�Z'd=d>�Z(dud?d@�Z)dAZ*dBZ+dCZ,dvdDdE�Z-dwdFdG�Z.dxdHdI�Z/dydJdK�Z0dLdM�Z1dNdO�Z2dPdQ�Z3dzdRdS�Z4d{dTdU�Z5d|dWdX�Z6d}dYdZ�Z7d~d[d\�Z8dd^d_�Z9d�dadb�Z:dcdd�Z;dedf�Z<d�dgdh�Z=didj�Z>dkdl�Z?d�dndo�Z@dS)��	CCompilerN�czc++Zobjc)�.cz.ccz.cppz.cxxz.mrcCsb||_||_||_d|_g|_g|_g|_g|_g|_g|_	|j
��D]}|�||j
|�qFdS�N)
�dry_run�force�verbose�
output_dir�macros�include_dirs�	libraries�library_dirs�runtime_library_dirs�objects�executables�keys�set_executable)�selfrrr�key�r�+/usr/lib64/python3.8/distutils/ccompiler.py�__init__UszCCompiler.__init__cKs<|D]2}||jkr&td||jjf��|�|||�qdS)Nz$unknown executable '%s' for class %s)r�
ValueError�	__class__�__name__r)r�kwargsrrrr�set_executablesys

�zCCompiler.set_executablescCs,t|t�rt||t|��nt|||�dSr)�
isinstance�str�setattrr)rr�valuerrrr�s
zCCompiler.set_executablecCs0d}|jD] }|d|kr"|S|d7}q
dS)Nr�)r)r�name�i�defnrrr�_find_macro�s

zCCompiler._find_macrocCs`|D]V}t|t�rFt|�dkrFt|dt�s8|ddkrFt|dt�std|dd��qdS)N)r*�r*rzinvalid macro definition '%s': z.must be tuple (string,), (string, string), or z(string, None))r&�tuple�lenr'�	TypeError)rZdefinitionsr-rrr�_check_macro_definitions�s

��
����z"CCompiler._check_macro_definitionscCs.|�|�}|dk	r|j|=|j�||f�dSr�r.r�append)rr+r)r,rrr�define_macro�s	
zCCompiler.define_macrocCs0|�|�}|dk	r|j|=|f}|j�|�dSrr4)rr+r,Zundefnrrr�undefine_macro�s

zCCompiler.undefine_macrocCs|j�|�dSr)rr5�r�dirrrr�add_include_dir�szCCompiler.add_include_dircCs|dd�|_dSr�r�r�dirsrrr�set_include_dirs�szCCompiler.set_include_dirscCs|j�|�dSr)rr5)r�libnamerrr�add_library�szCCompiler.add_librarycCs|dd�|_dSr)r)rZlibnamesrrr�
set_libraries�szCCompiler.set_librariescCs|j�|�dSr)rr5r8rrr�add_library_dirszCCompiler.add_library_dircCs|dd�|_dSr)rr<rrr�set_library_dirsszCCompiler.set_library_dirscCs|j�|�dSr)rr5r8rrr�add_runtime_library_dirsz!CCompiler.add_runtime_library_dircCs|dd�|_dSr)rr<rrr�set_runtime_library_dirssz"CCompiler.set_runtime_library_dirscCs|j�|�dSr)rr5)r�objectrrr�add_link_object szCCompiler.add_link_objectcCs|dd�|_dSr)r)rrrrr�set_link_objects(szCCompiler.set_link_objectscCs|dkr|j}nt|t�s"td��|dkr2|j}n"t|t�rL||jpFg}ntd��|dkrd|j}n*t|ttf�r�t|�|jp�g}ntd��|dkr�g}|j|d|d�}t	||�}i}	t
t|��D]B}
||
}||
}tj
�|�d}
|�tj
�|��||
f|	|<q�|||||	fS)N�%'output_dir' must be a string or None�/'macros' (if supplied) must be a list of tuples�6'include_dirs' (if supplied) must be a list of stringsr)�	strip_dirrr*)rr&r'r2r�listrr0�object_filenames�gen_preprocess_options�ranger1�os�path�splitextr�dirname)rZoutdirrZincdirs�sources�dependsZextrar�pp_opts�buildr,�src�obj�extrrr�_setup_compile6s<

��
zCCompiler._setup_compilecCs0|dg}|rdg|dd�<|r,||dd�<|S)Nz-cz-grr)rrW�debugZbefore�cc_argsrrr�_get_cc_argsas
zCCompiler._get_cc_argscCs�|dkr|j}nt|t�s"td��|dkr2|j}n"t|t�rL||jpFg}ntd��|dkrd|j}n*t|ttf�r�t|�|jp�g}ntd��|||fS)NrIrJrK)rr&r'r2rrMrr0)rrrrrrr�_fix_compile_argsjs"


�zCCompiler._fix_compile_argscCs|j||d�}|ifS)N)r)rN)rrUrrVrrrr�
_prep_compile�s	zCCompiler._prep_compilecCsHt|ttf�std��t|�}|dkr.|j}nt|t�s@td��||fS)Nz,'objects' must be a list or tuple of stringsrI)r&rMr0r2rr')rrrrrr�_fix_object_args�s
zCCompiler._fix_object_argscCs�|dkr|j}n*t|ttf�r2t|�|jp,g}ntd��|dkrJ|j}n*t|ttf�rlt|�|jpfg}ntd��|dkr�|j}n*t|ttf�r�t|�|jp�g}ntd��|||fS)Nz3'libraries' (if supplied) must be a list of stringsz6'library_dirs' (if supplied) must be a list of stringsz>'runtime_library_dirs' (if supplied) must be a list of strings)rr&rMr0r2rr)rrrrrrr�
_fix_lib_args�s,���zCCompiler._fix_lib_argscCs2|jr
dS|jr t||dd�}n
t||�}|SdS)NT�newer)Zmissing)rrr)rr�output_filerdrrr�
_need_link�s
zCCompiler._need_linkc		Cs~t|t�s|g}d}t|j�}|D]V}tj�|�\}}|j�|�}z |j�	|�}||kr`|}|}Wq"t
k
rvYq"Xq"|Sr)r&rMr1�language_orderrQrRrS�language_map�get�indexr!)	rrUZlangrj�source�baser[ZextlangZextindexrrr�detect_language�s

zCCompiler.detect_languagecCsdSrr)rrkrerr�
extra_preargs�extra_postargsrrr�
preprocess�szCCompiler.preprocessc		Csx|�||||||�\}}	}}
}|�|
||�}|	D]B}
z||
\}}Wntk
r\Yq0YnX|�|
|||||
�q0|	Sr)r\r_�KeyError�_compile)rrUrrrr]rnrorVrrWrXr^rZrYr[rrr�compile�s6��
zCCompiler.compilecCsdSrr)rrZrYr[r^rorWrrrrrCszCCompiler._compilecCsdSrr)rr�output_libnamerr]�target_langrrr�create_static_libIszCCompiler.create_static_libZ
shared_objectZshared_library�
executablecCst�dSr��NotImplementedError)rZtarget_descr�output_filenamerrrr�export_symbolsr]rnro�
build_temprurrr�linkis9zCCompiler.linkc

Cs2|�tj||j|dd�|||||||	|
||�
dS)N�shared)�lib_type)r}r�SHARED_LIBRARY�library_filename)
rrrtrrrrr{r]rnror|rurrr�link_shared_lib�s
�zCCompiler.link_shared_libc

Cs(|�tj|||||||||	|
||�
dSr)r}r�
SHARED_OBJECT)
rrrzrrrrr{r]rnror|rurrr�link_shared_object�s
�zCCompiler.link_shared_objectcCs.|�tj||�|�||||d|||	d|
�
dSr)r}r�
EXECUTABLE�executable_filename)rrZoutput_prognamerrrrr]rnrorurrr�link_executable�s
�zCCompiler.link_executablecCst�dSrrxr8rrr�library_dir_option�szCCompiler.library_dir_optioncCst�dSrrxr8rrr�runtime_library_dir_option�sz$CCompiler.runtime_library_dir_optioncCst�dSrrx)r�librrr�library_option�szCCompiler.library_optionc	Cs�ddl}|dkrg}|dkr g}|dkr,g}|dkr8g}|jd|dd�\}}t�|d�}	z*|D]}
|	�d|
�q^|	�d|�W5|	��Xz|j|g|d�}Wntk
r�Yd	SXz|j|d
||d�Wnt	t
fk
r�Yd	SXdS)Nrr
T)�text�wz#include "%s"
z=int main (int argc, char **argv) {
    %s();
    return 0;
}
r;Fza.out)rr)�tempfileZmkstemprQ�fdopen�close�writersZCompileErrorr�Z	LinkErrorr2)r�funcnameZincludesrrrr��fdZfname�fZinclrrrr�has_function�s<	�

�
zCCompiler.has_functioncCst�dSrrx)rr=r�r]rrr�find_library_file$szCCompiler.find_library_file�cCs�|dkrd}g}|D]|}tj�|�\}}tj�|�d}|tj�|�d�}||jkrftd||f��|rvtj�|�}|�tj�	|||j
��q|S)Nr�r*z"unknown file type '%s' (from '%s'))rQrRrS�
splitdrive�isabs�src_extensionsZUnknownFileError�basenamer5�join�
obj_extension)rZsource_filenamesrLrZ	obj_namesZsrc_namerlr[rrrrNOs"

��zCCompiler.object_filenamescCs$|rtj�|�}tj�|||j�Sr)rQrRr�r��shared_lib_extension�rr�rLrrrr�shared_object_filename`sz CCompiler.shared_object_filenamecCs(|rtj�|�}tj�|||jp"d�S)Nr�)rQrRr�r��
exe_extensionr�rrrr�fszCCompiler.executable_filename�staticc
Cs`|dkrtd��t||d�}t||d�}tj�|�\}}|||f}	|rPd}tj�|||	�S)N)r�r~ZdylibZ
xcode_stubz?'lib_type' must be "static", "shared", "dylib", or "xcode_stub"Z_lib_formatZ_lib_extensionr�)r!�getattrrQrR�splitr�)
rr?rrLrZfmtr[r9rl�filenamerrrr�ls�zCCompiler.library_filenamer*cCst�|�dSr)r
r])r�msg�levelrrr�announceszCCompiler.announcecCsddlm}|rt|�dS)Nr)�DEBUG)Zdistutils.debugr��print)rr�r�rrr�debug_print�szCCompiler.debug_printcCstj�d|�dS)Nzwarning: %s
)�sys�stderrr�)rr�rrr�warn�szCCompiler.warncCst||||j�dSr)r	r)r�func�argsr�r�rrrr	�szCCompiler.executecCst||jd�dS�N)r)rr)r�cmdrrrr�szCCompiler.spawncCst|||jd�Sr�)rr)rrYZdstrrrr�szCCompiler.move_file�cCst|||jd�dSr�)rr)rr+�moderrrr�szCCompiler.mkpath)rrr)N)N)NNNNN)NNNrNNN)NrN)
NNNNNrNNNN)
NNNNNrNNNN)
NNNNNrNNNN)NNNNrNNN)NNNN)r)rr�)rr�)rr�)r�rr�)r*)Nr*)r�)Ar#�
__module__�__qualname__Z
compiler_typer�r�Zstatic_lib_extensionr�Zstatic_lib_formatZshared_lib_formatr�rhrgr r%rr.r3r6r7r:r>r@rArBrCrDrErGrHr\r_r`rarbrcrfrmrprsrrrvr�r�r�r}r�r�r�r�r�r�r�r�rNr�r�r�r�r�r�r	rrrrrrrrs��

$ 

+	 
"
�

�
D�
�
A�
�
�
�
,
+


�


r))zcygwin.*�unix)�posixr�)�nt�msvccCsV|dkrtj}|dkrtj}tD]0\}}t�||�dk	sHt�||�dk	r |Sq dS)Nr�)rQr+r��platform�_default_compilers�re�match)Zosnamer��pattern�compilerrrr�get_default_compiler�s
�
r�)Z
unixccompilerZ
UnixCCompilerzstandard UNIX-style compiler)Z
_msvccompilerZMSVCCompilerzMicrosoft Visual C++)�cygwinccompilerZCygwinCCompilerz'Cygwin port of GNU C Compiler for Win32)r�ZMingw32CCompilerz(Mingw32 port of GNU C Compiler for Win32)ZbcppcompilerZBCPPCompilerzBorland C++ Compiler)r�r��cygwinZmingw32ZbcppcCsXddlm}g}t��D] }|�d|dt|df�q|��||�}|�d�dS)Nr)�FancyGetoptz	compiler=r/zList of available compilers:)Zdistutils.fancy_getoptr��compiler_classrr5�sortZ
print_help)r�Z	compilersr�Zpretty_printerrrr�show_compilers�s
�r�cCs�|dkrtj}z"|dkr t|�}t|\}}}Wn8tk
rhd|}|dk	r\|d|}t|��YnXz*d|}t|�tj|}	t	|	�|}
WnBt
k
r�td|��Yn$tk
r�td||f��YnX|
d||�S)Nz5don't know how to compile C/C++ code on platform '%s'z with '%s' compilerz
distutils.z4can't compile C/C++ code: unable to load module '%s'zBcan't compile C/C++ code: unable to find class '%s' in module '%s')rQr+r�r�rqZDistutilsPlatformError�
__import__r��modules�vars�ImportErrorZDistutilsModuleError)Zplatr�rrrZmodule_name�
class_nameZlong_descriptionr��module�klassrrr�new_compiler�s:
����
r�cCs�g}|D]�}t|t�r0dt|�kr.dks<ntd|��t|�dkr\|�d|d�qt|�dkr|ddkr�|�d|d�q|�d|�q|D]}|�d|�q�|S)	Nr*r/zPbad macro definition '%s': each element of 'macros' list must be a 1- or 2-tuplez-U%srz-D%sz-D%s=%sz-I%s)r&r0r1r2r5)rrrWZmacror9rrrrOs"$��rOcCs�g}|D]}|�|�|��q|D],}|�|�}t|t�rD||}q"|�|�q"|D]V}tj�|�\}}	|r�|�|g|	�}
|
r�|�|
�q�|�	d|�qT|�|�
|��qT|S)Nz6no library file corresponding to '%s' found (skipping))r5r�r�r&rMrQrRr�r�r�r�)r�rrrZlib_optsr9�optr�Zlib_dirZlib_nameZlib_filerrr�gen_lib_options8s&


�r�)NN)NNrrr)r�rQr�Zdistutils.errorsZdistutils.spawnrZdistutils.file_utilrZdistutils.dir_utilrZdistutils.dep_utilrrZdistutils.utilrr	Z	distutilsr
rr�r�r�r�r�rOr�rrrr�<module>s6
�
--PKX[
8$ow
w
)__pycache__/dir_util.cpython-38.opt-2.pycnu�[���U

e5db�@slddlZddlZddlmZmZddlmZiaddd�Zddd	�Z	dd
d�Z
dd
�Zddd�Zdd�Z
dS)�N)�DistutilsFileError�DistutilsInternalError)�log��cCsft|t�std|f��tj�|�}g}tj�|�s<|dkr@|St�tj�	|��rV|Stj�
|�\}}|g}|r�|r�tj�|�s�tj�
|�\}}|�d|�ql|D]�}tj�||�}tj�	|�}	t�|	�r�q�|dkr�t
�d|�|�sXzt�||�WnVtk
�rL}
z6|
jtjk�r&tj�|��s<td||
jdf��W5d}
~
XYnX|�|�dt|	<q�|S)Nz(mkpath: 'name' must be a string (got %r)�rrzcreating %szcould not create '%s': %s���)�
isinstance�strr�os�path�normpath�isdir�
_path_created�get�abspath�split�insert�joinr�info�mkdir�OSError�errnoZEEXISTr�args�append)�name�mode�verbose�dry_runZcreated_dirs�head�tailZtails�dZabs_head�exc�r#�*/usr/lib64/python3.8/distutils/dir_util.py�mkpathsB
�
�

r%c	CsNt�}|D] }|�tj�|tj�|���q
t|�D]}t||||d�q4dS)N�rr)�set�addrrr�dirname�sortedr%)Zbase_dir�filesrrrZneed_dir�file�dirr#r#r$�create_treePs
r.c
Cs^ddlm}|s(tj�|�s(td|��zt�|�}	Wn>tk
rt}
z |rRg}	ntd||
jf��W5d}
~
XYnX|s�t	||d�g}|	D]�}tj�
||�}
tj�
||�}|�d�r�q�|�r
tj�|
��r
t�
|
�}|dkr�t�d||�|s�t�||�|�|�q�tj�|
��r8|�t|
|||||||d	��q�||
||||||d	�|�|�q�|S)
Nr)�	copy_filez&cannot copy tree '%s': not a directoryzerror listing files in '%s': %s)rz.nfsrzlinking %s -> %sr&)Zdistutils.file_utilr/rrrr�listdirr�strerrorr%r�
startswith�islink�readlinkrr�symlinkr�extend�	copy_tree)�srcZdstZ
preserve_modeZpreserve_timesZpreserve_symlinks�updaterrr/�names�eZoutputs�nZsrc_nameZdst_nameZ	link_destr#r#r$r7cs\��

���r7cCsft�|�D]F}tj�||�}tj�|�r@tj�|�s@t||�q
|�tj|f�q
|�tj	|f�dS)N)
rr0rrrr3�_build_cmdtupler�remove�rmdir)r�	cmdtuples�fZreal_fr#r#r$r=�sr=cCs�|dkrt�d|�|rdSg}t||�|D]h}z2|d|d�tj�|d�}|tkrbt|=Wq.tk
r�}zt�d||�W5d}~XYq.Xq.dS)Nrz'removing '%s' (and everything under it)rzerror removing %s: %s)	rrr=rrrrr�warn)Z	directoryrrr@�cmdrr"r#r#r$�remove_tree�s

rDcCs6tj�|�\}}|dd�tjkr2||dd�}|S)Nrr)rr�
splitdrive�sep)rZdriver#r#r$�ensure_relative�srG)rrr)rrr)rrrrrr)rr)rrZdistutils.errorsrrZ	distutilsrrr%r.r7r=rDrGr#r#r#r$�<module>s
?
�
E

PKX[��-���'__pycache__/errors.cpython-38.opt-1.pycnu�[���U

e5d�
�@s8dZGdd�de�ZGdd�de�ZGdd�de�ZGdd�de�ZGd	d
�d
e�ZGdd�de�ZGd
d�de�ZGdd�de�Z	Gdd�de�Z
Gdd�de�ZGdd�de�ZGdd�de�Z
Gdd�de�ZGdd�de�ZGdd�de�ZGdd �d e�ZGd!d"�d"e�ZGd#d$�d$e�ZGd%d&�d&e�Zd'S)(a�distutils.errors

Provides exceptions used by the Distutils modules.  Note that Distutils
modules may raise standard exceptions; in particular, SystemExit is
usually raised for errors that are obviously the end-user's fault
(eg. bad command-line arguments).

This module is safe to use in "from ... import *" mode; it only exports
symbols whose names start with "Distutils" and end with "Error".c@seZdZdZdS)�DistutilsErrorzThe root of all Distutils evil.N��__name__�
__module__�__qualname__�__doc__�rr�(/usr/lib64/python3.8/distutils/errors.pyrsrc@seZdZdZdS)�DistutilsModuleErrorz�Unable to load an expected module, or to find an expected class
    within some module (in particular, command modules and classes).Nrrrrrr	sr	c@seZdZdZdS)�DistutilsClassErrorz�Some command class (or possibly distribution class, if anyone
    feels a need to subclass Distribution) is found not to be holding
    up its end of the bargain, ie. implementing some part of the
    "command "interface.Nrrrrrr
sr
c@seZdZdZdS)�DistutilsGetoptErrorz7The option table provided to 'fancy_getopt()' is bogus.Nrrrrrrsrc@seZdZdZdS)�DistutilsArgErrorzaRaised by fancy_getopt in response to getopt.error -- ie. an
    error in the command line usage.Nrrrrrrsrc@seZdZdZdS)�DistutilsFileErrorz�Any problems in the filesystem: expected file not found, etc.
    Typically this is for problems that we detect before OSError
    could be raised.Nrrrrrr
$sr
c@seZdZdZdS)�DistutilsOptionErrora�Syntactic/semantic errors in command options, such as use of
    mutually conflicting options, or inconsistent options,
    badly-spelled values, etc.  No distinction is made between option
    values originating in the setup script, the command line, config
    files, or what-have-you -- but if we *know* something originated in
    the setup script, we'll raise DistutilsSetupError instead.Nrrrrrr*src@seZdZdZdS)�DistutilsSetupErrorzqFor errors that can be definitely blamed on the setup script,
    such as invalid keyword arguments to 'setup()'.Nrrrrrr3src@seZdZdZdS)�DistutilsPlatformErrorz�We don't know how to do something on the current platform (but
    we do know how to do it on some platform) -- eg. trying to compile
    C files on a platform not supported by a CCompiler subclass.Nrrrrrr8src@seZdZdZdS)�DistutilsExecErrorz`Any problems executing an external program (such as the C
    compiler, when compiling C files).Nrrrrrr>src@seZdZdZdS)�DistutilsInternalErrorzoInternal inconsistencies or impossibilities (obviously, this
    should never be seen if the code is working!).NrrrrrrCsrc@seZdZdZdS)�DistutilsTemplateErrorz%Syntax error in a file list template.NrrrrrrHsrc@seZdZdZdS)�DistutilsByteCompileErrorzByte compile error.NrrrrrrKsrc@seZdZdZdS)�CCompilerErrorz#Some compile/link operation failed.NrrrrrrOsrc@seZdZdZdS)�PreprocessErrorz.Failure to preprocess one or more C/C++ files.NrrrrrrRsrc@seZdZdZdS)�CompileErrorz2Failure to compile one or more C/C++ source files.NrrrrrrUsrc@seZdZdZdS)�LibErrorzKFailure to create a static library from one or more C/C++ object
    files.NrrrrrrXsrc@seZdZdZdS)�	LinkErrorz]Failure to link one or more C/C++ object files into an executable
    or shared library file.Nrrrrrr\src@seZdZdZdS)�UnknownFileErrorz(Attempt to process an unknown file type.Nrrrrrr`srN)r�	Exceptionrr	r
rrr
rrrrrrrrrrrrrrrrr�<module>s&
	PKX[��$$1command/__pycache__/build_py.cpython-38.opt-2.pycnu�[���U

e5d&C�@svddlZddlZddlZddlZddlmZddlTddlm	Z	m
Z
ddlmZGdd�de�Z
Gdd	�d	e
e
�ZdS)
�N)�Command)�*)�convert_path�	Mixin2to3)�logc@s�eZdZdZdddddgZddgZd	diZd
d�Zdd
�Zdd�Z	dd�Z
dd�Zdd�Zdd�Z
dd�Zdd�Zdd�Zdd�Zd d!�Zd"d#�Zd$d%�Zd2d'd(�Zd)d*�Zd+d,�Zd-d.�Zd/d0�Zd1S)3�build_pyz5"build" pure Python modules (copy to build directory))z
build-lib=�dzdirectory to "build" (copy) to)�compile�czcompile .py to .pyc)�
no-compileNz!don't compile .py files [default])z	optimize=�Ozlalso compile with optimization: -O1 for "python -O", -O2 for "python -OO", and -O0 to disable [default: -O0])�force�fz2forcibly build everything (ignore file timestamps)r	r
rcCs4d|_d|_d|_d|_d|_d|_d|_d|_dS)Nr)�	build_lib�
py_modules�package�package_data�package_dirr	�optimizer
��self�r�2/usr/lib64/python3.8/distutils/command/build_py.py�initialize_options szbuild_py.initialize_optionsc	Cs�|�ddd�|jj|_|jj|_|jj|_i|_|jjr^|jj��D]\}}t|�|j|<qF|��|_	t
|jt�s�zt|j�|_Wn t
tfk
r�td��YnXdS)NZbuild)rr)r
r
zoptimize must be 0, 1, or 2)Zset_undefined_options�distribution�packagesrrr�itemsr�get_data_files�
data_files�
isinstancer�int�
ValueError�AssertionErrorZDistutilsOptionError)r�name�pathrrr�finalize_options*s$�



zbuild_py.finalize_optionscCs:|jr|��|jr$|��|��|�|jdd��dS�Nr)�include_bytecode)r�
build_modulesr�build_packages�build_package_data�byte_compile�get_outputsrrrr�runCszbuild_py.runcs�g}|js|S|jD]h}|�|�}tjj|jg|�d��}d�|rPt|�d��fdd�|�||�D�}|�	||||f�q|S)N�.r�csg|]}|�d��qS�Nr)�.0�file�Zplenrr�
<listcomp>ssz+build_py.get_data_files.<locals>.<listcomp>)
r�get_package_dir�osr$�joinr�split�len�find_data_files�append)r�datar�src_dir�	build_dir�	filenamesrr3rras



�zbuild_py.get_data_filescsd|j�dg�|j�|g�}g�|D]:}t�tj�t�|�t|���}���fdd�|D��q$�S)N�cs$g|]}|�krtj�|�r|�qSr)r6r$�isfile)r1�fn��filesrrr4�s�z,build_py.find_data_files.<locals>.<listcomp>)	r�get�globr6r$r7�escaper�extend)rrr=Zglobs�patternZfilelistrrCrr:ys�zbuild_py.find_data_filescCs`d}|jD]P\}}}}|D]>}tj�||�}|�tj�|��|jtj�||�|dd�qq
dS)NF�Z
preserve_mode)rr6r$r7�mkpath�dirname�	copy_file)rZlastdirrr=r>r?�filename�targetrrrr*�s�zbuild_py.build_package_datacCs�|�d�}|js&|r tjj|�SdSn�g}|r�z|jd�|�}Wn*tk
rl|�d|d�|d=Yq*X|�d|�tjj|�Sq*|j�d�}|dk	r�|�d|�|r�tjj|�SdSdS)Nr.r@r���)r8rr6r$r7�KeyError�insertrE)rrr$�tailZpdirrrrr5�s(
	zbuild_py.get_package_dircCsj|dkr8tj�|�s td|��tj�|�s8td|��|rftj�|d�}tj�|�rZ|St�d|�dS)Nr@z%package directory '%s' does not existz>supposed package directory '%s' exists, but is not a directoryz__init__.pyz8package init file '%s' not found (or not a regular file))	r6r$�existsZDistutilsFileError�isdirr7rAr�warn)rrr�init_pyrrr�
check_package�s&����zbuild_py.check_packagecCs&tj�|�st�d||�dSdSdS)Nz!file %s (for module %s) not foundFT)r6r$rArrV)r�module�module_filerrr�check_module�szbuild_py.check_modulec	Cs�|�||�t�tj�t�|�d��}g}tj�|jj�}|D]P}tj�|�}||kr�tj�	tj�
|��d}|�|||f�q>|�d|�q>|S)Nz*.pyrzexcluding %s)
rXrFr6r$r7rG�abspathrZscript_name�splitext�basenamer;Zdebug_print)	rrrZmodule_files�modulesZsetup_scriptrZabs_frYrrr�find_package_modules�szbuild_py.find_package_modulesc	Cs�i}g}|jD]�}|�d�}d�|dd��}|d}z||\}}Wn"tk
rh|�|�}d}YnX|s�|�||�}	|df||<|	r�|�|d|	f�tj�||d�}
|�	||
�s�q|�|||
f�q|S)Nr.rrPr/�__init__�.py)
rr8r7rQr5rXr;r6r$r[)rrr_rYr$rZmodule_baser�checkedrWrZrrr�find_modules�s*



zbuild_py.find_modulescCsNg}|jr|�|���|jrJ|jD]$}|�|�}|�||�}|�|�q$|Sr0)rrHrdrr5r`)rr_rr�mrrr�find_all_moduless

zbuild_py.find_all_modulescCsdd�|��D�S)NcSsg|]}|d�qS)rPr)r1rYrrrr4-sz-build_py.get_source_files.<locals>.<listcomp>)rfrrrr�get_source_files,szbuild_py.get_source_filescCs$|gt|�|dg}tjj|�S)Nrb)�listr6r$r7)rr>rrYZoutfile_pathrrr�get_module_outfile/szbuild_py.get_module_outfiler/cCs�|��}g}|D]p\}}}|�d�}|�|j||�}|�|�|r|jr^|�tjj|dd��|j	dkr|�tjj||j	d��q|dd�|j
D�7}|S)Nr.r@)�optimizationrcSs,g|]$\}}}}|D]}tj�||��qqSr)r6r$r7)r1rr=r>r?rNrrrr4Bs
�z(build_py.get_outputs.<locals>.<listcomp>)rfr8rirr;r	�	importlib�util�cache_from_sourcerr)rr'r_ZoutputsrrYrZrNrrrr,3s*


�

�
�zbuild_py.get_outputscCsbt|t�r|�d�}nt|ttf�s,td��|�|j||�}tj	�
|�}|�|�|j||dd�S)Nr.z:'package' must be a string (dot-separated), list, or tuplerrJ)
r�strr8rh�tuple�	TypeErrorrirr6r$rLrKrM)rrYrZrZoutfile�dirrrr�build_moduleJs
�
zbuild_py.build_modulecCs*|��}|D]\}}}|�|||�qdSr0)rdrr)rr_rrYrZrrrr(Yszbuild_py.build_modulescCsD|jD]8}|�|�}|�||�}|D]\}}}|�|||�q$qdSr0)rr5r`rr)rrrr_Zpackage_rYrZrrrr)bs



zbuild_py.build_packagescCs�tjr|�d�dSddlm}|j}|dtjkr>|tj}|jrZ||d|j	||j
d�|jdkr||||j|j	||j
d�dS)Nz%byte-compiling is disabled, skipping.r)r+rP)rr
�prefix�dry_run)�sys�dont_write_bytecoderV�distutils.utilr+rr6�sepr	r
rtr)rrDr+rsrrrr+vs&

�
�zbuild_py.byte_compileN)r/)�__name__�
__module__�__qualname__ZdescriptionZuser_optionsZboolean_optionsZnegative_optrr%r-rr:r*r5rXr[r`rdrfrgrir,rrr(r)r+rrrrrs8�



'4
	rc@seZdZdd�Zdd�ZdS)�
build_py_2to3cCsLg|_|jr|��|jr*|��|��|�|j�|�|jdd��dSr&)	�
updated_filesrr(rr)r*Zrun_2to3r+r,rrrrr-�szbuild_py_2to3.runcCs,t�||||�}|dr(|j�|d�|S)Nr/r)rrrr}r;)rrYrZr�resrrrrr�szbuild_py_2to3.build_moduleN)ryrzr{r-rrrrrrr|�sr|)r6�importlib.utilrkrurFZdistutils.corerZdistutils.errorsrwrrZ	distutilsrrr|rrrr�<module>s}PKX[��(command/__pycache__/check.cpython-38.pycnu�[���U

e5d��@s�dZddlmZddlmZzTddlmZddlmZddl	m
Z
ddl	mZddlm
Z
Gd	d
�d
e�ZdZWnek
r�dZYnXGd
d�de�ZdS)zCdistutils.command.check

Implements the Distutils 'check' command.
�)�Command)�DistutilsSetupError)�Reporter)�Parser)�frontend)�nodes)�StringIOc@seZdZd	dd�Zdd�ZdS)
�SilentReporterNr�ascii�replacec
Cs"g|_t�||||||||�dS�N)�messagesr�__init__)�self�source�report_level�
halt_level�stream�debug�encoding�
error_handler�r�//usr/lib64/python3.8/distutils/command/check.pyrs�zSilentReporter.__init__cOs6|j�||||f�tj|f|�||j|d�|��S)N)�level�type)r
�appendr�system_messageZlevels)rr�messageZchildren�kwargsrrrrs���zSilentReporter.system_message)Nrr
r)�__name__�
__module__�__qualname__rrrrrrr	s�
r	TFc@s`eZdZdZdZdddgZdddgZd	d
�Zdd�Zd
d�Z	dd�Z
dd�Zdd�Zdd�Z
dS)�checkz6This command checks the meta-data of the package.
    z"perform some checks on the package)�metadata�mzVerify meta-data)�restructuredtext�rzEChecks if long string meta-data syntax are reStructuredText-compliant)�strict�sz(Will exit with an error if a check failsr#r%r'cCsd|_d|_d|_d|_dS)z Sets default values for options.r�N)r%r#r'�	_warnings�rrrr�initialize_options1szcheck.initialize_optionscCsdSrrr+rrr�finalize_options8szcheck.finalize_optionscCs|jd7_t�||�S)z*Counts the number of warnings that occurs.r))r*r�warn)r�msgrrrr.;sz
check.warncCsL|jr|��|jr0tr"|��n|jr0td��|jrH|jdkrHtd��dS)zRuns the command.zThe docutils package is needed.rzPlease correct your package.N)r#�check_metadatar%�HAS_DOCUTILS�check_restructuredtextr'rr*r+rrr�run@s
z	check.runcCs�|jj}g}dD]"}t||�r(t||�s|�|�q|rL|�dd�|��|jrd|js�|�d�n"|j	r||j
s�|�d�n
|�d�dS)z�Ensures that all required elements of meta-data are supplied.

        name, version, URL, (author and author_email) or
        (maintainer and maintainer_email)).

        Warns if any are missing.
        )�name�versionZurlzmissing required meta-data: %sz, zLmissing meta-data: if 'author' supplied, 'author_email' must be supplied toozTmissing meta-data: if 'maintainer' supplied, 'maintainer_email' must be supplied toozimissing meta-data: either (author and author_email) or (maintainer and maintainer_email) must be suppliedN)�distributionr#�hasattr�getattrrr.�joinZauthorZauthor_emailZ
maintainerZmaintainer_email)rr#Zmissing�attrrrrr0Pszcheck.check_metadatacCsX|j��}|�|�D]>}|d�d�}|dkr8|d}nd|d|f}|�|�qdS)z4Checks if the long string fields are reST-compliant.����lineNr)z%s (line %s))r6Zget_long_description�_check_rst_data�getr.)r�dataZwarningr<rrrr2ns

zcheck.check_restructuredtextc
Cs�|jjp
d}t�}tjtfd���}d|_d|_d|_t	||j
|j|j|j
|j|jd�}tj|||d�}|�|d�z|�||�Wn:tk
r�}z|j�dd|d	if�W5d}~XYnX|jS)
z8Returns warnings when the provided data doesn't compile.zsetup.py)Z
components�N)rrrr)rr;z!Could not finish the parsing: %s.�)r6Zscript_namerrZOptionParserZget_default_valuesZ	tab_widthZpep_referencesZrfc_referencesr	rrZwarning_streamrZerror_encodingZerror_encoding_error_handlerr�documentZnote_source�parse�AttributeErrorr
r)rr?�source_path�parserZsettingsZreporterrB�errrr=ys.��zcheck._check_rst_dataN)rr r!�__doc__ZdescriptionZuser_optionsZboolean_optionsr,r-r.r3r0r2r=rrrrr"$s�
r"N)rHZdistutils.corerZdistutils.errorsrZdocutils.utilsrZdocutils.parsers.rstrZdocutilsrr�iorr	r1�	Exceptionr"rrrr�<module>s
PKX[��˄66.command/__pycache__/clean.cpython-38.opt-1.pycnu�[���U

e5d�
�@sDdZddlZddlmZddlmZddlmZGdd�de�ZdS)zBdistutils.command.clean

Implements the Distutils 'clean' command.�N)�Command)�remove_tree)�logc@s>eZdZdZddddddgZdgZd	d
�Zdd�Zd
d�ZdS)�cleanz-clean up temporary files from 'build' command)zbuild-base=�bz2base build directory (default: 'build.build-base'))z
build-lib=Nz<build directory for all modules (default: 'build.build-lib'))zbuild-temp=�tz7temporary build directory (default: 'build.build-temp'))zbuild-scripts=Nz<build directory for scripts (default: 'build.build-scripts'))zbdist-base=Nz+temporary directory for built distributions)�all�az7remove all build output, not just temporary by-productsrcCs(d|_d|_d|_d|_d|_d|_dS)N)�
build_base�	build_lib�
build_temp�
build_scripts�
bdist_baser��self�r�//usr/lib64/python3.8/distutils/command/clean.py�initialize_options szclean.initialize_optionscCs"|�ddddd�|�dd�dS)NZbuild)r
r
)rr)r
r
)rrZbdist)rr)Zset_undefined_optionsrrrr�finalize_options(s��zclean.finalize_optionscCs�tj�|j�r t|j|jd�nt�d|j�|jrr|j	|j
|jfD],}tj�|�rdt||jd�qDt�d|�qD|js�zt�
|j�t�d|j�Wntk
r�YnXdS)N)�dry_runz%'%s' does not exist -- can't clean itz
removing '%s')�os�path�existsrrrr�debugrrrr
�warn�rmdirr
�info�OSError)rZ	directoryrrr�run1s*���z	clean.runN)	�__name__�
__module__�__qualname__ZdescriptionZuser_optionsZboolean_optionsrrrrrrrrs�	r)	�__doc__rZdistutils.corerZdistutils.dir_utilrZ	distutilsrrrrrr�<module>s
PKX[*���0command/__pycache__/build_scripts.cpython-38.pycnu�[���U

e5dX�@s�dZddlZddlZddlmZddlmZddlmZddl	m
Z
ddlmZm
Z
ddlmZddlZe�d	�ZGd
d�de�ZGdd
�d
ee
�ZdS)zRdistutils.command.build_scripts

Implements the Distutils 'build_scripts' command.�N)�ST_MODE)�	sysconfig)�Command)�newer)�convert_path�	Mixin2to3)�logs^#!.*python[0-9.]*([ 	].*)?$c@sHeZdZdZdddgZdgZdd�Zdd	�Zd
d�Zdd
�Z	dd�Z
dS)�
build_scriptsz("build" scripts (copy and fixup #! line))z
build-dir=�dzdirectory to "build" (copy) to)�force�fz1forcibly build everything (ignore file timestamps)zexecutable=�ez*specify final destination interpreter pathrcCs"d|_d|_d|_d|_d|_dS�N)�	build_dir�scriptsr�
executable�outfiles��self�r�7/usr/lib64/python3.8/distutils/command/build_scripts.py�initialize_optionss
z build_scripts.initialize_optionscCs|�dddd�|jj|_dS)NZbuild)r	r)rr)rr)Zset_undefined_optionsZdistributionrrrrr�finalize_options%s�zbuild_scripts.finalize_optionscCs|jSr)rrrrr�get_source_files,szbuild_scripts.get_source_filescCs|js
dS|��dSr)r�copy_scriptsrrrr�run/szbuild_scripts.runc
Cs�|�|j�g}g}|jD�]}d}t|�}tj�|jtj�|��}|�|�|j	slt
||�slt�d|�qzt
|d�}Wn tk
r�|js��d}YnXXt�|j�\}}|�d�|��}	|	s�|�d|�qt�|	�}
|
r�d}|
�d�p�d	}|�rt�d
||j�|�|�|j�stj�s*|j}n(tj�t�d�dt�d
�t�d�f�}t�|�}d||d}
z|
�d�Wn$tk
�r�t d�!|
���YnXz|
�|�Wn&tk
�r�t d�!|
|���YnXt
|d��}|�"|
�|�#|�$��W5QRX|�r8|�%�q|�r"|�%�|�|�|�&||�qtj'dk�r�|D]`}|j�rdt�d|�nDt�(|�t)d@}|dBd@}||k�rJt�d|||�t�*||��qJ||fS)a"Copy each script listed in 'self.scripts'; if it's marked as a
        Python script in the Unix way (first line matches 'first_line_re',
        ie. starts with "\#!" and contains "python"), then adjust the first
        line to refer to the current Python interpreter as we copy.
        Fznot copying %s (up-to-date)�rbNrz%s is an empty file (skipping)T��zcopying and adjusting %s -> %sZBINDIRz
python%s%sZVERSIONZEXEs#!�
zutf-8z.The shebang ({!r}) is not decodable from utf-8zAThe shebang ({!r}) is not decodable from the script encoding ({})�wb�posixzchanging mode of %si�imz!changing mode of %s from %o to %o)+Zmkpathrrr�os�path�join�basename�appendrrr�debug�open�OSError�dry_run�tokenize�detect_encoding�readline�seek�warn�
first_line_re�match�group�inforZpython_buildrZget_config_var�fsencode�decode�UnicodeDecodeError�
ValueError�format�write�
writelines�	readlines�closeZ	copy_file�name�statr�chmod)rr�
updated_filesZscriptZadjustZoutfiler�encoding�linesZ
first_liner1Zpost_interprZshebangZoutf�fileZoldmodeZnewmoderrrr5s�



�

��
��
��




�zbuild_scripts.copy_scriptsN)�__name__�
__module__�__qualname__ZdescriptionZuser_optionsZboolean_optionsrrrrrrrrrr	s�r	c@seZdZdd�ZdS)�build_scripts_2to3cCs&t�|�\}}|js|�|�||fSr)r	rr*Zrun_2to3)rrr@rrrr�s
zbuild_scripts_2to3.copy_scriptsN)rDrErFrrrrrrG�srG)�__doc__r"�rer>rZ	distutilsrZdistutils.corerZdistutils.dep_utilrZdistutils.utilrrrr+�compiler0r	rGrrrr�<module>s

PKX[��Z��3command/__pycache__/build_clib.cpython-38.opt-2.pycnu�[���U

e5dV�@sPddlZddlmZddlTddlmZddlmZdd�ZGdd	�d	e�Z	dS)
�N)�Command)�*)�customize_compiler)�logcCsddlm}|�dS)Nr��show_compilers)�distutils.ccompilerrr�r	�4/usr/lib64/python3.8/distutils/command/build_clib.pyrsrc@sleZdZdZdddddgZddgZd	d
defgZdd
�Zdd�Z	dd�Z
dd�Zdd�Zdd�Z
dd�Zd
S)�
build_clibz/build C/C++ libraries used by Python extensions)zbuild-clib=�bz%directory to build C/C++ libraries to)zbuild-temp=�tz,directory to put temporary build by-products)�debug�gz"compile with debugging information)�force�fz2forcibly build everything (ignore file timestamps))z	compiler=�czspecify the compiler typerrz
help-compilerNzlist available compilerscCs:d|_d|_d|_d|_d|_d|_d|_d|_d|_dS)Nr)	r�
build_temp�	libraries�include_dirs�define�undefrr�compiler��selfr	r	r
�initialize_options4szbuild_clib.initialize_optionscCsh|�dddddd�|jj|_|jr0|�|j�|jdkrH|jjpDg|_t|jt�rd|j�tj	�|_dS)NZbuild)rr)rr)rr)rr)rr)
Zset_undefined_optionsZdistributionr�check_library_listr�
isinstance�str�split�os�pathseprr	r	r
�finalize_optionsDs�

zbuild_clib.finalize_optionscCs�|js
dSddlm}||j|j|jd�|_t|j�|jdk	rN|j�|j�|j	dk	rv|j	D]\}}|j�
||�q^|jdk	r�|jD]}|j�|�q�|�
|j�dS)Nr)�new_compiler)r�dry_runr)rrr#rr$rrrZset_include_dirsrZdefine_macrorZundefine_macro�build_libraries)rr#�name�valueZmacror	r	r
�run^s"�




zbuild_clib.runcCs�t|t�std��|D]z}t|t�s8t|�dkr8td��|\}}t|t�sRtd��d|ksntjdkr~tj|kr~td|d��t|t�std��qdS)	Nz+'libraries' option must be a list of tuples�z*each element of 'libraries' must a 2-tuplezNfirst element of each tuple in 'libraries' must be a string (the library name)�/z;bad library name '%s': may not contain directory separatorsrzMsecond element of each tuple in 'libraries' must be a dictionary (build info))	r�list�DistutilsSetupError�tuple�lenrr �sep�dict)rr�libr&�
build_infor	r	r
rvs,

��
��
�zbuild_clib.check_library_listcCs,|js
dSg}|jD]\}}|�|�q|S)N)r�append)rZ	lib_names�lib_namer2r	r	r
�get_library_names�szbuild_clib.get_library_namescCsZ|�|j�g}|jD]>\}}|�d�}|dks>t|ttf�sJtd|��|�|�q|S)N�sources�fin 'libraries' option (library '%s'), 'sources' must be present and must be a list of source filenames)rr�getrr+r-r,�extend)r�	filenamesr4r2r6r	r	r
�get_source_files�s
��zbuild_clib.get_source_filescCs�|D]�\}}|�d�}|dks,t|ttf�s8td|��t|�}t�d|�|�d�}|�d�}|jj||j	|||j
d�}|jj|||j|j
d�qdS)Nr6r7zbuilding '%s' library�macrosr)�
output_dirr<rr)r=r)
r8rr+r-r,r�infor�compilerrZcreate_static_libr)rrr4r2r6r<rZobjectsr	r	r
r%�s,
��

�	
�zbuild_clib.build_libraries)�__name__�
__module__�__qualname__ZdescriptionZuser_optionsZboolean_optionsrZhelp_optionsrr"r(rr5r;r%r	r	r	r
rs(�
��$r)
r Zdistutils.corerZdistutils.errorsZdistutils.sysconfigrZ	distutilsrrrr	r	r	r
�<module>sPKX[�0�h�(�(+command/__pycache__/build_py.cpython-38.pycnu�[���U

e5d&C�@szdZddlZddlZddlZddlZddlmZddlTddl	m
Z
mZddlm
Z
Gdd�de�ZGd	d
�d
ee�ZdS)zHdistutils.command.build_py

Implements the Distutils 'build_py' command.�N)�Command)�*)�convert_path�	Mixin2to3)�logc@s�eZdZdZdddddgZddgZd	diZd
d�Zdd
�Zdd�Z	dd�Z
dd�Zdd�Zdd�Z
dd�Zdd�Zdd�Zdd�Zd d!�Zd"d#�Zd$d%�Zd2d'd(�Zd)d*�Zd+d,�Zd-d.�Zd/d0�Zd1S)3�build_pyz5"build" pure Python modules (copy to build directory))z
build-lib=�dzdirectory to "build" (copy) to)�compile�czcompile .py to .pyc)�
no-compileNz!don't compile .py files [default])z	optimize=�Ozlalso compile with optimization: -O1 for "python -O", -O2 for "python -OO", and -O0 to disable [default: -O0])�force�fz2forcibly build everything (ignore file timestamps)r	r
rcCs4d|_d|_d|_d|_d|_d|_d|_d|_dS)Nr)�	build_lib�
py_modules�package�package_data�package_dirr	�optimizer
��self�r�2/usr/lib64/python3.8/distutils/command/build_py.py�initialize_options szbuild_py.initialize_optionsc	Cs�|�ddd�|jj|_|jj|_|jj|_i|_|jjr^|jj��D]\}}t|�|j|<qF|��|_	t
|jt�s�z,t|j�|_d|jkr�dks�nt
�Wn tt
fk
r�td��YnXdS)NZbuild)rr)r
r
r�zoptimize must be 0, 1, or 2)Zset_undefined_options�distribution�packagesrrr�itemsr�get_data_files�
data_files�
isinstancer�int�AssertionError�
ValueErrorZDistutilsOptionError)r�name�pathrrr�finalize_options*s$�



 zbuild_py.finalize_optionscCs:|jr|��|jr$|��|��|�|jdd��dS�Nr)�include_bytecode)r�
build_modulesr�build_packages�build_package_data�byte_compile�get_outputsrrrr�runCszbuild_py.runcs�g}|js|S|jD]h}|�|�}tjj|jg|�d��}d�|rPt|�d��fdd�|�||�D�}|�	||||f�q|S)z?Generate list of '(package,src_dir,build_dir,filenames)' tuples�.r�csg|]}|�d��qS�Nr)�.0�file�Zplenrr�
<listcomp>ssz+build_py.get_data_files.<locals>.<listcomp>)
r�get_package_dir�osr%�joinr�split�len�find_data_files�append)r�datar�src_dir�	build_dir�	filenamesrr4rras



�zbuild_py.get_data_filescsd|j�dg�|j�|g�}g�|D]:}t�tj�t�|�t|���}���fdd�|D��q$�S)z6Return filenames for package's data files in 'src_dir'�cs$g|]}|�krtj�|�r|�qSr)r7r%�isfile)r2�fn��filesrrr5�s�z,build_py.find_data_files.<locals>.<listcomp>)	r�get�globr7r%r8�escaper�extend)rrr>Zglobs�patternZfilelistrrDrr;ys�zbuild_py.find_data_filescCs`d}|jD]P\}}}}|D]>}tj�||�}|�tj�|��|jtj�||�|dd�qq
dS)z$Copy data files into build directoryNF�Z
preserve_mode)rr7r%r8�mkpath�dirname�	copy_file)rZlastdirrr>r?r@�filename�targetrrrr+�s�zbuild_py.build_package_datacCs�|�d�}|js&|r tjj|�SdSn�g}|r�z|jd�|�}Wn*tk
rl|�d|d�|d=Yq*X|�d|�tjj|�Sq*|j�d�}|dk	r�|�d|�|r�tjj|�SdSdS)z�Return the directory, relative to the top of the source
           distribution, where package 'package' should be found
           (at least according to the 'package_dir' option, if any).r/rAr���N)r9rr7r%r8�KeyError�insertrF)rrr%�tailZpdirrrrr6�s(
	zbuild_py.get_package_dircCsj|dkr8tj�|�s td|��tj�|�s8td|��|rftj�|d�}tj�|�rZ|St�d|�dS)NrAz%package directory '%s' does not existz>supposed package directory '%s' exists, but is not a directoryz__init__.pyz8package init file '%s' not found (or not a regular file))	r7r%�existsZDistutilsFileError�isdirr8rBr�warn)rrr�init_pyrrr�
check_package�s&����zbuild_py.check_packagecCs&tj�|�st�d||�dSdSdS)Nz!file %s (for module %s) not foundFT)r7r%rBrrW)r�module�module_filerrr�check_module�szbuild_py.check_modulec	Cs�|�||�t�tj�t�|�d��}g}tj�|jj�}|D]P}tj�|�}||kr�tj�	tj�
|��d}|�|||f�q>|�d|�q>|S)Nz*.pyrzexcluding %s)
rYrGr7r%r8rH�abspathrZscript_name�splitext�basenamer<Zdebug_print)	rrrZmodule_files�modulesZsetup_scriptrZabs_frZrrr�find_package_modules�szbuild_py.find_package_modulesc	Cs�i}g}|jD]�}|�d�}d�|dd��}|d}z||\}}Wn"tk
rh|�|�}d}YnX|s�|�||�}	|df||<|	r�|�|d|	f�tj�||d�}
|�	||
�s�q|�|||
f�q|S)a�Finds individually-specified Python modules, ie. those listed by
        module name in 'self.py_modules'.  Returns a list of tuples (package,
        module_base, filename): 'package' is a tuple of the path through
        package-space to the module; 'module_base' is the bare (no
        packages, no dots) module name, and 'filename' is the path to the
        ".py" file (relative to the distribution root) that implements the
        module.
        r/rrQr0�__init__�.py)
rr9r8rRr6rYr<r7r%r\)rrr`rZr%rZmodule_baser�checkedrXr[rrr�find_modules�s*



zbuild_py.find_modulescCsNg}|jr|�|���|jrJ|jD]$}|�|�}|�||�}|�|�q$|S)a4Compute the list of all modules that will be built, whether
        they are specified one-module-at-a-time ('self.py_modules') or
        by whole packages ('self.packages').  Return a list of tuples
        (package, module, module_file), just like 'find_modules()' and
        'find_package_modules()' do.)rrIrerr6ra)rr`rr�mrrr�find_all_moduless

zbuild_py.find_all_modulescCsdd�|��D�S)NcSsg|]}|d�qS)rQr)r2rZrrrr5-sz-build_py.get_source_files.<locals>.<listcomp>)rgrrrr�get_source_files,szbuild_py.get_source_filescCs$|gt|�|dg}tjj|�S)Nrc)�listr7r%r8)rr?rrZZoutfile_pathrrr�get_module_outfile/szbuild_py.get_module_outfiler0cCs�|��}g}|D]p\}}}|�d�}|�|j||�}|�|�|r|jr^|�tjj|dd��|j	dkr|�tjj||j	d��q|dd�|j
D�7}|S)Nr/rA)�optimizationrcSs,g|]$\}}}}|D]}tj�||��qqSr)r7r%r8)r2rr>r?r@rOrrrr5Bs
�z(build_py.get_outputs.<locals>.<listcomp>)rgr9rjrr<r	�	importlib�util�cache_from_sourcerr)rr(r`ZoutputsrrZr[rOrrrr-3s*


�

�
�zbuild_py.get_outputscCsbt|t�r|�d�}nt|ttf�s,td��|�|j||�}tj	�
|�}|�|�|j||dd�S)Nr/z:'package' must be a string (dot-separated), list, or tuplerrK)
r �strr9ri�tuple�	TypeErrorrjrr7r%rMrLrN)rrZr[rZoutfile�dirrrr�build_moduleJs
�
zbuild_py.build_modulecCs*|��}|D]\}}}|�|||�qdSr1)rers)rr`rrZr[rrrr)Yszbuild_py.build_modulescCsP|jD]D}|�|�}|�||�}|D]$\}}}||ks:t�|�|||�q$qdSr1)rr6rar"rs)rrrr`Zpackage_rZr[rrrr*bs


zbuild_py.build_packagescCs�tjr|�d�dSddlm}|j}|dtjkr>|tj}|jrZ||d|j	||j
d�|jdkr||||j|j	||j
d�dS)Nz%byte-compiling is disabled, skipping.r)r,rQ)rr
�prefix�dry_run)�sys�dont_write_bytecoderW�distutils.utilr,rr7�sepr	r
rur)rrEr,rtrrrr,vs&

�
�zbuild_py.byte_compileN)r0)�__name__�
__module__�__qualname__ZdescriptionZuser_optionsZboolean_optionsZnegative_optrr&r.rr;r+r6rYr\rarergrhrjr-rsr)r*r,rrrrrs8�



'4
	rc@seZdZdd�Zdd�ZdS)�
build_py_2to3cCsLg|_|jr|��|jr*|��|��|�|j�|�|jdd��dSr')	�
updated_filesrr)rr*r+Zrun_2to3r,r-rrrrr.�szbuild_py_2to3.runcCs,t�||||�}|dr(|j�|d�|S)Nr0r)rrsr~r<)rrZr[r�resrrrrs�szbuild_py_2to3.build_moduleN)rzr{r|r.rsrrrrr}�sr})�__doc__r7�importlib.utilrlrvrGZdistutils.corerZdistutils.errorsrxrrZ	distutilsrrr}rrrr�<module>s}PKX[1�f]??,command/__pycache__/build_ext.cpython-38.pycnu�[���U

e5dP{�@s�dZddlZddlZddlZddlZddlmZddlTddlm	Z	m
Z
ddlmZddlm
Z
ddlmZdd	lmZdd
lmZddlmZe�d�Zd
d�ZGdd�de�ZdS)z�distutils.command.build_ext

Implements the Distutils 'build_ext' command, for building extension
modules (currently limited to C extensions, should accommodate C++
extensions ASAP).�N)�Command)�*)�customize_compiler�get_python_version)�get_config_h_filename)�newer_group)�	Extension)�get_platform)�log)�	USER_BASEz3^[a-zA-Z_][a-zA-Z_0-9]*(\.[a-zA-Z_][a-zA-Z_0-9]*)*$cCsddlm}|�dS)Nr��show_compilers)�distutils.ccompilerr
r�r�3/usr/lib64/python3.8/distutils/command/build_ext.pyr
sr
c@seZdZdZdejZddddde�fdd	d
defdd
ddddefddddddddddgZddddd gZ	d!d"d#e
fgZd$d%�Zd&d'�Z
d(d)�Zd*d+�Zd,d-�Zd.d/�Zd0d1�Zd2d3�Zd4d5�Zejd6d7��Zd8d9�Zd:d;�Zd<d=�Zd>d?�Zd@dA�ZdBdC�ZdDdE�ZdFdG�Zd"S)H�	build_extz8build C/C++ extensions (compile/link to build directory)z (separated by '%s'))z
build-lib=�bz(directory for compiled extension modules)zbuild-temp=�tz1directory for temporary files (build by-products)z
plat-name=�pz>platform name to cross-compile for, if supported (default: %s))�inplace�iziignore build-lib and put compiled extensions into the source directory alongside your pure Python modulesz
include-dirs=�Iz.list of directories to search for header files)zdefine=�DzC preprocessor macros to define)zundef=�Uz!C preprocessor macros to undefine)z
libraries=�lz!external C libraries to link withz
library-dirs=�Lz.directories to search for external C libraries)zrpath=�Rz7directories to search for shared C libraries at runtime)z
link-objects=�Oz2extra explicit link objects to include in the link)�debug�gz'compile/link with debugging information)�force�fz2forcibly build everything (ignore file timestamps))z	compiler=�czspecify the compiler type)z	parallel=�jznumber of parallel build jobs)�swig-cppNz)make SWIG create C++ files (default is C))z
swig-opts=Nz!list of SWIG command line options)zswig=Nzpath to the SWIG executable)�userNz#add user include, library and rpathrrr r$r%z
help-compilerNzlist available compilerscCs�d|_d|_d|_d|_d|_d|_d|_d|_d|_d|_	d|_
d|_d|_d|_
d|_d|_d|_d|_d|_d|_d|_dS)Nr)�
extensions�	build_lib�	plat_name�
build_tempr�package�include_dirs�define�undef�	libraries�library_dirs�rpath�link_objectsrr �compiler�swig�swig_cpp�	swig_optsr%�parallel��selfrrr�initialize_optionsjs*zbuild_ext.initialize_optionsc

Cs�ddlm}|�ddddddd	d
�|jdkr8|jj|_|jj|_|��}|jdd�}|j	dkrn|jj	pjg|_	t
|j	t�r�|j	�t
j�|_	tjtjkr�|j	�t
j�tjd
��|j	�|�t
jj��||kr�|j	�|�t
jj��|�d�|�d�|jdk�rg|_|jdk�rg|_nt
|jt��r:|j�t
j�|_|jdk�rNg|_nt
|jt��rl|j�t
j�|_t
jdk�rh|j�t
j�tjd��tjtjk�r�|j�t
j�tjd��|j�r�t
j�|jd�|_nt
j�|jd�|_|j	�t
j�t���t tdd�}|�r|j�|�|j!dk�r*d}n|j!dd�}t
j�tjd�}|�r\t
j�||�}|j�|�tj"dd�dk�r�tj#�$t
j�tjd���r�|j�t
j�tjddt%�d��n|j�d�|�&d��r�|j'�s�|j�|�&d ��n|j�d�|j(�r|j(�d!�}d"d#�|D�|_(|j)�r4|j)�d!�|_)|j*dk�rHg|_*n|j*�d$�|_*|j+�r�t
j�t,d
�}t
j�t,d�}	t
j�-|��r�|j	�|�t
j�-|	��r�|j�|	�|j�|	�t
|j.t��r�zt/|j.�|_.Wnt0k
�r�t1d%��YnXdS)&Nr)�	sysconfigZbuild)r'r')r)r))r2r2)rr)r r )r6r6)r(r(�)Z
plat_specificZincluder.r1�ntZlibsZDebugZRelease�_home�win32�ZPCbuild��cygwin�bin�lib�pythonZconfig�.�Py_ENABLE_SHAREDZLIBDIR�,cSsg|]}|df�qS)�1r)�.0Zsymbolrrr�
<listcomp>�sz.build_ext.finalize_options.<locals>.<listcomp>� zparallel should be an integer)2�	distutilsr:Zset_undefined_optionsr*�distributionZext_packageZext_modulesr&Zget_python_incr+�
isinstance�str�split�os�pathsep�sys�exec_prefix�base_exec_prefix�append�path�join�extendZensure_string_listr.r/r0�name�prefixrr)�dirnamer�getattrr(�platform�
executable�
startswithr�get_config_varZpython_buildr,r-r5r%r�isdirr6�int�
ValueErrorZDistutilsOptionError)
r8r:Z
py_includeZplat_py_includeZ	_sys_home�suffixZnew_libZdefinesZuser_includeZuser_librrr�finalize_options�s��




�

�zbuild_ext.finalize_optionscCsjddlm}|jsdS|j��rL|�d�}|j�|��p:g�|j	�
|j�||j|j
|j|jd�|_t|j�tjdkr�|jt�kr�|j�|j�|jdk	r�|j�|j�|jdk	r�|jD]\}}|j�||�q�|jdk	r�|jD]}|j�|�q�|jdk	�r|j�|j�|j	dk	�r*|j�|j	�|jdk	�rD|j�|j�|j dk	�r^|j�!|j �|�"�dS)Nr)�new_compiler�
build_clib)r2�verbose�dry_runr r<)#rrgr&rMZhas_c_libraries�get_finalized_commandr.rYZget_library_namesr/rVrhr2rirjr rrQrZr(r	Z
initializer+Zset_include_dirsr,Zdefine_macror-Zundefine_macroZ
set_librariesZset_library_dirsr0Zset_runtime_library_dirsr1Zset_link_objects�build_extensions)r8rgrhrZ�value�macrorrr�runs@

�




z
build_ext.runc
Csvt|t�std��t|�D�]T\}}t|t�r0qt|t�rFt|�dkrNtd��|\}}t�d|�t|t	�rvt
�|�s~td��t|t�s�td��t||d�}dD]"}|�
|�}|d	k	r�t|||�q�|�
d
�|_d|kr�t�d�|�
d
�}|�rhg|_g|_|D]b}	t|	t��r"t|	�dk�s*td��t|	�dk�rJ|j�|	d�nt|	�dk�r|j�|	��q|||<qd	S)a�Ensure that the list of extensions (presumably provided as a
        command option 'extensions') is valid, i.e. it is a list of
        Extension objects.  We also support the old-style list of 2-tuples,
        where the tuples are (ext_name, build_info), which are converted to
        Extension instances here.

        Raise DistutilsSetupError if the structure is invalid anywhere;
        just returns otherwise.
        z:'ext_modules' option must be a list of Extension instances�zMeach element of 'ext_modules' option must be an Extension instance or 2-tuplezvold-style (ext_name, build_info) tuple found in ext_modules for extension '%s' -- please convert to Extension instancezRfirst element of each tuple in 'ext_modules' must be the extension name (a string)zOsecond element of each tuple in 'ext_modules' must be a dictionary (build info)�sources)r+r/r.�
extra_objects�extra_compile_args�extra_link_argsNr0Zdef_filez9'def_file' element of build info dict no longer supported�macros)r;rpz9'macros' element of build info dict must be 1- or 2-tupler;r)rN�list�DistutilsSetupError�	enumerater�tuple�lenr
�warnrO�extension_name_re�match�dict�get�setattr�runtime_library_dirs�
define_macros�undef_macrosrV)
r8r&r�ext�ext_nameZ
build_info�key�valrurnrrr�check_extensions_listVs^

�
��
��
�


�zbuild_ext.check_extensions_listcCs,|�|j�g}|jD]}|�|j�q|S�N)r�r&rYrq)r8�	filenamesr�rrr�get_source_files�s

zbuild_ext.get_source_filescCs2|�|j�g}|jD]}|�|�|j��q|Sr�)r�r&rV�get_ext_fullpathrZ)r8Zoutputsr�rrr�get_outputs�s

zbuild_ext.get_outputscCs(|�|j�|jr|��n|��dSr�)r�r&r6�_build_extensions_parallel�_build_extensions_serialr7rrrrl�s
zbuild_ext.build_extensionscs��j}�jdkrt��}zddlm}Wntk
r@d}YnX|dkrV���dS||d��P���fdd��jD�}t�j|�D]&\}}��	|��|�
�W5QRXq�W5QRXdS)NTr)�ThreadPoolExecutor)Zmax_workerscsg|]}���j|��qSr)Zsubmit�build_extension)rIr��Zexecutorr8rrrJ�s�z8build_ext._build_extensions_parallel.<locals>.<listcomp>)r6rQ�	cpu_countZconcurrent.futuresr��ImportErrorr�r&�zip�_filter_build_errors�result)r8Zworkersr�Zfuturesr�Zfutrr�rr��s"

�z$build_ext._build_extensions_parallelc
Cs0|jD]$}|�|��|�|�W5QRXqdSr�)r&r�r�)r8r�rrrr��s
z"build_ext._build_extensions_serialc
csTz
dVWnDtttfk
rN}z |js*�|�d|j|f�W5d}~XYnXdS)Nz"building extension "%s" failed: %s)ZCCompilerErrorZDistutilsErrorZCompileErrorZoptionalr{rZ)r8r��errrr��s
�zbuild_ext._filter_build_errorsc
CsP|j}|dkst|ttf�s*td|j��t|�}|�|j�}||j}|jslt	||d�slt
�d|j�dSt
�d|j�|�
||�}|jp�g}|jdd�}|jD]}|�|f�q�|jj||j||j|j||jd�}|dd�|_|jr�|�|j�|j�pg}|j�p|j�|�}	|jj|||�|�|j|j||� |�|j|j|	d�
dS)Nzjin 'ext_modules' option (extension '%s'), 'sources' must be present and must be a list of source filenamesZnewerz$skipping '%s' extension (up-to-date)zbuilding '%s' extension)Z
output_dirrur+r�extra_postargs�depends)r.r/r�r��export_symbolsrr)Ztarget_lang)!rqrNrvryrwrZr�r�r rr
r�info�swig_sourcesrsr�r�rVr2�compiler)r+Z_built_objectsrrrYrt�languageZdetect_languageZlink_shared_object�
get_librariesr/r��get_export_symbols)
r8r�rq�ext_pathr�Z
extra_argsrur-Zobjectsr�rrrr��sX��


�
�zbuild_ext.build_extensioncCs$g}g}i}|jrt�d�|js6d|jks6d|jkr<d}nd}|D]P}tj�|�\}}	|	dkr�|�|d|�|�|�|d||<qD|�|�qD|s�|S|jp�|�	�}
|
dg}|�
|j�|jr�|�d�|js�|jD]}|�|�q�|D].}||}
t�d	||
�|�|d
|
|g�q�|S)z�Walk the list of source files in 'sources', looking for SWIG
        interface (.i) files.  Run SWIG on all that are found, and
        return a modified 'sources' list with SWIG source files replaced
        by the generated C (or C++) files.
        z/--swig-cpp is deprecated - use --swig-opts=-c++z-c++z.cppz.cz.i�_wrap���z-pythonzswigging %s to %sz-o)
r4r
r{r5rQrW�splitextrVr3�	find_swigrYr�Zspawn)r8rq�	extensionZnew_sourcesr�Zswig_targetsZ
target_ext�source�baser�r3Zswig_cmd�o�targetrrrr�1s@
�


zbuild_ext.swig_sourcescCs^tjdkrdStjdkrLdD]*}tj�d|d�}tj�|�r|SqdStdtj��dS)	z�Return the name of the SWIG executable.  On Unix, this is
        just "swig" -- it should be in the PATH.  Tries a bit harder on
        Windows.
        �posixr3r<)z1.3z1.2z1.1z	c:\swig%szswig.exez>I don't know how to find (much less run) SWIG on platform '%s'N)rQrZrWrX�isfileZDistutilsPlatformError)r8Zvers�fnrrrr�gs


��zbuild_ext.find_swigcCs�|�|�}|�d�}|�|d�}|jsRtjj|dd�|g�}tj�|j|�Sd�|dd��}|�d�}tj�	|�
|��}tj�||�S)z�Returns the path of the filename for a given extension.

        The file is located in `build_lib` or directly in the package
        (inplace option).
        rEr�Nr�build_py)�get_ext_fullnamerP�get_ext_filenamerrQrWrXr'rk�abspathZget_package_dir)r8r��fullname�modpath�filenamer*r�Zpackage_dirrrrr�s


zbuild_ext.get_ext_fullpathcCs |jdkr|S|jd|SdS)zSReturns the fullname of a given extension name.

        Adds the `package.` prefixNrE)r*)r8r�rrrr��s
zbuild_ext.get_ext_fullnamecCs.ddlm}|�d�}|d�}tjj|�|S)z�Convert the name of an extension (eg. "foo.bar") into the name
        of the file from which it will be loaded (eg. "foo/bar.so", or
        "foo\bar.pyd").
        r�rarEZ
EXT_SUFFIX)�distutils.sysconfigrarPrQrWrX)r8r�rar�Z
ext_suffixrrrr��s
zbuild_ext.get_ext_filenamecCsxd|j�d�d}z|�d�Wn0tk
rRd|�d��dd��d�}YnXd	|}||jkrr|j�|�|jS)
aReturn the list of symbols that a shared extension has to
        export.  This either uses 'ext.export_symbols' or, if it's not
        provided, "PyInit_" + module_name.  Only relevant on Windows, where
        the .pyd file (DLL) must export the module "PyInit_" function.
        �_rEr��asciirZpunycode�-�_ZPyInit)rZrP�encode�UnicodeEncodeError�replace�decoder�rV)r8r�reZ
initfunc_namerrrr��s"
zbuild_ext.get_export_symbolscCs�tjdkr^ddlm}t|j|�s�d}|jr4|d}|tjd?tjd?d@f}|j|gSn�dd	l	m
}d
}|d�r�ttd�r�d
}n<tjdkr�d
}n,dtj
kr�|d�dkr�d
}n|d�dkr�d
}|r�|d�}|jd|gS|jS)z�Return the list of libraries to link against when building a
        shared extension.  On most platforms, this is just 'ext.libraries';
        on Windows, we add the Python library (eg. python20.dll).
        r>r)�MSVCCompilerz
python%d%dZ_d���r�FrFZgetandroidapilevelTrAZ_PYTHON_HOST_PLATFORMZANDROID_API_LEVELZMACHDEPZ	LDVERSIONrD)rSr^Zdistutils._msvccompilerr�rNr2r�
hexversionr.r�ra�hasattrrQ�environ)r8r�r��templateZ	pythonlibraZlink_libpythonZ	ldversionrrrr��s4

�



zbuild_ext.get_libraries) �__name__�
__module__�__qualname__ZdescriptionrQrRZsep_byr	Zuser_optionsZboolean_optionsr
Zhelp_optionsr9rfror�r�r�rlr�r��
contextlib�contextmanagerr�r�r�r�r�r�r�r�r�rrrrr!sp
�����+��@N	
	K6	
r)�__doc__r�rQ�rerSZdistutils.corerZdistutils.errorsr�rrrZdistutils.dep_utilrZdistutils.extensionrZdistutils.utilr	rLr
Zsiterr�r|r
rrrrr�<module>s$�PKX[Q��N�'�')command/__pycache__/config.cpython-38.pycnu�[���U

e5d=3�@sldZddlZddlZddlmZddlmZddlmZddl	m
Z
ddd	�ZGd
d�de�Zddd
�Z
dS)a�distutils.command.config

Implements the Distutils 'config' command, a (mostly) empty command class
that exists mainly to be sub-classed by specific module distributions and
applications.  The idea is that while every "config" command is different,
at least they're all named the same, and users always see "config" in the
list of standard commands.  Also, this is a good place to put common
configure-like tasks: "try to compile this C code", or "figure out where
this header file lives".
�N)�Command)�DistutilsExecError)�customize_compiler)�logz.cz.cxx)�czc++c	@s�eZdZdZdddddddd	d
g	Zdd�Zd
d�Zdd�Zdd�Zdd�Z	dd�Z
dd�Zdd�Zdd�Z
d0dd �Zd1d!d"�Zd2d#d$�Zd3d%d&�Zd4d'd(�Zd5d*d+�Zdddgfd,d-�Zd6d.d/�ZdS)7�configzprepare to build)z	compiler=Nzspecify the compiler type)zcc=Nzspecify the compiler executable)z
include-dirs=�Iz.list of directories to search for header files)zdefine=�DzC preprocessor macros to define)zundef=�Uz!C preprocessor macros to undefine)z
libraries=�lz!external C libraries to link with)z
library-dirs=�Lz.directories to search for external C libraries)�noisyNz1show every action (compile, link, run, ...) taken)zdump-sourceNz=dump generated source files before attempting to compile themcCs4d|_d|_d|_d|_d|_d|_d|_g|_dS)N�)�compilerZcc�include_dirs�	libraries�library_dirsr
�dump_source�
temp_files��self�r�0/usr/lib64/python3.8/distutils/command/config.py�initialize_options3szconfig.initialize_optionscCs�|jdkr|jjpg|_nt|jt�r6|j�tj�|_|jdkrHg|_nt|jt�r^|jg|_|jdkrpg|_nt|jt�r�|j�tj�|_dS�N)	rZdistribution�
isinstance�str�split�os�pathseprrrrrr�finalize_optionsBs



zconfig.finalize_optionscCsdSrrrrrr�runRsz
config.runcCszddlm}m}t|j|�sv||j|jdd�|_t|j�|jrN|j�|j�|j	rb|j�
|j	�|jrv|j�|j�dS)z^Check that 'self.compiler' really is a CCompiler object;
        if not, make it one.
        r)�	CCompiler�new_compilerr)r�dry_runZforceN)
�distutils.ccompilerr"r#rrr$rrZset_include_dirsrZ
set_librariesrZset_library_dirs)rr"r#rrr�_check_compilerYs�
zconfig._check_compilerc	Csldt|}t|d��L}|r>|D]}|�d|�q |�d�|�|�|ddkr^|�d�W5QRX|S)NZ_configtest�wz#include <%s>
�
���)�LANG_EXT�open�write)r�body�headers�lang�filename�file�headerrrr�_gen_temp_sourcefileks

zconfig._gen_temp_sourcefilecCs<|�|||�}d}|j�||g�|jj|||d�||fS)Nz
_configtest.i�r)r3r�extendrZ
preprocess)rr-r.rr/�src�outrrr�_preprocessws
zconfig._preprocesscCs\|�|||�}|jr"t|d|�|j�|g�\}|j�||g�|jj|g|d�||fS)Nzcompiling '%s':r4)r3r�	dump_filerZobject_filenamesrr5�compile)rr-r.rr/r6�objrrr�_compile~szconfig._compilec
Csr|�||||�\}}tj�tj�|��d}	|jj|g|	|||d�|jjdk	r\|	|jj}	|j�	|	�|||	fS)Nr)rrZtarget_lang)
r<r�path�splitext�basenamerZlink_executableZ
exe_extensionr�append)
rr-r.rrrr/r6r;�progrrr�_link�s�zconfig._linkc	GsT|s|j}g|_t�dd�|��|D](}zt�|�Wq&tk
rLYq&Xq&dS)Nzremoving: %s� )rr�info�joinr�remove�OSError)r�	filenamesr0rrr�_clean�sz
config._cleanNrcCsRddlm}|��d}z|�||||�Wn|k
rDd}YnX|��|S)aQConstruct a source file from 'body' (a string containing lines
        of C/C++ code) and 'headers' (a list of header files to include)
        and run it through the preprocessor.  Return true if the
        preprocessor succeeded, false if there were any errors.
        ('body' probably isn't of much use, but what the heck.)
        r��CompileErrorTF)r%rKr&r8rI�rr-r.rr/rK�okrrr�try_cpp�s
zconfig.try_cppc	Csx|��|�||||�\}}t|t�r0t�|�}t|��.}d}	|��}
|
dkrPqb|�|
�r>d}	qbq>W5QRX|�	�|	S)a�Construct a source file (just like 'try_cpp()'), run it through
        the preprocessor, and return true if any line of the output matches
        'pattern'.  'pattern' should either be a compiled regex object or a
        string containing a regex.  If both 'body' and 'headers' are None,
        preprocesses an empty file -- which can be useful to determine the
        symbols the preprocessor and compiler set by default.
        F�T)
r&r8rr�rer:r+�readline�searchrI)r�patternr-r.rr/r6r7r1�match�linerrr�
search_cpp�s	



zconfig.search_cppcCsdddlm}|��z|�||||�d}Wn|k
rDd}YnXt�|rRdpTd�|��|S)zwTry to compile a source file built from 'body' and 'headers'.
        Return true on success, false otherwise.
        rrJTF�success!�failure.)r%rKr&r<rrDrIrLrrr�try_compile�s
zconfig.try_compilec
	Cspddlm}m}|��z|�||||||�d}	Wn||fk
rPd}	YnXt�|	r^dp`d�|��|	S)z�Try to compile and link a source file, built from 'body' and
        'headers', to executable form.  Return true on success, false
        otherwise.
        r�rK�	LinkErrorTFrWrX)r%rKr[r&rBrrDrI)
rr-r.rrrr/rKr[rMrrr�try_link�s
�
zconfig.try_linkc

Cs�ddlm}m}|��z.|�||||||�\}	}
}|�|g�d}Wn||tfk
rdd}YnXt�|rrdptd�|�	�|S)z�Try to compile, link to an executable, and run a program
        built from 'body' and 'headers'.  Return true on success, false
        otherwise.
        rrZTFrWrX)
r%rKr[r&rBZspawnrrrDrI)
rr-r.rrrr/rKr[r6r;ZexerMrrr�try_run�s
�

zconfig.try_runrc	Cst|��g}|r|�d|�|�d�|r<|�d|�n|�d|�|�d�d�|�d}|�|||||�S)a�Determine if function 'func' is available by constructing a
        source file that refers to 'func', and compiles and links it.
        If everything succeeds, returns true; otherwise returns false.

        The constructed source file starts out by including the header
        files listed in 'headers'.  If 'decl' is true, it then declares
        'func' (as "int func()"); you probably shouldn't supply 'headers'
        and set 'decl' true in the same call, or you might get errors about
        a conflicting declarations for 'func'.  Finally, the constructed
        'main()' function either references 'func' or (if 'call' is true)
        calls it.  'libraries' and 'library_dirs' are used when
        linking.
        z
int %s ();z
int main () {z  %s();z  %s;�}r()r&r@rEr\)	r�funcr.rrrZdeclZcallr-rrr�
check_funcs


�zconfig.check_funccCs |��|�d|||g||�S)a�Determine if 'library' is available to be linked against,
        without actually checking that any particular symbols are provided
        by it.  'headers' will be used in constructing the source file to
        be compiled, but the only effect of this is to check if all the
        header files listed are available.  Any libraries listed in
        'other_libraries' will be included in the link, in case 'library'
        has symbols that depend on other libraries.
        zint main (void) { })r&r\)rZlibraryrr.rZother_librariesrrr�	check_lib4s


�zconfig.check_libcCs|jd|g|d�S)z�Determine if the system header file named by 'header_file'
        exists and can be found by the preprocessor; return true if so,
        false otherwise.
        z
/* No body */)r-r.r)rN)rr2rrr/rrr�check_headerBs
�zconfig.check_header)NNNr)NNNr)NNr)NNNNr)NNNNr)NNNNrr)NNr)�__name__�
__module__�__qualname__ZdescriptionZuser_optionsrr r!r&r3r8r<rBrIrNrVrYr\r]r`rarbrrrrrs\�	
�

�
�
�
�
�rcCsJ|dkrt�d|�n
t�|�t|�}zt�|���W5|��XdS)zjDumps a file content into log.info.

    If head is not None, will be dumped before the file content.
    Nz%s)rrDr+�close�read)r0�headr1rrrr9Ks
r9)N)�__doc__rrPZdistutils.corerZdistutils.errorsrZdistutils.sysconfigrZ	distutilsrr*rr9rrrr�<module>s
8PKX[}�Q
++(command/__pycache__/build.cpython-38.pycnu�[���U

e5d��@sTdZddlZddlZddlmZddlmZddlmZdd�Z	Gdd	�d	e�Z
dS)
zBdistutils.command.build

Implements the Distutils 'build' command.�N)�Command)�DistutilsOptionError)�get_platformcCsddlm}|�dS)Nr��show_compilers)Zdistutils.ccompilerrr�r�//usr/lib64/python3.8/distutils/command/build.pyrsrc@s�eZdZdZdddddddd	d
e�fddd
ddgZddgZdddefgZdd�Z	dd�Z
dd�Zdd�Zdd�Z
dd �Zd!d"�Zd#efd$e
fd%efd&efgZdS)'�buildz"build everything needed to install)zbuild-base=�bz base directory for build library)zbuild-purelib=Nz2build directory for platform-neutral distributions)zbuild-platlib=Nz3build directory for platform-specific distributions)z
build-lib=NzWbuild directory for all distribution (defaults to either build-purelib or build-platlib)zbuild-scripts=Nzbuild directory for scripts)zbuild-temp=�tztemporary build directoryz
plat-name=�pz6platform name to build for, if supported (default: %s))z	compiler=�czspecify the compiler type)z	parallel=�jznumber of parallel build jobs)�debug�gz;compile extensions and libraries with debugging information)�force�fz2forcibly build everything (ignore file timestamps))zexecutable=�ez5specify final destination interpreter path (build.py)rrz
help-compilerNzlist available compilerscCsLd|_d|_d|_d|_d|_d|_d|_d|_d|_d|_	d|_
d|_dS)Nr	r)�
build_base�
build_purelib�
build_platlib�	build_lib�
build_temp�
build_scriptsZcompiler�	plat_namerr�
executable�parallel��selfrrr�initialize_options8szbuild.initialize_optionscCsb|jdkrt�|_ntjdkr&td��d|jftjdd��}ttd�rR|d7}|jdkrntj	�
|jd�|_|jdkr�tj	�
|jd|�|_|j
dkr�|jjr�|j|_
n|j|_
|jdkr�tj	�
|jd|�|_|jdkr�tj	�
|jd	tjdd��|_|jdk�r tj�r tj	�tj�|_t|jt��r^zt|j�|_Wntk
�r\td
��YnXdS)N�ntzW--plat-name only supported on Windows (try using './configure --help' on your platform)z	.%s-%d.%d�Zgettotalrefcountz-pydebug�libZtempz
scripts-%d.%dzparallel should be an integer)rr�os�namer�sys�version_info�hasattrr�path�joinrrr�distributionZext_modulesrrr�normpath�
isinstancer�str�int�
ValueError)rZplat_specifierrrr�finalize_optionsHsD


�



�



�

�zbuild.finalize_optionscCs|��D]}|�|�qdS�N)Zget_sub_commandsZrun_command)rZcmd_namerrr�run�sz	build.runcCs
|j��Sr1)r*�has_pure_modulesrrrrr3�szbuild.has_pure_modulescCs
|j��Sr1)r*�has_c_librariesrrrrr4�szbuild.has_c_librariescCs
|j��Sr1)r*�has_ext_modulesrrrrr5�szbuild.has_ext_modulescCs
|j��Sr1)r*�has_scriptsrrrrr6�szbuild.has_scriptsZbuild_pyZ
build_clibZ	build_extr)�__name__�
__module__�__qualname__ZdescriptionrZuser_optionsZboolean_optionsrZhelp_optionsrr0r2r3r4r5r6Zsub_commandsrrrrr	sH�����8�r	)�__doc__r%r#Zdistutils.corerZdistutils.errorsrZdistutils.utilrrr	rrrr�<module>sPKX[{�����1command/__pycache__/__init__.cpython-38.opt-2.pycnu�[���U

e5d�@s.dddddddddd	d
ddd
dddddgZdS)ZbuildZbuild_pyZ	build_extZ
build_clibZ
build_scriptsZcleanZinstallZinstall_libZinstall_headersZinstall_scriptsZinstall_dataZsdist�registerZbdistZ
bdist_dumbZ	bdist_rpmZ
bdist_wininstZcheckZuploadN)�__all__�rr�2/usr/lib64/python3.8/distutils/command/__init__.py�<module>s&�PKX[��o��4command/__pycache__/install_lib.cpython-38.opt-2.pycnu�[���U

e5d� �@sHddlZddlZddlZddlmZddlmZdZGdd�de�Z	dS)�N)�Command)�DistutilsOptionErrorz.pyc@s�eZdZdZdddddddgZd	d
dgZdd
iZd
d�Zdd�Zdd�Z	dd�Z
dd�Zdd�Zdd�Z
dd�Zdd�Zdd �Zd!S)"�install_libz7install all Python modules (extensions and pure Python))zinstall-dir=�dzdirectory to install to)z
build-dir=�bz'build directory (where to install from))�force�fz-force installation (overwrite existing files))�compile�czcompile .py to .pyc [default])�
no-compileNzdon't compile .py files)z	optimize=�Ozlalso compile with optimization: -O1 for "python -O", -O2 for "python -OO", and -O0 to disable [default: -O0])�
skip-buildNzskip the build stepsrr	r
rcCs(d|_d|_d|_d|_d|_d|_dS)Nr)�install_dir�	build_dirrr	�optimize�
skip_build��self�r�5/usr/lib64/python3.8/distutils/command/install_lib.py�initialize_options3szinstall_lib.initialize_optionsc	Cs�|�ddddddd�|jdkr&d|_|jdkr6d	|_t|jt�s�zt|j�|_|jd
kr^t�Wn ttfk
r�td��YnXdS)N�install)�	build_libr)rr)rr)r	r	)rr)rrTF)r��zoptimize must be 0, 1, or 2)Zset_undefined_optionsr	r�
isinstance�int�AssertionError�
ValueErrorrrrrr�finalize_options<s&�	


zinstall_lib.finalize_optionscCs0|��|��}|dk	r,|j��r,|�|�dS�N)�buildr�distribution�has_pure_modules�byte_compile�rZoutfilesrrr�runVszinstall_lib.runcCs2|js.|j��r|�d�|j��r.|�d�dS�N�build_py�	build_ext)rr"r#Zrun_command�has_ext_modulesrrrrr!fs



zinstall_lib.buildcCs8tj�|j�r |�|j|j�}n|�d|j�dS|S)Nz3'%s' does not exist -- no Python modules to install)�os�path�isdirrZ	copy_treer�warnr%rrrrms�zinstall_lib.installcCsrtjr|�d�dSddlm}|�d�j}|jrH||d|j||j	d�|j
dkrn|||j
|j||j|j	d�dS)Nz%byte-compiling is disabled, skipping.r)r$r)rr�prefix�dry_run)rrr/�verboser0)�sys�dont_write_bytecoder.Zdistutils.utilr$�get_finalized_command�rootr	rr0rr1)r�filesr$Zinstall_rootrrrr$vs$
�
�zinstall_lib.byte_compilec
	Csd|sgS|�|�}|��}t||�}t|�ttj�}g}|D] }	|�tj�||	|d���q>|Sr )	r4�get_outputs�getattr�lenr+�sep�appendr,�join)
rZhas_anyZ	build_cmdZ
cmd_optionZ
output_dirZbuild_filesr�
prefix_lenZoutputs�filerrr�_mutate_outputs�s

zinstall_lib._mutate_outputscCsrg}|D]d}tj�tj�|��d}|tkr.q|jrJ|�tjj	|dd��|j
dkr|�tjj	||j
d��q|S)Nr�)�optimizationr)r+r,�splitext�normcase�PYTHON_SOURCE_EXTENSIONr	r;�	importlib�util�cache_from_sourcer)rZpy_filenamesZbytecode_filesZpy_fileZextrrr�_bytecode_filenames�s 
�

�
zinstall_lib._bytecode_filenamescCsR|�|j��dd|j�}|jr*|�|�}ng}|�|j��dd|j�}|||S)Nr(rr))r?r"r#rr	rHr*)rZpure_outputsZbytecode_outputsZext_outputsrrrr7�s ����zinstall_lib.get_outputscCsLg}|j��r&|�d�}|�|���|j��rH|�d�}|�|���|Sr')r"r#r4�extendr7r*)rZinputsr(r)rrr�
get_inputs�s



zinstall_lib.get_inputsN)�__name__�
__module__�__qualname__ZdescriptionZuser_optionsZboolean_optionsZnegative_optrrr&r!rr$r?rHr7rJrrrrrs*�
		r)
r+�importlib.utilrEr2Zdistutils.corerZdistutils.errorsrrDrrrrr�<module>sPKX[^�+!+!0command/__pycache__/bdist_wininst.cpython-38.pycnu�[���U

e5d�>�@sxdZddlZddlZddlZddlmZddlmZddlm	Z	m
Z
ddlTddlm
Z
ddlmZGd	d
�d
e�ZdS)zzdistutils.command.bdist_wininst

Implements the Distutils 'bdist_wininst' command: create a windows installer
exe-program.�N)�Command)�get_platform)�create_tree�remove_tree)�*)�get_python_version)�logc
s�eZdZdZdddde�fdddd	d
ddd
dddg
ZddddgZejdkZ	�fdd�Z
dd�Zdd�Zdd�Z
dd�Zd'd!d"�Zd#d$�Zd%d&�Z�ZS)(�
bdist_wininstz-create an executable installer for MS Windows)z
bdist-dir=Nz1temporary directory for creating the distributionz
plat-name=�pz;platform name to embed in generated filenames (default: %s))�	keep-temp�kzPkeep the pseudo-installation tree around after creating the distribution archive)ztarget-version=Nz6require a specific python version on the target system)�no-target-compile�cz/do not compile .py to .pyc on the target system)�no-target-optimize�oz;do not compile .py to .pyo (optimized) on the target system)z	dist-dir=�dz-directory to put final built distributions in)zbitmap=�bz>bitmap to use for the installer instead of python-powered logo)ztitle=�tz?title to display on the installer background instead of default)�
skip-buildNz2skip rebuilding everything (for testing/debugging))zinstall-script=NzUbasename of installation script to be run after installation or before deinstallation)zpre-install-script=Nz{Fully qualified filename of a script to be run before any files are installed.  This script need not be in the distribution)zuser-access-control=Nz�specify Vista's UAC handling - 'none'/default=no handling, 'auto'=use UAC if target Python installed for all users, 'force'=always use UACrr
rr�win32cs t�j||�t�dtd�dS)Nz^bdist_wininst command is deprecated since Python 3.8, use bdist_wheel (wheel packages) instead�)�super�__init__�warnings�warn�DeprecationWarning)�self�args�kw��	__class__��7/usr/lib64/python3.8/distutils/command/bdist_wininst.pyr?s
�zbdist_wininst.__init__cCsRd|_d|_d|_d|_d|_d|_d|_d|_d|_d|_	d|_
d|_d|_dS)Nr)
�	bdist_dir�	plat_name�	keep_temp�no_target_compile�no_target_optimize�target_version�dist_dir�bitmap�title�
skip_build�install_script�pre_install_script�user_access_control)rr!r!r"�initialize_optionsEsz bdist_wininst.initialize_optionscCs�|�dd�|jdkrR|jr6|jr6|j�d�}|j|_|�d�j}tj	�
|d�|_|js^d|_|js�|j��r�t
�}|jr�|j|kr�td|f��||_|�ddd�|jr�|jjD]}|jtj	�|�kr�q�q�td|j��dS)	N�bdist)r,r,Zwininst�zMtarget version can only be %s, or the '--skip-build' option must be specified)r)r))r$r$z(install_script '%s' not found in scripts)Zset_undefined_optionsr#r,r$�distributionZget_command_obj�get_finalized_command�
bdist_base�os�path�joinr(�has_ext_modulesrZDistutilsOptionErrorr-�scripts�basename)rr1r5Z
short_version�scriptr!r!r"�finalize_optionsUs>
�����zbdist_wininst.finalize_optionsc
Cs�tjdkr&|j��s|j��r&td��|js6|�d�|jddd�}|j	|_
|j|_d|_|j|_|�d�}d|_
d|_|j��r�|j}|s�|js�td	��d
tjdd�}d|j|f}|�d�}tj�|jd
|�|_dD],}|��}|dkr�|d}t|d||�q�t�d|j	�|��tj�dtj�|j	d��|��tjd=ddlm }|�}	|j�!�}
|j"|	d|j	d�}|�#||
|j$�|j���r�t%�}nd}|jj&�'d||�(|
�f�t�)d|�t�*|�|j+�s�t,|j	|j-d�dS)Nrz^distribution contains extensions and/or C libraries; must be compiled on a Windows 32 platform�build�install�)Zreinit_subcommandsr�install_libz Should have already checked thisz%d.%drz.%s-%s�lib)ZpurelibZplatlib�headersr:�datarCz/Include/$dist_nameZinstall_zinstalling to %sZPURELIB)�mktemp�zip)Zroot_dir�anyr	zremoving temporary file '%s')�dry_run).�sys�platformr3r9Zhas_c_librariesZDistutilsPlatformErrorr,Zrun_commandZreinitialize_commandr#�rootZwarn_dirr$�compile�optimizer(�AssertionError�version_infor4r6r7r8Z
build_baseZ	build_lib�upper�setattrr�infoZensure_finalized�insert�runZtempfilerE�get_fullnameZmake_archive�
create_exer*rZ
dist_files�append�get_installer_filename�debug�remover%rrH)
rr?rAr(Zplat_specifierr>�key�valuerEZarchive_basename�fullname�arcnameZ	pyversionr!r!r"rT{st
���




��
��
zbdist_wininst.runcCsZg}|jj}|�d�|jpdd}dd�}dD]B}t||d�}|r0|d|��||�f}|�d|||�f�q0|�d	�|jr�|�d
|j�|�d||��|�d|j�|�d
|j�|j	r�|�d|j	�|j
r�|�d|j
�|j�p|j��}|�d||��ddl
}ddl}	d|�|�
��|	jf}
|�d|
�d�|�S)Nz
[metadata]r2�
cSs|�dd�S)Nr_z\n)�replace)�sr!r!r"�escape�sz)bdist_wininst.get_inidata.<locals>.escape)ZauthorZauthor_email�descriptionZ
maintainerZmaintainer_email�nameZurl�versionz
    %s: %sz%s=%sz
[Setup]zinstall_script=%szinfo=%sztarget_compile=%dztarget_optimize=%dztarget_version=%szuser_access_control=%sztitle=%srzBuilt %s with distutils-%sz
build_info=%s)r3�metadatarWZlong_description�getattr�
capitalizer-r&r'r(r/r+rU�time�	distutils�ctime�__version__r8)r�linesrfrRrbrdrDr+rirjZ
build_infor!r!r"�get_inidata�s>
�
�zbdist_wininst.get_inidataNc
CsHddl}|�|j�|��}|�|�}|�d|�|r`t|d��}|��}W5QRXt|�}	nd}	t|d���}
|
�	|�
��|r�|
�	|�t|t�r�|�
d�}|d}|jr�t|jddd	��}|���
d�}W5QRX||d
}n|d}|
�	|�|�ddt|�|	�}
|
�	|
�t|d��}|
�	|���W5QRXW5QRXdS)
Nrzcreating %s�rb�wb�mbcs��rzlatin-1)�encodings
z<iiii{V4)�structZmkpathr)rnrXZannounce�open�read�len�write�
get_exe_bytes�
isinstance�str�encoder.Zpack)rr^r]r*ruZcfgdata�installer_name�fZ
bitmapdataZ	bitmaplen�filer<Zscript_data�headerr!r!r"rV�sD




�
�
zbdist_wininst.create_execCsD|jr&tj�|jd||j|jf�}ntj�|jd||jf�}|S)Nz%s.%s-py%s.exez	%s.%s.exe)r(r6r7r8r)r$)rr]r~r!r!r"rX1s
��
�z$bdist_wininst.get_installer_filenamec	Cs$t�}|jrl|j|krl|jdkr&d}q�|jdkr6d}q�|jdkrFd}q�|jdkrVd}q�|jdkrfd	}q�d
}n@zddlm}Wntk
r�d
}YnX|�d
�d}|d}tj�t	�}|j
dkr�|j
dd�dkr�|j
dd�}nd}tj�|d||f�}t|d�}z|��W�S|�
�XdS)Nz2.4z6.0z7.1z2.5z8.0z3.2z9.0z3.4z10.0z14.0r)�CRT_ASSEMBLY_VERSION�.z.0r��winr2zwininst-%s%s.exero)rr(Zmsvcrtr��ImportError�	partitionr6r7�dirname�__file__r$r8rv�closerw)	rZcur_versionZbvr��majorZ	directoryZsfix�filenamerr!r!r"rz>s8	






zbdist_wininst.get_exe_bytes)N)�__name__�
__module__�__qualname__rcrZuser_optionsZboolean_optionsrIrJZ_unsupportedrr0r=rTrnrVrXrz�
__classcell__r!r!rr"r	s>���%�
&Q.
7
r	)�__doc__r6rIrZdistutils.corerZdistutils.utilrZdistutils.dir_utilrrZdistutils.errorsZdistutils.sysconfigrrjrr	r!r!r!r"�<module>sPKX[�GX@@/command/__pycache__/upload.cpython-38.opt-1.pycnu�[���U

&�.e��@s�dZddlZddlZddlZddlZddlmZddlmZm	Z	m
Z
ddlmZddl
mZmZddlmZddlmZdd	lmZGd
d�de�ZdS)zm
distutils.command.upload

Implements the Distutils 'upload' subcommand (upload package to a package
index).
�N)�standard_b64encode)�urlopen�Request�	HTTPError)�urlparse)�DistutilsError�DistutilsOptionError)�
PyPIRCCommand)�spawn)�logc@sJeZdZdZejddgZejdgZdd�Zdd�Zd	d
�Z	dd�Z
d
S)�uploadzupload binary package to PyPI)�sign�szsign files to upload using gpg)z	identity=�izGPG identity used to sign filesr
cCs,t�|�d|_d|_d|_d|_d|_dS)N�rF)r	�initialize_options�username�password�
show_responser
�identity)�self�r�0/usr/lib64/python3.8/distutils/command/upload.pyr s
zupload.initialize_optionscCsrt�|�|jr|jstd��|��}|ikrV|d|_|d|_|d|_|d|_	|jsn|j
jrn|j
j|_dS)Nz.Must use --sign for --identity to have meaningrr�
repository�realm)r	�finalize_optionsrr
rZ_read_pypircrrrr�distribution)rZconfigrrrr(s
�



zupload.finalize_optionscCs:|jjsd}t|��|jjD]\}}}|�|||�qdS)NzHMust create and upload files in one command (e.g. setup.py sdist upload))rZ
dist_filesr�upload_file)r�msg�command�	pyversion�filenamerrr�run:s
z
upload.runc"Cst|j�\}}}}}}	|s"|s"|	r0td|j��|dkrDtd|��|jr|ddd|g}
|jrnd|jg|
dd�<t|
|jd	�t|d
�}z|�	�}W5|��X|j
j}
dd|
��|
�
�tj�|�|f||t�|���d
|
��|
��|
��|
��|
��|
��|
��|
��|
��|
��|
��|
��|
� �d�}zt�!|���}WnPt"k
�r�}z0d|}|�#|t$j%�ddl&m'}|��s|�W5d}~XYn
X||d<d|d<|j�r�t|dd
��"}tj�|�d|�	�f|d<W5QRX|j(d|j)�*d�}dt+|��,d�}d}d|�*d�}|d}t-�.�}|�/�D]�\}}d|}t0|t1��sP|g}|D]j}t2|�t3k�r�|d|d7}|d}nt4|��*d �}|�5|�|�5|�*d ��|�5d!�|�5|��qT�q.|�5|�|�6�}d"||jf}|�#|t$j%�d#|t4t7|��|d$�}t8|j||d%�}zt9|�}|�:�}|j;} Wnft<k
�rd}z|j=}|j;} W5d}~XYn8t>k
�r�}z|�#t4|�t$j?��W5d}~XYnX|d&k�r�|�#d'|| ft$j%�|j@�r|�A|�}!d(�Bd)|!d)f�}|�#|t$j%�n"d*|| f}|�#|t$j?�tC|��dS)+NzIncompatible url %s)ZhttpZhttpszunsupported schema Zgpgz
--detach-signz-az--local-user�)�dry_run�rbZfile_upload�1z1.0)z:actionZprotocol_version�name�version�contentZfiletyper Z
sha256_digestZmetadata_versionZsummaryZ	home_pageZauthorZauthor_email�license�description�keywords�platformZclassifiersZdownload_urlZprovidesZrequiresZ	obsoletesz#calculating md5 checksum failed: %sr)�
get_fips_modeZ
md5_digestrZcommentz.ascZ
gpg_signature�:�asciizBasic z3--------------GHSKFJDLGDS7543FJKLFHRE75642756743254s
--s--
z+
Content-Disposition: form-data; name="%s"z; filename="%s"�zutf-8s

zSubmitting %s to %sz multipart/form-data; boundary=%s)zContent-typezContent-lengthZ
Authorization)�data�headers��zServer response (%s): %s�
zK---------------------------------------------------------------------------zUpload failed (%s): %s)Drr�AssertionErrorr
rr
r$�open�close�readrZmetadataZget_nameZget_version�os�path�basename�hashlibZsha256Z	hexdigestZget_descriptionZget_urlZget_contactZget_contact_emailZget_licenceZget_long_descriptionZget_keywordsZ
get_platformsZget_classifiersZget_download_urlZget_providesZget_requiresZ
get_obsoletesZmd5�
ValueErrorZannouncer�INFOZ_hashlibr.rr�encoder�decode�io�BytesIO�items�
isinstance�list�type�tuple�str�write�getvalue�lenrrZgetcoderr�code�OSErrorZERRORrZ_read_pypi_response�joinr)"rrr r!ZschemaZnetlocZurlZparamsZqueryZ	fragmentsZgpg_args�fr)�metar2Zdigest�err.Z	user_passZauth�boundaryZsep_boundaryZend_boundaryZbody�key�value�titler3Zrequest�resultZstatus�reason�textrrrrBs���

�!�




��

�
zupload.upload_fileN)�__name__�
__module__�__qualname__r+r	Zuser_optionsZboolean_optionsrrr"rrrrrrs�r)�__doc__r:rBr-r=�base64rZurllib.requestrrrZurllib.parserZdistutils.errorsrrZdistutils.corer	Zdistutils.spawnr
Z	distutilsrrrrrr�<module>sPKX[�ώ\\6command/__pycache__/build_scripts.cpython-38.opt-2.pycnu�[���U

e5dX�@s�ddlZddlZddlmZddlmZddlmZddlm	Z	ddl
mZmZddlm
Z
ddlZe�d�ZGd	d
�d
e�ZGdd�dee�ZdS)
�N)�ST_MODE)�	sysconfig)�Command)�newer)�convert_path�	Mixin2to3)�logs^#!.*python[0-9.]*([ 	].*)?$c@sHeZdZdZdddgZdgZdd�Zdd	�Zd
d�Zdd
�Z	dd�Z
dS)�
build_scriptsz("build" scripts (copy and fixup #! line))z
build-dir=�dzdirectory to "build" (copy) to)�force�fz1forcibly build everything (ignore file timestamps)zexecutable=�ez*specify final destination interpreter pathrcCs"d|_d|_d|_d|_d|_dS�N)�	build_dir�scriptsr�
executable�outfiles��self�r�7/usr/lib64/python3.8/distutils/command/build_scripts.py�initialize_optionss
z build_scripts.initialize_optionscCs|�dddd�|jj|_dS)NZbuild)r	r)rr)rr)Zset_undefined_optionsZdistributionrrrrr�finalize_options%s�zbuild_scripts.finalize_optionscCs|jSr)rrrrr�get_source_files,szbuild_scripts.get_source_filescCs|js
dS|��dSr)r�copy_scriptsrrrr�run/szbuild_scripts.runc
Cs�|�|j�g}g}|jD�]}d}t|�}tj�|jtj�|��}|�|�|j	slt
||�slt�d|�qzt
|d�}Wn tk
r�|js��d}YnXXt�|j�\}}|�d�|��}	|	s�|�d|�qt�|	�}
|
r�d}|
�d�p�d}|�rt�d	||j�|�|�|j�stj�s*|j}n(tj�t�d
�dt�d�t�d
�f�}t�|�}d||d}
z|
�d�Wn$tk
�r�t d�!|
���YnXz|
�|�Wn&tk
�r�t d�!|
|���YnXt
|d��}|�"|
�|�#|�$��W5QRX|�r8|�%�q|�r"|�%�|�|�|�&||�qtj'dk�r�|D]`}|j�rdt�d|�nDt�(|�t)d@}|dBd@}||k�rJt�d|||�t�*||��qJ||fS)NFznot copying %s (up-to-date)�rbrz%s is an empty file (skipping)T��zcopying and adjusting %s -> %sZBINDIRz
python%s%sZVERSIONZEXEs#!�
zutf-8z.The shebang ({!r}) is not decodable from utf-8zAThe shebang ({!r}) is not decodable from the script encoding ({})�wb�posixzchanging mode of %si�imz!changing mode of %s from %o to %o)+Zmkpathrrr�os�path�join�basename�appendrrr�debug�open�OSError�dry_run�tokenize�detect_encoding�readline�seek�warn�
first_line_re�match�group�inforZpython_buildrZget_config_var�fsencode�decode�UnicodeDecodeError�
ValueError�format�write�
writelines�	readlines�closeZ	copy_file�name�statr�chmod)rr�
updated_filesZscriptZadjustZoutfiler�encoding�linesZ
first_liner1Zpost_interprZshebangZoutf�fileZoldmodeZnewmoderrrr5s�



�

��
��
��




�zbuild_scripts.copy_scriptsN)�__name__�
__module__�__qualname__ZdescriptionZuser_optionsZboolean_optionsrrrrrrrrrr	s�r	c@seZdZdd�ZdS)�build_scripts_2to3cCs&t�|�\}}|js|�|�||fSr)r	rr*Zrun_2to3)rrr@rrrr�s
zbuild_scripts_2to3.copy_scriptsN)rDrErFrrrrrrG�srG)r"�rer>rZ	distutilsrZdistutils.corerZdistutils.dep_utilrZdistutils.utilrrrr+�compiler0r	rGrrrr�<module>s

PKX[~�LFLF2command/__pycache__/bdist_msi.cpython-38.opt-2.pycnu�[���U

e5d߉�@s�ddlZddlZddlmZddlmZddlmZddlm	Z	ddl
mZddlm
Z
ddlmZddlZdd	lmZmZmZdd
lmZmZmZmZGdd�de�ZGd
d�de�ZdS)�N)�Command)�remove_tree)�get_python_version)�
StrictVersion)�DistutilsOptionError)�get_platform)�log)�schema�sequence�text)�	Directory�Feature�Dialog�add_datac@sBeZdZdd�Zdd�Zddd�Zdd
d�Zdd
d�Zdd�ZdS)�PyDialogcOs>tj|f|��|jd}d|d}|�dd||jd�dS)N�$�iHZ
BottomLiner)r�__init__�h�line�w)�self�args�kwZrulerZbmwidth�r�3/usr/lib64/python3.8/distutils/command/bdist_msi.pyrs
zPyDialog.__init__c
Cs|�ddddddd|�dS)N�Title��
�@�<�z{\VerdanaBold10}%s)r)r�titlerrrr"#s�zPyDialog.title�Back�c
Cs,|r
d}nd}|�|d|jddd|||�S)N�r$���8���
pushbuttonr�rr"�next�name�active�flagsrrr�back*sz
PyDialog.back�Cancelc
Cs,|r
d}nd}|�|d|jddd|||�S)Nr%r$i0r'r(r)r*r,rrr�cancel5szPyDialog.cancel�Nextc
Cs,|r
d}nd}|�|d|jddd|||�S)Nr%r$��r'r(r)r*r,rrrr-@sz
PyDialog.nextc
Cs,|�|t|j|d�|jdddd||�S)N�r'r(r)r%)r+�intrr)rr.r"r-Zxposrrr�xbuttonKszPyDialog.xbuttonN)r#r$)r2r$)r4r$)	�__name__�
__module__�__qualname__rr"r1r3r-r8rrrrrs



rc@s�eZdZdZdddde�fdddd	d
ddd
g
ZddddgZddddddddddddddd d!d"d#d$d%gZd&Zd'd(�Z	d)d*�Z
d+d,�Zd-d.�Zd/d0�Z
d1d2�Zd3d4�Zd5d6�Zd7S)8�	bdist_msiz7create a Microsoft Installer (.msi) binary distribution)z
bdist-dir=Nz1temporary directory for creating the distributionz
plat-name=�pz;platform name to embed in generated filenames (default: %s))�	keep-temp�kzPkeep the pseudo-installation tree around after creating the distribution archive)ztarget-version=Nz6require a specific python version on the target system)�no-target-compile�cz/do not compile .py to .pyc on the target system)�no-target-optimize�oz;do not compile .py to .pyo (optimized) on the target system)z	dist-dir=�dz-directory to put final built distributions in)�
skip-buildNz2skip rebuilding everything (for testing/debugging))zinstall-script=NzUbasename of installation script to be run after installation or before deinstallation)zpre-install-script=Nz{Fully qualified filename of a script to be run before any files are installed.  This script need not be in the distributionr>r@rBrEz2.0z2.1z2.2z2.3z2.4z2.5z2.6z2.7z2.8z2.9z3.0z3.1z3.2z3.3z3.4z3.5z3.6z3.7z3.8z3.9�XcCsFd|_d|_d|_d|_d|_d|_d|_d|_d|_d|_	d|_
dS)Nr)�	bdist_dir�	plat_name�	keep_tempZno_target_compileZno_target_optimize�target_version�dist_dir�
skip_build�install_script�pre_install_script�versions)rrrr�initialize_options}szbdist_msi.initialize_optionscCs�|�dd�|jdkr2|�d�j}tj�|d�|_t�}|jsN|j	�
�rN||_|jr�|jg|_|js�|j	�
�r�|j|kr�t
d|f��nt|j�|_|�ddd�|jr�t
d��|jr�|j	jD]}|jtj�|�kr�q�q�t
d|j��d|_dS)	NZbdist)rLrLZmsizMtarget version can only be %s, or the '--skip-build' option must be specified)rKrK)rHrHz5the pre-install-script feature is not yet implementedz(install_script '%s' not found in scripts)Zset_undefined_optionsrG�get_finalized_command�
bdist_base�os�path�joinrrJ�distribution�has_ext_modulesrOrLr�list�all_versionsrNrMZscripts�basename�install_script_key)rrRZ
short_versionZscriptrrr�finalize_options�sH

�������zbdist_msi.finalize_optionscCsz|js|�d�|jddd�}|j|_|j|_d|_|�d�}d|_d|_|j�	�r�|j
}|spdtjdd�}d	|j
|f}|�d�}tj�|jd
|�|_t�d|j�|��tj�dtj�|jd��|��tjd=|�|j�|j��}|�|�}tj�|�}tj�|��r"t�|�|jj }|j!}	|	�s<|j"}	|	�sFd
}	|�#�}
dt$|
�j%}|j��}|j
�r~d|j
|f}nd|}t&�'|t(|t&�)�||	�|_*t&�+|j*t,�d|
fg}
|j-�p�|j.}|�r�|
�/d|f�|j0�r�|
�/d|j0f�|
�rt1|j*d|
�|�2�|�3�|�4�|�5�|j*�6�t7|jd��r^d|j
�pJd|f}|jj8�/|�|j9�svt:|j|j;d�dS)N�build�installr$)Zreinit_subcommandsr�install_libz%d.%d�z.%s-%s�libzinstalling to %sZPURELIBZUNKNOWNz%d.%d.%dzPython %s %sz	Python %sZDistVersionZ
ARPCONTACTZARPURLINFOABOUT�Property�
dist_filesr<�any)�dry_run)<rLZrun_commandZreinitialize_commandrG�prefixZwarn_dir�compile�optimizerVrWrJ�sys�version_inforHrQrSrTrUZ
build_baseZ	build_libr�infoZensure_finalized�insert�runZmkpathrK�get_fullname�get_installer_filename�abspath�exists�unlink�metadata�authorZ
maintainerZget_versionr�version�msilibZ
init_databaser	Zgen_uuid�dbZ
add_tablesr
Zauthor_emailZmaintainer_email�appendZurlr�add_find_python�	add_files�add_scripts�add_ui�Commit�hasattrrcrIrre)rr^r_rJZplat_specifierr]�fullname�installer_namersrtruZsversionZproduct_nameZpropsZemail�tuprrrrm�s�




�



�

z
bdist_msi.runc
Cs|j}t�d�}tj�|j�}t||d|dd�}t|ddddddd�}||d	fg}|j	|j
gD]t}d|}d|}	}
d}||j
kr�d
}d}
nd|}d}
t||	||d|
|d�}t||||||
�}|�|||f�q`|��i}|D�]\}}}|g}|�r�|�
�}t�|j�D]�}tj�|j|�}tj�|��rld
|�|�|f}||}
t|||||
|�}|�|�n�|j�s�|�|j|d�||k�r�|�|�}||<||jk�r�|j�r�td|��d||_n*||}t|jd|||j|d|jfg��qq�|��q�|�|�dS)NZ	distfiles�	TARGETDIRZ	SourceDir�PythonZ
Everythingrr$)Z	directory�zPython from another locationr`zPython %s from registryz%s|%szMultiple files with name %sz[#%s]Z
DuplicateFile)rwrvZCABrSrTrprGrr
rO�
other_versionrxr}�pop�listdirZabsoluterU�isdirZ
make_shortZ	componentZstart_componentZlogicalZadd_filerMr[rrZcommit)rrwZcabZrootdir�root�f�itemsru�targetr.�defaultZdescr"�level�dir�seenZfeatureZtodo�fileZafileZshortZnewdir�keyrrrrz
sf

�

��

zbdist_msi.add_filescCs|d}|jD�]j}d|}d|}d|}d|}d|}d|}d|}	d	|}
d
|}d|}tjrld}
nd
}
t|jd|d
|d|
f|d|d|
fg�t|jd||f||fg�t|jd|d|d|df|	d|d|df|
d|d|dfg�t|jd|||f|	||df|
d|d
fg�t|jd|||f|	||df|
d|d
fg�t|jdd|dd|fg�|d7}q
dS)Ni�z)SOFTWARE\Python\PythonCore\%s\InstallPathzpython.machine.zpython.user.zPYTHON.MACHINE.zPYTHON.USER.ZPythonFromMachineZPythonFromUserZ	PythonExer��PYTHON�r`Z
RegLocatorr$Z	AppSearch�CustomActioni3�[�]z]\python.exe�InstallExecuteSequence�InstallUISequenceZ	Conditionr�rz
NOT TARGETDIR�)rOrvZWin64rrw)r�start�verZinstall_pathZmachine_regZuser_regZmachine_propZ	user_propZmachine_actionZuser_actionZ
exe_actionZtarget_dir_prop�exe_propZTyperrrryCs`�����������zbdist_msi.add_find_pythonc
Cs|jrjd}|j|jgD]P}d|}d|}t|jd|d||jfg�t|jd|d||fg�|d7}q|jr�tj�	|j
d	�}t|d
��4}|�d�t|j��}|�|�
��W5QRXW5QRXt|jdd
t�|�fg�t|jddg�t|jddg�dS)Ni�zinstall_script.r�r��2r�z&Python%s=3r$zpreinstall.batrzrem ="""
%1 %0
exit
"""
�Binary�
PreInstall)r�r`r�N)r�z
NOT Installedi�)rMrOr�rrwr[rNrSrTrUrG�open�write�readrvr�)rr�r�Zinstall_actionr�Zscriptfnr�Zfinrrrr{ys6��
	
"���zbdist_msi.add_scriptscCs�
|j}d}}d}d}d}d}d}d}	t|dd	d
ddd
dg�t|dddddg�t|ddddddg�t|dtj�t|dtj�t|d||||||ddd�}
|
�d�|
jddd d!�|
jd"d#d d!�|
�d$d%d&d'd(d)d*�|
�d+d%d,d'd-d)d.�|
j	dd"dd/�}|�
d0d1�t|d2||||||ddd�}|�d3�|jddd d!�|jd"d#d d!�|�d$d%d&d'd(d)d4�|�d+d%d,d'd-d)d.�|j	dd"dd/�}|�
d0d1�t|d5||||||ddd�}
|
�d6�|
jddd d!�|
jd"d#d d!�|
�d7d%d8d'd-d)d.�|
j	dd"dd/�}|�
d0d9�t|d:||||d;|d<d<d<d=d>�}|�d?d%d@dAd%d)dB�|�d7d-dCdDd-d)dE�|�dFd-dGdHdddI�|�dJdKd-dLdHdMdNdOddd�|jd1dPd1d/�}|�
d0d1�|j	dPd<dPd/�}|�
d0dP�|jd<d1d<d/�}|�
d0d<�t|dQddRdHdSdT|dUdd�}|�dUddVdDdWddX�|�
dYdZd[d\d]dd^d��
d0d_�|�
d`dad[d\d]ddbd��
d0dc�|�
ddd d[d\d]dded��
d0df�|�
dgdhd[d\d]dd"d��
d0di�|�
djd\d[d\d]ddPd��
d0dk�|�
dldmd[d\d]ddnd��
d0do�|�
dpdqd[d\d]dd<d��
d0dr�t|dsddRdtdud|d^d^d^�}|�dFdWd%dvdwddx�|�
dbd[dydzd{ddbd^�}|�
d0d1�|�
d^d|dydzd{dd^db�}|�
d0d9�t|d}ddRdtdu||d9d9d9�}|�dFdWd%dvdwdd~�|�
d9ddydzd{dd9d�}|�
d0d1�t|d�||||||d"d"d"�}|�d7d%d&d'd�d)d��|�d��|�dd%d�d'd-d)d��}|�ddF�|�d�d%d�d'dwd)d�}|�d�dF�|jd#dd d!�|j	d�dd d!�|�d"d�}|�
d�ds�t|d�||||||d�d�d"�}|�d��|�d�d%dwdd-dd�|j���|jddd d!�|�	d�d"�}d}|j
d�d�|d��|j|jgD](}|d7}|j
d�d�|d�||d���q
|j
d�d}|dd��|j
d0d9|d�d��|�d"d��}|�
d�ds�|�d�d�d%d�ddZdd�dd�d�}|�
d�d��|j}d�|}d�|}|�d�d%dAdd%dd��}|�d�|�|�d�|�|�d�|�|�d�|�|�d�d�d%d�dd�dd�|dd�d�}|�d�|�|�d�|�|�d�|�|�d�|�t|d�||||||d�d�d�d=d>�}|�d?d%d@dAd%d)d��|�d7d-d-dDd-d)d��|�dFd-d�dHd�dd��|�d�d�d-d�dHd�d�dd�dd�|�d�dndd���
d0d9�t|d�||||||d�d�d"�}|�d��|�d�d%d�dtddd�dXd��	}|�d�d d�d�d-d��|�d�d d�d�d-d��|jd#dd d!�|�	d�d"�}|�
d�d�d�d�|j
d0d9d�d��|�d"d��}|�
d�ds�t|d�||||||d"d"d"d=d>�}|�d?d-d%dAd%d)d��|�dFd�d�ddwddġ|�d�d�d�d�d-ddơ|�dd&d�|d&d-dd��}|�ddF�|�d�d�d�dZddRd�dd�dd�}|�d�dˡ|jdd�d=d!�|j	d�d"d=d!�|�d"d#��
d�ds�t|d�||||||d�d�d"�}|�d͡|�d�d%d�dHdhddС|�d�d%d�dHd�dd�dXd��	}|�d�d d�dAd{d֡|�d�d d�dAd{d١|jddd=d!�|�	dd"�}|�
d�d�d�d��|�
d�d�d�d@�|�
d�d�d�dN�|�
d�d�d�d�|�
d�d�d�d�|�
d�d�d�d�|�
d�d�d�d�|�
d�d�d�d�|�
d0d9d�d-�|�d"dѡ�
d�ds�dS)�Nr�iri,z[ProductName] Setupr%r$� rb)Z
DefaultUIFont�DlgFont8)ZErrorDialog�ErrorDlg)Z	Progress1ZInstall)Z	Progress2Zinstalls)�MaintenanceForm_Action�Repair)�
WhichUsers�ALLZ	TextStyle)r��Tahoma�	Nr)ZDlgFontBold8r��Nr$)Z
VerdanaBold10�VerdanarNr$)ZVerdanaRed9r�r��rr�)�
PrepareDlgz(Not Privileged or Windows9x or Installed�)�
WhichUsersDlgz.Privileged and not Windows9x and not Installed�)�SelectFeaturesDlgz
Not Installedi�)�MaintenanceTypeDlgz,Installed AND NOT RESUME AND NOT Preselectedi�)�ProgressDlgNi�
ActionText�UITextZ
FatalErrorZFinishz)[ProductName] Installer ended prematurelyz< Backr)r/r2r#ZDescription1r�Fr�Pr!z�[ProductName] setup ended prematurely because of an error.  Your system has not been modified.  To install this program at a later time, please run the installation again.ZDescription2��z.Click the Finish button to exit the Installer.)r.Z	EndDialogZExitZUserExitz'[ProductName] Installer was interruptedz�[ProductName] setup was interrupted.  Your system has not been modified.  To install this program at a later time, please run the installation again.Z
ExitDialogz&Completing the [ProductName] InstallerZDescription��ZReturnZ
FilesInUse�ZRetryF)Zbitmapr���z{\DlgFontBold8}Files in Use�iz8Some files that need to be updated are currently in use.ZText�7iJz�The following applications are using files that need to be updated by this setup. Close these applications and then click Retry to continue the installation or Cancel to exit it.ZListZListBox�k��ZFileInUseProcess�Ignorer�r�eiZ	ErrorTextr��0r��N�x�H�Q�ZNoZErrorNo�Y��ZYesZErrorYes�AZAbortZ
ErrorAbort�C�*ZErrorCancel�IZErrorIgnore�O�ZOkZErrorOk�R��Z
ErrorRetryZ	CancelDlgi�U���z;Are you sure you want to cancel [ProductName] installation?�9r(r)�ZWaitForCostingDlgzRPlease wait while the installer finishes determining your disk space requirements.�fr��(zOPlease wait while the Installer prepares to guide you through the installation.z&Welcome to the [ProductName] Installer�nzPondering...Z
ActionData�r4ZSpawnDialogr�zSelect Python InstallationsZHintz9Select the Python locations where %s should be installed.zNext >z[TARGETDIR]z[SourceDir])Zorderingz
[TARGETDIR%s]z FEATURE_SELECTED AND &Python%s=3ZSpawnWaitDialogr`ZFeaturesZ
SelectionTreer ZFEATUREZPathEditz[FEATURE_SELECTED]�1z!FEATURE_SELECTED AND &Python%s<>3ZOtherz$Provide an alternate Python locationZEnableZShowZDisableZHide���r�ZDiskCostDlgZOKz&{\DlgFontBold8}Disk Space RequirementszFThe disk space required for the installation of the selected features.�5aThe highlighted volumes (if any) do not have enough disk space available for the currently selected features.  You can either remove some files from the highlighted volumes, or choose to install less features onto local drive(s), or select different destination drive(s).Z
VolumeListZVolumeCostList�d�iz{120}{70}{70}{70}{70}g�?r�ZAdminInstallzGSelect whether to install [ProductName] for all users of this computer.r�r��zInstall for all usersZJUSTME�zInstall just for mez
[ALLUSERS]zWhichUsers="ALL"r�z({\DlgFontBold8}[Progress1] [ProductName]�#�AzYPlease wait while the Installer [Progress2] [ProductName]. This may take several minutes.ZStatusLabelzStatus:ZProgressBariz
Progress doneZSetProgressZProgressr�z)Welcome to the [ProductName] Setup WizardZBodyText�?z:Select whether you want to repair or remove [ProductName].ZRepairRadioGroup�lr�r�r�z&Repair [ProductName]ZRemoverzRe&move [ProductName]z[REINSTALL]zMaintenanceForm_Action="Repair"z[Progress1]Z	Repairingz[Progress2]ZrepairsZ	Reinstallr�z[REMOVE]zMaintenanceForm_Action="Remove"�ZRemoving�Zremoves�
�z MaintenanceForm_Action<>"Change")rwrrr�r�rr"r1r3r-ZeventZcontrolrr+�mappingrVrnrOr�Z	conditionr8Z
radiogroup�add)rrw�x�yrrr"ZmodalZmodelessZtrack_disk_spaceZfatalrAZ	user_exitZexit_dialogZinuse�errorr3ZcostingZprepZseldlg�orderrur�Zinstall_other_condZdont_install_other_condZcostZ
whichusers�gZprogressZmaintrrrr|�sv��
��	��
�
���
���
�������       ������
�
���
��������
�
������
��zbdist_msi.add_uicCs<|jrd||j|jf}nd||jf}tj�|j|�}|S)Nz%s.%s-py%s.msiz	%s.%s.msi)rJrHrSrTrUrK)rrZ	base_namer�rrrro�s�z bdist_msi.get_installer_filenameN)r9r:r;ZdescriptionrZuser_optionsZboolean_optionsrYr�rPr\rmrzryr{r|rorrrrr<Ss^����
�
([66&@r<)rirSZdistutils.corerZdistutils.dir_utilrZdistutils.sysconfigrZdistutils.versionrZdistutils.errorsrZdistutils.utilrZ	distutilsrrvr	r
rrr
rrrr<rrrr�<module>	s>PKX[�)"���-command/__pycache__/build_clib.cpython-38.pycnu�[���U

e5dV�@sTdZddlZddlmZddlTddlmZddlmZdd�Z	Gd	d
�d
e�Z
dS)z�distutils.command.build_clib

Implements the Distutils 'build_clib' command, to build a C/C++ library
that is included in the module distribution and needed by an extension
module.�N)�Command)�*)�customize_compiler)�logcCsddlm}|�dS)Nr��show_compilers)�distutils.ccompilerrr�r	�4/usr/lib64/python3.8/distutils/command/build_clib.pyrsrc@sleZdZdZdddddgZddgZd	d
defgZdd
�Zdd�Z	dd�Z
dd�Zdd�Zdd�Z
dd�Zd
S)�
build_clibz/build C/C++ libraries used by Python extensions)zbuild-clib=�bz%directory to build C/C++ libraries to)zbuild-temp=�tz,directory to put temporary build by-products)�debug�gz"compile with debugging information)�force�fz2forcibly build everything (ignore file timestamps))z	compiler=�czspecify the compiler typerrz
help-compilerNzlist available compilerscCs:d|_d|_d|_d|_d|_d|_d|_d|_d|_dS)Nr)	r�
build_temp�	libraries�include_dirs�define�undefrr�compiler��selfr	r	r
�initialize_options4szbuild_clib.initialize_optionscCsh|�dddddd�|jj|_|jr0|�|j�|jdkrH|jjpDg|_t|jt�rd|j�tj	�|_dS)NZbuild)rr)rr)rr)rr)rr)
Zset_undefined_optionsZdistributionr�check_library_listr�
isinstance�str�split�os�pathseprr	r	r
�finalize_optionsDs�

zbuild_clib.finalize_optionscCs�|js
dSddlm}||j|j|jd�|_t|j�|jdk	rN|j�|j�|j	dk	rv|j	D]\}}|j�
||�q^|jdk	r�|jD]}|j�|�q�|�
|j�dS)Nr)�new_compiler)r�dry_runr)rrr#rr$rrrZset_include_dirsrZdefine_macrorZundefine_macro�build_libraries)rr#�name�valueZmacror	r	r
�run^s"�




zbuild_clib.runcCs�t|t�std��|D]z}t|t�s8t|�dkr8td��|\}}t|t�sRtd��d|ksntjdkr~tj|kr~td|d��t|t�std��qd	S)
a`Ensure that the list of libraries is valid.

        `library` is presumably provided as a command option 'libraries'.
        This method checks that it is a list of 2-tuples, where the tuples
        are (library_name, build_info_dict).

        Raise DistutilsSetupError if the structure is invalid anywhere;
        just returns otherwise.
        z+'libraries' option must be a list of tuples�z*each element of 'libraries' must a 2-tuplezNfirst element of each tuple in 'libraries' must be a string (the library name)�/z;bad library name '%s': may not contain directory separatorsrzMsecond element of each tuple in 'libraries' must be a dictionary (build info)N)	r�list�DistutilsSetupError�tuple�lenrr �sep�dict)rr�libr&�
build_infor	r	r
rvs,

��
��
�zbuild_clib.check_library_listcCs,|js
dSg}|jD]\}}|�|�q|S)N)r�append)rZ	lib_names�lib_namer2r	r	r
�get_library_names�szbuild_clib.get_library_namescCsZ|�|j�g}|jD]>\}}|�d�}|dks>t|ttf�sJtd|��|�|�q|S)N�sources�fin 'libraries' option (library '%s'), 'sources' must be present and must be a list of source filenames)rr�getrr+r-r,�extend)r�	filenamesr4r2r6r	r	r
�get_source_files�s
��zbuild_clib.get_source_filescCs�|D]�\}}|�d�}|dks,t|ttf�s8td|��t|�}t�d|�|�d�}|�d�}|jj||j	|||j
d�}|jj|||j|j
d�qdS)Nr6r7zbuilding '%s' library�macrosr)�
output_dirr<rr)r=r)
r8rr+r-r,r�infor�compilerrZcreate_static_libr)rrr4r2r6r<rZobjectsr	r	r
r%�s,
��

�	
�zbuild_clib.build_libraries)�__name__�
__module__�__qualname__ZdescriptionZuser_optionsZboolean_optionsrZhelp_optionsrr"r(rr5r;r%r	r	r	r
rs(�
��$r)�__doc__r Zdistutils.corerZdistutils.errorsZdistutils.sysconfigrZ	distutilsrrrr	r	r	r
�<module>sPKX[�G�N��9command/__pycache__/install_egg_info.cpython-38.opt-1.pycnu�[���U

e5d+
�@sddZddlmZddlmZmZddlZddlZddlZGdd�de�Z	dd�Z
d	d
�Zdd�ZdS)
z�distutils.command.install_egg_info

Implements the Distutils 'install_egg_info' command, for installing
a package's PKG-INFO metadata.�)�Command)�log�dir_utilNc@s:eZdZdZdZdgZdd�Zdd�Zdd	�Zd
d�Z	dS)
�install_egg_infoz)Install an .egg-info file for the packagez8Install package's PKG-INFO metadata as an .egg-info file)zinstall-dir=�dzdirectory to install tocCs
d|_dS�N)�install_dir��self�r�:/usr/lib64/python3.8/distutils/command/install_egg_info.py�initialize_optionssz#install_egg_info.initialize_optionscCsb|�dd�dtt|j����tt|j����ftjdd��}t	j
�|j|�|_
|j
g|_dS)NZinstall_lib)rrz%s-%s-py%d.%d.egg-info�)Zset_undefined_options�to_filename�	safe_name�distributionZget_name�safe_versionZget_version�sys�version_info�os�path�joinr�target�outputs)r
�basenamerrr�finalize_optionss��z!install_egg_info.finalize_optionsc	Cs�|j}tj�|�r0tj�|�s0tj||jd�nNtj�|�rV|�	tj
|jfd|�n(tj�|j�s~|�	tj|jfd|j�t
�d|�|js�t|ddd��}|jj�|�W5QRXdS)N)�dry_runz	Removing z	Creating z
Writing %s�wzUTF-8)�encoding)rrr�isdir�islinkrZremove_treer�existsZexecute�unlinkr�makedirsr�info�openrZmetadataZwrite_pkg_file)r
r�frrr�run s�zinstall_egg_info.runcCs|jSr)rr	rrr�get_outputs.szinstall_egg_info.get_outputsN)
�__name__�
__module__�__qualname__�__doc__ZdescriptionZuser_optionsr
rr'r(rrrrrs�
rcCst�dd|�S)z�Convert an arbitrary string to a standard distribution name

    Any runs of non-alphanumeric/. characters are replaced with a single '-'.
    �[^A-Za-z0-9.]+�-)�re�sub��namerrrr6srcCs|�dd�}t�dd|�S)z�Convert an arbitrary string to a standard version string

    Spaces become dots, and all other non-alphanumeric characters become
    dashes, with runs of multiple dashes condensed to a single dash.
    � �.r-r.)�replacer/r0)�versionrrrr>srcCs|�dd�S)z|Convert a project or version name to its filename-escaped form

    Any '-' characters are currently replaced with '_'.
    r.�_)r5r1rrrrHsr)
r,Z
distutils.cmdrZ	distutilsrrrrr/rrrrrrrr�<module>s+
PKX[K�xu� � 6command/__pycache__/bdist_wininst.cpython-38.opt-1.pycnu�[���U

e5d�>�@sxdZddlZddlZddlZddlmZddlmZddlm	Z	m
Z
ddlTddlm
Z
ddlmZGd	d
�d
e�ZdS)zzdistutils.command.bdist_wininst

Implements the Distutils 'bdist_wininst' command: create a windows installer
exe-program.�N)�Command)�get_platform)�create_tree�remove_tree)�*)�get_python_version)�logc
s�eZdZdZdddde�fdddd	d
ddd
dddg
ZddddgZejdkZ	�fdd�Z
dd�Zdd�Zdd�Z
dd�Zd'd!d"�Zd#d$�Zd%d&�Z�ZS)(�
bdist_wininstz-create an executable installer for MS Windows)z
bdist-dir=Nz1temporary directory for creating the distributionz
plat-name=�pz;platform name to embed in generated filenames (default: %s))�	keep-temp�kzPkeep the pseudo-installation tree around after creating the distribution archive)ztarget-version=Nz6require a specific python version on the target system)�no-target-compile�cz/do not compile .py to .pyc on the target system)�no-target-optimize�oz;do not compile .py to .pyo (optimized) on the target system)z	dist-dir=�dz-directory to put final built distributions in)zbitmap=�bz>bitmap to use for the installer instead of python-powered logo)ztitle=�tz?title to display on the installer background instead of default)�
skip-buildNz2skip rebuilding everything (for testing/debugging))zinstall-script=NzUbasename of installation script to be run after installation or before deinstallation)zpre-install-script=Nz{Fully qualified filename of a script to be run before any files are installed.  This script need not be in the distribution)zuser-access-control=Nz�specify Vista's UAC handling - 'none'/default=no handling, 'auto'=use UAC if target Python installed for all users, 'force'=always use UACrr
rr�win32cs t�j||�t�dtd�dS)Nz^bdist_wininst command is deprecated since Python 3.8, use bdist_wheel (wheel packages) instead�)�super�__init__�warnings�warn�DeprecationWarning)�self�args�kw��	__class__��7/usr/lib64/python3.8/distutils/command/bdist_wininst.pyr?s
�zbdist_wininst.__init__cCsRd|_d|_d|_d|_d|_d|_d|_d|_d|_d|_	d|_
d|_d|_dS)Nr)
�	bdist_dir�	plat_name�	keep_temp�no_target_compile�no_target_optimize�target_version�dist_dir�bitmap�title�
skip_build�install_script�pre_install_script�user_access_control)rr!r!r"�initialize_optionsEsz bdist_wininst.initialize_optionscCs�|�dd�|jdkrR|jr6|jr6|j�d�}|j|_|�d�j}tj	�
|d�|_|js^d|_|js�|j��r�t
�}|jr�|j|kr�td|f��||_|�ddd�|jr�|jjD]}|jtj	�|�kr�q�q�td|j��dS)	N�bdist)r,r,Zwininst�zMtarget version can only be %s, or the '--skip-build' option must be specified)r)r))r$r$z(install_script '%s' not found in scripts)Zset_undefined_optionsr#r,r$�distributionZget_command_obj�get_finalized_command�
bdist_base�os�path�joinr(�has_ext_modulesrZDistutilsOptionErrorr-�scripts�basename)rr1r5Z
short_version�scriptr!r!r"�finalize_optionsUs>
�����zbdist_wininst.finalize_optionsc
Cs�tjdkr&|j��s|j��r&td��|js6|�d�|jddd�}|j	|_
|j|_d|_|j|_|�d�}d|_
d|_|j��r�|j}|s�d	tjdd
�}d|j|f}|�d�}tj�|jd|�|_d
D],}|��}|dkr�|d}t|d||�q�t�d|j	�|��tj�dtj�|j	d��|��tjd=ddlm}|�}	|j� �}
|j!|	d|j	d�}|�"||
|j#�|j���r�t$�}nd}|jj%�&d||�'|
�f�t�(d|�t�)|�|j*�s�t+|j	|j,d�dS)Nrz^distribution contains extensions and/or C libraries; must be compiled on a Windows 32 platform�build�install�)Zreinit_subcommandsr�install_libz%d.%drz.%s-%s�lib)ZpurelibZplatlib�headersr:�datarCz/Include/$dist_nameZinstall_zinstalling to %sZPURELIB)�mktemp�zip)Zroot_dir�anyr	zremoving temporary file '%s')�dry_run)-�sys�platformr3r9Zhas_c_librariesZDistutilsPlatformErrorr,Zrun_commandZreinitialize_commandr#�rootZwarn_dirr$�compile�optimizer(�version_infor4r6r7r8Z
build_baseZ	build_lib�upper�setattrr�infoZensure_finalized�insert�runZtempfilerE�get_fullnameZmake_archive�
create_exer*rZ
dist_files�append�get_installer_filename�debug�remover%rrH)
rr?rAr(Zplat_specifierr>�key�valuerEZarchive_basename�fullname�arcnameZ	pyversionr!r!r"rS{sr
���




��
��
zbdist_wininst.runcCsZg}|jj}|�d�|jpdd}dd�}dD]B}t||d�}|r0|d|��||�f}|�d|||�f�q0|�d	�|jr�|�d
|j�|�d||��|�d|j�|�d
|j�|j	r�|�d|j	�|j
r�|�d|j
�|j�p|j��}|�d||��ddl
}ddl}	d|�|�
��|	jf}
|�d|
�d�|�S)Nz
[metadata]r2�
cSs|�dd�S)Nr^z\n)�replace)�sr!r!r"�escape�sz)bdist_wininst.get_inidata.<locals>.escape)ZauthorZauthor_email�descriptionZ
maintainerZmaintainer_email�nameZurl�versionz
    %s: %sz%s=%sz
[Setup]zinstall_script=%szinfo=%sztarget_compile=%dztarget_optimize=%dztarget_version=%szuser_access_control=%sztitle=%srzBuilt %s with distutils-%sz
build_info=%s)r3�metadatarVZlong_description�getattr�
capitalizer-r&r'r(r/r+rT�time�	distutils�ctime�__version__r8)r�linesrerQrarcrDr+rhriZ
build_infor!r!r"�get_inidata�s>
�
�zbdist_wininst.get_inidataNc
CsHddl}|�|j�|��}|�|�}|�d|�|r`t|d��}|��}W5QRXt|�}	nd}	t|d���}
|
�	|�
��|r�|
�	|�t|t�r�|�
d�}|d}|jr�t|jddd	��}|���
d�}W5QRX||d
}n|d}|
�	|�|�ddt|�|	�}
|
�	|
�t|d��}|
�	|���W5QRXW5QRXdS)
Nrzcreating %s�rb�wb�mbcs��rzlatin-1)�encodings
z<iiii{V4)�structZmkpathr)rmrWZannounce�open�read�len�write�
get_exe_bytes�
isinstance�str�encoder.Zpack)rr]r\r*rtZcfgdata�installer_name�fZ
bitmapdataZ	bitmaplen�filer<Zscript_data�headerr!r!r"rU�sD




�
�
zbdist_wininst.create_execCsD|jr&tj�|jd||j|jf�}ntj�|jd||jf�}|S)Nz%s.%s-py%s.exez	%s.%s.exe)r(r6r7r8r)r$)rr\r}r!r!r"rW1s
��
�z$bdist_wininst.get_installer_filenamec	Cs$t�}|jrl|j|krl|jdkr&d}q�|jdkr6d}q�|jdkrFd}q�|jdkrVd}q�|jdkrfd	}q�d
}n@zddlm}Wntk
r�d
}YnX|�d
�d}|d}tj�t	�}|j
dkr�|j
dd�dkr�|j
dd�}nd}tj�|d||f�}t|d�}z|��W�S|�
�XdS)Nz2.4z6.0z7.1z2.5z8.0z3.2z9.0z3.4z10.0z14.0r)�CRT_ASSEMBLY_VERSION�.z.0r��winr2zwininst-%s%s.exern)rr(Zmsvcrtr��ImportError�	partitionr6r7�dirname�__file__r$r8ru�closerv)	rZcur_versionZbvr��majorZ	directoryZsfix�filenamer~r!r!r"ry>s8	






zbdist_wininst.get_exe_bytes)N)�__name__�
__module__�__qualname__rbrZuser_optionsZboolean_optionsrIrJZ_unsupportedrr0r=rSrmrUrWry�
__classcell__r!r!rr"r	s>���%�
&Q.
7
r	)�__doc__r6rIrZdistutils.corerZdistutils.utilrZdistutils.dir_utilrrZdistutils.errorsZdistutils.sysconfigrrirr	r!r!r!r"�<module>sPKX[��� �L�L,command/__pycache__/bdist_msi.cpython-38.pycnu�[���U

e5d߉�@s�dZddlZddlZddlmZddlmZddlmZddl	m
Z
ddlmZddl
mZdd	lmZddlZdd
lmZmZmZddlmZmZmZmZGdd
�d
e�ZGdd�de�ZdS)z#
Implements the bdist_msi command.
�N)�Command)�remove_tree)�get_python_version)�
StrictVersion)�DistutilsOptionError)�get_platform)�log)�schema�sequence�text)�	Directory�Feature�Dialog�add_datac@sFeZdZdZdd�Zdd�Zddd	�Zddd�Zddd�Zdd�Z	dS)�PyDialogz�Dialog class with a fixed layout: controls at the top, then a ruler,
    then a list of buttons: back, next, cancel. Optionally a bitmap at the
    left.cOs>tj|f|��|jd}d|d}|�dd||jd�dS)zbDialog(database, name, x, y, w, h, attributes, title, first,
        default, cancel, bitmap=true)�$�iHZ
BottomLinerN)r�__init__�h�line�w)�self�args�kwZrulerZbmwidth�r�3/usr/lib64/python3.8/distutils/command/bdist_msi.pyrs
zPyDialog.__init__c
Cs|�ddddddd|�dS)	z,Set the title text of the dialog at the top.�Title��
�@�<�z{\VerdanaBold10}%sN)r)r�titlerrrr"#s�zPyDialog.title�Back�c
Cs,|r
d}nd}|�|d|jddd|||�S)z�Add a back button with a given title, the tab-next button,
        its name in the Control table, possibly initially disabled.

        Return the button, so that events can be associated�r$���8���
pushbuttonr�rr"�next�name�active�flagsrrr�back*sz
PyDialog.back�Cancelc
Cs,|r
d}nd}|�|d|jddd|||�S)z�Add a cancel button with a given title, the tab-next button,
        its name in the Control table, possibly initially disabled.

        Return the button, so that events can be associatedr%r$i0r'r(r)r*r,rrr�cancel5szPyDialog.cancel�Nextc
Cs,|r
d}nd}|�|d|jddd|||�S)z�Add a Next button with a given title, the tab-next button,
        its name in the Control table, possibly initially disabled.

        Return the button, so that events can be associatedr%r$��r'r(r)r*r,rrrr-@sz
PyDialog.nextc
Cs,|�|t|j|d�|jdddd||�S)z�Add a button with a given title, the tab-next button,
        its name in the Control table, giving its x position; the
        y-position is aligned with the other buttons.

        Return the button, so that events can be associated�r'r(r)r%)r+�intrr)rr.r"r-Zxposrrr�xbuttonKszPyDialog.xbuttonN)r#r$)r2r$)r4r$)
�__name__�
__module__�__qualname__�__doc__rr"r1r3r-r8rrrrrs



rc@s�eZdZdZdddde�fdddd	d
ddd
g
ZddddgZddddddddddddddd d!d"d#d$d%gZd&Zd'd(�Z	d)d*�Z
d+d,�Zd-d.�Zd/d0�Z
d1d2�Zd3d4�Zd5d6�Zd7S)8�	bdist_msiz7create a Microsoft Installer (.msi) binary distribution)z
bdist-dir=Nz1temporary directory for creating the distributionz
plat-name=�pz;platform name to embed in generated filenames (default: %s))�	keep-temp�kzPkeep the pseudo-installation tree around after creating the distribution archive)ztarget-version=Nz6require a specific python version on the target system)�no-target-compile�cz/do not compile .py to .pyc on the target system)�no-target-optimize�oz;do not compile .py to .pyo (optimized) on the target system)z	dist-dir=�dz-directory to put final built distributions in)�
skip-buildNz2skip rebuilding everything (for testing/debugging))zinstall-script=NzUbasename of installation script to be run after installation or before deinstallation)zpre-install-script=Nz{Fully qualified filename of a script to be run before any files are installed.  This script need not be in the distributionr?rArCrFz2.0z2.1z2.2z2.3z2.4z2.5z2.6z2.7z2.8z2.9z3.0z3.1z3.2z3.3z3.4z3.5z3.6z3.7z3.8z3.9�XcCsFd|_d|_d|_d|_d|_d|_d|_d|_d|_d|_	d|_
dS)Nr)�	bdist_dir�	plat_name�	keep_tempZno_target_compileZno_target_optimize�target_version�dist_dir�
skip_build�install_script�pre_install_script�versions)rrrr�initialize_options}szbdist_msi.initialize_optionscCs�|�dd�|jdkr2|�d�j}tj�|d�|_t�}|jsN|j	�
�rN||_|jr�|jg|_|js�|j	�
�r�|j|kr�t
d|f��nt|j�|_|�ddd�|jr�t
d��|jr�|j	jD]}|jtj�|�kr�q�q�t
d|j��d|_dS)	NZbdist)rMrMZmsizMtarget version can only be %s, or the '--skip-build' option must be specified)rLrL)rIrIz5the pre-install-script feature is not yet implementedz(install_script '%s' not found in scripts)Zset_undefined_optionsrH�get_finalized_command�
bdist_base�os�path�joinrrK�distribution�has_ext_modulesrPrMr�list�all_versionsrOrNZscripts�basename�install_script_key)rrSZ
short_versionZscriptrrr�finalize_options�sH

�������zbdist_msi.finalize_optionscCs�|js|�d�|jddd�}|j|_|j|_d|_|�d�}d|_d|_|j�	�r�|j
}|s~|jsltd��dtj
dd	�}d
|j|f}|�d�}tj�|jd|�|_t�d|j�|��tj�dtj�|jd
��|��tjd=|�|j�|j��}|�|�}tj�|�}tj�|��r0t� |�|jj!}|j"}	|	�sJ|j#}	|	�sTd}	|�$�}
dt%|
�j&}|j��}|j
�r�d|j
|f}nd|}t'�(|t)|t'�*�||	�|_+t'�,|j+t-�d|
fg}
|j.�p�|j/}|�r�|
�0d|f�|j1�r|
�0d|j1f�|
�rt2|j+d|
�|�3�|�4�|�5�|�6�|j+�7�t8|jd��rld|j
�pXd|f}|jj9�0|�|j:�s�t;|j|j<d�dS)N�build�installr$)Zreinit_subcommandsr�install_libz Should have already checked thisz%d.%d�z.%s-%s�libzinstalling to %sZPURELIBZUNKNOWNz%d.%d.%dzPython %s %sz	Python %sZDistVersionZ
ARPCONTACTZARPURLINFOABOUT�Property�
dist_filesr=�any)�dry_run)=rMZrun_commandZreinitialize_commandrH�prefixZwarn_dir�compile�optimizerWrXrK�AssertionError�sys�version_inforIrRrTrUrVZ
build_baseZ	build_libr�infoZensure_finalized�insert�runZmkpathrL�get_fullname�get_installer_filename�abspath�exists�unlink�metadata�authorZ
maintainerZget_versionr�version�msilibZ
init_databaser	Zgen_uuid�dbZ
add_tablesr
Zauthor_emailZmaintainer_email�appendZurlr�add_find_python�	add_files�add_scripts�add_ui�Commit�hasattrrdrJrrf)rr_r`rKZplat_specifierr^�fullname�installer_namerurvrwZsversionZproduct_nameZpropsZemail�tuprrrro�s�




�



�

z
bdist_msi.runc
Cs|j}t�d�}tj�|j�}t||d|dd�}t|ddddddd�}||d	fg}|j	|j
gD]t}d|}d|}	}
d}||j
kr�d
}d}
nd|}d}
t||	||d|
|d�}t||||||
�}|�|||f�q`|��i}|D�]\}}}|g}|�r�|�
�}t�|j�D]�}tj�|j|�}tj�|��rld
|�|�|f}||}
t|||||
|�}|�|�n�|j�s�|�|j|d�||k�r�|�|�}||<||jk�r�|j�r�td|��d||_n*||}t|jd|||j|d|jfg��qq�|��q�|�|�dS)NZ	distfiles�	TARGETDIRZ	SourceDir�PythonZ
Everythingrr$)Z	directory�zPython from another locationrazPython %s from registryz%s|%szMultiple files with name %sz[#%s]Z
DuplicateFile)ryrxZCABrTrUrrrHrr
rP�
other_versionrzr�pop�listdirZabsoluterV�isdirZ
make_shortZ	componentZstart_componentZlogicalZadd_filerNr\rrZcommit)rryZcabZrootdir�root�f�itemsrw�targetr.�defaultZdescr"�level�dir�seenZfeatureZtodo�fileZafileZshortZnewdir�keyrrrr|
sf

�

��

zbdist_msi.add_filescCs�d}|jD�]v}d|}d|}d|}d|}d|}d|}d|}	d	|}
d
|}d|}tjrld}
nd
}
t|jd|d
|d|
f|d|d|
fg�t|jd||f||fg�t|jd|d|d|df|	d|d|df|
d|d|dfg�t|jd|||f|	||df|
d|d
fg�t|jd|||f|	||df|
d|d
fg�t|jdd|dd|fg�|d7}|dks
t�q
dS)asAdds code to the installer to compute the location of Python.

        Properties PYTHON.MACHINE.X.Y and PYTHON.USER.X.Y will be set from the
        registry for each version of Python.

        Properties TARGETDIRX.Y will be set from PYTHON.USER.X.Y if defined,
        else from PYTHON.MACHINE.X.Y.

        Properties PYTHONX.Y will be set to TARGETDIRX.Y\python.exei�z)SOFTWARE\Python\PythonCore\%s\InstallPathzpython.machine.zpython.user.zPYTHON.MACHINE.zPYTHON.USER.ZPythonFromMachineZPythonFromUserZ	PythonExer��PYTHON�raZ
RegLocatorNr$Z	AppSearch�CustomActioni3�[�]z]\python.exe�InstallExecuteSequence�InstallUISequenceZ	Conditionr�rz
NOT TARGETDIR�i�)rPrxZWin64rryrj)r�start�verZinstall_pathZmachine_regZuser_regZmachine_propZ	user_propZmachine_actionZuser_actionZ
exe_actionZtarget_dir_prop�exe_propZTyperrrr{Cs`�����������zbdist_msi.add_find_pythonc
Cs|jrjd}|j|jgD]P}d|}d|}t|jd|d||jfg�t|jd|d||fg�|d7}q|jr�tj�	|j
d	�}t|d
��4}|�d�t|j��}|�|�
��W5QRXW5QRXt|jdd
t�|�fg�t|jddg�t|jddg�dS)Ni�zinstall_script.r�r��2r�z&Python%s=3r$zpreinstall.batrzrem ="""
%1 %0
exit
"""
�Binary�
PreInstall)r�rar�N)r�z
NOT Installedi�)rNrPr�rryr\rOrTrUrVrH�open�write�readrxr�)rr�r�Zinstall_actionr�Zscriptfnr�Zfinrrrr}ys6��
	
"���zbdist_msi.add_scriptscCs�
|j}d}}d}d}d}d}d}d}	t|dd	d
ddd
dg�t|dddddg�t|ddddddg�t|dtj�t|dtj�t|d||||||ddd�}
|
�d�|
jddd d!�|
jd"d#d d!�|
�d$d%d&d'd(d)d*�|
�d+d%d,d'd-d)d.�|
j	dd"dd/�}|�
d0d1�t|d2||||||ddd�}|�d3�|jddd d!�|jd"d#d d!�|�d$d%d&d'd(d)d4�|�d+d%d,d'd-d)d.�|j	dd"dd/�}|�
d0d1�t|d5||||||ddd�}
|
�d6�|
jddd d!�|
jd"d#d d!�|
�d7d%d8d'd-d)d.�|
j	dd"dd/�}|�
d0d9�t|d:||||d;|d<d<d<d=d>�}|�d?d%d@dAd%d)dB�|�d7d-dCdDd-d)dE�|�dFd-dGdHdddI�|�dJdKd-dLdHdMdNdOddd�|jd1dPd1d/�}|�
d0d1�|j	dPd<dPd/�}|�
d0dP�|jd<d1d<d/�}|�
d0d<�t|dQddRdHdSdT|dUdd�}|�dUddVdDdWddX�|�
dYdZd[d\d]dd^d��
d0d_�|�
d`dad[d\d]ddbd��
d0dc�|�
ddd d[d\d]dded��
d0df�|�
dgdhd[d\d]dd"d��
d0di�|�
djd\d[d\d]ddPd��
d0dk�|�
dldmd[d\d]ddnd��
d0do�|�
dpdqd[d\d]dd<d��
d0dr�t|dsddRdtdud|d^d^d^�}|�dFdWd%dvdwddx�|�
dbd[dydzd{ddbd^�}|�
d0d1�|�
d^d|dydzd{dd^db�}|�
d0d9�t|d}ddRdtdu||d9d9d9�}|�dFdWd%dvdwdd~�|�
d9ddydzd{dd9d�}|�
d0d1�t|d�||||||d"d"d"�}|�d7d%d&d'd�d)d��|�d��|�dd%d�d'd-d)d��}|�ddF�|�d�d%d�d'dwd)d�}|�d�dF�|jd#dd d!�|j	d�dd d!�|�d"d�}|�
d�ds�t|d�||||||d�d�d"�}|�d��|�d�d%dwdd-dd�|j���|jddd d!�|�	d�d"�}d}|j
d�d�|d��|j|jgD](}|d7}|j
d�d�|d�||d���q
|j
d�d}|dd��|j
d0d9|d�d��|�d"d��}|�
d�ds�|�d�d�d%d�ddZdd�dd�d�}|�
d�d��|j}d�|}d�|}|�d�d%dAdd%dd��}|�d�|�|�d�|�|�d�|�|�d�|�|�d�d�d%d�dd�dd�|dd�d�}|�d�|�|�d�|�|�d�|�|�d�|�t|d�||||||d�d�d�d=d>�}|�d?d%d@dAd%d)d��|�d7d-d-dDd-d)d��|�dFd-d�dHd�dd��|�d�d�d-d�dHd�d�dd�dd�|�d�dndd���
d0d9�t|d�||||||d�d�d"�}|�d��|�d�d%d�dtddd�dXd��	}|�d�d d�d�d-d��|�d�d d�d�d-d��|jd#dd d!�|�	d�d"�}|�
d�d�d�d�|j
d0d9d�d��|�d"d��}|�
d�ds�t|d�||||||d"d"d"d=d>�}|�d?d-d%dAd%d)d��|�dFd�d�ddwddġ|�d�d�d�d�d-ddơ|�dd&d�|d&d-dd��}|�ddF�|�d�d�d�dZddRd�dd�dd�}|�d�dˡ|jdd�d=d!�|j	d�d"d=d!�|�d"d#��
d�ds�t|d�||||||d�d�d"�}|�d͡|�d�d%d�dHdhddС|�d�d%d�dHd�dd�dXd��	}|�d�d d�dAd{d֡|�d�d d�dAd{d١|jddd=d!�|�	dd"�}|�
d�d�d�d��|�
d�d�d�d@�|�
d�d�d�dN�|�
d�d�d�d�|�
d�d�d�d�|�
d�d�d�d�|�
d�d�d�d�|�
d�d�d�d�|�
d0d9d�d-�|�d"dѡ�
d�ds�dS)�Nr�iri,z[ProductName] Setupr%r$� rc)Z
DefaultUIFont�DlgFont8)ZErrorDialog�ErrorDlg)Z	Progress1ZInstall)Z	Progress2Zinstalls)�MaintenanceForm_Action�Repair)�
WhichUsers�ALLZ	TextStyle)r��Tahoma�	Nr)ZDlgFontBold8r��Nr$)Z
VerdanaBold10�VerdanarNr$)ZVerdanaRed9r�r��rr�)�
PrepareDlgz(Not Privileged or Windows9x or Installed�)�
WhichUsersDlgz.Privileged and not Windows9x and not Installed�)�SelectFeaturesDlgz
Not Installedi�)�MaintenanceTypeDlgz,Installed AND NOT RESUME AND NOT Preselectedi�)�ProgressDlgNi�
ActionText�UITextZ
FatalErrorZFinishz)[ProductName] Installer ended prematurelyz< Backr)r/r2r#ZDescription1r�Fr�Pr!z�[ProductName] setup ended prematurely because of an error.  Your system has not been modified.  To install this program at a later time, please run the installation again.ZDescription2��z.Click the Finish button to exit the Installer.)r.Z	EndDialogZExitZUserExitz'[ProductName] Installer was interruptedz�[ProductName] setup was interrupted.  Your system has not been modified.  To install this program at a later time, please run the installation again.Z
ExitDialogz&Completing the [ProductName] InstallerZDescription��ZReturnZ
FilesInUse�ZRetryF)Zbitmapr���z{\DlgFontBold8}Files in Use�iz8Some files that need to be updated are currently in use.ZText�7iJz�The following applications are using files that need to be updated by this setup. Close these applications and then click Retry to continue the installation or Cancel to exit it.ZListZListBox�k��ZFileInUseProcess�Ignorer�r�eiZ	ErrorTextr��0r��N�x�H�Q�ZNoZErrorNo�Y��ZYesZErrorYes�AZAbortZ
ErrorAbort�C�*ZErrorCancel�IZErrorIgnore�O�ZOkZErrorOk�R��Z
ErrorRetryZ	CancelDlgi�U���z;Are you sure you want to cancel [ProductName] installation?�9r(r)�ZWaitForCostingDlgzRPlease wait while the installer finishes determining your disk space requirements.�fr��(zOPlease wait while the Installer prepares to guide you through the installation.z&Welcome to the [ProductName] Installer�nzPondering...Z
ActionData�r4ZSpawnDialogr�zSelect Python InstallationsZHintz9Select the Python locations where %s should be installed.zNext >z[TARGETDIR]z[SourceDir])Zorderingz
[TARGETDIR%s]z FEATURE_SELECTED AND &Python%s=3ZSpawnWaitDialograZFeaturesZ
SelectionTreer ZFEATUREZPathEditz[FEATURE_SELECTED]�1z!FEATURE_SELECTED AND &Python%s<>3ZOtherz$Provide an alternate Python locationZEnableZShowZDisableZHide���r�ZDiskCostDlgZOKz&{\DlgFontBold8}Disk Space RequirementszFThe disk space required for the installation of the selected features.�5aThe highlighted volumes (if any) do not have enough disk space available for the currently selected features.  You can either remove some files from the highlighted volumes, or choose to install less features onto local drive(s), or select different destination drive(s).Z
VolumeListZVolumeCostList�d�iz{120}{70}{70}{70}{70}g�?r�ZAdminInstallzGSelect whether to install [ProductName] for all users of this computer.r�r��zInstall for all usersZJUSTME�zInstall just for mez
[ALLUSERS]zWhichUsers="ALL"r�z({\DlgFontBold8}[Progress1] [ProductName]�#�AzYPlease wait while the Installer [Progress2] [ProductName]. This may take several minutes.ZStatusLabelzStatus:ZProgressBariz
Progress doneZSetProgressZProgressr�z)Welcome to the [ProductName] Setup WizardZBodyText�?z:Select whether you want to repair or remove [ProductName].ZRepairRadioGroup�lr�r�r�z&Repair [ProductName]ZRemoverzRe&move [ProductName]z[REINSTALL]zMaintenanceForm_Action="Repair"z[Progress1]Z	Repairingz[Progress2]ZrepairsZ	Reinstallr�z[REMOVE]zMaintenanceForm_Action="Remove"�ZRemoving�Zremoves�
�z MaintenanceForm_Action<>"Change")ryrrr�r�rr"r1r3r-ZeventZcontrolrr+�mappingrWrprPr�Z	conditionr8Z
radiogroup�add)rry�x�yrrr"ZmodalZmodelessZtrack_disk_spaceZfatalrBZ	user_exitZexit_dialogZinuse�errorr3ZcostingZprepZseldlg�orderrwr�Zinstall_other_condZdont_install_other_condZcostZ
whichusers�gZprogressZmaintrrrr~�sv��
��	��
�
���
���
�������       ������
�
���
��������
�
������
��zbdist_msi.add_uicCs<|jrd||j|jf}nd||jf}tj�|j|�}|S)Nz%s.%s-py%s.msiz	%s.%s.msi)rKrIrTrUrVrL)rr�Z	base_namer�rrrrq�s�z bdist_msi.get_installer_filenameN)r9r:r;ZdescriptionrZuser_optionsZboolean_optionsrZr�rQr]ror|r{r}r~rqrrrrr=Ss^����
�
([66&@r=)r<rkrTZdistutils.corerZdistutils.dir_utilrZdistutils.sysconfigrZdistutils.versionrZdistutils.errorsrZdistutils.utilrZ	distutilsrrxr	r
rrr
rrrr=rrrr�<module>s>PKX[��fgf7f72command/__pycache__/build_ext.cpython-38.opt-2.pycnu�[���U

e5dP{�@s�ddlZddlZddlZddlZddlmZddlTddlmZm	Z	ddlm
Z
ddlmZddl
mZddlmZdd	lmZdd
lmZe�d�Zdd
�ZGdd�de�ZdS)�N)�Command)�*)�customize_compiler�get_python_version)�get_config_h_filename)�newer_group)�	Extension)�get_platform)�log)�	USER_BASEz3^[a-zA-Z_][a-zA-Z_0-9]*(\.[a-zA-Z_][a-zA-Z_0-9]*)*$cCsddlm}|�dS)Nr��show_compilers)�distutils.ccompilerr
r�r�3/usr/lib64/python3.8/distutils/command/build_ext.pyr
sr
c@seZdZdZdejZddddde�fdd	d
defdd
ddddefddddddddddgZddddd gZ	d!d"d#e
fgZd$d%�Zd&d'�Z
d(d)�Zd*d+�Zd,d-�Zd.d/�Zd0d1�Zd2d3�Zd4d5�Zejd6d7��Zd8d9�Zd:d;�Zd<d=�Zd>d?�Zd@dA�ZdBdC�ZdDdE�ZdFdG�Zd"S)H�	build_extz8build C/C++ extensions (compile/link to build directory)z (separated by '%s'))z
build-lib=�bz(directory for compiled extension modules)zbuild-temp=�tz1directory for temporary files (build by-products)z
plat-name=�pz>platform name to cross-compile for, if supported (default: %s))�inplace�iziignore build-lib and put compiled extensions into the source directory alongside your pure Python modulesz
include-dirs=�Iz.list of directories to search for header files)zdefine=�DzC preprocessor macros to define)zundef=�Uz!C preprocessor macros to undefine)z
libraries=�lz!external C libraries to link withz
library-dirs=�Lz.directories to search for external C libraries)zrpath=�Rz7directories to search for shared C libraries at runtime)z
link-objects=�Oz2extra explicit link objects to include in the link)�debug�gz'compile/link with debugging information)�force�fz2forcibly build everything (ignore file timestamps))z	compiler=�czspecify the compiler type)z	parallel=�jznumber of parallel build jobs)�swig-cppNz)make SWIG create C++ files (default is C))z
swig-opts=Nz!list of SWIG command line options)zswig=Nzpath to the SWIG executable)�userNz#add user include, library and rpathrrr r$r%z
help-compilerNzlist available compilerscCs�d|_d|_d|_d|_d|_d|_d|_d|_d|_d|_	d|_
d|_d|_d|_
d|_d|_d|_d|_d|_d|_d|_dS)Nr)�
extensions�	build_lib�	plat_name�
build_tempr�package�include_dirs�define�undef�	libraries�library_dirs�rpath�link_objectsrr �compiler�swig�swig_cpp�	swig_optsr%�parallel��selfrrr�initialize_optionsjs*zbuild_ext.initialize_optionsc

Cs�ddlm}|�ddddddd	d
�|jdkr8|jj|_|jj|_|��}|jdd�}|j	dkrn|jj	pjg|_	t
|j	t�r�|j	�t
j�|_	tjtjkr�|j	�t
j�tjd
��|j	�|�t
jj��||kr�|j	�|�t
jj��|�d�|�d�|jdk�rg|_|jdk�rg|_nt
|jt��r:|j�t
j�|_|jdk�rNg|_nt
|jt��rl|j�t
j�|_t
jdk�rh|j�t
j�tjd��tjtjk�r�|j�t
j�tjd��|j�r�t
j�|jd�|_nt
j�|jd�|_|j	�t
j�t���t tdd�}|�r|j�|�|j!dk�r*d}n|j!dd�}t
j�tjd�}|�r\t
j�||�}|j�|�tj"dd�dk�r�tj#�$t
j�tjd���r�|j�t
j�tjddt%�d��n|j�d�|�&d��r�|j'�s�|j�|�&d ��n|j�d�|j(�r|j(�d!�}d"d#�|D�|_(|j)�r4|j)�d!�|_)|j*dk�rHg|_*n|j*�d$�|_*|j+�r�t
j�t,d
�}t
j�t,d�}	t
j�-|��r�|j	�|�t
j�-|	��r�|j�|	�|j�|	�t
|j.t��r�zt/|j.�|_.Wnt0k
�r�t1d%��YnXdS)&Nr)�	sysconfigZbuild)r'r')r)r))r2r2)rr)r r )r6r6)r(r(�)Z
plat_specificZincluder.r1�ntZlibsZDebugZRelease�_home�win32�ZPCbuild��cygwin�bin�lib�pythonZconfig�.�Py_ENABLE_SHAREDZLIBDIR�,cSsg|]}|df�qS)�1r)�.0Zsymbolrrr�
<listcomp>�sz.build_ext.finalize_options.<locals>.<listcomp>� zparallel should be an integer)2�	distutilsr:Zset_undefined_optionsr*�distributionZext_packageZext_modulesr&Zget_python_incr+�
isinstance�str�split�os�pathsep�sys�exec_prefix�base_exec_prefix�append�path�join�extendZensure_string_listr.r/r0�name�prefixrr)�dirnamer�getattrr(�platform�
executable�
startswithr�get_config_varZpython_buildr,r-r5r%r�isdirr6�int�
ValueErrorZDistutilsOptionError)
r8r:Z
py_includeZplat_py_includeZ	_sys_home�suffixZnew_libZdefinesZuser_includeZuser_librrr�finalize_options�s��




�

�zbuild_ext.finalize_optionscCsjddlm}|jsdS|j��rL|�d�}|j�|��p:g�|j	�
|j�||j|j
|j|jd�|_t|j�tjdkr�|jt�kr�|j�|j�|jdk	r�|j�|j�|jdk	r�|jD]\}}|j�||�q�|jdk	r�|jD]}|j�|�q�|jdk	�r|j�|j�|j	dk	�r*|j�|j	�|jdk	�rD|j�|j�|j dk	�r^|j�!|j �|�"�dS)Nr)�new_compiler�
build_clib)r2�verbose�dry_runr r<)#rrgr&rMZhas_c_libraries�get_finalized_commandr.rYZget_library_namesr/rVrhr2rirjr rrQrZr(r	Z
initializer+Zset_include_dirsr,Zdefine_macror-Zundefine_macroZ
set_librariesZset_library_dirsr0Zset_runtime_library_dirsr1Zset_link_objects�build_extensions)r8rgrhrZ�value�macrorrr�runs@

�




z
build_ext.runc
Csvt|t�std��t|�D�]T\}}t|t�r0qt|t�rFt|�dkrNtd��|\}}t�d|�t|t	�rvt
�|�s~td��t|t�s�td��t||d�}dD]"}|�
|�}|dk	r�t|||�q�|�
d	�|_d
|kr�t�d�|�
d�}|�rhg|_g|_|D]b}	t|	t��r"t|	�d
k�s*td��t|	�dk�rJ|j�|	d�nt|	�dk�r|j�|	��q|||<qdS)Nz:'ext_modules' option must be a list of Extension instances�zMeach element of 'ext_modules' option must be an Extension instance or 2-tuplezvold-style (ext_name, build_info) tuple found in ext_modules for extension '%s' -- please convert to Extension instancezRfirst element of each tuple in 'ext_modules' must be the extension name (a string)zOsecond element of each tuple in 'ext_modules' must be a dictionary (build info)�sources)r+r/r.�
extra_objects�extra_compile_args�extra_link_argsr0Zdef_filez9'def_file' element of build info dict no longer supported�macros)r;rpz9'macros' element of build info dict must be 1- or 2-tupler;r)rN�list�DistutilsSetupError�	enumerater�tuple�lenr
�warnrO�extension_name_re�match�dict�get�setattr�runtime_library_dirs�
define_macros�undef_macrosrV)
r8r&r�ext�ext_nameZ
build_info�key�valrurnrrr�check_extensions_listVs^

�
��
��
�


�zbuild_ext.check_extensions_listcCs,|�|j�g}|jD]}|�|j�q|S�N)r�r&rYrq)r8�	filenamesr�rrr�get_source_files�s

zbuild_ext.get_source_filescCs2|�|j�g}|jD]}|�|�|j��q|Sr�)r�r&rV�get_ext_fullpathrZ)r8Zoutputsr�rrr�get_outputs�s

zbuild_ext.get_outputscCs(|�|j�|jr|��n|��dSr�)r�r&r6�_build_extensions_parallel�_build_extensions_serialr7rrrrl�s
zbuild_ext.build_extensionscs��j}�jdkrt��}zddlm}Wntk
r@d}YnX|dkrV���dS||d��P���fdd��jD�}t�j|�D]&\}}��	|��|�
�W5QRXq�W5QRXdS)NTr)�ThreadPoolExecutor)Zmax_workerscsg|]}���j|��qSr)Zsubmit�build_extension)rIr��Zexecutorr8rrrJ�s�z8build_ext._build_extensions_parallel.<locals>.<listcomp>)r6rQ�	cpu_countZconcurrent.futuresr��ImportErrorr�r&�zip�_filter_build_errors�result)r8Zworkersr�Zfuturesr�Zfutrr�rr��s"

�z$build_ext._build_extensions_parallelc
Cs0|jD]$}|�|��|�|�W5QRXqdSr�)r&r�r�)r8r�rrrr��s
z"build_ext._build_extensions_serialc
csTz
dVWnDtttfk
rN}z |js*�|�d|j|f�W5d}~XYnXdS)Nz"building extension "%s" failed: %s)ZCCompilerErrorZDistutilsErrorZCompileErrorZoptionalr{rZ)r8r��errrr��s
�zbuild_ext._filter_build_errorsc
CsP|j}|dkst|ttf�s*td|j��t|�}|�|j�}||j}|jslt	||d�slt
�d|j�dSt
�d|j�|�
||�}|jp�g}|jdd�}|jD]}|�|f�q�|jj||j||j|j||jd�}|dd�|_|jr�|�|j�|j�pg}|j�p|j�|�}	|jj|||�|�|j|j||� |�|j|j|	d�
dS)Nzjin 'ext_modules' option (extension '%s'), 'sources' must be present and must be a list of source filenamesZnewerz$skipping '%s' extension (up-to-date)zbuilding '%s' extension)Z
output_dirrur+r�extra_postargs�depends)r.r/r�r��export_symbolsrr)Ztarget_lang)!rqrNrvryrwrZr�r�r rr
r�info�swig_sourcesrsr�r�rVr2�compiler)r+Z_built_objectsrrrYrt�languageZdetect_languageZlink_shared_object�
get_librariesr/r��get_export_symbols)
r8r�rq�ext_pathr�Z
extra_argsrur-Zobjectsr�rrrr��sX��


�
�zbuild_ext.build_extensioncCs$g}g}i}|jrt�d�|js6d|jks6d|jkr<d}nd}|D]P}tj�|�\}}	|	dkr�|�|d|�|�|�|d||<qD|�|�qD|s�|S|jp�|�	�}
|
dg}|�
|j�|jr�|�d�|js�|jD]}|�|�q�|D].}||}
t�d	||
�|�|d
|
|g�q�|S)Nz/--swig-cpp is deprecated - use --swig-opts=-c++z-c++z.cppz.cz.i�_wrap���z-pythonzswigging %s to %sz-o)
r4r
r{r5rQrW�splitextrVr3�	find_swigrYr�Zspawn)r8rq�	extensionZnew_sourcesr�Zswig_targetsZ
target_ext�source�baser�r3Zswig_cmd�o�targetrrrr�1s@
�


zbuild_ext.swig_sourcescCs^tjdkrdStjdkrLdD]*}tj�d|d�}tj�|�r|SqdStdtj��dS)N�posixr3r<)z1.3z1.2z1.1z	c:\swig%szswig.exez>I don't know how to find (much less run) SWIG on platform '%s')rQrZrWrX�isfileZDistutilsPlatformError)r8Zvers�fnrrrr�gs


��zbuild_ext.find_swigcCs�|�|�}|�d�}|�|d�}|jsRtjj|dd�|g�}tj�|j|�Sd�|dd��}|�d�}tj�	|�
|��}tj�||�S)NrEr�r�build_py)�get_ext_fullnamerP�get_ext_filenamerrQrWrXr'rk�abspathZget_package_dir)r8r��fullname�modpath�filenamer*r�Zpackage_dirrrrr�s


zbuild_ext.get_ext_fullpathcCs |jdkr|S|jd|SdS)NrE)r*)r8r�rrrr��s
zbuild_ext.get_ext_fullnamecCs.ddlm}|�d�}|d�}tjj|�|S)Nr�rarEZ
EXT_SUFFIX)�distutils.sysconfigrarPrQrWrX)r8r�rar�Z
ext_suffixrrrr��s
zbuild_ext.get_ext_filenamecCsxd|j�d�d}z|�d�Wn0tk
rRd|�d��dd��d�}YnXd	|}||jkrr|j�|�|jS)
N�_rEr��asciirZpunycode�-�_ZPyInit)rZrP�encode�UnicodeEncodeError�replace�decoder�rV)r8r�reZ
initfunc_namerrrr��s"
zbuild_ext.get_export_symbolscCs�tjdkr^ddlm}t|j|�s�d}|jr4|d}|tjd?tjd?d@f}|j|gSn�dd	l	m
}d
}|d�r�ttd�r�d
}n<tjdkr�d
}n,dtj
kr�|d�dkr�d
}n|d�dkr�d
}|r�|d�}|jd|gS|jS)Nr>r)�MSVCCompilerz
python%d%dZ_d���r�FrFZgetandroidapilevelTrAZ_PYTHON_HOST_PLATFORMZANDROID_API_LEVELZMACHDEPZ	LDVERSIONrD)rSr^Zdistutils._msvccompilerr�rNr2r�
hexversionr.r�ra�hasattrrQ�environ)r8r�r��templateZ	pythonlibraZlink_libpythonZ	ldversionrrrr��s4

�



zbuild_ext.get_libraries) �__name__�
__module__�__qualname__ZdescriptionrQrRZsep_byr	Zuser_optionsZboolean_optionsr
Zhelp_optionsr9rfror�r�r�rlr�r��
contextlib�contextmanagerr�r�r�r�r�r�r�r�r�rrrrr!sp
�����+��@N	
	K6	
r)r�rQ�rerSZdistutils.corerZdistutils.errorsr�rrrZdistutils.dep_utilrZdistutils.extensionrZdistutils.utilr	rLr
Zsiterr�r|r
rrrrr�<module>s"�PKX[hğ^ ^ 6command/__pycache__/bdist_wininst.cpython-38.opt-2.pycnu�[���U

e5d�>�@stddlZddlZddlZddlmZddlmZddlmZm	Z	ddl
TddlmZddl
mZGdd	�d	e�ZdS)
�N)�Command)�get_platform)�create_tree�remove_tree)�*)�get_python_version)�logc
s�eZdZdZdddde�fdddd	d
ddd
dddg
ZddddgZejdkZ	�fdd�Z
dd�Zdd�Zdd�Z
dd�Zd'd!d"�Zd#d$�Zd%d&�Z�ZS)(�
bdist_wininstz-create an executable installer for MS Windows)z
bdist-dir=Nz1temporary directory for creating the distributionz
plat-name=�pz;platform name to embed in generated filenames (default: %s))�	keep-temp�kzPkeep the pseudo-installation tree around after creating the distribution archive)ztarget-version=Nz6require a specific python version on the target system)�no-target-compile�cz/do not compile .py to .pyc on the target system)�no-target-optimize�oz;do not compile .py to .pyo (optimized) on the target system)z	dist-dir=�dz-directory to put final built distributions in)zbitmap=�bz>bitmap to use for the installer instead of python-powered logo)ztitle=�tz?title to display on the installer background instead of default)�
skip-buildNz2skip rebuilding everything (for testing/debugging))zinstall-script=NzUbasename of installation script to be run after installation or before deinstallation)zpre-install-script=Nz{Fully qualified filename of a script to be run before any files are installed.  This script need not be in the distribution)zuser-access-control=Nz�specify Vista's UAC handling - 'none'/default=no handling, 'auto'=use UAC if target Python installed for all users, 'force'=always use UACrr
rr�win32cs t�j||�t�dtd�dS)Nz^bdist_wininst command is deprecated since Python 3.8, use bdist_wheel (wheel packages) instead�)�super�__init__�warnings�warn�DeprecationWarning)�self�args�kw��	__class__��7/usr/lib64/python3.8/distutils/command/bdist_wininst.pyr?s
�zbdist_wininst.__init__cCsRd|_d|_d|_d|_d|_d|_d|_d|_d|_d|_	d|_
d|_d|_dS)Nr)
�	bdist_dir�	plat_name�	keep_temp�no_target_compile�no_target_optimize�target_version�dist_dir�bitmap�title�
skip_build�install_script�pre_install_script�user_access_control)rr!r!r"�initialize_optionsEsz bdist_wininst.initialize_optionscCs�|�dd�|jdkrR|jr6|jr6|j�d�}|j|_|�d�j}tj	�
|d�|_|js^d|_|js�|j��r�t
�}|jr�|j|kr�td|f��||_|�ddd�|jr�|jjD]}|jtj	�|�kr�q�q�td|j��dS)	N�bdist)r,r,Zwininst�zMtarget version can only be %s, or the '--skip-build' option must be specified)r)r))r$r$z(install_script '%s' not found in scripts)Zset_undefined_optionsr#r,r$�distributionZget_command_obj�get_finalized_command�
bdist_base�os�path�joinr(�has_ext_modulesrZDistutilsOptionErrorr-�scripts�basename)rr1r5Z
short_version�scriptr!r!r"�finalize_optionsUs>
�����zbdist_wininst.finalize_optionsc
Cs�tjdkr&|j��s|j��r&td��|js6|�d�|jddd�}|j	|_
|j|_d|_|j|_|�d�}d|_
d|_|j��r�|j}|s�d	tjdd
�}d|j|f}|�d�}tj�|jd|�|_d
D],}|��}|dkr�|d}t|d||�q�t�d|j	�|��tj�dtj�|j	d��|��tjd=ddlm}|�}	|j� �}
|j!|	d|j	d�}|�"||
|j#�|j���r�t$�}nd}|jj%�&d||�'|
�f�t�(d|�t�)|�|j*�s�t+|j	|j,d�dS)Nrz^distribution contains extensions and/or C libraries; must be compiled on a Windows 32 platform�build�install�)Zreinit_subcommandsr�install_libz%d.%drz.%s-%s�lib)ZpurelibZplatlib�headersr:�datarCz/Include/$dist_nameZinstall_zinstalling to %sZPURELIB)�mktemp�zip)Zroot_dir�anyr	zremoving temporary file '%s')�dry_run)-�sys�platformr3r9Zhas_c_librariesZDistutilsPlatformErrorr,Zrun_commandZreinitialize_commandr#�rootZwarn_dirr$�compile�optimizer(�version_infor4r6r7r8Z
build_baseZ	build_lib�upper�setattrr�infoZensure_finalized�insert�runZtempfilerE�get_fullnameZmake_archive�
create_exer*rZ
dist_files�append�get_installer_filename�debug�remover%rrH)
rr?rAr(Zplat_specifierr>�key�valuerEZarchive_basename�fullname�arcnameZ	pyversionr!r!r"rS{sr
���




��
��
zbdist_wininst.runcCsZg}|jj}|�d�|jpdd}dd�}dD]B}t||d�}|r0|d|��||�f}|�d|||�f�q0|�d	�|jr�|�d
|j�|�d||��|�d|j�|�d
|j�|j	r�|�d|j	�|j
r�|�d|j
�|j�p|j��}|�d||��ddl
}ddl}	d|�|�
��|	jf}
|�d|
�d�|�S)Nz
[metadata]r2�
cSs|�dd�S)Nr^z\n)�replace)�sr!r!r"�escape�sz)bdist_wininst.get_inidata.<locals>.escape)ZauthorZauthor_email�descriptionZ
maintainerZmaintainer_email�nameZurl�versionz
    %s: %sz%s=%sz
[Setup]zinstall_script=%szinfo=%sztarget_compile=%dztarget_optimize=%dztarget_version=%szuser_access_control=%sztitle=%srzBuilt %s with distutils-%sz
build_info=%s)r3�metadatarVZlong_description�getattr�
capitalizer-r&r'r(r/r+rT�time�	distutils�ctime�__version__r8)r�linesrerQrarcrDr+rhriZ
build_infor!r!r"�get_inidata�s>
�
�zbdist_wininst.get_inidataNc
CsHddl}|�|j�|��}|�|�}|�d|�|r`t|d��}|��}W5QRXt|�}	nd}	t|d���}
|
�	|�
��|r�|
�	|�t|t�r�|�
d�}|d}|jr�t|jddd	��}|���
d�}W5QRX||d
}n|d}|
�	|�|�ddt|�|	�}
|
�	|
�t|d��}|
�	|���W5QRXW5QRXdS)
Nrzcreating %s�rb�wb�mbcs��rzlatin-1)�encodings
z<iiii{V4)�structZmkpathr)rmrWZannounce�open�read�len�write�
get_exe_bytes�
isinstance�str�encoder.Zpack)rr]r\r*rtZcfgdata�installer_name�fZ
bitmapdataZ	bitmaplen�filer<Zscript_data�headerr!r!r"rU�sD




�
�
zbdist_wininst.create_execCsD|jr&tj�|jd||j|jf�}ntj�|jd||jf�}|S)Nz%s.%s-py%s.exez	%s.%s.exe)r(r6r7r8r)r$)rr\r}r!r!r"rW1s
��
�z$bdist_wininst.get_installer_filenamec	Cs$t�}|jrl|j|krl|jdkr&d}q�|jdkr6d}q�|jdkrFd}q�|jdkrVd}q�|jdkrfd	}q�d
}n@zddlm}Wntk
r�d
}YnX|�d
�d}|d}tj�t	�}|j
dkr�|j
dd�dkr�|j
dd�}nd}tj�|d||f�}t|d�}z|��W�S|�
�XdS)Nz2.4z6.0z7.1z2.5z8.0z3.2z9.0z3.4z10.0z14.0r)�CRT_ASSEMBLY_VERSION�.z.0r��winr2zwininst-%s%s.exern)rr(Zmsvcrtr��ImportError�	partitionr6r7�dirname�__file__r$r8ru�closerv)	rZcur_versionZbvr��majorZ	directoryZsfix�filenamer~r!r!r"ry>s8	






zbdist_wininst.get_exe_bytes)N)�__name__�
__module__�__qualname__rbrZuser_optionsZboolean_optionsrIrJZ_unsupportedrr0r=rSrmrUrWry�
__classcell__r!r!rr"r	s>���%�
&Q.
7
r	)r6rIrZdistutils.corerZdistutils.utilrZdistutils.dir_utilrrZdistutils.errorsZdistutils.sysconfigrrirr	r!r!r!r"�<module>sPKX[1�f]??2command/__pycache__/build_ext.cpython-38.opt-1.pycnu�[���U

e5dP{�@s�dZddlZddlZddlZddlZddlmZddlTddlm	Z	m
Z
ddlmZddlm
Z
ddlmZdd	lmZdd
lmZddlmZe�d�Zd
d�ZGdd�de�ZdS)z�distutils.command.build_ext

Implements the Distutils 'build_ext' command, for building extension
modules (currently limited to C extensions, should accommodate C++
extensions ASAP).�N)�Command)�*)�customize_compiler�get_python_version)�get_config_h_filename)�newer_group)�	Extension)�get_platform)�log)�	USER_BASEz3^[a-zA-Z_][a-zA-Z_0-9]*(\.[a-zA-Z_][a-zA-Z_0-9]*)*$cCsddlm}|�dS)Nr��show_compilers)�distutils.ccompilerr
r�r�3/usr/lib64/python3.8/distutils/command/build_ext.pyr
sr
c@seZdZdZdejZddddde�fdd	d
defdd
ddddefddddddddddgZddddd gZ	d!d"d#e
fgZd$d%�Zd&d'�Z
d(d)�Zd*d+�Zd,d-�Zd.d/�Zd0d1�Zd2d3�Zd4d5�Zejd6d7��Zd8d9�Zd:d;�Zd<d=�Zd>d?�Zd@dA�ZdBdC�ZdDdE�ZdFdG�Zd"S)H�	build_extz8build C/C++ extensions (compile/link to build directory)z (separated by '%s'))z
build-lib=�bz(directory for compiled extension modules)zbuild-temp=�tz1directory for temporary files (build by-products)z
plat-name=�pz>platform name to cross-compile for, if supported (default: %s))�inplace�iziignore build-lib and put compiled extensions into the source directory alongside your pure Python modulesz
include-dirs=�Iz.list of directories to search for header files)zdefine=�DzC preprocessor macros to define)zundef=�Uz!C preprocessor macros to undefine)z
libraries=�lz!external C libraries to link withz
library-dirs=�Lz.directories to search for external C libraries)zrpath=�Rz7directories to search for shared C libraries at runtime)z
link-objects=�Oz2extra explicit link objects to include in the link)�debug�gz'compile/link with debugging information)�force�fz2forcibly build everything (ignore file timestamps))z	compiler=�czspecify the compiler type)z	parallel=�jznumber of parallel build jobs)�swig-cppNz)make SWIG create C++ files (default is C))z
swig-opts=Nz!list of SWIG command line options)zswig=Nzpath to the SWIG executable)�userNz#add user include, library and rpathrrr r$r%z
help-compilerNzlist available compilerscCs�d|_d|_d|_d|_d|_d|_d|_d|_d|_d|_	d|_
d|_d|_d|_
d|_d|_d|_d|_d|_d|_d|_dS)Nr)�
extensions�	build_lib�	plat_name�
build_tempr�package�include_dirs�define�undef�	libraries�library_dirs�rpath�link_objectsrr �compiler�swig�swig_cpp�	swig_optsr%�parallel��selfrrr�initialize_optionsjs*zbuild_ext.initialize_optionsc

Cs�ddlm}|�ddddddd	d
�|jdkr8|jj|_|jj|_|��}|jdd�}|j	dkrn|jj	pjg|_	t
|j	t�r�|j	�t
j�|_	tjtjkr�|j	�t
j�tjd
��|j	�|�t
jj��||kr�|j	�|�t
jj��|�d�|�d�|jdk�rg|_|jdk�rg|_nt
|jt��r:|j�t
j�|_|jdk�rNg|_nt
|jt��rl|j�t
j�|_t
jdk�rh|j�t
j�tjd��tjtjk�r�|j�t
j�tjd��|j�r�t
j�|jd�|_nt
j�|jd�|_|j	�t
j�t���t tdd�}|�r|j�|�|j!dk�r*d}n|j!dd�}t
j�tjd�}|�r\t
j�||�}|j�|�tj"dd�dk�r�tj#�$t
j�tjd���r�|j�t
j�tjddt%�d��n|j�d�|�&d��r�|j'�s�|j�|�&d ��n|j�d�|j(�r|j(�d!�}d"d#�|D�|_(|j)�r4|j)�d!�|_)|j*dk�rHg|_*n|j*�d$�|_*|j+�r�t
j�t,d
�}t
j�t,d�}	t
j�-|��r�|j	�|�t
j�-|	��r�|j�|	�|j�|	�t
|j.t��r�zt/|j.�|_.Wnt0k
�r�t1d%��YnXdS)&Nr)�	sysconfigZbuild)r'r')r)r))r2r2)rr)r r )r6r6)r(r(�)Z
plat_specificZincluder.r1�ntZlibsZDebugZRelease�_home�win32�ZPCbuild��cygwin�bin�lib�pythonZconfig�.�Py_ENABLE_SHAREDZLIBDIR�,cSsg|]}|df�qS)�1r)�.0Zsymbolrrr�
<listcomp>�sz.build_ext.finalize_options.<locals>.<listcomp>� zparallel should be an integer)2�	distutilsr:Zset_undefined_optionsr*�distributionZext_packageZext_modulesr&Zget_python_incr+�
isinstance�str�split�os�pathsep�sys�exec_prefix�base_exec_prefix�append�path�join�extendZensure_string_listr.r/r0�name�prefixrr)�dirnamer�getattrr(�platform�
executable�
startswithr�get_config_varZpython_buildr,r-r5r%r�isdirr6�int�
ValueErrorZDistutilsOptionError)
r8r:Z
py_includeZplat_py_includeZ	_sys_home�suffixZnew_libZdefinesZuser_includeZuser_librrr�finalize_options�s��




�

�zbuild_ext.finalize_optionscCsjddlm}|jsdS|j��rL|�d�}|j�|��p:g�|j	�
|j�||j|j
|j|jd�|_t|j�tjdkr�|jt�kr�|j�|j�|jdk	r�|j�|j�|jdk	r�|jD]\}}|j�||�q�|jdk	r�|jD]}|j�|�q�|jdk	�r|j�|j�|j	dk	�r*|j�|j	�|jdk	�rD|j�|j�|j dk	�r^|j�!|j �|�"�dS)Nr)�new_compiler�
build_clib)r2�verbose�dry_runr r<)#rrgr&rMZhas_c_libraries�get_finalized_commandr.rYZget_library_namesr/rVrhr2rirjr rrQrZr(r	Z
initializer+Zset_include_dirsr,Zdefine_macror-Zundefine_macroZ
set_librariesZset_library_dirsr0Zset_runtime_library_dirsr1Zset_link_objects�build_extensions)r8rgrhrZ�value�macrorrr�runs@

�




z
build_ext.runc
Csvt|t�std��t|�D�]T\}}t|t�r0qt|t�rFt|�dkrNtd��|\}}t�d|�t|t	�rvt
�|�s~td��t|t�s�td��t||d�}dD]"}|�
|�}|d	k	r�t|||�q�|�
d
�|_d|kr�t�d�|�
d
�}|�rhg|_g|_|D]b}	t|	t��r"t|	�dk�s*td��t|	�dk�rJ|j�|	d�nt|	�dk�r|j�|	��q|||<qd	S)a�Ensure that the list of extensions (presumably provided as a
        command option 'extensions') is valid, i.e. it is a list of
        Extension objects.  We also support the old-style list of 2-tuples,
        where the tuples are (ext_name, build_info), which are converted to
        Extension instances here.

        Raise DistutilsSetupError if the structure is invalid anywhere;
        just returns otherwise.
        z:'ext_modules' option must be a list of Extension instances�zMeach element of 'ext_modules' option must be an Extension instance or 2-tuplezvold-style (ext_name, build_info) tuple found in ext_modules for extension '%s' -- please convert to Extension instancezRfirst element of each tuple in 'ext_modules' must be the extension name (a string)zOsecond element of each tuple in 'ext_modules' must be a dictionary (build info)�sources)r+r/r.�
extra_objects�extra_compile_args�extra_link_argsNr0Zdef_filez9'def_file' element of build info dict no longer supported�macros)r;rpz9'macros' element of build info dict must be 1- or 2-tupler;r)rN�list�DistutilsSetupError�	enumerater�tuple�lenr
�warnrO�extension_name_re�match�dict�get�setattr�runtime_library_dirs�
define_macros�undef_macrosrV)
r8r&r�ext�ext_nameZ
build_info�key�valrurnrrr�check_extensions_listVs^

�
��
��
�


�zbuild_ext.check_extensions_listcCs,|�|j�g}|jD]}|�|j�q|S�N)r�r&rYrq)r8�	filenamesr�rrr�get_source_files�s

zbuild_ext.get_source_filescCs2|�|j�g}|jD]}|�|�|j��q|Sr�)r�r&rV�get_ext_fullpathrZ)r8Zoutputsr�rrr�get_outputs�s

zbuild_ext.get_outputscCs(|�|j�|jr|��n|��dSr�)r�r&r6�_build_extensions_parallel�_build_extensions_serialr7rrrrl�s
zbuild_ext.build_extensionscs��j}�jdkrt��}zddlm}Wntk
r@d}YnX|dkrV���dS||d��P���fdd��jD�}t�j|�D]&\}}��	|��|�
�W5QRXq�W5QRXdS)NTr)�ThreadPoolExecutor)Zmax_workerscsg|]}���j|��qSr)Zsubmit�build_extension)rIr��Zexecutorr8rrrJ�s�z8build_ext._build_extensions_parallel.<locals>.<listcomp>)r6rQ�	cpu_countZconcurrent.futuresr��ImportErrorr�r&�zip�_filter_build_errors�result)r8Zworkersr�Zfuturesr�Zfutrr�rr��s"

�z$build_ext._build_extensions_parallelc
Cs0|jD]$}|�|��|�|�W5QRXqdSr�)r&r�r�)r8r�rrrr��s
z"build_ext._build_extensions_serialc
csTz
dVWnDtttfk
rN}z |js*�|�d|j|f�W5d}~XYnXdS)Nz"building extension "%s" failed: %s)ZCCompilerErrorZDistutilsErrorZCompileErrorZoptionalr{rZ)r8r��errrr��s
�zbuild_ext._filter_build_errorsc
CsP|j}|dkst|ttf�s*td|j��t|�}|�|j�}||j}|jslt	||d�slt
�d|j�dSt
�d|j�|�
||�}|jp�g}|jdd�}|jD]}|�|f�q�|jj||j||j|j||jd�}|dd�|_|jr�|�|j�|j�pg}|j�p|j�|�}	|jj|||�|�|j|j||� |�|j|j|	d�
dS)Nzjin 'ext_modules' option (extension '%s'), 'sources' must be present and must be a list of source filenamesZnewerz$skipping '%s' extension (up-to-date)zbuilding '%s' extension)Z
output_dirrur+r�extra_postargs�depends)r.r/r�r��export_symbolsrr)Ztarget_lang)!rqrNrvryrwrZr�r�r rr
r�info�swig_sourcesrsr�r�rVr2�compiler)r+Z_built_objectsrrrYrt�languageZdetect_languageZlink_shared_object�
get_librariesr/r��get_export_symbols)
r8r�rq�ext_pathr�Z
extra_argsrur-Zobjectsr�rrrr��sX��


�
�zbuild_ext.build_extensioncCs$g}g}i}|jrt�d�|js6d|jks6d|jkr<d}nd}|D]P}tj�|�\}}	|	dkr�|�|d|�|�|�|d||<qD|�|�qD|s�|S|jp�|�	�}
|
dg}|�
|j�|jr�|�d�|js�|jD]}|�|�q�|D].}||}
t�d	||
�|�|d
|
|g�q�|S)z�Walk the list of source files in 'sources', looking for SWIG
        interface (.i) files.  Run SWIG on all that are found, and
        return a modified 'sources' list with SWIG source files replaced
        by the generated C (or C++) files.
        z/--swig-cpp is deprecated - use --swig-opts=-c++z-c++z.cppz.cz.i�_wrap���z-pythonzswigging %s to %sz-o)
r4r
r{r5rQrW�splitextrVr3�	find_swigrYr�Zspawn)r8rq�	extensionZnew_sourcesr�Zswig_targetsZ
target_ext�source�baser�r3Zswig_cmd�o�targetrrrr�1s@
�


zbuild_ext.swig_sourcescCs^tjdkrdStjdkrLdD]*}tj�d|d�}tj�|�r|SqdStdtj��dS)	z�Return the name of the SWIG executable.  On Unix, this is
        just "swig" -- it should be in the PATH.  Tries a bit harder on
        Windows.
        �posixr3r<)z1.3z1.2z1.1z	c:\swig%szswig.exez>I don't know how to find (much less run) SWIG on platform '%s'N)rQrZrWrX�isfileZDistutilsPlatformError)r8Zvers�fnrrrr�gs


��zbuild_ext.find_swigcCs�|�|�}|�d�}|�|d�}|jsRtjj|dd�|g�}tj�|j|�Sd�|dd��}|�d�}tj�	|�
|��}tj�||�S)z�Returns the path of the filename for a given extension.

        The file is located in `build_lib` or directly in the package
        (inplace option).
        rEr�Nr�build_py)�get_ext_fullnamerP�get_ext_filenamerrQrWrXr'rk�abspathZget_package_dir)r8r��fullname�modpath�filenamer*r�Zpackage_dirrrrr�s


zbuild_ext.get_ext_fullpathcCs |jdkr|S|jd|SdS)zSReturns the fullname of a given extension name.

        Adds the `package.` prefixNrE)r*)r8r�rrrr��s
zbuild_ext.get_ext_fullnamecCs.ddlm}|�d�}|d�}tjj|�|S)z�Convert the name of an extension (eg. "foo.bar") into the name
        of the file from which it will be loaded (eg. "foo/bar.so", or
        "foo\bar.pyd").
        r�rarEZ
EXT_SUFFIX)�distutils.sysconfigrarPrQrWrX)r8r�rar�Z
ext_suffixrrrr��s
zbuild_ext.get_ext_filenamecCsxd|j�d�d}z|�d�Wn0tk
rRd|�d��dd��d�}YnXd	|}||jkrr|j�|�|jS)
aReturn the list of symbols that a shared extension has to
        export.  This either uses 'ext.export_symbols' or, if it's not
        provided, "PyInit_" + module_name.  Only relevant on Windows, where
        the .pyd file (DLL) must export the module "PyInit_" function.
        �_rEr��asciirZpunycode�-�_ZPyInit)rZrP�encode�UnicodeEncodeError�replace�decoder�rV)r8r�reZ
initfunc_namerrrr��s"
zbuild_ext.get_export_symbolscCs�tjdkr^ddlm}t|j|�s�d}|jr4|d}|tjd?tjd?d@f}|j|gSn�dd	l	m
}d
}|d�r�ttd�r�d
}n<tjdkr�d
}n,dtj
kr�|d�dkr�d
}n|d�dkr�d
}|r�|d�}|jd|gS|jS)z�Return the list of libraries to link against when building a
        shared extension.  On most platforms, this is just 'ext.libraries';
        on Windows, we add the Python library (eg. python20.dll).
        r>r)�MSVCCompilerz
python%d%dZ_d���r�FrFZgetandroidapilevelTrAZ_PYTHON_HOST_PLATFORMZANDROID_API_LEVELZMACHDEPZ	LDVERSIONrD)rSr^Zdistutils._msvccompilerr�rNr2r�
hexversionr.r�ra�hasattrrQ�environ)r8r�r��templateZ	pythonlibraZlink_libpythonZ	ldversionrrrr��s4

�



zbuild_ext.get_libraries) �__name__�
__module__�__qualname__ZdescriptionrQrRZsep_byr	Zuser_optionsZboolean_optionsr
Zhelp_optionsr9rfror�r�r�rlr�r��
contextlib�contextmanagerr�r�r�r�r�r�r�r�r�rrrrr!sp
�����+��@N	
	K6	
r)�__doc__r�rQ�rerSZdistutils.corerZdistutils.errorsr�rrrZdistutils.dep_utilrZdistutils.extensionrZdistutils.utilr	rLr
Zsiterr�r|r
rrrrr�<module>s$�PKX[5S���5command/__pycache__/install_data.cpython-38.opt-1.pycnu�[���U

e5d�@s<dZddlZddlmZddlmZmZGdd�de�ZdS)z�distutils.command.install_data

Implements the Distutils 'install_data' command, for installing
platform-independent data files.�N)�Command)�change_root�convert_pathc@sHeZdZdZdddgZdgZdd�Zdd	�Zd
d�Zdd
�Z	dd�Z
dS)�install_datazinstall data files)zinstall-dir=�dzIbase directory for installing data files (default: installation base dir))zroot=Nz<install everything relative to this alternate root directory)�force�fz-force installation (overwrite existing files)rcCs,d|_g|_d|_d|_|jj|_d|_dS)Nr�)�install_dir�outfiles�rootrZdistribution�
data_files�warn_dir��self�r�6/usr/lib64/python3.8/distutils/command/install_data.py�initialize_optionss
zinstall_data.initialize_optionscCs|�dddd�dS)NZinstall)rr
)rr)rr)Zset_undefined_optionsrrrr�finalize_options#s
�zinstall_data.finalize_optionscCs�|�|j�|jD]�}t|t�rbt|�}|jrB|�d||jf�|�||j�\}}|j	�
|�qt|d�}tj�
|�s�tj�|j|�}n|jr�t|j|�}|�|�|dgkr�|j	�
|�q|dD](}t|�}|�||�\}}|j	�
|�q�qdS)NzMsetup script did not provide a directory for '%s' -- installing right in '%s'rr	)Zmkpathr
r
�
isinstance�strrr�warnZ	copy_filer�append�os�path�isabs�joinrr)rr�out�_�dir�datarrr�run*s,

�
zinstall_data.runcCs
|jpgS�N)r
rrrr�
get_inputsKszinstall_data.get_inputscCs|jSr")rrrrr�get_outputsNszinstall_data.get_outputsN)�__name__�
__module__�__qualname__ZdescriptionZuser_optionsZboolean_optionsrrr!r#r$rrrrrs�	!r)�__doc__rZdistutils.corerZdistutils.utilrrrrrrr�<module>sPKX[��W�5�5*command/__pycache__/install.cpython-38.pycnu�[���U

&�.e�j�@sdZddlZddlZddlmZddlmZddlmZddl	m
Z
ddlmZddl
mZdd	lmZmZmZdd
lmZddlmZddlmZdd
lmZdZdddddd�Zdddddd�dddddd�ed�Ze�rdddddd�ed <ddd!d"dd�ed#<dZGd$d%�d%e�ZdS)&zFdistutils.command.install

Implements the Distutils 'install' command.�N)�log)�Command)�DEBUG)�get_config_vars)�DistutilsPlatformError)�
write_file)�convert_path�
subst_vars�change_root)�get_platform)�DistutilsOptionError)�	USER_BASE)�	USER_SITETz$base/Lib/site-packagesz$base/Include/$dist_namez
$base/Scriptsz$base)�purelib�platlib�headers�scripts�dataz/$base/lib/python$py_version_short/site-packagesz5$platbase/lib64/python$py_version_short/site-packagesz9$base/include/python$py_version_short$abiflags/$dist_namez	$base/binz$base/lib/pythonz$base/lib64/pythonz$base/include/python/$dist_name)�unix_prefix�	unix_home�ntz	$usersitez4$userbase/Python$py_version_nodot/Include/$dist_namez)$userbase/Python$py_version_nodot/Scriptsz	$userbaseZnt_userz=$userbase/include/python$py_version_short$abiflags/$dist_namez
$userbase/bin�	unix_userc@s:eZdZdZdddddddd	d
ddd
ddddddgZdddgZer`e�dddef�e�d�ddiZ	dd�Z
dd�Zdd �Zd!d"�Z
d#d$�Zd%d&�Zd'd(�Zd)d*�Zd+d,�Zd-d.�Zd/d0�Zd1d2�Zd3d4�Zd5d6�Zd7d8�Zd9d:�Zd;d<�Zd=d>�Zd?d@�ZdAdB�ZdCdD�ZdEefdFefdGefdHefdIdJdK�fgZdS)L�installz'install everything from build directory)zprefix=Nzinstallation prefix)zexec-prefix=Nz.(Unix only) prefix for platform-specific files)zhome=Nz+(Unix only) home directory to install under)z
install-base=Nz;base installation directory (instead of --prefix or --home))zinstall-platbase=Nz\base installation directory for platform-specific files (instead of --exec-prefix or --home))zroot=Nz<install everything relative to this alternate root directory)zinstall-purelib=Nz;installation directory for pure Python module distributions)zinstall-platlib=Nz8installation directory for non-pure module distributions)zinstall-lib=Nzginstallation directory for all module distributions (overrides --install-purelib and --install-platlib))zinstall-headers=Nz(installation directory for C/C++ headers)zinstall-scripts=Nz)installation directory for Python scripts)z
install-data=Nz%installation directory for data files)�compile�czcompile .py to .pyc [default])�
no-compileNzdon't compile .py files)z	optimize=�Ozlalso compile with optimization: -O1 for "python -O", -O2 for "python -OO", and -O0 to disable [default: -O0])�force�fz1force installation (overwrite any existing files))�
skip-buildNz2skip rebuilding everything (for testing/debugging))zrecord=Nz3filename in which to record list of installed filesrrr�userNz!install in user site-package '%s'rcCs�d|_d|_d|_d|_d|_d|_d|_d|_d|_d|_	d|_
d|_d|_t
|_t|_d|_d|_d|_d|_d|_d|_d|_d|_d|_d|_dS)zInitializes options.Nr�)�prefix�exec_prefix�homer �install_base�install_platbase�root�install_purelib�install_platlib�install_headers�install_lib�install_scripts�install_datar
�install_userbaser�install_usersiter�optimize�
extra_path�install_path_filer�
skip_build�warn_dir�
build_base�	build_lib�record��self�r:�1/usr/lib64/python3.8/distutils/command/install.py�initialize_options�s2zinstall.initialize_optionscCsx|js|js|jr&|js|jr&td��|jr@|js8|jr@td��|jrl|jsd|jsd|jsd|jsd|jrltd��tjdkr�|jr�|�	d�d|_|�
d�tjdkr�|��n|��|�
d�t
j��d	}td
d�\}}z
t
j}Wntk
r�d}YnX|j��|j��|j��|d
t
jdd�dt
jdd�|||||d�|_t�rf|j|jd<|j|jd<|��|�
d�|j|jd<|j|jd<t�r�d	dlm}td�||j�|� �|�
d�|j�r�|�!�|j"dk�r�|jj#�r�|j$|_"n|j%|_"|�&dddddddd�|�'�|j"|_(tj)�*|j"|j+�|_"|j,dk	�r\|�-ddddddd�|�
d �|�.d!d"d#�dS)$zFinalizes options.zWmust supply either prefix/exec-prefix/home or install-base/install-platbase -- not bothz9must supply either home or prefix/exec-prefix -- not bothzGcan't combine user with prefix, exec_prefix/home, or install_(plat)base�posixz+exec-prefix option ignored on this platformNzpre-finalize_{unix,other}zpost-finalize_{unix,other}()rr"r#�z%d.%d�z%d%d)Z	dist_nameZdist_versionZ
dist_fullname�
py_versionZpy_version_shortZpy_version_nodotZ
sys_prefixr"Zsys_exec_prefixr#�abiflags�userbaseZusersitezpost-expand_basedirs()�baseZplatbase)�pprintzconfig vars:zpost-expand_dirs()�librrrrrZlibbasezafter prepending root�build)r5r5)r6r6)/r"r#r$r%r&rr �os�name�warn�	dump_dirs�
finalize_unix�finalize_other�sys�version�splitrrA�AttributeError�distributionZget_nameZget_versionZget_fullname�version_info�config_vars�
HAS_USER_SITEr.r/�expand_basedirsrrD�print�expand_dirs�create_home_pathr+Zext_modulesr)r(�
convert_paths�handle_extra_path�install_libbase�path�join�
extra_dirsr'�change_rootsZset_undefined_options)r9r@r"r#rArDr:r:r;�finalize_options�s�������








�






�	�
�zinstall.finalize_optionscCs�tsdSddlm}t�|d�|jD]r}|d}|ddkrL|dd�}||jkrx|j|}|�|�}t||�}n|�|�}t||�}t�d||�q(dS)zDumps the list of user options.Nr)�
longopt_xlate�:����=z  %s: %s)	rZdistutils.fancy_getoptrar�debug�user_options�negative_opt�	translate�getattr)r9�msgra�optZopt_name�valr:r:r;rJus





zinstall.dump_dirscCsV|jdk	s|jdk	r\|jdkr2|jdkr2|jdksP|jdksP|jdksP|jdkrXtd��dS|j	r�|j
dkrttd��|j
|_|_|�d�n�|j
dk	r�|j
|_|_|�d�n�|jdk�r$|jdk	r�td��ttd�s�tjtjks�dtjkr�d	}nd
}tj�tj�||_tj�tj�||_n|jdk�r8|j|_|j|_|j|_|�d�dS)z&Finalizes options for posix platforms.NzPinstall-base or install-platbase supplied, but installation scheme is incomplete�$User base directory is not specifiedrrz*must not supply exec-prefix without prefixZreal_prefix�RPM_BUILD_ROOTz/localr>r)r%r&r+r(r)r*r,r-rr r.r�
select_schemer$r"r#�hasattrrM�base_prefixrG�environr\�normpath)r9Zadditionr:r:r;rK�sZ
������
�

�

��zinstall.finalize_unixcCs�|jr8|jdkrtd��|j|_|_|�tjd�n�|jdk	r\|j|_|_|�d�n\|j	dkrvtj
�tj	�|_	|j	|_|_z|�tj�Wn"t
k
r�tdtj��YnXdS)z)Finalizes options for non-posix platformsNrmZ_userrz)I don't know how to install stuff on '%s')r r.rr%r&rorGrHr$r"r\rsrM�KeyErrorr8r:r:r;rL�s&
�

�zinstall.finalize_othercCs<t|}tD]*}d|}t||�dkrt||||�qdS)z=Sets the install directories by applying the install schemes.�install_N)�INSTALL_SCHEMES�SCHEME_KEYSri�setattr)r9rHZscheme�key�attrnamer:r:r;ro�s
zinstall.select_schemecCsX|D]N}t||�}|dk	rtjdks.tjdkr:tj�|�}t||j�}t|||�qdS)Nr=r)rirGrHr\�
expanduserr	rSrx)r9�attrs�attrrlr:r:r;�
_expand_attrs�s
zinstall._expand_attrscCs|�dddg�dS)zNCalls `os.path.expanduser` on install_base, install_platbase and
        root.r%r&r'N�r~r8r:r:r;rU�szinstall.expand_basedirscCs|�ddddddg�dS)z+Calls `os.path.expanduser` on install dirs.r(r)r+r*r,r-Nrr8r:r:r;rW�s�zinstall.expand_dirscGs,|D]"}d|}t||tt||���qdS)z!Call `convert_path` over `names`.ruN)rxrri�r9�namesrHr}r:r:r;rY�szinstall.convert_pathscCs�|jdkr|jj|_|jdk	r�t�d�t|jt�rB|j�d�|_t|j�dkr`|jd}}n"t|j�dkrz|j\}}ntd��t	|�}nd}d}||_
||_dS)	z4Set `path_file` and `extra_dirs` using `extra_path`.NzIDistribution option extra_path is deprecated. See issue27919 for details.�,r!rr?zY'extra_path' option must be a list, tuple, or comma-separated string with 1 or 2 elementsr>)r1rQrrI�
isinstance�strrO�lenrr�	path_filer^)r9r�r^r:r:r;rZ�s(


��
zinstall.handle_extra_pathc	Gs0|D]&}d|}t||t|jt||���qdS)z:Change the install directories pointed by name using root.ruN)rxr
r'rir�r:r:r;r_szinstall.change_rootscCsb|js
dSttj�d��}|j��D]8\}}|�|�r$tj�|�s$|�	d|�t�
|d�q$dS)zCreate directories under ~.N�~zos.makedirs('%s', 0o700)i�)r rrGr\r{rS�items�
startswith�isdirZdebug_print�makedirs)r9r$rHr\r:r:r;rXszinstall.create_home_pathcCs"|js6|�d�|j�d�j}|jr6|t�kr6td��|��D]}|�|�q>|j	r\|�
�|jr�|��}|j
r�t|j
�}tt|��D]}|||d�||<q�|�t|j|fd|j�ttjjtj�}ttjj|�}tj�tj�|j��}|j�r|j	�r|j�s||k�rt�d|j�dS)zRuns the command.rFz"Can't install when cross-compilingNz'writing list of installed files to '%s'z�modules installed to '%s', which is not in Python's module search path (sys.path) -- you'll have to change the search path yourself)r3Zrun_commandrQZget_command_objZ	plat_namer4rr�get_sub_commandsr��create_path_filer7�get_outputsr'r��range�executer�maprGr\rsrM�normcaser+r2rre)r9Z
build_plat�cmd_name�outputsZroot_lenZcounterZsys_pathr+r:r:r;�run(sD

������zinstall.runcCsJtj�|j|jd�}|jr8|�t||jgfd|�n|�	d|�dS)zCreates the .pth file�.pthzcreating %szpath file '%s' not createdN)
rGr\r]r[r�r2r�rr^rI)r9�filenamer:r:r;r�Ts
�
�zinstall.create_path_filecCshg}|��D].}|�|�}|��D]}||kr"|�|�q"q|jrd|jrd|�tj�|j	|jd��|S)z.Assembles the outputs of all the sub-commands.r�)
r��get_finalized_commandr��appendr�r2rGr\r]r[)r9r�r��cmdr�r:r:r;r�bs
�zinstall.get_outputscCs.g}|��D]}|�|�}|�|���q|S)z*Returns the inputs of all the sub-commands)r�r��extend�
get_inputs)r9Zinputsr�r�r:r:r;r�ss

zinstall.get_inputscCs|j��p|j��S)zSReturns true if the current distribution has any Python
        modules to install.)rQZhas_pure_modulesZhas_ext_modulesr8r:r:r;�has_libs
�zinstall.has_libcCs
|j��S)zLReturns true if the current distribution has any headers to
        install.)rQ�has_headersr8r:r:r;r��szinstall.has_headerscCs
|j��S)zMReturns true if the current distribution has any scripts to.
        install.)rQ�has_scriptsr8r:r:r;r��szinstall.has_scriptscCs
|j��S)zJReturns true if the current distribution has any data to.
        install.)rQZhas_data_filesr8r:r:r;�has_data�szinstall.has_datar+r*r,r-Zinstall_egg_infocCsdS)NTr:r8r:r:r;�<lambda>��zinstall.<lambda>) �__name__�
__module__�__qualname__ZdescriptionrfZboolean_optionsrTr�rrgr<r`rJrKrLror~rUrWrYrZr_rXr�r�r�r�r�r�r�r�Zsub_commandsr:r:r:r;rIsn	�;
�
N3		",
�r)�__doc__rMrGZ	distutilsrZdistutils.corerZdistutils.debugrZdistutils.sysconfigrZdistutils.errorsrZdistutils.file_utilrZdistutils.utilrr	r
rrZsiter
rrTZWINDOWS_SCHEMErvrwrr:r:r:r;�<module>sb�
����
	�
PKX[�]�L0L02command/__pycache__/bdist_rpm.cpython-38.opt-1.pycnu�[���U

e5dIT�@s�dZddlZddlZddlZddlmZddlmZddlm	Z	ddl
mZddlTddl
mZdd	lmZGd
d�de�ZdS)zwdistutils.command.bdist_rpm

Implements the Distutils 'bdist_rpm' command (create RPM source and binary
distributions).�N)�Command)�DEBUG)�get_platform)�
write_file)�*)�get_python_version)�logc)@s�eZdZdZdddddddd	d
ddd
ddddddddddddddddddd d!d"d#d$d%d&d'd(d)d*g)Zd+d,d-d.d/gZd+d,d-d0�Zd1d2�Zd3d4�Zd5d6�Z	d7d8�Z
d9d:�Zd;d<�Zd=d>�Z
d?S)@�	bdist_rpmzcreate an RPM distribution)zbdist-base=Nz/base directory for creating built distributions)z	rpm-base=Nzdbase directory for creating RPMs (defaults to "rpm" under --bdist-base; must be specified for RPM 2))z	dist-dir=�dzDdirectory to put final RPM files in (and .spec files if --spec-only))zpython=NzMpath to Python interpreter to hard-code in the .spec file (default: "python"))z
fix-pythonNzLhard-code the exact path to the current Python interpreter in the .spec file)z	spec-onlyNzonly regenerate spec file)zsource-onlyNzonly generate source RPM)zbinary-onlyNzonly generate binary RPM)z	use-bzip2Nz7use bzip2 instead of gzip to create source distribution)zdistribution-name=Nzgname of the (Linux) distribution to which this RPM applies (*not* the name of the module distribution!))zgroup=Nz9package classification [default: "Development/Libraries"])zrelease=NzRPM release number)zserial=NzRPM serial number)zvendor=NzaRPM "vendor" (eg. "Joe Blow <joe@example.com>") [default: maintainer or author from setup script])z	packager=NzBRPM packager (eg. "Jane Doe <jane@example.net>") [default: vendor])z
doc-files=Nz6list of documentation files (space or comma-separated))z
changelog=Nz
RPM changelog)zicon=Nzname of icon file)z	provides=Nz%capabilities provided by this package)z	requires=Nz%capabilities required by this package)z
conflicts=Nz-capabilities which conflict with this package)zbuild-requires=Nz+capabilities required to build this package)z
obsoletes=Nz*capabilities made obsolete by this package)�
no-autoreqNz+do not automatically calculate dependencies)�	keep-temp�kz"don't clean up RPM build directory)�no-keep-tempNz&clean up RPM build directory [default])�use-rpm-opt-flagsNz8compile with RPM_OPT_FLAGS when building from source RPM)�no-rpm-opt-flagsNz&do not pass any RPM CFLAGS to compiler)�	rpm3-modeNz"RPM 3 compatibility mode (default))�	rpm2-modeNzRPM 2 compatibility mode)zprep-script=Nz3Specify a script for the PREP phase of RPM building)z
build-script=Nz4Specify a script for the BUILD phase of RPM building)zpre-install=Nz:Specify a script for the pre-INSTALL phase of RPM building)zinstall-script=Nz6Specify a script for the INSTALL phase of RPM building)z
post-install=Nz;Specify a script for the post-INSTALL phase of RPM building)zpre-uninstall=Nz<Specify a script for the pre-UNINSTALL phase of RPM building)zpost-uninstall=Nz=Specify a script for the post-UNINSTALL phase of RPM building)z
clean-script=Nz4Specify a script for the CLEAN phase of RPM building)zverify-script=Nz6Specify a script for the VERIFY phase of the RPM build)zforce-arch=Nz0Force an architecture onto the RPM build process)�quiet�qz3Run the INSTALL phase of RPM building in quiet moderrrrr)rrrcCs�d|_d|_d|_d|_d|_d|_d|_d|_d|_d|_	d|_
d|_d|_d|_
d|_d|_d|_d|_d|_d|_d|_d|_d|_d|_d|_d|_d|_d|_d|_d|_d|_d|_d|_ d|_!d|_"d|_#d|_$d|_%d|_&dS)Nr�)'�
bdist_base�rpm_base�dist_dir�python�
fix_python�	spec_only�binary_only�source_only�	use_bzip2�distribution_name�group�release�serial�vendor�packager�	doc_files�	changelog�icon�prep_script�build_script�install_script�clean_script�
verify_script�pre_install�post_install�
pre_uninstall�post_uninstall�prep�provides�requires�	conflicts�build_requires�	obsoletes�	keep_temp�use_rpm_opt_flags�	rpm3_mode�
no_autoreq�
force_archr��self�r>�3/usr/lib64/python3.8/distutils/command/bdist_rpm.py�initialize_options�sNzbdist_rpm.initialize_optionscCs�|�dd�|jdkr6|js$td��tj�|jd�|_|jdkrX|j	rPt
j|_qfd|_n|j	rftd��tjdkr~t
dtj��|jr�|jr�td	��|j��s�d
|_|�dd�|��dS)NZbdist)rrz)you must specify --rpm-base in RPM 2 mode�rpmZpython3z8--python and --fix-python are mutually exclusive options�posixz9don't know how to create RPM distributions on platform %sz6cannot supply both '--source-only' and '--binary-only'r)rr)Zset_undefined_optionsrr9ZDistutilsOptionError�os�path�joinrrr�sys�
executable�nameZDistutilsPlatformErrorrr�distribution�has_ext_modulesr8�finalize_package_datar<r>r>r?�finalize_options�s6
�

�
��
zbdist_rpm.finalize_optionscCsT|�dd�|�dd|j��|j��f�|�d�|�d�t|jt�rxdD]&}tj	�
|�rP||jkrP|j�|�qP|�dd	�|�d
�|�d�|�d�|�|j
�|_
|�d
�|�d�|�d�|�d�|�d�|�d�|�d�|�d�|�d�|�d�|�d�|�d�|�d�|�d�|�d�|�d�dS)Nr zDevelopment/Librariesr#z%s <%s>r$r%)ZREADMEz
README.txtr!�1r"rr&r'r(r)r*r+r,r-r.r/r0r2r3r4r5r6r;)Z
ensure_stringrIZget_contactZget_contact_emailZensure_string_list�
isinstancer%�listrCrD�exists�append�_format_changelogr&Zensure_filename)r=Zreadmer>r>r?rK�sB
��



















zbdist_rpm.finalize_package_datacCs�tr<td�td|j�td|j�td|j�td|j�|jrT|j}|�|�n8i}dD]&}t	j
�|j|�||<|�||�q\|d}t	j
�|d|j
���}|�t||��fd	|�|jr�dS|j
jdd�}|�d
�}|jr�dg|_ndg|_|�d
�||j
_|��d
}|d}|�||�|j�rbt	j
�|j��rT|�|j|�ntd|j��t�d�dg}	|j�r�|	�d�n|j �r�|	�d�n
|	�d�|	�!dd|j"g�|j#�r�|	�!ddt	j
�$|j�g�|j%�s�|	�d�|j&�r|	�d�|	�|�d}
|
d}d|
d}d|||f}
t	�'|
�}zlg}d}|�)�}|�sV�q�|�*��+�}|�|d�|dk�rD|d
}�qD|�(�}|�r�t,d t-|
���W5|�(�X|�.|	�|j/�s�|j
�0��r�t1�}nd!}|j �s(t	j
�|d"|�}|�2||j�t	j
�|j|�}|j
j�d#||f�|j�s�|D]`}t	j
�|d$|�}t	j
�|��r4|�2||j�t	j
�|jt	j
�3|��}|j
j�d#||f��q4dS)%Nzbefore _get_package_data():zvendor =z
packager =zdoc_files =zchangelog =)�SOURCES�SPECSZBUILD�RPMS�SRPMSrTz%s.speczwriting '%s'�sdistZbztarZgztarrrSzicon file '%s' does not existz
building RPMsZrpmbuildz-bsz-bbz-baz--definez__python %sz
_topdir %sz--cleanz--quietz%{name}-%{version}-%{release}z.src.rpmz%{arch}/z.%{arch}.rpmz%rpm -q --qf '%s %s\n' --specfile '%s'rzFailed to execute: %s�anyrVr	rU)4r�printr#r$r%r&rrZmkpathrCrDrErrI�get_nameZexecuter�_make_spec_fileZ
dist_filesZreinitialize_commandrZformatsZrun_commandZget_archive_filesZ	copy_filer'rPZDistutilsFileErrorr�inforrQr�extendrr9�abspathr7r�popen�close�readline�strip�splitZDistutilsExecError�reprZspawnZdry_runrJrZ	move_file�basename)r=Zspec_dirZrpm_dirr
Z	spec_pathZsaved_dist_filesrW�sourceZ
source_dirZrpm_cmdZ
nvr_stringZsrc_rpmZnon_src_rpmZq_cmd�outZbinary_rpmsZ
source_rpm�line�lZstatusZ	pyversionZsrpm�filenamerAr>r>r?�runs����


�

�


�



�

��z
bdist_rpm.runcCstj�|jtj�|��S)N)rCrDrErre)r=rDr>r>r?�
_dist_path�szbdist_rpm._dist_pathc
CsJd|j��d|j���dd�d|j��d|j�dd�dd|j��g}t�d	�}d
�dd�|�	�D��}d
}d}|�||�}||kr�|�
d�|�
d|d
�|�dddg�|jr�|�
d�n
|�
d�|�d|j�
�d|jddg�|j�s|j���s&|�
d�n|�
d|j�dD]V}t||���}t|t��rb|�
d|d�|�f�n|dk	�r*|�
d||f��q*|j��d k�r�|�
d!|j���|j�r�|�
d"|j�|j�r�|�
d#d�|j��|j�r�|�
d$tj�|j��|j�r|�
d%�|�dd&|j��g�d'|jtj�tj d(�f}d)|}	|j!�rXd*|	}	d+|}
d,d-d.|	fd/d0|
fd1d2d3d4d5d6g	}|D]n\}}
}t||
�}|�s�|�r�|�dd7|g�|�r�t"|��}|�|�#��$d
��W5QRXn
|�
|��q�|�dd8d9g�|j%�r$|�
d:d�|j%��|j&�rF|�dd;g�|�|j&�|S)<ziGenerate the text of an RPM spec file and return it as a
        list of strings (one per line).
        z
%define name z%define version �-�_z%define unmangled_version z%define release �z	Summary: zrpm --eval %{__os_install_post}�
cSsg|]}d|���qS)z  %s \)rb)�.0rhr>r>r?�
<listcomp>�s�z-bdist_rpm._make_spec_file.<locals>.<listcomp>zbrp-python-bytecompile \
z%brp-python-bytecompile %{__python} \
z2# Workaround for http://bugs.python.org/issue14443z%define __os_install_post z
Name: %{name}zVersion: %{version}zRelease: %{release}z-Source0: %{name}-%{unmangled_version}.tar.bz2z,Source0: %{name}-%{unmangled_version}.tar.gzz	License: zGroup: z>BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildrootzPrefix: %{_prefix}zBuildArch: noarchz
BuildArch: %s)ZVendorZPackagerZProvidesZRequiresZ	ConflictsZ	Obsoletesz%s: %s� NZUNKNOWNzUrl: zDistribution: zBuildRequires: zIcon: z
AutoReq: 0z%descriptionz%s %srz%s buildzenv CFLAGS="$RPM_OPT_FLAGS" z>%s install -O1 --root=$RPM_BUILD_ROOT --record=INSTALLED_FILES)r1r(z&%setup -n %{name}-%{unmangled_version}Zbuildr)Zinstallr*)Zcleanr+zrm -rf $RPM_BUILD_ROOT)Zverifyscriptr,N)Zprer-N)Zpostr.N)Zpreunr/N)Zpostunr0N�%z%files -f INSTALLED_FILESz%defattr(-,root,root)z%doc z
%changelog)'rIrZZget_version�replacer!Zget_description�
subprocessZ	getoutputrE�
splitlinesrQr]rZget_licenser r;rJ�getattr�lowerrNrOZget_urlrr5r'rCrDrer:Zget_long_descriptionrrF�argvr8�open�readrcr%r&)r=Z	spec_fileZvendor_hookZproblemZfixedZ
fixed_hookZfield�valZdef_setup_callZ	def_buildZinstall_cmdZscript_optionsZrpm_opt�attr�default�fr>r>r?r[�s��

�
	�
�

�
���
�
 ��zbdist_rpm._make_spec_filecCs||s|Sg}|���d�D]N}|��}|ddkrB|�d|g�q|ddkrZ|�|�q|�d|�q|dsx|d=|S)zKFormat the changelog correctly and convert it to a list of strings
        rprrrormz  )rbrcr]rQ)r=r&Z
new_changelogrhr>r>r?rR1szbdist_rpm._format_changelogN)�__name__�
__module__�__qualname__ZdescriptionZuser_optionsZboolean_optionsZnegative_optr@rLrKrkrlr[rRr>r>r>r?r	sx�m��--*r	)�__doc__rvrFrCZdistutils.corerZdistutils.debugrZdistutils.utilrZdistutils.file_utilrZdistutils.errorsZdistutils.sysconfigrZ	distutilsrr	r>r>r>r?�<module>sPKX[���bb5command/__pycache__/install_data.cpython-38.opt-2.pycnu�[���U

e5d�@s8ddlZddlmZddlmZmZGdd�de�ZdS)�N)�Command)�change_root�convert_pathc@sHeZdZdZdddgZdgZdd�Zdd	�Zd
d�Zdd
�Z	dd�Z
dS)�install_datazinstall data files)zinstall-dir=�dzIbase directory for installing data files (default: installation base dir))zroot=Nz<install everything relative to this alternate root directory)�force�fz-force installation (overwrite existing files)rcCs,d|_g|_d|_d|_|jj|_d|_dS)Nr�)�install_dir�outfiles�rootrZdistribution�
data_files�warn_dir��self�r�6/usr/lib64/python3.8/distutils/command/install_data.py�initialize_optionss
zinstall_data.initialize_optionscCs|�dddd�dS)NZinstall)rr
)rr)rr)Zset_undefined_optionsrrrr�finalize_options#s
�zinstall_data.finalize_optionscCs�|�|j�|jD]�}t|t�rbt|�}|jrB|�d||jf�|�||j�\}}|j	�
|�qt|d�}tj�
|�s�tj�|j|�}n|jr�t|j|�}|�|�|dgkr�|j	�
|�q|dD](}t|�}|�||�\}}|j	�
|�q�qdS)NzMsetup script did not provide a directory for '%s' -- installing right in '%s'rr	)Zmkpathr
r
�
isinstance�strrr�warnZ	copy_filer�append�os�path�isabs�joinrr)rr�out�_�dir�datarrr�run*s,

�
zinstall_data.runcCs
|jpgS�N)r
rrrr�
get_inputsKszinstall_data.get_inputscCs|jSr")rrrrr�get_outputsNszinstall_data.get_outputsN)�__name__�
__module__�__qualname__ZdescriptionZuser_optionsZboolean_optionsrrr!r#r$rrrrrs�	!r)rZdistutils.corerZdistutils.utilrrrrrrr�<module>sPKX[<<�

3command/__pycache__/bdist_dumb.cpython-38.opt-1.pycnu�[���U

e5d1�@shdZddlZddlmZddlmZddlmZmZddl	Tddl
mZddlm
Z
Gd	d
�d
e�ZdS)z�distutils.command.bdist_dumb

Implements the Distutils 'bdist_dumb' command (create a "dumb" built
distribution -- i.e., just an archive to be unpacked under $prefix or
$exec_prefix).�N)�Command)�get_platform)�remove_tree�ensure_relative)�*)�get_python_version)�logc	@s^eZdZdZdddde�fdddd	d
ddg	Zd
ddgZddd�Zdd�Zdd�Z	dd�Z
dS)�
bdist_dumbz"create a "dumb" built distribution)z
bdist-dir=�dz1temporary directory for creating the distributionz
plat-name=�pz;platform name to embed in generated filenames (default: %s))zformat=�fz>archive format to create (tar, gztar, bztar, xztar, ztar, zip))�	keep-temp�kzPkeep the pseudo-installation tree around after creating the distribution archive)z	dist-dir=r
z-directory to put final built distributions in)�
skip-buildNz2skip rebuilding everything (for testing/debugging))�relativeNz7build the archive using relative paths (default: false))zowner=�uz@Owner name used when creating a tar file [default: current user])zgroup=�gzAGroup name used when creating a tar file [default: current group]r
rrZgztar�zip)�posix�ntcCs:d|_d|_d|_d|_d|_d|_d|_d|_d|_dS)Nr)	�	bdist_dir�	plat_name�format�	keep_temp�dist_dir�
skip_buildr�owner�group)�self�r�4/usr/lib64/python3.8/distutils/command/bdist_dumb.py�initialize_options2szbdist_dumb.initialize_optionscCsz|jdkr&|�d�j}tj�|d�|_|jdkrfz|jtj|_Wn"t	k
rdt
dtj��YnX|�dddd�dS)NZbdistZdumbz@don't know how to create dumb built distributions on platform %s)rr)rr)rr)rZget_finalized_command�
bdist_base�os�path�joinr�default_format�name�KeyError�DistutilsPlatformErrorZset_undefined_options)rr"rrr �finalize_options=s"

��
�zbdist_dumb.finalize_optionscCs(|js|�d�|jddd�}|j|_|j|_d|_t�d|j�|�d�d|j�	�|j
f}tj�
|j|�}|js~|j}nJ|j��r�|j|jkr�tdt|j�t|j�f��ntj�
|jt|j��}|j||j||j|jd	�}|j��r�t�}nd
}|jj�d||f�|j�s$t|j|jd�dS)
NZbuild�install�)Zreinit_subcommandsrzinstalling to %sz%s.%szScan't make a dumb built distribution where base and platbase are different (%s, %s))Zroot_dirrr�anyr	)�dry_run) rZrun_commandZreinitialize_commandr�rootZwarn_dirr�infoZdistributionZget_fullnamerr#r$r%rrZhas_ext_modulesZinstall_baseZinstall_platbaser)�reprrZmake_archiverrrrZ
dist_files�appendrrr.)rr+Zarchive_basenameZpseudoinstall_rootZarchive_root�filenameZ	pyversionrrr �runOsR


�

����
��
�zbdist_dumb.runN)�__name__�
__module__�__qualname__ZdescriptionrZuser_optionsZboolean_optionsr&r!r*r4rrrr r	s,���
�r	)�__doc__r#Zdistutils.corerZdistutils.utilrZdistutils.dir_utilrrZdistutils.errorsZdistutils.sysconfigrZ	distutilsrr	rrrr �<module>sPKX[�G�N��3command/__pycache__/install_egg_info.cpython-38.pycnu�[���U

e5d+
�@sddZddlmZddlmZmZddlZddlZddlZGdd�de�Z	dd�Z
d	d
�Zdd�ZdS)
z�distutils.command.install_egg_info

Implements the Distutils 'install_egg_info' command, for installing
a package's PKG-INFO metadata.�)�Command)�log�dir_utilNc@s:eZdZdZdZdgZdd�Zdd�Zdd	�Zd
d�Z	dS)
�install_egg_infoz)Install an .egg-info file for the packagez8Install package's PKG-INFO metadata as an .egg-info file)zinstall-dir=�dzdirectory to install tocCs
d|_dS�N)�install_dir��self�r�:/usr/lib64/python3.8/distutils/command/install_egg_info.py�initialize_optionssz#install_egg_info.initialize_optionscCsb|�dd�dtt|j����tt|j����ftjdd��}t	j
�|j|�|_
|j
g|_dS)NZinstall_lib)rrz%s-%s-py%d.%d.egg-info�)Zset_undefined_options�to_filename�	safe_name�distributionZget_name�safe_versionZget_version�sys�version_info�os�path�joinr�target�outputs)r
�basenamerrr�finalize_optionss��z!install_egg_info.finalize_optionsc	Cs�|j}tj�|�r0tj�|�s0tj||jd�nNtj�|�rV|�	tj
|jfd|�n(tj�|j�s~|�	tj|jfd|j�t
�d|�|js�t|ddd��}|jj�|�W5QRXdS)N)�dry_runz	Removing z	Creating z
Writing %s�wzUTF-8)�encoding)rrr�isdir�islinkrZremove_treer�existsZexecute�unlinkr�makedirsr�info�openrZmetadataZwrite_pkg_file)r
r�frrr�run s�zinstall_egg_info.runcCs|jSr)rr	rrr�get_outputs.szinstall_egg_info.get_outputsN)
�__name__�
__module__�__qualname__�__doc__ZdescriptionZuser_optionsr
rr'r(rrrrrs�
rcCst�dd|�S)z�Convert an arbitrary string to a standard distribution name

    Any runs of non-alphanumeric/. characters are replaced with a single '-'.
    �[^A-Za-z0-9.]+�-)�re�sub��namerrrr6srcCs|�dd�}t�dd|�S)z�Convert an arbitrary string to a standard version string

    Spaces become dots, and all other non-alphanumeric characters become
    dashes, with runs of multiple dashes condensed to a single dash.
    � �.r-r.)�replacer/r0)�versionrrrr>srcCs|�dd�S)z|Convert a project or version name to its filename-escaped form

    Any '-' characters are currently replaced with '_'.
    r.�_)r5r1rrrrHsr)
r,Z
distutils.cmdrZ	distutilsrrrrr/rrrrrrrr�<module>s+
PKX[�̵ή�8command/__pycache__/install_headers.cpython-38.opt-1.pycnu�[���U

e5d�@s$dZddlmZGdd�de�ZdS)z�distutils.command.install_headers

Implements the Distutils 'install_headers' command, to install C/C++ header
files to the Python include directory.�)�Commandc@sFeZdZdZddgZdgZdd�Zdd�Zd	d
�Zdd�Z	d
d�Z
dS)�install_headerszinstall C/C++ header files)zinstall-dir=�dz$directory to install header files to)�force�fz-force installation (overwrite existing files)rcCsd|_d|_g|_dS)Nr)�install_dirr�outfiles��self�r�9/usr/lib64/python3.8/distutils/command/install_headers.py�initialize_optionssz"install_headers.initialize_optionscCs|�ddd�dS)NZinstall)rr)rr)Zset_undefined_optionsr	rrr�finalize_optionss�z install_headers.finalize_optionscCsH|jj}|sdS|�|j�|D]"}|�||j�\}}|j�|�q dS�N)�distribution�headersZmkpathrZ	copy_filer�append)r
r�header�out�_rrr�run!szinstall_headers.runcCs|jjp
gSr)rrr	rrr�
get_inputs+szinstall_headers.get_inputscCs|jSr)rr	rrr�get_outputs.szinstall_headers.get_outputsN)�__name__�
__module__�__qualname__ZdescriptionZuser_optionsZboolean_optionsr
rrrrrrrrr
s�
rN)�__doc__Zdistutils.corerrrrrr�<module>sPKX[Utw~�
�
.command/__pycache__/bdist.cpython-38.opt-2.pycnu�[���U

e5d��@sDddlZddlmZddlTddlmZdd�ZGdd�de�ZdS)	�N)�Command)�*)�get_platformcCsPddlm}g}tjD]"}|�d|dtj|df�q||�}|�d�dS)Nr)�FancyGetopt�formats=�z'List of available distribution formats:)Zdistutils.fancy_getoptr�bdist�format_commands�append�format_commandZ
print_help)r�formats�formatZpretty_printer�r�//usr/lib64/python3.8/distutils/command/bdist.py�show_formatss
�rc
@s�eZdZdZdddde�fdddd	d
gZdgZdd
defgZdZ	ddd�Z
dddddddddg	Zddddddd d!d"d#�	Zd$d%�Z
d&d'�Zd(d)�Zd
S)*rz$create a built (binary) distribution)zbdist-base=�bz4temporary directory for creating built distributionsz
plat-name=�pz;platform name to embed in generated filenames (default: %s))rNz/formats for distribution (comma-separated list))z	dist-dir=�dz=directory to put final built distributions in [default: dist])�
skip-buildNz2skip rebuilding everything (for testing/debugging))zowner=�uz@Owner name used when creating a tar file [default: current user])zgroup=�gzAGroup name used when creating a tar file [default: current group]rzhelp-formatsNz$lists available distribution formats)�	bdist_rpm�gztar�zip)�posix�nt�rpm�bztar�xztar�ztar�tar�wininst�msi)rzRPM distribution)�
bdist_dumbzgzip'ed tar file)r#zbzip2'ed tar file)r#zxz'ed tar file)r#zcompressed tar file)r#ztar file)Z
bdist_wininstzWindows executable installer)r#zZIP file)Z	bdist_msizMicrosoft Installer)	rrrrrr r!rr"cCs.d|_d|_d|_d|_d|_d|_d|_dS)Nr)�
bdist_base�	plat_namer�dist_dir�
skip_build�group�owner)�selfrrr�initialize_optionsQszbdist.initialize_optionscCs�|jdkr(|jrt�|_n|�d�j|_|jdkrT|�d�j}tj�|d|j�|_|�	d�|j
dkr�z|jtjg|_
Wn"t
k
r�tdtj��YnX|jdkr�d|_dS)NZbuildzbdist.rz;don't know how to create built distributions on platform %sZdist)r%r'rZget_finalized_commandr$�
build_base�os�path�joinZensure_string_listr�default_format�name�KeyErrorZDistutilsPlatformErrorr&)r*r,rrr�finalize_optionsZs*


�

��

zbdist.finalize_optionsc	Cs�g}|jD]>}z|�|j|d�Wq
tk
rFtd|��Yq
Xq
tt|j��D]h}||}|�|�}||jkr�|j||_	|dkr�|j
|_
|j|_|||dd�kr�d|_|�
|�qXdS)Nrzinvalid format '%s'r#r)rr
rr2ZDistutilsOptionError�range�lenZreinitialize_command�no_format_optionr
r)r(Z	keep_tempZrun_command)r*Zcommandsr
�iZcmd_nameZsub_cmdrrr�runvs"


z	bdist.run)�__name__�
__module__�__qualname__ZdescriptionrZuser_optionsZboolean_optionsrZhelp_optionsr6r0r	rr+r3r8rrrrrsR��������
	r)r-Zdistutils.corerZdistutils.errorsZdistutils.utilrrrrrrr�<module>s
PKX[���__2command/__pycache__/install_scripts.cpython-38.pycnu�[���U

e5d��@sDdZddlZddlmZddlmZddlmZGdd�de�ZdS)zudistutils.command.install_scripts

Implements the Distutils 'install_scripts' command, for installing
Python scripts.�N)�Command)�log)�ST_MODEc@sLeZdZdZddddgZddgZdd	�Zd
d�Zdd
�Zdd�Z	dd�Z
dS)�install_scriptsz%install scripts (Python or otherwise))zinstall-dir=�dzdirectory to install scripts to)z
build-dir=�bz'build directory (where to install from))�force�fz-force installation (overwrite existing files))�
skip-buildNzskip the build stepsrr
cCsd|_d|_d|_d|_dS)Nr)�install_dirr�	build_dir�
skip_build��self�r�9/usr/lib64/python3.8/distutils/command/install_scripts.py�initialize_optionssz"install_scripts.initialize_optionscCs |�dd�|�dddd�dS)NZbuild)�
build_scriptsrZinstall)rr)rr)r
r
)Zset_undefined_optionsrrrr�finalize_options!s�z install_scripts.finalize_optionscCs�|js|�d�|�|j|j�|_tjdkr~|��D]H}|j	rLt
�d|�q4t�|�t
dBd@}t
�d||�t�||�q4dS)Nr�posixzchanging mode of %simi�zchanging mode of %s to %o)r
Zrun_commandZ	copy_treerr�outfiles�os�name�get_outputsZdry_runr�info�statr�chmod)r�file�moderrr�run)s

zinstall_scripts.runcCs|jjp
gS�N)ZdistributionZscriptsrrrr�
get_inputs8szinstall_scripts.get_inputscCs
|jpgSr )rrrrrr;szinstall_scripts.get_outputsN)�__name__�
__module__�__qualname__ZdescriptionZuser_optionsZboolean_optionsrrrr!rrrrrrs�r)	�__doc__rZdistutils.corerZ	distutilsrrrrrrrr�<module>s
PKX[&�p�!!1command/__pycache__/__init__.cpython-38.opt-1.pycnu�[���U

e5d�@s2dZddddddddd	d
ddd
ddddddgZdS)z\distutils.command

Package containing implementation of all the standard Distutils
commands.ZbuildZbuild_pyZ	build_extZ
build_clibZ
build_scriptsZcleanZinstallZinstall_libZinstall_headersZinstall_scriptsZinstall_dataZsdist�registerZbdistZ
bdist_dumbZ	bdist_rpmZ
bdist_wininstZcheckZuploadN)�__doc__�__all__�rr�2/usr/lib64/python3.8/distutils/command/__init__.py�<module>s(�PKX[5����/command/__pycache__/upload.cpython-38.opt-2.pycnu�[���U

&�.e��@s�ddlZddlZddlZddlZddlmZddlmZmZm	Z	ddl
mZddlm
Z
mZddlmZddlmZddlmZGd	d
�d
e�ZdS)�N)�standard_b64encode)�urlopen�Request�	HTTPError)�urlparse)�DistutilsError�DistutilsOptionError)�
PyPIRCCommand)�spawn)�logc@sJeZdZdZejddgZejdgZdd�Zdd�Zd	d
�Z	dd�Z
d
S)�uploadzupload binary package to PyPI)�sign�szsign files to upload using gpg)z	identity=�izGPG identity used to sign filesr
cCs,t�|�d|_d|_d|_d|_d|_dS)N�rF)r	�initialize_options�username�password�
show_responser
�identity)�self�r�0/usr/lib64/python3.8/distutils/command/upload.pyr s
zupload.initialize_optionscCsrt�|�|jr|jstd��|��}|ikrV|d|_|d|_|d|_|d|_	|jsn|j
jrn|j
j|_dS)Nz.Must use --sign for --identity to have meaningrr�
repository�realm)r	�finalize_optionsrr
rZ_read_pypircrrrr�distribution)rZconfigrrrr(s
�



zupload.finalize_optionscCs:|jjsd}t|��|jjD]\}}}|�|||�qdS)NzHMust create and upload files in one command (e.g. setup.py sdist upload))rZ
dist_filesr�upload_file)r�msg�command�	pyversion�filenamerrr�run:s
z
upload.runc"Cst|j�\}}}}}}	|s"|s"|	r0td|j��|dkrDtd|��|jr|ddd|g}
|jrnd|jg|
dd�<t|
|jd	�t|d
�}z|�	�}W5|��X|j
j}
dd|
��|
�
�tj�|�|f||t�|���d
|
��|
��|
��|
��|
��|
��|
��|
��|
��|
��|
��|
��|
� �d�}zt�!|���}WnPt"k
�r�}z0d|}|�#|t$j%�ddl&m'}|��s|�W5d}~XYn
X||d<d|d<|j�r�t|dd
��"}tj�|�d|�	�f|d<W5QRX|j(d|j)�*d�}dt+|��,d�}d}d|�*d�}|d}t-�.�}|�/�D]�\}}d|}t0|t1��sP|g}|D]j}t2|�t3k�r�|d|d7}|d}nt4|��*d �}|�5|�|�5|�*d ��|�5d!�|�5|��qT�q.|�5|�|�6�}d"||jf}|�#|t$j%�d#|t4t7|��|d$�}t8|j||d%�}zt9|�}|�:�}|j;} Wnft<k
�rd}z|j=}|j;} W5d}~XYn8t>k
�r�}z|�#t4|�t$j?��W5d}~XYnX|d&k�r�|�#d'|| ft$j%�|j@�r|�A|�}!d(�Bd)|!d)f�}|�#|t$j%�n"d*|| f}|�#|t$j?�tC|��dS)+NzIncompatible url %s)ZhttpZhttpszunsupported schema Zgpgz
--detach-signz-az--local-user�)�dry_run�rbZfile_upload�1z1.0)z:actionZprotocol_version�name�version�contentZfiletyper Z
sha256_digestZmetadata_versionZsummaryZ	home_pageZauthorZauthor_email�license�description�keywords�platformZclassifiersZdownload_urlZprovidesZrequiresZ	obsoletesz#calculating md5 checksum failed: %sr)�
get_fips_modeZ
md5_digestrZcommentz.ascZ
gpg_signature�:�asciizBasic z3--------------GHSKFJDLGDS7543FJKLFHRE75642756743254s
--s--
z+
Content-Disposition: form-data; name="%s"z; filename="%s"�zutf-8s

zSubmitting %s to %sz multipart/form-data; boundary=%s)zContent-typezContent-lengthZ
Authorization)�data�headers��zServer response (%s): %s�
zK---------------------------------------------------------------------------zUpload failed (%s): %s)Drr�AssertionErrorr
rr
r$�open�close�readrZmetadataZget_nameZget_version�os�path�basename�hashlibZsha256Z	hexdigestZget_descriptionZget_urlZget_contactZget_contact_emailZget_licenceZget_long_descriptionZget_keywordsZ
get_platformsZget_classifiersZget_download_urlZget_providesZget_requiresZ
get_obsoletesZmd5�
ValueErrorZannouncer�INFOZ_hashlibr.rr�encoder�decode�io�BytesIO�items�
isinstance�list�type�tuple�str�write�getvalue�lenrrZgetcoderr�code�OSErrorZERRORrZ_read_pypi_response�joinr)"rrr r!ZschemaZnetlocZurlZparamsZqueryZ	fragmentsZgpg_args�fr)�metar2Zdigest�err.Z	user_passZauth�boundaryZsep_boundaryZend_boundaryZbody�key�value�titler3Zrequest�resultZstatus�reason�textrrrrBs���

�!�




��

�
zupload.upload_fileN)�__name__�
__module__�__qualname__r+r	Zuser_optionsZboolean_optionsrrr"rrrrrrs�r)r:rBr-r=�base64rZurllib.requestrrrZurllib.parserZdistutils.errorsrrZdistutils.corer	Zdistutils.spawnr
Z	distutilsrrrrrr�<module>sPKX[��˄66(command/__pycache__/clean.cpython-38.pycnu�[���U

e5d�
�@sDdZddlZddlmZddlmZddlmZGdd�de�ZdS)zBdistutils.command.clean

Implements the Distutils 'clean' command.�N)�Command)�remove_tree)�logc@s>eZdZdZddddddgZdgZd	d
�Zdd�Zd
d�ZdS)�cleanz-clean up temporary files from 'build' command)zbuild-base=�bz2base build directory (default: 'build.build-base'))z
build-lib=Nz<build directory for all modules (default: 'build.build-lib'))zbuild-temp=�tz7temporary build directory (default: 'build.build-temp'))zbuild-scripts=Nz<build directory for scripts (default: 'build.build-scripts'))zbdist-base=Nz+temporary directory for built distributions)�all�az7remove all build output, not just temporary by-productsrcCs(d|_d|_d|_d|_d|_d|_dS)N)�
build_base�	build_lib�
build_temp�
build_scripts�
bdist_baser��self�r�//usr/lib64/python3.8/distutils/command/clean.py�initialize_options szclean.initialize_optionscCs"|�ddddd�|�dd�dS)NZbuild)r
r
)rr)r
r
)rrZbdist)rr)Zset_undefined_optionsrrrr�finalize_options(s��zclean.finalize_optionscCs�tj�|j�r t|j|jd�nt�d|j�|jrr|j	|j
|jfD],}tj�|�rdt||jd�qDt�d|�qD|js�zt�
|j�t�d|j�Wntk
r�YnXdS)N)�dry_runz%'%s' does not exist -- can't clean itz
removing '%s')�os�path�existsrrrr�debugrrrr
�warn�rmdirr
�info�OSError)rZ	directoryrrr�run1s*���z	clean.runN)	�__name__�
__module__�__qualname__ZdescriptionZuser_optionsZboolean_optionsrrrrrrrrs�	r)	�__doc__rZdistutils.corerZdistutils.dir_utilrZ	distutilsrrrrrr�<module>s
PKX[�)"���3command/__pycache__/build_clib.cpython-38.opt-1.pycnu�[���U

e5dV�@sTdZddlZddlmZddlTddlmZddlmZdd�Z	Gd	d
�d
e�Z
dS)z�distutils.command.build_clib

Implements the Distutils 'build_clib' command, to build a C/C++ library
that is included in the module distribution and needed by an extension
module.�N)�Command)�*)�customize_compiler)�logcCsddlm}|�dS)Nr��show_compilers)�distutils.ccompilerrr�r	�4/usr/lib64/python3.8/distutils/command/build_clib.pyrsrc@sleZdZdZdddddgZddgZd	d
defgZdd
�Zdd�Z	dd�Z
dd�Zdd�Zdd�Z
dd�Zd
S)�
build_clibz/build C/C++ libraries used by Python extensions)zbuild-clib=�bz%directory to build C/C++ libraries to)zbuild-temp=�tz,directory to put temporary build by-products)�debug�gz"compile with debugging information)�force�fz2forcibly build everything (ignore file timestamps))z	compiler=�czspecify the compiler typerrz
help-compilerNzlist available compilerscCs:d|_d|_d|_d|_d|_d|_d|_d|_d|_dS)Nr)	r�
build_temp�	libraries�include_dirs�define�undefrr�compiler��selfr	r	r
�initialize_options4szbuild_clib.initialize_optionscCsh|�dddddd�|jj|_|jr0|�|j�|jdkrH|jjpDg|_t|jt�rd|j�tj	�|_dS)NZbuild)rr)rr)rr)rr)rr)
Zset_undefined_optionsZdistributionr�check_library_listr�
isinstance�str�split�os�pathseprr	r	r
�finalize_optionsDs�

zbuild_clib.finalize_optionscCs�|js
dSddlm}||j|j|jd�|_t|j�|jdk	rN|j�|j�|j	dk	rv|j	D]\}}|j�
||�q^|jdk	r�|jD]}|j�|�q�|�
|j�dS)Nr)�new_compiler)r�dry_runr)rrr#rr$rrrZset_include_dirsrZdefine_macrorZundefine_macro�build_libraries)rr#�name�valueZmacror	r	r
�run^s"�




zbuild_clib.runcCs�t|t�std��|D]z}t|t�s8t|�dkr8td��|\}}t|t�sRtd��d|ksntjdkr~tj|kr~td|d��t|t�std��qd	S)
a`Ensure that the list of libraries is valid.

        `library` is presumably provided as a command option 'libraries'.
        This method checks that it is a list of 2-tuples, where the tuples
        are (library_name, build_info_dict).

        Raise DistutilsSetupError if the structure is invalid anywhere;
        just returns otherwise.
        z+'libraries' option must be a list of tuples�z*each element of 'libraries' must a 2-tuplezNfirst element of each tuple in 'libraries' must be a string (the library name)�/z;bad library name '%s': may not contain directory separatorsrzMsecond element of each tuple in 'libraries' must be a dictionary (build info)N)	r�list�DistutilsSetupError�tuple�lenrr �sep�dict)rr�libr&�
build_infor	r	r
rvs,

��
��
�zbuild_clib.check_library_listcCs,|js
dSg}|jD]\}}|�|�q|S)N)r�append)rZ	lib_names�lib_namer2r	r	r
�get_library_names�szbuild_clib.get_library_namescCsZ|�|j�g}|jD]>\}}|�d�}|dks>t|ttf�sJtd|��|�|�q|S)N�sources�fin 'libraries' option (library '%s'), 'sources' must be present and must be a list of source filenames)rr�getrr+r-r,�extend)r�	filenamesr4r2r6r	r	r
�get_source_files�s
��zbuild_clib.get_source_filescCs�|D]�\}}|�d�}|dks,t|ttf�s8td|��t|�}t�d|�|�d�}|�d�}|jj||j	|||j
d�}|jj|||j|j
d�qdS)Nr6r7zbuilding '%s' library�macrosr)�
output_dirr<rr)r=r)
r8rr+r-r,r�infor�compilerrZcreate_static_libr)rrr4r2r6r<rZobjectsr	r	r
r%�s,
��

�	
�zbuild_clib.build_libraries)�__name__�
__module__�__qualname__ZdescriptionZuser_optionsZboolean_optionsrZhelp_optionsrr"r(rr5r;r%r	r	r	r
rs(�
��$r)�__doc__r Zdistutils.corerZdistutils.errorsZdistutils.sysconfigrZ	distutilsrrrr	r	r	r
�<module>sPKX[&�p�!!+command/__pycache__/__init__.cpython-38.pycnu�[���U

e5d�@s2dZddddddddd	d
ddd
ddddddgZdS)z\distutils.command

Package containing implementation of all the standard Distutils
commands.ZbuildZbuild_pyZ	build_extZ
build_clibZ
build_scriptsZcleanZinstallZinstall_libZinstall_headersZinstall_scriptsZinstall_dataZsdist�registerZbdistZ
bdist_dumbZ	bdist_rpmZ
bdist_wininstZcheckZuploadN)�__doc__�__all__�rr�2/usr/lib64/python3.8/distutils/command/__init__.py�<module>s(�PKX[g[a&��4command/__pycache__/install_lib.cpython-38.opt-1.pycnu�[���U

e5d� �@sLdZddlZddlZddlZddlmZddlmZdZ	Gdd�de�Z
dS)zkdistutils.command.install_lib

Implements the Distutils 'install_lib' command
(install all Python modules).�N)�Command)�DistutilsOptionErrorz.pyc@s�eZdZdZdddddddgZd	d
dgZdd
iZd
d�Zdd�Zdd�Z	dd�Z
dd�Zdd�Zdd�Z
dd�Zdd�Zdd �Zd!S)"�install_libz7install all Python modules (extensions and pure Python))zinstall-dir=�dzdirectory to install to)z
build-dir=�bz'build directory (where to install from))�force�fz-force installation (overwrite existing files))�compile�czcompile .py to .pyc [default])�
no-compileNzdon't compile .py files)z	optimize=�Ozlalso compile with optimization: -O1 for "python -O", -O2 for "python -OO", and -O0 to disable [default: -O0])�
skip-buildNzskip the build stepsrr	r
rcCs(d|_d|_d|_d|_d|_d|_dS)Nr)�install_dir�	build_dirrr	�optimize�
skip_build��self�r�5/usr/lib64/python3.8/distutils/command/install_lib.py�initialize_options3szinstall_lib.initialize_optionsc	Cs�|�ddddddd�|jdkr&d|_|jdkr6d	|_t|jt�s�zt|j�|_|jd
kr^t�Wn ttfk
r�td��YnXdS)N�install)�	build_libr)rr)rr)r	r	)rr)rrTF)r��zoptimize must be 0, 1, or 2)Zset_undefined_optionsr	r�
isinstance�int�AssertionError�
ValueErrorrrrrr�finalize_options<s&�	


zinstall_lib.finalize_optionscCs0|��|��}|dk	r,|j��r,|�|�dS�N)�buildr�distribution�has_pure_modules�byte_compile�rZoutfilesrrr�runVszinstall_lib.runcCs2|js.|j��r|�d�|j��r.|�d�dS)N�build_py�	build_ext)rr"r#Zrun_command�has_ext_modulesrrrrr!fs



zinstall_lib.buildcCs8tj�|j�r |�|j|j�}n|�d|j�dS|S)Nz3'%s' does not exist -- no Python modules to install)�os�path�isdirrZ	copy_treer�warnr%rrrrms�zinstall_lib.installcCsrtjr|�d�dSddlm}|�d�j}|jrH||d|j||j	d�|j
dkrn|||j
|j||j|j	d�dS)Nz%byte-compiling is disabled, skipping.r)r$r)rr�prefix�dry_run)rrr.�verboser/)�sys�dont_write_bytecoder-Zdistutils.utilr$�get_finalized_command�rootr	rr/rr0)r�filesr$Zinstall_rootrrrr$vs$
�
�zinstall_lib.byte_compilec
	Csd|sgS|�|�}|��}t||�}t|�ttj�}g}|D] }	|�tj�||	|d���q>|Sr )	r3�get_outputs�getattr�lenr*�sep�appendr+�join)
rZhas_anyZ	build_cmdZ
cmd_optionZ
output_dirZbuild_filesr�
prefix_lenZoutputs�filerrr�_mutate_outputs�s

zinstall_lib._mutate_outputscCsrg}|D]d}tj�tj�|��d}|tkr.q|jrJ|�tjj	|dd��|j
dkr|�tjj	||j
d��q|S)Nr�)�optimizationr)r*r+�splitext�normcase�PYTHON_SOURCE_EXTENSIONr	r:�	importlib�util�cache_from_sourcer)rZpy_filenamesZbytecode_filesZpy_fileZextrrr�_bytecode_filenames�s 
�

�
zinstall_lib._bytecode_filenamescCsR|�|j��dd|j�}|jr*|�|�}ng}|�|j��dd|j�}|||S)z�Return the list of files that would be installed if this command
        were actually run.  Not affected by the "dry-run" flag or whether
        modules have actually been built yet.
        r'rr()r>r"r#rr	rGr))rZpure_outputsZbytecode_outputsZext_outputsrrrr6�s ����zinstall_lib.get_outputscCsLg}|j��r&|�d�}|�|���|j��rH|�d�}|�|���|S)z�Get the list of files that are input to this command, ie. the
        files that get installed as they are named in the build tree.
        The files in this list correspond one-to-one to the output
        filenames returned by 'get_outputs()'.
        r'r()r"r#r3�extendr6r))rZinputsr'r(rrr�
get_inputs�s



zinstall_lib.get_inputsN)�__name__�
__module__�__qualname__ZdescriptionZuser_optionsZboolean_optionsZnegative_optrrr&r!rr$r>rGr6rIrrrrrs*�
		r)�__doc__r*�importlib.utilrDr1Zdistutils.corerZdistutils.errorsrrCrrrrr�<module>sPKX[*���6command/__pycache__/build_scripts.cpython-38.opt-1.pycnu�[���U

e5dX�@s�dZddlZddlZddlmZddlmZddlmZddl	m
Z
ddlmZm
Z
ddlmZddlZe�d	�ZGd
d�de�ZGdd
�d
ee
�ZdS)zRdistutils.command.build_scripts

Implements the Distutils 'build_scripts' command.�N)�ST_MODE)�	sysconfig)�Command)�newer)�convert_path�	Mixin2to3)�logs^#!.*python[0-9.]*([ 	].*)?$c@sHeZdZdZdddgZdgZdd�Zdd	�Zd
d�Zdd
�Z	dd�Z
dS)�
build_scriptsz("build" scripts (copy and fixup #! line))z
build-dir=�dzdirectory to "build" (copy) to)�force�fz1forcibly build everything (ignore file timestamps)zexecutable=�ez*specify final destination interpreter pathrcCs"d|_d|_d|_d|_d|_dS�N)�	build_dir�scriptsr�
executable�outfiles��self�r�7/usr/lib64/python3.8/distutils/command/build_scripts.py�initialize_optionss
z build_scripts.initialize_optionscCs|�dddd�|jj|_dS)NZbuild)r	r)rr)rr)Zset_undefined_optionsZdistributionrrrrr�finalize_options%s�zbuild_scripts.finalize_optionscCs|jSr)rrrrr�get_source_files,szbuild_scripts.get_source_filescCs|js
dS|��dSr)r�copy_scriptsrrrr�run/szbuild_scripts.runc
Cs�|�|j�g}g}|jD�]}d}t|�}tj�|jtj�|��}|�|�|j	slt
||�slt�d|�qzt
|d�}Wn tk
r�|js��d}YnXXt�|j�\}}|�d�|��}	|	s�|�d|�qt�|	�}
|
r�d}|
�d�p�d	}|�rt�d
||j�|�|�|j�stj�s*|j}n(tj�t�d�dt�d
�t�d�f�}t�|�}d||d}
z|
�d�Wn$tk
�r�t d�!|
���YnXz|
�|�Wn&tk
�r�t d�!|
|���YnXt
|d��}|�"|
�|�#|�$��W5QRX|�r8|�%�q|�r"|�%�|�|�|�&||�qtj'dk�r�|D]`}|j�rdt�d|�nDt�(|�t)d@}|dBd@}||k�rJt�d|||�t�*||��qJ||fS)a"Copy each script listed in 'self.scripts'; if it's marked as a
        Python script in the Unix way (first line matches 'first_line_re',
        ie. starts with "\#!" and contains "python"), then adjust the first
        line to refer to the current Python interpreter as we copy.
        Fznot copying %s (up-to-date)�rbNrz%s is an empty file (skipping)T��zcopying and adjusting %s -> %sZBINDIRz
python%s%sZVERSIONZEXEs#!�
zutf-8z.The shebang ({!r}) is not decodable from utf-8zAThe shebang ({!r}) is not decodable from the script encoding ({})�wb�posixzchanging mode of %si�imz!changing mode of %s from %o to %o)+Zmkpathrrr�os�path�join�basename�appendrrr�debug�open�OSError�dry_run�tokenize�detect_encoding�readline�seek�warn�
first_line_re�match�group�inforZpython_buildrZget_config_var�fsencode�decode�UnicodeDecodeError�
ValueError�format�write�
writelines�	readlines�closeZ	copy_file�name�statr�chmod)rr�
updated_filesZscriptZadjustZoutfiler�encoding�linesZ
first_liner1Zpost_interprZshebangZoutf�fileZoldmodeZnewmoderrrr5s�



�

��
��
��




�zbuild_scripts.copy_scriptsN)�__name__�
__module__�__qualname__ZdescriptionZuser_optionsZboolean_optionsrrrrrrrrrr	s�r	c@seZdZdd�ZdS)�build_scripts_2to3cCs&t�|�\}}|js|�|�||fSr)r	rr*Zrun_2to3)rrr@rrrr�s
zbuild_scripts_2to3.copy_scriptsN)rDrErFrrrrrrG�srG)�__doc__r"�rer>rZ	distutilsrZdistutils.corerZdistutils.dep_utilrZdistutils.utilrrrr+�compiler0r	rGrrrr�<module>s

PKX[�ZLiTT(command/__pycache__/bdist.cpython-38.pycnu�[���U

e5d��@sHdZddlZddlmZddlTddlmZdd�ZGdd	�d	e�ZdS)
zidistutils.command.bdist

Implements the Distutils 'bdist' command (create a built [binary]
distribution).�N)�Command)�*)�get_platformcCsPddlm}g}tjD]"}|�d|dtj|df�q||�}|�d�dS)zFPrint list of available formats (arguments to "--format" option).
    r)�FancyGetopt�formats=N�z'List of available distribution formats:)Zdistutils.fancy_getoptr�bdist�format_commands�append�format_commandZ
print_help)r�formats�formatZpretty_printer�r�//usr/lib64/python3.8/distutils/command/bdist.py�show_formatss
�rc
@s�eZdZdZdddde�fdddd	d
gZdgZdd
defgZdZ	ddd�Z
dddddddddg	Zddddddd d!d"d#�	Zd$d%�Z
d&d'�Zd(d)�Zd
S)*rz$create a built (binary) distribution)zbdist-base=�bz4temporary directory for creating built distributionsz
plat-name=�pz;platform name to embed in generated filenames (default: %s))rNz/formats for distribution (comma-separated list))z	dist-dir=�dz=directory to put final built distributions in [default: dist])�
skip-buildNz2skip rebuilding everything (for testing/debugging))zowner=�uz@Owner name used when creating a tar file [default: current user])zgroup=�gzAGroup name used when creating a tar file [default: current group]rzhelp-formatsNz$lists available distribution formats)�	bdist_rpm�gztar�zip)�posix�nt�rpm�bztar�xztar�ztar�tar�wininst�msi)rzRPM distribution)�
bdist_dumbzgzip'ed tar file)r#zbzip2'ed tar file)r#zxz'ed tar file)r#zcompressed tar file)r#ztar file)Z
bdist_wininstzWindows executable installer)r#zZIP file)Z	bdist_msizMicrosoft Installer)	rrrrrr r!rr"cCs.d|_d|_d|_d|_d|_d|_d|_dS)Nr)�
bdist_base�	plat_namer�dist_dir�
skip_build�group�owner)�selfrrr�initialize_optionsQszbdist.initialize_optionscCs�|jdkr(|jrt�|_n|�d�j|_|jdkrT|�d�j}tj�|d|j�|_|�	d�|j
dkr�z|jtjg|_
Wn"t
k
r�tdtj��YnX|jdkr�d|_dS)NZbuildzbdist.rz;don't know how to create built distributions on platform %sZdist)r%r'rZget_finalized_commandr$�
build_base�os�path�joinZensure_string_listr�default_format�name�KeyErrorZDistutilsPlatformErrorr&)r*r,rrr�finalize_optionsZs*


�

��

zbdist.finalize_optionsc	Cs�g}|jD]>}z|�|j|d�Wq
tk
rFtd|��Yq
Xq
tt|j��D]h}||}|�|�}||jkr�|j||_	|dkr�|j
|_
|j|_|||dd�kr�d|_|�
|�qXdS)Nrzinvalid format '%s'r#r)rr
rr2ZDistutilsOptionError�range�lenZreinitialize_command�no_format_optionr
r)r(Z	keep_tempZrun_command)r*Zcommandsr
�iZcmd_nameZsub_cmdrrr�runvs"


z	bdist.run)�__name__�
__module__�__qualname__ZdescriptionrZuser_optionsZboolean_optionsrZhelp_optionsr6r0r	rr+r3r8rrrrrsR��������
	r)	�__doc__r-Zdistutils.corerZdistutils.errorsZdistutils.utilrrrrrrr�<module>sPKX[!�
		9command/__pycache__/install_egg_info.cpython-38.opt-2.pycnu�[���U

e5d+
�@s`ddlmZddlmZmZddlZddlZddlZGdd�de�Zdd�Z	dd	�Z
d
d�ZdS)�)�Command)�log�dir_utilNc@s6eZdZdZdgZdd�Zdd�Zdd�Zd	d
�ZdS)�install_egg_infoz8Install package's PKG-INFO metadata as an .egg-info file)zinstall-dir=�dzdirectory to install tocCs
d|_dS�N)�install_dir��self�r�:/usr/lib64/python3.8/distutils/command/install_egg_info.py�initialize_optionssz#install_egg_info.initialize_optionscCsb|�dd�dtt|j����tt|j����ftjdd��}t	j
�|j|�|_
|j
g|_dS)NZinstall_lib)rrz%s-%s-py%d.%d.egg-info�)Zset_undefined_options�to_filename�	safe_name�distributionZget_name�safe_versionZget_version�sys�version_info�os�path�joinr�target�outputs)r
�basenamerrr�finalize_optionss��z!install_egg_info.finalize_optionsc	Cs�|j}tj�|�r0tj�|�s0tj||jd�nNtj�|�rV|�	tj
|jfd|�n(tj�|j�s~|�	tj|jfd|j�t
�d|�|js�t|ddd��}|jj�|�W5QRXdS)N)�dry_runz	Removing z	Creating z
Writing %s�wzUTF-8)�encoding)rrr�isdir�islinkrZremove_treer�existsZexecute�unlinkr�makedirsr�info�openrZmetadataZwrite_pkg_file)r
r�frrr�run s�zinstall_egg_info.runcCs|jSr)rr	rrr�get_outputs.szinstall_egg_info.get_outputsN)	�__name__�
__module__�__qualname__ZdescriptionZuser_optionsr
rr'r(rrrrrs�
rcCst�dd|�S)N�[^A-Za-z0-9.]+�-)�re�sub��namerrrr6srcCs|�dd�}t�dd|�S)N� �.r,r-)�replacer.r/)�versionrrrr>srcCs|�dd�S)Nr-�_)r4r0rrrrHsr)Z
distutils.cmdrZ	distutilsrrrrr.rrrrrrrr�<module>s+
PKX[��`*
/
/2command/__pycache__/bdist_rpm.cpython-38.opt-2.pycnu�[���U

e5dIT�@s|ddlZddlZddlZddlmZddlmZddlmZddl	m
Z
ddlTddlm
Z
ddlmZGd	d
�d
e�ZdS)�N)�Command)�DEBUG)�get_platform)�
write_file)�*)�get_python_version)�logc)@s�eZdZdZdddddddd	d
ddd
ddddddddddddddddddd d!d"d#d$d%d&d'd(d)d*g)Zd+d,d-d.d/gZd+d,d-d0�Zd1d2�Zd3d4�Zd5d6�Z	d7d8�Z
d9d:�Zd;d<�Zd=d>�Z
d?S)@�	bdist_rpmzcreate an RPM distribution)zbdist-base=Nz/base directory for creating built distributions)z	rpm-base=Nzdbase directory for creating RPMs (defaults to "rpm" under --bdist-base; must be specified for RPM 2))z	dist-dir=�dzDdirectory to put final RPM files in (and .spec files if --spec-only))zpython=NzMpath to Python interpreter to hard-code in the .spec file (default: "python"))z
fix-pythonNzLhard-code the exact path to the current Python interpreter in the .spec file)z	spec-onlyNzonly regenerate spec file)zsource-onlyNzonly generate source RPM)zbinary-onlyNzonly generate binary RPM)z	use-bzip2Nz7use bzip2 instead of gzip to create source distribution)zdistribution-name=Nzgname of the (Linux) distribution to which this RPM applies (*not* the name of the module distribution!))zgroup=Nz9package classification [default: "Development/Libraries"])zrelease=NzRPM release number)zserial=NzRPM serial number)zvendor=NzaRPM "vendor" (eg. "Joe Blow <joe@example.com>") [default: maintainer or author from setup script])z	packager=NzBRPM packager (eg. "Jane Doe <jane@example.net>") [default: vendor])z
doc-files=Nz6list of documentation files (space or comma-separated))z
changelog=Nz
RPM changelog)zicon=Nzname of icon file)z	provides=Nz%capabilities provided by this package)z	requires=Nz%capabilities required by this package)z
conflicts=Nz-capabilities which conflict with this package)zbuild-requires=Nz+capabilities required to build this package)z
obsoletes=Nz*capabilities made obsolete by this package)�
no-autoreqNz+do not automatically calculate dependencies)�	keep-temp�kz"don't clean up RPM build directory)�no-keep-tempNz&clean up RPM build directory [default])�use-rpm-opt-flagsNz8compile with RPM_OPT_FLAGS when building from source RPM)�no-rpm-opt-flagsNz&do not pass any RPM CFLAGS to compiler)�	rpm3-modeNz"RPM 3 compatibility mode (default))�	rpm2-modeNzRPM 2 compatibility mode)zprep-script=Nz3Specify a script for the PREP phase of RPM building)z
build-script=Nz4Specify a script for the BUILD phase of RPM building)zpre-install=Nz:Specify a script for the pre-INSTALL phase of RPM building)zinstall-script=Nz6Specify a script for the INSTALL phase of RPM building)z
post-install=Nz;Specify a script for the post-INSTALL phase of RPM building)zpre-uninstall=Nz<Specify a script for the pre-UNINSTALL phase of RPM building)zpost-uninstall=Nz=Specify a script for the post-UNINSTALL phase of RPM building)z
clean-script=Nz4Specify a script for the CLEAN phase of RPM building)zverify-script=Nz6Specify a script for the VERIFY phase of the RPM build)zforce-arch=Nz0Force an architecture onto the RPM build process)�quiet�qz3Run the INSTALL phase of RPM building in quiet moderrrrr)rrrcCs�d|_d|_d|_d|_d|_d|_d|_d|_d|_d|_	d|_
d|_d|_d|_
d|_d|_d|_d|_d|_d|_d|_d|_d|_d|_d|_d|_d|_d|_d|_d|_d|_d|_d|_ d|_!d|_"d|_#d|_$d|_%d|_&dS)Nr�)'�
bdist_base�rpm_base�dist_dir�python�
fix_python�	spec_only�binary_only�source_only�	use_bzip2�distribution_name�group�release�serial�vendor�packager�	doc_files�	changelog�icon�prep_script�build_script�install_script�clean_script�
verify_script�pre_install�post_install�
pre_uninstall�post_uninstall�prep�provides�requires�	conflicts�build_requires�	obsoletes�	keep_temp�use_rpm_opt_flags�	rpm3_mode�
no_autoreq�
force_archr��self�r>�3/usr/lib64/python3.8/distutils/command/bdist_rpm.py�initialize_options�sNzbdist_rpm.initialize_optionscCs�|�dd�|jdkr6|js$td��tj�|jd�|_|jdkrX|j	rPt
j|_qfd|_n|j	rftd��tjdkr~t
dtj��|jr�|jr�td	��|j��s�d
|_|�dd�|��dS)NZbdist)rrz)you must specify --rpm-base in RPM 2 mode�rpmZpython3z8--python and --fix-python are mutually exclusive options�posixz9don't know how to create RPM distributions on platform %sz6cannot supply both '--source-only' and '--binary-only'r)rr)Zset_undefined_optionsrr9ZDistutilsOptionError�os�path�joinrrr�sys�
executable�nameZDistutilsPlatformErrorrr�distribution�has_ext_modulesr8�finalize_package_datar<r>r>r?�finalize_options�s6
�

�
��
zbdist_rpm.finalize_optionscCsT|�dd�|�dd|j��|j��f�|�d�|�d�t|jt�rxdD]&}tj	�
|�rP||jkrP|j�|�qP|�dd	�|�d
�|�d�|�d�|�|j
�|_
|�d
�|�d�|�d�|�d�|�d�|�d�|�d�|�d�|�d�|�d�|�d�|�d�|�d�|�d�|�d�|�d�dS)Nr zDevelopment/Librariesr#z%s <%s>r$r%)ZREADMEz
README.txtr!�1r"rr&r'r(r)r*r+r,r-r.r/r0r2r3r4r5r6r;)Z
ensure_stringrIZget_contactZget_contact_emailZensure_string_list�
isinstancer%�listrCrD�exists�append�_format_changelogr&Zensure_filename)r=Zreadmer>r>r?rK�sB
��



















zbdist_rpm.finalize_package_datacCs�tr<td�td|j�td|j�td|j�td|j�|jrT|j}|�|�n8i}dD]&}t	j
�|j|�||<|�||�q\|d}t	j
�|d|j
���}|�t||��fd	|�|jr�dS|j
jdd�}|�d
�}|jr�dg|_ndg|_|�d
�||j
_|��d
}|d}|�||�|j�rbt	j
�|j��rT|�|j|�ntd|j��t�d�dg}	|j�r�|	�d�n|j �r�|	�d�n
|	�d�|	�!dd|j"g�|j#�r�|	�!ddt	j
�$|j�g�|j%�s�|	�d�|j&�r|	�d�|	�|�d}
|
d}d|
d}d|||f}
t	�'|
�}zlg}d}|�)�}|�sV�q�|�*��+�}|�|d�|dk�rD|d
}�qD|�(�}|�r�t,d t-|
���W5|�(�X|�.|	�|j/�s�|j
�0��r�t1�}nd!}|j �s(t	j
�|d"|�}|�2||j�t	j
�|j|�}|j
j�d#||f�|j�s�|D]`}t	j
�|d$|�}t	j
�|��r4|�2||j�t	j
�|jt	j
�3|��}|j
j�d#||f��q4dS)%Nzbefore _get_package_data():zvendor =z
packager =zdoc_files =zchangelog =)�SOURCES�SPECSZBUILD�RPMS�SRPMSrTz%s.speczwriting '%s'�sdistZbztarZgztarrrSzicon file '%s' does not existz
building RPMsZrpmbuildz-bsz-bbz-baz--definez__python %sz
_topdir %sz--cleanz--quietz%{name}-%{version}-%{release}z.src.rpmz%{arch}/z.%{arch}.rpmz%rpm -q --qf '%s %s\n' --specfile '%s'rzFailed to execute: %s�anyrVr	rU)4r�printr#r$r%r&rrZmkpathrCrDrErrI�get_nameZexecuter�_make_spec_fileZ
dist_filesZreinitialize_commandrZformatsZrun_commandZget_archive_filesZ	copy_filer'rPZDistutilsFileErrorr�inforrQr�extendrr9�abspathr7r�popen�close�readline�strip�splitZDistutilsExecError�reprZspawnZdry_runrJrZ	move_file�basename)r=Zspec_dirZrpm_dirr
Z	spec_pathZsaved_dist_filesrW�sourceZ
source_dirZrpm_cmdZ
nvr_stringZsrc_rpmZnon_src_rpmZq_cmd�outZbinary_rpmsZ
source_rpm�line�lZstatusZ	pyversionZsrpm�filenamerAr>r>r?�runs����


�

�


�



�

��z
bdist_rpm.runcCstj�|jtj�|��S)N)rCrDrErre)r=rDr>r>r?�
_dist_path�szbdist_rpm._dist_pathc
CsJd|j��d|j���dd�d|j��d|j�dd�dd|j��g}t�d	�}d
�dd�|�	�D��}d
}d}|�||�}||kr�|�
d�|�
d|d
�|�dddg�|jr�|�
d�n
|�
d�|�d|j�
�d|jddg�|j�s|j���s&|�
d�n|�
d|j�dD]V}t||���}t|t��rb|�
d|d�|�f�n|dk	�r*|�
d||f��q*|j��dk�r�|�
d |j���|j�r�|�
d!|j�|j�r�|�
d"d�|j��|j�r�|�
d#tj�|j��|j�r|�
d$�|�dd%|j��g�d&|jtj�tj d'�f}d(|}	|j!�rXd)|	}	d*|}
d+d,d-|	fd.d/|
fd0d1d2d3d4d5g	}|D]n\}}
}t||
�}|�s�|�r�|�dd6|g�|�r�t"|��}|�|�#��$d
��W5QRXn
|�
|��q�|�dd7d8g�|j%�r$|�
d9d�|j%��|j&�rF|�dd:g�|�|j&�|S);Nz
%define name z%define version �-�_z%define unmangled_version z%define release �z	Summary: zrpm --eval %{__os_install_post}�
cSsg|]}d|���qS)z  %s \)rb)�.0rhr>r>r?�
<listcomp>�s�z-bdist_rpm._make_spec_file.<locals>.<listcomp>zbrp-python-bytecompile \
z%brp-python-bytecompile %{__python} \
z2# Workaround for http://bugs.python.org/issue14443z%define __os_install_post z
Name: %{name}zVersion: %{version}zRelease: %{release}z-Source0: %{name}-%{unmangled_version}.tar.bz2z,Source0: %{name}-%{unmangled_version}.tar.gzz	License: zGroup: z>BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildrootzPrefix: %{_prefix}zBuildArch: noarchz
BuildArch: %s)ZVendorZPackagerZProvidesZRequiresZ	ConflictsZ	Obsoletesz%s: %s� ZUNKNOWNzUrl: zDistribution: zBuildRequires: zIcon: z
AutoReq: 0z%descriptionz%s %srz%s buildzenv CFLAGS="$RPM_OPT_FLAGS" z>%s install -O1 --root=$RPM_BUILD_ROOT --record=INSTALLED_FILES)r1r(z&%setup -n %{name}-%{unmangled_version}Zbuildr)Zinstallr*)Zcleanr+zrm -rf $RPM_BUILD_ROOT)Zverifyscriptr,N)Zprer-N)Zpostr.N)Zpreunr/N)Zpostunr0N�%z%files -f INSTALLED_FILESz%defattr(-,root,root)z%doc z
%changelog)'rIrZZget_version�replacer!Zget_description�
subprocessZ	getoutputrE�
splitlinesrQr]rZget_licenser r;rJ�getattr�lowerrNrOZget_urlrr5r'rCrDrer:Zget_long_descriptionrrF�argvr8�open�readrcr%r&)r=Z	spec_fileZvendor_hookZproblemZfixedZ
fixed_hookZfield�valZdef_setup_callZ	def_buildZinstall_cmdZscript_optionsZrpm_opt�attr�default�fr>r>r?r[�s��

�
	�
�

�
���
�
 ��zbdist_rpm._make_spec_filecCs||s|Sg}|���d�D]N}|��}|ddkrB|�d|g�q|ddkrZ|�|�q|�d|�q|dsx|d=|S)Nrprrrormz  )rbrcr]rQ)r=r&Z
new_changelogrhr>r>r?rR1szbdist_rpm._format_changelogN)�__name__�
__module__�__qualname__ZdescriptionZuser_optionsZboolean_optionsZnegative_optr@rLrKrkrlr[rRr>r>r>r?r	sx�m��--*r	)rvrFrCZdistutils.corerZdistutils.debugrZdistutils.utilrZdistutils.file_utilrZdistutils.errorsZdistutils.sysconfigrZ	distutilsrr	r>r>r>r?�<module>sPKX[g[a&��.command/__pycache__/install_lib.cpython-38.pycnu�[���U

e5d� �@sLdZddlZddlZddlZddlmZddlmZdZ	Gdd�de�Z
dS)zkdistutils.command.install_lib

Implements the Distutils 'install_lib' command
(install all Python modules).�N)�Command)�DistutilsOptionErrorz.pyc@s�eZdZdZdddddddgZd	d
dgZdd
iZd
d�Zdd�Zdd�Z	dd�Z
dd�Zdd�Zdd�Z
dd�Zdd�Zdd �Zd!S)"�install_libz7install all Python modules (extensions and pure Python))zinstall-dir=�dzdirectory to install to)z
build-dir=�bz'build directory (where to install from))�force�fz-force installation (overwrite existing files))�compile�czcompile .py to .pyc [default])�
no-compileNzdon't compile .py files)z	optimize=�Ozlalso compile with optimization: -O1 for "python -O", -O2 for "python -OO", and -O0 to disable [default: -O0])�
skip-buildNzskip the build stepsrr	r
rcCs(d|_d|_d|_d|_d|_d|_dS)Nr)�install_dir�	build_dirrr	�optimize�
skip_build��self�r�5/usr/lib64/python3.8/distutils/command/install_lib.py�initialize_options3szinstall_lib.initialize_optionsc	Cs�|�ddddddd�|jdkr&d|_|jdkr6d	|_t|jt�s�zt|j�|_|jd
kr^t�Wn ttfk
r�td��YnXdS)N�install)�	build_libr)rr)rr)r	r	)rr)rrTF)r��zoptimize must be 0, 1, or 2)Zset_undefined_optionsr	r�
isinstance�int�AssertionError�
ValueErrorrrrrr�finalize_options<s&�	


zinstall_lib.finalize_optionscCs0|��|��}|dk	r,|j��r,|�|�dS�N)�buildr�distribution�has_pure_modules�byte_compile�rZoutfilesrrr�runVszinstall_lib.runcCs2|js.|j��r|�d�|j��r.|�d�dS)N�build_py�	build_ext)rr"r#Zrun_command�has_ext_modulesrrrrr!fs



zinstall_lib.buildcCs8tj�|j�r |�|j|j�}n|�d|j�dS|S)Nz3'%s' does not exist -- no Python modules to install)�os�path�isdirrZ	copy_treer�warnr%rrrrms�zinstall_lib.installcCsrtjr|�d�dSddlm}|�d�j}|jrH||d|j||j	d�|j
dkrn|||j
|j||j|j	d�dS)Nz%byte-compiling is disabled, skipping.r)r$r)rr�prefix�dry_run)rrr.�verboser/)�sys�dont_write_bytecoder-Zdistutils.utilr$�get_finalized_command�rootr	rr/rr0)r�filesr$Zinstall_rootrrrr$vs$
�
�zinstall_lib.byte_compilec
	Csd|sgS|�|�}|��}t||�}t|�ttj�}g}|D] }	|�tj�||	|d���q>|Sr )	r3�get_outputs�getattr�lenr*�sep�appendr+�join)
rZhas_anyZ	build_cmdZ
cmd_optionZ
output_dirZbuild_filesr�
prefix_lenZoutputs�filerrr�_mutate_outputs�s

zinstall_lib._mutate_outputscCsrg}|D]d}tj�tj�|��d}|tkr.q|jrJ|�tjj	|dd��|j
dkr|�tjj	||j
d��q|S)Nr�)�optimizationr)r*r+�splitext�normcase�PYTHON_SOURCE_EXTENSIONr	r:�	importlib�util�cache_from_sourcer)rZpy_filenamesZbytecode_filesZpy_fileZextrrr�_bytecode_filenames�s 
�

�
zinstall_lib._bytecode_filenamescCsR|�|j��dd|j�}|jr*|�|�}ng}|�|j��dd|j�}|||S)z�Return the list of files that would be installed if this command
        were actually run.  Not affected by the "dry-run" flag or whether
        modules have actually been built yet.
        r'rr()r>r"r#rr	rGr))rZpure_outputsZbytecode_outputsZext_outputsrrrr6�s ����zinstall_lib.get_outputscCsLg}|j��r&|�d�}|�|���|j��rH|�d�}|�|���|S)z�Get the list of files that are input to this command, ie. the
        files that get installed as they are named in the build tree.
        The files in this list correspond one-to-one to the output
        filenames returned by 'get_outputs()'.
        r'r()r"r#r3�extendr6r))rZinputsr'r(rrr�
get_inputs�s



zinstall_lib.get_inputsN)�__name__�
__module__�__qualname__ZdescriptionZuser_optionsZboolean_optionsZnegative_optrrr&r!rr$r>rGr6rIrrrrrs*�
		r)�__doc__r*�importlib.utilrDr1Zdistutils.corerZdistutils.errorsrrCrrrrr�<module>sPKX[���	!	!+command/__pycache__/register.cpython-38.pycnu�[���U

e5d�-�@sddZddlZddlZddlZddlZddlmZddlm	Z	ddl
TddlmZGdd�de	�Z
dS)	zhdistutils.command.register

Implements the Distutils 'register' command (register with the repository).
�N)�warn)�
PyPIRCCommand)�*)�logc@s�eZdZdZejddgZejdddgZddd	�fgZd
d�Zdd
�Z	dd�Z
dd�Zdd�Zdd�Z
dd�Zdd�Zdd�Zddd�ZdS) �registerz7register the distribution with the Python package index)�list-classifiersNz list the valid Trove classifiers)�strictNzBWill stop the registering if the meta-data are not fully compliant�verifyrr�checkcCsdS)NT���selfrr�2/usr/lib64/python3.8/distutils/command/register.py�<lambda>�zregister.<lambda>cCst�|�d|_d|_dS)Nr)r�initialize_options�list_classifiersrrrrrrs
zregister.initialize_optionscCs*t�|�d|jfdd�}||jjd<dS)Nr)r�)r�restructuredtextr
)r�finalize_optionsr�distributionZcommand_options)r
Z
check_optionsrrrr$s

�zregister.finalize_optionscCsT|��|��|��D]}|�|�q|jr8|��n|jrH|��n|��dS)N)	r�_set_configZget_sub_commandsZrun_commandZdry_run�verify_metadatar�classifiers�
send_metadata)r
Zcmd_namerrr�run+s

zregister.runcCs8tdt�|j�d�}|��|j|_d|_|��dS)zDeprecated API.zddistutils.command.register.check_metadata is deprecated,               use the check command insteadr
rN)r�PendingDeprecationWarningrZget_command_objZensure_finalizedrrr)r
r
rrr�check_metadata:s�zregister.check_metadatacCsz|��}|ikr@|d|_|d|_|d|_|d|_d|_n6|jd|jfkr^td|j��|jdkrp|j|_d|_d	S)
z: Reads the configuration file and set attributes.
        �username�password�
repository�realmTZpypiz%s not found in .pypircFN)Z_read_pypircrrr r!�
has_configZDEFAULT_REPOSITORY�
ValueError)r
ZconfigrrrrDs




zregister._set_configcCs*|jd}tj�|�}t�|�|��dS)z8 Fetch the list of classifiers from the server.
        z?:action=list_classifiersN)r �urllib�requestZurlopenr�info�_read_pypi_response)r
ZurlZresponserrrrUs
zregister.classifierscCs&|�|�d��\}}t�d||�dS)zF Send the metadata to the package index server to be checked.
        r	�Server response (%s): %sN)�post_to_server�build_post_datarr&)r
�code�resultrrrr\szregister.verify_metadatac
Cs�|jrd}|j}|j}nd}d}}d��}||krd|�dtj�t�}|sRd}q,||kr,td�q,|dk�rl|s|td�}qn|s�t	�	d�}q|t
j��}t
j
�|j�d	}|�|j|||�|�|�d
�|�\}}|�d||ftj�|dk�r�|j�r||j_nf|�d
tj�|�d|��tj�d}|��dk�rNtd�}|�s*d}�q*|��dk�r�|�||��nl|dk�r�ddi}	d|	d<|	d<|	d<d|	d<|	d�s�td�|	d<�q�|	d|	dk�r0|	d�s�t	�	d�|	d<�q�|	d�st	�	d�|	d<�q�|	d|	dk�r�d|	d<d|	d<td��q�|	d�sJtd�|	d<�q0|�|	�\}}|dk�rrt�d||�nt�d�t�d �nP|d!k�r�dd"i}	d|	d<|	d�s�td#�|	d<�q�|�|	�\}}t�d||�dS)$a_ Send the metadata to the package index server.

            Well, do the following:
            1. figure who the user is, and then
            2. send the data as a Basic auth'ed POST.

            First we try to read the username/password from $HOME/.pypirc,
            which is a ConfigParser-formatted file with a section
            [distutils] containing username and password entries (both
            in clear text). Eg:

                [distutils]
                index-servers =
                    pypi

                [pypi]
                username: fred
                password: sekrit

            Otherwise, to figure who the user is, we offer the user three
            choices:

             1. use existing login,
             2. register as a new user, or
             3. set the password to a random string and email the user.

        �1�x�z1 2 3 4z�We need to know who you are, so please choose either:
 1. use your existing login,
 2. register as a new user,
 3. have the server generate a new password for you (and email it to you), or
 4. quit
Your selection [default 1]: z&Please choose one of the four options!z
Username: z
Password: rZsubmitr(��zAI can store your PyPI login so future submissions will be faster.z (the login will be stored in %s)�XZynzSave your login (y/N)?�n�y�2�:action�user�namerZemailNZconfirmz
 Confirm: z!Password and confirm don't match!z
   EMail: z"You will receive an email shortly.z7Follow the instructions in it to complete registration.�3Zpassword_resetzYour email address: )r"rr�split�announcer�INFO�input�print�getpassr$r%ZHTTPPasswordMgr�parseZurlparser Zadd_passwordr!r)r*rZ_get_rc_file�lowerZ
_store_pypircr&)
r
Zchoicerr�choices�authZhostr+r,�datarrrrcs��



��

���








zregister.send_metadatacCs�|jj}|d|��|��|��|��|��|��|��|�	�|�
�|��|��|�
�|��|��|��d�}|ds�|ds�|dr�d|d<|S)Nz1.0)r5�metadata_versionr7�versionZsummaryZ	home_pageZauthorZauthor_email�license�description�keywords�platformrZdownload_url�provides�requires�	obsoletesrJrKrLz1.1rD)rZmetadataZget_nameZget_versionZget_descriptionZget_urlZget_contactZget_contact_emailZget_licenceZget_long_descriptionZget_keywordsZ
get_platformsZget_classifiersZget_download_urlZget_providesZget_requiresZ
get_obsoletes)r
�action�metarCrrrr*�s,�zregister.build_post_dataNc
Cs�d|kr$|�d|d|jftj�d}d|}|d}t��}|��D]~\}}t|�tg�td�fkrn|g}|D]R}t|�}|�	|�|�	d|�|�	d�|�	|�|rr|d	d
krr|�	d�qrqH|�	|�|�	d�|�
��d�}d
|tt|��d�}	t
j�|j||	�}
t
j�t
jj|d��}d}z|�|
�}Wnxt
jjk
�r�}
z"|j�rd|
j��}|
j|
jf}W5d}
~
XYnJt
jjk
�r�}
zdt|
�f}W5d}
~
XYnX|j�r�|�|�}d}|j�r�d�d|df�}|�|tj�|S)zC Post a query to the server, and return a string response.
        r7zRegistering %s to %sz3--------------GHSKFJDLGDS7543FJKLFHRE75642756743254z
--z--rz*
Content-Disposition: form-data; name="%s"z

����
�
zutf-8z/multipart/form-data; boundary=%s; charset=utf-8)zContent-typezContent-length)Zpassword_mgrr/Ni�)r0ZOKzK---------------------------------------------------------------------------)r:r rr;�io�StringIO�items�type�str�write�getvalue�encode�lenr$r%ZRequestZbuild_openerZHTTPBasicAuthHandler�open�errorZ	HTTPErrorZ
show_response�fp�readr+�msgZURLErrorr'�join)r
rCrB�boundaryZsep_boundaryZend_boundaryZbody�key�valueZheadersZreqZopenerr,�er_rrrr)�s^��





��

zregister.post_to_server)N)�__name__�
__module__�__qualname__rGrZuser_optionsZboolean_optionsZsub_commandsrrrrrrrrr*r)rrrrrs*��
zr)�__doc__r>rRZurllib.parser$Zurllib.request�warningsrZdistutils.corerZdistutils.errorsZ	distutilsrrrrrr�<module>sPKX[�GX@@)command/__pycache__/upload.cpython-38.pycnu�[���U

&�.e��@s�dZddlZddlZddlZddlZddlmZddlmZm	Z	m
Z
ddlmZddl
mZmZddlmZddlmZdd	lmZGd
d�de�ZdS)zm
distutils.command.upload

Implements the Distutils 'upload' subcommand (upload package to a package
index).
�N)�standard_b64encode)�urlopen�Request�	HTTPError)�urlparse)�DistutilsError�DistutilsOptionError)�
PyPIRCCommand)�spawn)�logc@sJeZdZdZejddgZejdgZdd�Zdd�Zd	d
�Z	dd�Z
d
S)�uploadzupload binary package to PyPI)�sign�szsign files to upload using gpg)z	identity=�izGPG identity used to sign filesr
cCs,t�|�d|_d|_d|_d|_d|_dS)N�rF)r	�initialize_options�username�password�
show_responser
�identity)�self�r�0/usr/lib64/python3.8/distutils/command/upload.pyr s
zupload.initialize_optionscCsrt�|�|jr|jstd��|��}|ikrV|d|_|d|_|d|_|d|_	|jsn|j
jrn|j
j|_dS)Nz.Must use --sign for --identity to have meaningrr�
repository�realm)r	�finalize_optionsrr
rZ_read_pypircrrrr�distribution)rZconfigrrrr(s
�



zupload.finalize_optionscCs:|jjsd}t|��|jjD]\}}}|�|||�qdS)NzHMust create and upload files in one command (e.g. setup.py sdist upload))rZ
dist_filesr�upload_file)r�msg�command�	pyversion�filenamerrr�run:s
z
upload.runc"Cst|j�\}}}}}}	|s"|s"|	r0td|j��|dkrDtd|��|jr|ddd|g}
|jrnd|jg|
dd�<t|
|jd	�t|d
�}z|�	�}W5|��X|j
j}
dd|
��|
�
�tj�|�|f||t�|���d
|
��|
��|
��|
��|
��|
��|
��|
��|
��|
��|
��|
��|
� �d�}zt�!|���}WnPt"k
�r�}z0d|}|�#|t$j%�ddl&m'}|��s|�W5d}~XYn
X||d<d|d<|j�r�t|dd
��"}tj�|�d|�	�f|d<W5QRX|j(d|j)�*d�}dt+|��,d�}d}d|�*d�}|d}t-�.�}|�/�D]�\}}d|}t0|t1��sP|g}|D]j}t2|�t3k�r�|d|d7}|d}nt4|��*d �}|�5|�|�5|�*d ��|�5d!�|�5|��qT�q.|�5|�|�6�}d"||jf}|�#|t$j%�d#|t4t7|��|d$�}t8|j||d%�}zt9|�}|�:�}|j;} Wnft<k
�rd}z|j=}|j;} W5d}~XYn8t>k
�r�}z|�#t4|�t$j?��W5d}~XYnX|d&k�r�|�#d'|| ft$j%�|j@�r|�A|�}!d(�Bd)|!d)f�}|�#|t$j%�n"d*|| f}|�#|t$j?�tC|��dS)+NzIncompatible url %s)ZhttpZhttpszunsupported schema Zgpgz
--detach-signz-az--local-user�)�dry_run�rbZfile_upload�1z1.0)z:actionZprotocol_version�name�version�contentZfiletyper Z
sha256_digestZmetadata_versionZsummaryZ	home_pageZauthorZauthor_email�license�description�keywords�platformZclassifiersZdownload_urlZprovidesZrequiresZ	obsoletesz#calculating md5 checksum failed: %sr)�
get_fips_modeZ
md5_digestrZcommentz.ascZ
gpg_signature�:�asciizBasic z3--------------GHSKFJDLGDS7543FJKLFHRE75642756743254s
--s--
z+
Content-Disposition: form-data; name="%s"z; filename="%s"�zutf-8s

zSubmitting %s to %sz multipart/form-data; boundary=%s)zContent-typezContent-lengthZ
Authorization)�data�headers��zServer response (%s): %s�
zK---------------------------------------------------------------------------zUpload failed (%s): %s)Drr�AssertionErrorr
rr
r$�open�close�readrZmetadataZget_nameZget_version�os�path�basename�hashlibZsha256Z	hexdigestZget_descriptionZget_urlZget_contactZget_contact_emailZget_licenceZget_long_descriptionZget_keywordsZ
get_platformsZget_classifiersZget_download_urlZget_providesZget_requiresZ
get_obsoletesZmd5�
ValueErrorZannouncer�INFOZ_hashlibr.rr�encoder�decode�io�BytesIO�items�
isinstance�list�type�tuple�str�write�getvalue�lenrrZgetcoderr�code�OSErrorZERRORrZ_read_pypi_response�joinr)"rrr r!ZschemaZnetlocZurlZparamsZqueryZ	fragmentsZgpg_args�fr)�metar2Zdigest�err.Z	user_passZauth�boundaryZsep_boundaryZend_boundaryZbody�key�value�titler3Zrequest�resultZstatus�reason�textrrrrBs���

�!�




��

�
zupload.upload_fileN)�__name__�
__module__�__qualname__r+r	Zuser_optionsZboolean_optionsrrr"rrrrrrs�r)�__doc__r:rBr-r=�base64rZurllib.requestrrrZurllib.parserZdistutils.errorsrrZdistutils.corer	Zdistutils.spawnr
Z	distutilsrrrrrr�<module>sPKX[�>�+�+.command/__pycache__/sdist.cpython-38.opt-2.pycnu�[���U

e5d=J�@s�ddlZddlZddlmZddlmZddlmZddlmZddlm	Z	ddlm
Z
ddlmZdd	l
mZdd
lmZddlmZddlmZmZd
d�ZGdd�de�ZdS)�N)�glob)�warn)�Command)�dir_util)�	file_util)�archive_util)�TextFile)�FileList)�log)�convert_path)�DistutilsTemplateError�DistutilsOptionErrorcCs`ddlm}ddlm}g}|��D] }|�d|d||df�q$|��||��d�dS)Nr)�FancyGetopt)�ARCHIVE_FORMATS�formats=�z.List of available source distribution formats:)Zdistutils.fancy_getoptrZdistutils.archive_utilr�keys�append�sortZ
print_help)rr�formats�format�r�//usr/lib64/python3.8/distutils/command/sdist.py�show_formatss
��rc@s"eZdZdZdd�Zdddddd	d
ddd
ddddgZddddddgZdddefgZddd�Z	defgZ
dZdd�Zd d!�Z
d"d#�Zd$d%�Zd&d'�Zd(d)�Zed*d+��Zd,d-�Zd.d/�Zd0d1�Zd2d3�Zd4d5�Zd6d7�Zd8d9�Zd:d;�Zd<d=�Zd>d?�Zd@dA�ZdBdC�ZdDdE�Z dFdG�Z!dHdI�Z"dS)J�sdistz6create a source distribution (tarball, zip file, etc.)cCs|jS�N)�metadata_check��selfrrr�checking_metadata(szsdist.checking_metadata)z	template=�tz5name of manifest template file [default: MANIFEST.in])z	manifest=�mz)name of manifest file [default: MANIFEST])�use-defaultsNzRinclude the default file set in the manifest [default; disable with --no-defaults])�no-defaultsNz"don't include the default file set)�pruneNz�specifically exclude files/directories that should not be distributed (build tree, RCS/CVS dirs, etc.) [default; disable with --no-prune])�no-pruneNz$don't automatically exclude anything)�
manifest-only�ozEjust regenerate the manifest and then stop (implies --force-manifest))�force-manifest�fzkforcibly regenerate the manifest and carry on as usual. Deprecated: now the manifest is always regenerated.)rNz6formats for source distribution (comma-separated list))�	keep-temp�kz@keep the distribution tree around after creating archive file(s))z	dist-dir=�dzFdirectory to put the source distribution archive(s) in [default: dist])�metadata-checkNz[Ensure that all required elements of meta-data are supplied. Warn if any missing. [default])zowner=�uz@Owner name used when creating a tar file [default: current user])zgroup=�gzAGroup name used when creating a tar file [default: current group]r"r$r&r(r*r-zhelp-formatsNz#list available distribution formats)r#r%�check)ZREADMEz
README.txtz
README.rstcCsTd|_d|_d|_d|_d|_d|_dg|_d|_d|_d|_	d|_
d|_d|_dS)N�rZgztar)
�template�manifest�use_defaultsr$�
manifest_onlyZforce_manifestr�	keep_temp�dist_dir�
archive_filesr�owner�grouprrrr�initialize_optionseszsdist.initialize_optionscCsZ|jdkrd|_|jdkr d|_|�d�t�|j�}|rFtd|��|jdkrVd|_dS)NZMANIFESTzMANIFEST.inrzunknown archive format '%s'Zdist)r3r2Zensure_string_listrZcheck_archive_formatsrr
r7)rZ
bad_formatrrr�finalize_options|s


�
zsdist.finalize_optionscCs>t�|_|��D]}|�|�q|��|jr2dS|��dSr)r	�filelistZget_sub_commandsZrun_command�
get_file_listr5�make_distribution)rZcmd_namerrr�run�sz	sdist.runcCs*tdt�|j�d�}|��|��dS)Nzadistutils.command.sdist.check_metadata is deprecated,               use the check command insteadr0)r�PendingDeprecationWarning�distributionZget_command_objZensure_finalizedr@)rr0rrr�check_metadata�s�zsdist.check_metadatacCs�tj�|j�}|s:|��r:|��|j��|j��dS|sN|�	d|j�|j�
�|jrf|��|rr|�
�|jr�|��|j��|j��|��dS)Nz?manifest template '%s' does not exist (using default file list))�os�path�isfiler2�_manifest_is_not_generated�
read_manifestr=rZremove_duplicatesr�findallr4�add_defaults�
read_templater$�prune_file_list�write_manifest)rZtemplate_existsrrrr>�s(

�


zsdist.get_file_listcCs<|��|��|��|��|��|��|��dSr)�_add_defaults_standards�_add_defaults_optional�_add_defaults_python�_add_defaults_data_files�_add_defaults_ext�_add_defaults_c_libs�_add_defaults_scriptsrrrrrJ�szsdist.add_defaultscCs:tj�|�sdStj�|�}tj�|�\}}|t�|�kS)NF)rDrE�exists�abspath�split�listdir)�fspathrVZ	directory�filenamerrr�_cs_path_exists�s

zsdist._cs_path_existscCs�|j|jjg}|D]~}t|t�rj|}d}|D]"}|�|�r,d}|j�|�qPq,|s�|�dd�	|��q|�|�r�|j�|�q|�d|�qdS)NFTz,standard file not found: should have one of z, zstandard file '%s' not found)
�READMESrBZscript_name�
isinstance�tupler[r=rr�join)rZ	standards�fnZaltsZgot_itrrrrN�s"

�
zsdist._add_defaults_standardscCs4ddg}|D]"}ttjjt|��}|j�|�qdS)Nz
test/test*.pyz	setup.cfg)�filterrDrErFrr=�extend)rZoptional�pattern�filesrrrrOszsdist._add_defaults_optionalcCs\|�d�}|j��r$|j�|���|jD],\}}}}|D]}|j�tj	�
||��q:q*dS)N�build_py)�get_finalized_commandrBZhas_pure_modulesr=rb�get_source_files�
data_filesrrDrEr_)rreZpkgZsrc_dirZ	build_dir�	filenamesrZrrrrPs

zsdist._add_defaults_pythoncCsz|j��rv|jjD]b}t|t�rBt|�}tj�|�rt|j	�
|�q|\}}|D]$}t|�}tj�|�rN|j	�
|�qNqdSr)rBZhas_data_filesrhr]�strrrDrErFr=r)r�item�dirnamerir)rrrrQ$s

zsdist._add_defaults_data_filescCs(|j��r$|�d�}|j�|���dS)N�	build_ext)rBZhas_ext_modulesrfr=rbrg)rrmrrrrR5s

zsdist._add_defaults_extcCs(|j��r$|�d�}|j�|���dS)N�
build_clib)rBZhas_c_librariesrfr=rbrg)rrnrrrrS:s

zsdist._add_defaults_c_libscCs(|j��r$|�d�}|j�|���dS)N�
build_scripts)rBZhas_scriptsrfr=rbrg)rrorrrrT?s

zsdist._add_defaults_scriptsc
Cs�t�d|j�t|jddddddd�}zh|��}|dkr:q�z|j�|�Wq(tt	fk
r�}z|�
d|j|j|f�W5d}~XYq(Xq(W5|��XdS)Nzreading manifest template '%s'r1)Zstrip_commentsZskip_blanksZ
join_linesZ	lstrip_wsZ	rstrip_wsZ
collapse_joinz%s, line %d: %s)
r
�infor2r�close�readliner=Zprocess_template_liner�
ValueErrorrrZZcurrent_line)rr2�line�msgrrrrKDs&
�
� zsdist.read_templatecCs�|�d�}|j��}|jjd|jd�|jjd|d�tjdkrFd}nd}dddd	d
ddg}d
|d�|�|f}|jj|dd�dS)N�build)�prefixZwin32z/|\\�/ZRCSZCVSz\.svnz\.hgz\.gitz\.bzrZ_darcsz(^|%s)(%s)(%s).*�|r1)Zis_regex)	rfrB�get_fullnamer=Zexclude_patternZ
build_base�sys�platformr_)rrv�base_dirZsepsZvcs_dirsZvcs_ptrnrrrrLas


�zsdist.prune_file_listcCsX|��rt�d|j�dS|jjdd�}|�dd�|�tj	|j|fd|j�dS)Nz5not writing to manually maintained manifest file '%s'rz*# file GENERATED by distutils, do NOT editzwriting manifest file '%s')
rGr
rpr3r=rd�insertZexecuterZ
write_file)rZcontentrrrrMys��zsdist.write_manifestcCs<tj�|j�sdSt|j�}z|��}W5|��X|dkS)NFz+# file GENERATED by distutils, do NOT edit
)rDrErFr3�openrqrr)r�fpZ
first_linerrrrG�s

z sdist._manifest_is_not_generatedc	CsVt�d|j�t|j��4}|D](}|��}|�d�s|s:q|j�|�qW5QRXdS)Nzreading manifest file '%s'�#)r
rpr3r�strip�
startswithr=r)rr3rtrrrrH�szsdist.read_manifestcCs�|�|�tj|||jd�ttd�r4d}d|}nd}d|}|sPt�d�n
t�|�|D]<}tj	�
|�s|t�d|�q^tj	�||�}|j|||d�q^|j
j�|�dS)	N��dry_run�linkZhardzmaking hard links in %s...zcopying files to %s...z)no files to distribute -- empty manifest?z#'%s' not a regular file -- skipping)r�)ZmkpathrZcreate_treer��hasattrrDr
rrprErFr_Z	copy_filerBZmetadataZwrite_pkg_info)rr}rdr�ru�file�destrrr�make_release_tree�s 
	


zsdist.make_release_treecCs�|j��}tj�|j|�}|�||jj�g}d|j	krT|j	�
|j	�|j	�d���|j	D]:}|j
||||j|jd�}|�
|�|jj�
dd|f�qZ||_|js�tj||jd�dS)NZtar)r}r9r:r�r�)rBrzrDrEr_r7r�r=rdrr�pop�indexZmake_archiver9r:Z
dist_filesr8r6rZremove_treer�)rr}Z	base_namer8Zfmtr�rrrr?�s 




�
zsdist.make_distributioncCs|jSr)r8rrrr�get_archive_files�szsdist.get_archive_files)#�__name__�
__module__�__qualname__ZdescriptionrZuser_optionsZboolean_optionsrZhelp_optionsZnegative_optZsub_commandsr\r;r<r@rCr>rJ�staticmethodr[rNrOrPrQrRrSrTrKrLrMrGrHr�r?r�rrrrr$sp�'����
(
*r)rDr{r�warningsrZdistutils.corerZ	distutilsrrrZdistutils.text_filerZdistutils.filelistr	r
Zdistutils.utilrZdistutils.errorsrr
rrrrrr�<module>sPKX[5S���/command/__pycache__/install_data.cpython-38.pycnu�[���U

e5d�@s<dZddlZddlmZddlmZmZGdd�de�ZdS)z�distutils.command.install_data

Implements the Distutils 'install_data' command, for installing
platform-independent data files.�N)�Command)�change_root�convert_pathc@sHeZdZdZdddgZdgZdd�Zdd	�Zd
d�Zdd
�Z	dd�Z
dS)�install_datazinstall data files)zinstall-dir=�dzIbase directory for installing data files (default: installation base dir))zroot=Nz<install everything relative to this alternate root directory)�force�fz-force installation (overwrite existing files)rcCs,d|_g|_d|_d|_|jj|_d|_dS)Nr�)�install_dir�outfiles�rootrZdistribution�
data_files�warn_dir��self�r�6/usr/lib64/python3.8/distutils/command/install_data.py�initialize_optionss
zinstall_data.initialize_optionscCs|�dddd�dS)NZinstall)rr
)rr)rr)Zset_undefined_optionsrrrr�finalize_options#s
�zinstall_data.finalize_optionscCs�|�|j�|jD]�}t|t�rbt|�}|jrB|�d||jf�|�||j�\}}|j	�
|�qt|d�}tj�
|�s�tj�|j|�}n|jr�t|j|�}|�|�|dgkr�|j	�
|�q|dD](}t|�}|�||�\}}|j	�
|�q�qdS)NzMsetup script did not provide a directory for '%s' -- installing right in '%s'rr	)Zmkpathr
r
�
isinstance�strrr�warnZ	copy_filer�append�os�path�isabs�joinrr)rr�out�_�dir�datarrr�run*s,

�
zinstall_data.runcCs
|jpgS�N)r
rrrr�
get_inputsKszinstall_data.get_inputscCs|jSr")rrrrr�get_outputsNszinstall_data.get_outputsN)�__name__�
__module__�__qualname__ZdescriptionZuser_optionsZboolean_optionsrrr!r#r$rrrrrs�	!r)�__doc__rZdistutils.corerZdistutils.utilrrrrrrr�<module>sPKX[
�nh��8command/__pycache__/install_scripts.cpython-38.opt-2.pycnu�[���U

e5d��@s@ddlZddlmZddlmZddlmZGdd�de�ZdS)�N)�Command)�log)�ST_MODEc@sLeZdZdZddddgZddgZdd	�Zd
d�Zdd
�Zdd�Z	dd�Z
dS)�install_scriptsz%install scripts (Python or otherwise))zinstall-dir=�dzdirectory to install scripts to)z
build-dir=�bz'build directory (where to install from))�force�fz-force installation (overwrite existing files))�
skip-buildNzskip the build stepsrr
cCsd|_d|_d|_d|_dS)Nr)�install_dirr�	build_dir�
skip_build��self�r�9/usr/lib64/python3.8/distutils/command/install_scripts.py�initialize_optionssz"install_scripts.initialize_optionscCs |�dd�|�dddd�dS)NZbuild)�
build_scriptsrZinstall)rr)rr)r
r
)Zset_undefined_optionsrrrr�finalize_options!s�z install_scripts.finalize_optionscCs�|js|�d�|�|j|j�|_tjdkr~|��D]H}|j	rLt
�d|�q4t�|�t
dBd@}t
�d||�t�||�q4dS)Nr�posixzchanging mode of %simi�zchanging mode of %s to %o)r
Zrun_commandZ	copy_treerr�outfiles�os�name�get_outputsZdry_runr�info�statr�chmod)r�file�moderrr�run)s

zinstall_scripts.runcCs|jjp
gS�N)ZdistributionZscriptsrrrr�
get_inputs8szinstall_scripts.get_inputscCs
|jpgSr )rrrrrr;szinstall_scripts.get_outputsN)�__name__�
__module__�__qualname__ZdescriptionZuser_optionsZboolean_optionsrrrr!rrrrrrs�r)rZdistutils.corerZ	distutilsrrrrrrrr�<module>sPKX[��W�5�50command/__pycache__/install.cpython-38.opt-1.pycnu�[���U

&�.e�j�@sdZddlZddlZddlmZddlmZddlmZddl	m
Z
ddlmZddl
mZdd	lmZmZmZdd
lmZddlmZddlmZdd
lmZdZdddddd�Zdddddd�dddddd�ed�Ze�rdddddd�ed <ddd!d"dd�ed#<dZGd$d%�d%e�ZdS)&zFdistutils.command.install

Implements the Distutils 'install' command.�N)�log)�Command)�DEBUG)�get_config_vars)�DistutilsPlatformError)�
write_file)�convert_path�
subst_vars�change_root)�get_platform)�DistutilsOptionError)�	USER_BASE)�	USER_SITETz$base/Lib/site-packagesz$base/Include/$dist_namez
$base/Scriptsz$base)�purelib�platlib�headers�scripts�dataz/$base/lib/python$py_version_short/site-packagesz5$platbase/lib64/python$py_version_short/site-packagesz9$base/include/python$py_version_short$abiflags/$dist_namez	$base/binz$base/lib/pythonz$base/lib64/pythonz$base/include/python/$dist_name)�unix_prefix�	unix_home�ntz	$usersitez4$userbase/Python$py_version_nodot/Include/$dist_namez)$userbase/Python$py_version_nodot/Scriptsz	$userbaseZnt_userz=$userbase/include/python$py_version_short$abiflags/$dist_namez
$userbase/bin�	unix_userc@s:eZdZdZdddddddd	d
ddd
ddddddgZdddgZer`e�dddef�e�d�ddiZ	dd�Z
dd�Zdd �Zd!d"�Z
d#d$�Zd%d&�Zd'd(�Zd)d*�Zd+d,�Zd-d.�Zd/d0�Zd1d2�Zd3d4�Zd5d6�Zd7d8�Zd9d:�Zd;d<�Zd=d>�Zd?d@�ZdAdB�ZdCdD�ZdEefdFefdGefdHefdIdJdK�fgZdS)L�installz'install everything from build directory)zprefix=Nzinstallation prefix)zexec-prefix=Nz.(Unix only) prefix for platform-specific files)zhome=Nz+(Unix only) home directory to install under)z
install-base=Nz;base installation directory (instead of --prefix or --home))zinstall-platbase=Nz\base installation directory for platform-specific files (instead of --exec-prefix or --home))zroot=Nz<install everything relative to this alternate root directory)zinstall-purelib=Nz;installation directory for pure Python module distributions)zinstall-platlib=Nz8installation directory for non-pure module distributions)zinstall-lib=Nzginstallation directory for all module distributions (overrides --install-purelib and --install-platlib))zinstall-headers=Nz(installation directory for C/C++ headers)zinstall-scripts=Nz)installation directory for Python scripts)z
install-data=Nz%installation directory for data files)�compile�czcompile .py to .pyc [default])�
no-compileNzdon't compile .py files)z	optimize=�Ozlalso compile with optimization: -O1 for "python -O", -O2 for "python -OO", and -O0 to disable [default: -O0])�force�fz1force installation (overwrite any existing files))�
skip-buildNz2skip rebuilding everything (for testing/debugging))zrecord=Nz3filename in which to record list of installed filesrrr�userNz!install in user site-package '%s'rcCs�d|_d|_d|_d|_d|_d|_d|_d|_d|_d|_	d|_
d|_d|_t
|_t|_d|_d|_d|_d|_d|_d|_d|_d|_d|_d|_dS)zInitializes options.Nr�)�prefix�exec_prefix�homer �install_base�install_platbase�root�install_purelib�install_platlib�install_headers�install_lib�install_scripts�install_datar
�install_userbaser�install_usersiter�optimize�
extra_path�install_path_filer�
skip_build�warn_dir�
build_base�	build_lib�record��self�r:�1/usr/lib64/python3.8/distutils/command/install.py�initialize_options�s2zinstall.initialize_optionscCsx|js|js|jr&|js|jr&td��|jr@|js8|jr@td��|jrl|jsd|jsd|jsd|jsd|jrltd��tjdkr�|jr�|�	d�d|_|�
d�tjdkr�|��n|��|�
d�t
j��d	}td
d�\}}z
t
j}Wntk
r�d}YnX|j��|j��|j��|d
t
jdd�dt
jdd�|||||d�|_t�rf|j|jd<|j|jd<|��|�
d�|j|jd<|j|jd<t�r�d	dlm}td�||j�|� �|�
d�|j�r�|�!�|j"dk�r�|jj#�r�|j$|_"n|j%|_"|�&dddddddd�|�'�|j"|_(tj)�*|j"|j+�|_"|j,dk	�r\|�-ddddddd�|�
d �|�.d!d"d#�dS)$zFinalizes options.zWmust supply either prefix/exec-prefix/home or install-base/install-platbase -- not bothz9must supply either home or prefix/exec-prefix -- not bothzGcan't combine user with prefix, exec_prefix/home, or install_(plat)base�posixz+exec-prefix option ignored on this platformNzpre-finalize_{unix,other}zpost-finalize_{unix,other}()rr"r#�z%d.%d�z%d%d)Z	dist_nameZdist_versionZ
dist_fullname�
py_versionZpy_version_shortZpy_version_nodotZ
sys_prefixr"Zsys_exec_prefixr#�abiflags�userbaseZusersitezpost-expand_basedirs()�baseZplatbase)�pprintzconfig vars:zpost-expand_dirs()�librrrrrZlibbasezafter prepending root�build)r5r5)r6r6)/r"r#r$r%r&rr �os�name�warn�	dump_dirs�
finalize_unix�finalize_other�sys�version�splitrrA�AttributeError�distributionZget_nameZget_versionZget_fullname�version_info�config_vars�
HAS_USER_SITEr.r/�expand_basedirsrrD�print�expand_dirs�create_home_pathr+Zext_modulesr)r(�
convert_paths�handle_extra_path�install_libbase�path�join�
extra_dirsr'�change_rootsZset_undefined_options)r9r@r"r#rArDr:r:r;�finalize_options�s�������








�






�	�
�zinstall.finalize_optionscCs�tsdSddlm}t�|d�|jD]r}|d}|ddkrL|dd�}||jkrx|j|}|�|�}t||�}n|�|�}t||�}t�d||�q(dS)zDumps the list of user options.Nr)�
longopt_xlate�:����=z  %s: %s)	rZdistutils.fancy_getoptrar�debug�user_options�negative_opt�	translate�getattr)r9�msgra�optZopt_name�valr:r:r;rJus





zinstall.dump_dirscCsV|jdk	s|jdk	r\|jdkr2|jdkr2|jdksP|jdksP|jdksP|jdkrXtd��dS|j	r�|j
dkrttd��|j
|_|_|�d�n�|j
dk	r�|j
|_|_|�d�n�|jdk�r$|jdk	r�td��ttd�s�tjtjks�dtjkr�d	}nd
}tj�tj�||_tj�tj�||_n|jdk�r8|j|_|j|_|j|_|�d�dS)z&Finalizes options for posix platforms.NzPinstall-base or install-platbase supplied, but installation scheme is incomplete�$User base directory is not specifiedrrz*must not supply exec-prefix without prefixZreal_prefix�RPM_BUILD_ROOTz/localr>r)r%r&r+r(r)r*r,r-rr r.r�
select_schemer$r"r#�hasattrrM�base_prefixrG�environr\�normpath)r9Zadditionr:r:r;rK�sZ
������
�

�

��zinstall.finalize_unixcCs�|jr8|jdkrtd��|j|_|_|�tjd�n�|jdk	r\|j|_|_|�d�n\|j	dkrvtj
�tj	�|_	|j	|_|_z|�tj�Wn"t
k
r�tdtj��YnXdS)z)Finalizes options for non-posix platformsNrmZ_userrz)I don't know how to install stuff on '%s')r r.rr%r&rorGrHr$r"r\rsrM�KeyErrorr8r:r:r;rL�s&
�

�zinstall.finalize_othercCs<t|}tD]*}d|}t||�dkrt||||�qdS)z=Sets the install directories by applying the install schemes.�install_N)�INSTALL_SCHEMES�SCHEME_KEYSri�setattr)r9rHZscheme�key�attrnamer:r:r;ro�s
zinstall.select_schemecCsX|D]N}t||�}|dk	rtjdks.tjdkr:tj�|�}t||j�}t|||�qdS)Nr=r)rirGrHr\�
expanduserr	rSrx)r9�attrs�attrrlr:r:r;�
_expand_attrs�s
zinstall._expand_attrscCs|�dddg�dS)zNCalls `os.path.expanduser` on install_base, install_platbase and
        root.r%r&r'N�r~r8r:r:r;rU�szinstall.expand_basedirscCs|�ddddddg�dS)z+Calls `os.path.expanduser` on install dirs.r(r)r+r*r,r-Nrr8r:r:r;rW�s�zinstall.expand_dirscGs,|D]"}d|}t||tt||���qdS)z!Call `convert_path` over `names`.ruN)rxrri�r9�namesrHr}r:r:r;rY�szinstall.convert_pathscCs�|jdkr|jj|_|jdk	r�t�d�t|jt�rB|j�d�|_t|j�dkr`|jd}}n"t|j�dkrz|j\}}ntd��t	|�}nd}d}||_
||_dS)	z4Set `path_file` and `extra_dirs` using `extra_path`.NzIDistribution option extra_path is deprecated. See issue27919 for details.�,r!rr?zY'extra_path' option must be a list, tuple, or comma-separated string with 1 or 2 elementsr>)r1rQrrI�
isinstance�strrO�lenrr�	path_filer^)r9r�r^r:r:r;rZ�s(


��
zinstall.handle_extra_pathc	Gs0|D]&}d|}t||t|jt||���qdS)z:Change the install directories pointed by name using root.ruN)rxr
r'rir�r:r:r;r_szinstall.change_rootscCsb|js
dSttj�d��}|j��D]8\}}|�|�r$tj�|�s$|�	d|�t�
|d�q$dS)zCreate directories under ~.N�~zos.makedirs('%s', 0o700)i�)r rrGr\r{rS�items�
startswith�isdirZdebug_print�makedirs)r9r$rHr\r:r:r;rXszinstall.create_home_pathcCs"|js6|�d�|j�d�j}|jr6|t�kr6td��|��D]}|�|�q>|j	r\|�
�|jr�|��}|j
r�t|j
�}tt|��D]}|||d�||<q�|�t|j|fd|j�ttjjtj�}ttjj|�}tj�tj�|j��}|j�r|j	�r|j�s||k�rt�d|j�dS)zRuns the command.rFz"Can't install when cross-compilingNz'writing list of installed files to '%s'z�modules installed to '%s', which is not in Python's module search path (sys.path) -- you'll have to change the search path yourself)r3Zrun_commandrQZget_command_objZ	plat_namer4rr�get_sub_commandsr��create_path_filer7�get_outputsr'r��range�executer�maprGr\rsrM�normcaser+r2rre)r9Z
build_plat�cmd_name�outputsZroot_lenZcounterZsys_pathr+r:r:r;�run(sD

������zinstall.runcCsJtj�|j|jd�}|jr8|�t||jgfd|�n|�	d|�dS)zCreates the .pth file�.pthzcreating %szpath file '%s' not createdN)
rGr\r]r[r�r2r�rr^rI)r9�filenamer:r:r;r�Ts
�
�zinstall.create_path_filecCshg}|��D].}|�|�}|��D]}||kr"|�|�q"q|jrd|jrd|�tj�|j	|jd��|S)z.Assembles the outputs of all the sub-commands.r�)
r��get_finalized_commandr��appendr�r2rGr\r]r[)r9r�r��cmdr�r:r:r;r�bs
�zinstall.get_outputscCs.g}|��D]}|�|�}|�|���q|S)z*Returns the inputs of all the sub-commands)r�r��extend�
get_inputs)r9Zinputsr�r�r:r:r;r�ss

zinstall.get_inputscCs|j��p|j��S)zSReturns true if the current distribution has any Python
        modules to install.)rQZhas_pure_modulesZhas_ext_modulesr8r:r:r;�has_libs
�zinstall.has_libcCs
|j��S)zLReturns true if the current distribution has any headers to
        install.)rQ�has_headersr8r:r:r;r��szinstall.has_headerscCs
|j��S)zMReturns true if the current distribution has any scripts to.
        install.)rQ�has_scriptsr8r:r:r;r��szinstall.has_scriptscCs
|j��S)zJReturns true if the current distribution has any data to.
        install.)rQZhas_data_filesr8r:r:r;�has_data�szinstall.has_datar+r*r,r-Zinstall_egg_infocCsdS)NTr:r8r:r:r;�<lambda>��zinstall.<lambda>) �__name__�
__module__�__qualname__ZdescriptionrfZboolean_optionsrTr�rrgr<r`rJrKrLror~rUrWrYrZr_rXr�r�r�r�r�r�r�r�Zsub_commandsr:r:r:r;rIsn	�;
�
N3		",
�r)�__doc__rMrGZ	distutilsrZdistutils.corerZdistutils.debugrZdistutils.sysconfigrZdistutils.errorsrZdistutils.file_utilrZdistutils.utilrr	r
rrZsiter
rrTZWINDOWS_SCHEMErvrwrr:r:r:r;�<module>sb�
����
	�
PKX[��	V�8�8(command/__pycache__/sdist.cpython-38.pycnu�[���U

e5d=J�@s�dZddlZddlZddlmZddlmZddlmZddlm	Z	ddlm
Z
ddlmZdd	lm
Z
dd
lmZddlmZddlmZdd
lmZmZdd�ZGdd�de�ZdS)zadistutils.command.sdist

Implements the Distutils 'sdist' command (create a source distribution).�N)�glob)�warn)�Command)�dir_util)�	file_util)�archive_util)�TextFile)�FileList)�log)�convert_path)�DistutilsTemplateError�DistutilsOptionErrorcCs`ddlm}ddlm}g}|��D] }|�d|d||df�q$|��||��d�dS)zoPrint all possible values for the 'formats' option (used by
    the "--help-formats" command-line option).
    r)�FancyGetopt)�ARCHIVE_FORMATS�formats=N�z.List of available source distribution formats:)Zdistutils.fancy_getoptrZdistutils.archive_utilr�keys�append�sortZ
print_help)rr�formats�format�r�//usr/lib64/python3.8/distutils/command/sdist.py�show_formatss
��rc@s"eZdZdZdd�Zdddddd	d
ddd
ddddgZddddddgZdddefgZddd�Z	defgZ
dZdd�Zd d!�Z
d"d#�Zd$d%�Zd&d'�Zd(d)�Zed*d+��Zd,d-�Zd.d/�Zd0d1�Zd2d3�Zd4d5�Zd6d7�Zd8d9�Zd:d;�Zd<d=�Zd>d?�Zd@dA�ZdBdC�ZdDdE�Z dFdG�Z!dHdI�Z"dS)J�sdistz6create a source distribution (tarball, zip file, etc.)cCs|jS)zYCallable used for the check sub-command.

        Placed here so user_options can view it)�metadata_check��selfrrr�checking_metadata(szsdist.checking_metadata)z	template=�tz5name of manifest template file [default: MANIFEST.in])z	manifest=�mz)name of manifest file [default: MANIFEST])�use-defaultsNzRinclude the default file set in the manifest [default; disable with --no-defaults])�no-defaultsNz"don't include the default file set)�pruneNz�specifically exclude files/directories that should not be distributed (build tree, RCS/CVS dirs, etc.) [default; disable with --no-prune])�no-pruneNz$don't automatically exclude anything)�
manifest-only�ozEjust regenerate the manifest and then stop (implies --force-manifest))�force-manifest�fzkforcibly regenerate the manifest and carry on as usual. Deprecated: now the manifest is always regenerated.)rNz6formats for source distribution (comma-separated list))�	keep-temp�kz@keep the distribution tree around after creating archive file(s))z	dist-dir=�dzFdirectory to put the source distribution archive(s) in [default: dist])�metadata-checkNz[Ensure that all required elements of meta-data are supplied. Warn if any missing. [default])zowner=�uz@Owner name used when creating a tar file [default: current user])zgroup=�gzAGroup name used when creating a tar file [default: current group]r!r#r%r'r)r,zhelp-formatsNz#list available distribution formats)r"r$�check)ZREADMEz
README.txtz
README.rstcCsTd|_d|_d|_d|_d|_d|_dg|_d|_d|_d|_	d|_
d|_d|_dS)N�rZgztar)
�template�manifest�use_defaultsr#�
manifest_onlyZforce_manifestr�	keep_temp�dist_dir�
archive_filesr�owner�grouprrrr�initialize_optionseszsdist.initialize_optionscCsZ|jdkrd|_|jdkr d|_|�d�t�|j�}|rFtd|��|jdkrVd|_dS)NZMANIFESTzMANIFEST.inrzunknown archive format '%s'Zdist)r2r1Zensure_string_listrZcheck_archive_formatsrr
r6)rZ
bad_formatrrr�finalize_options|s


�
zsdist.finalize_optionscCs>t�|_|��D]}|�|�q|��|jr2dS|��dS�N)r	�filelistZget_sub_commandsZrun_command�
get_file_listr4�make_distribution)rZcmd_namerrr�run�sz	sdist.runcCs*tdt�|j�d�}|��|��dS)zDeprecated API.zadistutils.command.sdist.check_metadata is deprecated,               use the check command insteadr/N)r�PendingDeprecationWarning�distributionZget_command_objZensure_finalizedr@)rr/rrr�check_metadata�s�zsdist.check_metadatacCs�tj�|j�}|s:|��r:|��|j��|j��dS|sN|�	d|j�|j�
�|jrf|��|rr|�
�|jr�|��|j��|j��|��dS)aCFigure out the list of files to include in the source
        distribution, and put it in 'self.filelist'.  This might involve
        reading the manifest template (and writing the manifest), or just
        reading the manifest, or just using the default file set -- it all
        depends on the user's options.
        Nz?manifest template '%s' does not exist (using default file list))�os�path�isfiler1�_manifest_is_not_generated�
read_manifestr=rZremove_duplicatesr�findallr3�add_defaults�
read_templater#�prune_file_list�write_manifest)rZtemplate_existsrrrr>�s(

�


zsdist.get_file_listcCs<|��|��|��|��|��|��|��dS)a9Add all the default files to self.filelist:
          - README or README.txt
          - setup.py
          - test/test*.py
          - all pure Python modules mentioned in setup script
          - all files pointed by package_data (build_py)
          - all files defined in data_files.
          - all files defined as scripts.
          - all C sources listed as part of extensions or C libraries
            in the setup script (doesn't catch C headers!)
        Warns if (README or README.txt) or setup.py are missing; everything
        else is optional.
        N)�_add_defaults_standards�_add_defaults_optional�_add_defaults_python�_add_defaults_data_files�_add_defaults_ext�_add_defaults_c_libs�_add_defaults_scriptsrrrrrJ�szsdist.add_defaultscCs:tj�|�sdStj�|�}tj�|�\}}|t�|�kS)z�
        Case-sensitive path existence check

        >>> sdist._cs_path_exists(__file__)
        True
        >>> sdist._cs_path_exists(__file__.upper())
        False
        F)rDrE�exists�abspath�split�listdir)�fspathrVZ	directory�filenamerrr�_cs_path_exists�s

zsdist._cs_path_existscCs�|j|jjg}|D]~}t|t�rj|}d}|D]"}|�|�r,d}|j�|�qPq,|s�|�dd�	|��q|�|�r�|j�|�q|�d|�qdS)NFTz,standard file not found: should have one of z, zstandard file '%s' not found)
�READMESrBZscript_name�
isinstance�tupler[r=rr�join)rZ	standards�fnZaltsZgot_itrrrrN�s"

�
zsdist._add_defaults_standardscCs4ddg}|D]"}ttjjt|��}|j�|�qdS)Nz
test/test*.pyz	setup.cfg)�filterrDrErFrr=�extend)rZoptional�pattern�filesrrrrOszsdist._add_defaults_optionalcCs\|�d�}|j��r$|j�|���|jD],\}}}}|D]}|j�tj	�
||��q:q*dS)N�build_py)�get_finalized_commandrBZhas_pure_modulesr=rb�get_source_files�
data_filesrrDrEr_)rreZpkgZsrc_dirZ	build_dir�	filenamesrZrrrrPs

zsdist._add_defaults_pythoncCsz|j��rv|jjD]b}t|t�rBt|�}tj�|�rt|j	�
|�q|\}}|D]$}t|�}tj�|�rN|j	�
|�qNqdSr<)rBZhas_data_filesrhr]�strrrDrErFr=r)r�item�dirnamerir(rrrrQ$s

zsdist._add_defaults_data_filescCs(|j��r$|�d�}|j�|���dS)N�	build_ext)rBZhas_ext_modulesrfr=rbrg)rrmrrrrR5s

zsdist._add_defaults_extcCs(|j��r$|�d�}|j�|���dS)N�
build_clib)rBZhas_c_librariesrfr=rbrg)rrnrrrrS:s

zsdist._add_defaults_c_libscCs(|j��r$|�d�}|j�|���dS)N�
build_scripts)rBZhas_scriptsrfr=rbrg)rrorrrrT?s

zsdist._add_defaults_scriptsc
Cs�t�d|j�t|jddddddd�}zh|��}|dkr:q�z|j�|�Wq(tt	fk
r�}z|�
d|j|j|f�W5d}~XYq(Xq(W5|��XdS)z�Read and parse manifest template file named by self.template.

        (usually "MANIFEST.in") The parsing and processing is done by
        'self.filelist', which updates itself accordingly.
        zreading manifest template '%s'r0)Zstrip_commentsZskip_blanksZ
join_linesZ	lstrip_wsZ	rstrip_wsZ
collapse_joinNz%s, line %d: %s)
r
�infor1r�close�readliner=Zprocess_template_liner�
ValueErrorrrZZcurrent_line)rr1�line�msgrrrrKDs&
�
� zsdist.read_templatecCs�|�d�}|j��}|jjd|jd�|jjd|d�tjdkrFd}nd}ddd	d
ddd
g}d|d�|�|f}|jj|dd�dS)avPrune off branches that might slip into the file list as created
        by 'read_template()', but really don't belong there:
          * the build tree (typically "build")
          * the release tree itself (only an issue if we ran "sdist"
            previously with --keep-temp, or it aborted)
          * any RCS, CVS, .svn, .hg, .git, .bzr, _darcs directories
        �buildN)�prefixZwin32z/|\\�/ZRCSZCVSz\.svnz\.hgz\.gitz\.bzrZ_darcsz(^|%s)(%s)(%s).*�|r0)Zis_regex)	rfrB�get_fullnamer=Zexclude_patternZ
build_base�sys�platformr_)rrv�base_dirZsepsZvcs_dirsZvcs_ptrnrrrrLas


�zsdist.prune_file_listcCsX|��rt�d|j�dS|jjdd�}|�dd�|�tj	|j|fd|j�dS)z�Write the file list in 'self.filelist' (presumably as filled in
        by 'add_defaults()' and 'read_template()') to the manifest file
        named by 'self.manifest'.
        z5not writing to manually maintained manifest file '%s'Nrz*# file GENERATED by distutils, do NOT editzwriting manifest file '%s')
rGr
rpr2r=rd�insertZexecuterZ
write_file)rZcontentrrrrMys��zsdist.write_manifestcCs<tj�|j�sdSt|j�}z|��}W5|��X|dkS)NFz+# file GENERATED by distutils, do NOT edit
)rDrErFr2�openrqrr)r�fpZ
first_linerrrrG�s

z sdist._manifest_is_not_generatedc	CsVt�d|j�t|j��4}|D](}|��}|�d�s|s:q|j�|�qW5QRXdS)z�Read the manifest file (named by 'self.manifest') and use it to
        fill in 'self.filelist', the list of files to include in the source
        distribution.
        zreading manifest file '%s'�#N)r
rpr2r�strip�
startswithr=r)rr2rtrrrrH�szsdist.read_manifestcCs�|�|�tj|||jd�ttd�r4d}d|}nd}d|}|sPt�d�n
t�|�|D]<}tj	�
|�s|t�d|�q^tj	�||�}|j|||d	�q^|j
j�|�dS)
a�Create the directory tree that will become the source
        distribution archive.  All directories implied by the filenames in
        'files' are created under 'base_dir', and then we hard link or copy
        (if hard linking is unavailable) those files into place.
        Essentially, this duplicates the developer's source tree, but in a
        directory named after the distribution, containing only the files
        to be distributed.
        ��dry_run�linkZhardzmaking hard links in %s...Nzcopying files to %s...z)no files to distribute -- empty manifest?z#'%s' not a regular file -- skipping)r�)ZmkpathrZcreate_treer��hasattrrDr
rrprErFr_Z	copy_filerBZmetadataZwrite_pkg_info)rr}rdr�ru�file�destrrr�make_release_tree�s 
	


zsdist.make_release_treecCs�|j��}tj�|j|�}|�||jj�g}d|j	krT|j	�
|j	�|j	�d���|j	D]:}|j
||||j|jd�}|�
|�|jj�
dd|f�qZ||_|js�tj||jd�dS)a�Create the source distribution(s).  First, we create the release
        tree with 'make_release_tree()'; then, we create all required
        archive files (according to 'self.formats') from the release tree.
        Finally, we clean up by blowing away the release tree (unless
        'self.keep_temp' is true).  The list of archive files created is
        stored so it can be retrieved later by 'get_archive_files()'.
        Ztar)r}r8r9r�r�N)rBrzrDrEr_r6r�r=rdrr�pop�indexZmake_archiver8r9Z
dist_filesr7r5rZremove_treer�)rr}Z	base_namer7Zfmtr�rrrr?�s 




�
zsdist.make_distributioncCs|jS)zzReturn the list of archive files created when the command
        was run, or None if the command hasn't run yet.
        )r7rrrr�get_archive_files�szsdist.get_archive_files)#�__name__�
__module__�__qualname__ZdescriptionrZuser_optionsZboolean_optionsrZhelp_optionsZnegative_optZsub_commandsr\r:r;r@rCr>rJ�staticmethodr[rNrOrPrQrRrSrTrKrLrMrGrHr�r?r�rrrrr$sp�'����
(
*r)�__doc__rDr{r�warningsrZdistutils.corerZ	distutilsrrrZdistutils.text_filerZdistutils.filelistr	r
Zdistutils.utilrZdistutils.errorsrr
rrrrrr�<module>sPKX[�m%��1�10command/__pycache__/install.cpython-38.opt-2.pycnu�[���U

&�.e�j�@sddlZddlZddlmZddlmZddlmZddlm	Z	ddl
mZddlm
Z
ddlmZmZmZdd	lmZdd
l
mZddlmZddlmZd
Zdddddd�Zdddddd�dddddd�ed�Ze�rdddddd�ed<ddd d!dd�ed"<dZGd#d$�d$e�ZdS)%�N)�log)�Command)�DEBUG)�get_config_vars)�DistutilsPlatformError)�
write_file)�convert_path�
subst_vars�change_root)�get_platform)�DistutilsOptionError)�	USER_BASE)�	USER_SITETz$base/Lib/site-packagesz$base/Include/$dist_namez
$base/Scriptsz$base)�purelib�platlib�headers�scripts�dataz/$base/lib/python$py_version_short/site-packagesz5$platbase/lib64/python$py_version_short/site-packagesz9$base/include/python$py_version_short$abiflags/$dist_namez	$base/binz$base/lib/pythonz$base/lib64/pythonz$base/include/python/$dist_name)�unix_prefix�	unix_home�ntz	$usersitez4$userbase/Python$py_version_nodot/Include/$dist_namez)$userbase/Python$py_version_nodot/Scriptsz	$userbaseZnt_userz=$userbase/include/python$py_version_short$abiflags/$dist_namez
$userbase/bin�	unix_userc@s:eZdZdZdddddddd	d
ddd
ddddddgZdddgZer`e�dddef�e�d�ddiZ	dd�Z
dd�Zdd �Zd!d"�Z
d#d$�Zd%d&�Zd'd(�Zd)d*�Zd+d,�Zd-d.�Zd/d0�Zd1d2�Zd3d4�Zd5d6�Zd7d8�Zd9d:�Zd;d<�Zd=d>�Zd?d@�ZdAdB�ZdCdD�ZdEefdFefdGefdHefdIdJdK�fgZdS)L�installz'install everything from build directory)zprefix=Nzinstallation prefix)zexec-prefix=Nz.(Unix only) prefix for platform-specific files)zhome=Nz+(Unix only) home directory to install under)z
install-base=Nz;base installation directory (instead of --prefix or --home))zinstall-platbase=Nz\base installation directory for platform-specific files (instead of --exec-prefix or --home))zroot=Nz<install everything relative to this alternate root directory)zinstall-purelib=Nz;installation directory for pure Python module distributions)zinstall-platlib=Nz8installation directory for non-pure module distributions)zinstall-lib=Nzginstallation directory for all module distributions (overrides --install-purelib and --install-platlib))zinstall-headers=Nz(installation directory for C/C++ headers)zinstall-scripts=Nz)installation directory for Python scripts)z
install-data=Nz%installation directory for data files)�compile�czcompile .py to .pyc [default])�
no-compileNzdon't compile .py files)z	optimize=�Ozlalso compile with optimization: -O1 for "python -O", -O2 for "python -OO", and -O0 to disable [default: -O0])�force�fz1force installation (overwrite any existing files))�
skip-buildNz2skip rebuilding everything (for testing/debugging))zrecord=Nz3filename in which to record list of installed filesrrr�userNz!install in user site-package '%s'rcCs�d|_d|_d|_d|_d|_d|_d|_d|_d|_d|_	d|_
d|_d|_t
|_t|_d|_d|_d|_d|_d|_d|_d|_d|_d|_d|_dS)Nr�)�prefix�exec_prefix�homer �install_base�install_platbase�root�install_purelib�install_platlib�install_headers�install_lib�install_scripts�install_datar
�install_userbaser�install_usersiter�optimize�
extra_path�install_path_filer�
skip_build�warn_dir�
build_base�	build_lib�record��self�r:�1/usr/lib64/python3.8/distutils/command/install.py�initialize_options�s2zinstall.initialize_optionscCsx|js|js|jr&|js|jr&td��|jr@|js8|jr@td��|jrl|jsd|jsd|jsd|jsd|jrltd��tjdkr�|jr�|�	d�d|_|�
d�tjdkr�|��n|��|�
d�t
j��d}td	d
�\}}z
t
j}Wntk
r�d}YnX|j��|j��|j��|dt
jdd
�dt
jdd
�|||||d�|_t�rf|j|jd<|j|jd<|��|�
d�|j|jd<|j|jd<t�r�ddlm}td�||j�|� �|�
d�|j�r�|�!�|j"dk�r�|jj#�r�|j$|_"n|j%|_"|�&dddddddd�|�'�|j"|_(tj)�*|j"|j+�|_"|j,dk	�r\|�-ddddddd�|�
d�|�.d d!d"�dS)#NzWmust supply either prefix/exec-prefix/home or install-base/install-platbase -- not bothz9must supply either home or prefix/exec-prefix -- not bothzGcan't combine user with prefix, exec_prefix/home, or install_(plat)base�posixz+exec-prefix option ignored on this platformzpre-finalize_{unix,other}zpost-finalize_{unix,other}()rr"r#�z%d.%d�z%d%d)Z	dist_nameZdist_versionZ
dist_fullname�
py_versionZpy_version_shortZpy_version_nodotZ
sys_prefixr"Zsys_exec_prefixr#�abiflags�userbaseZusersitezpost-expand_basedirs()�baseZplatbase)�pprintzconfig vars:zpost-expand_dirs()�librrrrrZlibbasezafter prepending root�build)r5r5)r6r6)/r"r#r$r%r&rr �os�name�warn�	dump_dirs�
finalize_unix�finalize_other�sys�version�splitrrA�AttributeError�distributionZget_nameZget_versionZget_fullname�version_info�config_vars�
HAS_USER_SITEr.r/�expand_basedirsrrD�print�expand_dirs�create_home_pathr+Zext_modulesr)r(�
convert_paths�handle_extra_path�install_libbase�path�join�
extra_dirsr'�change_rootsZset_undefined_options)r9r@r"r#rArDr:r:r;�finalize_options�s�������








�






�	�
�zinstall.finalize_optionscCs�tsdSddlm}t�|d�|jD]r}|d}|ddkrL|dd�}||jkrx|j|}|�|�}t||�}n|�|�}t||�}t�d||�q(dS)Nr)�
longopt_xlate�:����=z  %s: %s)	rZdistutils.fancy_getoptrar�debug�user_options�negative_opt�	translate�getattr)r9�msgra�optZopt_name�valr:r:r;rJus





zinstall.dump_dirscCsV|jdk	s|jdk	r\|jdkr2|jdkr2|jdksP|jdksP|jdksP|jdkrXtd��dS|j	r�|j
dkrttd��|j
|_|_|�d�n�|j
dk	r�|j
|_|_|�d�n�|jdk�r$|jdk	r�td��ttd�s�tjtjks�dtjkr�d}nd	}tj�tj�||_tj�tj�||_n|jdk�r8|j|_|j|_|j|_|�d
�dS)NzPinstall-base or install-platbase supplied, but installation scheme is incomplete�$User base directory is not specifiedrrz*must not supply exec-prefix without prefixZreal_prefix�RPM_BUILD_ROOTz/localr>r)r%r&r+r(r)r*r,r-rr r.r�
select_schemer$r"r#�hasattrrM�base_prefixrG�environr\�normpath)r9Zadditionr:r:r;rK�sZ
������
�

�

��zinstall.finalize_unixcCs�|jr8|jdkrtd��|j|_|_|�tjd�n�|jdk	r\|j|_|_|�d�n\|j	dkrvtj
�tj	�|_	|j	|_|_z|�tj�Wn"t
k
r�tdtj��YnXdS)NrmZ_userrz)I don't know how to install stuff on '%s')r r.rr%r&rorGrHr$r"r\rsrM�KeyErrorr8r:r:r;rL�s&
�

�zinstall.finalize_othercCs<t|}tD]*}d|}t||�dkrt||||�qdS�NZinstall_)�INSTALL_SCHEMES�SCHEME_KEYSri�setattr)r9rHZscheme�key�attrnamer:r:r;ro�s
zinstall.select_schemecCsX|D]N}t||�}|dk	rtjdks.tjdkr:tj�|�}t||j�}t|||�qdS)Nr=r)rirGrHr\�
expanduserr	rSrx)r9�attrs�attrrlr:r:r;�
_expand_attrs�s
zinstall._expand_attrscCs|�dddg�dS)Nr%r&r'�r~r8r:r:r;rU�szinstall.expand_basedirscCs|�ddddddg�dS)Nr(r)r+r*r,r-rr8r:r:r;rW�s�zinstall.expand_dirscGs,|D]"}d|}t||tt||���qdSru)rxrri�r9�namesrHr}r:r:r;rY�szinstall.convert_pathscCs�|jdkr|jj|_|jdk	r�t�d�t|jt�rB|j�d�|_t|j�dkr`|jd}}n"t|j�dkrz|j\}}ntd��t	|�}nd}d}||_
||_dS)NzIDistribution option extra_path is deprecated. See issue27919 for details.�,r!rr?zY'extra_path' option must be a list, tuple, or comma-separated string with 1 or 2 elementsr>)r1rQrrI�
isinstance�strrO�lenrr�	path_filer^)r9r�r^r:r:r;rZ�s(


��
zinstall.handle_extra_pathc	Gs0|D]&}d|}t||t|jt||���qdSru)rxr
r'rir�r:r:r;r_szinstall.change_rootscCsb|js
dSttj�d��}|j��D]8\}}|�|�r$tj�|�s$|�	d|�t�
|d�q$dS)N�~zos.makedirs('%s', 0o700)i�)r rrGr\r{rS�items�
startswith�isdirZdebug_print�makedirs)r9r$rHr\r:r:r;rXszinstall.create_home_pathcCs"|js6|�d�|j�d�j}|jr6|t�kr6td��|��D]}|�|�q>|j	r\|�
�|jr�|��}|j
r�t|j
�}tt|��D]}|||d�||<q�|�t|j|fd|j�ttjjtj�}ttjj|�}tj�tj�|j��}|j�r|j	�r|j�s||k�rt�d|j�dS)NrFz"Can't install when cross-compilingz'writing list of installed files to '%s'z�modules installed to '%s', which is not in Python's module search path (sys.path) -- you'll have to change the search path yourself)r3Zrun_commandrQZget_command_objZ	plat_namer4rr�get_sub_commandsr��create_path_filer7�get_outputsr'r��range�executer�maprGr\rsrM�normcaser+r2rre)r9Z
build_plat�cmd_name�outputsZroot_lenZcounterZsys_pathr+r:r:r;�run(sD

������zinstall.runcCsJtj�|j|jd�}|jr8|�t||jgfd|�n|�	d|�dS)N�.pthzcreating %szpath file '%s' not created)
rGr\r]r[r�r2r�rr^rI)r9�filenamer:r:r;r�Ts
�
�zinstall.create_path_filecCshg}|��D].}|�|�}|��D]}||kr"|�|�q"q|jrd|jrd|�tj�|j	|jd��|S)Nr�)
r��get_finalized_commandr��appendr�r2rGr\r]r[)r9r�r��cmdr�r:r:r;r�bs
�zinstall.get_outputscCs.g}|��D]}|�|�}|�|���q|S�N)r�r��extend�
get_inputs)r9Zinputsr�r�r:r:r;r�ss

zinstall.get_inputscCs|j��p|j��Sr�)rQZhas_pure_modulesZhas_ext_modulesr8r:r:r;�has_libs
�zinstall.has_libcCs
|j��Sr�)rQ�has_headersr8r:r:r;r��szinstall.has_headerscCs
|j��Sr�)rQ�has_scriptsr8r:r:r;r��szinstall.has_scriptscCs
|j��Sr�)rQZhas_data_filesr8r:r:r;�has_data�szinstall.has_datar+r*r,r-Zinstall_egg_infocCsdS)NTr:r8r:r:r;�<lambda>��zinstall.<lambda>) �__name__�
__module__�__qualname__ZdescriptionrfZboolean_optionsrTr�rrgr<r`rJrKrLror~rUrWrYrZr_rXr�r�r�r�r�r�r�r�Zsub_commandsr:r:r:r;rIsn	�;
�
N3		",
�r)rMrGZ	distutilsrZdistutils.corerZdistutils.debugrZdistutils.sysconfigrZdistutils.errorsrZdistutils.file_utilrZdistutils.utilrr	r
rrZsiter
rrTZWINDOWS_SCHEMErvrwrr:r:r:r;�<module>s`�
����
	�
PKX[�̵ή�2command/__pycache__/install_headers.cpython-38.pycnu�[���U

e5d�@s$dZddlmZGdd�de�ZdS)z�distutils.command.install_headers

Implements the Distutils 'install_headers' command, to install C/C++ header
files to the Python include directory.�)�Commandc@sFeZdZdZddgZdgZdd�Zdd�Zd	d
�Zdd�Z	d
d�Z
dS)�install_headerszinstall C/C++ header files)zinstall-dir=�dz$directory to install header files to)�force�fz-force installation (overwrite existing files)rcCsd|_d|_g|_dS)Nr)�install_dirr�outfiles��self�r�9/usr/lib64/python3.8/distutils/command/install_headers.py�initialize_optionssz"install_headers.initialize_optionscCs|�ddd�dS)NZinstall)rr)rr)Zset_undefined_optionsr	rrr�finalize_optionss�z install_headers.finalize_optionscCsH|jj}|sdS|�|j�|D]"}|�||j�\}}|j�|�q dS�N)�distribution�headersZmkpathrZ	copy_filer�append)r
r�header�out�_rrr�run!szinstall_headers.runcCs|jjp
gSr)rrr	rrr�
get_inputs+szinstall_headers.get_inputscCs|jSr)rr	rrr�get_outputs.szinstall_headers.get_outputsN)�__name__�
__module__�__qualname__ZdescriptionZuser_optionsZboolean_optionsr
rrrrrrrrr
s�
rN)�__doc__Zdistutils.corerrrrrr�<module>sPKX[��7���.command/__pycache__/check.cpython-38.opt-2.pycnu�[���U

e5d��@s�ddlmZddlmZzTddlmZddlmZddlm	Z	ddlm
Z
ddlmZGdd	�d	e�Z
d
ZWnek
r�dZYnXGdd
�d
e�ZdS)�)�Command)�DistutilsSetupError)�Reporter)�Parser)�frontend)�nodes)�StringIOc@seZdZd	dd�Zdd�ZdS)
�SilentReporterNr�ascii�replacec
Cs"g|_t�||||||||�dS�N)�messagesr�__init__)�self�source�report_level�
halt_level�stream�debug�encoding�
error_handler�r�//usr/lib64/python3.8/distutils/command/check.pyrs�zSilentReporter.__init__cOs6|j�||||f�tj|f|�||j|d�|��S)N)�level�type)r
�appendr�system_messageZlevels)rr�messageZchildren�kwargsrrrrs���zSilentReporter.system_message)Nrr
r)�__name__�
__module__�__qualname__rrrrrrr	s�
r	TFc@s\eZdZdZdddgZdddgZdd	�Zd
d�Zdd
�Zdd�Z	dd�Z
dd�Zdd�ZdS)�checkz"perform some checks on the package)�metadata�mzVerify meta-data)�restructuredtext�rzEChecks if long string meta-data syntax are reStructuredText-compliant)�strict�sz(Will exit with an error if a check failsr#r%r'cCsd|_d|_d|_d|_dS)Nr�)r%r#r'�	_warnings�rrrr�initialize_options1szcheck.initialize_optionscCsdSrrr+rrr�finalize_options8szcheck.finalize_optionscCs|jd7_t�||�S)Nr))r*r�warn)r�msgrrrr.;sz
check.warncCsL|jr|��|jr0tr"|��n|jr0td��|jrH|jdkrHtd��dS)NzThe docutils package is needed.rzPlease correct your package.)r#�check_metadatar%�HAS_DOCUTILS�check_restructuredtextr'rr*r+rrr�run@s
z	check.runcCs�|jj}g}dD]"}t||�r(t||�s|�|�q|rL|�dd�|��|jrd|js�|�d�n"|j	r||j
s�|�d�n
|�d�dS)N)�name�versionZurlzmissing required meta-data: %sz, zLmissing meta-data: if 'author' supplied, 'author_email' must be supplied toozTmissing meta-data: if 'maintainer' supplied, 'maintainer_email' must be supplied toozimissing meta-data: either (author and author_email) or (maintainer and maintainer_email) must be supplied)�distributionr#�hasattr�getattrrr.�joinZauthorZauthor_emailZ
maintainerZmaintainer_email)rr#Zmissing�attrrrrr0Pszcheck.check_metadatacCsX|j��}|�|�D]>}|d�d�}|dkr8|d}nd|d|f}|�|�qdS)N����liner)z%s (line %s))r6Zget_long_description�_check_rst_data�getr.)r�dataZwarningr<rrrr2ns

zcheck.check_restructuredtextc
Cs�|jjp
d}t�}tjtfd���}d|_d|_d|_t	||j
|j|j|j
|j|jd�}tj|||d�}|�|d�z|�||�Wn:tk
r�}z|j�dd|dif�W5d}~XYnX|jS)	Nzsetup.py)Z
components�)rrrr)rr;z!Could not finish the parsing: %s.�)r6Zscript_namerrZOptionParserZget_default_valuesZ	tab_widthZpep_referencesZrfc_referencesr	rrZwarning_streamrZerror_encodingZerror_encoding_error_handlerr�documentZnote_source�parse�AttributeErrorr
r)rr?�source_path�parserZsettingsZreporterrB�errrr=ys.��zcheck._check_rst_dataN)
rr r!ZdescriptionZuser_optionsZboolean_optionsr,r-r.r3r0r2r=rrrrr"$s�
r"N)Zdistutils.corerZdistutils.errorsrZdocutils.utilsrZdocutils.parsers.rstrZdocutilsrr�iorr	r1�	Exceptionr"rrrr�<module>s
PKX[}�Q
++.command/__pycache__/build.cpython-38.opt-1.pycnu�[���U

e5d��@sTdZddlZddlZddlmZddlmZddlmZdd�Z	Gdd	�d	e�Z
dS)
zBdistutils.command.build

Implements the Distutils 'build' command.�N)�Command)�DistutilsOptionError)�get_platformcCsddlm}|�dS)Nr��show_compilers)Zdistutils.ccompilerrr�r�//usr/lib64/python3.8/distutils/command/build.pyrsrc@s�eZdZdZdddddddd	d
e�fddd
ddgZddgZdddefgZdd�Z	dd�Z
dd�Zdd�Zdd�Z
dd �Zd!d"�Zd#efd$e
fd%efd&efgZdS)'�buildz"build everything needed to install)zbuild-base=�bz base directory for build library)zbuild-purelib=Nz2build directory for platform-neutral distributions)zbuild-platlib=Nz3build directory for platform-specific distributions)z
build-lib=NzWbuild directory for all distribution (defaults to either build-purelib or build-platlib)zbuild-scripts=Nzbuild directory for scripts)zbuild-temp=�tztemporary build directoryz
plat-name=�pz6platform name to build for, if supported (default: %s))z	compiler=�czspecify the compiler type)z	parallel=�jznumber of parallel build jobs)�debug�gz;compile extensions and libraries with debugging information)�force�fz2forcibly build everything (ignore file timestamps))zexecutable=�ez5specify final destination interpreter path (build.py)rrz
help-compilerNzlist available compilerscCsLd|_d|_d|_d|_d|_d|_d|_d|_d|_d|_	d|_
d|_dS)Nr	r)�
build_base�
build_purelib�
build_platlib�	build_lib�
build_temp�
build_scriptsZcompiler�	plat_namerr�
executable�parallel��selfrrr�initialize_options8szbuild.initialize_optionscCsb|jdkrt�|_ntjdkr&td��d|jftjdd��}ttd�rR|d7}|jdkrntj	�
|jd�|_|jdkr�tj	�
|jd|�|_|j
dkr�|jjr�|j|_
n|j|_
|jdkr�tj	�
|jd|�|_|jdkr�tj	�
|jd	tjdd��|_|jdk�r tj�r tj	�tj�|_t|jt��r^zt|j�|_Wntk
�r\td
��YnXdS)N�ntzW--plat-name only supported on Windows (try using './configure --help' on your platform)z	.%s-%d.%d�Zgettotalrefcountz-pydebug�libZtempz
scripts-%d.%dzparallel should be an integer)rr�os�namer�sys�version_info�hasattrr�path�joinrrr�distributionZext_modulesrrr�normpath�
isinstancer�str�int�
ValueError)rZplat_specifierrrr�finalize_optionsHsD


�



�



�

�zbuild.finalize_optionscCs|��D]}|�|�qdS�N)Zget_sub_commandsZrun_command)rZcmd_namerrr�run�sz	build.runcCs
|j��Sr1)r*�has_pure_modulesrrrrr3�szbuild.has_pure_modulescCs
|j��Sr1)r*�has_c_librariesrrrrr4�szbuild.has_c_librariescCs
|j��Sr1)r*�has_ext_modulesrrrrr5�szbuild.has_ext_modulescCs
|j��Sr1)r*�has_scriptsrrrrr6�szbuild.has_scriptsZbuild_pyZ
build_clibZ	build_extr)�__name__�
__module__�__qualname__ZdescriptionrZuser_optionsZboolean_optionsrZhelp_optionsrr0r2r3r4r5r6Zsub_commandsrrrrr	sH�����8�r	)�__doc__r%r#Zdistutils.corerZdistutils.errorsrZdistutils.utilrrr	rrrr�<module>sPKX[��.command/__pycache__/check.cpython-38.opt-1.pycnu�[���U

e5d��@s�dZddlmZddlmZzTddlmZddlmZddl	m
Z
ddl	mZddlm
Z
Gd	d
�d
e�ZdZWnek
r�dZYnXGd
d�de�ZdS)zCdistutils.command.check

Implements the Distutils 'check' command.
�)�Command)�DistutilsSetupError)�Reporter)�Parser)�frontend)�nodes)�StringIOc@seZdZd	dd�Zdd�ZdS)
�SilentReporterNr�ascii�replacec
Cs"g|_t�||||||||�dS�N)�messagesr�__init__)�self�source�report_level�
halt_level�stream�debug�encoding�
error_handler�r�//usr/lib64/python3.8/distutils/command/check.pyrs�zSilentReporter.__init__cOs6|j�||||f�tj|f|�||j|d�|��S)N)�level�type)r
�appendr�system_messageZlevels)rr�messageZchildren�kwargsrrrrs���zSilentReporter.system_message)Nrr
r)�__name__�
__module__�__qualname__rrrrrrr	s�
r	TFc@s`eZdZdZdZdddgZdddgZd	d
�Zdd�Zd
d�Z	dd�Z
dd�Zdd�Zdd�Z
dS)�checkz6This command checks the meta-data of the package.
    z"perform some checks on the package)�metadata�mzVerify meta-data)�restructuredtext�rzEChecks if long string meta-data syntax are reStructuredText-compliant)�strict�sz(Will exit with an error if a check failsr#r%r'cCsd|_d|_d|_d|_dS)z Sets default values for options.r�N)r%r#r'�	_warnings�rrrr�initialize_options1szcheck.initialize_optionscCsdSrrr+rrr�finalize_options8szcheck.finalize_optionscCs|jd7_t�||�S)z*Counts the number of warnings that occurs.r))r*r�warn)r�msgrrrr.;sz
check.warncCsL|jr|��|jr0tr"|��n|jr0td��|jrH|jdkrHtd��dS)zRuns the command.zThe docutils package is needed.rzPlease correct your package.N)r#�check_metadatar%�HAS_DOCUTILS�check_restructuredtextr'rr*r+rrr�run@s
z	check.runcCs�|jj}g}dD]"}t||�r(t||�s|�|�q|rL|�dd�|��|jrd|js�|�d�n"|j	r||j
s�|�d�n
|�d�dS)z�Ensures that all required elements of meta-data are supplied.

        name, version, URL, (author and author_email) or
        (maintainer and maintainer_email)).

        Warns if any are missing.
        )�name�versionZurlzmissing required meta-data: %sz, zLmissing meta-data: if 'author' supplied, 'author_email' must be supplied toozTmissing meta-data: if 'maintainer' supplied, 'maintainer_email' must be supplied toozimissing meta-data: either (author and author_email) or (maintainer and maintainer_email) must be suppliedN)�distributionr#�hasattr�getattrrr.�joinZauthorZauthor_emailZ
maintainerZmaintainer_email)rr#Zmissing�attrrrrr0Pszcheck.check_metadatacCsX|j��}|�|�D]>}|d�d�}|dkr8|d}nd|d|f}|�|�qdS)z4Checks if the long string fields are reST-compliant.����lineNr)z%s (line %s))r6Zget_long_description�_check_rst_data�getr.)r�dataZwarningr<rrrr2ns

zcheck.check_restructuredtextc
Cs�|jjp
d}t�}tjtfd���}d|_d|_d|_t	||j
|j|j|j
|j|jd�}tj|||d�}|�|d�z|�||�Wn:tk
r�}z|j�dd|d	if�W5d}~XYnX|jS)
z8Returns warnings when the provided data doesn't compile.zsetup.py)Z
components�N)rrrr)rr;z!Could not finish the parsing: %s.�)r6Zscript_namerrZOptionParserZget_default_valuesZ	tab_widthZpep_referencesZrfc_referencesr	rrZwarning_streamrZerror_encodingZerror_encoding_error_handlerr�documentZnote_source�parse�AttributeErrorr
r)rr?�source_path�parserZsettingsZreporterrB�errrr=ys.��zcheck._check_rst_dataN)rr r!�__doc__ZdescriptionZuser_optionsZboolean_optionsr,r-r.r3r0r2r=rrrrr"$s�
r"N)rHZdistutils.corerZdistutils.errorsrZdocutils.utilsrZdocutils.parsers.rstrZdocutilsrr�iorr	r1�	Exceptionr"rrrr�<module>s
PKX[�N�1command/__pycache__/register.cpython-38.opt-2.pycnu�[���U

e5d�-�@s`ddlZddlZddlZddlZddlmZddlmZddl	Tddl
mZGdd�de�ZdS)�N)�warn)�
PyPIRCCommand)�*)�logc@s�eZdZdZejddgZejdddgZddd	�fgZd
d�Zdd
�Z	dd�Z
dd�Zdd�Zdd�Z
dd�Zdd�Zdd�Zddd�ZdS) �registerz7register the distribution with the Python package index)�list-classifiersNz list the valid Trove classifiers)�strictNzBWill stop the registering if the meta-data are not fully compliant�verifyrr�checkcCsdS)NT���selfrr�2/usr/lib64/python3.8/distutils/command/register.py�<lambda>�zregister.<lambda>cCst�|�d|_d|_dS)Nr)r�initialize_options�list_classifiersrrrrrrs
zregister.initialize_optionscCs*t�|�d|jfdd�}||jjd<dS)Nr)r�)r�restructuredtextr
)r�finalize_optionsr�distributionZcommand_options)r
Z
check_optionsrrrr$s

�zregister.finalize_optionscCsT|��|��|��D]}|�|�q|jr8|��n|jrH|��n|��dS)N)	r�_set_configZget_sub_commandsZrun_commandZdry_run�verify_metadatar�classifiers�
send_metadata)r
Zcmd_namerrr�run+s

zregister.runcCs8tdt�|j�d�}|��|j|_d|_|��dS)Nzddistutils.command.register.check_metadata is deprecated,               use the check command insteadr
r)r�PendingDeprecationWarningrZget_command_objZensure_finalizedrrr)r
r
rrr�check_metadata:s�zregister.check_metadatacCsz|��}|ikr@|d|_|d|_|d|_|d|_d|_n6|jd|jfkr^td|j��|jdkrp|j|_d|_dS)	N�username�password�
repository�realmTZpypiz%s not found in .pypircF)Z_read_pypircrrr r!�
has_configZDEFAULT_REPOSITORY�
ValueError)r
ZconfigrrrrDs




zregister._set_configcCs*|jd}tj�|�}t�|�|��dS)Nz?:action=list_classifiers)r �urllib�requestZurlopenr�info�_read_pypi_response)r
ZurlZresponserrrrUs
zregister.classifierscCs&|�|�d��\}}t�d||�dS)Nr	�Server response (%s): %s)�post_to_server�build_post_datarr&)r
�code�resultrrrr\szregister.verify_metadatac
Cs�|jrd}|j}|j}nd}d}}d��}||krd|�dtj�t�}|sRd}q,||kr,td�q,|dk�rl|s|td�}qn|s�t	�	d�}q|t
j��}t
j
�|j�d	}|�|j|||�|�|�d
�|�\}}|�d||ftj�|dk�r�|j�r||j_nf|�d
tj�|�d|��tj�d}|��dk�rNtd�}|�s*d}�q*|��dk�r�|�||��nl|dk�r�ddi}	d|	d<|	d<|	d<d|	d<|	d�s�td�|	d<�q�|	d|	dk�r0|	d�s�t	�	d�|	d<�q�|	d�st	�	d�|	d<�q�|	d|	dk�r�d|	d<d|	d<td��q�|	d�sJtd�|	d<�q0|�|	�\}}|dk�rrt�d||�nt�d�t�d�nP|d k�r�dd!i}	d|	d<|	d�s�td"�|	d<�q�|�|	�\}}t�d||�dS)#N�1�x�z1 2 3 4z�We need to know who you are, so please choose either:
 1. use your existing login,
 2. register as a new user,
 3. have the server generate a new password for you (and email it to you), or
 4. quit
Your selection [default 1]: z&Please choose one of the four options!z
Username: z
Password: rZsubmitr(��zAI can store your PyPI login so future submissions will be faster.z (the login will be stored in %s)�XZynzSave your login (y/N)?�n�y�2�:action�user�namerZemailZconfirmz
 Confirm: z!Password and confirm don't match!z
   EMail: z"You will receive an email shortly.z7Follow the instructions in it to complete registration.�3Zpassword_resetzYour email address: )r"rr�split�announcer�INFO�input�print�getpassr$r%ZHTTPPasswordMgr�parseZurlparser Zadd_passwordr!r)r*rZ_get_rc_file�lowerZ
_store_pypircr&)
r
Zchoicerr�choices�authZhostr+r,�datarrrrcs��



��

���








zregister.send_metadatacCs�|jj}|d|��|��|��|��|��|��|��|�	�|�
�|��|��|�
�|��|��|��d�}|ds�|ds�|dr�d|d<|S)Nz1.0)r5�metadata_versionr7�versionZsummaryZ	home_pageZauthorZauthor_email�license�description�keywords�platformrZdownload_url�provides�requires�	obsoletesrJrKrLz1.1rD)rZmetadataZget_nameZget_versionZget_descriptionZget_urlZget_contactZget_contact_emailZget_licenceZget_long_descriptionZget_keywordsZ
get_platformsZget_classifiersZget_download_urlZget_providesZget_requiresZ
get_obsoletes)r
�action�metarCrrrr*�s,�zregister.build_post_dataNc
Cs�d|kr$|�d|d|jftj�d}d|}|d}t��}|��D]~\}}t|�tg�td�fkrn|g}|D]R}t|�}|�	|�|�	d|�|�	d�|�	|�|rr|d	d
krr|�	d�qrqH|�	|�|�	d�|�
��d�}d
|tt|��d�}	t
j�|j||	�}
t
j�t
jj|d��}d}z|�|
�}Wnxt
jjk
�r�}
z"|j�rd|
j��}|
j|
jf}W5d}
~
XYnJt
jjk
�r�}
zdt|
�f}W5d}
~
XYnX|j�r�|�|�}d}|j�r�d�d|df�}|�|tj�|S)Nr7zRegistering %s to %sz3--------------GHSKFJDLGDS7543FJKLFHRE75642756743254z
--z--rz*
Content-Disposition: form-data; name="%s"z

����
�
zutf-8z/multipart/form-data; boundary=%s; charset=utf-8)zContent-typezContent-length)Zpassword_mgrr/i�)r0ZOKzK---------------------------------------------------------------------------)r:r rr;�io�StringIO�items�type�str�write�getvalue�encode�lenr$r%ZRequestZbuild_openerZHTTPBasicAuthHandler�open�errorZ	HTTPErrorZ
show_response�fp�readr+�msgZURLErrorr'�join)r
rCrB�boundaryZsep_boundaryZend_boundaryZbody�key�valueZheadersZreqZopenerr,�er_rrrr)�s^��





��

zregister.post_to_server)N)�__name__�
__module__�__qualname__rGrZuser_optionsZboolean_optionsZsub_commandsrrrrrrrrr*r)rrrrrs*��
zr)
r>rRZurllib.parser$Zurllib.request�warningsrZdistutils.corerZdistutils.errorsZ	distutilsrrrrrr�<module>sPKX[��x8command/__pycache__/install_headers.cpython-38.opt-2.pycnu�[���U

e5d�@s ddlmZGdd�de�ZdS)�)�Commandc@sFeZdZdZddgZdgZdd�Zdd�Zd	d
�Zdd�Z	d
d�Z
dS)�install_headerszinstall C/C++ header files)zinstall-dir=�dz$directory to install header files to)�force�fz-force installation (overwrite existing files)rcCsd|_d|_g|_dS)Nr)�install_dirr�outfiles��self�r�9/usr/lib64/python3.8/distutils/command/install_headers.py�initialize_optionssz"install_headers.initialize_optionscCs|�ddd�dS)NZinstall)rr)rr)Zset_undefined_optionsr	rrr�finalize_optionss�z install_headers.finalize_optionscCsH|jj}|sdS|�|j�|D]"}|�||j�\}}|j�|�q dS�N)�distribution�headersZmkpathrZ	copy_filer�append)r
r�header�out�_rrr�run!szinstall_headers.runcCs|jjp
gSr)rrr	rrr�
get_inputs+szinstall_headers.get_inputscCs|jSr)rr	rrr�get_outputs.szinstall_headers.get_outputsN)�__name__�
__module__�__qualname__ZdescriptionZuser_optionsZboolean_optionsr
rrrrrrrrr
s�
rN)Zdistutils.corerrrrrr�<module>sPKX[Q��N�'�'/command/__pycache__/config.cpython-38.opt-1.pycnu�[���U

e5d=3�@sldZddlZddlZddlmZddlmZddlmZddl	m
Z
ddd	�ZGd
d�de�Zddd
�Z
dS)a�distutils.command.config

Implements the Distutils 'config' command, a (mostly) empty command class
that exists mainly to be sub-classed by specific module distributions and
applications.  The idea is that while every "config" command is different,
at least they're all named the same, and users always see "config" in the
list of standard commands.  Also, this is a good place to put common
configure-like tasks: "try to compile this C code", or "figure out where
this header file lives".
�N)�Command)�DistutilsExecError)�customize_compiler)�logz.cz.cxx)�czc++c	@s�eZdZdZdddddddd	d
g	Zdd�Zd
d�Zdd�Zdd�Zdd�Z	dd�Z
dd�Zdd�Zdd�Z
d0dd �Zd1d!d"�Zd2d#d$�Zd3d%d&�Zd4d'd(�Zd5d*d+�Zdddgfd,d-�Zd6d.d/�ZdS)7�configzprepare to build)z	compiler=Nzspecify the compiler type)zcc=Nzspecify the compiler executable)z
include-dirs=�Iz.list of directories to search for header files)zdefine=�DzC preprocessor macros to define)zundef=�Uz!C preprocessor macros to undefine)z
libraries=�lz!external C libraries to link with)z
library-dirs=�Lz.directories to search for external C libraries)�noisyNz1show every action (compile, link, run, ...) taken)zdump-sourceNz=dump generated source files before attempting to compile themcCs4d|_d|_d|_d|_d|_d|_d|_g|_dS)N�)�compilerZcc�include_dirs�	libraries�library_dirsr
�dump_source�
temp_files��self�r�0/usr/lib64/python3.8/distutils/command/config.py�initialize_options3szconfig.initialize_optionscCs�|jdkr|jjpg|_nt|jt�r6|j�tj�|_|jdkrHg|_nt|jt�r^|jg|_|jdkrpg|_nt|jt�r�|j�tj�|_dS�N)	rZdistribution�
isinstance�str�split�os�pathseprrrrrr�finalize_optionsBs



zconfig.finalize_optionscCsdSrrrrrr�runRsz
config.runcCszddlm}m}t|j|�sv||j|jdd�|_t|j�|jrN|j�|j�|j	rb|j�
|j	�|jrv|j�|j�dS)z^Check that 'self.compiler' really is a CCompiler object;
        if not, make it one.
        r)�	CCompiler�new_compilerr)r�dry_runZforceN)
�distutils.ccompilerr"r#rrr$rrZset_include_dirsrZ
set_librariesrZset_library_dirs)rr"r#rrr�_check_compilerYs�
zconfig._check_compilerc	Csldt|}t|d��L}|r>|D]}|�d|�q |�d�|�|�|ddkr^|�d�W5QRX|S)NZ_configtest�wz#include <%s>
�
���)�LANG_EXT�open�write)r�body�headers�lang�filename�file�headerrrr�_gen_temp_sourcefileks

zconfig._gen_temp_sourcefilecCs<|�|||�}d}|j�||g�|jj|||d�||fS)Nz
_configtest.i�r)r3r�extendrZ
preprocess)rr-r.rr/�src�outrrr�_preprocessws
zconfig._preprocesscCs\|�|||�}|jr"t|d|�|j�|g�\}|j�||g�|jj|g|d�||fS)Nzcompiling '%s':r4)r3r�	dump_filerZobject_filenamesrr5�compile)rr-r.rr/r6�objrrr�_compile~szconfig._compilec
Csr|�||||�\}}tj�tj�|��d}	|jj|g|	|||d�|jjdk	r\|	|jj}	|j�	|	�|||	fS)Nr)rrZtarget_lang)
r<r�path�splitext�basenamerZlink_executableZ
exe_extensionr�append)
rr-r.rrrr/r6r;�progrrr�_link�s�zconfig._linkc	GsT|s|j}g|_t�dd�|��|D](}zt�|�Wq&tk
rLYq&Xq&dS)Nzremoving: %s� )rr�info�joinr�remove�OSError)r�	filenamesr0rrr�_clean�sz
config._cleanNrcCsRddlm}|��d}z|�||||�Wn|k
rDd}YnX|��|S)aQConstruct a source file from 'body' (a string containing lines
        of C/C++ code) and 'headers' (a list of header files to include)
        and run it through the preprocessor.  Return true if the
        preprocessor succeeded, false if there were any errors.
        ('body' probably isn't of much use, but what the heck.)
        r��CompileErrorTF)r%rKr&r8rI�rr-r.rr/rK�okrrr�try_cpp�s
zconfig.try_cppc	Csx|��|�||||�\}}t|t�r0t�|�}t|��.}d}	|��}
|
dkrPqb|�|
�r>d}	qbq>W5QRX|�	�|	S)a�Construct a source file (just like 'try_cpp()'), run it through
        the preprocessor, and return true if any line of the output matches
        'pattern'.  'pattern' should either be a compiled regex object or a
        string containing a regex.  If both 'body' and 'headers' are None,
        preprocesses an empty file -- which can be useful to determine the
        symbols the preprocessor and compiler set by default.
        F�T)
r&r8rr�rer:r+�readline�searchrI)r�patternr-r.rr/r6r7r1�match�linerrr�
search_cpp�s	



zconfig.search_cppcCsdddlm}|��z|�||||�d}Wn|k
rDd}YnXt�|rRdpTd�|��|S)zwTry to compile a source file built from 'body' and 'headers'.
        Return true on success, false otherwise.
        rrJTF�success!�failure.)r%rKr&r<rrDrIrLrrr�try_compile�s
zconfig.try_compilec
	Cspddlm}m}|��z|�||||||�d}	Wn||fk
rPd}	YnXt�|	r^dp`d�|��|	S)z�Try to compile and link a source file, built from 'body' and
        'headers', to executable form.  Return true on success, false
        otherwise.
        r�rK�	LinkErrorTFrWrX)r%rKr[r&rBrrDrI)
rr-r.rrrr/rKr[rMrrr�try_link�s
�
zconfig.try_linkc

Cs�ddlm}m}|��z.|�||||||�\}	}
}|�|g�d}Wn||tfk
rdd}YnXt�|rrdptd�|�	�|S)z�Try to compile, link to an executable, and run a program
        built from 'body' and 'headers'.  Return true on success, false
        otherwise.
        rrZTFrWrX)
r%rKr[r&rBZspawnrrrDrI)
rr-r.rrrr/rKr[r6r;ZexerMrrr�try_run�s
�

zconfig.try_runrc	Cst|��g}|r|�d|�|�d�|r<|�d|�n|�d|�|�d�d�|�d}|�|||||�S)a�Determine if function 'func' is available by constructing a
        source file that refers to 'func', and compiles and links it.
        If everything succeeds, returns true; otherwise returns false.

        The constructed source file starts out by including the header
        files listed in 'headers'.  If 'decl' is true, it then declares
        'func' (as "int func()"); you probably shouldn't supply 'headers'
        and set 'decl' true in the same call, or you might get errors about
        a conflicting declarations for 'func'.  Finally, the constructed
        'main()' function either references 'func' or (if 'call' is true)
        calls it.  'libraries' and 'library_dirs' are used when
        linking.
        z
int %s ();z
int main () {z  %s();z  %s;�}r()r&r@rEr\)	r�funcr.rrrZdeclZcallr-rrr�
check_funcs


�zconfig.check_funccCs |��|�d|||g||�S)a�Determine if 'library' is available to be linked against,
        without actually checking that any particular symbols are provided
        by it.  'headers' will be used in constructing the source file to
        be compiled, but the only effect of this is to check if all the
        header files listed are available.  Any libraries listed in
        'other_libraries' will be included in the link, in case 'library'
        has symbols that depend on other libraries.
        zint main (void) { })r&r\)rZlibraryrr.rZother_librariesrrr�	check_lib4s


�zconfig.check_libcCs|jd|g|d�S)z�Determine if the system header file named by 'header_file'
        exists and can be found by the preprocessor; return true if so,
        false otherwise.
        z
/* No body */)r-r.r)rN)rr2rrr/rrr�check_headerBs
�zconfig.check_header)NNNr)NNNr)NNr)NNNNr)NNNNr)NNNNrr)NNr)�__name__�
__module__�__qualname__ZdescriptionZuser_optionsrr r!r&r3r8r<rBrIrNrVrYr\r]r`rarbrrrrrs\�	
�

�
�
�
�
�rcCsJ|dkrt�d|�n
t�|�t|�}zt�|���W5|��XdS)zjDumps a file content into log.info.

    If head is not None, will be dumped before the file content.
    Nz%s)rrDr+�close�read)r0�headr1rrrr9Ks
r9)N)�__doc__rrPZdistutils.corerZdistutils.errorsrZdistutils.sysconfigrZ	distutilsrr*rr9rrrr�<module>s
8PKX[��?D��.command/__pycache__/clean.cpython-38.opt-2.pycnu�[���U

e5d�
�@s@ddlZddlmZddlmZddlmZGdd�de�ZdS)�N)�Command)�remove_tree)�logc@s>eZdZdZddddddgZdgZd	d
�Zdd�Zd
d�ZdS)�cleanz-clean up temporary files from 'build' command)zbuild-base=�bz2base build directory (default: 'build.build-base'))z
build-lib=Nz<build directory for all modules (default: 'build.build-lib'))zbuild-temp=�tz7temporary build directory (default: 'build.build-temp'))zbuild-scripts=Nz<build directory for scripts (default: 'build.build-scripts'))zbdist-base=Nz+temporary directory for built distributions)�all�az7remove all build output, not just temporary by-productsrcCs(d|_d|_d|_d|_d|_d|_dS)N)�
build_base�	build_lib�
build_temp�
build_scripts�
bdist_baser��self�r�//usr/lib64/python3.8/distutils/command/clean.py�initialize_options szclean.initialize_optionscCs"|�ddddd�|�dd�dS)NZbuild)r
r
)rr)r
r
)rrZbdist)rr)Zset_undefined_optionsrrrr�finalize_options(s��zclean.finalize_optionscCs�tj�|j�r t|j|jd�nt�d|j�|jrr|j	|j
|jfD],}tj�|�rdt||jd�qDt�d|�qD|js�zt�
|j�t�d|j�Wntk
r�YnXdS)N)�dry_runz%'%s' does not exist -- can't clean itz
removing '%s')�os�path�existsrrrr�debugrrrr
�warn�rmdirr
�info�OSError)rZ	directoryrrr�run1s*���z	clean.runN)	�__name__�
__module__�__qualname__ZdescriptionZuser_optionsZboolean_optionsrrrrrrrrs�	r)rZdistutils.corerZdistutils.dir_utilrZ	distutilsrrrrrr�<module>sPKX[�
�QLQL2command/__pycache__/bdist_msi.cpython-38.opt-1.pycnu�[���U

e5d߉�@s�dZddlZddlZddlmZddlmZddlmZddl	m
Z
ddlmZddl
mZdd	lmZddlZdd
lmZmZmZddlmZmZmZmZGdd
�d
e�ZGdd�de�ZdS)z#
Implements the bdist_msi command.
�N)�Command)�remove_tree)�get_python_version)�
StrictVersion)�DistutilsOptionError)�get_platform)�log)�schema�sequence�text)�	Directory�Feature�Dialog�add_datac@sFeZdZdZdd�Zdd�Zddd	�Zddd�Zddd�Zdd�Z	dS)�PyDialogz�Dialog class with a fixed layout: controls at the top, then a ruler,
    then a list of buttons: back, next, cancel. Optionally a bitmap at the
    left.cOs>tj|f|��|jd}d|d}|�dd||jd�dS)zbDialog(database, name, x, y, w, h, attributes, title, first,
        default, cancel, bitmap=true)�$�iHZ
BottomLinerN)r�__init__�h�line�w)�self�args�kwZrulerZbmwidth�r�3/usr/lib64/python3.8/distutils/command/bdist_msi.pyrs
zPyDialog.__init__c
Cs|�ddddddd|�dS)	z,Set the title text of the dialog at the top.�Title��
�@�<�z{\VerdanaBold10}%sN)r)r�titlerrrr"#s�zPyDialog.title�Back�c
Cs,|r
d}nd}|�|d|jddd|||�S)z�Add a back button with a given title, the tab-next button,
        its name in the Control table, possibly initially disabled.

        Return the button, so that events can be associated�r$���8���
pushbuttonr�rr"�next�name�active�flagsrrr�back*sz
PyDialog.back�Cancelc
Cs,|r
d}nd}|�|d|jddd|||�S)z�Add a cancel button with a given title, the tab-next button,
        its name in the Control table, possibly initially disabled.

        Return the button, so that events can be associatedr%r$i0r'r(r)r*r,rrr�cancel5szPyDialog.cancel�Nextc
Cs,|r
d}nd}|�|d|jddd|||�S)z�Add a Next button with a given title, the tab-next button,
        its name in the Control table, possibly initially disabled.

        Return the button, so that events can be associatedr%r$��r'r(r)r*r,rrrr-@sz
PyDialog.nextc
Cs,|�|t|j|d�|jdddd||�S)z�Add a button with a given title, the tab-next button,
        its name in the Control table, giving its x position; the
        y-position is aligned with the other buttons.

        Return the button, so that events can be associated�r'r(r)r%)r+�intrr)rr.r"r-Zxposrrr�xbuttonKszPyDialog.xbuttonN)r#r$)r2r$)r4r$)
�__name__�
__module__�__qualname__�__doc__rr"r1r3r-r8rrrrrs



rc@s�eZdZdZdddde�fdddd	d
ddd
g
ZddddgZddddddddddddddd d!d"d#d$d%gZd&Zd'd(�Z	d)d*�Z
d+d,�Zd-d.�Zd/d0�Z
d1d2�Zd3d4�Zd5d6�Zd7S)8�	bdist_msiz7create a Microsoft Installer (.msi) binary distribution)z
bdist-dir=Nz1temporary directory for creating the distributionz
plat-name=�pz;platform name to embed in generated filenames (default: %s))�	keep-temp�kzPkeep the pseudo-installation tree around after creating the distribution archive)ztarget-version=Nz6require a specific python version on the target system)�no-target-compile�cz/do not compile .py to .pyc on the target system)�no-target-optimize�oz;do not compile .py to .pyo (optimized) on the target system)z	dist-dir=�dz-directory to put final built distributions in)�
skip-buildNz2skip rebuilding everything (for testing/debugging))zinstall-script=NzUbasename of installation script to be run after installation or before deinstallation)zpre-install-script=Nz{Fully qualified filename of a script to be run before any files are installed.  This script need not be in the distributionr?rArCrFz2.0z2.1z2.2z2.3z2.4z2.5z2.6z2.7z2.8z2.9z3.0z3.1z3.2z3.3z3.4z3.5z3.6z3.7z3.8z3.9�XcCsFd|_d|_d|_d|_d|_d|_d|_d|_d|_d|_	d|_
dS)Nr)�	bdist_dir�	plat_name�	keep_tempZno_target_compileZno_target_optimize�target_version�dist_dir�
skip_build�install_script�pre_install_script�versions)rrrr�initialize_options}szbdist_msi.initialize_optionscCs�|�dd�|jdkr2|�d�j}tj�|d�|_t�}|jsN|j	�
�rN||_|jr�|jg|_|js�|j	�
�r�|j|kr�t
d|f��nt|j�|_|�ddd�|jr�t
d��|jr�|j	jD]}|jtj�|�kr�q�q�t
d|j��d|_dS)	NZbdist)rMrMZmsizMtarget version can only be %s, or the '--skip-build' option must be specified)rLrL)rIrIz5the pre-install-script feature is not yet implementedz(install_script '%s' not found in scripts)Zset_undefined_optionsrH�get_finalized_command�
bdist_base�os�path�joinrrK�distribution�has_ext_modulesrPrMr�list�all_versionsrOrNZscripts�basename�install_script_key)rrSZ
short_versionZscriptrrr�finalize_options�sH

�������zbdist_msi.finalize_optionscCsz|js|�d�|jddd�}|j|_|j|_d|_|�d�}d|_d|_|j�	�r�|j
}|spdtjdd�}d	|j
|f}|�d�}tj�|jd
|�|_t�d|j�|��tj�dtj�|jd��|��tjd=|�|j�|j��}|�|�}tj�|�}tj�|��r"t�|�|jj }|j!}	|	�s<|j"}	|	�sFd
}	|�#�}
dt$|
�j%}|j��}|j
�r~d|j
|f}nd|}t&�'|t(|t&�)�||	�|_*t&�+|j*t,�d|
fg}
|j-�p�|j.}|�r�|
�/d|f�|j0�r�|
�/d|j0f�|
�rt1|j*d|
�|�2�|�3�|�4�|�5�|j*�6�t7|jd��r^d|j
�pJd|f}|jj8�/|�|j9�svt:|j|j;d�dS)N�build�installr$)Zreinit_subcommandsr�install_libz%d.%d�z.%s-%s�libzinstalling to %sZPURELIBZUNKNOWNz%d.%d.%dzPython %s %sz	Python %sZDistVersionZ
ARPCONTACTZARPURLINFOABOUT�Property�
dist_filesr=�any)�dry_run)<rMZrun_commandZreinitialize_commandrH�prefixZwarn_dir�compile�optimizerWrXrK�sys�version_inforIrRrTrUrVZ
build_baseZ	build_libr�infoZensure_finalized�insert�runZmkpathrL�get_fullname�get_installer_filename�abspath�exists�unlink�metadata�authorZ
maintainerZget_versionr�version�msilibZ
init_databaser	Zgen_uuid�dbZ
add_tablesr
Zauthor_emailZmaintainer_email�appendZurlr�add_find_python�	add_files�add_scripts�add_ui�Commit�hasattrrdrJrrf)rr_r`rKZplat_specifierr^�fullname�installer_namertrurvZsversionZproduct_nameZpropsZemail�tuprrrrn�s�




�



�

z
bdist_msi.runc
Cs|j}t�d�}tj�|j�}t||d|dd�}t|ddddddd�}||d	fg}|j	|j
gD]t}d|}d|}	}
d}||j
kr�d
}d}
nd|}d}
t||	||d|
|d�}t||||||
�}|�|||f�q`|��i}|D�]\}}}|g}|�r�|�
�}t�|j�D]�}tj�|j|�}tj�|��rld
|�|�|f}||}
t|||||
|�}|�|�n�|j�s�|�|j|d�||k�r�|�|�}||<||jk�r�|j�r�td|��d||_n*||}t|jd|||j|d|jfg��qq�|��q�|�|�dS)NZ	distfiles�	TARGETDIRZ	SourceDir�PythonZ
Everythingrr$)Z	directory�zPython from another locationrazPython %s from registryz%s|%szMultiple files with name %sz[#%s]Z
DuplicateFile)rxrwZCABrTrUrqrHrr
rP�
other_versionryr~�pop�listdirZabsoluterV�isdirZ
make_shortZ	componentZstart_componentZlogicalZadd_filerNr\rrZcommit)rrxZcabZrootdir�root�f�itemsrv�targetr.�defaultZdescr"�level�dir�seenZfeatureZtodo�fileZafileZshortZnewdir�keyrrrr{
sf

�

��

zbdist_msi.add_filescCs|d}|jD�]j}d|}d|}d|}d|}d|}d|}d|}	d	|}
d
|}d|}tjrld}
nd
}
t|jd|d
|d|
f|d|d|
fg�t|jd||f||fg�t|jd|d|d|df|	d|d|df|
d|d|dfg�t|jd|||f|	||df|
d|d
fg�t|jd|||f|	||df|
d|d
fg�t|jdd|dd|fg�|d7}q
dS)asAdds code to the installer to compute the location of Python.

        Properties PYTHON.MACHINE.X.Y and PYTHON.USER.X.Y will be set from the
        registry for each version of Python.

        Properties TARGETDIRX.Y will be set from PYTHON.USER.X.Y if defined,
        else from PYTHON.MACHINE.X.Y.

        Properties PYTHONX.Y will be set to TARGETDIRX.Y\python.exei�z)SOFTWARE\Python\PythonCore\%s\InstallPathzpython.machine.zpython.user.zPYTHON.MACHINE.zPYTHON.USER.ZPythonFromMachineZPythonFromUserZ	PythonExer��PYTHON�raZ
RegLocatorNr$Z	AppSearch�CustomActioni3�[�]z]\python.exe�InstallExecuteSequence�InstallUISequenceZ	Conditionr�rz
NOT TARGETDIR�)rPrwZWin64rrx)r�start�verZinstall_pathZmachine_regZuser_regZmachine_propZ	user_propZmachine_actionZuser_actionZ
exe_actionZtarget_dir_prop�exe_propZTyperrrrzCs`�����������zbdist_msi.add_find_pythonc
Cs|jrjd}|j|jgD]P}d|}d|}t|jd|d||jfg�t|jd|d||fg�|d7}q|jr�tj�	|j
d	�}t|d
��4}|�d�t|j��}|�|�
��W5QRXW5QRXt|jdd
t�|�fg�t|jddg�t|jddg�dS)Ni�zinstall_script.r�r��2r�z&Python%s=3r$zpreinstall.batrzrem ="""
%1 %0
exit
"""
�Binary�
PreInstall)r�rar�N)r�z
NOT Installedi�)rNrPr�rrxr\rOrTrUrVrH�open�write�readrwr�)rr�r�Zinstall_actionr�Zscriptfnr�Zfinrrrr|ys6��
	
"���zbdist_msi.add_scriptscCs�
|j}d}}d}d}d}d}d}d}	t|dd	d
ddd
dg�t|dddddg�t|ddddddg�t|dtj�t|dtj�t|d||||||ddd�}
|
�d�|
jddd d!�|
jd"d#d d!�|
�d$d%d&d'd(d)d*�|
�d+d%d,d'd-d)d.�|
j	dd"dd/�}|�
d0d1�t|d2||||||ddd�}|�d3�|jddd d!�|jd"d#d d!�|�d$d%d&d'd(d)d4�|�d+d%d,d'd-d)d.�|j	dd"dd/�}|�
d0d1�t|d5||||||ddd�}
|
�d6�|
jddd d!�|
jd"d#d d!�|
�d7d%d8d'd-d)d.�|
j	dd"dd/�}|�
d0d9�t|d:||||d;|d<d<d<d=d>�}|�d?d%d@dAd%d)dB�|�d7d-dCdDd-d)dE�|�dFd-dGdHdddI�|�dJdKd-dLdHdMdNdOddd�|jd1dPd1d/�}|�
d0d1�|j	dPd<dPd/�}|�
d0dP�|jd<d1d<d/�}|�
d0d<�t|dQddRdHdSdT|dUdd�}|�dUddVdDdWddX�|�
dYdZd[d\d]dd^d��
d0d_�|�
d`dad[d\d]ddbd��
d0dc�|�
ddd d[d\d]dded��
d0df�|�
dgdhd[d\d]dd"d��
d0di�|�
djd\d[d\d]ddPd��
d0dk�|�
dldmd[d\d]ddnd��
d0do�|�
dpdqd[d\d]dd<d��
d0dr�t|dsddRdtdud|d^d^d^�}|�dFdWd%dvdwddx�|�
dbd[dydzd{ddbd^�}|�
d0d1�|�
d^d|dydzd{dd^db�}|�
d0d9�t|d}ddRdtdu||d9d9d9�}|�dFdWd%dvdwdd~�|�
d9ddydzd{dd9d�}|�
d0d1�t|d�||||||d"d"d"�}|�d7d%d&d'd�d)d��|�d��|�dd%d�d'd-d)d��}|�ddF�|�d�d%d�d'dwd)d�}|�d�dF�|jd#dd d!�|j	d�dd d!�|�d"d�}|�
d�ds�t|d�||||||d�d�d"�}|�d��|�d�d%dwdd-dd�|j���|jddd d!�|�	d�d"�}d}|j
d�d�|d��|j|jgD](}|d7}|j
d�d�|d�||d���q
|j
d�d}|dd��|j
d0d9|d�d��|�d"d��}|�
d�ds�|�d�d�d%d�ddZdd�dd�d�}|�
d�d��|j}d�|}d�|}|�d�d%dAdd%dd��}|�d�|�|�d�|�|�d�|�|�d�|�|�d�d�d%d�dd�dd�|dd�d�}|�d�|�|�d�|�|�d�|�|�d�|�t|d�||||||d�d�d�d=d>�}|�d?d%d@dAd%d)d��|�d7d-d-dDd-d)d��|�dFd-d�dHd�dd��|�d�d�d-d�dHd�d�dd�dd�|�d�dndd���
d0d9�t|d�||||||d�d�d"�}|�d��|�d�d%d�dtddd�dXd��	}|�d�d d�d�d-d��|�d�d d�d�d-d��|jd#dd d!�|�	d�d"�}|�
d�d�d�d�|j
d0d9d�d��|�d"d��}|�
d�ds�t|d�||||||d"d"d"d=d>�}|�d?d-d%dAd%d)d��|�dFd�d�ddwddġ|�d�d�d�d�d-ddơ|�dd&d�|d&d-dd��}|�ddF�|�d�d�d�dZddRd�dd�dd�}|�d�dˡ|jdd�d=d!�|j	d�d"d=d!�|�d"d#��
d�ds�t|d�||||||d�d�d"�}|�d͡|�d�d%d�dHdhddС|�d�d%d�dHd�dd�dXd��	}|�d�d d�dAd{d֡|�d�d d�dAd{d١|jddd=d!�|�	dd"�}|�
d�d�d�d��|�
d�d�d�d@�|�
d�d�d�dN�|�
d�d�d�d�|�
d�d�d�d�|�
d�d�d�d�|�
d�d�d�d�|�
d�d�d�d�|�
d0d9d�d-�|�d"dѡ�
d�ds�dS)�Nr�iri,z[ProductName] Setupr%r$� rc)Z
DefaultUIFont�DlgFont8)ZErrorDialog�ErrorDlg)Z	Progress1ZInstall)Z	Progress2Zinstalls)�MaintenanceForm_Action�Repair)�
WhichUsers�ALLZ	TextStyle)r��Tahoma�	Nr)ZDlgFontBold8r��Nr$)Z
VerdanaBold10�VerdanarNr$)ZVerdanaRed9r�r��rr�)�
PrepareDlgz(Not Privileged or Windows9x or Installed�)�
WhichUsersDlgz.Privileged and not Windows9x and not Installed�)�SelectFeaturesDlgz
Not Installedi�)�MaintenanceTypeDlgz,Installed AND NOT RESUME AND NOT Preselectedi�)�ProgressDlgNi�
ActionText�UITextZ
FatalErrorZFinishz)[ProductName] Installer ended prematurelyz< Backr)r/r2r#ZDescription1r�Fr�Pr!z�[ProductName] setup ended prematurely because of an error.  Your system has not been modified.  To install this program at a later time, please run the installation again.ZDescription2��z.Click the Finish button to exit the Installer.)r.Z	EndDialogZExitZUserExitz'[ProductName] Installer was interruptedz�[ProductName] setup was interrupted.  Your system has not been modified.  To install this program at a later time, please run the installation again.Z
ExitDialogz&Completing the [ProductName] InstallerZDescription��ZReturnZ
FilesInUse�ZRetryF)Zbitmapr���z{\DlgFontBold8}Files in Use�iz8Some files that need to be updated are currently in use.ZText�7iJz�The following applications are using files that need to be updated by this setup. Close these applications and then click Retry to continue the installation or Cancel to exit it.ZListZListBox�k��ZFileInUseProcess�Ignorer�r�eiZ	ErrorTextr��0r��N�x�H�Q�ZNoZErrorNo�Y��ZYesZErrorYes�AZAbortZ
ErrorAbort�C�*ZErrorCancel�IZErrorIgnore�O�ZOkZErrorOk�R��Z
ErrorRetryZ	CancelDlgi�U���z;Are you sure you want to cancel [ProductName] installation?�9r(r)�ZWaitForCostingDlgzRPlease wait while the installer finishes determining your disk space requirements.�fr��(zOPlease wait while the Installer prepares to guide you through the installation.z&Welcome to the [ProductName] Installer�nzPondering...Z
ActionData�r4ZSpawnDialogr�zSelect Python InstallationsZHintz9Select the Python locations where %s should be installed.zNext >z[TARGETDIR]z[SourceDir])Zorderingz
[TARGETDIR%s]z FEATURE_SELECTED AND &Python%s=3ZSpawnWaitDialograZFeaturesZ
SelectionTreer ZFEATUREZPathEditz[FEATURE_SELECTED]�1z!FEATURE_SELECTED AND &Python%s<>3ZOtherz$Provide an alternate Python locationZEnableZShowZDisableZHide���r�ZDiskCostDlgZOKz&{\DlgFontBold8}Disk Space RequirementszFThe disk space required for the installation of the selected features.�5aThe highlighted volumes (if any) do not have enough disk space available for the currently selected features.  You can either remove some files from the highlighted volumes, or choose to install less features onto local drive(s), or select different destination drive(s).Z
VolumeListZVolumeCostList�d�iz{120}{70}{70}{70}{70}g�?r�ZAdminInstallzGSelect whether to install [ProductName] for all users of this computer.r�r��zInstall for all usersZJUSTME�zInstall just for mez
[ALLUSERS]zWhichUsers="ALL"r�z({\DlgFontBold8}[Progress1] [ProductName]�#�AzYPlease wait while the Installer [Progress2] [ProductName]. This may take several minutes.ZStatusLabelzStatus:ZProgressBariz
Progress doneZSetProgressZProgressr�z)Welcome to the [ProductName] Setup WizardZBodyText�?z:Select whether you want to repair or remove [ProductName].ZRepairRadioGroup�lr�r�r�z&Repair [ProductName]ZRemoverzRe&move [ProductName]z[REINSTALL]zMaintenanceForm_Action="Repair"z[Progress1]Z	Repairingz[Progress2]ZrepairsZ	Reinstallr�z[REMOVE]zMaintenanceForm_Action="Remove"�ZRemoving�Zremoves�
�z MaintenanceForm_Action<>"Change")rxrrr�r�rr"r1r3r-ZeventZcontrolrr+�mappingrWrorPr�Z	conditionr8Z
radiogroup�add)rrx�x�yrrr"ZmodalZmodelessZtrack_disk_spaceZfatalrBZ	user_exitZexit_dialogZinuse�errorr3ZcostingZprepZseldlg�orderrvr�Zinstall_other_condZdont_install_other_condZcostZ
whichusers�gZprogressZmaintrrrr}�sv��
��	��
�
���
���
�������       ������
�
���
��������
�
������
��zbdist_msi.add_uicCs<|jrd||j|jf}nd||jf}tj�|j|�}|S)Nz%s.%s-py%s.msiz	%s.%s.msi)rKrIrTrUrVrL)rr�Z	base_namer�rrrrp�s�z bdist_msi.get_installer_filenameN)r9r:r;ZdescriptionrZuser_optionsZboolean_optionsrZr�rQr]rnr{rzr|r}rprrrrr=Ss^����
�
([66&@r=)r<rjrTZdistutils.corerZdistutils.dir_utilrZdistutils.sysconfigrZdistutils.versionrZdistutils.errorsrZdistutils.utilrZ	distutilsrrwr	r
rrr
rrrr=rrrr�<module>s>PKX[P�B
B
3command/__pycache__/bdist_dumb.cpython-38.opt-2.pycnu�[���U

e5d1�@sdddlZddlmZddlmZddlmZmZddlTddl	m
Z
ddlmZGdd	�d	e�Z
dS)
�N)�Command)�get_platform)�remove_tree�ensure_relative)�*)�get_python_version)�logc	@s^eZdZdZdddde�fdddd	d
ddg	Zd
ddgZddd�Zdd�Zdd�Z	dd�Z
dS)�
bdist_dumbz"create a "dumb" built distribution)z
bdist-dir=�dz1temporary directory for creating the distributionz
plat-name=�pz;platform name to embed in generated filenames (default: %s))zformat=�fz>archive format to create (tar, gztar, bztar, xztar, ztar, zip))�	keep-temp�kzPkeep the pseudo-installation tree around after creating the distribution archive)z	dist-dir=r
z-directory to put final built distributions in)�
skip-buildNz2skip rebuilding everything (for testing/debugging))�relativeNz7build the archive using relative paths (default: false))zowner=�uz@Owner name used when creating a tar file [default: current user])zgroup=�gzAGroup name used when creating a tar file [default: current group]r
rrZgztar�zip)�posix�ntcCs:d|_d|_d|_d|_d|_d|_d|_d|_d|_dS)Nr)	�	bdist_dir�	plat_name�format�	keep_temp�dist_dir�
skip_buildr�owner�group)�self�r�4/usr/lib64/python3.8/distutils/command/bdist_dumb.py�initialize_options2szbdist_dumb.initialize_optionscCsz|jdkr&|�d�j}tj�|d�|_|jdkrfz|jtj|_Wn"t	k
rdt
dtj��YnX|�dddd�dS)NZbdistZdumbz@don't know how to create dumb built distributions on platform %s)rr)rr)rr)rZget_finalized_command�
bdist_base�os�path�joinr�default_format�name�KeyError�DistutilsPlatformErrorZset_undefined_options)rr"rrr �finalize_options=s"

��
�zbdist_dumb.finalize_optionscCs(|js|�d�|jddd�}|j|_|j|_d|_t�d|j�|�d�d|j�	�|j
f}tj�
|j|�}|js~|j}nJ|j��r�|j|jkr�tdt|j�t|j�f��ntj�
|jt|j��}|j||j||j|jd	�}|j��r�t�}nd
}|jj�d||f�|j�s$t|j|jd�dS)
NZbuild�install�)Zreinit_subcommandsrzinstalling to %sz%s.%szScan't make a dumb built distribution where base and platbase are different (%s, %s))Zroot_dirrr�anyr	)�dry_run) rZrun_commandZreinitialize_commandr�rootZwarn_dirr�infoZdistributionZget_fullnamerr#r$r%rrZhas_ext_modulesZinstall_baseZinstall_platbaser)�reprrZmake_archiverrrrZ
dist_files�appendrrr.)rr+Zarchive_basenameZpseudoinstall_rootZarchive_root�filenameZ	pyversionrrr �runOsR


�

����
��
�zbdist_dumb.runN)�__name__�
__module__�__qualname__ZdescriptionrZuser_optionsZboolean_optionsr&r!r*r4rrrr r	s,���
�r	)r#Zdistutils.corerZdistutils.utilrZdistutils.dir_utilrrZdistutils.errorsZdistutils.sysconfigrZ	distutilsrr	rrrr �<module>sPKX[��Y��/command/__pycache__/config.cpython-38.opt-2.pycnu�[���U

e5d=3�@shddlZddlZddlmZddlmZddlmZddlm	Z	ddd�Z
Gd	d
�d
e�Zd
dd�ZdS)�N)�Command)�DistutilsExecError)�customize_compiler)�logz.cz.cxx)�czc++c	@s�eZdZdZdddddddd	d
g	Zdd�Zd
d�Zdd�Zdd�Zdd�Z	dd�Z
dd�Zdd�Zdd�Z
d0dd �Zd1d!d"�Zd2d#d$�Zd3d%d&�Zd4d'd(�Zd5d*d+�Zdddgfd,d-�Zd6d.d/�ZdS)7�configzprepare to build)z	compiler=Nzspecify the compiler type)zcc=Nzspecify the compiler executable)z
include-dirs=�Iz.list of directories to search for header files)zdefine=�DzC preprocessor macros to define)zundef=�Uz!C preprocessor macros to undefine)z
libraries=�lz!external C libraries to link with)z
library-dirs=�Lz.directories to search for external C libraries)�noisyNz1show every action (compile, link, run, ...) taken)zdump-sourceNz=dump generated source files before attempting to compile themcCs4d|_d|_d|_d|_d|_d|_d|_g|_dS)N�)�compilerZcc�include_dirs�	libraries�library_dirsr
�dump_source�
temp_files��self�r�0/usr/lib64/python3.8/distutils/command/config.py�initialize_options3szconfig.initialize_optionscCs�|jdkr|jjpg|_nt|jt�r6|j�tj�|_|jdkrHg|_nt|jt�r^|jg|_|jdkrpg|_nt|jt�r�|j�tj�|_dS�N)	rZdistribution�
isinstance�str�split�os�pathseprrrrrr�finalize_optionsBs



zconfig.finalize_optionscCsdSrrrrrr�runRsz
config.runcCszddlm}m}t|j|�sv||j|jdd�|_t|j�|jrN|j�|j�|j	rb|j�
|j	�|jrv|j�|j�dS)Nr)�	CCompiler�new_compilerr)r�dry_runZforce)
�distutils.ccompilerr"r#rrr$rrZset_include_dirsrZ
set_librariesrZset_library_dirs)rr"r#rrr�_check_compilerYs�
zconfig._check_compilerc	Csldt|}t|d��L}|r>|D]}|�d|�q |�d�|�|�|ddkr^|�d�W5QRX|S)NZ_configtest�wz#include <%s>
�
���)�LANG_EXT�open�write)r�body�headers�lang�filename�file�headerrrr�_gen_temp_sourcefileks

zconfig._gen_temp_sourcefilecCs<|�|||�}d}|j�||g�|jj|||d�||fS)Nz
_configtest.i�r)r3r�extendrZ
preprocess)rr-r.rr/�src�outrrr�_preprocessws
zconfig._preprocesscCs\|�|||�}|jr"t|d|�|j�|g�\}|j�||g�|jj|g|d�||fS)Nzcompiling '%s':r4)r3r�	dump_filerZobject_filenamesrr5�compile)rr-r.rr/r6�objrrr�_compile~szconfig._compilec
Csr|�||||�\}}tj�tj�|��d}	|jj|g|	|||d�|jjdk	r\|	|jj}	|j�	|	�|||	fS)Nr)rrZtarget_lang)
r<r�path�splitext�basenamerZlink_executableZ
exe_extensionr�append)
rr-r.rrrr/r6r;�progrrr�_link�s�zconfig._linkc	GsT|s|j}g|_t�dd�|��|D](}zt�|�Wq&tk
rLYq&Xq&dS)Nzremoving: %s� )rr�info�joinr�remove�OSError)r�	filenamesr0rrr�_clean�sz
config._cleanNrcCsRddlm}|��d}z|�||||�Wn|k
rDd}YnX|��|S)Nr��CompileErrorTF)r%rKr&r8rI�rr-r.rr/rK�okrrr�try_cpp�s
zconfig.try_cppc	Csx|��|�||||�\}}t|t�r0t�|�}t|��.}d}	|��}
|
dkrPqb|�|
�r>d}	qbq>W5QRX|�	�|	S)NF�T)
r&r8rr�rer:r+�readline�searchrI)r�patternr-r.rr/r6r7r1�match�linerrr�
search_cpp�s	



zconfig.search_cppcCsdddlm}|��z|�||||�d}Wn|k
rDd}YnXt�|rRdpTd�|��|S)NrrJTF�success!�failure.)r%rKr&r<rrDrIrLrrr�try_compile�s
zconfig.try_compilec
	Cspddlm}m}|��z|�||||||�d}	Wn||fk
rPd}	YnXt�|	r^dp`d�|��|	S�Nr)rK�	LinkErrorTFrWrX)r%rKr[r&rBrrDrI)
rr-r.rrrr/rKr[rMrrr�try_link�s
�
zconfig.try_linkc

Cs�ddlm}m}|��z.|�||||||�\}	}
}|�|g�d}Wn||tfk
rdd}YnXt�|rrdptd�|�	�|SrZ)
r%rKr[r&rBZspawnrrrDrI)
rr-r.rrrr/rKr[r6r;ZexerMrrr�try_run�s
�

zconfig.try_runrc	Cst|��g}|r|�d|�|�d�|r<|�d|�n|�d|�|�d�d�|�d}|�|||||�S)Nz
int %s ();z
int main () {z  %s();z  %s;�}r()r&r@rEr\)	r�funcr.rrrZdeclZcallr-rrr�
check_funcs


�zconfig.check_funccCs |��|�d|||g||�S)Nzint main (void) { })r&r\)rZlibraryrr.rZother_librariesrrr�	check_lib4s


�zconfig.check_libcCs|jd|g|d�S)Nz
/* No body */)r-r.r)rN)rr2rrr/rrr�check_headerBs
�zconfig.check_header)NNNr)NNNr)NNr)NNNNr)NNNNr)NNNNrr)NNr)�__name__�
__module__�__qualname__ZdescriptionZuser_optionsrr r!r&r3r8r<rBrIrNrVrYr\r]r`rarbrrrrrs\�	
�

�
�
�
�
�rcCsJ|dkrt�d|�n
t�|�t|�}zt�|���W5|��XdS)Nz%s)rrDr+�close�read)r0�headr1rrrr9Ks
r9)N)
rrPZdistutils.corerZdistutils.errorsrZdistutils.sysconfigrZ	distutilsrr*rr9rrrr�<module>s
8PKX[�ZLiTT.command/__pycache__/bdist.cpython-38.opt-1.pycnu�[���U

e5d��@sHdZddlZddlmZddlTddlmZdd�ZGdd	�d	e�ZdS)
zidistutils.command.bdist

Implements the Distutils 'bdist' command (create a built [binary]
distribution).�N)�Command)�*)�get_platformcCsPddlm}g}tjD]"}|�d|dtj|df�q||�}|�d�dS)zFPrint list of available formats (arguments to "--format" option).
    r)�FancyGetopt�formats=N�z'List of available distribution formats:)Zdistutils.fancy_getoptr�bdist�format_commands�append�format_commandZ
print_help)r�formats�formatZpretty_printer�r�//usr/lib64/python3.8/distutils/command/bdist.py�show_formatss
�rc
@s�eZdZdZdddde�fdddd	d
gZdgZdd
defgZdZ	ddd�Z
dddddddddg	Zddddddd d!d"d#�	Zd$d%�Z
d&d'�Zd(d)�Zd
S)*rz$create a built (binary) distribution)zbdist-base=�bz4temporary directory for creating built distributionsz
plat-name=�pz;platform name to embed in generated filenames (default: %s))rNz/formats for distribution (comma-separated list))z	dist-dir=�dz=directory to put final built distributions in [default: dist])�
skip-buildNz2skip rebuilding everything (for testing/debugging))zowner=�uz@Owner name used when creating a tar file [default: current user])zgroup=�gzAGroup name used when creating a tar file [default: current group]rzhelp-formatsNz$lists available distribution formats)�	bdist_rpm�gztar�zip)�posix�nt�rpm�bztar�xztar�ztar�tar�wininst�msi)rzRPM distribution)�
bdist_dumbzgzip'ed tar file)r#zbzip2'ed tar file)r#zxz'ed tar file)r#zcompressed tar file)r#ztar file)Z
bdist_wininstzWindows executable installer)r#zZIP file)Z	bdist_msizMicrosoft Installer)	rrrrrr r!rr"cCs.d|_d|_d|_d|_d|_d|_d|_dS)Nr)�
bdist_base�	plat_namer�dist_dir�
skip_build�group�owner)�selfrrr�initialize_optionsQszbdist.initialize_optionscCs�|jdkr(|jrt�|_n|�d�j|_|jdkrT|�d�j}tj�|d|j�|_|�	d�|j
dkr�z|jtjg|_
Wn"t
k
r�tdtj��YnX|jdkr�d|_dS)NZbuildzbdist.rz;don't know how to create built distributions on platform %sZdist)r%r'rZget_finalized_commandr$�
build_base�os�path�joinZensure_string_listr�default_format�name�KeyErrorZDistutilsPlatformErrorr&)r*r,rrr�finalize_optionsZs*


�

��

zbdist.finalize_optionsc	Cs�g}|jD]>}z|�|j|d�Wq
tk
rFtd|��Yq
Xq
tt|j��D]h}||}|�|�}||jkr�|j||_	|dkr�|j
|_
|j|_|||dd�kr�d|_|�
|�qXdS)Nrzinvalid format '%s'r#r)rr
rr2ZDistutilsOptionError�range�lenZreinitialize_command�no_format_optionr
r)r(Z	keep_tempZrun_command)r*Zcommandsr
�iZcmd_nameZsub_cmdrrr�runvs"


z	bdist.run)�__name__�
__module__�__qualname__ZdescriptionrZuser_optionsZboolean_optionsrZhelp_optionsr6r0r	rr+r3r8rrrrrsR��������
	r)	�__doc__r-Zdistutils.corerZdistutils.errorsZdistutils.utilrrrrrrr�<module>sPKX[���__8command/__pycache__/install_scripts.cpython-38.opt-1.pycnu�[���U

e5d��@sDdZddlZddlmZddlmZddlmZGdd�de�ZdS)zudistutils.command.install_scripts

Implements the Distutils 'install_scripts' command, for installing
Python scripts.�N)�Command)�log)�ST_MODEc@sLeZdZdZddddgZddgZdd	�Zd
d�Zdd
�Zdd�Z	dd�Z
dS)�install_scriptsz%install scripts (Python or otherwise))zinstall-dir=�dzdirectory to install scripts to)z
build-dir=�bz'build directory (where to install from))�force�fz-force installation (overwrite existing files))�
skip-buildNzskip the build stepsrr
cCsd|_d|_d|_d|_dS)Nr)�install_dirr�	build_dir�
skip_build��self�r�9/usr/lib64/python3.8/distutils/command/install_scripts.py�initialize_optionssz"install_scripts.initialize_optionscCs |�dd�|�dddd�dS)NZbuild)�
build_scriptsrZinstall)rr)rr)r
r
)Zset_undefined_optionsrrrr�finalize_options!s�z install_scripts.finalize_optionscCs�|js|�d�|�|j|j�|_tjdkr~|��D]H}|j	rLt
�d|�q4t�|�t
dBd@}t
�d||�t�||�q4dS)Nr�posixzchanging mode of %simi�zchanging mode of %s to %o)r
Zrun_commandZ	copy_treerr�outfiles�os�name�get_outputsZdry_runr�info�statr�chmod)r�file�moderrr�run)s

zinstall_scripts.runcCs|jjp
gS�N)ZdistributionZscriptsrrrr�
get_inputs8szinstall_scripts.get_inputscCs
|jpgSr )rrrrrr;szinstall_scripts.get_outputsN)�__name__�
__module__�__qualname__ZdescriptionZuser_optionsZboolean_optionsrrrr!rrrrrrs�r)	�__doc__rZdistutils.corerZ	distutilsrrrrrrrr�<module>s
PKX[������.command/__pycache__/build.cpython-38.opt-2.pycnu�[���U

e5d��@sPddlZddlZddlmZddlmZddlmZdd�ZGdd�de�Z	dS)	�N)�Command)�DistutilsOptionError)�get_platformcCsddlm}|�dS)Nr��show_compilers)Zdistutils.ccompilerrr�r�//usr/lib64/python3.8/distutils/command/build.pyrsrc@s�eZdZdZdddddddd	d
e�fddd
ddgZddgZdddefgZdd�Z	dd�Z
dd�Zdd�Zdd�Z
dd �Zd!d"�Zd#efd$e
fd%efd&efgZdS)'�buildz"build everything needed to install)zbuild-base=�bz base directory for build library)zbuild-purelib=Nz2build directory for platform-neutral distributions)zbuild-platlib=Nz3build directory for platform-specific distributions)z
build-lib=NzWbuild directory for all distribution (defaults to either build-purelib or build-platlib)zbuild-scripts=Nzbuild directory for scripts)zbuild-temp=�tztemporary build directoryz
plat-name=�pz6platform name to build for, if supported (default: %s))z	compiler=�czspecify the compiler type)z	parallel=�jznumber of parallel build jobs)�debug�gz;compile extensions and libraries with debugging information)�force�fz2forcibly build everything (ignore file timestamps))zexecutable=�ez5specify final destination interpreter path (build.py)rrz
help-compilerNzlist available compilerscCsLd|_d|_d|_d|_d|_d|_d|_d|_d|_d|_	d|_
d|_dS)Nr	r)�
build_base�
build_purelib�
build_platlib�	build_lib�
build_temp�
build_scriptsZcompiler�	plat_namerr�
executable�parallel��selfrrr�initialize_options8szbuild.initialize_optionscCsb|jdkrt�|_ntjdkr&td��d|jftjdd��}ttd�rR|d7}|jdkrntj	�
|jd�|_|jdkr�tj	�
|jd|�|_|j
dkr�|jjr�|j|_
n|j|_
|jdkr�tj	�
|jd|�|_|jdkr�tj	�
|jd	tjdd��|_|jdk�r tj�r tj	�tj�|_t|jt��r^zt|j�|_Wntk
�r\td
��YnXdS)N�ntzW--plat-name only supported on Windows (try using './configure --help' on your platform)z	.%s-%d.%d�Zgettotalrefcountz-pydebug�libZtempz
scripts-%d.%dzparallel should be an integer)rr�os�namer�sys�version_info�hasattrr�path�joinrrr�distributionZext_modulesrrr�normpath�
isinstancer�str�int�
ValueError)rZplat_specifierrrr�finalize_optionsHsD


�



�



�

�zbuild.finalize_optionscCs|��D]}|�|�qdS�N)Zget_sub_commandsZrun_command)rZcmd_namerrr�run�sz	build.runcCs
|j��Sr1)r*�has_pure_modulesrrrrr3�szbuild.has_pure_modulescCs
|j��Sr1)r*�has_c_librariesrrrrr4�szbuild.has_c_librariescCs
|j��Sr1)r*�has_ext_modulesrrrrr5�szbuild.has_ext_modulescCs
|j��Sr1)r*�has_scriptsrrrrr6�szbuild.has_scriptsZbuild_pyZ
build_clibZ	build_extr)�__name__�
__module__�__qualname__ZdescriptionrZuser_optionsZboolean_optionsrZhelp_optionsrr0r2r3r4r5r6Zsub_commandsrrrrr	sH�����8�r	)
r%r#Zdistutils.corerZdistutils.errorsrZdistutils.utilrrr	rrrr�<module>s
PKX[/�~�0�0,command/__pycache__/bdist_rpm.cpython-38.pycnu�[���U

e5dIT�@s�dZddlZddlZddlZddlmZddlmZddlm	Z	ddl
mZddlTddl
mZdd	lmZGd
d�de�ZdS)zwdistutils.command.bdist_rpm

Implements the Distutils 'bdist_rpm' command (create RPM source and binary
distributions).�N)�Command)�DEBUG)�get_platform)�
write_file)�*)�get_python_version)�logc)@s�eZdZdZdddddddd	d
ddd
ddddddddddddddddddd d!d"d#d$d%d&d'd(d)d*g)Zd+d,d-d.d/gZd+d,d-d0�Zd1d2�Zd3d4�Zd5d6�Z	d7d8�Z
d9d:�Zd;d<�Zd=d>�Z
d?S)@�	bdist_rpmzcreate an RPM distribution)zbdist-base=Nz/base directory for creating built distributions)z	rpm-base=Nzdbase directory for creating RPMs (defaults to "rpm" under --bdist-base; must be specified for RPM 2))z	dist-dir=�dzDdirectory to put final RPM files in (and .spec files if --spec-only))zpython=NzMpath to Python interpreter to hard-code in the .spec file (default: "python"))z
fix-pythonNzLhard-code the exact path to the current Python interpreter in the .spec file)z	spec-onlyNzonly regenerate spec file)zsource-onlyNzonly generate source RPM)zbinary-onlyNzonly generate binary RPM)z	use-bzip2Nz7use bzip2 instead of gzip to create source distribution)zdistribution-name=Nzgname of the (Linux) distribution to which this RPM applies (*not* the name of the module distribution!))zgroup=Nz9package classification [default: "Development/Libraries"])zrelease=NzRPM release number)zserial=NzRPM serial number)zvendor=NzaRPM "vendor" (eg. "Joe Blow <joe@example.com>") [default: maintainer or author from setup script])z	packager=NzBRPM packager (eg. "Jane Doe <jane@example.net>") [default: vendor])z
doc-files=Nz6list of documentation files (space or comma-separated))z
changelog=Nz
RPM changelog)zicon=Nzname of icon file)z	provides=Nz%capabilities provided by this package)z	requires=Nz%capabilities required by this package)z
conflicts=Nz-capabilities which conflict with this package)zbuild-requires=Nz+capabilities required to build this package)z
obsoletes=Nz*capabilities made obsolete by this package)�
no-autoreqNz+do not automatically calculate dependencies)�	keep-temp�kz"don't clean up RPM build directory)�no-keep-tempNz&clean up RPM build directory [default])�use-rpm-opt-flagsNz8compile with RPM_OPT_FLAGS when building from source RPM)�no-rpm-opt-flagsNz&do not pass any RPM CFLAGS to compiler)�	rpm3-modeNz"RPM 3 compatibility mode (default))�	rpm2-modeNzRPM 2 compatibility mode)zprep-script=Nz3Specify a script for the PREP phase of RPM building)z
build-script=Nz4Specify a script for the BUILD phase of RPM building)zpre-install=Nz:Specify a script for the pre-INSTALL phase of RPM building)zinstall-script=Nz6Specify a script for the INSTALL phase of RPM building)z
post-install=Nz;Specify a script for the post-INSTALL phase of RPM building)zpre-uninstall=Nz<Specify a script for the pre-UNINSTALL phase of RPM building)zpost-uninstall=Nz=Specify a script for the post-UNINSTALL phase of RPM building)z
clean-script=Nz4Specify a script for the CLEAN phase of RPM building)zverify-script=Nz6Specify a script for the VERIFY phase of the RPM build)zforce-arch=Nz0Force an architecture onto the RPM build process)�quiet�qz3Run the INSTALL phase of RPM building in quiet moderrrrr)rrrcCs�d|_d|_d|_d|_d|_d|_d|_d|_d|_d|_	d|_
d|_d|_d|_
d|_d|_d|_d|_d|_d|_d|_d|_d|_d|_d|_d|_d|_d|_d|_d|_d|_d|_d|_ d|_!d|_"d|_#d|_$d|_%d|_&dS)Nr�)'�
bdist_base�rpm_base�dist_dir�python�
fix_python�	spec_only�binary_only�source_only�	use_bzip2�distribution_name�group�release�serial�vendor�packager�	doc_files�	changelog�icon�prep_script�build_script�install_script�clean_script�
verify_script�pre_install�post_install�
pre_uninstall�post_uninstall�prep�provides�requires�	conflicts�build_requires�	obsoletes�	keep_temp�use_rpm_opt_flags�	rpm3_mode�
no_autoreq�
force_archr��self�r>�3/usr/lib64/python3.8/distutils/command/bdist_rpm.py�initialize_options�sNzbdist_rpm.initialize_optionscCs�|�dd�|jdkr6|js$td��tj�|jd�|_|jdkrX|j	rPt
j|_qfd|_n|j	rftd��tjdkr~t
dtj��|jr�|jr�td	��|j��s�d
|_|�dd�|��dS)NZbdist)rrz)you must specify --rpm-base in RPM 2 mode�rpmZpython3z8--python and --fix-python are mutually exclusive options�posixz9don't know how to create RPM distributions on platform %sz6cannot supply both '--source-only' and '--binary-only'r)rr)Zset_undefined_optionsrr9ZDistutilsOptionError�os�path�joinrrr�sys�
executable�nameZDistutilsPlatformErrorrr�distribution�has_ext_modulesr8�finalize_package_datar<r>r>r?�finalize_options�s6
�

�
��
zbdist_rpm.finalize_optionscCsT|�dd�|�dd|j��|j��f�|�d�|�d�t|jt�rxdD]&}tj	�
|�rP||jkrP|j�|�qP|�dd	�|�d
�|�d�|�d�|�|j
�|_
|�d
�|�d�|�d�|�d�|�d�|�d�|�d�|�d�|�d�|�d�|�d�|�d�|�d�|�d�|�d�|�d�dS)Nr zDevelopment/Librariesr#z%s <%s>r$r%)ZREADMEz
README.txtr!�1r"rr&r'r(r)r*r+r,r-r.r/r0r2r3r4r5r6r;)Z
ensure_stringrIZget_contactZget_contact_emailZensure_string_list�
isinstancer%�listrCrD�exists�append�_format_changelogr&Zensure_filename)r=Zreadmer>r>r?rK�sB
��



















zbdist_rpm.finalize_package_datacCs�tr<td�td|j�td|j�td|j�td|j�|jrT|j}|�|�n8i}dD]&}t	j
�|j|�||<|�||�q\|d}t	j
�|d|j
���}|�t||��fd	|�|jr�dS|j
jdd�}|�d
�}|jr�dg|_ndg|_|�d
�||j
_|��d
}|d}|�||�|j�rbt	j
�|j��rT|�|j|�ntd|j��t�d�dg}	|j�r�|	�d�n|j �r�|	�d�n
|	�d�|	�!dd|j"g�|j#�r�|	�!ddt	j
�$|j�g�|j%�s�|	�d�|j&�r|	�d�|	�|�d}
|
d}d|
d}d|||f}
t	�'|
�}z~g}d}|�)�}|�sV�q�|�*��+�}t,|�dk�stt-�|�|d �|dk�rD|d
}�qD|�(�}|�r�t.d!t/|
���W5|�(�X|�0|	�|j1�s�|j
�2��r�t3�}nd"}|j �sLt	j
�|d#|�}t	j
�|��st-�|�4||j�t	j
�|j|�}|j
j�d$||f�|j�s�|D]`}t	j
�|d%|�}t	j
�|��rX|�4||j�t	j
�|jt	j
�5|��}|j
j�d$||f��qXdS)&Nzbefore _get_package_data():zvendor =z
packager =zdoc_files =zchangelog =)�SOURCES�SPECSZBUILD�RPMS�SRPMSrTz%s.speczwriting '%s'�sdistZbztarZgztarrrSzicon file '%s' does not existz
building RPMsZrpmbuildz-bsz-bbz-baz--definez__python %sz
_topdir %sz--cleanz--quietz%{name}-%{version}-%{release}z.src.rpmz%{arch}/z.%{arch}.rpmz%rpm -q --qf '%s %s\n' --specfile '%s'�rzFailed to execute: %s�anyrVr	rU)6r�printr#r$r%r&rrZmkpathrCrDrErrI�get_nameZexecuter�_make_spec_fileZ
dist_filesZreinitialize_commandrZformatsZrun_commandZget_archive_filesZ	copy_filer'rPZDistutilsFileErrorr�inforrQr�extendrr9�abspathr7r�popen�close�readline�strip�split�len�AssertionErrorZDistutilsExecError�reprZspawnZdry_runrJrZ	move_file�basename)r=Zspec_dirZrpm_dirr
Z	spec_pathZsaved_dist_filesrW�sourceZ
source_dirZrpm_cmdZ
nvr_stringZsrc_rpmZnon_src_rpmZq_cmd�outZbinary_rpmsZ
source_rpm�line�lZstatusZ	pyversionZsrpm�filenamerAr>r>r?�runs����


�

�


�



�

��z
bdist_rpm.runcCstj�|jtj�|��S)N)rCrDrErrh)r=rDr>r>r?�
_dist_path�szbdist_rpm._dist_pathc
CsJd|j��d|j���dd�d|j��d|j�dd�dd|j��g}t�d	�}d
�dd�|�	�D��}d
}d}|�||�}||kr�|�
d�|�
d|d
�|�dddg�|jr�|�
d�n
|�
d�|�d|j�
�d|jddg�|j�s|j���s&|�
d�n|�
d|j�dD]V}t||���}t|t��rb|�
d|d�|�f�n|dk	�r*|�
d||f��q*|j��d k�r�|�
d!|j���|j�r�|�
d"|j�|j�r�|�
d#d�|j��|j�r�|�
d$tj�|j��|j�r|�
d%�|�dd&|j��g�d'|jtj�tj d(�f}d)|}	|j!�rXd*|	}	d+|}
d,d-d.|	fd/d0|
fd1d2d3d4d5d6g	}|D]n\}}
}t||
�}|�s�|�r�|�dd7|g�|�r�t"|��}|�|�#��$d
��W5QRXn
|�
|��q�|�dd8d9g�|j%�r$|�
d:d�|j%��|j&�rF|�dd;g�|�|j&�|S)<ziGenerate the text of an RPM spec file and return it as a
        list of strings (one per line).
        z
%define name z%define version �-�_z%define unmangled_version z%define release �z	Summary: zrpm --eval %{__os_install_post}�
cSsg|]}d|���qS)z  %s \)rc)�.0rkr>r>r?�
<listcomp>�s�z-bdist_rpm._make_spec_file.<locals>.<listcomp>zbrp-python-bytecompile \
z%brp-python-bytecompile %{__python} \
z2# Workaround for http://bugs.python.org/issue14443z%define __os_install_post z
Name: %{name}zVersion: %{version}zRelease: %{release}z-Source0: %{name}-%{unmangled_version}.tar.bz2z,Source0: %{name}-%{unmangled_version}.tar.gzz	License: zGroup: z>BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildrootzPrefix: %{_prefix}zBuildArch: noarchz
BuildArch: %s)ZVendorZPackagerZProvidesZRequiresZ	ConflictsZ	Obsoletesz%s: %s� NZUNKNOWNzUrl: zDistribution: zBuildRequires: zIcon: z
AutoReq: 0z%descriptionz%s %srz%s buildzenv CFLAGS="$RPM_OPT_FLAGS" z>%s install -O1 --root=$RPM_BUILD_ROOT --record=INSTALLED_FILES)r1r(z&%setup -n %{name}-%{unmangled_version}Zbuildr)Zinstallr*)Zcleanr+zrm -rf $RPM_BUILD_ROOT)Zverifyscriptr,N)Zprer-N)Zpostr.N)Zpreunr/N)Zpostunr0N�%z%files -f INSTALLED_FILESz%defattr(-,root,root)z%doc z
%changelog)'rIr[Zget_version�replacer!Zget_description�
subprocessZ	getoutputrE�
splitlinesrQr^rZget_licenser r;rJ�getattr�lowerrNrOZget_urlrr5r'rCrDrhr:Zget_long_descriptionrrF�argvr8�open�readrdr%r&)r=Z	spec_fileZvendor_hookZproblemZfixedZ
fixed_hookZfield�valZdef_setup_callZ	def_buildZinstall_cmdZscript_optionsZrpm_opt�attr�default�fr>r>r?r\�s��

�
	�
�

�
���
�
 ��zbdist_rpm._make_spec_filecCs||s|Sg}|���d�D]N}|��}|ddkrB|�d|g�q|ddkrZ|�|�q|�d|�q|dsx|d=|S)zKFormat the changelog correctly and convert it to a list of strings
        rsrrrrrpz  )rcrdr^rQ)r=r&Z
new_changelogrkr>r>r?rR1szbdist_rpm._format_changelogN)�__name__�
__module__�__qualname__ZdescriptionZuser_optionsZboolean_optionsZnegative_optr@rLrKrnror\rRr>r>r>r?r	sx�m��--*r	)�__doc__ryrFrCZdistutils.corerZdistutils.debugrZdistutils.utilrZdistutils.file_utilrZdistutils.errorsZdistutils.sysconfigrZ	distutilsrr	r>r>r>r?�<module>sPKX[��	V�8�8.command/__pycache__/sdist.cpython-38.opt-1.pycnu�[���U

e5d=J�@s�dZddlZddlZddlmZddlmZddlmZddlm	Z	ddlm
Z
ddlmZdd	lm
Z
dd
lmZddlmZddlmZdd
lmZmZdd�ZGdd�de�ZdS)zadistutils.command.sdist

Implements the Distutils 'sdist' command (create a source distribution).�N)�glob)�warn)�Command)�dir_util)�	file_util)�archive_util)�TextFile)�FileList)�log)�convert_path)�DistutilsTemplateError�DistutilsOptionErrorcCs`ddlm}ddlm}g}|��D] }|�d|d||df�q$|��||��d�dS)zoPrint all possible values for the 'formats' option (used by
    the "--help-formats" command-line option).
    r)�FancyGetopt)�ARCHIVE_FORMATS�formats=N�z.List of available source distribution formats:)Zdistutils.fancy_getoptrZdistutils.archive_utilr�keys�append�sortZ
print_help)rr�formats�format�r�//usr/lib64/python3.8/distutils/command/sdist.py�show_formatss
��rc@s"eZdZdZdd�Zdddddd	d
ddd
ddddgZddddddgZdddefgZddd�Z	defgZ
dZdd�Zd d!�Z
d"d#�Zd$d%�Zd&d'�Zd(d)�Zed*d+��Zd,d-�Zd.d/�Zd0d1�Zd2d3�Zd4d5�Zd6d7�Zd8d9�Zd:d;�Zd<d=�Zd>d?�Zd@dA�ZdBdC�ZdDdE�Z dFdG�Z!dHdI�Z"dS)J�sdistz6create a source distribution (tarball, zip file, etc.)cCs|jS)zYCallable used for the check sub-command.

        Placed here so user_options can view it)�metadata_check��selfrrr�checking_metadata(szsdist.checking_metadata)z	template=�tz5name of manifest template file [default: MANIFEST.in])z	manifest=�mz)name of manifest file [default: MANIFEST])�use-defaultsNzRinclude the default file set in the manifest [default; disable with --no-defaults])�no-defaultsNz"don't include the default file set)�pruneNz�specifically exclude files/directories that should not be distributed (build tree, RCS/CVS dirs, etc.) [default; disable with --no-prune])�no-pruneNz$don't automatically exclude anything)�
manifest-only�ozEjust regenerate the manifest and then stop (implies --force-manifest))�force-manifest�fzkforcibly regenerate the manifest and carry on as usual. Deprecated: now the manifest is always regenerated.)rNz6formats for source distribution (comma-separated list))�	keep-temp�kz@keep the distribution tree around after creating archive file(s))z	dist-dir=�dzFdirectory to put the source distribution archive(s) in [default: dist])�metadata-checkNz[Ensure that all required elements of meta-data are supplied. Warn if any missing. [default])zowner=�uz@Owner name used when creating a tar file [default: current user])zgroup=�gzAGroup name used when creating a tar file [default: current group]r!r#r%r'r)r,zhelp-formatsNz#list available distribution formats)r"r$�check)ZREADMEz
README.txtz
README.rstcCsTd|_d|_d|_d|_d|_d|_dg|_d|_d|_d|_	d|_
d|_d|_dS)N�rZgztar)
�template�manifest�use_defaultsr#�
manifest_onlyZforce_manifestr�	keep_temp�dist_dir�
archive_filesr�owner�grouprrrr�initialize_optionseszsdist.initialize_optionscCsZ|jdkrd|_|jdkr d|_|�d�t�|j�}|rFtd|��|jdkrVd|_dS)NZMANIFESTzMANIFEST.inrzunknown archive format '%s'Zdist)r2r1Zensure_string_listrZcheck_archive_formatsrr
r6)rZ
bad_formatrrr�finalize_options|s


�
zsdist.finalize_optionscCs>t�|_|��D]}|�|�q|��|jr2dS|��dS�N)r	�filelistZget_sub_commandsZrun_command�
get_file_listr4�make_distribution)rZcmd_namerrr�run�sz	sdist.runcCs*tdt�|j�d�}|��|��dS)zDeprecated API.zadistutils.command.sdist.check_metadata is deprecated,               use the check command insteadr/N)r�PendingDeprecationWarning�distributionZget_command_objZensure_finalizedr@)rr/rrr�check_metadata�s�zsdist.check_metadatacCs�tj�|j�}|s:|��r:|��|j��|j��dS|sN|�	d|j�|j�
�|jrf|��|rr|�
�|jr�|��|j��|j��|��dS)aCFigure out the list of files to include in the source
        distribution, and put it in 'self.filelist'.  This might involve
        reading the manifest template (and writing the manifest), or just
        reading the manifest, or just using the default file set -- it all
        depends on the user's options.
        Nz?manifest template '%s' does not exist (using default file list))�os�path�isfiler1�_manifest_is_not_generated�
read_manifestr=rZremove_duplicatesr�findallr3�add_defaults�
read_templater#�prune_file_list�write_manifest)rZtemplate_existsrrrr>�s(

�


zsdist.get_file_listcCs<|��|��|��|��|��|��|��dS)a9Add all the default files to self.filelist:
          - README or README.txt
          - setup.py
          - test/test*.py
          - all pure Python modules mentioned in setup script
          - all files pointed by package_data (build_py)
          - all files defined in data_files.
          - all files defined as scripts.
          - all C sources listed as part of extensions or C libraries
            in the setup script (doesn't catch C headers!)
        Warns if (README or README.txt) or setup.py are missing; everything
        else is optional.
        N)�_add_defaults_standards�_add_defaults_optional�_add_defaults_python�_add_defaults_data_files�_add_defaults_ext�_add_defaults_c_libs�_add_defaults_scriptsrrrrrJ�szsdist.add_defaultscCs:tj�|�sdStj�|�}tj�|�\}}|t�|�kS)z�
        Case-sensitive path existence check

        >>> sdist._cs_path_exists(__file__)
        True
        >>> sdist._cs_path_exists(__file__.upper())
        False
        F)rDrE�exists�abspath�split�listdir)�fspathrVZ	directory�filenamerrr�_cs_path_exists�s

zsdist._cs_path_existscCs�|j|jjg}|D]~}t|t�rj|}d}|D]"}|�|�r,d}|j�|�qPq,|s�|�dd�	|��q|�|�r�|j�|�q|�d|�qdS)NFTz,standard file not found: should have one of z, zstandard file '%s' not found)
�READMESrBZscript_name�
isinstance�tupler[r=rr�join)rZ	standards�fnZaltsZgot_itrrrrN�s"

�
zsdist._add_defaults_standardscCs4ddg}|D]"}ttjjt|��}|j�|�qdS)Nz
test/test*.pyz	setup.cfg)�filterrDrErFrr=�extend)rZoptional�pattern�filesrrrrOszsdist._add_defaults_optionalcCs\|�d�}|j��r$|j�|���|jD],\}}}}|D]}|j�tj	�
||��q:q*dS)N�build_py)�get_finalized_commandrBZhas_pure_modulesr=rb�get_source_files�
data_filesrrDrEr_)rreZpkgZsrc_dirZ	build_dir�	filenamesrZrrrrPs

zsdist._add_defaults_pythoncCsz|j��rv|jjD]b}t|t�rBt|�}tj�|�rt|j	�
|�q|\}}|D]$}t|�}tj�|�rN|j	�
|�qNqdSr<)rBZhas_data_filesrhr]�strrrDrErFr=r)r�item�dirnamerir(rrrrQ$s

zsdist._add_defaults_data_filescCs(|j��r$|�d�}|j�|���dS)N�	build_ext)rBZhas_ext_modulesrfr=rbrg)rrmrrrrR5s

zsdist._add_defaults_extcCs(|j��r$|�d�}|j�|���dS)N�
build_clib)rBZhas_c_librariesrfr=rbrg)rrnrrrrS:s

zsdist._add_defaults_c_libscCs(|j��r$|�d�}|j�|���dS)N�
build_scripts)rBZhas_scriptsrfr=rbrg)rrorrrrT?s

zsdist._add_defaults_scriptsc
Cs�t�d|j�t|jddddddd�}zh|��}|dkr:q�z|j�|�Wq(tt	fk
r�}z|�
d|j|j|f�W5d}~XYq(Xq(W5|��XdS)z�Read and parse manifest template file named by self.template.

        (usually "MANIFEST.in") The parsing and processing is done by
        'self.filelist', which updates itself accordingly.
        zreading manifest template '%s'r0)Zstrip_commentsZskip_blanksZ
join_linesZ	lstrip_wsZ	rstrip_wsZ
collapse_joinNz%s, line %d: %s)
r
�infor1r�close�readliner=Zprocess_template_liner�
ValueErrorrrZZcurrent_line)rr1�line�msgrrrrKDs&
�
� zsdist.read_templatecCs�|�d�}|j��}|jjd|jd�|jjd|d�tjdkrFd}nd}ddd	d
ddd
g}d|d�|�|f}|jj|dd�dS)avPrune off branches that might slip into the file list as created
        by 'read_template()', but really don't belong there:
          * the build tree (typically "build")
          * the release tree itself (only an issue if we ran "sdist"
            previously with --keep-temp, or it aborted)
          * any RCS, CVS, .svn, .hg, .git, .bzr, _darcs directories
        �buildN)�prefixZwin32z/|\\�/ZRCSZCVSz\.svnz\.hgz\.gitz\.bzrZ_darcsz(^|%s)(%s)(%s).*�|r0)Zis_regex)	rfrB�get_fullnamer=Zexclude_patternZ
build_base�sys�platformr_)rrv�base_dirZsepsZvcs_dirsZvcs_ptrnrrrrLas


�zsdist.prune_file_listcCsX|��rt�d|j�dS|jjdd�}|�dd�|�tj	|j|fd|j�dS)z�Write the file list in 'self.filelist' (presumably as filled in
        by 'add_defaults()' and 'read_template()') to the manifest file
        named by 'self.manifest'.
        z5not writing to manually maintained manifest file '%s'Nrz*# file GENERATED by distutils, do NOT editzwriting manifest file '%s')
rGr
rpr2r=rd�insertZexecuterZ
write_file)rZcontentrrrrMys��zsdist.write_manifestcCs<tj�|j�sdSt|j�}z|��}W5|��X|dkS)NFz+# file GENERATED by distutils, do NOT edit
)rDrErFr2�openrqrr)r�fpZ
first_linerrrrG�s

z sdist._manifest_is_not_generatedc	CsVt�d|j�t|j��4}|D](}|��}|�d�s|s:q|j�|�qW5QRXdS)z�Read the manifest file (named by 'self.manifest') and use it to
        fill in 'self.filelist', the list of files to include in the source
        distribution.
        zreading manifest file '%s'�#N)r
rpr2r�strip�
startswithr=r)rr2rtrrrrH�szsdist.read_manifestcCs�|�|�tj|||jd�ttd�r4d}d|}nd}d|}|sPt�d�n
t�|�|D]<}tj	�
|�s|t�d|�q^tj	�||�}|j|||d	�q^|j
j�|�dS)
a�Create the directory tree that will become the source
        distribution archive.  All directories implied by the filenames in
        'files' are created under 'base_dir', and then we hard link or copy
        (if hard linking is unavailable) those files into place.
        Essentially, this duplicates the developer's source tree, but in a
        directory named after the distribution, containing only the files
        to be distributed.
        ��dry_run�linkZhardzmaking hard links in %s...Nzcopying files to %s...z)no files to distribute -- empty manifest?z#'%s' not a regular file -- skipping)r�)ZmkpathrZcreate_treer��hasattrrDr
rrprErFr_Z	copy_filerBZmetadataZwrite_pkg_info)rr}rdr�ru�file�destrrr�make_release_tree�s 
	


zsdist.make_release_treecCs�|j��}tj�|j|�}|�||jj�g}d|j	krT|j	�
|j	�|j	�d���|j	D]:}|j
||||j|jd�}|�
|�|jj�
dd|f�qZ||_|js�tj||jd�dS)a�Create the source distribution(s).  First, we create the release
        tree with 'make_release_tree()'; then, we create all required
        archive files (according to 'self.formats') from the release tree.
        Finally, we clean up by blowing away the release tree (unless
        'self.keep_temp' is true).  The list of archive files created is
        stored so it can be retrieved later by 'get_archive_files()'.
        Ztar)r}r8r9r�r�N)rBrzrDrEr_r6r�r=rdrr�pop�indexZmake_archiver8r9Z
dist_filesr7r5rZremove_treer�)rr}Z	base_namer7Zfmtr�rrrr?�s 




�
zsdist.make_distributioncCs|jS)zzReturn the list of archive files created when the command
        was run, or None if the command hasn't run yet.
        )r7rrrr�get_archive_files�szsdist.get_archive_files)#�__name__�
__module__�__qualname__ZdescriptionrZuser_optionsZboolean_optionsrZhelp_optionsZnegative_optZsub_commandsr\r:r;r@rCr>rJ�staticmethodr[rNrOrPrQrRrSrTrKrLrMrGrHr�r?r�rrrrr$sp�'����
(
*r)�__doc__rDr{r�warningsrZdistutils.corerZ	distutilsrrrZdistutils.text_filerZdistutils.filelistr	r
Zdistutils.utilrZdistutils.errorsrr
rrrrrr�<module>sPKX[���	!	!1command/__pycache__/register.cpython-38.opt-1.pycnu�[���U

e5d�-�@sddZddlZddlZddlZddlZddlmZddlm	Z	ddl
TddlmZGdd�de	�Z
dS)	zhdistutils.command.register

Implements the Distutils 'register' command (register with the repository).
�N)�warn)�
PyPIRCCommand)�*)�logc@s�eZdZdZejddgZejdddgZddd	�fgZd
d�Zdd
�Z	dd�Z
dd�Zdd�Zdd�Z
dd�Zdd�Zdd�Zddd�ZdS) �registerz7register the distribution with the Python package index)�list-classifiersNz list the valid Trove classifiers)�strictNzBWill stop the registering if the meta-data are not fully compliant�verifyrr�checkcCsdS)NT���selfrr�2/usr/lib64/python3.8/distutils/command/register.py�<lambda>�zregister.<lambda>cCst�|�d|_d|_dS)Nr)r�initialize_options�list_classifiersrrrrrrs
zregister.initialize_optionscCs*t�|�d|jfdd�}||jjd<dS)Nr)r�)r�restructuredtextr
)r�finalize_optionsr�distributionZcommand_options)r
Z
check_optionsrrrr$s

�zregister.finalize_optionscCsT|��|��|��D]}|�|�q|jr8|��n|jrH|��n|��dS)N)	r�_set_configZget_sub_commandsZrun_commandZdry_run�verify_metadatar�classifiers�
send_metadata)r
Zcmd_namerrr�run+s

zregister.runcCs8tdt�|j�d�}|��|j|_d|_|��dS)zDeprecated API.zddistutils.command.register.check_metadata is deprecated,               use the check command insteadr
rN)r�PendingDeprecationWarningrZget_command_objZensure_finalizedrrr)r
r
rrr�check_metadata:s�zregister.check_metadatacCsz|��}|ikr@|d|_|d|_|d|_|d|_d|_n6|jd|jfkr^td|j��|jdkrp|j|_d|_d	S)
z: Reads the configuration file and set attributes.
        �username�password�
repository�realmTZpypiz%s not found in .pypircFN)Z_read_pypircrrr r!�
has_configZDEFAULT_REPOSITORY�
ValueError)r
ZconfigrrrrDs




zregister._set_configcCs*|jd}tj�|�}t�|�|��dS)z8 Fetch the list of classifiers from the server.
        z?:action=list_classifiersN)r �urllib�requestZurlopenr�info�_read_pypi_response)r
ZurlZresponserrrrUs
zregister.classifierscCs&|�|�d��\}}t�d||�dS)zF Send the metadata to the package index server to be checked.
        r	�Server response (%s): %sN)�post_to_server�build_post_datarr&)r
�code�resultrrrr\szregister.verify_metadatac
Cs�|jrd}|j}|j}nd}d}}d��}||krd|�dtj�t�}|sRd}q,||kr,td�q,|dk�rl|s|td�}qn|s�t	�	d�}q|t
j��}t
j
�|j�d	}|�|j|||�|�|�d
�|�\}}|�d||ftj�|dk�r�|j�r||j_nf|�d
tj�|�d|��tj�d}|��dk�rNtd�}|�s*d}�q*|��dk�r�|�||��nl|dk�r�ddi}	d|	d<|	d<|	d<d|	d<|	d�s�td�|	d<�q�|	d|	dk�r0|	d�s�t	�	d�|	d<�q�|	d�st	�	d�|	d<�q�|	d|	dk�r�d|	d<d|	d<td��q�|	d�sJtd�|	d<�q0|�|	�\}}|dk�rrt�d||�nt�d�t�d �nP|d!k�r�dd"i}	d|	d<|	d�s�td#�|	d<�q�|�|	�\}}t�d||�dS)$a_ Send the metadata to the package index server.

            Well, do the following:
            1. figure who the user is, and then
            2. send the data as a Basic auth'ed POST.

            First we try to read the username/password from $HOME/.pypirc,
            which is a ConfigParser-formatted file with a section
            [distutils] containing username and password entries (both
            in clear text). Eg:

                [distutils]
                index-servers =
                    pypi

                [pypi]
                username: fred
                password: sekrit

            Otherwise, to figure who the user is, we offer the user three
            choices:

             1. use existing login,
             2. register as a new user, or
             3. set the password to a random string and email the user.

        �1�x�z1 2 3 4z�We need to know who you are, so please choose either:
 1. use your existing login,
 2. register as a new user,
 3. have the server generate a new password for you (and email it to you), or
 4. quit
Your selection [default 1]: z&Please choose one of the four options!z
Username: z
Password: rZsubmitr(��zAI can store your PyPI login so future submissions will be faster.z (the login will be stored in %s)�XZynzSave your login (y/N)?�n�y�2�:action�user�namerZemailNZconfirmz
 Confirm: z!Password and confirm don't match!z
   EMail: z"You will receive an email shortly.z7Follow the instructions in it to complete registration.�3Zpassword_resetzYour email address: )r"rr�split�announcer�INFO�input�print�getpassr$r%ZHTTPPasswordMgr�parseZurlparser Zadd_passwordr!r)r*rZ_get_rc_file�lowerZ
_store_pypircr&)
r
Zchoicerr�choices�authZhostr+r,�datarrrrcs��



��

���








zregister.send_metadatacCs�|jj}|d|��|��|��|��|��|��|��|�	�|�
�|��|��|�
�|��|��|��d�}|ds�|ds�|dr�d|d<|S)Nz1.0)r5�metadata_versionr7�versionZsummaryZ	home_pageZauthorZauthor_email�license�description�keywords�platformrZdownload_url�provides�requires�	obsoletesrJrKrLz1.1rD)rZmetadataZget_nameZget_versionZget_descriptionZget_urlZget_contactZget_contact_emailZget_licenceZget_long_descriptionZget_keywordsZ
get_platformsZget_classifiersZget_download_urlZget_providesZget_requiresZ
get_obsoletes)r
�action�metarCrrrr*�s,�zregister.build_post_dataNc
Cs�d|kr$|�d|d|jftj�d}d|}|d}t��}|��D]~\}}t|�tg�td�fkrn|g}|D]R}t|�}|�	|�|�	d|�|�	d�|�	|�|rr|d	d
krr|�	d�qrqH|�	|�|�	d�|�
��d�}d
|tt|��d�}	t
j�|j||	�}
t
j�t
jj|d��}d}z|�|
�}Wnxt
jjk
�r�}
z"|j�rd|
j��}|
j|
jf}W5d}
~
XYnJt
jjk
�r�}
zdt|
�f}W5d}
~
XYnX|j�r�|�|�}d}|j�r�d�d|df�}|�|tj�|S)zC Post a query to the server, and return a string response.
        r7zRegistering %s to %sz3--------------GHSKFJDLGDS7543FJKLFHRE75642756743254z
--z--rz*
Content-Disposition: form-data; name="%s"z

����
�
zutf-8z/multipart/form-data; boundary=%s; charset=utf-8)zContent-typezContent-length)Zpassword_mgrr/Ni�)r0ZOKzK---------------------------------------------------------------------------)r:r rr;�io�StringIO�items�type�str�write�getvalue�encode�lenr$r%ZRequestZbuild_openerZHTTPBasicAuthHandler�open�errorZ	HTTPErrorZ
show_response�fp�readr+�msgZURLErrorr'�join)r
rCrB�boundaryZsep_boundaryZend_boundaryZbody�key�valueZheadersZreqZopenerr,�er_rrrr)�s^��





��

zregister.post_to_server)N)�__name__�
__module__�__qualname__rGrZuser_optionsZboolean_optionsZsub_commandsrrrrrrrrr*r)rrrrrs*��
zr)�__doc__r>rRZurllib.parser$Zurllib.request�warningsrZdistutils.corerZdistutils.errorsZ	distutilsrrrrrr�<module>sPKX[<<�

-command/__pycache__/bdist_dumb.cpython-38.pycnu�[���U

e5d1�@shdZddlZddlmZddlmZddlmZmZddl	Tddl
mZddlm
Z
Gd	d
�d
e�ZdS)z�distutils.command.bdist_dumb

Implements the Distutils 'bdist_dumb' command (create a "dumb" built
distribution -- i.e., just an archive to be unpacked under $prefix or
$exec_prefix).�N)�Command)�get_platform)�remove_tree�ensure_relative)�*)�get_python_version)�logc	@s^eZdZdZdddde�fdddd	d
ddg	Zd
ddgZddd�Zdd�Zdd�Z	dd�Z
dS)�
bdist_dumbz"create a "dumb" built distribution)z
bdist-dir=�dz1temporary directory for creating the distributionz
plat-name=�pz;platform name to embed in generated filenames (default: %s))zformat=�fz>archive format to create (tar, gztar, bztar, xztar, ztar, zip))�	keep-temp�kzPkeep the pseudo-installation tree around after creating the distribution archive)z	dist-dir=r
z-directory to put final built distributions in)�
skip-buildNz2skip rebuilding everything (for testing/debugging))�relativeNz7build the archive using relative paths (default: false))zowner=�uz@Owner name used when creating a tar file [default: current user])zgroup=�gzAGroup name used when creating a tar file [default: current group]r
rrZgztar�zip)�posix�ntcCs:d|_d|_d|_d|_d|_d|_d|_d|_d|_dS)Nr)	�	bdist_dir�	plat_name�format�	keep_temp�dist_dir�
skip_buildr�owner�group)�self�r�4/usr/lib64/python3.8/distutils/command/bdist_dumb.py�initialize_options2szbdist_dumb.initialize_optionscCsz|jdkr&|�d�j}tj�|d�|_|jdkrfz|jtj|_Wn"t	k
rdt
dtj��YnX|�dddd�dS)NZbdistZdumbz@don't know how to create dumb built distributions on platform %s)rr)rr)rr)rZget_finalized_command�
bdist_base�os�path�joinr�default_format�name�KeyError�DistutilsPlatformErrorZset_undefined_options)rr"rrr �finalize_options=s"

��
�zbdist_dumb.finalize_optionscCs(|js|�d�|jddd�}|j|_|j|_d|_t�d|j�|�d�d|j�	�|j
f}tj�
|j|�}|js~|j}nJ|j��r�|j|jkr�tdt|j�t|j�f��ntj�
|jt|j��}|j||j||j|jd	�}|j��r�t�}nd
}|jj�d||f�|j�s$t|j|jd�dS)
NZbuild�install�)Zreinit_subcommandsrzinstalling to %sz%s.%szScan't make a dumb built distribution where base and platbase are different (%s, %s))Zroot_dirrr�anyr	)�dry_run) rZrun_commandZreinitialize_commandr�rootZwarn_dirr�infoZdistributionZget_fullnamerr#r$r%rrZhas_ext_modulesZinstall_baseZinstall_platbaser)�reprrZmake_archiverrrrZ
dist_files�appendrrr.)rr+Zarchive_basenameZpseudoinstall_rootZarchive_root�filenameZ	pyversionrrr �runOsR


�

����
��
�zbdist_dumb.runN)�__name__�
__module__�__qualname__ZdescriptionrZuser_optionsZboolean_optionsr&r!r*r4rrrr r	s,���
�r	)�__doc__r#Zdistutils.corerZdistutils.utilrZdistutils.dir_utilrrZdistutils.errorsZdistutils.sysconfigrZ	distutilsrr	rrrr �<module>sPKX[�<�(�(1command/__pycache__/build_py.cpython-38.opt-1.pycnu�[���U

e5d&C�@szdZddlZddlZddlZddlZddlmZddlTddl	m
Z
mZddlm
Z
Gdd�de�ZGd	d
�d
ee�ZdS)zHdistutils.command.build_py

Implements the Distutils 'build_py' command.�N)�Command)�*)�convert_path�	Mixin2to3)�logc@s�eZdZdZdddddgZddgZd	diZd
d�Zdd
�Zdd�Z	dd�Z
dd�Zdd�Zdd�Z
dd�Zdd�Zdd�Zdd�Zd d!�Zd"d#�Zd$d%�Zd2d'd(�Zd)d*�Zd+d,�Zd-d.�Zd/d0�Zd1S)3�build_pyz5"build" pure Python modules (copy to build directory))z
build-lib=�dzdirectory to "build" (copy) to)�compile�czcompile .py to .pyc)�
no-compileNz!don't compile .py files [default])z	optimize=�Ozlalso compile with optimization: -O1 for "python -O", -O2 for "python -OO", and -O0 to disable [default: -O0])�force�fz2forcibly build everything (ignore file timestamps)r	r
rcCs4d|_d|_d|_d|_d|_d|_d|_d|_dS)Nr)�	build_lib�
py_modules�package�package_data�package_dirr	�optimizer
��self�r�2/usr/lib64/python3.8/distutils/command/build_py.py�initialize_options szbuild_py.initialize_optionsc	Cs�|�ddd�|jj|_|jj|_|jj|_i|_|jjr^|jj��D]\}}t|�|j|<qF|��|_	t
|jt�s�zt|j�|_Wn t
tfk
r�td��YnXdS)NZbuild)rr)r
r
zoptimize must be 0, 1, or 2)Zset_undefined_options�distribution�packagesrrr�itemsr�get_data_files�
data_files�
isinstancer�int�
ValueError�AssertionErrorZDistutilsOptionError)r�name�pathrrr�finalize_options*s$�



zbuild_py.finalize_optionscCs:|jr|��|jr$|��|��|�|jdd��dS�Nr)�include_bytecode)r�
build_modulesr�build_packages�build_package_data�byte_compile�get_outputsrrrr�runCszbuild_py.runcs�g}|js|S|jD]h}|�|�}tjj|jg|�d��}d�|rPt|�d��fdd�|�||�D�}|�	||||f�q|S)z?Generate list of '(package,src_dir,build_dir,filenames)' tuples�.r�csg|]}|�d��qS�Nr)�.0�file�Zplenrr�
<listcomp>ssz+build_py.get_data_files.<locals>.<listcomp>)
r�get_package_dir�osr$�joinr�split�len�find_data_files�append)r�datar�src_dir�	build_dir�	filenamesrr3rras



�zbuild_py.get_data_filescsd|j�dg�|j�|g�}g�|D]:}t�tj�t�|�t|���}���fdd�|D��q$�S)z6Return filenames for package's data files in 'src_dir'�cs$g|]}|�krtj�|�r|�qSr)r6r$�isfile)r1�fn��filesrrr4�s�z,build_py.find_data_files.<locals>.<listcomp>)	r�get�globr6r$r7�escaper�extend)rrr=Zglobs�patternZfilelistrrCrr:ys�zbuild_py.find_data_filescCs`d}|jD]P\}}}}|D]>}tj�||�}|�tj�|��|jtj�||�|dd�qq
dS)z$Copy data files into build directoryNF�Z
preserve_mode)rr6r$r7�mkpath�dirname�	copy_file)rZlastdirrr=r>r?�filename�targetrrrr*�s�zbuild_py.build_package_datacCs�|�d�}|js&|r tjj|�SdSn�g}|r�z|jd�|�}Wn*tk
rl|�d|d�|d=Yq*X|�d|�tjj|�Sq*|j�d�}|dk	r�|�d|�|r�tjj|�SdSdS)z�Return the directory, relative to the top of the source
           distribution, where package 'package' should be found
           (at least according to the 'package_dir' option, if any).r.r@r���N)r8rr6r$r7�KeyError�insertrE)rrr$�tailZpdirrrrr5�s(
	zbuild_py.get_package_dircCsj|dkr8tj�|�s td|��tj�|�s8td|��|rftj�|d�}tj�|�rZ|St�d|�dS)Nr@z%package directory '%s' does not existz>supposed package directory '%s' exists, but is not a directoryz__init__.pyz8package init file '%s' not found (or not a regular file))	r6r$�existsZDistutilsFileError�isdirr7rAr�warn)rrr�init_pyrrr�
check_package�s&����zbuild_py.check_packagecCs&tj�|�st�d||�dSdSdS)Nz!file %s (for module %s) not foundFT)r6r$rArrV)r�module�module_filerrr�check_module�szbuild_py.check_modulec	Cs�|�||�t�tj�t�|�d��}g}tj�|jj�}|D]P}tj�|�}||kr�tj�	tj�
|��d}|�|||f�q>|�d|�q>|S)Nz*.pyrzexcluding %s)
rXrFr6r$r7rG�abspathrZscript_name�splitext�basenamer;Zdebug_print)	rrrZmodule_files�modulesZsetup_scriptrZabs_frYrrr�find_package_modules�szbuild_py.find_package_modulesc	Cs�i}g}|jD]�}|�d�}d�|dd��}|d}z||\}}Wn"tk
rh|�|�}d}YnX|s�|�||�}	|df||<|	r�|�|d|	f�tj�||d�}
|�	||
�s�q|�|||
f�q|S)a�Finds individually-specified Python modules, ie. those listed by
        module name in 'self.py_modules'.  Returns a list of tuples (package,
        module_base, filename): 'package' is a tuple of the path through
        package-space to the module; 'module_base' is the bare (no
        packages, no dots) module name, and 'filename' is the path to the
        ".py" file (relative to the distribution root) that implements the
        module.
        r.rrPr/�__init__�.py)
rr8r7rQr5rXr;r6r$r[)rrr_rYr$rZmodule_baser�checkedrWrZrrr�find_modules�s*



zbuild_py.find_modulescCsNg}|jr|�|���|jrJ|jD]$}|�|�}|�||�}|�|�q$|S)a4Compute the list of all modules that will be built, whether
        they are specified one-module-at-a-time ('self.py_modules') or
        by whole packages ('self.packages').  Return a list of tuples
        (package, module, module_file), just like 'find_modules()' and
        'find_package_modules()' do.)rrHrdrr5r`)rr_rr�mrrr�find_all_moduless

zbuild_py.find_all_modulescCsdd�|��D�S)NcSsg|]}|d�qS)rPr)r1rYrrrr4-sz-build_py.get_source_files.<locals>.<listcomp>)rfrrrr�get_source_files,szbuild_py.get_source_filescCs$|gt|�|dg}tjj|�S)Nrb)�listr6r$r7)rr>rrYZoutfile_pathrrr�get_module_outfile/szbuild_py.get_module_outfiler/cCs�|��}g}|D]p\}}}|�d�}|�|j||�}|�|�|r|jr^|�tjj|dd��|j	dkr|�tjj||j	d��q|dd�|j
D�7}|S)Nr.r@)�optimizationrcSs,g|]$\}}}}|D]}tj�||��qqSr)r6r$r7)r1rr=r>r?rNrrrr4Bs
�z(build_py.get_outputs.<locals>.<listcomp>)rfr8rirr;r	�	importlib�util�cache_from_sourcerr)rr'r_ZoutputsrrYrZrNrrrr,3s*


�

�
�zbuild_py.get_outputscCsbt|t�r|�d�}nt|ttf�s,td��|�|j||�}tj	�
|�}|�|�|j||dd�S)Nr.z:'package' must be a string (dot-separated), list, or tuplerrJ)
r�strr8rh�tuple�	TypeErrorrirr6r$rLrKrM)rrYrZrZoutfile�dirrrr�build_moduleJs
�
zbuild_py.build_modulecCs*|��}|D]\}}}|�|||�qdSr0)rdrr)rr_rrYrZrrrr(Yszbuild_py.build_modulescCsD|jD]8}|�|�}|�||�}|D]\}}}|�|||�q$qdSr0)rr5r`rr)rrrr_Zpackage_rYrZrrrr)bs



zbuild_py.build_packagescCs�tjr|�d�dSddlm}|j}|dtjkr>|tj}|jrZ||d|j	||j
d�|jdkr||||j|j	||j
d�dS)Nz%byte-compiling is disabled, skipping.r)r+rP)rr
�prefix�dry_run)�sys�dont_write_bytecoderV�distutils.utilr+rr6�sepr	r
rtr)rrDr+rsrrrr+vs&

�
�zbuild_py.byte_compileN)r/)�__name__�
__module__�__qualname__ZdescriptionZuser_optionsZboolean_optionsZnegative_optrr%r-rr:r*r5rXr[r`rdrfrgrir,rrr(r)r+rrrrrs8�



'4
	rc@seZdZdd�Zdd�ZdS)�
build_py_2to3cCsLg|_|jr|��|jr*|��|��|�|j�|�|jdd��dSr&)	�
updated_filesrr(rr)r*Zrun_2to3r+r,rrrrr-�szbuild_py_2to3.runcCs,t�||||�}|dr(|j�|d�|S)Nr/r)rrrr}r;)rrYrZr�resrrrrr�szbuild_py_2to3.build_moduleN)ryrzr{r-rrrrrrr|�sr|)�__doc__r6�importlib.utilrkrurFZdistutils.corerZdistutils.errorsrwrrZ	distutilsrrr|rrrr�<module>s}PKU[���Z^@^@cygwinccompiler.pynu�[���PKU[�1�xExE�@fancy_getopt.pynu�[���PKU[�l�W:W:W�bcppcompiler.pynu�[���PKU[[sl����spawn.pynu�[���PKU[��=�/w/w��msvc9compiler.pynu�[���PKU[�u�AI�I�7Wccompiler.pynu�[���PKU[$�Fq��	�config.pynu�[���PKU[�U�ǜQ�Q�#util.pynu�[���PKU[2�

�uversionpredicate.pynu�[���PKU[]�4:))�extension.pynu�[���PKU[k"#��
�
B�dep_util.pynu�[���PKU[Q8���0�0 �text_file.pynu�[���PKU[��5|!|!�archive_util.pynu�[���PKU[�n���
�
	�errors.pynu�[���PKU[�0G>����"dist.pynu�[���PKU[�����file_util.pynu�[���PKU[O�}�;�;$unixccompiler.pynu�[���PKU[D/oPP�Bsysconfig.pynu�[���PKU[6��bb!G�__pycache__/errors.cpython-36.pycnu�[���PKU[^��zz)��__pycache__/__init__.cpython-36.opt-1.pycnu�[���PKU[�_�))-ͪ__pycache__/fancy_getopt.cpython-36.opt-1.pycnu�[���PKU[Vf���%1�__pycache__/core.cpython-36.opt-1.pycnu�[���PKU[S�۬�#�__pycache__/dir_util.cpython-36.pycnu�[���PKU[�(�ߟ
�
'__pycache__/config.cpython-36.opt-1.pycnu�[���PKU[�D�A�8�8-__pycache__/msvccompiler.cpython-36.opt-1.pycnu�[���PKU[���E�C�C.SM__pycache__/msvc9compiler.cpython-36.opt-1.pycnu�[���PKV[�eo'��__pycache__/config.cpython-36.opt-2.pycnu�[���PKV[�=�&�&#�__pycache__/filelist.cpython-36.pycnu�[���PKV[����<�<%��__pycache__/util.cpython-36.opt-1.pycnu�[���PKV[?�NN.�__pycache__/unixccompiler.cpython-36.opt-2.pycnu�[���PKV[�^9b
b
)�__pycache__/dir_util.cpython-36.opt-2.pycnu�[���PKV[�G�PX
X
%?(__pycache__/core.cpython-36.opt-2.pycnu�[���PKV[f�Y
&&*�5__pycache__/extension.cpython-36.opt-1.pycnu�[���PKV[u>�UaUa%lQ__pycache__/dist.cpython-36.opt-2.pycnu�[���PKV[��B��:�:$�__pycache__/cmd.cpython-36.opt-1.pycnu�[���PKV[W6�=��$��__pycache__/log.cpython-36.opt-1.pycnu�[���PKV[�͢����%E�__pycache__/dist.cpython-36.opt-1.pycnu�[���PKV[�*&��(?}__pycache__/version.cpython-36.opt-1.pycnu�[���PKV[�(�ߟ
�
!$�__pycache__/config.cpython-36.pycnu�[���PKV[�y����1�__pycache__/versionpredicate.cpython-36.opt-1.pycnu�[���PKV[�	ư�*P�__pycache__/file_util.cpython-36.opt-2.pycnu�[���PKV[&�
��)Z�__pycache__/filelist.cpython-36.opt-2.pycnu�[���PKV[�f7���-��__pycache__/archive_util.cpython-36.opt-2.pycnu�[���PKV[y�k���)��__pycache__/__init__.cpython-36.opt-2.pycnu�[���PKV[�=[Ä
�
*��__pycache__/extension.cpython-36.opt-2.pycnu�[���PKV[C^�f� � *�__pycache__/sysconfig.cpython-36.opt-2.pycnu�[���PKV[樤,�4�4(�(__pycache__/_msvccompiler.cpython-36.pycnu�[���PKV[4Sc<!<!*&^__pycache__/cygwinccompiler.cpython-36.pycnu�[���PKV[6��bb'�__pycache__/errors.cpython-36.opt-1.pycnu�[���PKV[^��zz#u�__pycache__/__init__.cpython-36.pycnu�[���PKV[0Ah��(B�__pycache__/version.cpython-36.opt-2.pycnu�[���PKV[؉ȯ��.R�__pycache__/unixccompiler.cpython-36.opt-1.pycnu�[���PKV[�� ���&s�__pycache__/debug.cpython-36.opt-1.pycnu�[���PKV[2�jK�.�.$��__pycache__/sysconfig.cpython-36.pycnu�[���PKV[��B��:�:g�__pycache__/cmd.cpython-36.pycnu�[���PKV[OS��

*A-	__pycache__/text_file.cpython-36.opt-2.pycnu�[���PKV[`�E(11-�:	__pycache__/bcppcompiler.cpython-36.opt-2.pycnu�[���PKV[�Fk��&ES	__pycache__/spawn.cpython-36.opt-1.pycnu�[���PKV[D;^��A�A*g	__pycache__/ccompiler.cpython-36.opt-2.pycnu�[���PKV[uT�W�$�$%\�	__pycache__/util.cpython-36.opt-2.pycnu�[���PKV[�Y��/&/&)��	__pycache__/filelist.cpython-36.opt-1.pycnu�[���PKV[c����0/�	__pycache__/cygwinccompiler.cpython-36.opt-2.pycnu�[���PKV[��c�-m
__pycache__/fancy_getopt.cpython-36.opt-2.pycnu�[���PKV[5L�
!
!*�.
__pycache__/text_file.cpython-36.opt-1.pycnu�[���PKV[n7#Fāā*:P
__pycache__/ccompiler.cpython-36.opt-1.pycnu�[���PKV[4Sc<!<!0X�
__pycache__/cygwinccompiler.cpython-36.opt-1.pycnu�[���PKV[2�jK�.�.*��
__pycache__/sysconfig.cpython-36.opt-1.pycnu�[���PKV[f��		*�"__pycache__/file_util.cpython-36.opt-1.pycnu�[���PKV[E'�l+
+
1?:__pycache__/versionpredicate.cpython-36.opt-2.pycnu�[���PKV[i��N�=�=.�D__pycache__/msvc9compiler.cpython-36.opt-2.pycnu�[���PKV[�y����+��__pycache__/versionpredicate.cpython-36.pycnu�[���PKV[;T>��$�__pycache__/log.cpython-36.opt-2.pycnu�[���PKV[�z!�'�__pycache__/errors.cpython-36.opt-2.pycnu�[���PKV[S�۬�)p�__pycache__/dir_util.cpython-36.opt-1.pycnu�[���PKV[��#6�1�1.u�__pycache__/_msvccompiler.cpython-36.opt-2.pycnu�[���PKV[wm���)d�__pycache__/dep_util.cpython-36.opt-2.pycnu�[���PKV[�
)�
�
#��__pycache__/dep_util.cpython-36.pycnu�[���PKV[a"�-�__pycache__/archive_util.cpython-36.opt-1.pycnu�[���PKV[���$D$D(h__pycache__/msvc9compiler.cpython-36.pycnu�[���PKV[5L�
!
!$�b__pycache__/text_file.cpython-36.pycnu�[���PKV[�
)�
�
)B�__pycache__/dep_util.cpython-36.opt-1.pycnu�[���PKV[(E�O��+�__pycache__/core.cpython-36.pycnu�[���PKV[�Cֺ�"
�__pycache__/version.cpython-36.pycnu�[���PKV[f��		$�__pycache__/file_util.cpython-36.pycnu�[���PKV[�Fӎ##$v�__pycache__/cmd.cpython-36.opt-2.pycnu�[���PKV[�Fk�� �
__pycache__/spawn.cpython-36.pycnu�[���PKV[؉ȯ��(�
__pycache__/unixccompiler.cpython-36.pycnu�[���PKV[q�ii&�0
__pycache__/spawn.cpython-36.opt-2.pycnu�[���PKV[d�S�<�<�?
__pycache__/util.cpython-36.pycnu�[���PKV[nQQ-�|
__pycache__/bcppcompiler.cpython-36.opt-1.pycnu�[���PKV[c��Խ4�4.4�
__pycache__/_msvccompiler.cpython-36.opt-1.pycnu�[���PKV[�� ���&O�
__pycache__/debug.cpython-36.opt-2.pycnu�[���PKV[a"�'a�
__pycache__/archive_util.cpython-36.pycnu�[���PKV[W6�=��7�
__pycache__/log.cpython-36.pycnu�[���PKV[nQQ'��
__pycache__/bcppcompiler.cpython-36.pycnu�[���PKV[�D�A�8�8'(	__pycache__/msvccompiler.cpython-36.pycnu�[���PKV[f�Y
&&$gB__pycache__/extension.cpython-36.pycnu�[���PKV[���ƥ����]__pycache__/dist.cpython-36.pycnu�[���PKV[�� ��� ��__pycache__/debug.cpython-36.pycnu�[���PKV[�x�x�2�2-��__pycache__/msvccompiler.cpython-36.opt-2.pycnu�[���PKV[�q��)�)'�__pycache__/fancy_getopt.cpython-36.pycnu�[���PKV[���C�C�$�A__pycache__/ccompiler.cpython-36.pycnu�[���PKV[_�H%����debug.pynu�[���PKV[���۟F�FG�cmd.pynu�[���PKV[fP[5 2 2filelist.pynu�[���PKV[ˆ�б�w>log.pynu�[���PKV[9�RNRN^F_msvccompiler.pynu�[���PKV[�:����command/install_scripts.pynu�[���PKV[����-�-�command/register.pynu�[���PKV[,����
�
�command/clean.pynu�[���PKV[���6�command/install_data.pynu�[���PKV[���7=3=3��command/config.pynu�[���PKV[�d+�XXcommand/build_scripts.pynu�[���PKV[��ndITIT�-command/bdist_rpm.pynu�[���PKV[��x���.�command/build.pynu�[���PKV[��E߉߉��command/bdist_msi.pynu�[���PKV[���� � #command/install_lib.pynu�[���PKV[�t��=J=J+Dcommand/sdist.pynu�[���PKV[��|P{P{��command/build_ext.pynu�[���PKV[k���8<
command/__pycache__/install_scripts.cpython-36.opt-1.pycnu�[���PKV[�12command/__pycache__/__init__.cpython-36.opt-1.pycnu�[���PKV[���88.�command/__pycache__/install_lib.cpython-36.pycnu�[���PKV[�zL��.@*command/__pycache__/bdist.cpython-36.opt-1.pycnu�[���PKV[2	a׃�(c9command/__pycache__/clean.cpython-36.pycnu�[���PKV['5�5��6>Bcommand/__pycache__/build_scripts.cpython-36.opt-1.pycnu�[���PKV[I0�TJ(J(/�Scommand/__pycache__/config.cpython-36.opt-1.pycnu�[���PKV[��i�VV/;|command/__pycache__/config.cpython-36.opt-2.pycnu�[���PKV[B.�5		/�command/__pycache__/install_data.cpython-36.pycnu�[���PKV[�@w.c�command/__pycache__/bdist.cpython-36.opt-2.pycnu�[���PKV[�)��4įcommand/__pycache__/install_lib.cpython-36.opt-2.pycnu�[���PKV[�Fy�L�L2#�command/__pycache__/bdist_msi.cpython-36.opt-1.pycnu�[���PKV[}5|���.dcommand/__pycache__/build.cpython-36.opt-2.pycnu�[���PKV[�
���.Pcommand/__pycache__/build.cpython-36.opt-1.pycnu�[���PKV[��)�AA3�/command/__pycache__/build_clib.cpython-36.opt-2.pycnu�[���PKV[��x��93Acommand/__pycache__/install_egg_info.cpython-36.opt-1.pycnu�[���PKV[�
���(EMcommand/__pycache__/build.cpython-36.pycnu�[���PKV[�FEZ11.~]command/__pycache__/check.cpython-36.opt-2.pycnu�[���PKV[��x��3
pcommand/__pycache__/install_egg_info.cpython-36.pycnu�[���PKV[	�*�dd6|command/__pycache__/build_scripts.cpython-36.opt-2.pycnu�[���PKV[I0�TJ(J()�command/__pycache__/config.cpython-36.pycnu�[���PKV[�YY]33,��command/__pycache__/bdist_rpm.cpython-36.pycnu�[���PKV[�����1��command/__pycache__/__init__.cpython-36.opt-2.pycnu�[���PKV[�B����8��command/__pycache__/install_headers.cpython-36.opt-1.pycnu�[���PKV[�Ƹ<�7�7*�command/__pycache__/install.cpython-36.pycnu�[���PKV[�+)command/__pycache__/__init__.cpython-36.pycnu�[���PKV[B.�5		5�+command/__pycache__/install_data.cpython-36.opt-1.pycnu�[���PKV[k���25command/__pycache__/install_scripts.cpython-36.pycnu�[���PKV[�B����2�=command/__pycache__/install_headers.cpython-36.pycnu�[���PKV[2l��///Ecommand/__pycache__/upload.cpython-36.opt-2.pycnu�[���PKV[a�)�7�70�Ycommand/__pycache__/install.cpython-36.opt-1.pycnu�[���PKV[�ل8��command/__pycache__/install_headers.cpython-36.opt-2.pycnu�[���PKV[q����(�(1�command/__pycache__/build_py.cpython-36.opt-1.pycnu�[���PKV[�����1T�command/__pycache__/register.cpython-36.opt-2.pycnu�[���PKV[`�"H��3��command/__pycache__/bdist_dumb.cpython-36.opt-1.pycnu�[���PKV[�j�992��command/__pycache__/build_ext.cpython-36.opt-2.pycnu�[���PKV[v/())+&command/__pycache__/build_py.cpython-36.pycnu�[���PKV[�zL��(}Ocommand/__pycache__/bdist.cpython-36.pycnu�[���PKV[�t5353.�^command/__pycache__/sdist.cpython-36.opt-1.pycnu�[���PKV[$3�Y		9-�command/__pycache__/install_egg_info.cpython-36.opt-2.pycnu�[���PKV[`�"H��-��command/__pycache__/bdist_dumb.cpython-36.pycnu�[���PKV[�k!H�1�12��command/__pycache__/bdist_rpm.cpython-36.opt-2.pycnu�[���PKV[[' �@�@,��command/__pycache__/build_ext.cpython-36.pycnu�[���PKV[p���&�&.�command/__pycache__/sdist.cpython-36.opt-2.pycnu�[���PKV[�Sn��
�
3�Dcommand/__pycache__/bdist_dumb.cpython-36.opt-2.pycnu�[���PKV[g��2�22�Rcommand/__pycache__/bdist_rpm.cpython-36.opt-1.pycnu�[���PKV[���>ii(�command/__pycache__/check.cpython-36.pycnu�[���PKV[�� � 0֚command/__pycache__/bdist_wininst.cpython-36.pycnu�[���PKV[$0�00.�command/__pycache__/clean.cpython-36.opt-2.pycnu�[���PKV[���>ii.w�command/__pycache__/check.cpython-36.opt-1.pycnu�[���PKV[�2��7M7M,>�command/__pycache__/bdist_msi.cpython-36.pycnu�[���PKV[=��#8�&command/__pycache__/install_scripts.cpython-36.opt-2.pycnu�[���PKV[X����6A/command/__pycache__/bdist_wininst.cpython-36.opt-2.pycnu�[���PKV[��kk-�Ocommand/__pycache__/build_clib.cpython-36.pycnu�[���PKV[Fq�� � +Sccommand/__pycache__/register.cpython-36.pycnu�[���PKV['5�5��0��command/__pycache__/build_scripts.cpython-36.pycnu�[���PKV[���884ؕcommand/__pycache__/install_lib.cpython-36.opt-1.pycnu�[���PKV[y�Mi��5t�command/__pycache__/install_data.cpython-36.opt-2.pycnu�[���PKV[�W��|3|30\�command/__pycache__/install.cpython-36.opt-2.pycnu�[���PKV[�J%�"$"$18�command/__pycache__/build_py.cpython-36.opt-2.pycnu�[���PKV[2	a׃�.�command/__pycache__/clean.cpython-36.opt-1.pycnu�[���PKV[XX!��/�command/__pycache__/upload.cpython-36.opt-1.pycnu�[���PKV[��kk3�)command/__pycache__/build_clib.cpython-36.opt-1.pycnu�[���PKV[�t5353(v=command/__pycache__/sdist.cpython-36.pycnu�[���PKV[��o o 6qcommand/__pycache__/bdist_wininst.cpython-36.opt-1.pycnu�[���PKV[Fq�� � 1ؑcommand/__pycache__/register.cpython-36.opt-1.pycnu�[���PKV[;PoS�F�F2�command/__pycache__/bdist_msi.cpython-36.opt-2.pycnu�[���PKV[XX!��)Q�command/__pycache__/upload.cpython-36.pycnu�[���PKV[[' �@�@2Wcommand/__pycache__/build_ext.cpython-36.opt-1.pycnu�[���PKV[�s�&C&CgPcommand/build_py.pynu�[���PKV[9R)S+
+
Гcommand/install_egg_info.pynu�[���PKV[v3;�VVF�command/build_clib.pynu�[���PKV[��فj�j�command/install.pynu�[���PKV[��n1���(command/bdist.pynu�[���PKV[;���>command/__init__.pynu�[���PKV[�=[���Bcommand/upload.pynu�[���PKV[*Rj&5_command/install_headers.pynu�[���PKV[r|��yy�dcommand/command_templatenu�[���PKV[���`�>�>Rgcommand/bdist_wininst.pynu�[���PKV[�w11E�command/bdist_dumb.pynu�[���PKV[;�R�����command/check.pynu�[���PKV[c+�9090
��version.pynu�[���PKV[[�����M__init__.pynu�[���PKV[IS^�"�"tcore.pynu�[���PKV[Uy����W$READMEnu�[���PKV[��B�\\%msvccompiler.pynu�[���PKV[�3�bbʁdir_util.pynu�[���PKW[U�cڍ�
g�errors.pycnu�[���PKW[x"�...�fancy_getopt.pyonu�[���PKW[5㑂�s�dir_util.pycnu�[���PKW[��p���1versionpredicate.pycnu�[���PKW[;�(�2828util.pyonu�[���PKW[�!Q�
�

�Pconfig.pycnu�[���PKW[�R��
�
�^log.pycnu�[���PKW[#��˱��iarchive_util.pycnu�[���PKW[���k�.�.��emxccompiler.pynu�[���PKW[�!Q�
�

��config.pyonu�[���PKW[m��ll��dep_util.pyonu�[���PKW[s�L^^
_�file_util.pyonu�[���PKW[s�L^^
��file_util.pycnu�[���PKW[��ho��	�debug.pyonu�[���PKW[��8��A�A�cmd.pycnu�[���PKW[O��9�D�D�Isysconfig.py.debug-buildnu�[���PKW[e|��% % Ŏunixccompiler.pycnu�[���PKW[<Bu2uDuD+�msvccompiler.pyonu�[���PKW[��%z+$+$
��text_file.pyonu�[���PKW[F5f#��Hbcppcompiler.pycnu�[���PKW[)c�a&a&R7cygwinccompiler.pyonu�[���PKW[)c�a&a&�]cygwinccompiler.pycnu�[���PKW[��%z+$+$
��text_file.pycnu�[���PKW[#��˱��archive_util.pyonu�[���PKW[b�{�++��emxccompiler.pycnu�[���PKW[ϩڜ�S�S^�msvc9compiler.pycnu�[���PKW[m��ll�8 dep_util.pycnu�[���PKW[�^�	@E spawn.pyonu�[���PKW[	`��pp�^ core.pyonu�[���PKW[e|��% % <| unixccompiler.pyonu�[���PKW[}�J���� dist.pyonu�[���PKW[��8��A�A�5!cmd.pyonu�[���PKW[���\4\4
�w!sysconfig.pyonu�[���PKW[�/��.�.V�!fancy_getopt.pycnu�[���PKW[�zN֟�L�!__init__.pyonu�[���PKW[���\4\4
'�!sysconfig.pycnu�[���PKW[��ho��	�"debug.pycnu�[���PKW[O�**�"filelist.pyonu�[���PKW[b�y���
7="extension.pycnu�[���PKW[<Bu2uDuDhZ"msvccompiler.pycnu�[���PKW[���
�"extension.pyonu�[���PKW[U�cڍ�
l�"errors.pyonu�[���PKW[	`��pp3�"core.pycnu�[���PKW[d�7�'�'��"command/register.pyonu�[���PKW[)Of.].]�#command/bdist_msi.pyonu�[���PKW[���rw#command/install_lib.pyonu�[���PKW[��Z}}ґ#command/build_scripts.pycnu�[���PKW[���t..��#command/install_data.pycnu�[���PKW[�D9%�D�D�#command/bdist_rpm.pycnu�[���PKW[q+g���#command/install_headers.pycnu�[���PKW["�1�15�#command/config.pycnu�[���PKW[���j�K�K0$command/build_ext.pyonu�[���PKW[:Oķ�{$command/build.pyonu�[���PKW[�?^��]�]4�$command/bdist_msi.pycnu�[���PKW[�ˣA�A�A�$command/install.pycnu�[���PKW[d�7�'�'0%command/register.pycnu�[���PKW[V�0e~~ +X%command/build_ext.py.debug-buildnu�[���PKW[q+g����%command/install_headers.pyonu�[���PKW["�1�1��%command/config.pyonu�[���PKW[V��11r&command/bdist.pyonu�[���PKW[��Z}}�%&command/build_scripts.pyonu�[���PKW[V��11�7&command/bdist.pycnu�[���PKW[�����L&command/build_clib.pyonu�[���PKW[�N�`ww-e&command/bdist_dumb.pycnu�[���PKW[�v�jvv�x&command/check.pycnu�[���PKW[�����&command/install_lib.pycnu�[���PKW[�A�r���&command/upload.pyonu�[���PKW[�$2����&command/install_egg_info.pycnu�[���PKW[���j�K�K��&command/build_ext.pycnu�[���PKW[=�ib8A8A�'command/sdist.pyonu�[���PKW[�5�)�)!a'command/bdist_wininst.pyonu�[���PKW[)U]	���'command/__init__.pyonu�[���PKW[�����ݍ'command/build_clib.pycnu�[���PKW[=�ib8A8A�'command/sdist.pycnu�[���PKW[%
�ppg�'command/install_scripts.pyonu�[���PKW[���t.."�'command/install_data.pyonu�[���PKW[�ܚy���(command/clean.pyonu�[���PKW[`�=��)�)�(command/bdist_wininst.pycnu�[���PKW[�ܚy��7(command/clean.pycnu�[���PKW[fX��,�,BC(command/build_py.pyonu�[���PKW[(^��,�,#p(command/build_py.pycnu�[���PKW[�A�r��L�(command/upload.pycnu�[���PKW[%
�pp2�(command/install_scripts.pycnu�[���PKW[:Oķ�(command/build.pycnu�[���PKW[�v�jvvH�(command/check.pyonu�[���PKW[)U]	����(command/__init__.pycnu�[���PKW[�ˣA�A�A��(command/install.pyonu�[���PKW[�$2���3)command/install_egg_info.pyonu�[���PKW[4��tDtD�B)command/bdist_rpm.pyonu�[���PKW[�N�`wwv�)command/bdist_dumb.pyonu�[���PKW[��p���3�)versionpredicate.pyonu�[���PKW[�zN֟��)__init__.pycnu�[���PKW[O�**��)filelist.pycnu�[���PKW[�d��m5m5 8�)unixccompiler.py.distutils-rpathnu�[���PKW[�?�g��
�*ccompiler.pycnu�[���PKW[�Y�*((D�*version.pycnu�[���PKW[�BAU�S�S��*msvc9compiler.pyonu�[���PKW[�s q����
�+ccompiler.pyonu�[���PKW[�R��
�
Z�+log.pyonu�[���PKW[b�{�++s�+emxccompiler.pyonu�[���PKW[}�J����+dist.pycnu�[���PKW[�Y�*((e,version.pyonu�[���PKW[;�(�2828��,util.pycnu�[���PKW[5㑂��,dir_util.pyonu�[���PKW[F5f#����,bcppcompiler.pyonu�[���PKW[�^�	��,spawn.pycnu�[���PKX[���~�!�!0
-__pycache__/cygwinccompiler.cpython-38.opt-1.pycnu�[���PKX[���G��$
/-__pycache__/ccompiler.cpython-38.pycnu�[���PKX[`=x��-t�-__pycache__/archive_util.cpython-38.opt-2.pycnu�[���PKX[\�p���"d�-__pycache__/version.cpython-38.pycnu�[���PKX[6��1�2�2(G�-__pycache__/_msvccompiler.cpython-38.pycnu�[���PKX[|�W�!�!*G.__pycache__/sysconfig.cpython-38.opt-2.pycnu�[���PKX[e9-1r5.__pycache__/versionpredicate.cpython-38.opt-1.pycnu�[���PKX[��ES��&�I.__pycache__/debug.cpython-38.opt-1.pycnu�[���PKX[�Ɓ�k
k
*�J.__pycache__/extension.cpython-38.opt-2.pycnu�[���PKX[4��!�
�
!�X.__pycache__/config.cpython-38.pycnu�[���PKX[0�oa�����f.__pycache__/dist.cpython-38.pycnu�[���PKX[�*���)��.__pycache__/__init__.cpython-38.opt-2.pycnu�[���PKX[�w��
�
'��.__pycache__/errors.cpython-38.opt-2.pycnu�[���PKX[�VH9�-�-.�.__pycache__/_msvccompiler.cpython-38.opt-2.pycnu�[���PKX[p|t���(1(/__pycache__/version.cpython-38.opt-2.pycnu�[���PKX[zw�\HH08/__pycache__/cygwinccompiler.cpython-38.opt-2.pycnu�[���PKX[�Z@+n/n/*�S/__pycache__/sysconfig.cpython-38.opt-1.pycnu�[���PKX[�~��//*��/__pycache__/file_util.cpython-38.opt-1.pycnu�[���PKX[�ht+�9�9-�/__pycache__/msvccompiler.cpython-38.opt-1.pycnu�[���PKX[���^3^3-��/__pycache__/msvccompiler.cpython-38.opt-2.pycnu�[���PKX[��˰��&�0__pycache__/spawn.cpython-38.opt-2.pycnu�[���PKX[�٢�<�<�0__pycache__/util.cpython-38.pycnu�[���PKX[U�����.�T0__pycache__/unixccompiler.cpython-38.opt-2.pycnu�[���PKX[�J���<�<%n0__pycache__/util.cpython-38.opt-1.pycnu�[���PKX[�^(�=�=./�0__pycache__/msvc9compiler.cpython-38.opt-2.pycnu�[���PKX[��V����*e�0__pycache__/ccompiler.cpython-38.opt-1.pycnu�[���PKX[�{<���'Sk1__pycache__/archive_util.cpython-38.pycnu�[���PKX[�5����7�1__pycache__/core.cpython-38.pycnu�[���PKX[O�

$^�1__pycache__/extension.cpython-38.pycnu�[���PKX[4#�Z��#��1__pycache__/dir_util.cpython-38.pycnu�[���PKX[e9-+��1__pycache__/versionpredicate.cpython-38.pycnu�[���PKX[�$�

*?�1__pycache__/text_file.cpython-38.opt-2.pycnu�[���PKX[�5����%��1__pycache__/core.cpython-38.opt-1.pycnu�[���PKX[@c.�
	
	$�
2__pycache__/log.cpython-38.opt-1.pycnu�[���PKX[/h��hDhD(62__pycache__/msvc9compiler.cpython-38.pycnu�[���PKX[
d�"~6~6$�[2__pycache__/cmd.cpython-38.opt-1.pycnu�[���PKX[�T� � $Ȓ2__pycache__/text_file.cpython-38.pycnu�[���PKX[�YyF�&�&#�2__pycache__/filelist.cpython-38.pycnu�[���PKX[�fIx��*��2__pycache__/file_util.cpython-38.opt-2.pycnu�[���PKX[I��%%�2__pycache__/core.cpython-38.opt-2.pycnu�[���PKX[��(S��)�2__pycache__/filelist.cpython-38.opt-2.pycnu�[���PKX[��-���!l3__pycache__/errors.cpython-38.pycnu�[���PKX[�z�%��)A'3__pycache__/__init__.cpython-38.opt-1.pycnu�[���PKX[O�

*)3__pycache__/extension.cpython-38.opt-1.pycnu�[���PKX[xQ%udd(�D3__pycache__/version.cpython-38.opt-1.pycnu�[���PKX[�{<���-?a3__pycache__/archive_util.cpython-38.opt-1.pycnu�[���PKX[�
�,JJ(){3__pycache__/unixccompiler.cpython-38.pycnu�[���PKX[��))-˖3__pycache__/fancy_getopt.cpython-38.opt-1.pycnu�[���PKX[�z�%��#:�3__pycache__/__init__.cpython-38.pycnu�[���PKX[�v��
�
#�3__pycache__/dep_util.cpython-38.pycnu�[���PKX[
d�"~6~6��3__pycache__/cmd.cpython-38.pycnu�[���PKX[%E�,}}'�4__pycache__/bcppcompiler.cpython-38.pycnu�[���PKX[��cE-�4__pycache__/fancy_getopt.cpython-38.opt-2.pycnu�[���PKX[� ��)<4__pycache__/dep_util.cpython-38.opt-2.pycnu�[���PKX[�x�a
a
1kA4__pycache__/versionpredicate.cpython-38.opt-2.pycnu�[���PKX[@c.�
	
	-L4__pycache__/log.cpython-38.pycnu�[���PKX[�Z@+n/n/$�U4__pycache__/sysconfig.cpython-38.pycnu�[���PKX[|����&J�4__pycache__/spawn.cpython-38.opt-1.pycnu�[���PKX[0�oa����%��4__pycache__/dist.cpython-38.opt-1.pycnu�[���PKX[�ht+�9�9'� 5__pycache__/msvccompiler.cpython-38.pycnu�[���PKX[�uU]]-�Z5__pycache__/bcppcompiler.cpython-38.opt-2.pycnu�[���PKX[|���� =s5__pycache__/spawn.cpython-38.pycnu�[���PKX[4��!�
�
'��5__pycache__/config.cpython-38.opt-1.pycnu�[���PKX[
R4���$��5__pycache__/cmd.cpython-38.opt-2.pycnu�[���PKX[�6�m2m2.w�5__pycache__/_msvccompiler.cpython-38.opt-1.pycnu�[���PKX[LvV�00'B�5__pycache__/config.cpython-38.opt-2.pycnu�[���PKX[���~�!�!*��5__pycache__/cygwinccompiler.cpython-38.pycnu�[���PKX[�~��//$�6__pycache__/file_util.cpython-38.pycnu�[���PKX[U�u��$L.6__pycache__/log.cpython-38.opt-2.pycnu�[���PKX[�T� � *p76__pycache__/text_file.cpython-38.opt-1.pycnu�[���PKX[��ES��&�X6__pycache__/debug.cpython-38.opt-2.pycnu�[���PKX[kLjGsbsb%�Y6__pycache__/dist.cpython-38.opt-2.pycnu�[���PKX[�u�3&3&)��6__pycache__/filelist.cpython-38.opt-1.pycnu�[���PKX[�v��
�
)1�6__pycache__/dep_util.cpython-38.opt-1.pycnu�[���PKX[�
�,JJ.&�6__pycache__/unixccompiler.cpython-38.opt-1.pycnu�[���PKX[#T�^�%�%%�	7__pycache__/util.cpython-38.opt-2.pycnu�[���PKX[4#�Z��)�/7__pycache__/dir_util.cpython-38.opt-1.pycnu�[���PKX[��ES�� �F7__pycache__/debug.cpython-38.pycnu�[���PKX[����)�)'H7__pycache__/fancy_getopt.cpython-38.pycnu�[���PKX[�g:-D-D.
r7__pycache__/msvc9compiler.cpython-38.opt-1.pycnu�[���PKX[%E�,}}-��7__pycache__/bcppcompiler.cpython-38.opt-1.pycnu�[���PKX[�(���A�A*o�7__pycache__/ccompiler.cpython-38.opt-2.pycnu�[���PKX[
8$ow
w
)�8__pycache__/dir_util.cpython-38.opt-2.pycnu�[���PKX[��-���'{ 8__pycache__/errors.cpython-38.opt-1.pycnu�[���PKX[��$$1V58command/__pycache__/build_py.cpython-38.opt-2.pycnu�[���PKX[��(�Y8command/__pycache__/check.cpython-38.pycnu�[���PKX[��˄66.(m8command/__pycache__/clean.cpython-38.opt-1.pycnu�[���PKX[*���0�u8command/__pycache__/build_scripts.cpython-38.pycnu�[���PKX[��Z��3�8command/__pycache__/build_clib.cpython-38.opt-2.pycnu�[���PKX[�0�h�(�(+�8command/__pycache__/build_py.cpython-38.pycnu�[���PKX[1�f]??,X�8command/__pycache__/build_ext.cpython-38.pycnu�[���PKX[Q��N�'�')�9command/__pycache__/config.cpython-38.pycnu�[���PKX[}�Q
++(
)9command/__pycache__/build.cpython-38.pycnu�[���PKX[{�����1�89command/__pycache__/__init__.cpython-38.opt-2.pycnu�[���PKX[��o��4�:9command/__pycache__/install_lib.cpython-38.opt-2.pycnu�[���PKX[^�+!+!0�L9command/__pycache__/bdist_wininst.cpython-38.pycnu�[���PKX[�GX@@/Jn9command/__pycache__/upload.cpython-38.opt-1.pycnu�[���PKX[�ώ\\6�9command/__pycache__/build_scripts.cpython-38.opt-2.pycnu�[���PKX[~�LFLF2��9command/__pycache__/bdist_msi.cpython-38.opt-2.pycnu�[���PKX[�)"���-Y�9command/__pycache__/build_clib.cpython-38.pycnu�[���PKX[�G�N��9��9command/__pycache__/install_egg_info.cpython-38.opt-1.pycnu�[���PKX[K�xu� � 6��9command/__pycache__/bdist_wininst.cpython-38.opt-1.pycnu�[���PKX[��� �L�L,�:command/__pycache__/bdist_msi.cpython-38.pycnu�[���PKX[��fgf7f72�f:command/__pycache__/build_ext.cpython-38.opt-2.pycnu�[���PKX[hğ^ ^ 6��:command/__pycache__/bdist_wininst.cpython-38.opt-2.pycnu�[���PKX[1�f]??2��:command/__pycache__/build_ext.cpython-38.opt-1.pycnu�[���PKX[5S���5�:command/__pycache__/install_data.cpython-38.opt-1.pycnu�[���PKX[��W�5�5*J;command/__pycache__/install.cpython-38.pycnu�[���PKX[�]�L0L02W>;command/__pycache__/bdist_rpm.cpython-38.opt-1.pycnu�[���PKX[���bb5o;command/__pycache__/install_data.cpython-38.opt-2.pycnu�[���PKX[<<�

3�w;command/__pycache__/bdist_dumb.cpython-38.opt-1.pycnu�[���PKX[�G�N��39�;command/__pycache__/install_egg_info.cpython-38.pycnu�[���PKX[�̵ή�8R�;command/__pycache__/install_headers.cpython-38.opt-1.pycnu�[���PKX[Utw~�
�
.h�;command/__pycache__/bdist.cpython-38.opt-2.pycnu�[���PKX[���__2X�;command/__pycache__/install_scripts.cpython-38.pycnu�[���PKX[&�p�!!1�;command/__pycache__/__init__.cpython-38.opt-1.pycnu�[���PKX[5����/��;command/__pycache__/upload.cpython-38.opt-2.pycnu�[���PKX[��˄66(��;command/__pycache__/clean.cpython-38.pycnu�[���PKX[�)"���3J�;command/__pycache__/build_clib.cpython-38.opt-1.pycnu�[���PKX[&�p�!!+}�;command/__pycache__/__init__.cpython-38.pycnu�[���PKX[g[a&��4��;command/__pycache__/install_lib.cpython-38.opt-1.pycnu�[���PKX[*���6X�;command/__pycache__/build_scripts.cpython-38.opt-1.pycnu�[���PKX[�ZLiTT(�
<command/__pycache__/bdist.cpython-38.pycnu�[���PKX[!�
		9P<command/__pycache__/install_egg_info.cpython-38.opt-2.pycnu�[���PKX[��`*
/
/2�"<command/__pycache__/bdist_rpm.cpython-38.opt-2.pycnu�[���PKX[g[a&��.7R<command/__pycache__/install_lib.cpython-38.pycnu�[���PKX[���	!	!+�f<command/__pycache__/register.cpython-38.pycnu�[���PKX[�GX@@)�<command/__pycache__/upload.cpython-38.pycnu�[���PKX[�>�+�+.��<command/__pycache__/sdist.cpython-38.opt-2.pycnu�[���PKX[5S���/��<command/__pycache__/install_data.cpython-38.pycnu�[���PKX[
�nh��8��<command/__pycache__/install_scripts.cpython-38.opt-2.pycnu�[���PKX[��W�5�50�<command/__pycache__/install.cpython-38.opt-1.pycnu�[���PKX[��	V�8�8((=command/__pycache__/sdist.cpython-38.pycnu�[���PKX[�m%��1�106I=command/__pycache__/install.cpython-38.opt-2.pycnu�[���PKX[�̵ή�2*{=command/__pycache__/install_headers.cpython-38.pycnu�[���PKX[��7���.:�=command/__pycache__/check.cpython-38.opt-2.pycnu�[���PKX[}�Q
++.w�=command/__pycache__/build.cpython-38.opt-1.pycnu�[���PKX[��.�=command/__pycache__/check.cpython-38.opt-1.pycnu�[���PKX[�N�1u�=command/__pycache__/register.cpython-38.opt-2.pycnu�[���PKX[��x8��=command/__pycache__/install_headers.cpython-38.opt-2.pycnu�[���PKX[Q��N�'�'/^�=command/__pycache__/config.cpython-38.opt-1.pycnu�[���PKX[��?D��.�>command/__pycache__/clean.cpython-38.opt-2.pycnu�[���PKX[�
�QLQL2�	>command/__pycache__/bdist_msi.cpython-38.opt-1.pycnu�[���PKX[P�B
B
3�V>command/__pycache__/bdist_dumb.cpython-38.opt-2.pycnu�[���PKX[��Y��/Kd>command/__pycache__/config.cpython-38.opt-2.pycnu�[���PKX[�ZLiTT.�>command/__pycache__/bdist.cpython-38.opt-1.pycnu�[���PKX[���__8I�>command/__pycache__/install_scripts.cpython-38.opt-1.pycnu�[���PKX[������.�>command/__pycache__/build.cpython-38.opt-2.pycnu�[���PKX[/�~�0�0,F�>command/__pycache__/bdist_rpm.cpython-38.pycnu�[���PKX[��	V�8�8.0�>command/__pycache__/sdist.cpython-38.opt-1.pycnu�[���PKX[���	!	!1D?command/__pycache__/register.cpython-38.opt-1.pycnu�[���PKX[<<�

-�1?command/__pycache__/bdist_dumb.cpython-38.pycnu�[���PKX[�<�(�(1@?command/__pycache__/build_py.cpython-38.opt-1.pycnu�[���PK��^�/i?