ÿØÿà JFIF    ÿÛ „ ( %!1!%*+...983,7(-.- sdist.py000064400000044175152344523600006263 0ustar00"""distutils.command.sdist Implements the Distutils 'sdist' command (create a source distribution).""" __revision__ = "$Id$" import os import string import sys from glob import glob from warnings import warn from distutils.core import Command from distutils import dir_util, dep_util, file_util, archive_util from distutils.text_file import TextFile from distutils.errors import (DistutilsPlatformError, DistutilsOptionError, DistutilsTemplateError) from distutils.filelist import FileList from distutils import log from distutils.util import convert_path 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' } default_format = {'posix': 'gztar', 'nt': 'zip' } sub_commands = [('check', checking_metadata)] 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 = None 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') if self.formats is None: try: self.formats = [self.default_format[os.name]] except KeyError: raise DistutilsPlatformError, \ "don't know how to create source distributions " + \ "on platform %s" % os.name 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. """ standards = [('README', 'README.txt'), self.distribution.script_name] for fn in standards: if isinstance(fn, tuple): alts = fn got_it = 0 for fn in alts: if os.path.exists(fn): got_it = 1 self.filelist.append(fn) break if not got_it: self.warn("standard file not found: should have one of " + string.join(alts, ', ')) else: if os.path.exists(fn): self.filelist.append(fn) else: self.warn("standard file '%s' not found" % fn) optional = ['test/test*.py', 'setup.cfg'] for pattern in optional: files = filter(os.path.isfile, glob(pattern)) if files: self.filelist.extend(files) # 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)) # 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) if self.distribution.has_ext_modules(): build_ext = self.get_finalized_command('build_ext') self.filelist.extend(build_ext.get_source_files()) if self.distribution.has_c_libraries(): build_clib = self.get_finalized_command('build_clib') self.filelist.extend(build_clib.get_source_files()) 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 1: 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) # pruning out vcs directories # both separators are used under win32 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 2.7.1 and higher if not os.path.isfile(self.manifest): return False fp = open(self.manifest, 'rU') 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) manifest = open(self.manifest) for line in manifest: # ignore comments and blank lines line = line.strip() if line.startswith('#') or not line: continue self.filelist.append(line) manifest.close() 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 __pycache__/bdist_msi.cpython-36.opt-1.pyc000064400000046337152344523600014337 0ustar003 \@sdZddlZddlZddlmZddlmZddlmZddl m Z ddl m Z ddl mZdd lmZddlZdd lmZmZmZdd lmZmZmZmZGd d d eZGdddeZdS)z# Implements the bdist_msi command. N)Command) remove_tree)get_python_version) StrictVersion)DistutilsOptionError) get_platform)log)schemasequencetext) DirectoryFeatureDialogadd_datac@sFeZdZdZddZddZddd Zdd d ZdddZddZ dS)PyDialogzDialog 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||jddS)zbDialog(database, name, x, y, w, h, attributes, title, first, default, cancel, bitmap=true)$iHZ BottomLinerN)r__init__hlinew)selfargskwZrulerZbmwidthr3/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 )rtitlerrrr #szPyDialog.titleBackc Cs,|r d}nd}|j|d|jddd|||S)zAdd 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 associatedr"8) pushbuttonr)rr nextnameactiveflagsrrrback*sz PyDialog.backCancelc Cs,|r d}nd}|j|d|jddd|||S)zAdd 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,rrrcancel5szPyDialog.cancelNextc Cs,|r d}nd}|j|d|jddd|||S)zAdd 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)zAdd 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 associatedr%r&r'r#)r(intrr)rr*r r)ZxposrrrxbuttonKszPyDialog.xbuttonN)r!r")r.r")r0r") __name__ __module__ __qualname____doc__rr r-r/r)r4rrrrrs  rc@seZdZdZdCdddefdEdGdHdIdJdKdLdMg ZddddgZddd d!d"d#d$d%d&d'd(d)d*d+d,d-d.d/d0d1gZd2Zd3d4Z d5d6Z d7d8Z d9d:Z d;d<Z d=d>Zd?d@ZdAdBZdS)N bdist_msiz7create a Microsoft Installer (.msi) binary distribution bdist-dir=N1temporary directory for creating the distributionz plat-name=pz;platform name to embed in generated filenames (default: %s) keep-tempkz/keep the pseudo-installation tree around after z!creating the distribution archivetarget-version=z!require a specific python versionz on the target systemno-target-compilec/do not compile .py to .pyc on the target systemno-target-optimizeo;do not compile .py to .pyo (optimized) on the target system dist-dir=d-directory to put final built distributions in skip-build2skip rebuilding everything (for testing/debugging)install-script=Ubasename of installation script to be run after installation or before deinstallationpre-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.9XcCsFd|_d|_d|_d|_d|_d|_d|_d|_d|_d|_ d|_ dS)Nr) bdist_dir plat_name keep_tempZno_target_compileZno_target_optimizetarget_versiondist_dir skip_buildinstall_scriptpre_install_scriptversions)rrrrinitialize_options}szbdist_msi.initialize_optionscCs|jdd |jdkr2|jdj}tjj|d|_t}|j rP|j j rP||_|jr|jg|_ |j r|j j r|j|krt d|fn t|j|_ |jdd d |jrt d|jrx2|j jD]}|jtjj|krPqWt d|jd|_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_optionsrPget_finalized_command bdist_baseospathjoinrrS distributionhas_ext_modulesrXrUrlist all_versionsrWrVscriptsbasenameinstall_script_key)rr[Z short_versionZscriptrrrfinalize_optionss:        zbdist_msi.finalize_optionscCsz|js|jd|jddd}|j|_|j|_d|_|jd}d|_d|_|jj r|j }|spdt j dd}d |j |f}|jd}tjj|jd ||_tjd |j|jt jjdtjj|jd |jt jd=|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|j0r| j/d|j0f| rt1|j*d| |j2|j3|j4|j5|j*j6t7|jdr^d|j pJd|f}|jj8j/||j9svt:|j|j;ddS)Nbuildinstallr")Zreinit_subcommandsr install_libz%d.%dz.%s-%slibzinstalling to %sZPURELIBZUNKNOWNz%d.%d.%dz Python %s %sz Python %sZ DistVersionZ ARPCONTACTZARPURLINFOABOUTProperty dist_filesr9any)dry_run)| jd?d9d@d;dAd=dB| j d2d6d2dC} | j dDdEt|dF||||||d2d2d2 } | jdG| jd4d2dd5| jd6d7dd5| jd8d9d:d;dz [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 locationZEnableZShowZDisableZHiderrZ DiskCostDlgZOKz&{\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 VolumeListZVolumeCostListdiz{120}{70}{70}{70}{70}g?Z AdminInstallzGSelect whether to install [ProductName] for all users of this computer.zInstall for all usersZJUSTMEzInstall just for mez [ALLUSERS]zWhichUsers="ALL"z({\DlgFontBold8}[Progress1] [ProductName]#AzYPlease wait while the Installer [Progress2] [ProductName]. This may take several minutes.Z StatusLabelzStatus:Z ProgressBariz Progress doneZ SetProgressZProgressz)Welcome to the [ProductName] Setup WizardZBodyText?z:Select whether you want to repair or remove [ProductName].ZRepairRadioGrouplrz&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")rr)rr)rr)rr)rr)rr)rrrNr)rrrNr")rrrNr")rrrrr)rrr)rrr)rrr)rrr)rNr)rrr rrrr r-r/r)ZeventZcontrolrr(mappingr_rxrXrZ conditionr4Z radiogroupadd)rrxyrrr ZmodalZmodelessZtrack_disk_spaceZfatalrAZ user_exitZ exit_dialogZinuseerrorr/ZcostingZprepZseldlgorderrrZinstall_other_condZdont_install_other_condZcostZ whichusersgZprogressZmaintrrrrs                                                                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)rrZ base_namerrrrrys  z bdist_msi.get_installer_filename)r:Nr;Pkeep the pseudo-installation tree around after creating the distribution archive)r=r>r6require a specific python version on the target system)r?Nr)r@rArB)rCrDrE)rFrGrH)rINrJ)rKNrL)rMNrN)r5r6r7Z descriptionrZ user_optionsZboolean_optionsrbrrYrfrwrrrrryrrrrr9SsR    ([66&@r9)r8rsr\Zdistutils.corerZdistutils.dir_utilrZdistutils.sysconfigrZdistutils.versionrZdistutils.errorsrZdistutils.utilrZ distutilsrrr r r r r rrrr9rrrrs       >__pycache__/__init__.cpython-36.opt-2.pyc000064400000000652152344523600014110 0ustar003 \@s.dddddddddd d d d d dddddgZdS)ZbuildZbuild_pyZ build_extZ build_clibZ build_scriptsZcleanZinstallZ install_libZinstall_headersZinstall_scriptsZ install_dataZsdistregisterZbdistZ bdist_dumbZ bdist_rpmZ bdist_wininstZcheckZuploadN)__all__rr2/usr/lib64/python3.6/distutils/command/__init__.pys$__pycache__/install_egg_info.cpython-36.pyc000064400000005651152344523600014720 0ustar003 \+ @sddZddlmZddlmZmZddlZddlZddlZGdddeZ ddZ d d Z d d Z dS) zdistutils.command.install_egg_info Implements the Distutils 'install_egg_info' command, for installing a package's PKG-INFO metadata.)Command)logdir_utilNc@s:eZdZdZdZdgZddZdd 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=ddirectory to install tocCs d|_dS)N) install_dir)selfr :/usr/lib64/python3.6/distutils/command/install_egg_info.pyinitialize_optionssz#install_egg_info.initialize_optionscCsb|jdddtt|jjtt|jjftjdd}t j j |j ||_ |j g|_dS)NZ install_libr z%s-%s-py%d.%d.egg-info)r r )Zset_undefined_options to_filename safe_name distributionZget_name safe_versionZ get_versionsys version_infoospathjoinr targetoutputs)r basenamer r r finalize_optionss z!install_egg_info.finalize_optionsc Cs|j}tjj|r2tjj| r2tj||jdnNtjj|rX|j tj |jfd|n(tjj|j s|j tj |j fd|j t jd||jst|ddd}|jjj|WdQRXdS)N)dry_runz Removing z Creating z Writing %swzUTF-8)encoding)rrrisdirislinkrZ remove_treerexistsZexecuteunlinkr makedirsrinfoopenrZmetadataZwrite_pkg_file)r rfr r r run s   zinstall_egg_info.runcCs|jS)N)r)r r r r get_outputs.szinstall_egg_info.get_outputsN)rrr) __name__ __module__ __qualname____doc__Z descriptionZ user_optionsr rr'r(r r r r r s rcCstjdd|S)zConvert an arbitrary string to a standard distribution name Any runs of non-alphanumeric/. characters are replaced with a single '-'. z[^A-Za-z0-9.]+-)resub)namer r r r6srcCs|jdd}tjdd|S)zConvert 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/)versionr r r r>s rcCs |jddS)z|Convert a project or version name to its filename-escaped form Any '-' characters are currently replaced with '_'. r-_)r3)r0r r r rHsr) r,Z distutils.cmdrZ distutilsrrrrr.rrrrr r r r s + __pycache__/clean.cpython-36.opt-1.pyc000064400000004203152344523600013426 0ustar003 \ @sDdZddlZddlmZddlmZddlmZGdddeZdS)zBdistutils.command.clean Implements the Distutils 'clean' command.N)Command) remove_tree)logc@s>eZdZdZddddddgZdgZddZddZddZdS)cleanz-clean up temporary files from 'build' command build-base=b2base build directory (default: 'build.build-base') build-lib=Ns    __pycache__/bdist_rpm.cpython-36.opt-1.pyc000064400000031314152344523600014332 0ustar003 \T@sdZddlZddlZddlZddlmZddlmZddlm Z ddl m Z ddl Tddl mZdd lmZGd d d eZdS) 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+@seZdZdZdgdhdidjdkdldmdndodpdqdrdsdtdudvdwdxdydzd{d|d}d~dddddddddddddddddg)Zd4d9d=d2dUgZd4d9d=dXZdYdZZd[d\Zd]d^Z d_d`Z dadbZ dcddZ dedfZ 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=dDdirectory 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-pythonLhard-code the exact path to the current Python interpreter in the .spec file spec-onlyonly regenerate spec file source-onlyonly generate source RPM binary-onlyonly generate binary RPM use-bzip27use bzip2 instead of gzip to create source distributiondistribution-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 numberserial=RPM serial numbervendor=aRPM "vendor" (eg. "Joe Blow ") [default: maintainer or author from setup script] packager=BRPM packager (eg. "Jane Doe ") [default: vendor] doc-files=6list of documentation files (space or comma-separated) changelog= RPM changelogicon=name of icon file provides=%capabilities provided by this package requires=%capabilities required by this package conflicts=-capabilities which conflict with this packagebuild-requires=+capabilities required to build this package obsoletes=*capabilities made obsolete by this package no-autoreq+do not automatically calculate dependencies keep-tempk"don't clean up RPM build directory no-keep-temp&clean up RPM build directory [default]use-rpm-opt-flags8compile with RPM_OPT_FLAGS when building from source RPMno-rpm-opt-flags&do not pass any RPM CFLAGS to compiler rpm3-mode"RPM 3 compatibility mode (default) rpm2-modeRPM 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 buildinginstall-script=6Specify a script for the INSTALL phase of RPM building post-install=;Specify a script for the post-INSTALL phase of RPM buildingpre-uninstall=rnroREADME README.txtrk1rlrirprqrrrsrtrurvrwrxryrzr|r}r~rrr)rr)Z ensure_stringrZ get_contactZget_contact_emailZensure_string_list isinstancerolistrrexistsappend_format_changelogrpZensure_filename)rZreadmerrrrs>                         zbdist_rpm.finalize_package_datac Cstrsz-bdist_rpm._make_spec_file..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: %sVendorPackagerProvidesRequires 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}ZbuildrsZinstallrtcleanrurm -rf $RPM_BUILD_ROOT verifyscriptrvprerwpostrxpreunrypostunrz%rz%files -f INSTALLED_FILESz%defattr(-,root,root)z%doc z %changelog)rrrrrr)r{rrr)rrur)rrvN)rrwN)rrxN)rryN)rrzN)'rrZ get_versionreplacerkZget_description subprocessZ getoutputr splitlinesrrrhZ get_licenserjrrgetattrlowerrrZget_urlrirrqrrrrZget_long_descriptionrcrargvropenreadrrorp)rZ spec_fileZ vendor_hookZproblemZfixedZ fixed_hookZfieldvalZdef_setup_callZ def_buildZ install_cmdZscript_optionsZrpm_optattrdefaultrrrrs                   zbdist_rpm._make_spec_filecCs|s|Sg}x`|jjdD]N}|j}|ddkrD|jd|gq|ddkr\|j|q|jd|qW|ds||d=|S)zKFormat the changelog correctly and convert it to a list of strings rrrrrz )rrrr)rrpZ new_changelogrrrrr3s   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__Z descriptionZ user_optionsZboolean_optionsZ negative_optrrrrrrrrrrrr s--)r )__doc__rrrZdistutils.corerZdistutils.debugrZdistutils.utilrZdistutils.file_utilrZdistutils.errorsZdistutils.sysconfigrZ distutilsrr rrrrs      __pycache__/install_scripts.cpython-36.pyc000064400000004216152344523600014626 0ustar003 \@sDdZddlZddlmZddlmZddlmZGdddeZdS)zudistutils.command.install_scripts Implements the Distutils 'install_scripts' command, for installing Python scripts.N)Command)log)ST_MODEc@sLeZdZdZddddgZdd gZddZddZddZddZ ddZ d S)install_scriptsz%install scripts (Python or otherwise) install-dir=ddirectory to install scripts to build-dir=b'build directory (where to install from)forcef-force installation (overwrite existing files) skip-buildNskip the build stepscCsd|_d|_d|_d|_dS)Nr) install_dirr build_dir skip_build)selfr9/usr/lib64/python3.6/distutils/command/install_scripts.pyinitialize_optionssz"install_scripts.initialize_optionscCs |jdd |jdd d d dS) NZbuild build_scriptsrZinstallrrr r)rr)rr)r r )rr)Zset_undefined_options)rrrrfinalize_options!s  z install_scripts.finalize_optionscCs|js|jd|j|j|j|_tjdkrxT|jD]H}|j rNt j d|q6tj |t dBd@}t j d||tj||q6WdS)Nrposixzchanging mode of %simizchanging mode of %s to %o)rZ run_commandZ copy_treerroutfilesosname get_outputsZdry_runrinfostatrchmod)rfilemoderrrrun)s  zinstall_scripts.runcCs |jjp gS)N)Z distributionscripts)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__Z descriptionZ user_optionsZboolean_optionsrrr$r&rrrrrrsr) __doc__rZdistutils.corerZ distutilsrr rrrrrrs    __pycache__/clean.cpython-36.pyc000064400000004203152344523600012467 0ustar003 \ @sDdZddlZddlmZddlmZddlmZGdddeZdS)zBdistutils.command.clean Implements the Distutils 'clean' command.N)Command) remove_tree)logc@s>eZdZdZddddddgZdgZddZddZddZdS)cleanz-clean up temporary files from 'build' command build-base=b2base build directory (default: 'build.build-base') build-lib=Ns    __pycache__/install_scripts.cpython-36.opt-1.pyc000064400000004216152344523600015565 0ustar003 \@sDdZddlZddlmZddlmZddlmZGdddeZdS)zudistutils.command.install_scripts Implements the Distutils 'install_scripts' command, for installing Python scripts.N)Command)log)ST_MODEc@sLeZdZdZddddgZdd gZddZddZddZddZ ddZ d S)install_scriptsz%install scripts (Python or otherwise) install-dir=ddirectory to install scripts to build-dir=b'build directory (where to install from)forcef-force installation (overwrite existing files) skip-buildNskip the build stepscCsd|_d|_d|_d|_dS)Nr) install_dirr build_dir skip_build)selfr9/usr/lib64/python3.6/distutils/command/install_scripts.pyinitialize_optionssz"install_scripts.initialize_optionscCs |jdd |jdd d d dS) NZbuild build_scriptsrZinstallrrr r)rr)rr)r r )rr)Zset_undefined_options)rrrrfinalize_options!s  z install_scripts.finalize_optionscCs|js|jd|j|j|j|_tjdkrxT|jD]H}|j rNt j d|q6tj |t dBd@}t j d||tj||q6WdS)Nrposixzchanging mode of %simizchanging mode of %s to %o)rZ run_commandZ copy_treerroutfilesosname get_outputsZdry_runrinfostatrchmod)rfilemoderrrrun)s  zinstall_scripts.runcCs |jjp gS)N)Z distributionscripts)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__Z descriptionZ user_optionsZboolean_optionsrrr$r&rrrrrrsr) __doc__rZdistutils.corerZ distutilsrr rrrrrrs    __pycache__/bdist_dumb.cpython-36.pyc000064400000007237152344523600013533 0ustar003 \1@shdZddlZddlmZddlmZddlmZmZddl Tddl m Z ddl m Z Gd d d eZdS) zdistutils.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_treeensure_relative)*)get_python_version)logc @s^eZdZdZd%dddefd&d(d)d*d+d,d-g Zd ddgZdddZdd Zd!d"Z d#d$Z dS). bdist_dumbz"create a "dumb" built distribution bdist-dir=d1temporary 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-tempkz/keep the pseudo-installation tree around after z!creating the distribution archive dist-dir=-directory to put final built distributions in skip-buildN2skip rebuilding everything (for testing/debugging)relative7build the archive using relative paths (default: false)owner=u@Owner name used when creating a tar file [default: current user]group=gAGroup name used when creating a tar file [default: current group]Zgztarzip)posixntcCs:d|_d|_d|_d|_d|_d|_d|_d|_d|_dS)Nr) bdist_dir plat_nameformat keep_tempdist_dir skip_buildrownergroup)selfr+4/usr/lib64/python3.6/distutils/command/bdist_dumb.pyinitialize_options2szbdist_dumb.initialize_optionscCsz|jdkr&|jdj}tjj|d|_|jdkrfy|jtj|_Wn"t k rdt dtjYnX|j dddd 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_baseospathjoinr$default_formatnameKeyErrorDistutilsPlatformErrorZset_undefined_options)r*r.r+r+r,finalize_options=s   zbdist_dumb.finalize_optionscCs(|js|jd|jddd}|j|_|j|_d|_tjd|j|jdd|jj |j f}t j j |j|}|js~|j}nJ|jjr|j|jkrtdt|jt|jfnt j j |jt|j}|j||j||j|jd }|jjrt}nd }|jjjd ||f|js$t|j|jd dS) NZbuildinstall)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'Z run_commandZreinitialize_commandr"rootZwarn_dirrinfoZ distributionZ get_fullnamer#r/r0r1r&rZhas_ext_modulesZ install_baseZinstall_platbaser5reprrZ make_archiver$r(r)rZ dist_filesappendr%rr:)r*r7Zarchive_basenameZpseudoinstall_rootZ archive_rootfilenameZ pyversionr+r+r,runOs>          zbdist_dumb.run)r r r )rrrPkeep the pseudo-installation tree around after creating the distribution archive)rrrA)rr r)rNr)rNr)rrr)rrr) __name__ __module__ __qualname__Z descriptionrZ 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,s    __pycache__/install_data.cpython-36.pyc000064400000004424152344523600014051 0ustar003 \ @s<dZddlZddlmZddlmZmZGdddeZdS)zdistutils.command.install_data Implements the Distutils 'install_data' command, for installing platform-independent data files.N)Command) change_root convert_pathc@sHeZdZdZdddgZdgZd d Zd dZddZddZ ddZ dS) install_datazinstall data files install-dir=dIbase directory for installing data files (default: installation base dir)root=Ns __pycache__/register.cpython-36.opt-2.pyc000064400000015753152344523600014205 0ustar003 \-@s`ddlZddlZddlZddlZddlmZddlmZddl Tddl m Z GdddeZ dS)N)warn) PyPIRCCommand)*)logc@seZdZdZejdd gZejdddgZdd d fgZd d Zd dZ ddZ ddZ ddZ ddZ ddZddZddZd!ddZdS)"registerz7register the distribution with the Python package indexlist-classifiersN list the valid Trove classifiersstrictBWill stop the registering if the meta-data are not fully compliantverifycheckcCsdS)NT)selfr r 2/usr/lib64/python3.6/distutils/command/register.pyszregister.cCstj|d|_d|_dS)Nr)rinitialize_optionslist_classifiersr )rr r rrs zregister.initialize_optionscCs*tj|d|jfdd}||jjd<dS)Nr)r restructuredtextr )rr)rfinalize_optionsr distributionZcommand_options)rZ check_optionsr r rr$s zregister.finalize_optionscCsX|j|jx|jD]}|j|qW|jr<|jn|jrL|jn|jdS)N) r _set_configZget_sub_commandsZ run_commandZdry_runverify_metadatar classifiers send_metadata)rZcmd_namer r rrun+s  z register.runcCs8tdt|jjd}|j|j|_d|_|jdS)Nzddistutils.command.register.check_metadata is deprecated, use the check command insteadr r)rPendingDeprecationWarningrZget_command_objZensure_finalizedr rr)rr r r rcheck_metadata:s zregister.check_metadatacCsz|j}|ikr@|d|_|d|_|d|_|d|_d|_n6|jd|jfkr^td|j|jdkrp|j|_d|_dS) Nusernamepassword repositoryrealmTZpypiz%s not found in .pypircF)Z _read_pypircrrr r! has_configZDEFAULT_REPOSITORY ValueError)rconfigr r rrDs     zregister._set_configcCs*|jd}tjj|}tj|j|dS)Nz?:action=list_classifiers)r urllibrequestZurlopenrinfo_read_pypi_response)rZurlZresponser r rrUs  zregister.classifierscCs&|j|jd\}}tjd||dS)Nr zServer response (%s): %s)post_to_serverbuild_post_datarr')rcoderesultr r rr\szregister.verify_metadatac Cs|jrd}|j}|j}n d}d}}dj}x:||krf|jdtjt}|sTd}q.||kr.tdq.W|dkr|x|std}qtWx|st j d}qWt j j }t j j|jd }|j|j||||j|jd |\}}|jd ||ftj|d kr|jr||j_nj|jd tj|jd|jtjd}x&|jdkr\td}|s8d}q8W|jdkr|j||n|dkrddi} d| d<| d<| d<d| d<x| dstd| d<qWx| d| dkrNx| dst j d| d<qWx| dst j d| d<qW| d| dkrd| d<d| d<tdqWx| dsltd| d<qRW|j| \}}|d krtjd ||ntjdtjdnT|d krdd!i} d| d<x| dstd"| d<qW|j| \}}tjd ||dS)#N1xz1 2 3 4zWe 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): %szAI can store your PyPI login so future submissions will be faster.z (the login will be stored in %s)XZynzSave your login (y/N)?ny2z:actionusernamerZemailZconfirmz 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"rrsplitannouncerINFOinputprintgetpassr%r&ZHTTPPasswordMgrparseZurlparser Z add_passwordr!r)r*rZ _get_rc_filelowerZ _store_pypircr') rZchoicerrchoicesauthhostr+r,datar r rrcs                     zregister.send_metadatacCs|jj}|d|j|j|j|j|j|j|j|j |j |j |j |j |j|j|jd}|ds|ds|drd|d<|S)Nz1.0)z:actionmetadata_versionr6versionZsummaryZ home_pageZauthorZ author_emaillicense descriptionkeywordsplatformrZ download_urlprovidesrequires obsoletesrJrKrLz1.1rD)rZmetadataZget_nameZ get_versionZget_descriptionZget_urlZ get_contactZget_contact_emailZ get_licenceZget_long_descriptionZ get_keywordsZ get_platformsZget_classifiersZget_download_urlZ get_providesZ get_requiresZ get_obsoletes)ractionmetarCr r rr*s* zregister.build_post_datacCsd|kr$|jd|d|jftjd}d|}|d}tj}x|jD]\}}t|tgtffkrp|g}xZ|D]R}t|}|j ||j d||j d|j ||rv|dd krv|j d qvWqJW|j ||j d |j j d }d |tt |d } t jj|j|| } t jjt jj|d} d}y| j| } Wnxt jjk r} z$|jrl| jj}| j| jf} WYdd} ~ XnJt jjk r} zdt| f} WYdd} ~ XnX|jr|j| }d} |jrd 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/ir0OK-K)r0rQ)r9r rr:ioStringIOitemstypestrwritegetvalueencodelenr%r&ZRequestZ build_openerZHTTPBasicAuthHandleropenerrorZ HTTPErrorZ show_responsefpreadr+msgZURLErrorr(join)rrCrAboundaryZ sep_boundaryZ end_boundaryZbodykeyvalueZheadersZreqopenerr,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.requestwarningsrZdistutils.corerZdistutils.errorsZ distutilsrrr r r rs   __pycache__/bdist_dumb.cpython-36.opt-2.pyc000064400000006727152344523600014476 0ustar003 \1@sdddlZddlmZddlmZddlmZmZddlTddl m Z ddl m Z Gdd d eZ dS) N)Command) get_platform) remove_treeensure_relative)*)get_python_version)logc @s^eZdZdZd%dddefd&d(d)d*d+d,d-g Zd ddgZdddZdd Zd!d"Z d#d$Z dS). bdist_dumbz"create a "dumb" built distribution bdist-dir=d1temporary 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-tempkz/keep the pseudo-installation tree around after z!creating the distribution archive dist-dir=-directory to put final built distributions in skip-buildN2skip rebuilding everything (for testing/debugging)relative7build the archive using relative paths (default: false)owner=u@Owner name used when creating a tar file [default: current user]group=gAGroup name used when creating a tar file [default: current group]Zgztarzip)posixntcCs:d|_d|_d|_d|_d|_d|_d|_d|_d|_dS)Nr) bdist_dir plat_nameformat keep_tempdist_dir skip_buildrownergroup)selfr+4/usr/lib64/python3.6/distutils/command/bdist_dumb.pyinitialize_options2szbdist_dumb.initialize_optionscCsz|jdkr&|jdj}tjj|d|_|jdkrfy|jtj|_Wn"t k rdt dtjYnX|j dddd 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_baseospathjoinr$default_formatnameKeyErrorDistutilsPlatformErrorZset_undefined_options)r*r.r+r+r,finalize_options=s   zbdist_dumb.finalize_optionscCs(|js|jd|jddd}|j|_|j|_d|_tjd|j|jdd|jj |j f}t j j |j|}|js~|j}nJ|jjr|j|jkrtdt|jt|jfnt j j |jt|j}|j||j||j|jd }|jjrt}nd }|jjjd ||f|js$t|j|jd dS) NZbuildinstall)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'Z run_commandZreinitialize_commandr"rootZwarn_dirrinfoZ distributionZ get_fullnamer#r/r0r1r&rZhas_ext_modulesZ install_baseZinstall_platbaser5reprrZ make_archiver$r(r)rZ dist_filesappendr%rr:)r*r7Zarchive_basenameZpseudoinstall_rootZ archive_rootfilenameZ pyversionr+r+r,runOs>          zbdist_dumb.run)r r r )rrrPkeep the pseudo-installation tree around after creating the distribution archive)rrrA)rr r)rNr)rNr)rrr)rrr) __name__ __module__ __qualname__Z descriptionrZ user_optionsZboolean_optionsr2r-r6r@r+r+r+r,r s6  r )r/Zdistutils.corerZdistutils.utilrZdistutils.dir_utilrrZdistutils.errorsZdistutils.sysconfigrZ distutilsrr r+r+r+r,s    __pycache__/install_egg_info.cpython-36.opt-1.pyc000064400000005651152344523600015657 0ustar003 \+ @sddZddlmZddlmZmZddlZddlZddlZGdddeZ ddZ d d Z d d Z dS) zdistutils.command.install_egg_info Implements the Distutils 'install_egg_info' command, for installing a package's PKG-INFO metadata.)Command)logdir_utilNc@s:eZdZdZdZdgZddZdd 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=ddirectory to install tocCs d|_dS)N) install_dir)selfr :/usr/lib64/python3.6/distutils/command/install_egg_info.pyinitialize_optionssz#install_egg_info.initialize_optionscCsb|jdddtt|jjtt|jjftjdd}t j j |j ||_ |j g|_dS)NZ install_libr z%s-%s-py%d.%d.egg-info)r r )Zset_undefined_options to_filename safe_name distributionZget_name safe_versionZ get_versionsys version_infoospathjoinr targetoutputs)r basenamer r r finalize_optionss z!install_egg_info.finalize_optionsc Cs|j}tjj|r2tjj| r2tj||jdnNtjj|rX|j tj |jfd|n(tjj|j s|j tj |j fd|j t jd||jst|ddd}|jjj|WdQRXdS)N)dry_runz Removing z Creating z Writing %swzUTF-8)encoding)rrrisdirislinkrZ remove_treerexistsZexecuteunlinkr makedirsrinfoopenrZmetadataZwrite_pkg_file)r rfr r r run s   zinstall_egg_info.runcCs|jS)N)r)r r r r get_outputs.szinstall_egg_info.get_outputsN)rrr) __name__ __module__ __qualname____doc__Z descriptionZ user_optionsr rr'r(r r r r r s rcCstjdd|S)zConvert an arbitrary string to a standard distribution name Any runs of non-alphanumeric/. characters are replaced with a single '-'. z[^A-Za-z0-9.]+-)resub)namer r r r6srcCs|jdd}tjdd|S)zConvert 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/)versionr r r r>s rcCs |jddS)z|Convert a project or version name to its filename-escaped form Any '-' characters are currently replaced with '_'. r-_)r3)r0r r r rHsr) r,Z distutils.cmdrZ distutilsrrrrr.rrrrr r r r s + __pycache__/bdist.cpython-36.opt-1.pyc000064400000007305152344523600013457 0ustar003 \@sHdZddlZddlmZddlTddlmZddZGdd d eZdS) zidistutils.command.bdist Implements the Distutils 'bdist' command (create a built [binary] distribution).N)Command)*) get_platformcCsTddlm}g}x,tjD]"}|jd|dtj|dfqW||}|jddS)zFPrint list of available formats (arguments to "--format" option). r) FancyGetoptzformats=Nz'List of available distribution formats:)Zdistutils.fancy_getoptrbdistformat_commandsappendformat_commandZ print_help)rformatsformatZpretty_printerr //usr/lib64/python3.6/distutils/command/bdist.py show_formats s   rc @seZdZdZd6dddefd7d8d9d:d;gZdgZdd defgZdd?d@dAdBdCdDdEd/ Z d0d1Z d2d3Zd4d5Zd S)Frz$create a built (binary) distribution bdist-base=b4temporary 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-build2skip rebuilding everything (for testing/debugging)owner=u@Owner name used when creating a tar file [default: current user]group=gAGroup name used when creating a tar file [default: current group]z help-formatsz$lists available distribution formats bdist_rpmgztarzip)posixntrpmbztarxztarztartarwininstmsiRPM distribution bdist_dumbgzip'ed tar filebzip2'ed tar filexz'ed tar filecompressed tar filetar file bdist_wininstWindows executable installerZIP file bdist_msiMicrosoft 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_buildgroupowner)selfr r rinitialize_optionsQszbdist.initialize_optionsc Cs|jdkr(|jrt|_n|jdj|_|jdkrT|jdj}tjj|d|j|_|j d|j dkry|j tj g|_ Wn"t k rtdtj YnX|jdkrd|_dS)NZbuildzbdist.r z;don't know how to create built distributions on platform %sZdist)r:r<rZget_finalized_commandr9 build_baseospathjoinZensure_string_listr default_formatnameKeyErrorZDistutilsPlatformErrorr;)r?rAr r rfinalize_optionsZs$       zbdist.finalize_optionsc Csg}xH|jD]>}y|j|j|dWq tk rHtd|Yq Xq Wxztt|jD]h}||}|j|}||jkr|j||_ |dkr|j |_ |j |_ |||ddkrd|_ |j |q^WdS)Nrzinvalid format '%s'r.r)r r r rGZDistutilsOptionErrorrangelenZreinitialize_commandno_format_optionr r>r=Z keep_tempZ run_command)r?Zcommandsr iZcmd_nameZsub_cmdr r rrunvs"    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__Z descriptionrZ user_optionsZboolean_optionsrZ help_optionsrKrErr r@rHrMr r r rrsJ    r) __doc__rBZdistutils.corerZdistutils.errorsZdistutils.utilrrrr r r rs    __pycache__/build_py.cpython-36.opt-2.pyc000064400000022042152344523600014155 0ustar003 \ C@szddlZddlZddlZddlmZddlmZddlTddlm Z m Z ddl m Z GdddeZ Gd d d e e ZdS) N)glob)Command)*) convert_path Mixin2to3)logc@seZdZdZd8d9d:d;dbuild_pyz5"build" pure Python modules (copy to build directory) build-lib=ddirectory to "build" (copy) tocompileccompile .py to .pyc no-compileN!don't compile .py files [default] optimize=Olalso compile with optimization: -O1 for "python -O", -O2 for "python -OO", and -O0 to disable [default: -O0]forcef2forcibly build everything (ignore file timestamps)cCs4d|_d|_d|_d|_d|_d|_d|_d|_dS)Nr) build_lib py_modulespackage package_data package_dirr optimizer)selfr2/usr/lib64/python3.6/distutils/command/build_py.pyinitialize_options szbuild_py.initialize_optionsc Cs|jddd|jj|_|jj|_|jj|_i|_|jjrbx&|jjjD]\}}t||j|<qHW|j|_ t |j t syt |j |_ Wn t tfk rtdYnXdS)NZbuildrrzoptimize must be 0, 1, or 2)rr)rr)Zset_undefined_options distributionpackagesrrritemsrget_data_files data_files isinstancerint ValueErrorAssertionErrorZDistutilsOptionError)rnamepathrrrfinalize_options*s"      zbuild_py.finalize_optionscCs:|jr|j|jr$|j|j|j|jdddS)Nr)include_bytecode)r build_modulesr"build_packagesbuild_package_data byte_compile get_outputs)rrrrrunCs z build_py.runcsg}|js|Sxr|jD]h}|j|}tjj|jg|jd}d|rRt|dfdd|j||D}|j ||||fqW|S)N.rcsg|]}|dqS)Nr).0file)plenrr tsz+build_py.get_data_files..) r"get_package_dirosr+joinrsplitlenfind_data_filesappend)rdatarsrc_dir build_dir filenamesr)r8rr$as   zbuild_py.get_data_filescs`|jjdg|jj|g}gx:|D]2}ttjj|t|}jfdd|Dq&WS)Ncs$g|]}|krtjj|r|qSr)r;r+isfile)r6fn)filesrrr9s z,build_py.find_data_files..)rgetrr;r+r<rextend)rrrBZglobspatternZfilelistr)rHrr?ys  zbuild_py.find_data_filescCshd}x^|jD]T\}}}}xF|D]>}tjj||}|jtjj||jtjj|||ddqWq WdS)NF) preserve_mode)r%r;r+r<mkpathdirname copy_file)rZlastdirrrBrCrDfilenametargetrrrr0s zbuild_py.build_package_datac Cs|jd}|js&|r tjj|SdSng}x|ry|jdj|}Wn*tk rn|jd|d|d=Yq,X|jd|tjj|Sq,W|jjd}|dk r|jd||rtjj|SdSdS)Nr4rErr5rR)r=rr;r+r<KeyErrorinsertrI)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+existsZDistutilsFileErrorisdirr<rFrwarn)rrrinit_pyrrr check_packages    zbuild_py.check_packagecCs&tjj|stjd||dSdSdS)Nz!file %s (for module %s) not foundFT)r;r+rFrrX)rmodule module_filerrr check_modules zbuild_py.check_modulec Cs|j||ttjj|d}g}tjj|jj}xX|D]P}tjj|}||krztjjtjj |d}|j |||fq8|j d|q8W|S)Nz*.pyrz excluding %s) rZrr;r+r<abspathr!Z script_namesplitextbasenamer@Z debug_print) rrrZ module_filesmodulesZ setup_scriptrZabs_fr[rrrfind_package_moduless   zbuild_py.find_package_modulesc Csi}g}x|jD]}|jd}dj|dd}|d}y||\}}Wn"tk rj|j|}d}YnX|s|j||} |df||<| r|j|d| ftjj||d} |j || sq|j||| fqW|S)Nr4rr5__init__z.pyrRrR) rr=r<rSr:rZr@r;r+r]) rr"rar[r+rZ module_baserZcheckedrYr\rrr find_moduless*       zbuild_py.find_modulescCsRg}|jr|j|j|jrNx.|jD]$}|j|}|j||}|j|q&W|S)N)rrJrdr"r:rb)rrarrmrrrfind_all_moduless   zbuild_py.find_all_modulescCsdd|jDS)NcSsg|] }|dqS)r5rRr)r6r[rrrr9-sz-build_py.get_source_files..)rf)rrrrget_source_files,szbuild_py.get_source_filescCs$|gt||dg}tjj|S)Nz.py)listr;r+r<)rrCrr[Z outfile_pathrrrget_module_outfile/szbuild_py.get_module_outfiler5cCs|j}g}xx|D]p\}}}|jd}|j|j||}|j||r|jr`|jtjj|dd|j dkr|jtjj||j dqW|dd|j D7}|S)Nr4rE) optimizationrcSs,g|]$\}}}}|D]}tjj||qqSr)r;r+r<)r6rrBrCrDrPrrrr9Cs z(build_py.get_outputs..) rfr=rirr@r importlibutilcache_from_sourcerr%)rr-raZoutputsrr[r\rPrrrr23s"       zbuild_py.get_outputscCsbt|tr|jd}nt|ttfs,td|j|j||}tj j |}|j ||j ||ddS)Nr4z:'package' must be a string (dot-separated), list, or tupler)rL) r&strr=rhtuple TypeErrorrirr;r+rNrMrO)rr[r\rZoutfiledirrrr 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_packagescCstjr|jddSddlm}|j}|dtjkr>|tj}|jrZ||d|j ||j d|j dkr||||j |j ||j ddS)Nz%byte-compiling is disabled, skipping.r)r1r5)rrprefixdry_runrR) sysdont_write_bytecoderXdistutils.utilr1rr;sepr rrtr)rrHr1rsrrrr1vs    zbuild_py.byte_compile)r r r )r r r)rNr)rrr)rrr)r5)__name__ __module__ __qualname__Z descriptionZ user_optionsZboolean_optionsZ negative_optr r,r3r$r?r0r:rZr]rbrdrfrgrir2rrr.r/r1rrrrrs8   '4  rc@seZdZddZddZdS) build_py_2to3cCsLg|_|jr|j|jr*|j|j|j|j|j|jdddS)Nr)r-) updated_filesrr.r"r/r0Zrun_2to3r1r2)rrrrr3s zbuild_py_2to3.runcCs,tj||||}|dr(|jj|d|S)Nr5r)rrrr}r@)rr[r\rresrrrrrszbuild_py_2to3.build_moduleN)ryrzr{r3rrrrrrr|sr|)r;importlib.utilrkrurZdistutils.corerZdistutils.errorsrwrrZ distutilsrrr|rrrrs   }__pycache__/install_headers.cpython-36.pyc000064400000003274152344523600014555 0ustar003 \@s$dZddlmZGdddeZdS)zdistutils.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 ZddZ ddZ dS)install_headerszinstall C/C++ header files install-dir=d$directory to install header files toforcef-force installation (overwrite existing files)cCsd|_d|_g|_dS)Nr) install_dirroutfiles)selfr 9/usr/lib64/python3.6/distutils/command/install_headers.pyinitialize_optionssz"install_headers.initialize_optionscCs|jddddS)NZinstallrr r)rr )rr)Zset_undefined_options)r r r rfinalize_optionssz install_headers.finalize_optionscCsL|jj}|sdS|j|jx*|D]"}|j||j\}}|jj|q"WdS)N) distributionheadersZmkpathr Z copy_filer append)r rheaderout_r r rrun!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__Z descriptionZ user_optionsZboolean_optionsrrrrrr r r rr s rN)__doc__Zdistutils.corerrr r r rs __pycache__/install.cpython-36.opt-2.pyc000064400000031574152344523600014026 0ustar003 _Vjj@sddlZddlZddlmZddlmZddlmZddlm Z ddl m Z ddl m Z ddlmZmZmZdd lmZdd l mZdd lmZdd lmZd ZddddddZddddddddddddedZerdddddded<ddd d!dded"<d*ZGd(d)d)eZdS)+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)purelibplatlibheadersscriptsdataz/$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_homentz $usersitez4$userbase/Python$py_version_nodot/Include/$dist_namez)$userbase/Python$py_version_nodot/Scriptsz $userbasent_userz=$userbase/include/python$py_version_short$abiflags/$dist_namez $userbase/bin unix_userrrrrrc@s:eZdZdZd_d`dadbdddedfdgdidjdkdldmdndodpdqdrgZdd%d(gZer`ejd,dd-efejd,d diZ d.d/Z d0d1Z d2d3Z d4d5Z d6d7Zd8d9Zd:d;Zdd?Zd@dAZdBdCZdDdEZdFdGZdHdIZdJdKZdLdMZdNdOZdPdQZdRdSZdTdUZdVdWZdXefdYefdZefd[efd\d]d^fgZdS)sinstallz'install everything from build directoryprefix=Ninstallation prefix exec-prefix=.(Unix only) prefix for platform-specific fileshome=+(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=|jD]2}|j|}x"|jD]}||kr&|j|q&WqW|jrl|jrl|jtjj|j |jd|S)Nz.pth) rget_finalized_commandrappendrrQrhr}r~r|)rWrrcmdrrXrXrYrbs  zinstall.get_outputscCs2g}x(|jD]}|j|}|j|jqW|S)N)rrextend get_inputs)rWZinputsrrrXrXrYrss  zinstall.get_inputscCs|jjp|jjS)N)rrZhas_pure_modulesZhas_ext_modules)rWrXrXrYhas_libs zinstall.has_libcCs |jjS)N)rr has_headers)rWrXrXrYrszinstall.has_headerscCs |jjS)N)rr has_scripts)rWrXrXrYrszinstall.has_scriptscCs |jjS)N)rrZhas_data_files)rWrXrXrYhas_dataszinstall.has_datarJrIrKrLZinstall_egg_infocCsdS)NTrX)rWrXrXrYszinstall.)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__Z descriptionrZboolean_optionsrurrrrZrrkrlrmrrrvrxrzr{rryrrrrrrrrZ sub_commandsrXrXrXrYrIs   N3  " , r)rrrrr)rnrhZ distutilsrZdistutils.corerZdistutils.debugrZdistutils.sysconfigrZdistutils.errorsrZdistutils.file_utilrZdistutils.utilrr r r r Zsiter rruZWINDOWS_SCHEMErrrrXrXrXrYsT            __pycache__/sdist.cpython-36.pyc000064400000031465152344523600012545 0ustar003 \E@sdZddlZddlZddlTddlmZddlmZddlmZddl m Z m Z m Z m Z ddlmZddlTdd lmZdd l mZdd lmZd d ZGdddeZdS)zadistutils.command.sdist Implements the Distutils 'sdist' command (create a source distribution).N)*)glob)warn)Command)dir_utildep_util file_util archive_util)TextFile)FileList)log) convert_pathcCsdddlm}ddlm}g}x,|jD] }|jd|d||dfq&W|j||jddS)zoPrint all possible values for the 'formats' option (used by the "--help-formats" command-line option). r) FancyGetopt)ARCHIVE_FORMATSzformats=Nz.List of available source distribution formats:)Zdistutils.fancy_getoptrZdistutils.archive_utilrkeysappendsortZ print_help)rrformatsformatr//usr/lib64/python3.6/distutils/command/sdist.py show_formatss   rc@seZdZdZddZdJdKdLdMdNdOdPdQdRdTdUdVdWdXgZd ddddd"gZd*d d+efgZd dd,Z d-efgZ d.d/Z d0d1Z d2d3Z d4d5Zd6d7Zd8d9Zd:d;Zdd?Zd@dAZdBdCZdDdEZdFdGZdHdIZd S)Ysdistz6create 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)selfrrrchecking_metadata%szsdist.checking_metadata template=t5name of manifest template file [default: MANIFEST.in] manifest=m)name of manifest file [default: MANIFEST] use-defaultsNRinclude the default file set in the manifest [default; disable with --no-defaults] no-defaults"don't include the default file setprunespecifically 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-onlyoEjust regenerate the manifest and then stop (implies --force-manifest)force-manifestfkforcibly regenerate the manifest and carry on as usual. Deprecated: now the manifest is always regenerated.formats=6formats for source distribution (comma-separated list) keep-tempkz1keep the distribution tree around after creating zarchive file(s) dist-dir=dFdirectory 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=gAGroup name used when creating a tar file [default: current group]z help-formatsz#list available distribution formats)z no-defaultszno-prunecheckcCsTd|_d|_d|_d|_d|_d|_dg|_d|_d|_d|_ d|_ d|_ d|_ dS)NrZgztar) templatemanifest use_defaultsr' manifest_onlyZforce_manifestr keep_tempdist_dir archive_filesrownergroup)rrrrinitialize_options`szsdist.initialize_optionscCsZ|jdkrd|_|jdkr d|_|jdtj|j}|rFtd||jdkrVd|_dS)NZMANIFESTz MANIFEST.inrzunknown archive format '%s'Zdist)rCrBZensure_string_listr Zcheck_archive_formatsrZDistutilsOptionErrorrG)rZ bad_formatrrrfinalize_optionsws      zsdist.finalize_optionscCsBt|_x|jD]}|j|qW|j|jr6dS|jdS)N)r filelistZget_sub_commandsZ run_command get_file_listrEmake_distribution)rZcmd_namerrrrunsz sdist.runcCs*tdt|jjd}|j|jdS)zDeprecated API.zadistutils.command.sdist.check_metadata is deprecated, use the check command insteadr@N)rPendingDeprecationWarning distributionZget_command_objZensure_finalizedrP)rr@rrrcheck_metadatas  zsdist.check_metadatacCstjj|j}| r<|jr<|j|jj|jjdS|sP|j d|j|jj |j rh|j |rt|j |jr|j|jj|jj|jdS)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))ospathisfilerB_manifest_is_not_generated read_manifestrMrZremove_duplicatesrfindallrD add_defaults read_templater'prune_file_listwrite_manifest)rZtemplate_existsrrrrNs(      zsdist.get_file_listcCs2d|jjg}x|D]}t|trn|}d}x*|D]"}tjj|r.d}|jj|Pq.W|s|j ddj |qtjj|r|jj|q|j d|qWdd g}x*|D]"}t tjj t |}|jj|qW|jd }|jjr|jj|jx>|jD]4\} } } } x$| D]} |jjtjj | | q WqW|jjrx||jjD]p}t|tr|t|}tjj |r|jj|n:|\}} x0| D](}t|}tjj |r|jj|qWqHW|jjr|jd }|jj|j|jjr|jd }|jj|j|jjr.|jd }|jj|jdS)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.cfgbuild_py build_ext build_clib build_scriptsN)r^r_)rRZ script_name isinstancetuplerTrUexistsrMrrjoinfilterrVrextendget_finalized_commandZhas_pure_modulesZget_source_filesZ data_filesZhas_data_filesstrr Zhas_ext_modulesZhas_c_librariesZ has_scripts)rZ standardsfnZaltsZgot_itZoptionalpatternfilesr`ZpkgZsrc_dirZ build_dir filenamesfilenameitemdirnamer/rarbrcrrrrZs\           "         zsdist.add_defaultscCstjd|jt|jddddddd}zlxf|j}|dkrr?)__name__ __module__ __qualname__Z descriptionrZ user_optionsZboolean_optionsrZ help_optionsZ negative_optZ sub_commandsrKrLrPrSrNrZr[r\r]rWrXrrOrrrrrr!sj  (P *r)__doc__rTr~typesrwarningsrZdistutils.corerZ distutilsrrrr Zdistutils.text_filer Zdistutils.errorsZdistutils.filelistr r Zdistutils.utilr rrrrrrs       __pycache__/bdist.cpython-36.opt-2.pyc000064400000007003152344523600013453 0ustar003 \@sDddlZddlmZddlTddlmZddZGdddeZdS) N)Command)*) get_platformcCsTddlm}g}x,tjD]"}|jd|dtj|dfqW||}|jddS)Nr) FancyGetoptzformats=z'List of available distribution formats:)Zdistutils.fancy_getoptrbdistformat_commandsappendformat_commandZ print_help)rformatsformatZpretty_printerr //usr/lib64/python3.6/distutils/command/bdist.py show_formats s   rc @seZdZdZd6dddefd7d8d9d:d;gZdgZdd defgZdd?d@dAdBdCdDdEd/ Z d0d1Z d2d3Zd4d5Zd S)Frz$create a built (binary) distribution bdist-base=b4temporary 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-build2skip rebuilding everything (for testing/debugging)owner=u@Owner name used when creating a tar file [default: current user]group=gAGroup name used when creating a tar file [default: current group]z help-formatsz$lists available distribution formats bdist_rpmgztarzip)posixntrpmbztarxztarztartarwininstmsiRPM distribution bdist_dumbgzip'ed tar filebzip2'ed tar filexz'ed tar filecompressed tar filetar file bdist_wininstWindows executable installerZIP file bdist_msiMicrosoft 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_buildgroupowner)selfr r rinitialize_optionsQszbdist.initialize_optionsc Cs|jdkr(|jrt|_n|jdj|_|jdkrT|jdj}tjj|d|j|_|j d|j dkry|j tj g|_ Wn"t k rtdtj YnX|jdkrd|_dS)NZbuildzbdist.r z;don't know how to create built distributions on platform %sZdist)r:r<rZget_finalized_commandr9 build_baseospathjoinZensure_string_listr default_formatnameKeyErrorZDistutilsPlatformErrorr;)r?rAr r rfinalize_optionsZs$       zbdist.finalize_optionsc Csg}xH|jD]>}y|j|j|dWq tk rHtd|Yq Xq Wxztt|jD]h}||}|j|}||jkr|j||_ |dkr|j |_ |j |_ |||ddkrd|_ |j |q^WdS)Nrzinvalid format '%s'r.r)r r r rGZDistutilsOptionErrorrangelenZreinitialize_commandno_format_optionr r>r=Z keep_tempZ run_command)r?Zcommandsr iZcmd_nameZsub_cmdr r rrunvs"    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__Z descriptionrZ user_optionsZboolean_optionsrZ help_optionsrKrErr r@rHrMr r r rrsJ    r)rBZdistutils.corerZdistutils.errorsZdistutils.utilrrrr r r rs    __pycache__/build.cpython-36.pyc000064400000007741152344523600012516 0ustar003 \t@sTdZddlZddlZddlmZddlmZddlmZddZ Gdd d eZ dS) zBdistutils.command.build Implements the Distutils 'build' command.N)Command)DistutilsOptionError) get_platformcCsddlm}|dS)Nr)show_compilers)Zdistutils.ccompilerr)rr//usr/lib64/python3.6/distutils/command/build.pyr s rc@seZdZdZd8d9d:ddddefd?d@dAdBdCg ZddgZd$dd%efgZd&d'Z d(d)Z d*d+Z d,d-Z d.d/Z d0d1Zd2d3Zd4e fd5e fd6efd7efgZdS)Dbuildz"build everything needed to install build-base=b base directory for build librarybuild-purelib=N2build directory for platform-neutral distributionsbuild-platlib=3build directory for platform-specific distributions build-lib=z9build directory for all distribution (defaults to either zbuild-purelib or build-platlibbuild-scripts=build directory for scripts build-temp=ttemporary build directoryz plat-name=pz6platform name to build for, if supported (default: %s) compiler=cspecify the compiler type parallel=jnumber of parallel build jobsdebugg;compile extensions and libraries with debugging informationforcef2forcibly build everything (ignore file timestamps) executable=e5specify 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 executableparallel)selfrrrinitialize_options8szbuild.initialize_optionsc CsZ|jdkrt|_ntjdkr&tdd|jftjdd}ttdrR|d7}|jdkrntj j |j d|_|j dkrtj j |j d||_ |j dkr|jjr|j |_ n|j|_ |jdkrtj j |j d||_|jdkrtj j |j d tjdd|_|jdkrtj jtj|_t|jtrVyt|j|_Wntk rTtd YnXdS) NntzW--plat-name only supported on Windows (try using './configure --help' on your platform)z .%s-%d.%dgettotalrefcountz-pydebuglibZtempz scripts-%d.%dzparallel should be an integer)r,rosnamersys version_infohasattrr'pathjoinr&r(r) distributionZ ext_modulesr*r+r-normpath isinstancer.strint ValueError)r/Zplat_specifierrrrfinalize_optionsHs<                zbuild.finalize_optionscCs x|jD]}|j|q WdS)N)Zget_sub_commandsZ run_command)r/Zcmd_namerrrrunsz build.runcCs |jjS)N)r<has_pure_modules)r/rrrrDszbuild.has_pure_modulescCs |jjS)N)r<has_c_libraries)r/rrrrEszbuild.has_c_librariescCs |jjS)N)r<has_ext_modules)r/rrrrFszbuild.has_ext_modulescCs |jjS)N)r< has_scripts)r/rrrrGszbuild.has_scriptsZbuild_pyZ build_clibZ build_extr+)r r r )r Nr )rNrWbuild 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__Z descriptionrZ user_optionsZboolean_optionsrZ help_optionsr0rBrCrDrErFrGZ sub_commandsrrrrrsR 8 r) __doc__r7r5Zdistutils.corerZdistutils.errorsrZdistutils.utilrrrrrrrs    __pycache__/check.cpython-36.opt-1.pyc000064400000012151152344523600013422 0ustar003 \x @sdZddlmZddlmZyTddlmZddlmZddl m Z ddl m Z ddl m Z Gd d d eZd ZWnek rd ZYnXGd ddeZdS)zCdistutils.command.check Implements the Distutils 'check' command. )Command)DistutilsSetupError)Reporter)Parser)frontend)nodes)StringIOc@seZdZd ddZddZdS) SilentReporterNrasciireplacec Cs"g|_tj||||||||dS)N)messagesr__init__)selfsource report_level halt_levelstreamdebugencoding error_handlerr//usr/lib64/python3.6/distutils/command/check.pyr szSilentReporter.__init__cOs6|jj||||ftj|f|||j|d|S)N)leveltype)r appendrsystem_messageZlevels)rrmessageZchildrenkwargsrrrrszSilentReporter.system_message)Nrr r )__name__ __module__ __qualname__r rrrrrr s r TFc@s`eZdZdZdZdddgZddd gZd d ZddZddZ ddZ ddZ ddZ ddZ dS)checkz6This command checks the meta-data of the package. z"perform some checks on the packagemetadatamVerify meta-datarestructuredtextrEChecks if long string meta-data syntax are reStructuredText-compliantstricts(Will exit with an error if a check failscCsd|_d|_d|_d|_dS)z Sets default values for options.rN)r%r"r( _warnings)rrrrinitialize_options1szcheck.initialize_optionscCsdS)Nr)rrrrfinalize_options8szcheck.finalize_optionscCs|jd7_tj||S)z*Counts the number of warnings that occurs.r+)r,rwarn)rmsgrrrr/;sz check.warncCsL|jr|j|jr0tr"|jn|jr0td|jrH|jdkrHtddS)zRuns the command.zThe docutils package is needed.rzPlease correct your package.N)r"check_metadatar% HAS_DOCUTILScheck_restructuredtextr(rr,)rrrrrun@s z check.runcCs|jj}g}x*dD]"}t||o(t||s|j|qW|rP|jddj||jrh|js|jdn"|j r|j s|jdn |jdd S)zEnsures 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. nameversionurlzmissing 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"hasattrgetattrrr/joinZauthorZ author_emailZ maintainerZmaintainer_email)rr"Zmissingattrrrrr1Ps$ 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_datagetr/)rdataZwarningr=rrrr3ns  zcheck.check_restructuredtextcCst}t}tjtfdj}d|_d|_d|_t||j |j |j |j |j |jd}tj|||d}|j|d y|j||Wn:tk r}z|jjd d|difWYdd}~XnX|jS) z8Returns warnings when the provided data doesn't compile.)Z componentsN)rrrr)rr+z!Could not finish the parsing: %s.r>r>)rrrZ OptionParserZget_default_valuesZ tab_widthZpep_referencesZrfc_referencesr rrZwarning_streamrZerror_encodingZerror_encoding_error_handlerrdocumentZ note_sourceparseAttributeErrorr r)rrA source_pathparserZsettingsZreporterrDerrrr?ys*  $zcheck._check_rst_dataN)r"r#r$)r%r&r')r(r)r*)rrr __doc__Z descriptionZ user_optionsZboolean_optionsr-r.r/r4r1r3r?rrrrr!$s  r!N)rJZdistutils.corerZdistutils.errorsrZdocutils.utilsrZdocutils.parsers.rstrZdocutilsrriorr r2 Exceptionr!rrrrs        __pycache__/sdist.cpython-36.opt-2.pyc000064400000023302152344523600013474 0ustar003 \E@sddlZddlZddlTddlmZddlmZddlmZddlm Z m Z m Z m Z ddl mZddlTddlmZdd lmZdd lmZd d ZGd ddeZdS)N)*)glob)warn)Command)dir_utildep_util file_util archive_util)TextFile)FileList)log) convert_pathcCsdddlm}ddlm}g}x,|jD] }|jd|d||dfq&W|j||jddS)Nr) FancyGetopt)ARCHIVE_FORMATSzformats=z.List of available source distribution formats:)Zdistutils.fancy_getoptrZdistutils.archive_utilrkeysappendsortZ print_help)rrformatsformatr//usr/lib64/python3.6/distutils/command/sdist.py show_formatss   rc@seZdZdZddZdJdKdLdMdNdOdPdQdRdTdUdVdWdXgZd ddddd"gZd*d d+efgZd dd,Z d-efgZ d.d/Z d0d1Z d2d3Z d4d5Zd6d7Zd8d9Zd:d;Zdd?Zd@dAZdBdCZdDdEZdFdGZdHdIZd S)Ysdistz6create a source distribution (tarball, zip file, etc.)cCs|jS)N)metadata_check)selfrrrchecking_metadata%szsdist.checking_metadata template=t5name of manifest template file [default: MANIFEST.in] manifest=m)name of manifest file [default: MANIFEST] use-defaultsNRinclude the default file set in the manifest [default; disable with --no-defaults] no-defaults"don't include the default file setprunespecifically 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-onlyoEjust regenerate the manifest and then stop (implies --force-manifest)force-manifestfkforcibly regenerate the manifest and carry on as usual. Deprecated: now the manifest is always regenerated.formats=6formats for source distribution (comma-separated list) keep-tempkz1keep the distribution tree around after creating zarchive file(s) dist-dir=dFdirectory 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=gAGroup name used when creating a tar file [default: current group]z help-formatsz#list available distribution formats)z no-defaultszno-prunecheckcCsTd|_d|_d|_d|_d|_d|_dg|_d|_d|_d|_ d|_ d|_ d|_ dS)NrZgztar) templatemanifest use_defaultsr' manifest_onlyZforce_manifestr keep_tempdist_dir archive_filesrownergroup)rrrrinitialize_options`szsdist.initialize_optionscCsZ|jdkrd|_|jdkr d|_|jdtj|j}|rFtd||jdkrVd|_dS)NZMANIFESTz MANIFEST.inrzunknown archive format '%s'Zdist)rCrBZensure_string_listr Zcheck_archive_formatsrZDistutilsOptionErrorrG)rZ bad_formatrrrfinalize_optionsws      zsdist.finalize_optionscCsBt|_x|jD]}|j|qW|j|jr6dS|jdS)N)r filelistZget_sub_commandsZ run_command get_file_listrEmake_distribution)rZcmd_namerrrrunsz sdist.runcCs*tdt|jjd}|j|jdS)Nzadistutils.command.sdist.check_metadata is deprecated, use the check command insteadr@)rPendingDeprecationWarning distributionZget_command_objZensure_finalizedrP)rr@rrrcheck_metadatas  zsdist.check_metadatacCstjj|j}| r<|jr<|j|jj|jjdS|sP|j d|j|jj |j rh|j |rt|j |jr|j|jj|jj|jdS)Nz&manifest template '%s' does not exist z(using default file list)z?manifest template '%s' does not exist (using default file list))ospathisfilerB_manifest_is_not_generated read_manifestrMrZremove_duplicatesrfindallrD add_defaults read_templater'prune_file_listwrite_manifest)rZtemplate_existsrrrrNs(      zsdist.get_file_listcCs2d|jjg}x|D]}t|trn|}d}x*|D]"}tjj|r.d}|jj|Pq.W|s|j ddj |qtjj|r|jj|q|j d|qWdd g}x*|D]"}t tjj t |}|jj|qW|jd }|jjr|jj|jx>|jD]4\} } } } x$| D]} |jjtjj | | q WqW|jjrx||jjD]p}t|tr|t|}tjj |r|jj|n:|\}} x0| D](}t|}tjj |r|jj|qWqHW|jjr|jd }|jj|j|jjr|jd }|jj|j|jjr.|jd }|jj|jdS)NREADME README.txtFTz,standard file not found: should have one of z, zstandard file '%s' not foundz test/test*.pyz setup.cfgbuild_py build_ext build_clib build_scripts)r^r_)rRZ script_name isinstancetuplerTrUexistsrMrrjoinfilterrVrextendget_finalized_commandZhas_pure_modulesZget_source_filesZ data_filesZhas_data_filesstrr Zhas_ext_modulesZhas_c_librariesZ has_scripts)rZ standardsfnZaltsZgot_itZoptionalpatternfilesr`ZpkgZsrc_dirZ build_dir filenamesfilenameitemdirnamer/rarbrcrrrrZs\           "         zsdist.add_defaultscCstjd|jt|jddddddd}zlxf|j}|dkrr?)__name__ __module__ __qualname__Z descriptionrZ user_optionsZboolean_optionsrZ help_optionsZ negative_optZ sub_commandsrKrLrPrSrNrZr[r\r]rWrXrrOrrrrrr!sj  (P *r)rTr~typesrwarningsrZdistutils.corerZ distutilsrrrr Zdistutils.text_filer Zdistutils.errorsZdistutils.filelistr r Zdistutils.utilr rrrrrrs       __pycache__/check.cpython-36.pyc000064400000012151152344523600012463 0ustar003 \x @sdZddlmZddlmZyTddlmZddlmZddl m Z ddl m Z ddl m Z Gd d d eZd ZWnek rd ZYnXGd ddeZdS)zCdistutils.command.check Implements the Distutils 'check' command. )Command)DistutilsSetupError)Reporter)Parser)frontend)nodes)StringIOc@seZdZd ddZddZdS) SilentReporterNrasciireplacec Cs"g|_tj||||||||dS)N)messagesr__init__)selfsource report_level halt_levelstreamdebugencoding error_handlerr//usr/lib64/python3.6/distutils/command/check.pyr szSilentReporter.__init__cOs6|jj||||ftj|f|||j|d|S)N)leveltype)r appendrsystem_messageZlevels)rrmessageZchildrenkwargsrrrrszSilentReporter.system_message)Nrr r )__name__ __module__ __qualname__r rrrrrr s r TFc@s`eZdZdZdZdddgZddd gZd d ZddZddZ ddZ ddZ ddZ ddZ dS)checkz6This command checks the meta-data of the package. z"perform some checks on the packagemetadatamVerify meta-datarestructuredtextrEChecks if long string meta-data syntax are reStructuredText-compliantstricts(Will exit with an error if a check failscCsd|_d|_d|_d|_dS)z Sets default values for options.rN)r%r"r( _warnings)rrrrinitialize_options1szcheck.initialize_optionscCsdS)Nr)rrrrfinalize_options8szcheck.finalize_optionscCs|jd7_tj||S)z*Counts the number of warnings that occurs.r+)r,rwarn)rmsgrrrr/;sz check.warncCsL|jr|j|jr0tr"|jn|jr0td|jrH|jdkrHtddS)zRuns the command.zThe docutils package is needed.rzPlease correct your package.N)r"check_metadatar% HAS_DOCUTILScheck_restructuredtextr(rr,)rrrrrun@s z check.runcCs|jj}g}x*dD]"}t||o(t||s|j|qW|rP|jddj||jrh|js|jdn"|j r|j s|jdn |jdd S)zEnsures 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. nameversionurlzmissing 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"hasattrgetattrrr/joinZauthorZ author_emailZ maintainerZmaintainer_email)rr"Zmissingattrrrrr1Ps$ 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_datagetr/)rdataZwarningr=rrrr3ns  zcheck.check_restructuredtextcCst}t}tjtfdj}d|_d|_d|_t||j |j |j |j |j |jd}tj|||d}|j|d y|j||Wn:tk r}z|jjd d|difWYdd}~XnX|jS) z8Returns warnings when the provided data doesn't compile.)Z componentsN)rrrr)rr+z!Could not finish the parsing: %s.r>r>)rrrZ OptionParserZget_default_valuesZ tab_widthZpep_referencesZrfc_referencesr rrZwarning_streamrZerror_encodingZerror_encoding_error_handlerrdocumentZ note_sourceparseAttributeErrorr r)rrA source_pathparserZsettingsZreporterrDerrrr?ys*  $zcheck._check_rst_dataN)r"r#r$)r%r&r')r(r)r*)rrr __doc__Z descriptionZ user_optionsZboolean_optionsr-r.r/r4r1r3r?rrrrr!$s  r!N)rJZdistutils.corerZdistutils.errorsrZdocutils.utilsrZdocutils.parsers.rstrZdocutilsrriorr r2 Exceptionr!rrrrs        __pycache__/install_data.cpython-36.opt-1.pyc000064400000004424152344523600015010 0ustar003 \ @s<dZddlZddlmZddlmZmZGdddeZdS)zdistutils.command.install_data Implements the Distutils 'install_data' command, for installing platform-independent data files.N)Command) change_root convert_pathc@sHeZdZdZdddgZdgZd d Zd dZddZddZ ddZ dS) install_datazinstall data files install-dir=dIbase directory for installing data files (default: installation base dir)root=Ns __pycache__/build_py.cpython-36.opt-1.pyc000064400000024333152344523600014161 0ustar003 \ C@s~dZddlZddlZddlZddlmZddlmZddlTddl m Z m Z ddl m Z Gdd d eZGd d d ee ZdS) zHdistutils.command.build_py Implements the Distutils 'build_py' command.N)glob)Command)*) convert_path Mixin2to3)logc@seZdZdZd8d9d:d;dbuild_pyz5"build" pure Python modules (copy to build directory) build-lib=ddirectory to "build" (copy) tocompileccompile .py to .pyc no-compileN!don't compile .py files [default] optimize=Olalso compile with optimization: -O1 for "python -O", -O2 for "python -OO", and -O0 to disable [default: -O0]forcef2forcibly build everything (ignore file timestamps)cCs4d|_d|_d|_d|_d|_d|_d|_d|_dS)Nr) build_lib py_modulespackage package_data package_dirr optimizer)selfr2/usr/lib64/python3.6/distutils/command/build_py.pyinitialize_options szbuild_py.initialize_optionsc Cs|jddd|jj|_|jj|_|jj|_i|_|jjrbx&|jjjD]\}}t||j|<qHW|j|_ t |j t syt |j |_ Wn t tfk rtdYnXdS)NZbuildrrzoptimize must be 0, 1, or 2)rr)rr)Zset_undefined_options distributionpackagesrrritemsrget_data_files data_files isinstancerint ValueErrorAssertionErrorZDistutilsOptionError)rnamepathrrrfinalize_options*s"      zbuild_py.finalize_optionscCs:|jr|j|jr$|j|j|j|jdddS)Nr)include_bytecode)r build_modulesr"build_packagesbuild_package_data byte_compile get_outputs)rrrrrunCs z build_py.runcsg}|js|Sxr|jD]h}|j|}tjj|jg|jd}d|rRt|dfdd|j||D}|j ||||fqW|S)z?Generate list of '(package,src_dir,build_dir,filenames)' tuples.rcsg|]}|dqS)Nr).0file)plenrr tsz+build_py.get_data_files..) r"get_package_dirosr+joinrsplitlenfind_data_filesappend)rdatarsrc_dir build_dir filenamesr)r8rr$as   zbuild_py.get_data_filescs`|jjdg|jj|g}gx:|D]2}ttjj|t|}jfdd|Dq&WS)z6Return filenames for package's data files in 'src_dir'cs$g|]}|krtjj|r|qSr)r;r+isfile)r6fn)filesrrr9s z,build_py.find_data_files..)rgetrr;r+r<rextend)rrrBZglobspatternZfilelistr)rHrr?ys  zbuild_py.find_data_filescCshd}x^|jD]T\}}}}xF|D]>}tjj||}|jtjj||jtjj|||ddqWq WdS)z$Copy data files into build directoryNF) preserve_mode)r%r;r+r<mkpathdirname copy_file)rZlastdirrrBrCrDfilenametargetrrrr0s zbuild_py.build_package_datac Cs|jd}|js&|r tjj|SdSng}x|ry|jdj|}Wn*tk rn|jd|d|d=Yq,X|jd|tjj|Sq,W|jjd}|dk r|jd||rtjj|SdSdS)zReturn 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).r4rErr5NrR)r=rr;r+r<KeyErrorinsertrI)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+existsZDistutilsFileErrorisdirr<rFrwarn)rrrinit_pyrrr check_packages    zbuild_py.check_packagecCs&tjj|stjd||dSdSdS)Nz!file %s (for module %s) not foundFT)r;r+rFrrX)rmodule module_filerrr check_modules zbuild_py.check_modulec Cs|j||ttjj|d}g}tjj|jj}xX|D]P}tjj|}||krztjjtjj |d}|j |||fq8|j d|q8W|S)Nz*.pyrz excluding %s) rZrr;r+r<abspathr!Z script_namesplitextbasenamer@Z debug_print) rrrZ module_filesmodulesZ setup_scriptrZabs_fr[rrrfind_package_moduless   zbuild_py.find_package_modulesc Csi}g}x|jD]}|jd}dj|dd}|d}y||\}}Wn"tk rj|j|}d}YnX|s|j||} |df||<| r|j|d| ftjj||d} |j || sq|j||| fqW|S)aFinds 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+rZ module_baserZcheckedrYr\rrr find_moduless*       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)rrarrmrrrfind_all_moduless   zbuild_py.find_all_modulescCsdd|jDS)NcSsg|] }|dqS)r5rRr)r6r[rrrr9-sz-build_py.get_source_files..)rf)rrrrget_source_files,szbuild_py.get_source_filescCs$|gt||dg}tjj|S)Nz.py)listr;r+r<)rrCrr[Z outfile_pathrrrget_module_outfile/szbuild_py.get_module_outfiler5cCs|j}g}xx|D]p\}}}|jd}|j|j||}|j||r|jr`|jtjj|dd|j dkr|jtjj||j dqW|dd|j D7}|S)Nr4rE) optimizationrcSs,g|]$\}}}}|D]}tjj||qqSr)r;r+r<)r6rrBrCrDrPrrrr9Cs z(build_py.get_outputs..) rfr=rirr@r importlibutilcache_from_sourcerr%)rr-raZoutputsrr[r\rPrrrr23s"       zbuild_py.get_outputscCsbt|tr|jd}nt|ttfs,td|j|j||}tj j |}|j ||j ||ddS)Nr4z:'package' must be a string (dot-separated), list, or tupler)rL) r&strr=rhtuple TypeErrorrirr;r+rNrMrO)rr[r\rZoutfiledirrrr 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_packagescCstjr|jddSddlm}|j}|dtjkr>|tj}|jrZ||d|j ||j d|j dkr||||j |j ||j ddS)Nz%byte-compiling is disabled, skipping.r)r1r5)rrprefixdry_runrR) sysdont_write_bytecoderXdistutils.utilr1rr;sepr rrtr)rrHr1rsrrrr1vs    zbuild_py.byte_compile)r r r )r r r)rNr)rrr)rrr)r5)__name__ __module__ __qualname__Z descriptionZ user_optionsZboolean_optionsZ negative_optr r,r3r$r?r0r:rZr]rbrdrfrgrir2rrr.r/r1rrrrrs8   '4  rc@seZdZddZddZdS) build_py_2to3cCsLg|_|jr|j|jr*|j|j|j|j|j|jdddS)Nr)r-) updated_filesrr.r"r/r0Zrun_2to3r1r2)rrrrr3s zbuild_py_2to3.runcCs,tj||||}|dr(|jj|d|S)Nr5r)rrrr}r@)rr[r\rresrrrrrszbuild_py_2to3.build_moduleN)ryrzr{r3rrrrrrr|sr|)__doc__r;importlib.utilrkrurZdistutils.corerZdistutils.errorsrwrrZ distutilsrrr|rrrrs   }__pycache__/install_lib.cpython-36.opt-2.pyc000064400000010773152344523600014652 0ustar003 \ @sHddlZddlZddlZddlmZddlmZdZGdddeZ dS)N)Command)DistutilsOptionErrorz.pyc @seZdZdZd*d+d,d-d.d/d0gZdd dgZdd iZddZddZddZ ddZ ddZ d d!Z d"d#Z d$d%Zd&d'Zd(d)ZdS)1 install_libz7install all Python modules (extensions and pure Python) install-dir=ddirectory to install to build-dir=b'build directory (where to install from)forcef-force installation (overwrite existing files)compileccompile .py to .pyc [default] no-compileNdon't compile .py files optimize=Olalso compile with optimization: -O1 for "python -O", -O2 for "python -OO", and -O0 to disable [default: -O0] skip-buildskip the build stepscCs(d|_d|_d|_d|_d|_d|_dS)Nr) install_dir build_dirr roptimize skip_build)selfr5/usr/lib64/python3.6/distutils/command/install_lib.pyinitialize_options3s zinstall_lib.initialize_optionsc Cs|jddddddd|jdkr&d |_|jdkr6d |_t|jtsyt|j|_|jdkr^tWn ttfk rtdYnXdS)Ninstall build_librrrr rrrTFrzoptimize must be 0, 1, or 2)r!r)rr)r r )rr)rr)rr)rr"r#)Zset_undefined_optionsrr isinstanceintAssertionError ValueErrorr)rrrrfinalize_options<s$     zinstall_lib.finalize_optionscCs0|j|j}|dk r,|jjr,|j|dS)N)buildr distributionhas_pure_modules byte_compile)routfilesrrrrunVszinstall_lib.runcCs2|js.|jjr|jd|jjr.|jddS)Nbuild_py build_ext)rr*r+Z run_commandhas_ext_modules)rrrrr)fs    zinstall_lib.buildcCs8tjj|jr |j|j|j}n|jd|jdS|S)Nz3'%s' does not exist -- no Python modules to install)ospathisdirrZ copy_treerwarn)rr-rrrr ms  zinstall_lib.installcCsrtjr|jddSddlm}|jdj}|jrH||d|j||j d|j dkrn|||j |j||j |j ddS)Nz%byte-compiling is disabled, skipping.r)r,r )rr prefixdry_run)rr r6verboser7) sysdont_write_bytecoder5Zdistutils.utilr,get_finalized_commandrootrr r7rr8)rfilesr,Z install_rootrrrr,vs     zinstall_lib.byte_compilec Csh|sgS|j|}|j}t||}t|ttj}g}x(|D] } |jtjj|| |dq@W|S)N) r; get_outputsgetattrlenr2sepappendr3join) rZhas_anyZ build_cmdZ cmd_optionZ output_dirZ build_filesrZ prefix_lenZoutputsfilerrr_mutate_outputss    zinstall_lib._mutate_outputscCsvg}xl|D]d}tjjtjj|d}|tkr0q |jrL|jtjj |dd|j dkr |jtjj ||j dq W|S)Nr") optimizationr) r2r3splitextnormcasePYTHON_SOURCE_EXTENSIONrrB importlibutilcache_from_sourcer)rZ py_filenamesZbytecode_filesZpy_fileZextrrr_bytecode_filenamess     zinstall_lib._bytecode_filenamescCsR|j|jjdd|j}|jr*|j|}ng}|j|jjdd|j}|||S)Nr/r!r0)rEr*r+rrrNr1)rZ pure_outputsZbytecode_outputsZ ext_outputsrrrr>s   zinstall_lib.get_outputscCsLg}|jjr&|jd}|j|j|jjrH|jd}|j|j|S)Nr/r0)r*r+r;extendr>r1)rZinputsr/r0rrr get_inputss    zinstall_lib.get_inputs)rrr)rr r )r r r )rrr)rNr)rrr)rNr)__name__ __module__ __qualname__Z descriptionZ user_optionsZboolean_optionsZ negative_optrr(r.r)r r,rErNr>rPrrrrrs*   r) r2importlib.utilrKr9Zdistutils.corerZdistutils.errorsrrJrrrrrs   __pycache__/install_lib.cpython-36.pyc000064400000012070152344523600013702 0ustar003 \ @sLdZddlZddlZddlZddlmZddlmZdZ GdddeZ dS)zkdistutils.command.install_lib Implements the Distutils 'install_lib' command (install all Python modules).N)Command)DistutilsOptionErrorz.pyc @seZdZdZd*d+d,d-d.d/d0gZdd dgZdd iZddZddZddZ ddZ ddZ d d!Z d"d#Z d$d%Zd&d'Zd(d)ZdS)1 install_libz7install all Python modules (extensions and pure Python) install-dir=ddirectory to install to build-dir=b'build directory (where to install from)forcef-force installation (overwrite existing files)compileccompile .py to .pyc [default] no-compileNdon't compile .py files optimize=Olalso compile with optimization: -O1 for "python -O", -O2 for "python -OO", and -O0 to disable [default: -O0] skip-buildskip the build stepscCs(d|_d|_d|_d|_d|_d|_dS)Nr) install_dir build_dirr roptimize skip_build)selfr5/usr/lib64/python3.6/distutils/command/install_lib.pyinitialize_options3s zinstall_lib.initialize_optionsc Cs|jddddddd|jdkr&d |_|jdkr6d |_t|jtsyt|j|_|jdkr^tWn ttfk rtdYnXdS)Ninstall build_librrrr rrrTFrzoptimize must be 0, 1, or 2)r!r)rr)r r )rr)rr)rr)rr"r#)Zset_undefined_optionsrr isinstanceintAssertionError ValueErrorr)rrrrfinalize_options<s$     zinstall_lib.finalize_optionscCs0|j|j}|dk r,|jjr,|j|dS)N)buildr distributionhas_pure_modules byte_compile)routfilesrrrrunVszinstall_lib.runcCs2|js.|jjr|jd|jjr.|jddS)Nbuild_py build_ext)rr*r+Z run_commandhas_ext_modules)rrrrr)fs    zinstall_lib.buildcCs8tjj|jr |j|j|j}n|jd|jdS|S)Nz3'%s' does not exist -- no Python modules to install)ospathisdirrZ copy_treerwarn)rr-rrrr ms  zinstall_lib.installcCsrtjr|jddSddlm}|jdj}|jrH||d|j||j d|j dkrn|||j |j||j |j ddS)Nz%byte-compiling is disabled, skipping.r)r,r )rr prefixdry_run)rr r6verboser7) sysdont_write_bytecoder5Zdistutils.utilr,get_finalized_commandrootrr r7rr8)rfilesr,Z install_rootrrrr,vs     zinstall_lib.byte_compilec Csh|sgS|j|}|j}t||}t|ttj}g}x(|D] } |jtjj|| |dq@W|S)N) r; get_outputsgetattrlenr2sepappendr3join) rZhas_anyZ build_cmdZ cmd_optionZ output_dirZ build_filesrZ prefix_lenZoutputsfilerrr_mutate_outputss    zinstall_lib._mutate_outputscCsvg}xl|D]d}tjjtjj|d}|tkr0q |jrL|jtjj |dd|j dkr |jtjj ||j dq W|S)Nr") optimizationr) r2r3splitextnormcasePYTHON_SOURCE_EXTENSIONrrB importlibutilcache_from_sourcer)rZ py_filenamesZbytecode_filesZpy_fileZextrrr_bytecode_filenamess     zinstall_lib._bytecode_filenamescCsR|j|jjdd|j}|jr*|j|}ng}|j|jjdd|j}|||S)zReturn 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_outputsZ ext_outputsrrrr>s   zinstall_lib.get_outputscCsLg}|jjr&|jd}|j|j|jjrH|jd}|j|j|S)zGet 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_inputss    zinstall_lib.get_inputs)rrr)rr r )r r r )rrr)rNr)rrr)rNr)__name__ __module__ __qualname__Z descriptionZ user_optionsZboolean_optionsZ negative_optrr(r.r)r r,rErNr>rPrrrrrs*   r) __doc__r2importlib.utilrKr9Zdistutils.corerZdistutils.errorsrrJrrrrrs  __pycache__/__init__.cpython-36.pyc000064400000001027152344523600013145 0ustar003 \@s2dZddddddddd d d d d ddddddgZdS)z\distutils.command Package containing implementation of all the standard Distutils commands.ZbuildZbuild_pyZ build_extZ build_clibZ build_scriptsZcleanZinstallZ install_libZinstall_headersZinstall_scriptsZ install_dataZsdistregisterZbdistZ bdist_dumbZ bdist_rpmZ bdist_wininstZcheckZuploadN)__doc____all__rr2/usr/lib64/python3.6/distutils/command/__init__.pys&__pycache__/check.cpython-36.opt-2.pyc000064400000011061152344523600013422 0ustar003 \x @sddlmZddlmZyTddlmZddlmZddlm Z ddlm Z ddl m Z Gdd d eZ d ZWnek rd ZYnXGd d d eZdS))Command)DistutilsSetupError)Reporter)Parser)frontend)nodes)StringIOc@seZdZd ddZddZdS) SilentReporterNrasciireplacec Cs"g|_tj||||||||dS)N)messagesr__init__)selfsource report_level halt_levelstreamdebugencoding error_handlerr//usr/lib64/python3.6/distutils/command/check.pyr szSilentReporter.__init__cOs6|jj||||ftj|f|||j|d|S)N)leveltype)r appendrsystem_messageZlevels)rrmessageZchildrenkwargsrrrrszSilentReporter.system_message)Nrr r )__name__ __module__ __qualname__r rrrrrr s r TFc@s\eZdZdZdddgZdddgZd d Zd dZddZddZ ddZ ddZ ddZ dS)checkz"perform some checks on the packagemetadatamVerify meta-datarestructuredtextrEChecks if long string meta-data syntax are reStructuredText-compliantstricts(Will exit with an error if a check failscCsd|_d|_d|_d|_dS)Nr)r%r"r( _warnings)rrrrinitialize_options1szcheck.initialize_optionscCsdS)Nr)rrrrfinalize_options8szcheck.finalize_optionscCs|jd7_tj||S)Nr+)r,rwarn)rmsgrrrr/;sz check.warncCsL|jr|j|jr0tr"|jn|jr0td|jrH|jdkrHtddS)NzThe docutils package is needed.rzPlease correct your package.)r"check_metadatar% HAS_DOCUTILScheck_restructuredtextr(rr,)rrrrrun@s z check.runcCs|jj}g}x*d D]"}t||o(t||s|j|qW|rP|jddj||jrh|js|jdn"|j r|j s|jdn |jddS)Nnameversionurlzmissing 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"hasattrgetattrrr/joinZauthorZ author_emailZ maintainerZmaintainer_email)rr"Zmissingattrrrrr1Ps$ 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_datagetr/)rdataZwarningr=rrrr3ns  zcheck.check_restructuredtextcCst}t}tjtfdj}d|_d|_d|_t||j |j |j |j |j |jd}tj|||d}|j|dy|j||Wn:tk r}z|jjd d|difWYdd}~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_handlerrdocumentZ note_sourceparseAttributeErrorr r)rrA source_pathparserZsettingsZreporterrDerrrr?ys*  $zcheck._check_rst_dataN)r"r#r$)r%r&r')r(r)r*) rrr Z descriptionZ user_optionsZboolean_optionsr-r.r/r4r1r3r?rrrrr!$s  r!N)Zdistutils.corerZdistutils.errorsrZdocutils.utilsrZdocutils.parsers.rstrZdocutilsrriorr r2 Exceptionr!rrrrs        __pycache__/register.cpython-36.opt-1.pyc000064400000020334152344523600014173 0ustar003 \-@sddZddlZddlZddlZddlZddlmZddlm Z ddl Tddl m Z Gddde Z dS) zhdistutils.command.register Implements the Distutils 'register' command (register with the repository). N)warn) PyPIRCCommand)*)logc@seZdZdZejdd gZejdddgZdd d fgZd d Zd dZ ddZ ddZ ddZ ddZ ddZddZddZd!ddZdS)"registerz7register the distribution with the Python package indexlist-classifiersN list the valid Trove classifiersstrictBWill stop the registering if the meta-data are not fully compliantverifycheckcCsdS)NT)selfr r 2/usr/lib64/python3.6/distutils/command/register.pyszregister.cCstj|d|_d|_dS)Nr)rinitialize_optionslist_classifiersr )rr r rrs zregister.initialize_optionscCs*tj|d|jfdd}||jjd<dS)Nr)r restructuredtextr )rr)rfinalize_optionsr distributionZcommand_options)rZ check_optionsr r rr$s zregister.finalize_optionscCsX|j|jx|jD]}|j|qW|jr<|jn|jrL|jn|jdS)N) r _set_configZget_sub_commandsZ run_commandZdry_runverify_metadatar classifiers send_metadata)rZcmd_namer r rrun+s  z register.runcCs8tdt|jjd}|j|j|_d|_|jdS)zDeprecated API.zddistutils.command.register.check_metadata is deprecated, use the check command insteadr rN)rPendingDeprecationWarningrZget_command_objZensure_finalizedr rr)rr r r rcheck_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. usernamepassword repositoryrealmTZpypiz%s not found in .pypircFN)Z _read_pypircrrr r! has_configZDEFAULT_REPOSITORY ValueError)rconfigr r rrDs     zregister._set_configcCs*|jd}tjj|}tj|j|dS)z8 Fetch the list of classifiers from the server. z?:action=list_classifiersN)r urllibrequestZurlopenrinfo_read_pypi_response)rZurlZresponser r rrUs  zregister.classifierscCs&|j|jd\}}tjd||dS)zF Send the metadata to the package index server to be checked. r zServer response (%s): %sN)post_to_serverbuild_post_datarr')rcoderesultr r rr\szregister.verify_metadatac Cs|jrd}|j}|j}n d}d}}dj}x:||krf|jdtjt}|sTd}q.||kr.tdq.W|dkr|x|std}qtWx|st j d}qWt j j }t j j|jd }|j|j||||j|jd |\}}|jd ||ftj|d kr|jr||j_nj|jd tj|jd|jtjd}x&|jdkr\td}|s8d}q8W|jdkr|j||n|dkrddi} d| d<| d<| d<d| d<x| dstd| d<qWx| d| dkrNx| dst j d| d<qWx| dst j d| d<qW| d| dkrd| d<d| d<tdqWx| dsltd| d<qRW|j| \}}|d krtjd ||ntjdtjd nT|d!krdd"i} d| d<x| dstd#| d<qW|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. 1xz1 2 3 4zWe 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): %szAI can store your PyPI login so future submissions will be faster.z (the login will be stored in %s)XZynzSave your login (y/N)?ny2z:actionusernamerZemailNZconfirmz 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"rrsplitannouncerINFOinputprintgetpassr%r&ZHTTPPasswordMgrparseZurlparser Z add_passwordr!r)r*rZ _get_rc_filelowerZ _store_pypircr') rZchoicerrchoicesauthhostr+r,datar r rrcs                     zregister.send_metadatacCs|jj}|d|j|j|j|j|j|j|j|j |j |j |j |j |j|j|jd}|ds|ds|drd|d<|S)Nz1.0)z:actionmetadata_versionr6versionZsummaryZ home_pageZauthorZ author_emaillicense descriptionkeywordsplatformrZ download_urlprovidesrequires obsoletesrJrKrLz1.1rD)rZmetadataZget_nameZ get_versionZget_descriptionZget_urlZ get_contactZget_contact_emailZ get_licenceZget_long_descriptionZ get_keywordsZ get_platformsZget_classifiersZget_download_urlZ get_providesZ get_requiresZ get_obsoletes)ractionmetarCr r rr*s* zregister.build_post_datacCsd|kr$|jd|d|jftjd}d|}|d}tj}x|jD]\}}t|tgtffkrp|g}xZ|D]R}t|}|j ||j d||j d|j ||rv|dd krv|j d qvWqJW|j ||j d |j j d }d |tt |d } t jj|j|| } t jjt jj|d} d}y| j| } Wnxt jjk r} z$|jrl| jj}| j| jf} WYdd} ~ XnJt jjk r} zdt| f} WYdd} ~ XnX|jr|j| }d} |jrd 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/Nir0OK-K)r0rQ)r9r rr:ioStringIOitemstypestrwritegetvalueencodelenr%r&ZRequestZ build_openerZHTTPBasicAuthHandleropenerrorZ HTTPErrorZ show_responsefpreadr+msgZURLErrorr(join)rrCrAboundaryZ sep_boundaryZ end_boundaryZbodykeyvalueZheadersZreqopenerr,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.requestwarningsrZdistutils.corerZdistutils.errorsZ distutilsrrr r r rs   __pycache__/build_clib.cpython-36.opt-2.pyc000064400000010501152344523600014433 0ustar003 \V@sPddlZddlmZddlTddlmZddlmZddZGdd d eZ dS) N)Command)*)customize_compiler)logcCsddlm}|dS)Nr)show_compilers)distutils.ccompilerr)rr4/usr/lib64/python3.6/distutils/command/build_clib.pyrs rc@sleZdZdZd"d#d$d%d&gZdd gZdddefgZddZddZ ddZ ddZ ddZ ddZ 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-productsdebugg"compile with debugging informationforcef2forcibly build everything (ignore file timestamps) compiler=cspecify the compiler typez help-compilerNzlist available compilerscCs:d|_d|_d|_d|_d|_d|_d|_d|_d|_dS)Nr) r build_temp libraries include_dirsdefineundefrrcompiler)selfrrr initialize_options4szbuild_clib.initialize_optionscCsh|jdddd d d |jj|_|jr0|j|j|jdkrH|jjpDg|_t|jtrd|jjtj |_dS) NZbuildrr rrr)rr )rr)rr)rr)rr) Zset_undefined_optionsZ distributionrcheck_library_listr isinstancestrsplitospathsep)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|j dk rx|j D]}|jj |qW|j |jdS)Nr) new_compiler)rdry_runr)rrr)rr*rrrZset_include_dirsrZ define_macrorZundefine_macrobuild_libraries)r r)namevalueZmacrorrr run^s        zbuild_clib.runcCst|tstdx|D]|}t|t rs    __pycache__/bdist_rpm.cpython-36.pyc000064400000031416152344523600013376 0ustar003 \T@sdZddlZddlZddlZddlmZddlmZddlm Z ddl m Z ddl Tddl mZdd lmZGd d d eZdS) 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+@seZdZdZdgdhdidjdkdldmdndodpdqdrdsdtdudvdwdxdydzd{d|d}d~dddddddddddddddddg)Zd4d9d=d2dUgZd4d9d=dXZdYdZZd[d\Zd]d^Z d_d`Z dadbZ dcddZ dedfZ 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=dDdirectory 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-pythonLhard-code the exact path to the current Python interpreter in the .spec file spec-onlyonly regenerate spec file source-onlyonly generate source RPM binary-onlyonly generate binary RPM use-bzip27use bzip2 instead of gzip to create source distributiondistribution-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 numberserial=RPM serial numbervendor=aRPM "vendor" (eg. "Joe Blow ") [default: maintainer or author from setup script] packager=BRPM packager (eg. "Jane Doe ") [default: vendor] doc-files=6list of documentation files (space or comma-separated) changelog= RPM changelogicon=name of icon file provides=%capabilities provided by this package requires=%capabilities required by this package conflicts=-capabilities which conflict with this packagebuild-requires=+capabilities required to build this package obsoletes=*capabilities made obsolete by this package no-autoreq+do not automatically calculate dependencies keep-tempk"don't clean up RPM build directory no-keep-temp&clean up RPM build directory [default]use-rpm-opt-flags8compile with RPM_OPT_FLAGS when building from source RPMno-rpm-opt-flags&do not pass any RPM CFLAGS to compiler rpm3-mode"RPM 3 compatibility mode (default) rpm2-modeRPM 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 buildinginstall-script=6Specify a script for the INSTALL phase of RPM building post-install=;Specify a script for the post-INSTALL phase of RPM buildingpre-uninstall=rnroREADME README.txtrk1rlrirprqrrrsrtrurvrwrxryrzr|r}r~rrr)rr)Z ensure_stringrZ get_contactZget_contact_emailZensure_string_list isinstancerolistrrexistsappend_format_changelogrpZensure_filename)rZreadmerrrrs>                         zbdist_rpm.finalize_package_datac Cstrsz-bdist_rpm._make_spec_file..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: %sVendorPackagerProvidesRequires 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}ZbuildrsZinstallrtcleanrurm -rf $RPM_BUILD_ROOT verifyscriptrvprerwpostrxpreunrypostunrz%rz%files -f INSTALLED_FILESz%defattr(-,root,root)z%doc z %changelog)rrrrrr)r{rrr)rrur)rrvN)rrwN)rrxN)rryN)rrzN)'rrZ get_versionreplacerkZget_description subprocessZ getoutputr splitlinesrrrhZ get_licenserjrrgetattrlowerrrZget_urlrirrqrrrrZget_long_descriptionrcrargvropenreadrrorp)rZ spec_fileZ vendor_hookZproblemZfixedZ fixed_hookZfieldvalZdef_setup_callZ def_buildZ install_cmdZscript_optionsZrpm_optattrdefaultrrrrs                   zbdist_rpm._make_spec_filecCs|s|Sg}x`|jjdD]N}|j}|ddkrD|jd|gq|ddkr\|j|q|jd|qW|ds||d=|S)zKFormat the changelog correctly and convert it to a list of strings rrrrrz )rrrr)rrpZ new_changelogrrrrr3s   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__Z descriptionZ user_optionsZboolean_optionsZ negative_optrrrrrrrrrrrr s--)r )__doc__rrrZdistutils.corerZdistutils.debugrZdistutils.utilrZdistutils.file_utilrZdistutils.errorsZdistutils.sysconfigrZ distutilsrr rrrrs      __pycache__/clean.cpython-36.opt-2.pyc000064400000004060152344523600013430 0ustar003 \ @s@ddlZddlmZddlmZddlmZGdddeZdS)N)Command) remove_tree)logc@s>eZdZdZddddddgZdgZddZddZddZdS)cleanz-clean up temporary files from 'build' command build-base=b2base build directory (default: 'build.build-base') build-lib=Ns   __pycache__/config.cpython-36.opt-2.pyc000064400000015526152344523600013624 0ustar003 \3@shddlZddlZddlmZddlmZddlmZddlm Z dddZ Gd d d eZ d d d Z dS)N)Command)DistutilsExecError)customize_compiler)logz.cz.cxx)czc++c @seZdZdZd>d?d@dAdBdCdDdEdFg ZddZddZddZd d!Zd"d#Z d$d%Z d&d'Z d(d)Z d*d+Z dGd-d.ZdHd/d0ZdId1d2ZdJd3d4ZdKd5d6ZdLd8d9Zdddgfd:d;ZdMd  r)LANG_EXTopenwriteclose)r&bodyheaderslangfilenamefileheaderr'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?srcoutr'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%rDcompile)r&r=r>r!r?rEobjr'r'r(_compileszconfig._compilec Csr|j||||\}}tjjtjj|d} |jj|g| |||d|jjdk r\| |jj} |jj | ||| fS)Nr)r"r#Z target_lang) rKr-pathsplitextbasenamer Zlink_executableZ exe_extensionr%append) r&r=r>r!r"r#r?rErJprogr'r'r(_links    z config._linkc GsX|s|j}g|_tjddj|x0|D](}ytj|Wq(tk rNYq(Xq(WdS)Nz removing: %s )r%rinfojoinr-removeOSError)r& filenamesr@r'r'r(_cleans z config._cleanrc CsRddlm}|jd}y|j||||Wn|k rDd}YnX|j|S)Nr) CompileErrorTF)r4rYr5rGrX)r&r=r>r!r?rYokr'r'r(try_cpps  zconfig.try_cppc Csx|j|j||||\}}t|tr0tj|}t|}d} x&|j} | dkrPP|j| r>d} Pq>W|j |j | S)NFT) r5rGr*r+rerIr:readlinesearchr<rX) r&patternr=r>r!r?rErFrAmatchliner'r'r( search_cpps    zconfig.search_cppc Csdddlm}|jy|j||||d}Wn|k rDd}YnXtj|rRdpTd|j|S)Nr)rYTFzsuccess!zfailure.)r4rYr5rKrrSrX)r&r=r>r!r?rYrZr'r'r( try_compiles  zconfig.try_compilec Cspddlm}m}|jy|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_links   zconfig.try_linkc Csddlm}m}|jy.|j||||||\} } } |j| gd} Wn||tfk rdd} YnXtj| rrdptd|j | S)Nr)rYreTFzsuccess!zfailure.) r4rYrer5rQZspawnrrrSrX) r&r=r>r!r"r#r?rYrerErJZexerZr'r'r(try_runs   zconfig.try_runrc Cst|jg}|r|jd||jd|r<|jd|n|jd||jddj|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|dS)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__Z descriptionZ user_optionsr)r/r0r5rCrGrKrQrXr[rcrdrfrgrjrkrlr'r'r'r(rsT         rc CsJ|dkrtjd|n tj|t|}ztj|jWd|jXdS)Nz%s)rrSr:readr<)r@headrAr'r'r(rHNs rH)N) r-r]Zdistutils.corerZdistutils.errorsrZdistutils.sysconfigrZ distutilsrr9rrHr'r'r'r( s     ;__pycache__/build_clib.cpython-36.pyc000064400000011553152344523600013503 0ustar003 \V@sTdZddlZddlmZddlTddlmZddlmZddZ Gd d d eZ dS) zdistutils.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)rr4/usr/lib64/python3.6/distutils/command/build_clib.pyrs rc@sleZdZdZd"d#d$d%d&gZdd gZdddefgZddZddZ ddZ ddZ ddZ ddZ 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-productsdebugg"compile with debugging informationforcef2forcibly build everything (ignore file timestamps) compiler=cspecify the compiler typez help-compilerNzlist available compilerscCs:d|_d|_d|_d|_d|_d|_d|_d|_d|_dS)Nr) r build_temp libraries include_dirsdefineundefrrcompiler)selfrrr initialize_options4szbuild_clib.initialize_optionscCsh|jdddd d d |jj|_|jr0|j|j|jdkrH|jjpDg|_t|jtrd|jjtj |_dS) NZbuildrr rrr)rr )rr)rr)rr)rr) Zset_undefined_optionsZ distributionrcheck_library_listr isinstancestrsplitospathsep)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|j dk rx|j D]}|jj |qW|j |jdS)Nr) new_compiler)rdry_runr)rrr)rr*rrrZset_include_dirsrZ define_macrorZundefine_macrobuild_libraries)r r)namevalueZmacrorrr run^s        zbuild_clib.runcCst|tstdx|D]|}t|t rs    __pycache__/build_ext.cpython-36.pyc000064400000040256152344523600013374 0ustar003 \z@sdZddlZddlZddlZddlZddlmZddlTddlm Z m Z ddlm Z ddl m Z ddlmZdd lmZdd lmZdd lmZejd Zd dZGdddeZdS)zdistutils.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_compilerget_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 r3/usr/lib64/python3.6/distutils/command/build_ext.pyr s r c@seZdZdZdejZd`dad d d efdcdddefdddedfdddefdgdhdidjdkdldmdndodpgZd d%d(d1d8gZ d:d2d;e fgZ dd?Z d@dAZdBdCZdDdEZdFdGZdHdIZdJdKZdLdMZejdNdOZdPdQZdRdSZdTdUZdVdWZdXdYZdZd[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=t1directory for temporary files (build by-products)z plat-name=pz>platform name to cross-compile for, if supported (default: %s)inplaceiz=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 filesdefine=DC preprocessor macros to defineundef=U!C preprocessor macros to undefine libraries=l!external C libraries to link withz library-dirs=Lz.directories to search for external C librariesrpath=R7directories to search for shared C libraries at runtime link-objects=O2extra explicit link objects to include in the linkdebugg'compile/link with debugging informationforcef2forcibly build everything (ignore file timestamps) compiler=cspecify the compiler type parallel=jnumber of parallel build jobsswig-cppN)make SWIG create C++ files (default is C) swig-opts=!list of SWIG command line optionsswig=path to the SWIG executableuser#add user include, library and rpathz help-compilerzlist available compilerscCsd|_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_temprpackage include_dirsdefineundef libraries library_dirsrpath link_objectsr+r.compilerswigswig_cpp swig_optsr=parallel)selfrrrinitialize_optionsjs*zbuild_ext.initialize_optionsc Csddlm}|jdd'd(d)d*d+d,d-|jdkr8|jj|_|jj|_|j}|jd d }|j dkrn|jj pjg|_ t |j t r|j j t j|_ tjtjkr|j jt jjtjd |j j|||kr|j j||jd|jd|jdkrg|_|jdkrg|_nt |jt r&|jj t j|_|jdkr:g|_nt |jt rX|jj t j|_t jdkrT|jjt jjtjdtjtjkr|jjt jjtjd|jrt jj|jd|_nt jj|jd|_|j jt jjtttdd}|r|jj||j dkrd}n|j dd}t jjtjd}|rHt jj||}|jj|tj!dddks|tj!dddkrtj"j#t jjtjdr|jjt jjtjddt$dn |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)dkrHg|_)n|j)j d%|_)|j*rt jjt+d }t jjt+d} t jj,|r|j j|t jj,| r|jj| |jj| t |j-t ryt.|j-|_-Wnt/k rt0d&YnXdS).Nr) sysconfigZbuildr@rBrKr+r.rOrA)Z plat_specificincluderGrJntZlibsZDebugZRelease_homewin32ZPCbuildcygwinatheosbinlibpythonconfig.Py_ENABLE_SHAREDLIBDIR,cSsg|] }|dfqS)1r).0Zsymbolrrr sz.build_ext.finalize_options.. zparallel should be an integer)r@r@)rBrB)rKrK)r+r+)r.r.)rOrO)rArA)1 distutilsrRZset_undefined_optionsrC distributionZ ext_packageZ ext_modulesr?Zget_python_incrD isinstancestrsplitospathsepsys exec_prefixbase_exec_prefixappendpathjoinZensure_string_listrGrHrInameprefixr+rBdirnamergetattrrAplatform executable startswithrget_config_varZ python_buildrErFrNr=r isdirrOint ValueErrorZDistutilsOptionError) rPrRZ py_includeZplat_py_include _sys_homesuffixZnew_libZdefinesZ user_includeZuser_librrrfinalize_optionss                    (         zbuild_ext.finalize_optionscCstddlm}|jsdS|jjrL|jd}|jj|jp:g|j j |j ||j |j |j|jd|_ t|j tjdkr|jtkr|j j|j|jdk r|j j|j|jdk rx |jD]\}}|j j||qW|jdk rx|jD]}|j j|qW|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)rKverbosedry_runr.rU)#r rr?riZhas_c_librariesget_finalized_commandrGextendZget_library_namesrHrrrrKrrr.rrmrurAr Z initializerDZset_include_dirsrEZ define_macrorFZundefine_macroZ set_librariesZset_library_dirsrIZset_runtime_library_dirsrJZset_link_objectsbuild_extensions)rPrrruvaluemacrorrrruns>             z build_ext.runc Cst|tstdxnt|D]`\}}t|tr4qt|t sLt|dkrTtd|\}}tjd|t|t ozt j |stdt|t stdt||d}x*dD]"}|j |}|dk rt|||qW|j d|_d|krtjd|j d}|rxg|_g|_xj|D]b} t| to,t| dks8tdt| dkrX|jj| dnt| dkr|jj| qW|||<qWdS)aEnsure 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 instanceszMeach 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_objectsextra_compile_argsextra_link_argsNrIZdef_filez9'def_file' element of build info dict no longer supportedmacrosrSz9'macros' element of build info dict must be 1- or 2-tupler)rDrHrGrrr)rSr)rjlistDistutilsSetupError enumeratertuplelenr warnrkextension_name_rematchdictgetsetattrruntime_library_dirs define_macros undef_macrosrr) rPr?rextext_nameZ build_infokeyvalrrrrrcheck_extensions_listUsT           zbuild_ext.check_extensions_listcCs0|j|jg}x|jD]}|j|jqW|S)N)rr?rr)rP filenamesrrrrget_source_filess   zbuild_ext.get_source_filescCs6|j|jg}x |jD]}|j|j|jqW|S)N)rr?rrget_ext_fullpathru)rPZoutputsrrrr get_outputss   zbuild_ext.get_outputscCs(|j|j|jr|jn|jdS)N)rr?rO_build_extensions_parallel_build_extensions_serial)rPrrrrs  zbuild_ext.build_extensionscsj}jdkrtj}yddlm}Wntk r@d}YnX|dkrVjdS||dTfddjD}x6tj|D]&\}}j ||j WdQRXqWWdQRXdS)NTr)ThreadPoolExecutor)Z max_workerscsg|]}jj|qSr)Zsubmitbuild_extension)rer)executorrPrrrfsz8build_ext._build_extensions_parallel..) rOrm cpu_countZconcurrent.futuresr ImportErrorrr?zip_filter_build_errorsresult)rPZworkersrZfuturesrZfutr)rrPrrs       z$build_ext._build_extensions_parallelc Cs4x.|jD]$}|j||j|WdQRXqWdS)N)r?rr)rPrrrrrs  z"build_ext._build_extensions_serialccsTy dVWnDtttfk rN}z"|js*|jd|j|fWYdd}~XnXdS)Nz"building extension "%s" failed: %s)ZCCompilerErrorZDistutilsErrorZ CompileErrorZoptionalrru)rPrerrrrs zbuild_ext._filter_build_errorsc CsX|j}|dkst|ttf r,td|jt|}|j|j}||j}|jpZt ||dsnt j d|jdSt j d|j|j ||}|jpg}|jdd}x|jD]}|j|fqW|jj||j||j|j ||jd}|dd|_|jr|j|j|jp g}|jp|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_dirrrDr+extra_postargsdepends)rGrHrrexport_symbolsr+rBZ target_lang)!rrjrrrrurrr.rr r+info swig_sourcesrrrrrrKcompilerBrDZ_built_objectsrrrlanguageZdetect_languageZlink_shared_object get_librariesrHrget_export_symbols) rPrrext_pathrZ extra_argsrrFZobjectsrrrrrsN         zbuild_ext.build_extensioncCs2g}g}i}|jrtjd|js6d|jks6d|jkr        zbuild_ext.swig_sourcescCs`tjdkrdStjdkrNxBd D]&}tjjd|d}tjj|r|SqWdSntd tjd S) zReturn the name of the SWIG executable. On Unix, this is just "swig" -- it should be in the PATH. Tries a bit harder on Windows. posixrLrU1.31.21.1z c:\swig%szswig.exez>I don't know how to find (much less run) SWIG on platform '%s'N)rrr)rmrursrtisfileZDistutilsPlatformError)rPZversfnrrrrfs    zbuild_ext.find_swigcCs|j|}|jd}|j|d}|jsRtjj|dd|g}tjj|j|Sdj|dd}|jd}tjj |j |}tjj||S) zReturns the path of the filename for a given extension. The file is located in `build_lib` or directly in the package (inplace option). r`rSNrbuild_pyrrr) get_ext_fullnamerlget_ext_filenamerrmrsrtr@rabspathZget_package_dir)rPrfullnameZmodpathfilenamerCrZ package_dirrrrr~s   zbuild_ext.get_ext_fullpathcCs |jdkr|S|jd|SdS)zSReturns the fullname of a given extension name. Adds the `package.` prefixNr`)rC)rPrrrrrs zbuild_ext.get_ext_fullnamecCs.ddlm}|jd}|d}tjj||S)zConvert 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)rPrr|rZ ext_suffixrrrrs  zbuild_ext.get_ext_filenamecCs0d|jjdd}||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)rurlrrr)rPrZ initfunc_namerrrrs  zbuild_ext.get_export_symbolscCstjdkrfddlm}t|j|s\d}|jr4|d}|tjd?tjd?d@f}|j|gS|jSnRtjd d d krd }|tjd?tjd?d@f}|j|gStjd d d kr>ddl m }d }|tjd?tjd?d@f}g}xB|j dj D]0}|j dr|j|dd n |j|qW|j|dg|StjdkrP|jStjd ddkrj|jSddl m }|j drdjtjd?tjd?d@|j d}|j|gS|jSd S)zReturn 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_dNrYrZz python%d.%dr[)rRSHLIBSz-lrmdarwinaixraz python{}.{}{}ABIFLAGS)roryZdistutils._msvccompilerrrjrKr+ hexversionrGrhrRr|rlr{rrformat)rPrrtemplateZ pythonlibrRZextrar]rrrrsJ             zbuild_ext.get_libraries)rrr)rrriignore 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__Z descriptionrmrnZsep_byr Z user_optionsZboolean_optionsr Z help_optionsrQrrrrrrrr contextlibcontextmanagerrrrrrrrrrrrrrr!s  @N  K6   r)__doc__rrmreroZdistutils.corerZdistutils.errorsrrrrZdistutils.dep_utilrZdistutils.extensionrZdistutils.utilr rhr Zsiter rrr rrrrrs"       __pycache__/bdist_wininst.cpython-36.pyc000064400000020263152344523600014271 0ustar003 _Vj<@spdZddlZddlZddlmZddlmZddlmZm Z ddl Tddl m Z ddl mZGd d d eZdS) 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@seZdZdZd5dddefd7d9d:d;dd?d@dAdBg ZddddgZejd&kZ d'd(Z d)d*Z d+d,Z d-d.Z dCd/d0Zd1d2Zd3d4ZdS)D bdist_wininstz-create an executable installer for MS Windows bdist-dir=N1temporary directory for creating the distributionz plat-name=pz;platform name to embed in generated filenames (default: %s) keep-tempkz/keep the pseudo-installation tree around after z!creating the distribution archivetarget-version=z!require a specific python versionz on the target systemno-target-compilec/do not compile .py to .pyc on the target systemno-target-optimizeo;do not compile .py to .pyo (optimized) on the target system dist-dir=d-directory to put final built distributions inbitmap=b>bitmap to use for the installer instead of python-powered logotitle=t?title to display on the installer background instead of default skip-build2skip rebuilding everything (for testing/debugging)install-script=Ubasename of installation script to be run after installation or before deinstallationpre-install-script={Fully qualified filename of a script to be run before any files are installed. This script need not be in the distributionuser-access-control=specify Vista's UAC handling - 'none'/default=no handling, 'auto'=use UAC if target Python installed for all users, 'force'=always use UACwin32cCsRd|_d|_d|_d|_d|_d|_d|_d|_d|_d|_ d|_ d|_ d|_ dS)Nr) bdist_dir plat_name keep_tempno_target_compileno_target_optimizetarget_versiondist_dirbitmaptitle skip_buildinstall_scriptpre_install_scriptuser_access_control)selfr67/usr/lib64/python3.6/distutils/command/bdist_wininst.pyinitialize_options=sz bdist_wininst.initialize_optionscCs|jdd |jdkrR|jr6|jr6|jjd}|j|_|jdj}tj j |d|_|j s^d|_ |j r|jj rt }|j r|j |krtd|f||_ |jdd d |jrx2|jjD]}|jtj j|krPqWtd|jdS) Nbdistr1ZwininstzMtarget 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_objget_finalized_command bdist_baseospathjoinr-has_ext_modulesrZDistutilsOptionErrorr2scriptsbasename)r5r9r=Z short_versionscriptr6r6r7finalize_optionsMs4      zbdist_wininst.finalize_optionsc Cstjdkr&|jjs|jjr&td|js6|jd|jddd}|j |_ |j|_d|_ |j |_ |jd}d|_ d|_|jjr|j}|s|jstd d tjdd }d |j |f}|jd}tjj|jd ||_x6dD].}|j}|dkr|d}t|d||qWtjd|j |jtjjdtjj|j d|jtjd=ddlm }|} |jj!} |j"| d|j d} |j#| | |j$|jjrt%} nd} |jj&j'd| |j(| ftj)d| tj*| |j+st,|j |j-ddS)Nr'z^distribution contains extensions and/or C libraries; must be compiled on a Windows 32 platformbuildinstall)Zreinit_subcommandsr install_libz Should have already checked thisz%d.%dz.%s-%slibpurelibplatlibheadersrBdataz/Include/$dist_nameZinstall_zinstalling to %sZPURELIB)mktempzip)Zroot_diranyr zremoving temporary file '%s')dry_run)rLrMrNrBrO).sysplatformr;rAZhas_c_librariesZDistutilsPlatformErrorr1Z run_commandZreinitialize_commandr(rootZwarn_dirr)compileoptimizer-AssertionError version_infor<r>r?r@Z build_baseZ build_libuppersetattrrinfoZensure_finalizedinsertrunZtempfilerP get_fullnameZ make_archive create_exer/rZ dist_filesappendget_installer_filenamedebugremover*rrS) r5rGrIr-Zplat_specifierrFkeyvaluerPZarchive_basenamefullnamearcnameZ pyversionr6r6r7r_ssf                   zbdist_wininst.runc Cs`g}|jj}|jd|jpdd}dd}xJdD]B}t||d}|r2|d|j||f}|jd|||fq2W|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 |jddS)Nrjz\n)replace)sr6r6r7escapesz)bdist_wininst.get_inidata..escapeauthor author_email description maintainermaintainer_emailnameurlversionz %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_descriptiongetattr capitalizer2r+r,r-r4r0r`time distutilsZctime __version__r@) r5linesrvr]rmrsrOr0ryrzZ build_infor6r6r7 get_inidatas<   zbdist_wininst.get_inidatac Csddl}|j|j|j}|j|}|jd||rPt|dj}t|}nd}t|d} | j |j |rz| j |t |t r|j d}|d}|jrt|jddd } | jj d} WdQRX|| d }n|d}| j ||jd d t||} | j | | j t|djdS) Nrz creating %srbwbmbcsrzlatin-1)encodings zr?r@r.r))r5rhrr6r6r7rc's  z$bdist_wininst.get_installer_filenamec Cs t}|jrl|j|krl|jdkr&d}q|jdkr6d}q|jdkrFd}q|jdkrVd}q|jdkrfd }qd }n@yd d lm}Wntk rd }YnX|jd d }|d}tjjt }|j dkr|j dddkr|j dd}nd}tjj |d||f}t |d}z|j S|jXdS)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@rrclose) r5Z cur_versionZbvrmajorZ directoryZsfixfilenamefr6r6r7r4s8         zbdist_wininst.get_exe_bytes)r Nr Pkeep the pseudo-installation tree around after creating the distribution archive)r rr6require 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}rarcrr6r6r6r7r sP &Q. 5 r )__doc__rTr>Zdistutils.corerZdistutils.utilrZdistutils.dir_utilrrZdistutils.errorsZdistutils.sysconfigrrzrr r6r6r6r7s    __pycache__/install_headers.cpython-36.opt-2.pyc000064400000003026152344523600015510 0ustar003 \@s ddlmZGdddeZdS))Commandc@sFeZdZdZddgZdgZdd Zd d Zd d ZddZ ddZ dS)install_headerszinstall C/C++ header files install-dir=d$directory to install header files toforcef-force installation (overwrite existing files)cCsd|_d|_g|_dS)Nr) install_dirroutfiles)selfr 9/usr/lib64/python3.6/distutils/command/install_headers.pyinitialize_optionssz"install_headers.initialize_optionscCs|jddddS)NZinstallrr r)rr )rr)Zset_undefined_options)r r r rfinalize_optionssz install_headers.finalize_optionscCsL|jj}|sdS|j|jx*|D]"}|j||j\}}|jj|q"WdS)N) distributionheadersZmkpathr Z copy_filer append)r rheaderout_r r rrun!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__Z descriptionZ user_optionsZboolean_optionsrrrrrr r r rr s rN)Zdistutils.corerrr r r rs __pycache__/install_egg_info.cpython-36.opt-2.pyc000064400000004402152344523600015651 0ustar003 \+ @s`ddlmZddlmZmZddlZddlZddlZGdddeZddZ dd Z d d Z dS) )Command)logdir_utilNc@s6eZdZdZdgZddZddZd d Zd d Zd S)install_egg_infoz8Install package's PKG-INFO metadata as an .egg-info file install-dir=ddirectory to install tocCs d|_dS)N) install_dir)selfr :/usr/lib64/python3.6/distutils/command/install_egg_info.pyinitialize_optionssz#install_egg_info.initialize_optionscCsb|jdddtt|jjtt|jjftjdd}t j j |j ||_ |j g|_dS)NZ install_libr z%s-%s-py%d.%d.egg-info)r r )Zset_undefined_options to_filename safe_name distributionZget_name safe_versionZ get_versionsys version_infoospathjoinr targetoutputs)r basenamer r r finalize_optionss z!install_egg_info.finalize_optionsc Cs|j}tjj|r2tjj| r2tj||jdnNtjj|rX|j tj |jfd|n(tjj|j s|j tj |j fd|j t jd||jst|ddd}|jjj|WdQRXdS)N)dry_runz Removing z Creating z Writing %swzUTF-8)encoding)rrrisdirislinkrZ remove_treerexistsZexecuteunlinkr makedirsrinfoopenrZmetadataZwrite_pkg_file)r rfr r r run s   zinstall_egg_info.runcCs|jS)N)r)r r r r get_outputs.szinstall_egg_info.get_outputsN)rrr) __name__ __module__ __qualname__Z descriptionZ user_optionsr rr'r(r r r r r s  rcCstjdd|S)Nz[^A-Za-z0-9.]+-)resub)namer r r r6srcCs|jdd}tjdd|S)N .z[^A-Za-z0-9.]+r,)replacer-r.)versionr r r r>s rcCs |jddS)Nr,_)r2)r/r r r rHsr) Z distutils.cmdrZ distutilsrrrrr-rrrrr r r r s + __pycache__/install_data.cpython-36.opt-2.pyc000064400000004203152344523600015004 0ustar003 \ @s8ddlZddlmZddlmZmZGdddeZdS)N)Command) change_root convert_pathc@sHeZdZdZdddgZdgZd d Zd dZddZddZ ddZ dS) install_datazinstall data files install-dir=dIbase directory for installing data files (default: installation base dir)root=Ns __pycache__/__init__.cpython-36.opt-1.pyc000064400000001027152344523600014104 0ustar003 \@s2dZddddddddd d d d d ddddddgZdS)z\distutils.command Package containing implementation of all the standard Distutils commands.ZbuildZbuild_pyZ build_extZ build_clibZ build_scriptsZcleanZinstallZ install_libZinstall_headersZinstall_scriptsZ install_dataZsdistregisterZbdistZ bdist_dumbZ bdist_rpmZ bdist_wininstZcheckZuploadN)__doc____all__rr2/usr/lib64/python3.6/distutils/command/__init__.pys&__pycache__/config.cpython-36.opt-1.pyc000064400000024112152344523600013612 0ustar003 \3@sldZddlZddlZddlmZddlmZddlmZddl m Z ddd Z Gd d d eZ dd d Z dS)adistutils.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 @seZdZdZd>d?d@dAdBdCdDdEdFg ZddZddZddZd d!Zd"d#Z d$d%Z d&d'Z d(d)Z d*d+Z dGd-d.ZdHd/d0ZdId1d2ZdJd3d4ZdKd5d6ZdLd8d9Zdddgfd:d;ZdMd  r)LANG_EXTopenwriteclose)r&bodyheaderslangfilenamefileheaderr'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?srcoutr'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%rDcompile)r&r=r>r!r?rEobjr'r'r(_compileszconfig._compilec Csr|j||||\}}tjjtjj|d} |jj|g| |||d|jjdk r\| |jj} |jj | ||| fS)Nr)r"r#Z target_lang) rKr-pathsplitextbasenamer Zlink_executableZ exe_extensionr%append) r&r=r>r!r"r#r?rErJprogr'r'r(_links    z config._linkc GsX|s|j}g|_tjddj|x0|D](}ytj|Wq(tk rNYq(Xq(WdS)Nz removing: %s )r%rinfojoinr-removeOSError)r& filenamesr@r'r'r(_cleans z config._cleanrc CsRddlm}|jd}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?rYokr'r'r(try_cpps  zconfig.try_cppc Csx|j|j||||\}}t|tr0tj|}t|}d} x&|j} | dkrPP|j| r>d} Pq>W|j |j | S)aConstruct 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. FT) r5rGr*r+rerIr:readlinesearchr<rX) r&patternr=r>r!r?rErFrAmatchliner'r'r( search_cpps    zconfig.search_cppc Csdddlm}|jy|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_compiles  zconfig.try_compilec Cspddlm}m}|jy|j||||||d} Wn||fk rPd} YnXtj| r^dp`d|j| S)zTry 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_links   zconfig.try_linkc Csddlm}m}|jy.|j||||||\} } } |j| gd} Wn||tfk rdd} YnXtj| rrdptd|j | S)zTry 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_runs   zconfig.try_runrc Cst|jg}|r|jd||jd|r<|jd|n|jd||jddj|d}|j|||||S)aDetermine 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)aDetermine 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|dS)zDetermine 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__Z descriptionZ user_optionsr)r/r0r5rCrGrKrQrXr[rcrdrfrgrjrkrlr'r'r'r(rsT         rc CsJ|dkrtjd|n tj|t|}ztj|jWd|jXdS)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( s     ;__pycache__/build.cpython-36.opt-2.pyc000064400000007616152344523600013457 0ustar003 \t@sPddlZddlZddlmZddlmZddlmZddZGdddeZ dS) N)Command)DistutilsOptionError) get_platformcCsddlm}|dS)Nr)show_compilers)Zdistutils.ccompilerr)rr//usr/lib64/python3.6/distutils/command/build.pyr s rc@seZdZdZd8d9d:ddddefd?d@dAdBdCg ZddgZd$dd%efgZd&d'Z d(d)Z d*d+Z d,d-Z d.d/Z d0d1Zd2d3Zd4e fd5e fd6efd7efgZdS)Dbuildz"build everything needed to install build-base=b base directory for build librarybuild-purelib=N2build directory for platform-neutral distributionsbuild-platlib=3build directory for platform-specific distributions build-lib=z9build directory for all distribution (defaults to either zbuild-purelib or build-platlibbuild-scripts=build directory for scripts build-temp=ttemporary build directoryz plat-name=pz6platform name to build for, if supported (default: %s) compiler=cspecify the compiler type parallel=jnumber of parallel build jobsdebugg;compile extensions and libraries with debugging informationforcef2forcibly build everything (ignore file timestamps) executable=e5specify 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 executableparallel)selfrrrinitialize_options8szbuild.initialize_optionsc CsZ|jdkrt|_ntjdkr&tdd|jftjdd}ttdrR|d7}|jdkrntj j |j d|_|j dkrtj j |j d||_ |j dkr|jjr|j |_ n|j|_ |jdkrtj j |j d||_|jdkrtj j |j d tjdd|_|jdkrtj jtj|_t|jtrVyt|j|_Wntk rTtd YnXdS) NntzW--plat-name only supported on Windows (try using './configure --help' on your platform)z .%s-%d.%dgettotalrefcountz-pydebuglibZtempz scripts-%d.%dzparallel should be an integer)r,rosnamersys version_infohasattrr'pathjoinr&r(r) distributionZ ext_modulesr*r+r-normpath isinstancer.strint ValueError)r/Zplat_specifierrrrfinalize_optionsHs<                zbuild.finalize_optionscCs x|jD]}|j|q WdS)N)Zget_sub_commandsZ run_command)r/Zcmd_namerrrrunsz build.runcCs |jjS)N)r<has_pure_modules)r/rrrrDszbuild.has_pure_modulescCs |jjS)N)r<has_c_libraries)r/rrrrEszbuild.has_c_librariescCs |jjS)N)r<has_ext_modules)r/rrrrFszbuild.has_ext_modulescCs |jjS)N)r< has_scripts)r/rrrrGszbuild.has_scriptsZbuild_pyZ build_clibZ build_extr+)r r r )r Nr )rNrWbuild 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__Z descriptionrZ user_optionsZboolean_optionsrZ help_optionsr0rBrCrDrErFrGZ sub_commandsrrrrrsR 8 r) r7r5Zdistutils.corerZdistutils.errorsrZdistutils.utilrrrrrrrs    __pycache__/bdist_wininst.cpython-36.opt-1.pyc000064400000020157152344523600015232 0ustar003 _Vj<@spdZddlZddlZddlmZddlmZddlmZm Z ddl Tddl m Z ddl mZGd d d eZdS) 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@seZdZdZd5dddefd7d9d:d;dd?d@dAdBg ZddddgZejd&kZ d'd(Z d)d*Z d+d,Z d-d.Z dCd/d0Zd1d2Zd3d4ZdS)D bdist_wininstz-create an executable installer for MS Windows bdist-dir=N1temporary directory for creating the distributionz plat-name=pz;platform name to embed in generated filenames (default: %s) keep-tempkz/keep the pseudo-installation tree around after z!creating the distribution archivetarget-version=z!require a specific python versionz on the target systemno-target-compilec/do not compile .py to .pyc on the target systemno-target-optimizeo;do not compile .py to .pyo (optimized) on the target system dist-dir=d-directory to put final built distributions inbitmap=b>bitmap to use for the installer instead of python-powered logotitle=t?title to display on the installer background instead of default skip-build2skip rebuilding everything (for testing/debugging)install-script=Ubasename of installation script to be run after installation or before deinstallationpre-install-script={Fully qualified filename of a script to be run before any files are installed. This script need not be in the distributionuser-access-control=specify Vista's UAC handling - 'none'/default=no handling, 'auto'=use UAC if target Python installed for all users, 'force'=always use UACwin32cCsRd|_d|_d|_d|_d|_d|_d|_d|_d|_d|_ d|_ d|_ d|_ dS)Nr) bdist_dir plat_name keep_tempno_target_compileno_target_optimizetarget_versiondist_dirbitmaptitle skip_buildinstall_scriptpre_install_scriptuser_access_control)selfr67/usr/lib64/python3.6/distutils/command/bdist_wininst.pyinitialize_options=sz bdist_wininst.initialize_optionscCs|jdd |jdkrR|jr6|jr6|jjd}|j|_|jdj}tj j |d|_|j s^d|_ |j r|jj rt }|j r|j |krtd|f||_ |jdd d |jrx2|jjD]}|jtj j|krPqWtd|jdS) Nbdistr1ZwininstzMtarget 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_objget_finalized_command bdist_baseospathjoinr-has_ext_modulesrZDistutilsOptionErrorr2scriptsbasename)r5r9r=Z short_versionscriptr6r6r7finalize_optionsMs4      zbdist_wininst.finalize_optionsc Cstjdkr&|jjs|jjr&td|js6|jd|jddd}|j |_ |j|_d|_ |j |_ |jd}d|_ d|_|jjr|j}|sd tjdd }d |j |f}|jd}tjj|jd ||_x4dD],}|j}|dkr|d}t|d||qWtjd|j |jtjjdtjj|j d|jtjd=ddlm}|} |jj } |j!| d|j d} |j"| | |j#|jjrt$} nd} |jj%j&d| |j'| ftj(d| tj)| |j*st+|j |j,ddS)Nr'z^distribution contains extensions and/or C libraries; must be compiled on a Windows 32 platformbuildinstall)Zreinit_subcommandsr install_libz%d.%dz.%s-%slibpurelibplatlibheadersrBdataz/Include/$dist_nameZinstall_zinstalling to %sZPURELIB)mktempzip)Zroot_diranyr zremoving temporary file '%s')dry_run)rLrMrNrBrO)-sysplatformr;rAZhas_c_librariesZDistutilsPlatformErrorr1Z run_commandZreinitialize_commandr(rootZwarn_dirr)compileoptimizer- version_infor<r>r?r@Z build_baseZ build_libuppersetattrrinfoZensure_finalizedinsertrunZtempfilerP get_fullnameZ make_archive create_exer/rZ dist_filesappendget_installer_filenamedebugremover*rrS) r5rGrIr-Zplat_specifierrFkeyvaluerPZarchive_basenamefullnamearcnameZ pyversionr6r6r7r^ssd                  zbdist_wininst.runc Cs`g}|jj}|jd|jpdd}dd}xJdD]B}t||d}|r2|d|j||f}|jd|||fq2W|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 |jddS)Nriz\n)replace)sr6r6r7escapesz)bdist_wininst.get_inidata..escapeauthor author_email description maintainermaintainer_emailnameurlversionz %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_descriptiongetattr capitalizer2r+r,r-r4r0r_time distutilsZctime __version__r@) r5linesrur\rlrrrOr0rxryZ build_infor6r6r7 get_inidatas<   zbdist_wininst.get_inidatac Csddl}|j|j|j}|j|}|jd||rPt|dj}t|}nd}t|d} | j |j |rz| j |t |t r|j d}|d}|jrt|jddd } | jj d} WdQRX|| d }n|d}| j ||jd d t||} | j | | j t|djdS) Nrz creating %srbwbmbcsrzlatin-1)encodings zr?r@r.r))r5rgrr6r6r7rb's  z$bdist_wininst.get_installer_filenamec Cs t}|jrl|j|krl|jdkr&d}q|jdkr6d}q|jdkrFd}q|jdkrVd}q|jdkrfd }qd }n@yd d lm}Wntk rd }YnX|jd d }|d}tjjt }|j dkr|j dddkr|j dd}nd}tjj |d||f}t |d}z|j S|jXdS)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@rrclose) r5Z cur_versionZbvrmajorZ directoryZsfixfilenamefr6r6r7r4s8         zbdist_wininst.get_exe_bytes)r Nr Pkeep the pseudo-installation tree around after creating the distribution archive)r rr6require 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`rbrr6r6r6r7r sP &Q. 5 r )__doc__rTr>Zdistutils.corerZdistutils.utilrZdistutils.dir_utilrrZdistutils.errorsZdistutils.sysconfigrryrr r6r6r6r7s    __pycache__/upload.cpython-36.opt-2.pyc000064400000012057152344523600013637 0ustar003 _Vj@sddlZddlZddlZddlZddlmZddlmZmZm Z ddl m Z ddl m Z mZddlmZddlmZddlmZGd d d eZdS) N)standard_b64encode)urlopenRequest HTTPError)urlparse)DistutilsErrorDistutilsOptionError) PyPIRCCommand)spawn)logc@sJeZdZdZejddgZejdgZdd Zd d Zd d Z ddZ dS)uploadzupload binary package to PyPIsignssign files to upload using gpg identity=iGPG identity used to sign filescCs,tj|d|_d|_d|_d|_d|_dS)NrF)r initialize_optionsusernamepassword show_responser identity)selfr0/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 repositoryrealm) r finalize_optionsrr rZ _read_pypircrrrr distribution)rconfigrrrr(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)rmsgcommand pyversionfilenamerrrrun: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| jd| 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}|dkrt(j)\}}}|rd||f}n|dkrdt(j(dd}||d<|jrtjj|dt|dd jf|d<|j*d|j+j,d}d t-|j.d}d!}d"|j,d}|d#}t/j0}x|j1D]\}}d$|}t2|t3s|g}xr|D]j}t4|t5kr|d%|d7}|d}nt6|j,d&}|j7||j7|j,d&|j7d'|j7|qWqjW|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$jAWYdd}~XnX|#d,kr8|j#d-|#|$ft$j%|jBrZ|jC|"}%d.jDd/d0|%d/d0f}|j#|t$j%n"d1|#|$f}|j#|t$jAtE|dS)3NzIncompatible url %shttphttpszunsupported schema Zgpgz --detach-signz-az --local-user)dry_runrbZ file_upload1z1.0)z:actionZprotocol_versionnameversioncontentZfiletyper$Z sha256_digestZmetadata_versionZsummaryZ home_pageZauthorZ author_emaillicense descriptionkeywordsplatformZ classifiersZ download_urlZprovidesZrequiresZ obsoletesz#calculating md5 checksum failed: %sr) get_fips_modeZ md5_digestrZ bdist_rpmzbuilt for %s %sZ bdist_dumbz built for %s)Ztersecommentz.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)dataheaderszServer response (%s): %s -KzUpload failed (%s): %s)r'r()FrrAssertionErrorr rr r*openreadcloserZmetadataZget_nameZ get_versionospathbasenamehashlibZsha256Z hexdigestZget_descriptionZget_urlZ get_contactZget_contact_emailZ get_licenceZget_long_descriptionZ get_keywordsZ get_platformsZget_classifiersZget_download_urlZ get_providesZ get_requiresZ get_obsoletesZmd5 ValueErrorZannouncer INFOZ_hashlibr4r3distrrencoderdecodeioBytesIOitems isinstancelisttypetuplestrwritegetvaluelenrrZgetcoder"rcodeOSErrorZERRORrZ_read_pypi_responsejoinr)&rr#r$r%ZschemaZnetlocZurlZparamsZqueryZ fragmentsZgpg_argsfr/metar9Zdigester"r4r6rIr.idZ user_passZauthboundaryZ sep_boundaryZ end_boundaryZbodykeyvaluetitler:ZrequestresultZstatusreasontextrrrr!Bs                       zupload.upload_fileN)r rr)rrr) __name__ __module__ __qualname__r1r Z user_optionsZboolean_optionsrrr&r!rrrrr s r )rCrLr3rFbase64rZurllib.requestrrrZ urllib.parserZdistutils.errorsrrZdistutils.corer Zdistutils.spawnr Z distutilsr r rrrrs     __pycache__/build_scripts.cpython-36.opt-2.pyc000064400000007544152344523600015226 0ustar003 \X@sddlZddlZddlmZddlmZddlmZddlm Z ddl m Z m Z ddlm Z ddlZejdZGd d d eZGd d d ee ZdS) N)ST_MODE) sysconfig)Command)newer) convert_path Mixin2to3)logs^#!.*python[0-9.]*([ ].*)?$c@sHeZdZdZdddgZdgZd d Zd dZddZddZ ddZ dS) build_scriptsz("build" scripts (copy and fixup #! line) build-dir=ddirectory to "build" (copy) toforcef1forcibly build everything (ignore file timestamps executable=e*specify final destination interpreter pathcCs"d|_d|_d|_d|_d|_dS)N) build_dirscriptsr executableoutfiles)selfr7/usr/lib64/python3.6/distutils/command/build_scripts.pyinitialize_optionss z build_scripts.initialize_optionscCs|jdddd|jj|_dS) NZbuildr rr r)r r)r r )rr)Zset_undefined_optionsZ distributionr)rrrrfinalize_options%s zbuild_scripts.finalize_optionscCs|jS)N)r)rrrrget_source_files,szbuild_scripts.get_source_filescCs|js dS|jdS)N)r copy_scripts)rrrrrun/szbuild_scripts.runc"Cs|j|jg}g}x,|jD] }d}t|}tjj|jtjj|}|j||j rtt || rtt j d|qyt |d}Wn tk r|jsd}YnXXtj|j\}}|jd|j} | s|jd|qtj| } | rd}| jdpd} |rt jd ||j|j||js tjs2|j} n(tjjtjd d tjd tjd f} tj| } d| | d} y| jdWn$tk rt dj!| YnXy| j|Wn&tk rt dj!| |YnXt |d}|j"| |j#|j$WdQRX|r@|j%q|r*|j%|j||j&||qWtj'dkrxh|D]`}|jrpt jd|nDtj(|t)d@}|dBd@}||krVt jd|||tj*||qVW||fS)NFznot copying %s (up-to-date)rbrz%s is an empty file (skipping)Tzcopying and adjusting %s -> %sBINDIRz python%s%sVERSIONEXEs#! zutf-8z.The shebang ({!r}) is not decodable from utf-8zAThe shebang ({!r}) is not decodable from the script encoding ({})wbposixzchanging mode of %siimz!changing mode of %s from %o to %o)+Zmkpathrrrospathjoinbasenameappendr rrdebugopenOSErrordry_runtokenizedetect_encodingreadlineseekwarn first_line_rematchgroupinforZ python_buildrget_config_varfsencodedecodeUnicodeDecodeError ValueErrorformatwrite writelines readlinescloseZ copy_filenamestatrchmod)rr updated_filesZscriptZadjustZoutfilerencodinglinesZ first_liner7Z post_interprZshebangZoutffileZoldmodeZnewmoderrrr5s                  zbuild_scripts.copy_scriptsN)r r r )r rr)rrr) __name__ __module__ __qualname__Z descriptionZ user_optionsZboolean_optionsrrrrrrrrrr sr c@seZdZddZdS)build_scripts_2to3cCs&tj|\}}|js|j|||fS)N)r rr0Zrun_2to3)rrrGrrrrs zbuild_scripts_2to3.copy_scriptsN)rKrLrMrrrrrrNsrN)r(rerErZ distutilsrZdistutils.corerZdistutils.dep_utilrZdistutils.utilrrrr1compiler6r rNrrrrs       __pycache__/bdist_wininst.cpython-36.opt-2.pyc000064400000017744152344523600015243 0ustar003 _Vj<@slddlZddlZddlmZddlmZddlmZmZddl Tddl m Z ddl m Z Gdd d eZdS) N)Command) get_platform) create_tree remove_tree)*)get_python_version)logc@seZdZdZd5dddefd7d9d:d;dd?d@dAdBg ZddddgZejd&kZ d'd(Z d)d*Z d+d,Z d-d.Z dCd/d0Zd1d2Zd3d4ZdS)D bdist_wininstz-create an executable installer for MS Windows bdist-dir=N1temporary directory for creating the distributionz plat-name=pz;platform name to embed in generated filenames (default: %s) keep-tempkz/keep the pseudo-installation tree around after z!creating the distribution archivetarget-version=z!require a specific python versionz on the target systemno-target-compilec/do not compile .py to .pyc on the target systemno-target-optimizeo;do not compile .py to .pyo (optimized) on the target system dist-dir=d-directory to put final built distributions inbitmap=b>bitmap to use for the installer instead of python-powered logotitle=t?title to display on the installer background instead of default skip-build2skip rebuilding everything (for testing/debugging)install-script=Ubasename of installation script to be run after installation or before deinstallationpre-install-script={Fully qualified filename of a script to be run before any files are installed. This script need not be in the distributionuser-access-control=specify Vista's UAC handling - 'none'/default=no handling, 'auto'=use UAC if target Python installed for all users, 'force'=always use UACwin32cCsRd|_d|_d|_d|_d|_d|_d|_d|_d|_d|_ d|_ d|_ d|_ dS)Nr) bdist_dir plat_name keep_tempno_target_compileno_target_optimizetarget_versiondist_dirbitmaptitle skip_buildinstall_scriptpre_install_scriptuser_access_control)selfr67/usr/lib64/python3.6/distutils/command/bdist_wininst.pyinitialize_options=sz bdist_wininst.initialize_optionscCs|jdd |jdkrR|jr6|jr6|jjd}|j|_|jdj}tj j |d|_|j s^d|_ |j r|jj rt }|j r|j |krtd|f||_ |jdd d |jrx2|jjD]}|jtj j|krPqWtd|jdS) Nbdistr1ZwininstzMtarget 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_objget_finalized_command bdist_baseospathjoinr-has_ext_modulesrZDistutilsOptionErrorr2scriptsbasename)r5r9r=Z short_versionscriptr6r6r7finalize_optionsMs4      zbdist_wininst.finalize_optionsc Cstjdkr&|jjs|jjr&td|js6|jd|jddd}|j |_ |j|_d|_ |j |_ |jd}d|_ d|_|jjr|j}|sd tjdd }d |j |f}|jd}tjj|jd ||_x4dD],}|j}|dkr|d}t|d||qWtjd|j |jtjjdtjj|j d|jtjd=ddlm}|} |jj } |j!| d|j d} |j"| | |j#|jjrt$} nd} |jj%j&d| |j'| ftj(d| tj)| |j*st+|j |j,ddS)Nr'z^distribution contains extensions and/or C libraries; must be compiled on a Windows 32 platformbuildinstall)Zreinit_subcommandsr install_libz%d.%dz.%s-%slibpurelibplatlibheadersrBdataz/Include/$dist_nameZinstall_zinstalling to %sZPURELIB)mktempzip)Zroot_diranyr zremoving temporary file '%s')dry_run)rLrMrNrBrO)-sysplatformr;rAZhas_c_librariesZDistutilsPlatformErrorr1Z run_commandZreinitialize_commandr(rootZwarn_dirr)compileoptimizer- version_infor<r>r?r@Z build_baseZ build_libuppersetattrrinfoZensure_finalizedinsertrunZtempfilerP get_fullnameZ make_archive create_exer/rZ dist_filesappendget_installer_filenamedebugremover*rrS) r5rGrIr-Zplat_specifierrFkeyvaluerPZarchive_basenamefullnamearcnameZ pyversionr6r6r7r^ssd                  zbdist_wininst.runc Cs`g}|jj}|jd|jpdd}dd}xJdD]B}t||d}|r2|d|j||f}|jd|||fq2W|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 |jddS)Nriz\n)replace)sr6r6r7escapesz)bdist_wininst.get_inidata..escapeauthor author_email description maintainermaintainer_emailnameurlversionz %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_descriptiongetattr capitalizer2r+r,r-r4r0r_time distutilsZctime __version__r@) r5linesrur\rlrrrOr0rxryZ build_infor6r6r7 get_inidatas<   zbdist_wininst.get_inidatac Csddl}|j|j|j}|j|}|jd||rPt|dj}t|}nd}t|d} | j |j |rz| j |t |t r|j d}|d}|jrt|jddd } | jj d} WdQRX|| d }n|d}| j ||jd d t||} | j | | j t|djdS) Nrz creating %srbwbmbcsrzlatin-1)encodings zr?r@r.r))r5rgrr6r6r7rb's  z$bdist_wininst.get_installer_filenamec Cs t}|jrl|j|krl|jdkr&d}q|jdkr6d}q|jdkrFd}q|jdkrVd}q|jdkrfd }qd }n@yd d lm}Wntk rd }YnX|jd d }|d}tjjt }|j dkr|j dddkr|j dd}nd}tjj |d||f}t |d}z|j S|jXdS)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@rrclose) r5Z cur_versionZbvrmajorZ directoryZsfixfilenamefr6r6r7r4s8         zbdist_wininst.get_exe_bytes)r Nr Pkeep the pseudo-installation tree around after creating the distribution archive)r rr6require 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`rbrr6r6r6r7r sP &Q. 5 r )rTr>Zdistutils.corerZdistutils.utilrZdistutils.dir_utilrrZdistutils.errorsZdistutils.sysconfigrryrr r6r6r6r7s    __pycache__/config.cpython-36.pyc000064400000024112152344523600012653 0ustar003 \3@sldZddlZddlZddlmZddlmZddlmZddl m Z ddd Z Gd d d eZ dd d Z dS)adistutils.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 @seZdZdZd>d?d@dAdBdCdDdEdFg ZddZddZddZd d!Zd"d#Z d$d%Z d&d'Z d(d)Z d*d+Z dGd-d.ZdHd/d0ZdId1d2ZdJd3d4ZdKd5d6ZdLd8d9Zdddgfd:d;ZdMd  r)LANG_EXTopenwriteclose)r&bodyheaderslangfilenamefileheaderr'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?srcoutr'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%rDcompile)r&r=r>r!r?rEobjr'r'r(_compileszconfig._compilec Csr|j||||\}}tjjtjj|d} |jj|g| |||d|jjdk r\| |jj} |jj | ||| fS)Nr)r"r#Z target_lang) rKr-pathsplitextbasenamer Zlink_executableZ exe_extensionr%append) r&r=r>r!r"r#r?rErJprogr'r'r(_links    z config._linkc GsX|s|j}g|_tjddj|x0|D](}ytj|Wq(tk rNYq(Xq(WdS)Nz removing: %s )r%rinfojoinr-removeOSError)r& filenamesr@r'r'r(_cleans z config._cleanrc CsRddlm}|jd}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?rYokr'r'r(try_cpps  zconfig.try_cppc Csx|j|j||||\}}t|tr0tj|}t|}d} x&|j} | dkrPP|j| r>d} Pq>W|j |j | S)aConstruct 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. FT) r5rGr*r+rerIr:readlinesearchr<rX) r&patternr=r>r!r?rErFrAmatchliner'r'r( search_cpps    zconfig.search_cppc Csdddlm}|jy|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_compiles  zconfig.try_compilec Cspddlm}m}|jy|j||||||d} Wn||fk rPd} YnXtj| r^dp`d|j| S)zTry 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_links   zconfig.try_linkc Csddlm}m}|jy.|j||||||\} } } |j| gd} Wn||tfk rdd} YnXtj| rrdptd|j | S)zTry 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_runs   zconfig.try_runrc Cst|jg}|r|jd||jd|r<|jd|n|jd||jddj|d}|j|||||S)aDetermine 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)aDetermine 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|dS)zDetermine 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__Z descriptionZ user_optionsr)r/r0r5rCrGrKrQrXr[rcrdrfrgrjrkrlr'r'r'r(rsT         rc CsJ|dkrtjd|n tj|t|}ztj|jWd|jXdS)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( s     ;__pycache__/build_ext.cpython-36.opt-1.pyc000064400000040256152344523600014333 0ustar003 \z@sdZddlZddlZddlZddlZddlmZddlTddlm Z m Z ddlm Z ddl m Z ddlmZdd lmZdd lmZdd lmZejd Zd dZGdddeZdS)zdistutils.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_compilerget_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 r3/usr/lib64/python3.6/distutils/command/build_ext.pyr s r c@seZdZdZdejZd`dad d d efdcdddefdddedfdddefdgdhdidjdkdldmdndodpgZd d%d(d1d8gZ d:d2d;e fgZ dd?Z d@dAZdBdCZdDdEZdFdGZdHdIZdJdKZdLdMZejdNdOZdPdQZdRdSZdTdUZdVdWZdXdYZdZd[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=t1directory for temporary files (build by-products)z plat-name=pz>platform name to cross-compile for, if supported (default: %s)inplaceiz=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 filesdefine=DC preprocessor macros to defineundef=U!C preprocessor macros to undefine libraries=l!external C libraries to link withz library-dirs=Lz.directories to search for external C librariesrpath=R7directories to search for shared C libraries at runtime link-objects=O2extra explicit link objects to include in the linkdebugg'compile/link with debugging informationforcef2forcibly build everything (ignore file timestamps) compiler=cspecify the compiler type parallel=jnumber of parallel build jobsswig-cppN)make SWIG create C++ files (default is C) swig-opts=!list of SWIG command line optionsswig=path to the SWIG executableuser#add user include, library and rpathz help-compilerzlist available compilerscCsd|_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_temprpackage include_dirsdefineundef libraries library_dirsrpath link_objectsr+r.compilerswigswig_cpp swig_optsr=parallel)selfrrrinitialize_optionsjs*zbuild_ext.initialize_optionsc Csddlm}|jdd'd(d)d*d+d,d-|jdkr8|jj|_|jj|_|j}|jd d }|j dkrn|jj pjg|_ t |j t r|j j t j|_ tjtjkr|j jt jjtjd |j j|||kr|j j||jd|jd|jdkrg|_|jdkrg|_nt |jt r&|jj t j|_|jdkr:g|_nt |jt rX|jj t j|_t jdkrT|jjt jjtjdtjtjkr|jjt jjtjd|jrt jj|jd|_nt jj|jd|_|j jt jjtttdd}|r|jj||j dkrd}n|j dd}t jjtjd}|rHt jj||}|jj|tj!dddks|tj!dddkrtj"j#t jjtjdr|jjt jjtjddt$dn |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)dkrHg|_)n|j)j d%|_)|j*rt jjt+d }t jjt+d} t jj,|r|j j|t jj,| r|jj| |jj| t |j-t ryt.|j-|_-Wnt/k rt0d&YnXdS).Nr) sysconfigZbuildr@rBrKr+r.rOrA)Z plat_specificincluderGrJntZlibsZDebugZRelease_homewin32ZPCbuildcygwinatheosbinlibpythonconfig.Py_ENABLE_SHAREDLIBDIR,cSsg|] }|dfqS)1r).0Zsymbolrrr sz.build_ext.finalize_options.. zparallel should be an integer)r@r@)rBrB)rKrK)r+r+)r.r.)rOrO)rArA)1 distutilsrRZset_undefined_optionsrC distributionZ ext_packageZ ext_modulesr?Zget_python_incrD isinstancestrsplitospathsepsys exec_prefixbase_exec_prefixappendpathjoinZensure_string_listrGrHrInameprefixr+rBdirnamergetattrrAplatform executable startswithrget_config_varZ python_buildrErFrNr=r isdirrOint ValueErrorZDistutilsOptionError) rPrRZ py_includeZplat_py_include _sys_homesuffixZnew_libZdefinesZ user_includeZuser_librrrfinalize_optionss                    (         zbuild_ext.finalize_optionscCstddlm}|jsdS|jjrL|jd}|jj|jp:g|j j |j ||j |j |j|jd|_ t|j tjdkr|jtkr|j j|j|jdk r|j j|j|jdk rx |jD]\}}|j j||qW|jdk rx|jD]}|j j|qW|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)rKverbosedry_runr.rU)#r rr?riZhas_c_librariesget_finalized_commandrGextendZget_library_namesrHrrrrKrrr.rrmrurAr Z initializerDZset_include_dirsrEZ define_macrorFZundefine_macroZ set_librariesZset_library_dirsrIZset_runtime_library_dirsrJZset_link_objectsbuild_extensions)rPrrruvaluemacrorrrruns>             z build_ext.runc Cst|tstdxnt|D]`\}}t|tr4qt|t sLt|dkrTtd|\}}tjd|t|t ozt j |stdt|t stdt||d}x*dD]"}|j |}|dk rt|||qW|j d|_d|krtjd|j d}|rxg|_g|_xj|D]b} t| to,t| dks8tdt| dkrX|jj| dnt| dkr|jj| qW|||<qWdS)aEnsure 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 instanceszMeach 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_objectsextra_compile_argsextra_link_argsNrIZdef_filez9'def_file' element of build info dict no longer supportedmacrosrSz9'macros' element of build info dict must be 1- or 2-tupler)rDrHrGrrr)rSr)rjlistDistutilsSetupError enumeratertuplelenr warnrkextension_name_rematchdictgetsetattrruntime_library_dirs define_macros undef_macrosrr) rPr?rextext_nameZ build_infokeyvalrrrrrcheck_extensions_listUsT           zbuild_ext.check_extensions_listcCs0|j|jg}x|jD]}|j|jqW|S)N)rr?rr)rP filenamesrrrrget_source_filess   zbuild_ext.get_source_filescCs6|j|jg}x |jD]}|j|j|jqW|S)N)rr?rrget_ext_fullpathru)rPZoutputsrrrr get_outputss   zbuild_ext.get_outputscCs(|j|j|jr|jn|jdS)N)rr?rO_build_extensions_parallel_build_extensions_serial)rPrrrrs  zbuild_ext.build_extensionscsj}jdkrtj}yddlm}Wntk r@d}YnX|dkrVjdS||dTfddjD}x6tj|D]&\}}j ||j WdQRXqWWdQRXdS)NTr)ThreadPoolExecutor)Z max_workerscsg|]}jj|qSr)Zsubmitbuild_extension)rer)executorrPrrrfsz8build_ext._build_extensions_parallel..) rOrm cpu_countZconcurrent.futuresr ImportErrorrr?zip_filter_build_errorsresult)rPZworkersrZfuturesrZfutr)rrPrrs       z$build_ext._build_extensions_parallelc Cs4x.|jD]$}|j||j|WdQRXqWdS)N)r?rr)rPrrrrrs  z"build_ext._build_extensions_serialccsTy dVWnDtttfk rN}z"|js*|jd|j|fWYdd}~XnXdS)Nz"building extension "%s" failed: %s)ZCCompilerErrorZDistutilsErrorZ CompileErrorZoptionalrru)rPrerrrrs zbuild_ext._filter_build_errorsc CsX|j}|dkst|ttf r,td|jt|}|j|j}||j}|jpZt ||dsnt j d|jdSt j d|j|j ||}|jpg}|jdd}x|jD]}|j|fqW|jj||j||j|j ||jd}|dd|_|jr|j|j|jp g}|jp|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_dirrrDr+extra_postargsdepends)rGrHrrexport_symbolsr+rBZ target_lang)!rrjrrrrurrr.rr r+info swig_sourcesrrrrrrKcompilerBrDZ_built_objectsrrrlanguageZdetect_languageZlink_shared_object get_librariesrHrget_export_symbols) rPrrext_pathrZ extra_argsrrFZobjectsrrrrrsN         zbuild_ext.build_extensioncCs2g}g}i}|jrtjd|js6d|jks6d|jkr        zbuild_ext.swig_sourcescCs`tjdkrdStjdkrNxBd D]&}tjjd|d}tjj|r|SqWdSntd tjd S) zReturn the name of the SWIG executable. On Unix, this is just "swig" -- it should be in the PATH. Tries a bit harder on Windows. posixrLrU1.31.21.1z c:\swig%szswig.exez>I don't know how to find (much less run) SWIG on platform '%s'N)rrr)rmrursrtisfileZDistutilsPlatformError)rPZversfnrrrrfs    zbuild_ext.find_swigcCs|j|}|jd}|j|d}|jsRtjj|dd|g}tjj|j|Sdj|dd}|jd}tjj |j |}tjj||S) zReturns the path of the filename for a given extension. The file is located in `build_lib` or directly in the package (inplace option). r`rSNrbuild_pyrrr) get_ext_fullnamerlget_ext_filenamerrmrsrtr@rabspathZget_package_dir)rPrfullnameZmodpathfilenamerCrZ package_dirrrrr~s   zbuild_ext.get_ext_fullpathcCs |jdkr|S|jd|SdS)zSReturns the fullname of a given extension name. Adds the `package.` prefixNr`)rC)rPrrrrrs zbuild_ext.get_ext_fullnamecCs.ddlm}|jd}|d}tjj||S)zConvert 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)rPrr|rZ ext_suffixrrrrs  zbuild_ext.get_ext_filenamecCs0d|jjdd}||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)rurlrrr)rPrZ initfunc_namerrrrs  zbuild_ext.get_export_symbolscCstjdkrfddlm}t|j|s\d}|jr4|d}|tjd?tjd?d@f}|j|gS|jSnRtjd d d krd }|tjd?tjd?d@f}|j|gStjd d d kr>ddl m }d }|tjd?tjd?d@f}g}xB|j dj D]0}|j dr|j|dd n |j|qW|j|dg|StjdkrP|jStjd ddkrj|jSddl m }|j drdjtjd?tjd?d@|j d}|j|gS|jSd S)zReturn 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_dNrYrZz python%d.%dr[)rRSHLIBSz-lrmdarwinaixraz python{}.{}{}ABIFLAGS)roryZdistutils._msvccompilerrrjrKr+ hexversionrGrhrRr|rlr{rrformat)rPrrtemplateZ pythonlibrRZextrar]rrrrsJ             zbuild_ext.get_libraries)rrr)rrriignore 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__Z descriptionrmrnZsep_byr Z user_optionsZboolean_optionsr Z help_optionsrQrrrrrrrr contextlibcontextmanagerrrrrrrrrrrrrrr!s  @N  K6   r)__doc__rrmreroZdistutils.corerZdistutils.errorsrrrrZdistutils.dep_utilrZdistutils.extensionrZdistutils.utilr rhr Zsiter rrr rrrrrs"       __pycache__/build_scripts.cpython-36.pyc000064400000010356152344523600014261 0ustar003 \X@sdZddlZddlZddlmZddlmZddlmZddl m Z ddl m Z m Z ddlmZddlZejd ZGd d d eZGd 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@sHeZdZdZdddgZdgZd d Zd dZddZddZ ddZ dS) build_scriptsz("build" scripts (copy and fixup #! line) build-dir=ddirectory to "build" (copy) toforcef1forcibly build everything (ignore file timestamps executable=e*specify final destination interpreter pathcCs"d|_d|_d|_d|_d|_dS)N) build_dirscriptsr executableoutfiles)selfr7/usr/lib64/python3.6/distutils/command/build_scripts.pyinitialize_optionss z build_scripts.initialize_optionscCs|jdddd|jj|_dS) NZbuildr rr r)r r)r r )rr)Zset_undefined_optionsZ distributionr)rrrrfinalize_options%s zbuild_scripts.finalize_optionscCs|jS)N)r)rrrrget_source_files,szbuild_scripts.get_source_filescCs|js dS|jdS)N)r copy_scripts)rrrrrun/szbuild_scripts.runc"Cs|j|jg}g}x,|jD] }d}t|}tjj|jtjj|}|j||j rtt || rtt j d|qyt |d}Wn tk r|jsd}YnXXtj|j\}}|jd|j} | s|jd|qtj| } | rd}| jdpd } |rt jd ||j|j||js tjs2|j} n(tjjtjd d tjd tjdf} tj| } d| | d} y| jdWn$tk rt dj!| YnXy| j|Wn&tk rt dj!| |YnXt |d}|j"| |j#|j$WdQRX|r@|j%q|r*|j%|j||j&||qWtj'dkrxh|D]`}|jrpt jd|nDtj(|t)d@}|dBd@}||krVt jd|||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)Tzcopying and adjusting %s -> %sBINDIRz python%s%sVERSIONEXEs#! zutf-8z.The shebang ({!r}) is not decodable from utf-8zAThe shebang ({!r}) is not decodable from the script encoding ({})wbposixzchanging mode of %siimz!changing mode of %s from %o to %o)+Zmkpathrrrospathjoinbasenameappendr rrdebugopenOSErrordry_runtokenizedetect_encodingreadlineseekwarn first_line_rematchgroupinforZ python_buildrget_config_varfsencodedecodeUnicodeDecodeError ValueErrorformatwrite writelines readlinescloseZ copy_filenamestatrchmod)rr updated_filesZscriptZadjustZoutfilerencodinglinesZ first_liner7Z post_interprZshebangZoutffileZoldmodeZnewmoderrrr5s                  zbuild_scripts.copy_scriptsN)r r r )r rr)rrr) __name__ __module__ __qualname__Z descriptionZ user_optionsZboolean_optionsrrrrrrrrrr sr c@seZdZddZdS)build_scripts_2to3cCs&tj|\}}|js|j|||fS)N)r rr0Zrun_2to3)rrrGrrrrs zbuild_scripts_2to3.copy_scriptsN)rKrLrMrrrrrrNsrN)__doc__r(rerErZ distutilsrZdistutils.corerZdistutils.dep_utilrZdistutils.utilrrrr1compiler6r rNrrrrs       __pycache__/upload.cpython-36.opt-1.pyc000064400000012255152344523600013636 0ustar003 _Vj@sdZddlZddlZddlZddlZddlmZddlmZm Z m Z ddl m Z ddl mZmZddlmZddlmZdd lmZGd d d eZdS) zm distutils.command.upload Implements the Distutils 'upload' subcommand (upload package to a package index). N)standard_b64encode)urlopenRequest HTTPError)urlparse)DistutilsErrorDistutilsOptionError) PyPIRCCommand)spawn)logc@sJeZdZdZejddgZejdgZdd Zd d Zd d Z ddZ dS)uploadzupload binary package to PyPIsignssign files to upload using gpg identity=iGPG identity used to sign filescCs,tj|d|_d|_d|_d|_d|_dS)NrF)r initialize_optionsusernamepassword show_responser identity)selfr0/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 repositoryrealm) r finalize_optionsrr rZ _read_pypircrrrr distribution)rconfigrrrr(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)rmsgcommand pyversionfilenamerrrrun: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| jd| 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}|dkrt(j)\}}}|rd||f}n|dkrdt(j(dd}||d<|jrtjj|dt|dd jf|d<|j*d|j+j,d}d t-|j.d}d!}d"|j,d}|d#}t/j0}x|j1D]\}}d$|}t2|t3s|g}xr|D]j}t4|t5kr|d%|d7}|d}nt6|j,d&}|j7||j7|j,d&|j7d'|j7|qWqjW|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$jAWYdd}~XnX|#d,kr8|j#d-|#|$ft$j%|jBrZ|jC|"}%d.jDd/d0|%d/d0f}|j#|t$j%n"d1|#|$f}|j#|t$jAtE|dS)3NzIncompatible url %shttphttpszunsupported schema Zgpgz --detach-signz-az --local-user)dry_runrbZ file_upload1z1.0)z:actionZprotocol_versionnameversioncontentZfiletyper$Z sha256_digestZmetadata_versionZsummaryZ home_pageZauthorZ author_emaillicense descriptionkeywordsplatformZ classifiersZ download_urlZprovidesZrequiresZ obsoletesz#calculating md5 checksum failed: %sr) get_fips_modeZ md5_digestrZ bdist_rpmzbuilt for %s %sZ bdist_dumbz built for %s)Ztersecommentz.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)dataheaderszServer response (%s): %s -KzUpload failed (%s): %s)r'r()FrrAssertionErrorr rr r*openreadcloserZmetadataZget_nameZ get_versionospathbasenamehashlibZsha256Z hexdigestZget_descriptionZget_urlZ get_contactZget_contact_emailZ get_licenceZget_long_descriptionZ get_keywordsZ get_platformsZget_classifiersZget_download_urlZ get_providesZ get_requiresZ get_obsoletesZmd5 ValueErrorZannouncer INFOZ_hashlibr4r3distrrencoderdecodeioBytesIOitems isinstancelisttypetuplestrwritegetvaluelenrrZgetcoder"rcodeOSErrorZERRORrZ_read_pypi_responsejoinr)&rr#r$r%ZschemaZnetlocZurlZparamsZqueryZ fragmentsZgpg_argsfr/metar9Zdigester"r4r6rIr.idZ user_passZauthboundaryZ sep_boundaryZ end_boundaryZbodykeyvaluetitler:ZrequestresultZstatusreasontextrrrr!Bs                       zupload.upload_fileN)r rr)rrr) __name__ __module__ __qualname__r1r Z user_optionsZboolean_optionsrrr&r!rrrrr s r )__doc__rCrLr3rFbase64rZurllib.requestrrrZ urllib.parserZdistutils.errorsrrZdistutils.corer Zdistutils.spawnr Z distutilsr r rrrrs     __pycache__/bdist_msi.cpython-36.pyc000064400000046467152344523600013404 0ustar003 \@sdZddlZddlZddlmZddlmZddlmZddl m Z ddl m Z ddl mZdd lmZddlZdd lmZmZmZdd lmZmZmZmZGd d d eZGdddeZdS)z# Implements the bdist_msi command. N)Command) remove_tree)get_python_version) StrictVersion)DistutilsOptionError) get_platform)log)schemasequencetext) DirectoryFeatureDialogadd_datac@sFeZdZdZddZddZddd Zdd d ZdddZddZ dS)PyDialogzDialog 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||jddS)zbDialog(database, name, x, y, w, h, attributes, title, first, default, cancel, bitmap=true)$iHZ BottomLinerN)r__init__hlinew)selfargskwZrulerZbmwidthr3/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 )rtitlerrrr #szPyDialog.titleBackc Cs,|r d}nd}|j|d|jddd|||S)zAdd 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 associatedr"8) pushbuttonr)rr nextnameactiveflagsrrrback*sz PyDialog.backCancelc Cs,|r d}nd}|j|d|jddd|||S)zAdd 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,rrrcancel5szPyDialog.cancelNextc Cs,|r d}nd}|j|d|jddd|||S)zAdd 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)zAdd 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 associatedr%r&r'r#)r(intrr)rr*r r)ZxposrrrxbuttonKszPyDialog.xbuttonN)r!r")r.r")r0r") __name__ __module__ __qualname____doc__rr r-r/r)r4rrrrrs  rc@seZdZdZdCdddefdEdGdHdIdJdKdLdMg ZddddgZddd d!d"d#d$d%d&d'd(d)d*d+d,d-d.d/d0d1gZd2Zd3d4Z d5d6Z d7d8Z d9d:Z d;d<Z d=d>Zd?d@ZdAdBZdS)N bdist_msiz7create a Microsoft Installer (.msi) binary distribution bdist-dir=N1temporary directory for creating the distributionz plat-name=pz;platform name to embed in generated filenames (default: %s) keep-tempkz/keep the pseudo-installation tree around after z!creating the distribution archivetarget-version=z!require a specific python versionz on the target systemno-target-compilec/do not compile .py to .pyc on the target systemno-target-optimizeo;do not compile .py to .pyo (optimized) on the target system dist-dir=d-directory to put final built distributions in skip-build2skip rebuilding everything (for testing/debugging)install-script=Ubasename of installation script to be run after installation or before deinstallationpre-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.9XcCsFd|_d|_d|_d|_d|_d|_d|_d|_d|_d|_ d|_ dS)Nr) bdist_dir plat_name keep_tempZno_target_compileZno_target_optimizetarget_versiondist_dir skip_buildinstall_scriptpre_install_scriptversions)rrrrinitialize_options}szbdist_msi.initialize_optionscCs|jdd |jdkr2|jdj}tjj|d|_t}|j rP|j j rP||_|jr|jg|_ |j r|j j r|j|krt d|fn t|j|_ |jdd d |jrt d|jrx2|j jD]}|jtjj|krPqWt d|jd|_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_optionsrPget_finalized_command bdist_baseospathjoinrrS distributionhas_ext_modulesrXrUrlist all_versionsrWrVscriptsbasenameinstall_script_key)rr[Z short_versionZscriptrrrfinalize_optionss:        zbdist_msi.finalize_optionscCs|js|jd|jddd}|j|_|j|_d|_|jd}d|_d|_|jj r|j }|s~|jslt ddt j dd }d |j|f}|jd}tjj|jd ||_tjd |j|jt jjdtjj|jd |jt jd=|j|j|jj}|j|}tjj|}tjj|r0tj ||jj!}|j"} | sJ|j#} | sTd} |j$} dt%| j&} |jj}|j rd|j |f} nd|} t'j(|t)| t'j*| | |_+t'j,|j+t-d| fg} |j.p|j/}|r| j0d|f|j1r| j0d|j1f| rt2|j+d| |j3|j4|j5|j6|j+j7t8|jdrld|j pXd|f}|jj9j0||j:st;|j|j| jd?d9d@d;dAd=dB| j d2d6d2dC} | j dDdEt|dF||||||d2d2d2 } | jdG| jd4d2dd5| jd6d7dd5| jd8d9d:d;dz [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 locationZEnableZShowZDisableZHiderrZ DiskCostDlgZOKz&{\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 VolumeListZVolumeCostListdiz{120}{70}{70}{70}{70}g?Z AdminInstallzGSelect whether to install [ProductName] for all users of this computer.zInstall for all usersZJUSTMEzInstall just for mez [ALLUSERS]zWhichUsers="ALL"z({\DlgFontBold8}[Progress1] [ProductName]#AzYPlease wait while the Installer [Progress2] [ProductName]. This may take several minutes.Z StatusLabelzStatus:Z ProgressBariz Progress doneZ SetProgressZProgressz)Welcome to the [ProductName] Setup WizardZBodyText?z:Select whether you want to repair or remove [ProductName].ZRepairRadioGrouplrz&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")rr)rr)rr)rr)rr)rr)rrrNr)rrrNr")rrrNr")rrrrr)rrr)rrr)rrr)rrr)rNr)rrr rrrr r-r/r)ZeventZcontrolrr(mappingr_ryrXrZ conditionr4Z radiogroupadd)rrxyrrr ZmodalZmodelessZtrack_disk_spaceZfatalrAZ user_exitZ exit_dialogZinuseerrorr/ZcostingZprepZseldlgorderrrZinstall_other_condZdont_install_other_condZcostZ whichusersgZprogressZmaintrrrrs                                                                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)rrZ base_namerrrrrzs  z bdist_msi.get_installer_filename)r:Nr;Pkeep the pseudo-installation tree around after creating the distribution archive)r=r>r6require a specific python version on the target system)r?Nr)r@rArB)rCrDrE)rFrGrH)rINrJ)rKNrL)rMNrN)r5r6r7Z descriptionrZ user_optionsZboolean_optionsrbrrYrfrxrrrrrzrrrrr9SsR    ([66&@r9)r8rtr\Zdistutils.corerZdistutils.dir_utilrZdistutils.sysconfigrZdistutils.versionrZdistutils.errorsrZdistutils.utilrZ distutilsrrr r r r r rrrr9rrrrs       >__pycache__/sdist.cpython-36.opt-1.pyc000064400000031465152344523600013504 0ustar003 \E@sdZddlZddlZddlTddlmZddlmZddlmZddl m Z m Z m Z m Z ddlmZddlTdd lmZdd l mZdd lmZd d ZGdddeZdS)zadistutils.command.sdist Implements the Distutils 'sdist' command (create a source distribution).N)*)glob)warn)Command)dir_utildep_util file_util archive_util)TextFile)FileList)log) convert_pathcCsdddlm}ddlm}g}x,|jD] }|jd|d||dfq&W|j||jddS)zoPrint all possible values for the 'formats' option (used by the "--help-formats" command-line option). r) FancyGetopt)ARCHIVE_FORMATSzformats=Nz.List of available source distribution formats:)Zdistutils.fancy_getoptrZdistutils.archive_utilrkeysappendsortZ print_help)rrformatsformatr//usr/lib64/python3.6/distutils/command/sdist.py show_formatss   rc@seZdZdZddZdJdKdLdMdNdOdPdQdRdTdUdVdWdXgZd ddddd"gZd*d d+efgZd dd,Z d-efgZ d.d/Z d0d1Z d2d3Z d4d5Zd6d7Zd8d9Zd:d;Zdd?Zd@dAZdBdCZdDdEZdFdGZdHdIZd S)Ysdistz6create 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)selfrrrchecking_metadata%szsdist.checking_metadata template=t5name of manifest template file [default: MANIFEST.in] manifest=m)name of manifest file [default: MANIFEST] use-defaultsNRinclude the default file set in the manifest [default; disable with --no-defaults] no-defaults"don't include the default file setprunespecifically 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-onlyoEjust regenerate the manifest and then stop (implies --force-manifest)force-manifestfkforcibly regenerate the manifest and carry on as usual. Deprecated: now the manifest is always regenerated.formats=6formats for source distribution (comma-separated list) keep-tempkz1keep the distribution tree around after creating zarchive file(s) dist-dir=dFdirectory 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=gAGroup name used when creating a tar file [default: current group]z help-formatsz#list available distribution formats)z no-defaultszno-prunecheckcCsTd|_d|_d|_d|_d|_d|_dg|_d|_d|_d|_ d|_ d|_ d|_ dS)NrZgztar) templatemanifest use_defaultsr' manifest_onlyZforce_manifestr keep_tempdist_dir archive_filesrownergroup)rrrrinitialize_options`szsdist.initialize_optionscCsZ|jdkrd|_|jdkr d|_|jdtj|j}|rFtd||jdkrVd|_dS)NZMANIFESTz MANIFEST.inrzunknown archive format '%s'Zdist)rCrBZensure_string_listr Zcheck_archive_formatsrZDistutilsOptionErrorrG)rZ bad_formatrrrfinalize_optionsws      zsdist.finalize_optionscCsBt|_x|jD]}|j|qW|j|jr6dS|jdS)N)r filelistZget_sub_commandsZ run_command get_file_listrEmake_distribution)rZcmd_namerrrrunsz sdist.runcCs*tdt|jjd}|j|jdS)zDeprecated API.zadistutils.command.sdist.check_metadata is deprecated, use the check command insteadr@N)rPendingDeprecationWarning distributionZget_command_objZensure_finalizedrP)rr@rrrcheck_metadatas  zsdist.check_metadatacCstjj|j}| r<|jr<|j|jj|jjdS|sP|j d|j|jj |j rh|j |rt|j |jr|j|jj|jj|jdS)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))ospathisfilerB_manifest_is_not_generated read_manifestrMrZremove_duplicatesrfindallrD add_defaults read_templater'prune_file_listwrite_manifest)rZtemplate_existsrrrrNs(      zsdist.get_file_listcCs2d|jjg}x|D]}t|trn|}d}x*|D]"}tjj|r.d}|jj|Pq.W|s|j ddj |qtjj|r|jj|q|j d|qWdd g}x*|D]"}t tjj t |}|jj|qW|jd }|jjr|jj|jx>|jD]4\} } } } x$| D]} |jjtjj | | q WqW|jjrx||jjD]p}t|tr|t|}tjj |r|jj|n:|\}} x0| D](}t|}tjj |r|jj|qWqHW|jjr|jd }|jj|j|jjr|jd }|jj|j|jjr.|jd }|jj|jdS)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.cfgbuild_py build_ext build_clib build_scriptsN)r^r_)rRZ script_name isinstancetuplerTrUexistsrMrrjoinfilterrVrextendget_finalized_commandZhas_pure_modulesZget_source_filesZ data_filesZhas_data_filesstrr Zhas_ext_modulesZhas_c_librariesZ has_scripts)rZ standardsfnZaltsZgot_itZoptionalpatternfilesr`ZpkgZsrc_dirZ build_dir filenamesfilenameitemdirnamer/rarbrcrrrrZs\           "         zsdist.add_defaultscCstjd|jt|jddddddd}zlxf|j}|dkrr?)__name__ __module__ __qualname__Z descriptionrZ user_optionsZboolean_optionsrZ help_optionsZ negative_optZ sub_commandsrKrLrPrSrNrZr[r\r]rWrXrrOrrrrrr!sj  (P *r)__doc__rTr~typesrwarningsrZdistutils.corerZ distutilsrrrr Zdistutils.text_filer Zdistutils.errorsZdistutils.filelistr r Zdistutils.utilr rrrrrrs       __pycache__/bdist.cpython-36.pyc000064400000007305152344523600012520 0ustar003 \@sHdZddlZddlmZddlTddlmZddZGdd d eZdS) zidistutils.command.bdist Implements the Distutils 'bdist' command (create a built [binary] distribution).N)Command)*) get_platformcCsTddlm}g}x,tjD]"}|jd|dtj|dfqW||}|jddS)zFPrint list of available formats (arguments to "--format" option). r) FancyGetoptzformats=Nz'List of available distribution formats:)Zdistutils.fancy_getoptrbdistformat_commandsappendformat_commandZ print_help)rformatsformatZpretty_printerr //usr/lib64/python3.6/distutils/command/bdist.py show_formats s   rc @seZdZdZd6dddefd7d8d9d:d;gZdgZdd defgZdd?d@dAdBdCdDdEd/ Z d0d1Z d2d3Zd4d5Zd S)Frz$create a built (binary) distribution bdist-base=b4temporary 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-build2skip rebuilding everything (for testing/debugging)owner=u@Owner name used when creating a tar file [default: current user]group=gAGroup name used when creating a tar file [default: current group]z help-formatsz$lists available distribution formats bdist_rpmgztarzip)posixntrpmbztarxztarztartarwininstmsiRPM distribution bdist_dumbgzip'ed tar filebzip2'ed tar filexz'ed tar filecompressed tar filetar file bdist_wininstWindows executable installerZIP file bdist_msiMicrosoft 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_buildgroupowner)selfr r rinitialize_optionsQszbdist.initialize_optionsc Cs|jdkr(|jrt|_n|jdj|_|jdkrT|jdj}tjj|d|j|_|j d|j dkry|j tj g|_ Wn"t k rtdtj YnX|jdkrd|_dS)NZbuildzbdist.r z;don't know how to create built distributions on platform %sZdist)r:r<rZget_finalized_commandr9 build_baseospathjoinZensure_string_listr default_formatnameKeyErrorZDistutilsPlatformErrorr;)r?rAr r rfinalize_optionsZs$       zbdist.finalize_optionsc Csg}xH|jD]>}y|j|j|dWq tk rHtd|Yq Xq Wxztt|jD]h}||}|j|}||jkr|j||_ |dkr|j |_ |j |_ |||ddkrd|_ |j |q^WdS)Nrzinvalid format '%s'r.r)r r r rGZDistutilsOptionErrorrangelenZreinitialize_commandno_format_optionr r>r=Z keep_tempZ run_command)r?Zcommandsr iZcmd_nameZsub_cmdr r rrunvs"    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__Z descriptionrZ user_optionsZboolean_optionsrZ help_optionsrKrErr r@rHrMr r r rrsJ    r) __doc__rBZdistutils.corerZdistutils.errorsZdistutils.utilrrrr r r rs    __pycache__/bdist_msi.cpython-36.opt-2.pyc000064400000043332152344523600014330 0ustar003 \@sddlZddlZddlmZddlmZddlmZddlm Z ddl m Z ddl m Z ddlmZddlZdd lmZmZmZdd lmZmZmZmZGd d d eZGd ddeZdS)N)Command) remove_tree)get_python_version) StrictVersion)DistutilsOptionError) get_platform)log)schemasequencetext) DirectoryFeatureDialogadd_datac@sBeZdZddZddZdddZdd d Zdd dZddZdS)PyDialogcOs>tj|f||jd}d|d}|jdd||jddS)N$iHZ BottomLiner)r__init__hlinew)selfargskwZrulerZbmwidthr3/usr/lib64/python3.6/distutils/command/bdist_msi.pyrs  zPyDialog.__init__c Cs|jddddddd|dS)NTitle i@<iz{\VerdanaBold10}%s)r )rtitlerrrr #szPyDialog.titleBackc Cs,|r d}nd}|j|d|jddd|||S)Nr"8) pushbuttonr)rr nextnameactiveflagsrrrback*sz PyDialog.backCancelc Cs,|r d}nd}|j|d|jddd|||S)Nr#r"i0r%r&r')r(r)rr r)r*r+r,rrrcancel5szPyDialog.cancelNextc 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)Nr%r&r'r#)r(intrr)rr*r r)ZxposrrrxbuttonKszPyDialog.xbuttonN)r!r")r.r")r0r") __name__ __module__ __qualname__rr r-r/r)r4rrrrrs   rc@seZdZdZdCdddefdEdGdHdIdJdKdLdMg ZddddgZddd d!d"d#d$d%d&d'd(d)d*d+d,d-d.d/d0d1gZd2Zd3d4Z d5d6Z d7d8Z d9d:Z d;d<Z d=d>Zd?d@ZdAdBZdS)N bdist_msiz7create a Microsoft Installer (.msi) binary distribution bdist-dir=N1temporary directory for creating the distributionz plat-name=pz;platform name to embed in generated filenames (default: %s) keep-tempkz/keep the pseudo-installation tree around after z!creating the distribution archivetarget-version=z!require a specific python versionz on the target systemno-target-compilec/do not compile .py to .pyc on the target systemno-target-optimizeo;do not compile .py to .pyo (optimized) on the target system dist-dir=d-directory to put final built distributions in skip-build2skip rebuilding everything (for testing/debugging)install-script=Ubasename of installation script to be run after installation or before deinstallationpre-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.9XcCsFd|_d|_d|_d|_d|_d|_d|_d|_d|_d|_ d|_ dS)Nr) bdist_dir plat_name keep_tempZno_target_compileZno_target_optimizetarget_versiondist_dir skip_buildinstall_scriptpre_install_scriptversions)rrrrinitialize_options}szbdist_msi.initialize_optionscCs|jdd |jdkr2|jdj}tjj|d|_t}|j rP|j j rP||_|jr|jg|_ |j r|j j r|j|krt d|fn t|j|_ |jdd d |jrt d|jrx2|j jD]}|jtjj|krPqWt d|jd|_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_optionsrOget_finalized_command bdist_baseospathjoinrrR distributionhas_ext_modulesrWrTrlist all_versionsrVrUscriptsbasenameinstall_script_key)rrZZ short_versionZscriptrrrfinalize_optionss:        zbdist_msi.finalize_optionscCsz|js|jd|jddd}|j|_|j|_d|_|jd}d|_d|_|jj r|j }|spdt j dd}d |j |f}|jd}tjj|jd ||_tjd |j|jt jjdtjj|jd |jt jd=|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|j0r| j/d|j0f| rt1|j*d| |j2|j3|j4|j5|j*j6t7|jdr^d|j pJd|f}|jj8j/||j9svt:|j|j;ddS)Nbuildinstallr")Zreinit_subcommandsr install_libz%d.%dz.%s-%slibzinstalling to %sZPURELIBZUNKNOWNz%d.%d.%dz Python %s %sz Python %sZ DistVersionZ ARPCONTACTZARPURLINFOABOUTProperty dist_filesr8any)dry_run)| jd?d9d@d;dAd=dB| j d2d6d2dC} | j dDdEt|dF||||||d2d2d2 } | jdG| jd4d2dd5| jd6d7dd5| jd8d9d:d;dz [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 locationZEnableZShowZDisableZHiderrZ DiskCostDlgZOKz&{\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 VolumeListZVolumeCostListdiz{120}{70}{70}{70}{70}g?Z AdminInstallzGSelect whether to install [ProductName] for all users of this computer.zInstall for all usersZJUSTMEzInstall just for mez [ALLUSERS]zWhichUsers="ALL"z({\DlgFontBold8}[Progress1] [ProductName]#AzYPlease wait while the Installer [Progress2] [ProductName]. This may take several minutes.Z StatusLabelzStatus:Z ProgressBariz Progress doneZ SetProgressZProgressz)Welcome to the [ProductName] Setup WizardZBodyText?z:Select whether you want to repair or remove [ProductName].ZRepairRadioGrouplrz&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")rr)rr)rr)rr)rr)rr)rrrNr)rrrNr")rrrNr")rrrrr)rrr)rrr)rrr)rrr)rNr)rrr rrrr r-r/r)ZeventZcontrolrr(mappingr^rwrWrZ conditionr4Z radiogroupadd)rrxyrrr ZmodalZmodelessZtrack_disk_spaceZfatalr@Z user_exitZ exit_dialogZinuseerrorr/ZcostingZprepZseldlgorderr~rZinstall_other_condZdont_install_other_condZcostZ whichusersgZprogressZmaintrrrrs                                                                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)rrZ base_namerrrrrxs  z bdist_msi.get_installer_filename)r9Nr:Pkeep the pseudo-installation tree around after creating the distribution archive)r<r=r6require a specific python version on the target system)r>Nr)r?r@rA)rBrCrD)rErFrG)rHNrI)rJNrK)rLNrM)r5r6r7Z descriptionrZ user_optionsZboolean_optionsrarrXrervrrrrrxrrrrr8SsR    ([66&@r8)rrr[Zdistutils.corerZdistutils.dir_utilrZdistutils.sysconfigrZdistutils.versionrZdistutils.errorsrZdistutils.utilrZ distutilsrrr r r r r rrrr8rrrr s       >__pycache__/install.cpython-36.pyc000064400000033635152344523600013066 0ustar003 _Vjj@sdZddlZddlZddlmZddlmZddlmZddl m Z ddl m Z ddl mZdd lmZmZmZdd lmZdd l mZdd lmZdd lmZdZddddddZddddddddddddedZerdddddded <ddd!d"dded#<d+ZGd)d*d*eZdS),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)purelibplatlibheadersscriptsdataz/$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_homentz $usersitez4$userbase/Python$py_version_nodot/Include/$dist_namez)$userbase/Python$py_version_nodot/Scriptsz $userbasent_userz=$userbase/include/python$py_version_short$abiflags/$dist_namez $userbase/bin unix_userrrrrrc@s:eZdZdZd_d`dadbdddedfdgdidjdkdldmdndodpdqdrgZdd%d(gZer`ejd,dd-efejd,d diZ d.d/Z d0d1Z d2d3Z d4d5Z d6d7Zd8d9Zd:d;Zdd?Zd@dAZdBdCZdDdEZdFdGZdHdIZdJdKZdLdMZdNdOZdPdQZdRdSZdTdUZdVdWZdXefdYefdZefd[efd\d]d^fgZdS)sinstallz'install everything from build directoryprefix=Ninstallation prefix exec-prefix=.(Unix only) prefix for platform-specific fileshome=+(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=|jD]2}|j|}x"|jD]}||kr&|j|q&WqW|jrl|jrl|jtjj|j |jd|S)z.Assembles the outputs of all the sub-commands.z.pth) rget_finalized_commandrappendrrQrhr}r~r|)rWrrcmdrrXrXrYrbs  zinstall.get_outputscCs2g}x(|jD]}|j|}|j|jqW|S)z*Returns the inputs of all the sub-commands)rrextend get_inputs)rWZinputsrrrXrXrYrss  zinstall.get_inputscCs|jjp|jjS)zSReturns true if the current distribution has any Python modules to install.)rrZhas_pure_modulesZhas_ext_modules)rWrXrXrYhas_libs zinstall.has_libcCs |jjS)zLReturns true if the current distribution has any headers to install.)rr has_headers)rWrXrXrYrszinstall.has_headerscCs |jjS)zMReturns true if the current distribution has any scripts to. install.)rr has_scripts)rWrXrXrYrszinstall.has_scriptscCs |jjS)zJReturns true if the current distribution has any data to. install.)rrZhas_data_files)rWrXrXrYhas_dataszinstall.has_datarJrIrKrLZinstall_egg_infocCsdS)NTrX)rWrXrXrYszinstall.)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__Z descriptionrZboolean_optionsrurrrrZrrkrlrmrrrvrxrzr{rryrrrrrrrrZ sub_commandsrXrXrXrYrIs   N3  " , r)rrrrr)__doc__rnrhZ distutilsrZdistutils.corerZdistutils.debugrZdistutils.sysconfigrZdistutils.errorsrZdistutils.file_utilrZdistutils.utilrr r r r Zsiter rruZWINDOWS_SCHEMErrrrXrXrXrYsV            __pycache__/build_ext.cpython-36.opt-2.pyc000064400000034410152344523600014327 0ustar003 \z@sddlZddlZddlZddlZddlmZddlTddlmZm Z ddlm Z ddl m Z ddl mZddlmZdd lmZdd lmZejd Zd d ZGdddeZdS)N)Command)*)customize_compilerget_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 r3/usr/lib64/python3.6/distutils/command/build_ext.pyr s r c@seZdZdZdejZd`dad d d efdcdddefdddedfdddefdgdhdidjdkdldmdndodpgZd d%d(d1d8gZ d:d2d;e fgZ dd?Z d@dAZdBdCZdDdEZdFdGZdHdIZdJdKZdLdMZejdNdOZdPdQZdRdSZdTdUZdVdWZdXdYZdZd[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=t1directory for temporary files (build by-products)z plat-name=pz>platform name to cross-compile for, if supported (default: %s)inplaceiz=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 filesdefine=DC preprocessor macros to defineundef=U!C preprocessor macros to undefine libraries=l!external C libraries to link withz library-dirs=Lz.directories to search for external C librariesrpath=R7directories to search for shared C libraries at runtime link-objects=O2extra explicit link objects to include in the linkdebugg'compile/link with debugging informationforcef2forcibly build everything (ignore file timestamps) compiler=cspecify the compiler type parallel=jnumber of parallel build jobsswig-cppN)make SWIG create C++ files (default is C) swig-opts=!list of SWIG command line optionsswig=path to the SWIG executableuser#add user include, library and rpathz help-compilerzlist available compilerscCsd|_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_temprpackage include_dirsdefineundef libraries library_dirsrpath link_objectsr+r.compilerswigswig_cpp swig_optsr=parallel)selfrrrinitialize_optionsjs*zbuild_ext.initialize_optionsc Csddlm}|jdd'd(d)d*d+d,d-|jdkr8|jj|_|jj|_|j}|jd d }|j dkrn|jj pjg|_ t |j t r|j j t j|_ tjtjkr|j jt jjtjd |j j|||kr|j j||jd|jd|jdkrg|_|jdkrg|_nt |jt r&|jj t j|_|jdkr:g|_nt |jt rX|jj t j|_t jdkrT|jjt jjtjdtjtjkr|jjt jjtjd|jrt jj|jd|_nt jj|jd|_|j jt jjtttdd}|r|jj||j dkrd}n|j dd}t jjtjd}|rHt jj||}|jj|tj!dddks|tj!dddkrtj"j#t jjtjdr|jjt jjtjddt$dn |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)dkrHg|_)n|j)j d%|_)|j*rt jjt+d }t jjt+d} t jj,|r|j j|t jj,| r|jj| |jj| t |j-t ryt.|j-|_-Wnt/k rt0d&YnXdS).Nr) sysconfigZbuildr@rBrKr+r.rOrA)Z plat_specificincluderGrJntZlibsZDebugZRelease_homewin32ZPCbuildcygwinatheosbinlibpythonconfig.Py_ENABLE_SHAREDLIBDIR,cSsg|] }|dfqS)1r).0Zsymbolrrr sz.build_ext.finalize_options.. zparallel should be an integer)r@r@)rBrB)rKrK)r+r+)r.r.)rOrO)rArA)1 distutilsrRZset_undefined_optionsrC distributionZ ext_packageZ ext_modulesr?Zget_python_incrD isinstancestrsplitospathsepsys exec_prefixbase_exec_prefixappendpathjoinZensure_string_listrGrHrInameprefixr+rBdirnamergetattrrAplatform executable startswithrget_config_varZ python_buildrErFrNr=r isdirrOint ValueErrorZDistutilsOptionError) rPrRZ py_includeZplat_py_include _sys_homesuffixZnew_libZdefinesZ user_includeZuser_librrrfinalize_optionss                    (         zbuild_ext.finalize_optionscCstddlm}|jsdS|jjrL|jd}|jj|jp:g|j j |j ||j |j |j|jd|_ t|j tjdkr|jtkr|j j|j|jdk r|j j|j|jdk rx |jD]\}}|j j||qW|jdk rx|jD]}|j j|qW|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)rKverbosedry_runr.rU)#r rr?riZhas_c_librariesget_finalized_commandrGextendZget_library_namesrHrrrrKrrr.rrmrurAr Z initializerDZset_include_dirsrEZ define_macrorFZundefine_macroZ set_librariesZset_library_dirsrIZset_runtime_library_dirsrJZset_link_objectsbuild_extensions)rPrrruvaluemacrorrrruns>             z build_ext.runc Cst|tstdxnt|D]`\}}t|tr4qt|t sLt|dkrTtd|\}}tjd|t|t ozt j |stdt|t stdt||d}x*dD]"}|j |}|dk rt|||qW|j d|_d|krtjd|j d}|rxg|_g|_xj|D]b} t| to,t| dks8tdt| dkrX|jj| dnt| dkr|jj| qW|||<qWdS)Nz:'ext_modules' option must be a list of Extension instanceszMeach 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_objectsextra_compile_argsextra_link_argsrIZdef_filez9'def_file' element of build info dict no longer supportedmacrosrSz9'macros' element of build info dict must be 1- or 2-tupler)rDrHrGrrr)rSr)rjlistDistutilsSetupError enumeratertuplelenr warnrkextension_name_rematchdictgetsetattrruntime_library_dirs define_macros undef_macrosrr) rPr?rextext_nameZ build_infokeyvalrrrrrcheck_extensions_listUsT           zbuild_ext.check_extensions_listcCs0|j|jg}x|jD]}|j|jqW|S)N)rr?rr)rP filenamesrrrrget_source_filess   zbuild_ext.get_source_filescCs6|j|jg}x |jD]}|j|j|jqW|S)N)rr?rrget_ext_fullpathru)rPZoutputsrrrr get_outputss   zbuild_ext.get_outputscCs(|j|j|jr|jn|jdS)N)rr?rO_build_extensions_parallel_build_extensions_serial)rPrrrrs  zbuild_ext.build_extensionscsj}jdkrtj}yddlm}Wntk r@d}YnX|dkrVjdS||dTfddjD}x6tj|D]&\}}j ||j WdQRXqWWdQRXdS)NTr)ThreadPoolExecutor)Z max_workerscsg|]}jj|qSr)Zsubmitbuild_extension)rer)executorrPrrrfsz8build_ext._build_extensions_parallel..) rOrm cpu_countZconcurrent.futuresr ImportErrorrr?zip_filter_build_errorsresult)rPZworkersrZfuturesrZfutr)rrPrrs       z$build_ext._build_extensions_parallelc Cs4x.|jD]$}|j||j|WdQRXqWdS)N)r?rr)rPrrrrrs  z"build_ext._build_extensions_serialccsTy dVWnDtttfk rN}z"|js*|jd|j|fWYdd}~XnXdS)Nz"building extension "%s" failed: %s)ZCCompilerErrorZDistutilsErrorZ CompileErrorZoptionalrru)rPrerrrrs zbuild_ext._filter_build_errorsc CsX|j}|dkst|ttf r,td|jt|}|j|j}||j}|jpZt ||dsnt j d|jdSt j d|j|j ||}|jpg}|jdd}x|jD]}|j|fqW|jj||j||j|j ||jd}|dd|_|jr|j|j|jp g}|jp|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_dirrrDr+extra_postargsdepends)rGrHrrexport_symbolsr+rBZ target_lang)!rrjrrrrurrr.rr r+info swig_sourcesrrrrrrKcompilerBrDZ_built_objectsrrrlanguageZdetect_languageZlink_shared_object get_librariesrHrget_export_symbols) rPrrext_pathrZ extra_argsrrFZobjectsrrrrrsN         zbuild_ext.build_extensioncCs2g}g}i}|jrtjd|js6d|jks6d|jkr        zbuild_ext.swig_sourcescCs`tjdkrdStjdkrNxBd D]&}tjjd|d}tjj|r|SqWdSntd tjdS) NposixrLrU1.31.21.1z c:\swig%szswig.exez>I don't know how to find (much less run) SWIG on platform '%s')rrr)rmrursrtisfileZDistutilsPlatformError)rPZversfnrrrrfs    zbuild_ext.find_swigcCs|j|}|jd}|j|d}|jsRtjj|dd|g}tjj|j|Sdj|dd}|jd}tjj |j |}tjj||S)Nr`rSrbuild_pyrrr) get_ext_fullnamerlget_ext_filenamerrmrsrtr@rabspathZget_package_dir)rPrfullnameZmodpathfilenamerCrZ package_dirrrrr~s   zbuild_ext.get_ext_fullpathcCs |jdkr|S|jd|SdS)Nr`)rC)rPrrrrrs zbuild_ext.get_ext_fullnamecCs.ddlm}|jd}|d}tjj||S)Nr)r|r` EXT_SUFFIX)distutils.sysconfigr|rlrmrsrt)rPrr|rZ ext_suffixrrrrs  zbuild_ext.get_ext_filenamecCs0d|jjdd}||jkr*|jj||jS)NZPyInit_r`rSr)rurlrrr)rPrZ initfunc_namerrrrs  zbuild_ext.get_export_symbolscCstjdkrfddlm}t|j|s\d}|jr4|d}|tjd?tjd?d@f}|j|gS|jSnRtjdd d krd }|tjd?tjd?d@f}|j|gStjdd d kr>dd l m }d }|tjd?tjd?d@f}g}xB|j dj D]0}|j dr|j|ddn |j|qW|j|dg|StjdkrP|jStjdddkrj|jSdd l m }|j drdjtjd?tjd?d@|j d}|j|gS|jSdS)NrWr) MSVCCompilerz python%d%dZ_drYrZz python%d.%dr[)rRSHLIBSz-lrmdarwinaixraz python{}.{}{}ABIFLAGS)roryZdistutils._msvccompilerrrjrKr+ hexversionrGrhrRr|rlr{rrformat)rPrrtemplateZ pythonlibrRZextrar]rrrrsJ             zbuild_ext.get_libraries)rrr)rrriignore 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__Z descriptionrmrnZsep_byr Z user_optionsZboolean_optionsr Z help_optionsrQrrrrrrrr contextlibcontextmanagerrrrrrrrrrrrrrr!s  @N  K6   r)rrmreroZdistutils.corerZdistutils.errorsrrrrZdistutils.dep_utilrZdistutils.extensionrZdistutils.utilr rhr Zsiter rrr rrrrrs        __pycache__/build.cpython-36.opt-1.pyc000064400000007741152344523600013455 0ustar003 \t@sTdZddlZddlZddlmZddlmZddlmZddZ Gdd d eZ dS) zBdistutils.command.build Implements the Distutils 'build' command.N)Command)DistutilsOptionError) get_platformcCsddlm}|dS)Nr)show_compilers)Zdistutils.ccompilerr)rr//usr/lib64/python3.6/distutils/command/build.pyr s rc@seZdZdZd8d9d:ddddefd?d@dAdBdCg ZddgZd$dd%efgZd&d'Z d(d)Z d*d+Z d,d-Z d.d/Z d0d1Zd2d3Zd4e fd5e fd6efd7efgZdS)Dbuildz"build everything needed to install build-base=b base directory for build librarybuild-purelib=N2build directory for platform-neutral distributionsbuild-platlib=3build directory for platform-specific distributions build-lib=z9build directory for all distribution (defaults to either zbuild-purelib or build-platlibbuild-scripts=build directory for scripts build-temp=ttemporary build directoryz plat-name=pz6platform name to build for, if supported (default: %s) compiler=cspecify the compiler type parallel=jnumber of parallel build jobsdebugg;compile extensions and libraries with debugging informationforcef2forcibly build everything (ignore file timestamps) executable=e5specify 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 executableparallel)selfrrrinitialize_options8szbuild.initialize_optionsc CsZ|jdkrt|_ntjdkr&tdd|jftjdd}ttdrR|d7}|jdkrntj j |j d|_|j dkrtj j |j d||_ |j dkr|jjr|j |_ n|j|_ |jdkrtj j |j d||_|jdkrtj j |j d tjdd|_|jdkrtj jtj|_t|jtrVyt|j|_Wntk rTtd YnXdS) NntzW--plat-name only supported on Windows (try using './configure --help' on your platform)z .%s-%d.%dgettotalrefcountz-pydebuglibZtempz scripts-%d.%dzparallel should be an integer)r,rosnamersys version_infohasattrr'pathjoinr&r(r) distributionZ ext_modulesr*r+r-normpath isinstancer.strint ValueError)r/Zplat_specifierrrrfinalize_optionsHs<                zbuild.finalize_optionscCs x|jD]}|j|q WdS)N)Zget_sub_commandsZ run_command)r/Zcmd_namerrrrunsz build.runcCs |jjS)N)r<has_pure_modules)r/rrrrDszbuild.has_pure_modulescCs |jjS)N)r<has_c_libraries)r/rrrrEszbuild.has_c_librariescCs |jjS)N)r<has_ext_modules)r/rrrrFszbuild.has_ext_modulescCs |jjS)N)r< has_scripts)r/rrrrGszbuild.has_scriptsZbuild_pyZ build_clibZ build_extr+)r r r )r Nr )rNrWbuild 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__Z descriptionrZ user_optionsZboolean_optionsrZ help_optionsr0rBrCrDrErFrGZ sub_commandsrrrrrsR 8 r) __doc__r7r5Zdistutils.corerZdistutils.errorsrZdistutils.utilrrrrrrrs    __pycache__/bdist_dumb.cpython-36.opt-1.pyc000064400000007237152344523600014472 0ustar003 \1@shdZddlZddlmZddlmZddlmZmZddl Tddl m Z ddl m Z Gd d d eZdS) zdistutils.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_treeensure_relative)*)get_python_version)logc @s^eZdZdZd%dddefd&d(d)d*d+d,d-g Zd ddgZdddZdd Zd!d"Z d#d$Z dS). bdist_dumbz"create a "dumb" built distribution bdist-dir=d1temporary 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-tempkz/keep the pseudo-installation tree around after z!creating the distribution archive dist-dir=-directory to put final built distributions in skip-buildN2skip rebuilding everything (for testing/debugging)relative7build the archive using relative paths (default: false)owner=u@Owner name used when creating a tar file [default: current user]group=gAGroup name used when creating a tar file [default: current group]Zgztarzip)posixntcCs:d|_d|_d|_d|_d|_d|_d|_d|_d|_dS)Nr) bdist_dir plat_nameformat keep_tempdist_dir skip_buildrownergroup)selfr+4/usr/lib64/python3.6/distutils/command/bdist_dumb.pyinitialize_options2szbdist_dumb.initialize_optionscCsz|jdkr&|jdj}tjj|d|_|jdkrfy|jtj|_Wn"t k rdt dtjYnX|j dddd 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_baseospathjoinr$default_formatnameKeyErrorDistutilsPlatformErrorZset_undefined_options)r*r.r+r+r,finalize_options=s   zbdist_dumb.finalize_optionscCs(|js|jd|jddd}|j|_|j|_d|_tjd|j|jdd|jj |j f}t j j |j|}|js~|j}nJ|jjr|j|jkrtdt|jt|jfnt j j |jt|j}|j||j||j|jd }|jjrt}nd }|jjjd ||f|js$t|j|jd dS) NZbuildinstall)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'Z run_commandZreinitialize_commandr"rootZwarn_dirrinfoZ distributionZ get_fullnamer#r/r0r1r&rZhas_ext_modulesZ install_baseZinstall_platbaser5reprrZ make_archiver$r(r)rZ dist_filesappendr%rr:)r*r7Zarchive_basenameZpseudoinstall_rootZ archive_rootfilenameZ pyversionr+r+r,runOs>          zbdist_dumb.run)r r r )rrrPkeep the pseudo-installation tree around after creating the distribution archive)rrrA)rr r)rNr)rNr)rrr)rrr) __name__ __module__ __qualname__Z descriptionrZ 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,s    __pycache__/install_lib.cpython-36.opt-1.pyc000064400000012070152344523600014641 0ustar003 \ @sLdZddlZddlZddlZddlmZddlmZdZ GdddeZ dS)zkdistutils.command.install_lib Implements the Distutils 'install_lib' command (install all Python modules).N)Command)DistutilsOptionErrorz.pyc @seZdZdZd*d+d,d-d.d/d0gZdd dgZdd iZddZddZddZ ddZ ddZ d d!Z d"d#Z d$d%Zd&d'Zd(d)ZdS)1 install_libz7install all Python modules (extensions and pure Python) install-dir=ddirectory to install to build-dir=b'build directory (where to install from)forcef-force installation (overwrite existing files)compileccompile .py to .pyc [default] no-compileNdon't compile .py files optimize=Olalso compile with optimization: -O1 for "python -O", -O2 for "python -OO", and -O0 to disable [default: -O0] skip-buildskip the build stepscCs(d|_d|_d|_d|_d|_d|_dS)Nr) install_dir build_dirr roptimize skip_build)selfr5/usr/lib64/python3.6/distutils/command/install_lib.pyinitialize_options3s zinstall_lib.initialize_optionsc Cs|jddddddd|jdkr&d |_|jdkr6d |_t|jtsyt|j|_|jdkr^tWn ttfk rtdYnXdS)Ninstall build_librrrr rrrTFrzoptimize must be 0, 1, or 2)r!r)rr)r r )rr)rr)rr)rr"r#)Zset_undefined_optionsrr isinstanceintAssertionError ValueErrorr)rrrrfinalize_options<s$     zinstall_lib.finalize_optionscCs0|j|j}|dk r,|jjr,|j|dS)N)buildr distributionhas_pure_modules byte_compile)routfilesrrrrunVszinstall_lib.runcCs2|js.|jjr|jd|jjr.|jddS)Nbuild_py build_ext)rr*r+Z run_commandhas_ext_modules)rrrrr)fs    zinstall_lib.buildcCs8tjj|jr |j|j|j}n|jd|jdS|S)Nz3'%s' does not exist -- no Python modules to install)ospathisdirrZ copy_treerwarn)rr-rrrr ms  zinstall_lib.installcCsrtjr|jddSddlm}|jdj}|jrH||d|j||j d|j dkrn|||j |j||j |j ddS)Nz%byte-compiling is disabled, skipping.r)r,r )rr prefixdry_run)rr r6verboser7) sysdont_write_bytecoder5Zdistutils.utilr,get_finalized_commandrootrr r7rr8)rfilesr,Z install_rootrrrr,vs     zinstall_lib.byte_compilec Csh|sgS|j|}|j}t||}t|ttj}g}x(|D] } |jtjj|| |dq@W|S)N) r; get_outputsgetattrlenr2sepappendr3join) rZhas_anyZ build_cmdZ cmd_optionZ output_dirZ build_filesrZ prefix_lenZoutputsfilerrr_mutate_outputss    zinstall_lib._mutate_outputscCsvg}xl|D]d}tjjtjj|d}|tkr0q |jrL|jtjj |dd|j dkr |jtjj ||j dq W|S)Nr") optimizationr) r2r3splitextnormcasePYTHON_SOURCE_EXTENSIONrrB importlibutilcache_from_sourcer)rZ py_filenamesZbytecode_filesZpy_fileZextrrr_bytecode_filenamess     zinstall_lib._bytecode_filenamescCsR|j|jjdd|j}|jr*|j|}ng}|j|jjdd|j}|||S)zReturn 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_outputsZ ext_outputsrrrr>s   zinstall_lib.get_outputscCsLg}|jjr&|jd}|j|j|jjrH|jd}|j|j|S)zGet 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_inputss    zinstall_lib.get_inputs)rrr)rr r )r r r )rrr)rNr)rrr)rNr)__name__ __module__ __qualname__Z descriptionZ user_optionsZboolean_optionsZ negative_optrr(r.r)r r,rErNr>rPrrrrrs*   r) __doc__r2importlib.utilrKr9Zdistutils.corerZdistutils.errorsrrJrrrrrs  __pycache__/register.cpython-36.pyc000064400000020334152344523600013234 0ustar003 \-@sddZddlZddlZddlZddlZddlmZddlm Z ddl Tddl m Z Gddde Z dS) zhdistutils.command.register Implements the Distutils 'register' command (register with the repository). N)warn) PyPIRCCommand)*)logc@seZdZdZejdd gZejdddgZdd d fgZd d Zd dZ ddZ ddZ ddZ ddZ ddZddZddZd!ddZdS)"registerz7register the distribution with the Python package indexlist-classifiersN list the valid Trove classifiersstrictBWill stop the registering if the meta-data are not fully compliantverifycheckcCsdS)NT)selfr r 2/usr/lib64/python3.6/distutils/command/register.pyszregister.cCstj|d|_d|_dS)Nr)rinitialize_optionslist_classifiersr )rr r rrs zregister.initialize_optionscCs*tj|d|jfdd}||jjd<dS)Nr)r restructuredtextr )rr)rfinalize_optionsr distributionZcommand_options)rZ check_optionsr r rr$s zregister.finalize_optionscCsX|j|jx|jD]}|j|qW|jr<|jn|jrL|jn|jdS)N) r _set_configZget_sub_commandsZ run_commandZdry_runverify_metadatar classifiers send_metadata)rZcmd_namer r rrun+s  z register.runcCs8tdt|jjd}|j|j|_d|_|jdS)zDeprecated API.zddistutils.command.register.check_metadata is deprecated, use the check command insteadr rN)rPendingDeprecationWarningrZget_command_objZensure_finalizedr rr)rr r r rcheck_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. usernamepassword repositoryrealmTZpypiz%s not found in .pypircFN)Z _read_pypircrrr r! has_configZDEFAULT_REPOSITORY ValueError)rconfigr r rrDs     zregister._set_configcCs*|jd}tjj|}tj|j|dS)z8 Fetch the list of classifiers from the server. z?:action=list_classifiersN)r urllibrequestZurlopenrinfo_read_pypi_response)rZurlZresponser r rrUs  zregister.classifierscCs&|j|jd\}}tjd||dS)zF Send the metadata to the package index server to be checked. r zServer response (%s): %sN)post_to_serverbuild_post_datarr')rcoderesultr r rr\szregister.verify_metadatac Cs|jrd}|j}|j}n d}d}}dj}x:||krf|jdtjt}|sTd}q.||kr.tdq.W|dkr|x|std}qtWx|st j d}qWt j j }t j j|jd }|j|j||||j|jd |\}}|jd ||ftj|d kr|jr||j_nj|jd tj|jd|jtjd}x&|jdkr\td}|s8d}q8W|jdkr|j||n|dkrddi} d| d<| d<| d<d| d<x| dstd| d<qWx| d| dkrNx| dst j d| d<qWx| dst j d| d<qW| d| dkrd| d<d| d<tdqWx| dsltd| d<qRW|j| \}}|d krtjd ||ntjdtjd nT|d!krdd"i} d| d<x| dstd#| d<qW|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. 1xz1 2 3 4zWe 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): %szAI can store your PyPI login so future submissions will be faster.z (the login will be stored in %s)XZynzSave your login (y/N)?ny2z:actionusernamerZemailNZconfirmz 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"rrsplitannouncerINFOinputprintgetpassr%r&ZHTTPPasswordMgrparseZurlparser Z add_passwordr!r)r*rZ _get_rc_filelowerZ _store_pypircr') rZchoicerrchoicesauthhostr+r,datar r rrcs                     zregister.send_metadatacCs|jj}|d|j|j|j|j|j|j|j|j |j |j |j |j |j|j|jd}|ds|ds|drd|d<|S)Nz1.0)z:actionmetadata_versionr6versionZsummaryZ home_pageZauthorZ author_emaillicense descriptionkeywordsplatformrZ download_urlprovidesrequires obsoletesrJrKrLz1.1rD)rZmetadataZget_nameZ get_versionZget_descriptionZget_urlZ get_contactZget_contact_emailZ get_licenceZget_long_descriptionZ get_keywordsZ get_platformsZget_classifiersZget_download_urlZ get_providesZ get_requiresZ get_obsoletes)ractionmetarCr r rr*s* zregister.build_post_datacCsd|kr$|jd|d|jftjd}d|}|d}tj}x|jD]\}}t|tgtffkrp|g}xZ|D]R}t|}|j ||j d||j d|j ||rv|dd krv|j d qvWqJW|j ||j d |j j d }d |tt |d } t jj|j|| } t jjt jj|d} d}y| j| } Wnxt jjk r} z$|jrl| jj}| j| jf} WYdd} ~ XnJt jjk r} zdt| f} WYdd} ~ XnX|jr|j| }d} |jrd 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/Nir0OK-K)r0rQ)r9r rr:ioStringIOitemstypestrwritegetvalueencodelenr%r&ZRequestZ build_openerZHTTPBasicAuthHandleropenerrorZ HTTPErrorZ show_responsefpreadr+msgZURLErrorr(join)rrCrAboundaryZ sep_boundaryZ end_boundaryZbodykeyvalueZheadersZreqopenerr,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.requestwarningsrZdistutils.corerZdistutils.errorsZ distutilsrrr r r rs   __pycache__/build_scripts.cpython-36.opt-1.pyc000064400000010356152344523600015220 0ustar003 \X@sdZddlZddlZddlmZddlmZddlmZddl m Z ddl m Z m Z ddlmZddlZejd ZGd d d eZGd 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@sHeZdZdZdddgZdgZd d Zd dZddZddZ ddZ dS) build_scriptsz("build" scripts (copy and fixup #! line) build-dir=ddirectory to "build" (copy) toforcef1forcibly build everything (ignore file timestamps executable=e*specify final destination interpreter pathcCs"d|_d|_d|_d|_d|_dS)N) build_dirscriptsr executableoutfiles)selfr7/usr/lib64/python3.6/distutils/command/build_scripts.pyinitialize_optionss z build_scripts.initialize_optionscCs|jdddd|jj|_dS) NZbuildr rr r)r r)r r )rr)Zset_undefined_optionsZ distributionr)rrrrfinalize_options%s zbuild_scripts.finalize_optionscCs|jS)N)r)rrrrget_source_files,szbuild_scripts.get_source_filescCs|js dS|jdS)N)r copy_scripts)rrrrrun/szbuild_scripts.runc"Cs|j|jg}g}x,|jD] }d}t|}tjj|jtjj|}|j||j rtt || rtt j d|qyt |d}Wn tk r|jsd}YnXXtj|j\}}|jd|j} | s|jd|qtj| } | rd}| jdpd } |rt jd ||j|j||js tjs2|j} n(tjjtjd d tjd tjdf} tj| } d| | d} y| jdWn$tk rt dj!| YnXy| j|Wn&tk rt dj!| |YnXt |d}|j"| |j#|j$WdQRX|r@|j%q|r*|j%|j||j&||qWtj'dkrxh|D]`}|jrpt jd|nDtj(|t)d@}|dBd@}||krVt jd|||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)Tzcopying and adjusting %s -> %sBINDIRz python%s%sVERSIONEXEs#! zutf-8z.The shebang ({!r}) is not decodable from utf-8zAThe shebang ({!r}) is not decodable from the script encoding ({})wbposixzchanging mode of %siimz!changing mode of %s from %o to %o)+Zmkpathrrrospathjoinbasenameappendr rrdebugopenOSErrordry_runtokenizedetect_encodingreadlineseekwarn first_line_rematchgroupinforZ python_buildrget_config_varfsencodedecodeUnicodeDecodeError ValueErrorformatwrite writelines readlinescloseZ copy_filenamestatrchmod)rr updated_filesZscriptZadjustZoutfilerencodinglinesZ first_liner7Z post_interprZshebangZoutffileZoldmodeZnewmoderrrr5s                  zbuild_scripts.copy_scriptsN)r r r )r rr)rrr) __name__ __module__ __qualname__Z descriptionZ user_optionsZboolean_optionsrrrrrrrrrr sr c@seZdZddZdS)build_scripts_2to3cCs&tj|\}}|js|j|||fS)N)r rr0Zrun_2to3)rrrGrrrrs zbuild_scripts_2to3.copy_scriptsN)rKrLrMrrrrrrNsrN)__doc__r(rerErZ distutilsrZdistutils.corerZdistutils.dep_utilrZdistutils.utilrrrr1compiler6r rNrrrrs       __pycache__/install_scripts.cpython-36.opt-2.pyc000064400000004010152344523600015556 0ustar003 \@s@ddlZddlmZddlmZddlmZGdddeZdS)N)Command)log)ST_MODEc@sLeZdZdZddddgZdd gZddZddZddZddZ ddZ d S)install_scriptsz%install scripts (Python or otherwise) install-dir=ddirectory to install scripts to build-dir=b'build directory (where to install from)forcef-force installation (overwrite existing files) skip-buildNskip the build stepscCsd|_d|_d|_d|_dS)Nr) install_dirr build_dir skip_build)selfr9/usr/lib64/python3.6/distutils/command/install_scripts.pyinitialize_optionssz"install_scripts.initialize_optionscCs |jdd |jdd d d dS) NZbuild build_scriptsrZinstallrrr r)rr)rr)r r )rr)Zset_undefined_options)rrrrfinalize_options!s  z install_scripts.finalize_optionscCs|js|jd|j|j|j|_tjdkrxT|jD]H}|j rNt j d|q6tj |t dBd@}t j d||tj||q6WdS)Nrposixzchanging mode of %simizchanging mode of %s to %o)rZ run_commandZ copy_treerroutfilesosname get_outputsZdry_runrinfostatrchmod)rfilemoderrrrun)s  zinstall_scripts.runcCs |jjp gS)N)Z distributionscripts)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__Z descriptionZ user_optionsZboolean_optionsrrr$r&rrrrrrsr)rZdistutils.corerZ distutilsrr rrrrrrs   __pycache__/install.cpython-36.opt-1.pyc000064400000033635152344523600014025 0ustar003 _Vjj@sdZddlZddlZddlmZddlmZddlmZddl m Z ddl m Z ddl mZdd lmZmZmZdd lmZdd l mZdd lmZdd lmZdZddddddZddddddddddddedZerdddddded <ddd!d"dded#<d+ZGd)d*d*eZdS),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)purelibplatlibheadersscriptsdataz/$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_homentz $usersitez4$userbase/Python$py_version_nodot/Include/$dist_namez)$userbase/Python$py_version_nodot/Scriptsz $userbasent_userz=$userbase/include/python$py_version_short$abiflags/$dist_namez $userbase/bin unix_userrrrrrc@s:eZdZdZd_d`dadbdddedfdgdidjdkdldmdndodpdqdrgZdd%d(gZer`ejd,dd-efejd,d diZ d.d/Z d0d1Z d2d3Z d4d5Z d6d7Zd8d9Zd:d;Zdd?Zd@dAZdBdCZdDdEZdFdGZdHdIZdJdKZdLdMZdNdOZdPdQZdRdSZdTdUZdVdWZdXefdYefdZefd[efd\d]d^fgZdS)sinstallz'install everything from build directoryprefix=Ninstallation prefix exec-prefix=.(Unix only) prefix for platform-specific fileshome=+(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=|jD]2}|j|}x"|jD]}||kr&|j|q&WqW|jrl|jrl|jtjj|j |jd|S)z.Assembles the outputs of all the sub-commands.z.pth) rget_finalized_commandrappendrrQrhr}r~r|)rWrrcmdrrXrXrYrbs  zinstall.get_outputscCs2g}x(|jD]}|j|}|j|jqW|S)z*Returns the inputs of all the sub-commands)rrextend get_inputs)rWZinputsrrrXrXrYrss  zinstall.get_inputscCs|jjp|jjS)zSReturns true if the current distribution has any Python modules to install.)rrZhas_pure_modulesZhas_ext_modules)rWrXrXrYhas_libs zinstall.has_libcCs |jjS)zLReturns true if the current distribution has any headers to install.)rr has_headers)rWrXrXrYrszinstall.has_headerscCs |jjS)zMReturns true if the current distribution has any scripts to. install.)rr has_scripts)rWrXrXrYrszinstall.has_scriptscCs |jjS)zJReturns true if the current distribution has any data to. install.)rrZhas_data_files)rWrXrXrYhas_dataszinstall.has_datarJrIrKrLZinstall_egg_infocCsdS)NTrX)rWrXrXrYszinstall.)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__Z descriptionrZboolean_optionsrurrrrZrrkrlrmrrrvrxrzr{rryrrrrrrrrZ sub_commandsrXrXrXrYrIs   N3  " , r)rrrrr)__doc__rnrhZ distutilsrZdistutils.corerZdistutils.debugrZdistutils.sysconfigrZdistutils.errorsrZdistutils.file_utilrZdistutils.utilrr r r r Zsiter rruZWINDOWS_SCHEMErrrrXrXrXrYsV            __pycache__/bdist_rpm.cpython-36.opt-2.pyc000064400000030615152344523600014336 0ustar003 \T@s|ddlZddlZddlZddlmZddlmZddlmZddl m Z ddl Tddl m Z ddlmZGd d d eZdS) N)Command)DEBUG) get_platform) write_file)*)get_python_version)logc+@seZdZdZdgdhdidjdkdldmdndodpdqdrdsdtdudvdwdxdydzd{d|d}d~dddddddddddddddddg)Zd4d9d=d2dUgZd4d9d=dXZdYdZZd[d\Zd]d^Z d_d`Z dadbZ dcddZ dedfZ 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=dDdirectory 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-pythonLhard-code the exact path to the current Python interpreter in the .spec file spec-onlyonly regenerate spec file source-onlyonly generate source RPM binary-onlyonly generate binary RPM use-bzip27use bzip2 instead of gzip to create source distributiondistribution-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 numberserial=RPM serial numbervendor=aRPM "vendor" (eg. "Joe Blow ") [default: maintainer or author from setup script] packager=BRPM packager (eg. "Jane Doe ") [default: vendor] doc-files=6list of documentation files (space or comma-separated) changelog= RPM changelogicon=name of icon file provides=%capabilities provided by this package requires=%capabilities required by this package conflicts=-capabilities which conflict with this packagebuild-requires=+capabilities required to build this package obsoletes=*capabilities made obsolete by this package no-autoreq+do not automatically calculate dependencies keep-tempk"don't clean up RPM build directory no-keep-temp&clean up RPM build directory [default]use-rpm-opt-flags8compile with RPM_OPT_FLAGS when building from source RPMno-rpm-opt-flags&do not pass any RPM CFLAGS to compiler rpm3-mode"RPM 3 compatibility mode (default) rpm2-modeRPM 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 buildinginstall-script=6Specify a script for the INSTALL phase of RPM building post-install=;Specify a script for the post-INSTALL phase of RPM buildingpre-uninstall=rnroREADME README.txtrk1rlrirprqrrrsrtrurvrwrxryrzr|r}r~rrr)rr)Z ensure_stringrZ get_contactZget_contact_emailZensure_string_list isinstancerolistrrexistsappend_format_changelogrpZensure_filename)rZreadmerrrrs>                         zbdist_rpm.finalize_package_datac Cstrsz-bdist_rpm._make_spec_file..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: %sVendorPackagerProvidesRequires 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}ZbuildrsZinstallrtcleanrurm -rf $RPM_BUILD_ROOT verifyscriptrvprerwpostrxpreunrypostunrz%rz%files -f INSTALLED_FILESz%defattr(-,root,root)z%doc z %changelog)rrrrrr)r{rrr)rrur)rrvN)rrwN)rrxN)rryN)rrzN)'rrZ get_versionreplacerkZget_description subprocessZ getoutputr splitlinesrrrhZ get_licenserjrrgetattrlowerrrZget_urlrirrqrrrrZget_long_descriptionrcrargvropenreadrrorp)rZ spec_fileZ vendor_hookZproblemZfixedZ fixed_hookZfieldvalZdef_setup_callZ def_buildZ install_cmdZscript_optionsZrpm_optattrdefaultrrrrs                   zbdist_rpm._make_spec_filecCs|s|Sg}x`|jjdD]N}|j}|ddkrD|jd|gq|ddkr\|j|q|jd|qW|ds||d=|S)Nrrrrrz )rrrr)rrpZ new_changelogrrrrr3s   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__Z descriptionZ user_optionsZboolean_optionsZ negative_optrrrrrrrrrrrr s--)r )rrrZdistutils.corerZdistutils.debugrZdistutils.utilrZdistutils.file_utilrZdistutils.errorsZdistutils.sysconfigrZ distutilsrr rrrrs      __pycache__/install_headers.cpython-36.opt-1.pyc000064400000003274152344523600015514 0ustar003 \@s$dZddlmZGdddeZdS)zdistutils.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 ZddZ ddZ dS)install_headerszinstall C/C++ header files install-dir=d$directory to install header files toforcef-force installation (overwrite existing files)cCsd|_d|_g|_dS)Nr) install_dirroutfiles)selfr 9/usr/lib64/python3.6/distutils/command/install_headers.pyinitialize_optionssz"install_headers.initialize_optionscCs|jddddS)NZinstallrr r)rr )rr)Zset_undefined_options)r r r rfinalize_optionssz install_headers.finalize_optionscCsL|jj}|sdS|j|jx*|D]"}|j||j\}}|jj|q"WdS)N) distributionheadersZmkpathr Z copy_filer append)r rheaderout_r r rrun!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__Z descriptionZ user_optionsZboolean_optionsrrrrrr r r rr s rN)__doc__Zdistutils.corerrr r r rs __pycache__/build_py.cpython-36.pyc000064400000024426152344523600013225 0ustar003 \ C@s~dZddlZddlZddlZddlmZddlmZddlTddl m Z m Z ddl m Z Gdd d eZGd d d ee ZdS) zHdistutils.command.build_py Implements the Distutils 'build_py' command.N)glob)Command)*) convert_path Mixin2to3)logc@seZdZdZd8d9d:d;dbuild_pyz5"build" pure Python modules (copy to build directory) build-lib=ddirectory to "build" (copy) tocompileccompile .py to .pyc no-compileN!don't compile .py files [default] optimize=Olalso compile with optimization: -O1 for "python -O", -O2 for "python -OO", and -O0 to disable [default: -O0]forcef2forcibly build everything (ignore file timestamps)cCs4d|_d|_d|_d|_d|_d|_d|_d|_dS)Nr) build_lib py_modulespackage package_data package_dirr optimizer)selfr2/usr/lib64/python3.6/distutils/command/build_py.pyinitialize_options szbuild_py.initialize_optionsc Cs|jddd|jj|_|jj|_|jj|_i|_|jjrbx&|jjjD]\}}t||j|<qHW|j|_ t |j t sy.t |j |_ d|j kodknst Wn tt fk rtdYnXdS) NZbuildrrrzoptimize must be 0, 1, or 2)rr)rr)Zset_undefined_options distributionpackagesrrritemsrget_data_files data_files isinstancerintAssertionError ValueErrorZDistutilsOptionError)rnamepathrrrfinalize_options*s"      "zbuild_py.finalize_optionscCs:|jr|j|jr$|j|j|j|jdddS)Nr)include_bytecode)r build_modulesr#build_packagesbuild_package_data byte_compile get_outputs)rrrrrunCs z build_py.runcsg}|js|Sxr|jD]h}|j|}tjj|jg|jd}d|rRt|dfdd|j||D}|j ||||fqW|S)z?Generate list of '(package,src_dir,build_dir,filenames)' tuples.rcsg|]}|dqS)Nr).0file)plenrr tsz+build_py.get_data_files..) r#get_package_dirosr,joinrsplitlenfind_data_filesappend)rdatarsrc_dir build_dir filenamesr)r9rr%as   zbuild_py.get_data_filescs`|jjdg|jj|g}gx:|D]2}ttjj|t|}jfdd|Dq&WS)z6Return filenames for package's data files in 'src_dir'cs$g|]}|krtjj|r|qSr)r<r,isfile)r7fn)filesrrr:s z,build_py.find_data_files..)rgetrr<r,r=rextend)rrrCZglobspatternZfilelistr)rIrr@ys  zbuild_py.find_data_filescCshd}x^|jD]T\}}}}xF|D]>}tjj||}|jtjj||jtjj|||ddqWq WdS)z$Copy data files into build directoryNF) preserve_mode)r&r<r,r=mkpathdirname copy_file)rZlastdirrrCrDrEfilenametargetrrrr1s zbuild_py.build_package_datac Cs|jd}|js&|r tjj|SdSng}x|ry|jdj|}Wn*tk rn|jd|d|d=Yq,X|jd|tjj|Sq,W|jjd}|dk r|jd||rtjj|SdSdS)zReturn 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).r5rFrr6NrS)r>rr<r,r=KeyErrorinsertrJ)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,existsZDistutilsFileErrorisdirr=rGrwarn)rrrinit_pyrrr check_packages    zbuild_py.check_packagecCs&tjj|stjd||dSdSdS)Nz!file %s (for module %s) not foundFT)r<r,rGrrY)rmodule module_filerrr check_modules zbuild_py.check_modulec Cs|j||ttjj|d}g}tjj|jj}xX|D]P}tjj|}||krztjjtjj |d}|j |||fq8|j d|q8W|S)Nz*.pyrz excluding %s) r[rr<r,r=abspathr"Z script_namesplitextbasenamerAZ debug_print) rrrZ module_filesmodulesZ setup_scriptrZabs_fr\rrrfind_package_moduless   zbuild_py.find_package_modulesc Csi}g}x|jD]}|jd}dj|dd}|d}y||\}}Wn"tk rj|j|}d}YnX|s|j||} |df||<| r|j|d| ftjj||d} |j || sq|j||| fqW|S)aFinds 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,rZ module_baserZcheckedrZr]rrr find_moduless*       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)rrbrrmrrrfind_all_moduless   zbuild_py.find_all_modulescCsdd|jDS)NcSsg|] }|dqS)r6rSr)r7r\rrrr:-sz-build_py.get_source_files..)rg)rrrrget_source_files,szbuild_py.get_source_filescCs$|gt||dg}tjj|S)Nz.py)listr<r,r=)rrDrr\Z outfile_pathrrrget_module_outfile/szbuild_py.get_module_outfiler6cCs|j}g}xx|D]p\}}}|jd}|j|j||}|j||r|jr`|jtjj|dd|j dkr|jtjj||j dqW|dd|j D7}|S)Nr5rF) optimizationrcSs,g|]$\}}}}|D]}tjj||qqSr)r<r,r=)r7rrCrDrErQrrrr:Cs z(build_py.get_outputs..) rgr>rjrrAr importlibutilcache_from_sourcerr&)rr.rbZoutputsrr\r]rQrrrr33s"       zbuild_py.get_outputscCsbt|tr|jd}nt|ttfs,td|j|j||}tj j |}|j ||j ||ddS)Nr5z:'package' must be a string (dot-separated), list, or tupler)rM) r'strr>rituple TypeErrorrjrr<r,rOrNrP)rr\r]rZoutfiledirrrr 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_packagescCstjr|jddSddlm}|j}|dtjkr>|tj}|jrZ||d|j ||j d|j dkr||||j |j ||j ddS)Nz%byte-compiling is disabled, skipping.r)r2r6)rrprefixdry_runrS) sysdont_write_bytecoderYdistutils.utilr2rr<sepr rrur)rrIr2rtrrrr2vs    zbuild_py.byte_compile)r r r )r r r)rNr)rrr)rrr)r6)__name__ __module__ __qualname__Z descriptionZ user_optionsZboolean_optionsZ negative_optr r-r4r%r@r1r;r[r^rcrergrhrjr3rsr/r0r2rrrrrs8   '4  rc@seZdZddZddZdS) build_py_2to3cCsLg|_|jr|j|jr*|j|j|j|j|j|jdddS)Nr)r.) updated_filesrr/r#r0r1Zrun_2to3r2r3)rrrrr4s zbuild_py_2to3.runcCs,tj||||}|dr(|jj|d|S)Nr6r)rrsr~rA)rr\r]rresrrrrsszbuild_py_2to3.build_moduleN)rzr{r|r4rsrrrrr}sr})__doc__r<importlib.utilrlrvrZdistutils.corerZdistutils.errorsrxrrZ distutilsrrr}rrrrs   }__pycache__/build_clib.cpython-36.opt-1.pyc000064400000011553152344523600014442 0ustar003 \V@sTdZddlZddlmZddlTddlmZddlmZddZ Gd d d eZ dS) zdistutils.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)rr4/usr/lib64/python3.6/distutils/command/build_clib.pyrs rc@sleZdZdZd"d#d$d%d&gZdd gZdddefgZddZddZ ddZ ddZ ddZ ddZ 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-productsdebugg"compile with debugging informationforcef2forcibly build everything (ignore file timestamps) compiler=cspecify the compiler typez help-compilerNzlist available compilerscCs:d|_d|_d|_d|_d|_d|_d|_d|_d|_dS)Nr) r build_temp libraries include_dirsdefineundefrrcompiler)selfrrr initialize_options4szbuild_clib.initialize_optionscCsh|jdddd d d |jj|_|jr0|j|j|jdkrH|jjpDg|_t|jtrd|jjtj |_dS) NZbuildrr rrr)rr )rr)rr)rr)rr) Zset_undefined_optionsZ distributionrcheck_library_listr isinstancestrsplitospathsep)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|j dk rx|j D]}|jj |qW|j |jdS)Nr) new_compiler)rdry_runr)rrr)rr*rrrZset_include_dirsrZ define_macrorZundefine_macrobuild_libraries)r r)namevalueZmacrorrr run^s        zbuild_clib.runcCst|tstdx|D]|}t|t rs    __pycache__/upload.cpython-36.pyc000064400000012255152344523600012677 0ustar003 _Vj@sdZddlZddlZddlZddlZddlmZddlmZm Z m Z ddl m Z ddl mZmZddlmZddlmZdd lmZGd d d eZdS) zm distutils.command.upload Implements the Distutils 'upload' subcommand (upload package to a package index). N)standard_b64encode)urlopenRequest HTTPError)urlparse)DistutilsErrorDistutilsOptionError) PyPIRCCommand)spawn)logc@sJeZdZdZejddgZejdgZdd Zd d Zd d Z ddZ dS)uploadzupload binary package to PyPIsignssign files to upload using gpg identity=iGPG identity used to sign filescCs,tj|d|_d|_d|_d|_d|_dS)NrF)r initialize_optionsusernamepassword show_responser identity)selfr0/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 repositoryrealm) r finalize_optionsrr rZ _read_pypircrrrr distribution)rconfigrrrr(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)rmsgcommand pyversionfilenamerrrrun: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| jd| 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}|dkrt(j)\}}}|rd||f}n|dkrdt(j(dd}||d<|jrtjj|dt|dd jf|d<|j*d|j+j,d}d t-|j.d}d!}d"|j,d}|d#}t/j0}x|j1D]\}}d$|}t2|t3s|g}xr|D]j}t4|t5kr|d%|d7}|d}nt6|j,d&}|j7||j7|j,d&|j7d'|j7|qWqjW|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$jAWYdd}~XnX|#d,kr8|j#d-|#|$ft$j%|jBrZ|jC|"}%d.jDd/d0|%d/d0f}|j#|t$j%n"d1|#|$f}|j#|t$jAtE|dS)3NzIncompatible url %shttphttpszunsupported schema Zgpgz --detach-signz-az --local-user)dry_runrbZ file_upload1z1.0)z:actionZprotocol_versionnameversioncontentZfiletyper$Z sha256_digestZmetadata_versionZsummaryZ home_pageZauthorZ author_emaillicense descriptionkeywordsplatformZ classifiersZ download_urlZprovidesZrequiresZ obsoletesz#calculating md5 checksum failed: %sr) get_fips_modeZ md5_digestrZ bdist_rpmzbuilt for %s %sZ bdist_dumbz built for %s)Ztersecommentz.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)dataheaderszServer response (%s): %s -KzUpload failed (%s): %s)r'r()FrrAssertionErrorr rr r*openreadcloserZmetadataZget_nameZ get_versionospathbasenamehashlibZsha256Z hexdigestZget_descriptionZget_urlZ get_contactZget_contact_emailZ get_licenceZget_long_descriptionZ get_keywordsZ get_platformsZget_classifiersZget_download_urlZ get_providesZ get_requiresZ get_obsoletesZmd5 ValueErrorZannouncer INFOZ_hashlibr4r3distrrencoderdecodeioBytesIOitems isinstancelisttypetuplestrwritegetvaluelenrrZgetcoder"rcodeOSErrorZERRORrZ_read_pypi_responsejoinr)&rr#r$r%ZschemaZnetlocZurlZparamsZqueryZ fragmentsZgpg_argsfr/metar9Zdigester"r4r6rIr.idZ user_passZauthboundaryZ sep_boundaryZ end_boundaryZbodykeyvaluetitler:ZrequestresultZstatusreasontextrrrr!Bs                       zupload.upload_fileN)r rr)rrr) __name__ __module__ __qualname__r1r Z user_optionsZboolean_optionsrrr&r!rrrrr s r )__doc__rCrLr3rFbase64rZurllib.requestrrrZ urllib.parserZdistutils.errorsrrZdistutils.corer Zdistutils.spawnr Z distutilsr r rrrrs     build.py000064400000012520152344523600006221 0ustar00"""distutils.command.build Implements the Distutils 'build' command.""" __revision__ = "$Id$" import sys, os from distutils.util import get_platform from distutils.core import Command from distutils.errors import DistutilsOptionError 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"), ('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 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-%s" % (self.plat_name, sys.version[0:3]) # 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.' 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." 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-' + sys.version[0:3]) if self.executable is None and sys.executable: self.executable = os.path.normpath(sys.executable) 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), ] bdist.py000064400000012734152344523600006236 0ustar00"""distutils.command.bdist Implements the Distutils 'bdist' command (create a built [binary] distribution).""" __revision__ = "$Id$" import os from distutils.util import get_platform from distutils.core import Command from distutils.errors import DistutilsPlatformError, DistutilsOptionError 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', 'os2': 'zip'} # Establish the preferred order (for the --help-formats option). format_commands = ['rpm', 'gztar', 'bztar', '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"), '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./dumb", "build/bdist./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) install_scripts.py000064400000004024152344523600010337 0ustar00"""distutils.command.install_scripts Implements the Distutils 'install_scripts' command, for installing Python scripts.""" # contributed by Bastian Kleineidam __revision__ = "$Id$" 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]) | 0555) & 07777 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 [] # class install_scripts bdist_wininst.py000064400000035227152344523600010013 0ustar00"""distutils.command.bdist_wininst Implements the Distutils 'bdist_wininst' command: create a windows installer exe-program.""" __revision__ = "$Id$" import sys import os import string from sysconfig import get_python_version from distutils.core import Command from distutils.dir_util import remove_tree from distutils.errors import DistutilsOptionError, DistutilsPlatformError from distutils import log from distutils.util import get_platform 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'] 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 # initialize_options() 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 # finalize_options() 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 = sys.version[0:3] 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 = string.upper(key) 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) # 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 string.replace(s, "\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" % \ (string.capitalize(name), 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 string.join(lines, "\n") # get_inidata() 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: bitmapdata = open(bitmap, "rb").read() bitmaplen = len(bitmapdata) else: bitmaplen = 0 file = open(installer_name, "wb") file.write(self.get_exe_bytes()) if bitmap: file.write(bitmapdata) # Convert cfgdata from unicode to ascii, mbcs encoded try: unicode except NameError: pass else: if isinstance(cfgdata, unicode): cfgdata = cfgdata.encode("mbcs") # Append the pre-install script cfgdata = cfgdata + "\0" if self.pre_install_script: script_data = open(self.pre_install_script, "r").read() cfgdata = cfgdata + script_data + "\n\0" else: # empty pre-install script cfgdata = cfgdata + "\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(" cur_version: bv = get_build_version() else: if self.target_version < "2.4": bv = 6.0 else: bv = 7.1 else: # for current version - use authoritative check. bv = get_build_version() # 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-%.1f%s.exe" % (bv, sfix)) f = open(filename, "rb") try: return f.read() finally: f.close() # class bdist_wininst install_data.py000064400000005435152344523600007570 0ustar00"""distutils.command.install_data Implements the Distutils 'install_data' command, for installing platform-independent data files.""" # contributed by Bastian Kleineidam __revision__ = "$Id$" 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 install_egg_info.py000064400000005033152344523600010426 0ustar00"""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%s.egg-info" % ( to_filename(safe_name(self.distribution.get_name())), to_filename(safe_version(self.distribution.get_version())), sys.version[:3] ) 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: f = open(target, 'w') self.distribution.metadata.write_pkg_file(f) f.close() 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('-','_') build_ext.py000064400000077377152344523600007126 0ustar00"""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 # Similarly, extensions in debug mode are named 'module_d.so', to # avoid adding the _d to the SO config variable: return os.path.join(*ext_path) + (sys.pydebug and "_d" or "") + 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)) if sys.pydebug: pythonlib += '_d' return ext.libraries + [pythonlib] else: return ext.libraries # class build_ext install_lib.py000064400000020222152344523600007414 0ustar00"""distutils.command.install_lib Implements the Distutils 'install_lib' command (install all Python modules).""" __revision__ = "$Id$" import os import sys from distutils.core import Command from distutils.errors import DistutilsOptionError # Extension for Python source files. if hasattr(os, 'extsep'): PYTHON_SOURCE_EXTENSION = os.extsep + "py" else: 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 "level 1" .pyo (--compile --optimize) # 4) compile "level 1" .pyo only (--no-compile --optimize) # 5) compile .pyc and "level 2" .pyo (--compile --optimize-more) # 6) compile "level 2" .pyo only (--no-compile --optimize-more) # # The UI for this is two option, '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 .pyo 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 = 1 if self.optimize is None: self.optimize = 0 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(py_file + "c") if self.optimize > 0: bytecode_files.append(py_file + "o") 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 check.py000064400000013050152344523600006176 0ustar00"""distutils.command.check Implements the Distutils 'check' command. """ __revision__ = "$Id$" from distutils.core import Command from distutils.dist import PKG_INFO_ENCODING 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 StringIO 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 ImportError: # docutils is not installed 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() if not isinstance(data, unicode): data = data.decode(PKG_INFO_ENCODING) 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 register.py000064400000027077152344523600006763 0ustar00"""distutils.command.register Implements the Distutils 'register' command (register with the repository). """ # created 2002/10/21, Richard Jones __revision__ = "$Id$" import urllib2 import getpass import urlparse from warnings import warn from distutils.core import PyPIRCCommand 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. ''' response = urllib2.urlopen(self.repository+'?:action=list_classifiers') log.info(response.read()) 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 = raw_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 = raw_input('Username: ') while not password: password = getpass.getpass('Password: ') # set up the authentication auth = urllib2.HTTPPasswordMgr() host = urlparse.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 = raw_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'] = raw_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'] = raw_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'] = raw_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 + '--' chunks = [] 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: chunks.append(sep_boundary) chunks.append('\nContent-Disposition: form-data; name="%s"'%key) chunks.append("\n\n") chunks.append(value) if value and value[-1] == '\r': chunks.append('\n') # write an extra newline (lurve Macs) chunks.append(end_boundary) chunks.append("\n") # chunks may be bytes (str) or unicode objects that we need to encode body = [] for chunk in chunks: if isinstance(chunk, unicode): body.append(chunk.encode('utf-8')) else: body.append(chunk) body = ''.join(body) # build the Request headers = { 'Content-type': 'multipart/form-data; boundary=%s; charset=utf-8'%boundary, 'Content-length': str(len(body)) } req = urllib2.Request(self.repository, body, headers) # handle HTTP and include the Basic Auth handler opener = urllib2.build_opener( urllib2.HTTPBasicAuthHandler(password_mgr=auth) ) data = '' try: result = opener.open(req) except urllib2.HTTPError, e: if self.show_response: data = e.fp.read() result = e.code, e.msg except urllib2.URLError, e: result = 500, str(e) else: if self.show_response: data = result.read() result = 200, 'OK' if self.show_response: dashes = '-' * 75 self.announce('%s%s%s' % (dashes, data, dashes)) return result upload.py000064400000015530152344523600006412 0ustar00"""distutils.command.upload Implements the Distutils 'upload' subcommand (upload package to PyPI).""" import os import socket import platform from urllib2 import urlopen, Request, HTTPError from base64 import standard_b64encode import urlparse import cStringIO as StringIO from hashlib import md5 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.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', 'protcol_version': '1', # identify release 'name': meta.get_name(), 'version': meta.get_version(), # file content 'content': (os.path.basename(filename),content), 'filetype': command, 'pyversion': pyversion, 'md5_digest': md5(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(), } comment = '' if command == 'bdist_rpm': dist, version, id = platform.dist() if dist: comment = 'built for %s %s' % (dist, version) elif command == 'bdist_dumb': comment = 'built for %s' % platform.platform(terse=1) data['comment'] = comment if self.sign: data['gpg_signature'] = (os.path.basename(filename) + ".asc", open(filename+".asc").read()) # set up the authentication auth = "Basic " + standard_b64encode(self.username + ":" + self.password) # Build up the MIME payload for the POST data boundary = '--------------GHSKFJDLGDS7543FJKLFHRE75642756743254' sep_boundary = '\r\n--' + boundary end_boundary = sep_boundary + '--\r\n' body = StringIO.StringIO() for key, value in data.items(): # handle multiple entries for the same name if not isinstance(value, list): value = [value] for value in value: if isinstance(value, tuple): fn = ';filename="%s"' % value[0] value = value[1] else: fn = "" body.write(sep_boundary) body.write('\r\nContent-Disposition: form-data; name="%s"' % key) body.write(fn) body.write("\r\n\r\n") body.write(value) body.write(end_boundary) body = body.getvalue() self.announce("Submitting %s to %s" % (filename, self.repository), 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 if self.show_response: msg = '\n'.join(('-' * 75, result.read(), '-' * 75)) self.announce(msg, log.INFO) except socket.error, e: self.announce(str(e), log.ERROR) raise except HTTPError, e: status = e.code reason = e.msg if status == 200: self.announce('Server response (%s): %s' % (status, reason), log.INFO) else: msg = 'Upload failed (%s): %s' % (status, reason) self.announce(msg, log.ERROR) raise DistutilsError(msg) clean.py000064400000005376152344523600006217 0ustar00"""distutils.command.clean Implements the Distutils 'clean' command.""" # contributed by Bastian Kleineidam , added 2000-03-18 __revision__ = "$Id$" 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. 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 # class clean build_py.py000064400000037722152344523600006744 0ustar00"""distutils.command.build_py Implements the Distutils 'build_py' command.""" __revision__ = "$Id$" import os import sys from glob import glob from distutils.core import Command from distutils.errors import DistutilsOptionError, DistutilsFileError from distutils.util import convert_path 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(os.path.join(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""" 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(os.path.join(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(filename + "c") if self.optimize > 0: outputs.append(filename + "o") 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) install.py000064400000063230152344523600006574 0ustar00"""distutils.command.install Implements the Distutils 'install' command.""" from distutils import log # This module should be kept compatible with Python 2.1. __revision__ = "$Id$" import sys, os, string from types import * 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 if sys.version < "2.2": WINDOWS_SCHEME = { 'purelib': '$base', 'platlib': '$base', 'headers': '$base/Include/$dist_name', 'scripts': '$base/Scripts', 'data' : '$base', } else: 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/$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', }, 'unix_user': { 'purelib': '$usersite', 'platlib': '$usersite', 'headers': '$userbase/include/python$py_version_short/$dist_name', 'scripts': '$userbase/bin', 'data' : '$userbase', }, 'nt': WINDOWS_SCHEME, 'nt_user': { 'purelib': '$usersite', 'platlib': '$usersite', 'headers': '$userbase/Python$py_version_nodot/Include/$dist_name', 'scripts': '$userbase/Scripts', 'data' : '$userbase', }, 'os2': { 'purelib': '$base/Lib/site-packages', 'platlib': '$base/Lib/site-packages', 'headers': '$base/Include/$dist_name', 'scripts': '$base/Scripts', 'data' : '$base', }, 'os2_home': { 'purelib': '$usersite', 'platlib': '$usersite', 'headers': '$userbase/include/python$py_version_short/$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"), ('user', None, "install in user site-package '%s'" % USER_SITE), # 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', 'user'] negative_opt = {'no-compile' : 'compile'} def initialize_options (self): # 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 # 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): # This method (and its pliant slaves, 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 = (string.split(sys.version))[0] (prefix, exec_prefix) = get_config_vars('prefix', 'exec_prefix') 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': py_version[0:3], 'py_version_nodot': py_version[0] + py_version[2], 'sys_prefix': prefix, 'prefix': prefix, 'sys_exec_prefix': exec_prefix, 'exec_prefix': exec_prefix, 'userbase': self.install_userbase, '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') # 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! # finalize_options () def dump_dirs (self, msg): if DEBUG: from distutils.fancy_getopt import longopt_xlate print 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 = string.translate(self.negative_opt[opt_name], longopt_xlate) val = not getattr(self, opt_name) else: opt_name = string.translate(opt_name, longopt_xlate) val = getattr(self, opt_name) print " %s: %s" % (opt_name, val) def finalize_unix (self): 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 = os.path.normpath(sys.prefix) self.exec_prefix = os.path.normpath(sys.exec_prefix) 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") # finalize_unix () def finalize_other (self): # Windows and Mac OS for now 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 # finalize_other () def select_scheme (self, name): # 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): self._expand_attrs(['install_base', 'install_platbase', 'root']) def expand_dirs (self): self._expand_attrs(['install_purelib', 'install_platlib', 'install_lib', 'install_headers', 'install_scripts', 'install_data',]) def convert_paths (self, *names): for name in names: attr = "install_" + name setattr(self, attr, convert_path(getattr(self, attr))) def handle_extra_path (self): if self.extra_path is None: self.extra_path = self.distribution.extra_path if self.extra_path is not None: if type(self.extra_path) is StringType: self.extra_path = string.split(self.extra_path, ',') 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 # handle_extra_path () def change_roots (self, *names): 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.iteritems(): if path.startswith(home) and not os.path.isdir(path): self.debug_print("os.makedirs('%s', 0700)" % path) os.makedirs(path, 0700) # -- Command execution methods ------------------------------------- def run (self): # 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 xrange(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) # run () def create_path_file (self): 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): # Assemble 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): # 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): """Return 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): return self.distribution.has_headers() def has_scripts (self): return self.distribution.has_scripts() def has_data (self): 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), ] # class install bdist_rpm.py000064400000051071152344523600007111 0ustar00"""distutils.command.bdist_rpm Implements the Distutils 'bdist_rpm' command (create RPM source and binary distributions).""" __revision__ = "$Id$" import sys import os import string from distutils.core import Command from distutils.debug import DEBUG from distutils.file_util import write_file from distutils.sysconfig import get_python_version from distutils.errors import (DistutilsOptionError, DistutilsPlatformError, DistutilsFileError, DistutilsExecError) 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 \") " "[default: maintainer or author from setup script]"), ('packager=', None, "RPM packager (eg. \"Jane Doe \") " "[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 # initialize_options() 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 = "python" 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() # finalize_options() 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') # finalize_package_data () 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. 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 = ['rpm'] if os.path.exists('/usr/bin/rpmbuild') or \ os.path.exists('/bin/rpmbuild'): 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') 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 1: line = out.readline() if not line: break l = string.split(string.strip(line)) 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)) # run() 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(), ] # 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, string.lower(field)) if isinstance(val, list): spec_file.append('%s: %s' % (field, string.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: ' + string.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: spec_file.extend(string.split(open(val, 'r').read(), '\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 ' + string.join(self.doc_files)) if self.changelog: spec_file.extend([ '', '%changelog',]) spec_file.extend(self.changelog) return spec_file # _make_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 string.split(string.strip(changelog), '\n'): line = string.strip(line) 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 # _format_changelog() # class bdist_rpm command_template000064400000001317152344523600010006 0ustar00"""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 # initialize_options() def finalize_options (self): if self.x is None: self.x = # finalize_options() def run (self): # run() # class x bdist_dumb.py000064400000012114152344523600007235 0ustar00"""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).""" __revision__ = "$Id$" import os from sysconfig import get_python_version from distutils.util import get_platform from distutils.core import Command from distutils.dir_util import remove_tree, ensure_relative from distutils.errors import DistutilsPlatformError 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, ztar, gztar, 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', 'os2': '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) # OS/2 objects to any ":" characters in a filename (such as when # a timestamp is used in a version) so change them to hyphens. if os.name == "os2": archive_basename = archive_basename.replace(":", "-") 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) build_scripts.py000064400000010766152344523600010002 0ustar00"""distutils.command.build_scripts Implements the Distutils 'build_scripts' command.""" __revision__ = "$Id$" import os, re from stat import ST_MODE from distutils.core import Command from distutils.dep_util import newer from distutils.util import convert_path from distutils import log # check if Python is called on the first line with this expression first_line_re = re.compile('^#!.*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): """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. """ _sysconfig = __import__('sysconfig') self.mkpath(self.build_dir) outfiles = [] for script in self.scripts: adjust = 0 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, "r") except IOError: if not self.dry_run: raise f = None else: 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 = 1 post_interp = match.group(1) or '' if adjust: log.info("copying and adjusting %s -> %s", script, self.build_dir) if not self.dry_run: outf = open(outfile, "w") if not _sysconfig.is_python_build(): outf.write("#!%s%s\n" % (self.executable, post_interp)) else: outf.write("#!%s%s\n" % (os.path.join( _sysconfig.get_config_var("BINDIR"), "python%s%s" % (_sysconfig.get_config_var("VERSION"), _sysconfig.get_config_var("EXE"))), post_interp)) outf.writelines(f.readlines()) outf.close() if f: f.close() else: if f: f.close() 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] & 07777 newmode = (oldmode | 0555) & 07777 if newmode != oldmode: log.info("changing mode of %s from %o to %o", file, oldmode, newmode) os.chmod(file, newmode) # copy_scripts () # class build_scripts config.py000064400000031512152344523600006371 0ustar00"""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". """ __revision__ = "$Id$" import os import 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] file = open(filename, "w") 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") file.close() 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 = 1 try: self._preprocess(body, headers, include_dirs, lang) except CompileError: ok = 0 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) file = open(out) match = 0 while 1: line = file.readline() if line == '': break if pattern.search(line): match = 1 break file.close() 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 = 1 except CompileError: ok = 0 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 = 1 except (CompileError, LinkError): ok = 0 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 = 1 except (CompileError, LinkError, DistutilsExecError): ok = 0 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) # check_func () 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() __init__.py000064400000001466152344523600006670 0ustar00"""distutils.command Package containing implementation of all the standard Distutils commands.""" __revision__ = "$Id$" __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', 'upload', 'check', # 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 ] bdist_msi.py000064400000104571152344523600007107 0ustar00# -*- coding: iso-8859-1 -*- # Copyright (C) 2005, 2006 Martin von Lwis # 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 sysconfig import get_python_version from distutils.core import Command from distutils.dir_util import remove_tree from distutils.version import StrictVersion from distutils.errors import DistutilsOptionError from distutils import log from distutils.util import get_platform 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 #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 # finalize_options() 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 = sys.version[0:3] 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") f = open(scriptfn, "w") # 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 # """ # f.write('rem ="""\n%1 %0\nexit\n"""\n') f.write(open(self.pre_install_script).read()) f.close() 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 # 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, "{\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, "{\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 install_headers.py000064400000002502152344523600010262 0ustar00"""distutils.command.install_headers Implements the Distutils 'install_headers' command, to install C/C++ header files to the Python include directory.""" __revision__ = "$Id$" 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 # class install_headers build_clib.py000064400000017703152344523600007222 0ustar00"""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.""" __revision__ = "$Id$" # 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 DistutilsSetupError 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) __pycache__/build_clib.cpython-38.pyc000064400000011320152345030560013474 0ustar00U e5dV@sTdZddlZddlmZddlTddlmZddlmZddZ Gd d d eZ dS) zdistutils.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)Nrshow_compilers)distutils.ccompilerrrr 4/usr/lib64/python3.8/distutils/command/build_clib.pyrs rc@sleZdZdZdddddgZddgZd d d efgZd d ZddZ ddZ ddZ ddZ ddZ ddZd S) build_clibz/build C/C++ libraries used by Python extensions)z build-clib=bz%directory to build C/C++ libraries to)z build-temp=tz,directory to put temporary build by-products)debuggz"compile with debugging information)forcefz2forcibly 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_dirsdefineundefrrcompilerselfr r r initialize_options4szbuild_clib.initialize_optionscCsh|dddddd|jj|_|jr0||j|jdkrH|jjpDg|_t|jtrd|jtj |_dS)NZbuild)rr )rr)rr)rr)rr) Zset_undefined_optionsZ distributionrcheck_library_listr isinstancestrsplitospathseprr 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^|j dk r|j D]}|j |q| |jdS)Nr) new_compiler)rdry_runr)rrr#rr$rrrZset_include_dirsrZ define_macrorZundefine_macrobuild_libraries)rr#namevalueZmacror r r run^s"      zbuild_clib.runcCst|tstd|D]z}t|ts8t|dkr8td|\}}t|tsRtdd|ksntjdkr~tj|kr~td|dt|tstdqd 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 tuplesz*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) rlistDistutilsSetupErrortuplelenrr sepdict)rrlibr& build_infor r r rvs,   zbuild_clib.check_library_listcCs,|js dSg}|jD]\}}||q|S)N)rappend)rZ lib_nameslib_namer2r r r get_library_namess  zbuild_clib.get_library_namescCsZ||jg}|jD]>\}}|d}|dks>t|ttfsJtd|||q|S)Nsourcesfin 'libraries' option (library '%s'), 'sources' must be present and must be a list of source filenames)rrgetrr+r-r,extend)r filenamesr4r2r6r r r get_source_filess   zbuild_clib.get_source_filescCs|D]\}}|d}|dks,t|ttfs8td|t|}td||d}|d}|jj||j |||j d}|jj |||j |j dqdS)Nr6r7zbuilding '%s' librarymacrosr) output_dirr<rr)r=r) r8rr+r-r,rinforcompilerrZcreate_static_libr )rrr4r2r6r<rZobjectsr r r r%s,      zbuild_clib.build_libraries)__name__ __module__ __qualname__Z descriptionZ user_optionsZboolean_optionsrZ help_optionsrr"r(rr5r;r%r r r r r s( $ r ) __doc__r Zdistutils.corerZdistutils.errorsZdistutils.sysconfigrZ distutilsrrr r r r r s   __pycache__/install_data.cpython-38.opt-1.pyc000064400000004363152345030560015013 0ustar00U e5d @s<dZddlZddlmZddlmZmZGdddeZdS)zdistutils.command.install_data Implements the Distutils 'install_data' command, for installing platform-independent data files.N)Command) change_root convert_pathc@sHeZdZdZdddgZdgZddZdd Zd d Zd d Z ddZ dS) install_datazinstall data files)z install-dir=dzIbase directory for installing data files (default: installation base dir))zroot=Nzs __pycache__/bdist.cpython-38.pyc000064400000007124152345030560012520 0ustar00U e5d@sHdZddlZddlmZddlTddlmZddZGdd d eZdS) zidistutils.command.bdist Implements the Distutils 'bdist' command (create a built [binary] distribution).N)Command)*) get_platformcCsPddlm}g}tjD]"}|d|dtj|dfq||}|ddS)zFPrint list of available formats (arguments to "--format" option). r) FancyGetoptformats=Nz'List of available distribution formats:)Zdistutils.fancy_getoptrbdistformat_commandsappendformat_commandZ print_help)rformatsformatZpretty_printerr//usr/lib64/python3.8/distutils/command/bdist.py show_formats s    rc @seZdZdZddddefdddd d gZd gZd d defgZdZ dddZ dddddddddg Z ddddddd d!d"d# Z d$d%Z d&d'Zd(d)Zd S)*rz$create a built (binary) distribution)z bdist-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_rpmgztarzip)posixntrpmbztarxztarztartarwininstmsi)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_buildgroupowner)selfrrrinitialize_optionsQszbdist.initialize_optionscCs|jdkr(|jrt|_n|dj|_|jdkrT|dj}tj|d|j|_| d|j dkrz|j tj g|_ Wn"t k rtdtj YnX|jdkrd|_dS)NZbuildzbdist.r z;don't know how to create built distributions on platform %sZdist)r%r'rZget_finalized_commandr$ build_baseospathjoinZensure_string_listr default_formatnameKeyErrorZDistutilsPlatformErrorr&)r*r,rrrfinalize_optionsZs*        zbdist.finalize_optionsc Csg}|jD]>}z||j|dWq tk rFtd|Yq Xq tt|jD]h}||}||}||jkr|j||_ |dkr|j |_ |j |_ |||ddkrd|_ | |qXdS)Nrzinvalid format '%s'r#r)r r r r2ZDistutilsOptionErrorrangelenZreinitialize_commandno_format_optionr r)r(Z keep_tempZ run_command)r*Zcommandsr iZcmd_nameZsub_cmdrrrrunvs"    z bdist.run)__name__ __module__ __qualname__Z descriptionrZ user_optionsZboolean_optionsrZ help_optionsr6r0r r r+r3r8rrrrrsR   r) __doc__r-Zdistutils.corerZdistutils.errorsZdistutils.utilrrrrrrrs    __pycache__/sdist.cpython-38.opt-2.pyc000064400000025627152345030560013511 0ustar00U e5d=J@sddlZddlZddlmZddlmZddlmZddlmZddlm Z ddlm Z ddl m Z dd l mZdd lmZdd lmZdd lmZmZd dZGdddeZdS)N)glob)warn)Command)dir_util) file_util) archive_util)TextFile)FileList)log) convert_path)DistutilsTemplateErrorDistutilsOptionErrorcCs`ddlm}ddlm}g}|D] }|d|d||dfq$|||ddS)Nr) FancyGetopt)ARCHIVE_FORMATSformats=z.List of available source distribution formats:)Zdistutils.fancy_getoptrZdistutils.archive_utilrkeysappendsortZ print_help)rrformatsformatr//usr/lib64/python3.8/distutils/command/sdist.py show_formatss     rc@s"eZdZdZddZdddddd d d d d ddddgZddddddgZdddefgZdddZ defgZ dZ ddZ d d!Z d"d#Zd$d%Zd&d'Zd(d)Zed*d+Zd,d-Zd.d/Zd0d1Zd2d3Zd4d5Zd6d7Zd8d9Zd:d;Zdd?Zd@dAZdBdCZdDdEZ dFdGZ!dHdIZ"dS)Jsdistz6create a source distribution (tarball, zip file, etc.)cCs|jSN)metadata_checkselfrrrchecking_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)pruneNzspecifically 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-onlyozEjust regenerate the manifest and then stop (implies --force-manifest))force-manifestfzkforcibly regenerate the manifest and carry on as usual. Deprecated: now the manifest is always regenerated.)rNz6formats for source distribution (comma-separated list)) keep-tempkz@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)NrZgztar) templatemanifest use_defaultsr$ manifest_onlyZforce_manifestr keep_tempdist_dir archive_filesrownergrouprrrrinitialize_optionseszsdist.initialize_optionscCsZ|jdkrd|_|jdkr d|_|dt|j}|rFtd||jdkrVd|_dS)NZMANIFESTz MANIFEST.inrzunknown archive format '%s'Zdist)r3r2Zensure_string_listrZcheck_archive_formatsrr r7)rZ bad_formatrrrfinalize_options|s     zsdist.finalize_optionscCs>t|_|D]}||q||jr2dS|dSr)r filelistZget_sub_commandsZ run_command get_file_listr5make_distribution)rZcmd_namerrrruns  z sdist.runcCs*tdt|jd}||dS)Nzadistutils.command.sdist.check_metadata is deprecated, use the check command insteadr0)rPendingDeprecationWarning distributionZget_command_objZensure_finalizedr@)rr0rrrcheck_metadatas  zsdist.check_metadatacCstj|j}|s:|r:||j|jdS|sN| d|j|j |j rf| |rr| |jr||j|j|dS)Nz?manifest template '%s' does not exist (using default file list))ospathisfiler2_manifest_is_not_generated read_manifestr=rZremove_duplicatesrfindallr4 add_defaults read_templater$prune_file_listwrite_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_scriptsrrrrrJszsdist.add_defaultscCs:tj|sdStj|}tj|\}}|t|kS)NF)rDrEexistsabspathsplitlistdir)fspathrVZ directoryfilenamerrr_cs_path_existss  zsdist._cs_path_existscCs|j|jjg}|D]~}t|trj|}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) READMESrBZ script_name isinstancetupler[r=rrjoin)rZ standardsfnZaltsZgot_itrrrrNs"    zsdist._add_defaults_standardscCs4ddg}|D]"}ttjjt|}|j|q dS)Nz test/test*.pyz setup.cfg)filterrDrErFrr=extend)rZoptionalpatternfilesrrrrOszsdist._add_defaults_optionalcCs\|d}|jr$|j||jD],\}}}}|D]}|jtj ||q:q*dS)Nbuild_py) get_finalized_commandrBZhas_pure_modulesr=rbget_source_files data_filesrrDrEr_)rreZpkgZsrc_dirZ build_dir filenamesrZrrrrPs   zsdist._add_defaults_pythoncCsz|jrv|jjD]b}t|trBt|}tj|rt|j |q|\}}|D]$}t|}tj|rN|j |qNqdSr) rBZhas_data_filesrhr]strr rDrErFr=r)ritemdirnamerir)rrrrQ$s     zsdist._add_defaults_data_filescCs(|jr$|d}|j|dS)N build_ext)rBZhas_ext_modulesrfr=rbrg)rrmrrrrR5s  zsdist._add_defaults_extcCs(|jr$|d}|j|dS)N build_clib)rBZhas_c_librariesrfr=rbrg)rrnrrrrS:s  zsdist._add_defaults_c_libscCs(|jr$|d}|j|dS)N build_scripts)rBZ has_scriptsrfr=rbrg)rrorrrrT?s  zsdist._add_defaults_scriptsc Cstd|jt|jddddddd}zh|}|dkr:qz|j|Wq(tt fk r}z| d|j |j |fW5d}~XYq(Xq(W5|XdS)Nzreading manifest template '%s'r1)Zstrip_commentsZ skip_blanksZ join_linesZ lstrip_wsZ rstrip_wsZ collapse_joinz%s, line %d: %s) r infor2rclosereadliner=Zprocess_template_liner ValueErrorrrZZ current_line)rr2linemsgrrrrKDs&   zsdist.read_templatecCs|d}|j}|jjd|jd|jjd|dtjdkrFd}nd}dddd d d d g}d |d||f}|jj|dddS)Nbuild)prefixZwin32z/|\\/ZRCSZCVSz\.svnz\.hgz\.gitz\.bzrZ_darcsz(^|%s)(%s)(%s).*|r1)Zis_regex) rfrB get_fullnamer=Zexclude_patternZ build_basesysplatformr_)rrvbase_dirZsepsZvcs_dirsZvcs_ptrnrrrrLas    zsdist.prune_file_listcCsX|rtd|jdS|jjdd}|dd|tj |j|fd|jdS)Nz5not writing to manually maintained manifest file '%s'rz*# file GENERATED by distutils, do NOT editzwriting manifest file '%s') rGr rpr3r=rdinsertZexecuterZ write_file)rZcontentrrrrMys zsdist.write_manifestcCs<tj|jsdSt|j}z |}W5|X|dkS)NFz+# file GENERATED by distutils, do NOT edit )rDrErFr3openrqrr)rfpZ first_linerrrrGs   z sdist._manifest_is_not_generatedc CsVtd|jt|j4}|D](}|}|ds|s:q|j|qW5QRXdS)Nzreading manifest file '%s'#)r rpr3rstrip startswithr=r)rr3rtrrrrHs zsdist.read_manifestcCs||tj|||jdttdr4d}d|}n d}d|}|sPtdn t||D]<}tj |s|td|q^tj ||}|j |||dq^|j j|dS) Ndry_runlinkZhardzmaking hard links in %s...zcopying files to %s...z)no files to distribute -- empty manifest?z#'%s' not a regular file -- skipping)r)ZmkpathrZ create_treerhasattrrDr rrprErFr_Z copy_filerBZmetadataZwrite_pkg_info)rr}rdrrufiledestrrrmake_release_trees      zsdist.make_release_treecCs|j}tj|j|}|||jjg}d|j krT|j |j |j d|j D]:}|j ||||j|jd}| ||jj dd|fqZ||_|jstj||jddS)NZtar)r}r9r:rr)rBrzrDrEr_r7rr=rdrrpopindexZ make_archiver9r:Z dist_filesr8r6rZ remove_treer)rr}Z base_namer8Zfmtrrrrr?s     zsdist.make_distributioncCs|jSr)r8rrrrget_archive_filesszsdist.get_archive_files)#__name__ __module__ __qualname__Z descriptionrZ user_optionsZboolean_optionsrZ help_optionsZ negative_optZ sub_commandsr\r;r<r@rCr>rJ staticmethodr[rNrOrPrQrRrSrTrKrLrMrGrHrr?rrrrrr$sp' (  *r)rDr{rwarningsrZdistutils.corerZ distutilsrrrZdistutils.text_filerZdistutils.filelistr r Zdistutils.utilr Zdistutils.errorsr r rrrrrrs          __pycache__/build.cpython-38.opt-1.pyc000064400000007453152345030560013456 0ustar00U e5d@sTdZddlZddlZddlmZddlmZddlmZddZ Gdd d eZ dS) zBdistutils.command.build Implements the Distutils 'build' command.N)Command)DistutilsOptionError) get_platformcCsddlm}|dS)Nrshow_compilers)Zdistutils.ccompilerrrr//usr/lib64/python3.8/distutils/command/build.pyr s rc @seZdZdZdddddddd d efd d d ddg ZddgZdddefgZddZ ddZ ddZ ddZ ddZ dd Zd!d"Zd#e fd$e fd%efd&efgZdS)'buildz"build everything needed to install)z build-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)z build-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)debuggz;compile extensions and libraries with debugging information)forcefz2forcibly build everything (ignore file timestamps))z executable=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 executableparallelselfrrrinitialize_options8szbuild.initialize_optionscCsb|jdkrt|_ntjdkr&tdd|jftjdd}ttdrR|d7}|jdkrntj |j d|_|j dkrtj |j d||_ |j dkr|jjr|j |_ n|j|_ |jdkrtj |j d||_|jdkrtj |j d tjdd|_|jdkr tjr tj tj|_t|jtr^zt|j|_Wntk r\td YnXdS) NntzW--plat-name only supported on Windows (try using './configure --help' on your platform)z .%s-%d.%dZgettotalrefcountz-pydebuglibZtempz scripts-%d.%dzparallel should be an integer)rrosnamersys version_infohasattrrpathjoinrrr distributionZ ext_modulesrrrnormpath isinstancerstrint ValueError)rZplat_specifierrrrfinalize_optionsHsD             zbuild.finalize_optionscCs|D]}||qdSN)Zget_sub_commandsZ run_command)rZcmd_namerrrruns z build.runcCs |jSr1)r*has_pure_modulesrrrrr3szbuild.has_pure_modulescCs |jSr1)r*has_c_librariesrrrrr4szbuild.has_c_librariescCs |jSr1)r*has_ext_modulesrrrrr5szbuild.has_ext_modulescCs |jSr1)r* has_scriptsrrrrr6szbuild.has_scriptsZbuild_pyZ build_clibZ build_extr)__name__ __module__ __qualname__Z descriptionrZ user_optionsZboolean_optionsrZ help_optionsrr0r2r3r4r5r6Z sub_commandsrrrrr sH8 r ) __doc__r%r#Zdistutils.corerZdistutils.errorsrZdistutils.utilrrr rrrrs    __pycache__/bdist_wininst.cpython-38.opt-2.pyc000064400000020136152345030560015231 0ustar00U e5d>@stddlZddlZddlZddlmZddlmZddlmZm Z ddl Tddl m Z ddl mZGdd d eZdS) N)Command) get_platform) create_tree remove_tree)*)get_python_version)logc seZdZdZddddefdddd d d d d dddg ZddddgZejdkZ fddZ ddZ ddZ ddZ ddZd'd!d"Zd#d$Zd%d&ZZS)( 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-tempkzPkeep the pseudo-installation tree around after creating the distribution archive)ztarget-version=Nz6require a specific python version on the target system)no-target-compilecz/do not compile .py to .pyc on the target system)no-target-optimizeoz;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=Nzspecify Vista's UAC handling - 'none'/default=no handling, 'auto'=use UAC if target Python installed for all users, 'force'=always use UACr r rrwin32cs tj||tdtddS)Nz^bdist_wininst command is deprecated since Python 3.8, use bdist_wheel (wheel packages) instead)super__init__warningswarnDeprecationWarning)selfargskw __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_tempno_target_compileno_target_optimizetarget_versiondist_dirbitmaptitle skip_buildinstall_scriptpre_install_scriptuser_access_control)rr!r!r"initialize_optionsEsz bdist_wininst.initialize_optionscCs|dd|jdkrR|jr6|jr6|jd}|j|_|dj}tj |d|_|j s^d|_ |js|j rt }|j r|j |krtd|f||_ |ddd|jr|jjD]}|jtj |krqqtd|jdS) Nbdist)r,r,ZwininstzMtarget 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_objget_finalized_command bdist_baseospathjoinr(has_ext_modulesrZDistutilsOptionErrorr-scriptsbasename)rr1r5Z short_versionscriptr!r!r"finalize_optionsUs>      zbdist_wininst.finalize_optionsc Cstjdkr&|js|jr&td|js6|d|jddd}|j |_ |j|_d|_ |j |_ |d}d|_ d|_|jr|j}|sd tjdd }d |j |f}|d}tj|jd ||_d D],}|}|dkr|d}t|d||qtd|j |tjdtj|j d|tjd=ddlm}|} |j } |j!| d|j d} |"| | |j#|jrt$} nd} |jj%&d| |'| ft(d| t)| |j*st+|j |j,ddS)Nrz^distribution contains extensions and/or C libraries; must be compiled on a Windows 32 platformbuildinstall)Zreinit_subcommandsr install_libz%d.%drz.%s-%slib)ZpurelibZplatlibheadersr:datarCz/Include/$dist_nameZinstall_zinstalling to %sZPURELIB)mktempzip)Zroot_diranyr zremoving temporary file '%s')dry_run)-sysplatformr3r9Zhas_c_librariesZDistutilsPlatformErrorr,Z run_commandZreinitialize_commandr#rootZwarn_dirr$compileoptimizer( version_infor4r6r7r8Z build_baseZ build_libuppersetattrrinfoZensure_finalizedinsertrunZtempfilerE get_fullnameZ make_archive create_exer*rZ dist_filesappendget_installer_filenamedebugremover%rrH) rr?rAr(Zplat_specifierr>keyvaluerEZarchive_basenamefullnamearcnameZ pyversionr!r!r"rS{sr            zbdist_wininst.runc CsZg}|jj}|d|jpdd}dd}dD]B}t||d}|r0|d|||f}|d|||fq0|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 |ddS)Nr^z\n)replace)sr!r!r"escapesz)bdist_wininst.get_inidata..escape)ZauthorZ author_email descriptionZ maintainerZmaintainer_emailnameZurlversionz %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)r3metadatarVZlong_descriptiongetattr capitalizer-r&r'r(r/r+rTtime distutilsctime __version__r8) rlinesrerQrarcrDr+rhriZ build_infor!r!r" get_inidatas>   zbdist_wininst.get_inidataNc CsHddl}||j|}||}|d||r`t|d}|}W5QRXt|} nd} t|d} | | |r| |t |t r| d}|d}|jrt|jddd } |  d} W5QRX|| d }n|d}| ||d d t|| } | | t|d}| |W5QRXW5QRXdS) Nrz creating %srbwbmbcsrzlatin-1)encodings zs8          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"s    __pycache__/build_scripts.cpython-38.pyc000064400000010346152345030560014261 0ustar00U e5dX@sdZddlZddlZddlmZddlmZddlmZddl m Z ddl m Z m Z ddlmZddlZed ZGd d d eZGd 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@sHeZdZdZdddgZdgZddZdd Zd d Zd d Z ddZ dS) build_scriptsz("build" scripts (copy and fixup #! line))z build-dir=dzdirectory to "build" (copy) to)forcefz1forcibly build everything (ignore file timestamps)z executable=ez*specify final destination interpreter pathr cCs"d|_d|_d|_d|_d|_dSN) build_dirscriptsr executableoutfilesselfr7/usr/lib64/python3.8/distutils/command/build_scripts.pyinitialize_optionss z build_scripts.initialize_optionscCs|dddd|jj|_dS)NZbuild)r r)r r )rr)Zset_undefined_optionsZ distributionrrrrrfinalize_options%s zbuild_scripts.finalize_optionscCs|jSr)rrrrrget_source_files,szbuild_scripts.get_source_filescCs|js dS|dSr)r copy_scriptsrrrrrun/szbuild_scripts.runc Cs||jg}g}|jD]}d}t|}tj|jtj|}|||j slt ||slt d|qzt |d}Wn tk r|jsd}YnXXt|j\}}|d|} | s|d|qt| } | rd}| dpd } |rt d ||j|||jstjs*|j} n(tjtd d td tdf} t| } d| | d} z| dWn$tk rt d!| YnXz| |Wn&tk rt d!| |YnXt |d}|"| |#|$W5QRX|r8|%q|r"|%|||&||qtj'dkr|D]`}|jrdt d|nDt(|t)d@}|dBd@}||krJt 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)Tzcopying 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 ({})wbposixzchanging mode of %siimz!changing mode of %s from %o to %o)+Zmkpathrrrospathjoinbasenameappendr rrdebugopenOSErrordry_runtokenizedetect_encodingreadlineseekwarn first_line_rematchgroupinforZ python_buildrZget_config_varfsencodedecodeUnicodeDecodeError ValueErrorformatwrite writelines readlinescloseZ copy_filenamestatrchmod)rr updated_filesZscriptZadjustZoutfiler encodinglinesZ first_liner1Z post_interprZshebangZoutffileZoldmodeZnewmoderrrr5s                   zbuild_scripts.copy_scriptsN) __name__ __module__ __qualname__Z descriptionZ user_optionsZboolean_optionsrrrrrrrrrr sr c@seZdZddZdS)build_scripts_2to3cCs&t|\}}|js||||fSr)r rr*Zrun_2to3)rrr@rrrrs zbuild_scripts_2to3.copy_scriptsN)rDrErFrrrrrrGsrG)__doc__r"rer>rZ distutilsrZdistutils.corerZdistutils.dep_utilrZdistutils.utilrrrr+compiler0r rGrrrrs       __pycache__/bdist_wininst.cpython-38.opt-1.pyc000064400000020351152345030560015227 0ustar00U e5d>@sxdZddlZddlZddlZddlmZddlmZddlm Z m Z ddl Tddl m Z ddlmZGd d d eZdS) 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 seZdZdZddddefdddd d d d d dddg ZddddgZejdkZ fddZ ddZ ddZ ddZ ddZd'd!d"Zd#d$Zd%d&ZZS)( 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-tempkzPkeep the pseudo-installation tree around after creating the distribution archive)ztarget-version=Nz6require a specific python version on the target system)no-target-compilecz/do not compile .py to .pyc on the target system)no-target-optimizeoz;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=Nzspecify Vista's UAC handling - 'none'/default=no handling, 'auto'=use UAC if target Python installed for all users, 'force'=always use UACr r rrwin32cs tj||tdtddS)Nz^bdist_wininst command is deprecated since Python 3.8, use bdist_wheel (wheel packages) instead)super__init__warningswarnDeprecationWarning)selfargskw __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_tempno_target_compileno_target_optimizetarget_versiondist_dirbitmaptitle skip_buildinstall_scriptpre_install_scriptuser_access_control)rr!r!r"initialize_optionsEsz bdist_wininst.initialize_optionscCs|dd|jdkrR|jr6|jr6|jd}|j|_|dj}tj |d|_|j s^d|_ |js|j rt }|j r|j |krtd|f||_ |ddd|jr|jjD]}|jtj |krqqtd|jdS) Nbdist)r,r,ZwininstzMtarget 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_objget_finalized_command bdist_baseospathjoinr(has_ext_modulesrZDistutilsOptionErrorr-scriptsbasename)rr1r5Z short_versionscriptr!r!r"finalize_optionsUs>      zbdist_wininst.finalize_optionsc Cstjdkr&|js|jr&td|js6|d|jddd}|j |_ |j|_d|_ |j |_ |d}d|_ d|_|jr|j}|sd tjdd }d |j |f}|d}tj|jd ||_d D],}|}|dkr|d}t|d||qtd|j |tjdtj|j d|tjd=ddlm}|} |j } |j!| d|j d} |"| | |j#|jrt$} nd} |jj%&d| |'| ft(d| t)| |j*st+|j |j,ddS)Nrz^distribution contains extensions and/or C libraries; must be compiled on a Windows 32 platformbuildinstall)Zreinit_subcommandsr install_libz%d.%drz.%s-%slib)ZpurelibZplatlibheadersr:datarCz/Include/$dist_nameZinstall_zinstalling to %sZPURELIB)mktempzip)Zroot_diranyr zremoving temporary file '%s')dry_run)-sysplatformr3r9Zhas_c_librariesZDistutilsPlatformErrorr,Z run_commandZreinitialize_commandr#rootZwarn_dirr$compileoptimizer( version_infor4r6r7r8Z build_baseZ build_libuppersetattrrinfoZensure_finalizedinsertrunZtempfilerE get_fullnameZ make_archive create_exer*rZ dist_filesappendget_installer_filenamedebugremover%rrH) rr?rAr(Zplat_specifierr>keyvaluerEZarchive_basenamefullnamearcnameZ pyversionr!r!r"rS{sr            zbdist_wininst.runc CsZg}|jj}|d|jpdd}dd}dD]B}t||d}|r0|d|||f}|d|||fq0|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 |ddS)Nr^z\n)replace)sr!r!r"escapesz)bdist_wininst.get_inidata..escape)ZauthorZ author_email descriptionZ maintainerZmaintainer_emailnameZurlversionz %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)r3metadatarVZlong_descriptiongetattr capitalizer-r&r'r(r/r+rTtime distutilsctime __version__r8) rlinesrerQrarcrDr+rhriZ build_infor!r!r" get_inidatas>   zbdist_wininst.get_inidataNc CsHddl}||j|}||}|d||r`t|d}|}W5QRXt|} nd} t|d} | | |r| |t |t r| d}|d}|jrt|jddd } |  d} W5QRX|| d }n|d}| ||d d t|| } | | t|d}| |W5QRXW5QRXdS) Nrz creating %srbwbmbcsrzlatin-1)encodings zs8          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"s    __pycache__/install.cpython-38.opt-1.pyc000064400000032663152345030560014026 0ustar00U &.ej@sdZddlZddlZddlmZddlmZddlmZddl m Z ddl m Z ddl mZdd lmZmZmZdd lmZdd l mZdd lmZdd lmZdZddddddZddddddddddddedZerdddddded <ddd!d"dded#<dZGd$d%d%eZdS)&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)purelibplatlibheadersscriptsdataz/$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_homentz $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 d d d ddddddgZdddgZer`edddefedddiZ ddZ ddZ dd Z d!d"Z d#d$Zd%d&Zd'd(Zd)d*Zd+d,Zd-d.Zd/d0Zd1d2Zd3d4Zd5d6Zd7d8Zd9d:Zd;d<Zd=d>Zd?d@ZdAdBZdCdDZdEefdFefdGefdHefdIdJdKfgZdS)Linstallz'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=Nzr)r%r&r+r(r)r*r,r-r r r.r select_schemer$r"r#hasattrrM base_prefixrGenvironr\normpath)r9Zadditionr:r:r;rKsZ          zinstall.finalize_unixcCs|jr8|jdkrtd|j|_|_|tjdn|jdk r\|j|_|_|dn\|j dkrvtj t j |_ |j |_|_z|tjWn"t k rtdtjYnXdS)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\rsrMKeyErrorr8r:r:r;rLs&    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_KEYSrisetattr)r9rHZschemekeyattrnamer:r:r;ros zinstall.select_schemecCsX|D]N}t||}|dk rtjdks.tjdkr:tj|}t||j}t|||qdS)Nr=r)rirGrHr\ expanduserr rSrx)r9attrsattrrlr:r:r; _expand_attrss   zinstall._expand_attrscCs|dddgdS)zNCalls `os.path.expanduser` on install_base, install_platbase and root.r%r&r'Nr~r8r:r:r;rUszinstall.expand_basedirscCs|ddddddgdS)z+Calls `os.path.expanduser` on install dirs.r(r)r+r*r,r-Nrr8r:r:r;rWs zinstall.expand_dirscGs,|D]"}d|}t||tt||qdS)z!Call `convert_path` over `names`.ruN)rxrrir9namesrHr}r:r:r;rYszinstall.convert_pathscCs|jdkr|jj|_|jdk rtdt|jtrB|jd|_t|jdkr`|jd}}n"t|jdkrz|j\}}ntdt |}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 isinstancestrrOlenr r path_filer^)r9rr^r:r:r;rZs(      zinstall.handle_extra_pathc Gs0|D]&}d|}t||t|jt||qdS)z:Change the install directories pointed by name using root.ruN)rxr r'rirr:r:r;r_szinstall.change_rootscCsb|js dSttjd}|jD]8\}}||r$tj|s$| d|t |dq$dS)zCreate directories under ~.N~zos.makedirs('%s', 0o700)i) r rrGr\r{rSitems startswithisdirZ debug_printmakedirs)r9r$rHr\r:r:r;rXszinstall.create_home_pathcCs"|js6|d|jdj}|jr6|tkr6td|D]}||q>|j r\| |j r| }|j rt|j }tt|D]}|||d||<q|t|j |fd|j ttjjtj}ttjj|}tjtj|j}|jr|j r|js||krtd|jdS)zRuns the command.rFz"Can't install when cross-compilingNz'writing list of installed files to '%s'zmodules installed to '%s', which is not in Python's module search path (sys.path) -- you'll have to change the search path yourself)r3Z run_commandrQZget_command_objZ plat_namer4r rget_sub_commandsrcreate_path_filer7 get_outputsr'rrangeexecutermaprGr\rsrMnormcaser+r2rre)r9Z build_platcmd_nameoutputsZroot_lenZcounterZsys_pathr+r:r:r;run(sD    z install.runcCsJtj|j|jd}|jr8|t||jgfd|n| d|dS)zCreates the .pth file.pthz creating %szpath file '%s' not createdN) rGr\r]r[rr2rrr^rI)r9filenamer:r:r;rTs  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) rget_finalized_commandrappendrr2rGr\r]r[)r9rrcmdrr:r:r;rbs    zinstall.get_outputscCs.g}|D]}||}||q |S)z*Returns the inputs of all the sub-commands)rrextend get_inputs)r9Zinputsrrr:r:r;rss   zinstall.get_inputscCs|jp|jS)zSReturns true if the current distribution has any Python modules to install.)rQZhas_pure_modulesZhas_ext_modulesr8r:r:r;has_libs zinstall.has_libcCs |jS)zLReturns true if the current distribution has any headers to install.)rQ has_headersr8r:r:r;rszinstall.has_headerscCs |jS)zMReturns true if the current distribution has any scripts to. install.)rQ has_scriptsr8r:r:r;rszinstall.has_scriptscCs |jS)zJReturns true if the current distribution has any data to. install.)rQZhas_data_filesr8r:r:r;has_dataszinstall.has_datar+r*r,r-Zinstall_egg_infocCsdS)NTr:r8r:r:r;zinstall.) __name__ __module__ __qualname__Z descriptionrfZboolean_optionsrTrrrgr<r`rJrKrLror~rUrWrYrZr_rXrrrrrrrrZ sub_commandsr:r:r:r;rIsn ;  N3  " ,  r)__doc__rMrGZ distutilsrZdistutils.corerZdistutils.debugrZdistutils.sysconfigrZdistutils.errorsrZdistutils.file_utilrZdistutils.utilrr r r r Zsiter rrTZWINDOWS_SCHEMErvrwrr:r:r:r;sb             __pycache__/build_ext.cpython-38.pyc000064400000037413152345030560013376 0ustar00U e5dP{@sdZddlZddlZddlZddlZddlmZddlTddlm Z m Z ddlm Z ddl m Z ddlmZdd lmZdd lmZdd lmZed Zd dZGdddeZdS)zdistutils.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_compilerget_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)Nrshow_compilers)distutils.ccompilerr r r3/usr/lib64/python3.8/distutils/command/build_ext.pyr s r c@seZdZdZdejZdddddefdd d d efd d ddddefddddddddddgZddddd gZ d!d"d#e fgZ d$d%Z d&d'Z d(d)Zd*d+Zd,d-Zd.d/Zd0d1Zd2d3Zd4d5Zejd6d7Zd8d9Zd:d;Zdd?Zd@dAZdBdCZdDdEZdFdGZd"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)z build-temp=tz1directory for temporary files (build by-products)z plat-name=pz>platform name to cross-compile for, if supported (default: %s))inplaceiziignore 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)debuggz'compile/link with debugging information)forcefz2forcibly 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 compilerscCsd|_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_temprpackage include_dirsdefineundef libraries library_dirsrpath link_objectsrr compilerswigswig_cpp swig_optsr%parallelselfrrrinitialize_optionsjs*zbuild_ext.initialize_optionsc Csddlm}|ddddddd d |jdkr8|jj|_|jj|_|}|jd d }|j dkrn|jj pjg|_ t |j t r|j t j|_ tjtjkr|j t jtjd |j | t jj||kr|j | t jj|d|d|jdkrg|_|jdkrg|_nt |jt r:|j t j|_|jdkrNg|_nt |jt rl|j t j|_t jdkrh|jt jtjdtjtjkr|jt jtjd|jrt j|jd|_nt j|jd|_|j t jtt tdd}|r|j||j!dkr*d}n|j!dd}t jtjd}|r\t j||}|j|tj"dddkrtj#$t jtjdr|jt jtjddt%dn |jd|&dr|j's|j|&d n |jd|j(r|j( d!}d"d#|D|_(|j)r4|j) d!|_)|j*dkrHg|_*n|j* d$|_*|j+rt jt,d }t jt,d} t j-|r|j |t j-| r|j| |j| t |j.t rzt/|j.|_.Wnt0k rt1d%YnXdS)&Nr) sysconfigZbuild)r'r')r)r))r2r2)rr)r r )r6r6)r(r()Z plat_specificZincluder.r1ntZlibsZDebugZRelease_homewin32ZPCbuildcygwinbinlibpythonZconfig.Py_ENABLE_SHAREDZLIBDIR,cSsg|] }|dfqS)1r).0Zsymbolrrr sz.build_ext.finalize_options.. zparallel should be an integer)2 distutilsr:Zset_undefined_optionsr* distributionZ ext_packageZ ext_modulesr&Zget_python_incr+ isinstancestrsplitospathsepsys exec_prefixbase_exec_prefixappendpathjoinextendZensure_string_listr.r/r0nameprefixrr)dirnamergetattrr(platform executable startswithrget_config_varZ python_buildr,r-r5r%r isdirr6int ValueErrorZDistutilsOptionError) r8r:Z py_includeZplat_py_includeZ _sys_homesuffixZnew_libZdefinesZ user_includeZuser_librrrfinalize_optionss                           zbuild_ext.finalize_optionscCsjddlm}|jsdS|jrL|d}|j|p:g|j |j ||j |j |j|jd|_ t|j tjdkr|jtkr|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)r2verbosedry_runr r<)#rrgr&rMZhas_c_librariesget_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_objectsbuild_extensions)r8rgrhrZvaluemacrorrrruns@            z build_ext.runc Csvt|tstdt|D]T\}}t|tr0qt|trFt|dkrNtd|\}}td|t|t rvt |s~tdt|t stdt||d}dD]"}| |}|d k rt|||q| d |_d |krtd | d }|rhg|_g|_|D]b} t| tr"t| dks*tdt| dkrJ|j| dnt| dkr|j| q|||<qd S)aEnsure 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 instanceszMeach 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_objectsextra_compile_argsextra_link_argsNr0Zdef_filez9'def_file' element of build info dict no longer supportedmacros)r;rpz9'macros' element of build info dict must be 1- or 2-tupler;r)rNlistDistutilsSetupError enumeratertuplelenr warnrOextension_name_rematchdictgetsetattrruntime_library_dirs define_macros undef_macrosrV) r8r&rextext_nameZ build_infokeyvalrurnrrrcheck_extensions_listVs^        zbuild_ext.check_extensions_listcCs,||jg}|jD]}||jq|SN)rr&rYrq)r8 filenamesrrrrget_source_filess   zbuild_ext.get_source_filescCs2||jg}|jD]}|||jq|Sr)rr&rVget_ext_fullpathrZ)r8Zoutputsrrrr get_outputss   zbuild_ext.get_outputscCs(||j|jr|n|dSr)rr&r6_build_extensions_parallel_build_extensions_serialr7rrrrls  zbuild_ext.build_extensionsc sj}jdkrt}zddlm}Wntk r@d}YnX|dkrVdS||dPfddjD}tj|D]&\}} || W5QRXqW5QRXdS)NTr)ThreadPoolExecutor)Z max_workerscsg|]}j|qSr)Zsubmitbuild_extension)rIrZexecutorr8rrrJsz8build_ext._build_extensions_parallel..) r6rQ cpu_countZconcurrent.futuresr ImportErrorrr&zip_filter_build_errorsresult)r8ZworkersrZfuturesrZfutrrrrs"     z$build_ext._build_extensions_parallelc Cs0|jD]$}||||W5QRXqdSr)r&rr)r8rrrrrs  z"build_ext._build_extensions_serialc csTz dVWnDtttfk rN}z |js*|d|j|fW5d}~XYnXdS)Nz"building extension "%s" failed: %s)ZCCompilerErrorZDistutilsErrorZ CompileErrorZoptionalr{rZ)r8rerrrrs zbuild_ext._filter_build_errorsc CsP|j}|dkst|ttfs*td|jt|}||j}||j}|jslt ||dslt d|jdSt d|j| ||}|jpg}|jdd}|jD]}||fq|jj||j||j|j ||jd}|dd|_|jr||j|jpg}|jp|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+rextra_postargsdepends)r.r/rrexport_symbolsrr)Z target_lang)!rqrNrvryrwrZrrr rr rinfo swig_sourcesrsrrrVr2compiler)r+Z_built_objectsrrrYrtlanguageZdetect_languageZlink_shared_object get_librariesr/rget_export_symbols) r8rrqext_pathrZ extra_argsrur-ZobjectsrrrrrsX        zbuild_ext.build_extensioncCs$g}g}i}|jrtd|js6d|jks6d|jkrI don't know how to find (much less run) SWIG on platform '%s'N)rQrZrWrXisfileZDistutilsPlatformError)r8Zversfnrrrrgs    zbuild_ext.find_swigcCs||}|d}||d}|jsRtjj|dd|g}tj|j|Sd|dd}|d}tj | |}tj||S)zReturns the path of the filename for a given extension. The file is located in `build_lib` or directly in the package (inplace option). rErNrbuild_py) get_ext_fullnamerPget_ext_filenamerrQrWrXr'rkabspathZget_package_dir)r8rfullnamemodpathfilenamer*rZ package_dirrrrrs   zbuild_ext.get_ext_fullpathcCs |jdkr|S|jd|SdS)zSReturns the fullname of a given extension name. Adds the `package.` prefixNrE)r*)r8rrrrrs zbuild_ext.get_ext_fullnamecCs.ddlm}|d}|d}tjj||S)zConvert 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"). rrarEZ EXT_SUFFIX)distutils.sysconfigrarPrQrWrX)r8rrarZ ext_suffixrrrrs  zbuild_ext.get_ext_filenamecCsxd|jdd}z|dWn0tk rRd|dddd}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. _rErasciirZpunycode-_ZPyInit)rZrPencodeUnicodeEncodeErrorreplacedecoderrV)r8rreZ initfunc_namerrrrs"  zbuild_ext.get_export_symbolscCstjdkr^ddlm}t|j|sd}|jr4|d}|tjd?tjd?d@f}|j|gSndd l m }d }|d rt td rd }nr) MSVCCompilerz python%d%dZ_drFrFZgetandroidapilevelTrAZ_PYTHON_HOST_PLATFORMZANDROID_API_LEVELZMACHDEPZ LDVERSIONrD)rSr^Zdistutils._msvccompilerrrNr2r hexversionr.rrahasattrrQenviron)r8rrtemplateZ pythonlibraZlink_libpythonZ ldversionrrrrs4         zbuild_ext.get_libraries) __name__ __module__ __qualname__Z descriptionrQrRZsep_byr Z user_optionsZboolean_optionsr Z help_optionsr9rfrorrrrlrr contextlibcontextmanagerrrrrrrrrrrrrrr!sp +@N  K6  r)__doc__rrQrerSZdistutils.corerZdistutils.errorsrrrrZdistutils.dep_utilrZdistutils.extensionrZdistutils.utilr rLr Zsiter rr|r rrrrrs$       __pycache__/clean.cpython-38.opt-1.pyc000064400000004066152345030560013436 0ustar00U e5d @sDdZddlZddlmZddlmZddlmZGdddeZdS)zBdistutils.command.clean Implements the Distutils 'clean' command.N)Command) remove_tree)logc@s>eZdZdZddddddgZdgZd d Zd d Zd dZdS)cleanz-clean up temporary files from 'build' command)z build-base=bz2base build directory (default: 'build.build-base'))z build-lib=Nzs    __pycache__/build_scripts.cpython-38.opt-1.pyc000064400000010346152345030560015220 0ustar00U e5dX@sdZddlZddlZddlmZddlmZddlmZddl m Z ddl m Z m Z ddlmZddlZed ZGd d d eZGd 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@sHeZdZdZdddgZdgZddZdd Zd d Zd d Z ddZ dS) build_scriptsz("build" scripts (copy and fixup #! line))z build-dir=dzdirectory to "build" (copy) to)forcefz1forcibly build everything (ignore file timestamps)z executable=ez*specify final destination interpreter pathr cCs"d|_d|_d|_d|_d|_dSN) build_dirscriptsr executableoutfilesselfr7/usr/lib64/python3.8/distutils/command/build_scripts.pyinitialize_optionss z build_scripts.initialize_optionscCs|dddd|jj|_dS)NZbuild)r r)r r )rr)Zset_undefined_optionsZ distributionrrrrrfinalize_options%s zbuild_scripts.finalize_optionscCs|jSr)rrrrrget_source_files,szbuild_scripts.get_source_filescCs|js dS|dSr)r copy_scriptsrrrrrun/szbuild_scripts.runc Cs||jg}g}|jD]}d}t|}tj|jtj|}|||j slt ||slt d|qzt |d}Wn tk r|jsd}YnXXt|j\}}|d|} | s|d|qt| } | rd}| dpd } |rt d ||j|||jstjs*|j} n(tjtd d td tdf} t| } d| | d} z| dWn$tk rt d!| YnXz| |Wn&tk rt d!| |YnXt |d}|"| |#|$W5QRX|r8|%q|r"|%|||&||qtj'dkr|D]`}|jrdt d|nDt(|t)d@}|dBd@}||krJt 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)Tzcopying 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 ({})wbposixzchanging mode of %siimz!changing mode of %s from %o to %o)+Zmkpathrrrospathjoinbasenameappendr rrdebugopenOSErrordry_runtokenizedetect_encodingreadlineseekwarn first_line_rematchgroupinforZ python_buildrZget_config_varfsencodedecodeUnicodeDecodeError ValueErrorformatwrite writelines readlinescloseZ copy_filenamestatrchmod)rr updated_filesZscriptZadjustZoutfiler encodinglinesZ first_liner1Z post_interprZshebangZoutffileZoldmodeZnewmoderrrr5s                   zbuild_scripts.copy_scriptsN) __name__ __module__ __qualname__Z descriptionZ user_optionsZboolean_optionsrrrrrrrrrr sr c@seZdZddZdS)build_scripts_2to3cCs&t|\}}|js||||fSr)r rr*Zrun_2to3)rrr@rrrrs zbuild_scripts_2to3.copy_scriptsN)rDrErFrrrrrrGsrG)__doc__r"rer>rZ distutilsrZdistutils.corerZdistutils.dep_utilrZdistutils.utilrrrr+compiler0r rGrrrrs       __pycache__/install_lib.cpython-38.opt-2.pyc000064400000010666152345030560014654 0ustar00U e5d @sHddlZddlZddlZddlmZddlmZdZGdddeZ dS)N)Command)DistutilsOptionErrorz.pyc@seZdZdZdddddddgZd d d gZd d iZd dZddZddZ ddZ ddZ ddZ ddZ ddZddZdd 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))forcefz-force installation (overwrite existing files))compileczcompile .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 r cCs(d|_d|_d|_d|_d|_d|_dS)Nr) install_dir build_dirrr optimize skip_buildselfr5/usr/lib64/python3.8/distutils/command/install_lib.pyinitialize_options3s zinstall_lib.initialize_optionsc Cs|ddddddd|jdkr&d|_|jdkr6d |_t|jtszt|j|_|jd kr^tWn ttfk rtd YnXdS) Ninstall) build_libr)rr)rr)r r )rr)rrTF)rzoptimize must be 0, 1, or 2)Zset_undefined_optionsr r isinstanceintAssertionError ValueErrorrrrrrfinalize_options<s&     zinstall_lib.finalize_optionscCs0||}|dk r,|jr,||dSN)buildr distributionhas_pure_modules byte_compilerZoutfilesrrrrunVszinstall_lib.runcCs2|js.|jr|d|jr.|ddSNbuild_py build_ext)rr"r#Z run_commandhas_ext_modulesrrrrr!fs    zinstall_lib.buildcCs8tj|jr ||j|j}n|d|jdS|S)Nz3'%s' does not exist -- no Python modules to install)ospathisdirrZ copy_treerwarnr%rrrrmszinstall_lib.installcCsrtjr|ddSddlm}|dj}|jrH||d|j||j d|j dkrn|||j |j||j |j ddS)Nz%byte-compiling is disabled, skipping.r)r$r)rrprefixdry_run)rrr/verboser0) sysdont_write_bytecoder.Zdistutils.utilr$get_finalized_commandrootr rr0rr1)rfilesr$Z install_rootrrrr$vs$    zinstall_lib.byte_compilec Csd|sgS||}|}t||}t|ttj}g}|D] } |tj|| |dq>|Sr ) r4 get_outputsgetattrlenr+sepappendr,join) rZhas_anyZ build_cmdZ cmd_optionZ output_dirZ build_filesr prefix_lenZoutputsfilerrr_mutate_outputss  zinstall_lib._mutate_outputscCsrg}|D]d}tjtj|d}|tkr.q|jrJ|tjj |dd|j dkr|tjj ||j dq|S)Nr) optimizationr) r+r,splitextnormcasePYTHON_SOURCE_EXTENSIONr r; importlibutilcache_from_sourcer)rZ py_filenamesZbytecode_filesZpy_fileZextrrr_bytecode_filenamess     zinstall_lib._bytecode_filenamescCsR||jdd|j}|jr*||}ng}||jdd|j}|||S)Nr(rr))r?r"r#rr rHr*)rZ pure_outputsZbytecode_outputsZ ext_outputsrrrr7s    zinstall_lib.get_outputscCsLg}|jr&|d}|||jrH|d}|||Sr')r"r#r4extendr7r*)rZinputsr(r)rrr get_inputss    zinstall_lib.get_inputsN)__name__ __module__ __qualname__Z descriptionZ user_optionsZboolean_optionsZ negative_optrrr&r!rr$r?rHr7rJrrrrrs*   r) r+importlib.utilrEr2Zdistutils.corerZdistutils.errorsrrDrrrrrs   __pycache__/check.cpython-38.pyc000064400000011427152345030560012471 0ustar00U e5d@sdZddlmZddlmZzTddlmZddlmZddl m Z ddl m Z ddl m Z Gd d d eZd ZWnek rd ZYnXGd ddeZdS)zCdistutils.command.check Implements the Distutils 'check' command. )Command)DistutilsSetupError)Reporter)Parser)frontend)nodes)StringIOc@seZdZd ddZddZdS) SilentReporterNrasciireplacec Cs"g|_t||||||||dSN)messagesr__init__)selfsource report_level halt_levelstreamdebugencoding error_handlerr//usr/lib64/python3.8/distutils/command/check.pyrs zSilentReporter.__init__cOs6|j||||ftj|f|||j|d|S)N)leveltype)r appendrsystem_messageZlevels)rrmessageZchildrenkwargsrrrrszSilentReporter.system_message)Nrr r )__name__ __module__ __qualname__rrrrrrr s  r TFc@s`eZdZdZdZdddgZdddgZd d Zd d Zd dZ ddZ ddZ ddZ ddZ dS)checkz6This command checks the meta-data of the package. z"perform some checks on the package)metadatamzVerify meta-data)restructuredtextrzEChecks if long string meta-data syntax are reStructuredText-compliant)strictsz(Will exit with an error if a check failsr#r%r'cCsd|_d|_d|_d|_dS)z Sets default values for options.rN)r%r#r' _warningsrrrrinitialize_options1szcheck.initialize_optionscCsdSr rr+rrrfinalize_options8szcheck.finalize_optionscCs|jd7_t||S)z*Counts the number of warnings that occurs.r))r*rwarn)rmsgrrrr.;sz check.warncCsL|jr||jr0tr"|n|jr0td|jrH|jdkrHtddS)zRuns the command.zThe docutils package is needed.rzPlease correct your package.N)r#check_metadatar% HAS_DOCUTILScheck_restructuredtextr'rr*r+rrrrun@s z check.runcCs|jj}g}dD]"}t||r(t||s||q|rL|dd||jrd|js|dn"|j r||j s|dn |ddS)zEnsures 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. )nameversionZurlzmissing 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#hasattrgetattrrr.joinZauthorZ author_emailZ maintainerZmaintainer_email)rr#Zmissingattrrrrr0Ps   zcheck.check_metadatacCsX|j}||D]>}|dd}|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_datagetr.)rdataZwarningr<rrrr2ns  zcheck.check_restructuredtextc Cs|jjp d}t}tjtfd}d|_d|_d|_t ||j |j |j |j |j|jd}tj|||d}||dz|||Wn:tk r}z|jdd|d ifW5d}~XYnX|jS) z8Returns warnings when the provided data doesn't compile.zsetup.py)Z componentsN)rrrr)rr;z!Could not finish the parsing: %s.)r6Z script_namerrZ OptionParserZget_default_valuesZ tab_widthZpep_referencesZrfc_referencesr rrZwarning_streamrZerror_encodingZerror_encoding_error_handlerrdocumentZ note_sourceparseAttributeErrorr r)rr? source_pathparserZsettingsZreporterrBerrrr=ys.  zcheck._check_rst_dataN)rr r!__doc__Z descriptionZ user_optionsZboolean_optionsr,r-r.r3r0r2r=rrrrr"$s  r"N)rHZdistutils.corerZdistutils.errorsrZdocutils.utilsrZdocutils.parsers.rstrZdocutilsrriorr r1 Exceptionr"rrrrs        __pycache__/install_headers.cpython-38.opt-2.pyc000064400000003010152345030560015502 0ustar00U e5d@s ddlmZGdddeZdS))Commandc@sFeZdZdZddgZdgZddZddZd d Zd d Z d dZ dS)install_headerszinstall C/C++ header files)z install-dir=dz$directory to install header files to)forcefz-force installation (overwrite existing files)rcCsd|_d|_g|_dS)Nr) install_dirroutfilesselfr 9/usr/lib64/python3.8/distutils/command/install_headers.pyinitialize_optionssz"install_headers.initialize_optionscCs|ddddS)NZinstall)rr)rr)Zset_undefined_optionsr r r r finalize_optionssz install_headers.finalize_optionscCsH|jj}|sdS||j|D]"}|||j\}}|j|q dSN) distributionheadersZmkpathrZ copy_filerappend)r rheaderout_r r r run!s zinstall_headers.runcCs |jjp gSr)rrr r r r get_inputs+szinstall_headers.get_inputscCs|jSr)rr r r r get_outputs.szinstall_headers.get_outputsN) __name__ __module__ __qualname__Z descriptionZ user_optionsZboolean_optionsr rrrrr r r r r s rN)Zdistutils.corerrr r r r s __pycache__/bdist_rpm.cpython-38.opt-1.pyc000064400000030114152345030560014330 0ustar00U e5dIT@sdZddlZddlZddlZddlmZddlmZddlm Z ddl m Z ddl Tddl mZdd lmZGd d d eZdS) 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)@seZdZdZdddddddd d d d d ddddddddddddddddddd d!d"d#d$d%d&d'd(d)d*g)Zd+d,d-d.d/gZd+d,d-d0Zd1d2Zd3d4Zd5d6Z d7d8Z d9d:Z d;d<Z d=d>Z d?S)@ bdist_rpmzcreate an RPM distribution)z bdist-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)z source-onlyNzonly generate source RPM)z binary-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 ") [default: maintainer or author from setup script])z packager=NzBRPM packager (eg. "Jane Doe ") [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-tempkz"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=Nz3/usr/lib64/python3.8/distutils/command/bdist_rpm.pyinitialize_optionssNzbdist_rpm.initialize_optionscCs|dd|jdkr6|js$tdtj|jd|_|jdkrX|j rPt j |_qfd|_n|j rftdtj dkr~t dtj |jr|jrtd |jsd |_|dd |dS) NZbdist)rrz)you must specify --rpm-base in RPM 2 moderpmZpython3z8--python and --fix-python are mutually exclusive optionsposixz9don't know how to create RPM distributions on platform %sz6cannot supply both '--source-only' and '--binary-only'r)rr)Zset_undefined_optionsrr9ZDistutilsOptionErrorospathjoinrrrsys executablenameZDistutilsPlatformErrorrr distributionhas_ext_modulesr8finalize_package_datar<r>r>r?finalize_optionss6        zbdist_rpm.finalize_optionscCsT|dd|dd|j|jf|d|dt|jtrxdD]&}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|ddS)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_stringrIZ get_contactZget_contact_emailZensure_string_list isinstancer%listrCrDexistsappend_format_changelogr&Zensure_filename)r=Zreadmer>r>r?rKsB                        zbdist_rpm.finalize_package_datacCstrr>r?runs                            z bdist_rpm.runcCstj|jtj|S)N)rCrDrErre)r=rDr>r>r? _dist_pathszbdist_rpm._dist_pathc CsJd|jd|jddd|jd|jdddd|jg}td }d d d | D}d }d}|||}||kr| d| d|d | dddg|j r| dn | d| d|j d|jddg|js|js&| dn| d|jdD]V}t||}t|trb| d|d|fn|dk r*| d||fq*|jd kr| d!|j|jr| d"|j|jr| d#d|j|jr| d$tj|j|jr| d%| dd&|jgd'|jtjtj d(f}d)|} |j!rXd*| } d+|} d,d-d.| fd/d0| fd1d2d3d4d5d6g } | D]n\} } }t|| }|s|r| dd7| g|rt"|}| |#$d W5QRXn | |q| dd8d9g|j%r$| d:d|j%|j&rF| dd;g| |j&|S)r>r? sz-bdist_rpm._make_spec_file..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)'rIrZZ get_versionreplacer!Zget_description subprocessZ getoutputrE splitlinesrQr]rZ get_licenser r;rJgetattrlowerrNrOZget_urlrr5r'rCrDrer:Zget_long_descriptionrrFargvr8openreadrcr%r&)r=Z spec_fileZ vendor_hookZproblemZfixedZ fixed_hookZfieldvalZdef_setup_callZ def_buildZ install_cmdZscript_optionsZrpm_optattrdefaultfr>r>r?r[s                       zbdist_rpm._make_spec_filecCs||s|Sg}|dD]N}|}|ddkrB|d|gq|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__Z descriptionZ user_optionsZboolean_optionsZ negative_optr@rLrKrkrlr[rRr>r>r>r?r sxm--*r )__doc__rvrFrCZdistutils.corerZdistutils.debugrZdistutils.utilrZdistutils.file_utilrZdistutils.errorsZdistutils.sysconfigrZ distutilsrr r>r>r>r?s      __pycache__/install_egg_info.cpython-38.pyc000064400000005666152345030560014727 0ustar00U e5d+ @sddZddlmZddlmZmZddlZddlZddlZGdddeZ ddZ d d Z d d Z dS) zdistutils.command.install_egg_info Implements the Distutils 'install_egg_info' command, for installing a package's PKG-INFO metadata.)Command)logdir_utilNc@s:eZdZdZdZdgZddZddZdd 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|_dSN) install_dirselfr :/usr/lib64/python3.8/distutils/command/install_egg_info.pyinitialize_optionssz#install_egg_info.initialize_optionscCsb|dddtt|jtt|jftjdd}t j |j ||_ |j g|_dS)NZ install_lib)rrz%s-%s-py%d.%d.egg-info)Zset_undefined_options to_filename safe_name distributionZget_name safe_versionZ get_versionsys version_infoospathjoinrtargetoutputs)r basenamer r r finalize_optionss  z!install_egg_info.finalize_optionsc Cs|j}tj|r0tj|s0tj||jdnNtj|rV| tj |jfd|n(tj|j s~| tj |j fd|j t d||jst|ddd}|jj|W5QRXdS)N)dry_runz Removing z Creating z Writing %swzUTF-8)encoding)rrrisdirislinkrZ remove_treerexistsZexecuteunlinkrmakedirsrinfoopenrZmetadataZwrite_pkg_file)r rfr r r run s  zinstall_egg_info.runcCs|jSr)rr r r r get_outputs.szinstall_egg_info.get_outputsN) __name__ __module__ __qualname____doc__Z descriptionZ user_optionsr rr'r(r r r r r s rcCstdd|S)zConvert an arbitrary string to a standard distribution name Any runs of non-alphanumeric/. characters are replaced with a single '-'. [^A-Za-z0-9.]+-)resubnamer r r r6srcCs|dd}tdd|S)zConvert 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)versionr r r r>s rcCs |ddS)z|Convert a project or version name to its filename-escaped form Any '-' characters are currently replaced with '_'. r._)r5r1r r r rHsr) r,Z distutils.cmdrZ distutilsrrrrr/rrrrr r r r s + __pycache__/register.cpython-38.opt-2.pyc000064400000016030152345030560014173 0ustar00U e5d-@s`ddlZddlZddlZddlZddlmZddlmZddl Tddl m Z GdddeZ dS)N)warn) PyPIRCCommand)*)logc@seZdZdZejddgZejdddgZddd fgZd d Zd d Z ddZ ddZ ddZ ddZ ddZddZddZdddZdS) 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 compliantverifyrrcheckcCsdS)NTselfr r 2/usr/lib64/python3.8/distutils/command/register.pyzregister.cCst|d|_d|_dS)Nr)rinitialize_optionslist_classifiersrr r r rrs zregister.initialize_optionscCs*t|d|jfdd}||jjd<dS)Nr)r)rrestructuredtextr )rfinalize_optionsr distributionZcommand_options)r Z check_optionsr r rr$s  zregister.finalize_optionscCsT|||D]}||q|jr8|n|jrH|n|dS)N) r _set_configZget_sub_commandsZ run_commandZdry_runverify_metadatar classifiers send_metadata)r Zcmd_namer r rrun+s    z register.runcCs8tdt|jd}||j|_d|_|dS)Nzddistutils.command.register.check_metadata is deprecated, use the check command insteadr r)rPendingDeprecationWarningrZget_command_objZensure_finalizedrrr)r r r r rcheck_metadata:s zregister.check_metadatacCsz|}|ikr@|d|_|d|_|d|_|d|_d|_n6|jd|jfkr^td|j|jdkrp|j|_d|_dS) Nusernamepassword repositoryrealmTZpypiz%s not found in .pypircF)Z _read_pypircrrr r! has_configZDEFAULT_REPOSITORY ValueError)r Zconfigr r rrDs     zregister._set_configcCs*|jd}tj|}t||dS)Nz?:action=list_classifiers)r urllibrequestZurlopenrinfo_read_pypi_response)r ZurlZresponser r rrUs  zregister.classifierscCs&||d\}}td||dS)Nr Server response (%s): %s)post_to_serverbuild_post_datarr&)r coderesultr r rr\szregister.verify_metadatac Cs|jrd}|j}|j}n d}d}}d}||krd|dtjt}|sRd}q,||kr,tdq,|dkrl|s|td}qn|st d}q|t j }t j |jd }||j|||||d |\}}|d ||ftj|d kr|jr||j_nf|d tj|d|tjd}|dkrNtd}|s*d}q*|dkr|||nl|dkrddi} d| d<| d<| d<d| d<| dstd| d<q| d| dkr0| dst d| d<q| dst d| d<q| d| dkrd| d<d| d<tdq| dsJtd| d<q0|| \}}|d krrtd ||ntdtdnP|d krdd!i} d| d<| dstd"| d<q|| \}}td ||dS)#N1xz1 2 3 4zWe 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)?ny2:actionusernamerZemailZconfirmz 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"rrsplitannouncerINFOinputprintgetpassr$r%ZHTTPPasswordMgrparseZurlparser Z add_passwordr!r)r*rZ _get_rc_filelowerZ _store_pypircr&) r ZchoicerrchoicesauthZhostr+r,datar r rrcs                   zregister.send_metadatacCs|jj}|d|||||||| | | | | |||d}|ds|ds|drd|d<|S)Nz1.0)r5metadata_versionr7versionZsummaryZ home_pageZauthorZ author_emaillicense descriptionkeywordsplatformrZ download_urlprovidesrequires obsoletesrJrKrLz1.1rD)rZmetadataZget_nameZ get_versionZget_descriptionZget_urlZ get_contactZget_contact_emailZ get_licenceZget_long_descriptionZ get_keywordsZ get_platformsZget_classifiersZget_download_urlZ get_providesZ get_requiresZ get_obsoletes)r actionmetarCr r rr*s,zregister.build_post_dataNc Csd|kr$|d|d|jftjd}d|}|d}t}|D]~\}}t|tgtdfkrn|g}|D]R}t|}| || d|| d| ||rr|d d krr| d qrqH| || d | d }d |tt |d} t j|j|| } t jt jj|d} d}z| | } Wnxt jjk r} z"|jrd| j}| j| jf} W5d} ~ XYnJt jjk r} zdt| f} W5d} ~ XYnX|jr|| }d} |jrd d|df}||tj| S)Nr7zRegistering %s to %sz3--------------GHSKFJDLGDS7543FJKLFHRE75642756743254z --z--r z* 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;ioStringIOitemstypestrwritegetvalueencodelenr$r%ZRequestZ build_openerZHTTPBasicAuthHandleropenerrorZ HTTPErrorZ show_responsefpreadr+msgZURLErrorr'join)r rCrBboundaryZ sep_boundaryZ end_boundaryZbodykeyvalueZheadersZreqZopenerr,er_r r rr)s^          zregister.post_to_server)N)__name__ __module__ __qualname__rGrZ user_optionsZboolean_optionsZ sub_commandsrrrrrrrrr*r)r r r rrs* zr) r>rRZ urllib.parser$Zurllib.requestwarningsrZdistutils.corerZdistutils.errorsZ distutilsrrr r r rs   __pycache__/install_egg_info.cpython-38.opt-2.pyc000064400000004417152345030560015660 0ustar00U e5d+ @s`ddlmZddlmZmZddlZddlZddlZGdddeZddZ dd Z d d Z dS) )Command)logdir_utilNc@s6eZdZdZdgZddZddZddZd d Zd S) install_egg_infoz8Install package's PKG-INFO metadata as an .egg-info file)z install-dir=dzdirectory to install tocCs d|_dSN) install_dirselfr :/usr/lib64/python3.8/distutils/command/install_egg_info.pyinitialize_optionssz#install_egg_info.initialize_optionscCsb|dddtt|jtt|jftjdd}t j |j ||_ |j g|_dS)NZ install_lib)rrz%s-%s-py%d.%d.egg-info)Zset_undefined_options to_filename safe_name distributionZget_name safe_versionZ get_versionsys version_infoospathjoinrtargetoutputs)r basenamer r r finalize_optionss  z!install_egg_info.finalize_optionsc Cs|j}tj|r0tj|s0tj||jdnNtj|rV| tj |jfd|n(tj|j s~| tj |j fd|j t d||jst|ddd}|jj|W5QRXdS)N)dry_runz Removing z Creating z Writing %swzUTF-8)encoding)rrrisdirislinkrZ remove_treerexistsZexecuteunlinkrmakedirsrinfoopenrZmetadataZwrite_pkg_file)r rfr r r run s  zinstall_egg_info.runcCs|jSr)rr r r r get_outputs.szinstall_egg_info.get_outputsN) __name__ __module__ __qualname__Z descriptionZ user_optionsr rr'r(r r r r r s rcCstdd|S)N[^A-Za-z0-9.]+-)resubnamer r r r6srcCs|dd}tdd|S)N .r,r-)replacer.r/)versionr r r r>s rcCs |ddS)Nr-_)r4r0r r r rHsr) Z distutils.cmdrZ distutilsrrrrr.rrrrr r r r s + __pycache__/install_egg_info.cpython-38.opt-1.pyc000064400000005666152345030560015666 0ustar00U e5d+ @sddZddlmZddlmZmZddlZddlZddlZGdddeZ ddZ d d Z d d Z dS) zdistutils.command.install_egg_info Implements the Distutils 'install_egg_info' command, for installing a package's PKG-INFO metadata.)Command)logdir_utilNc@s:eZdZdZdZdgZddZddZdd 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|_dSN) install_dirselfr :/usr/lib64/python3.8/distutils/command/install_egg_info.pyinitialize_optionssz#install_egg_info.initialize_optionscCsb|dddtt|jtt|jftjdd}t j |j ||_ |j g|_dS)NZ install_lib)rrz%s-%s-py%d.%d.egg-info)Zset_undefined_options to_filename safe_name distributionZget_name safe_versionZ get_versionsys version_infoospathjoinrtargetoutputs)r basenamer r r finalize_optionss  z!install_egg_info.finalize_optionsc Cs|j}tj|r0tj|s0tj||jdnNtj|rV| tj |jfd|n(tj|j s~| tj |j fd|j t d||jst|ddd}|jj|W5QRXdS)N)dry_runz Removing z Creating z Writing %swzUTF-8)encoding)rrrisdirislinkrZ remove_treerexistsZexecuteunlinkrmakedirsrinfoopenrZmetadataZwrite_pkg_file)r rfr r r run s  zinstall_egg_info.runcCs|jSr)rr r r r get_outputs.szinstall_egg_info.get_outputsN) __name__ __module__ __qualname____doc__Z descriptionZ user_optionsr rr'r(r r r r r s rcCstdd|S)zConvert an arbitrary string to a standard distribution name Any runs of non-alphanumeric/. characters are replaced with a single '-'. [^A-Za-z0-9.]+-)resubnamer r r r6srcCs|dd}tdd|S)zConvert 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)versionr r r r>s rcCs |ddS)z|Convert a project or version name to its filename-escaped form Any '-' characters are currently replaced with '_'. r._)r5r1r r r rHsr) r,Z distutils.cmdrZ distutilsrrrrr/rrrrr r r r s + __pycache__/bdist_dumb.cpython-38.pyc000064400000007012152345030560013523 0ustar00U e5d1@shdZddlZddlmZddlmZddlmZmZddl Tddl m Z ddl m Z Gd d d eZdS) zdistutils.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_treeensure_relative)*)get_python_version)logc @s^eZdZdZddddefdddd d d d g Zd ddgZdddZddZddZ ddZ 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-tempkzPkeep 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 rrZgztarzip)posixntcCs:d|_d|_d|_d|_d|_d|_d|_d|_d|_dS)Nr) bdist_dir plat_nameformat keep_tempdist_dir skip_buildrownergroup)selfr4/usr/lib64/python3.8/distutils/command/bdist_dumb.pyinitialize_options2szbdist_dumb.initialize_optionscCsz|jdkr&|dj}tj|d|_|jdkrfz|jtj|_Wn"t k rdt dtjYnX| dddddS)NZbdistZdumbz@don't know how to create dumb built distributions on platform %s)rr)rr)rr) rZget_finalized_command bdist_baseospathjoinrdefault_formatnameKeyErrorDistutilsPlatformErrorZset_undefined_options)rr"rrr finalize_options=s"    zbdist_dumb.finalize_optionscCs(|js|d|jddd}|j|_|j|_d|_td|j|dd|j |j f}t j |j|}|js~|j}nJ|jr|j|jkrtdt|jt|jfnt j |jt|j}|j||j||j|jd }|jrt}nd }|jjd ||f|js$t|j|jd dS) NZbuildinstall)Zreinit_subcommandsrzinstalling to %sz%s.%szScan't make a dumb built distribution where base and platbase are different (%s, %s))Zroot_dirrranyr )dry_run) rZ run_commandZreinitialize_commandrrootZwarn_dirrinfoZ distributionZ get_fullnamerr#r$r%rrZhas_ext_modulesZ install_baseZinstall_platbaser)reprrZ make_archiverrrrZ dist_filesappendrrr.)rr+Zarchive_basenameZpseudoinstall_rootZ archive_rootfilenameZ pyversionrrr runOsR        zbdist_dumb.runN) __name__ __module__ __qualname__Z descriptionrZ user_optionsZboolean_optionsr&r!r*r4rrrr r s,  r )__doc__r#Zdistutils.corerZdistutils.utilrZdistutils.dir_utilrrZdistutils.errorsZdistutils.sysconfigrZ distutilsrr rrrr s    __pycache__/build_py.cpython-38.pyc000064400000024362152345030560013225 0ustar00U e5d&C@szdZddlZddlZddlZddlZddlmZddlTddl m Z m Z ddl m Z GdddeZGd d d ee ZdS) zHdistutils.command.build_py Implements the Distutils 'build_py' command.N)Command)*) convert_path Mixin2to3)logc@seZdZdZdddddgZddgZd diZd d Zd d ZddZ ddZ ddZ ddZ ddZ ddZddZddZddZd d!Zd"d#Zd$d%Zd2d'd(Zd)d*Zd+d,Zd-d.Zd/d0Zd1S)3build_pyz5"build" pure Python modules (copy to build directory))z build-lib=dzdirectory to "build" (copy) to)compileczcompile .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])forcefz2forcibly build everything (ignore file timestamps)r r r cCs4d|_d|_d|_d|_d|_d|_d|_d|_dS)Nr) build_lib py_modulespackage package_data package_dirr optimizer selfr2/usr/lib64/python3.8/distutils/command/build_py.pyinitialize_options szbuild_py.initialize_optionsc Cs|ddd|jj|_|jj|_|jj|_i|_|jjr^|jjD]\}}t||j|<qF||_ t |j t sz,t |j |_ d|j krdksnt Wn tt fk rtdYnXdS)NZbuild)rr)r r rzoptimize must be 0, 1, or 2)Zset_undefined_options distributionpackagesrrritemsrget_data_files data_files isinstancerintAssertionError ValueErrorZDistutilsOptionError)rnamepathrrrfinalize_options*s$       zbuild_py.finalize_optionscCs:|jr||jr$||||jdddSNr)include_bytecode)r build_modulesrbuild_packagesbuild_package_data byte_compile get_outputsrrrrrunCs z build_py.runcsg}|js|S|jD]h}||}tjj|jg|d}d|rPt|dfdd|||D}| ||||fq|S)z?Generate list of '(package,src_dir,build_dir,filenames)' tuples.rcsg|]}|dqSNr).0fileZplenrr ssz+build_py.get_data_files..) rget_package_dirosr%joinrsplitlenfind_data_filesappend)rdatarsrc_dir build_dir filenamesrr4rras     zbuild_py.get_data_filescsd|jdg|j|g}g|D]:}ttjt|t|}fdd|Dq$S)z6Return filenames for package's data files in 'src_dir'cs$g|]}|krtj|r|qSr)r7r%isfile)r2fnfilesrrr5s z,build_py.find_data_files..) rgetglobr7r%r8escaperextend)rrr>ZglobspatternZfilelistrrDrr;ys  zbuild_py.find_data_filescCs`d}|jD]P\}}}}|D]>}tj||}|tj||jtj|||ddqq dS)z$Copy data files into build directoryNFZ preserve_mode)rr7r%r8mkpathdirname copy_file)rZlastdirrr>r?r@filenametargetrrrr+szbuild_py.build_package_datacCs|d}|js&|r tjj|SdSng}|rz|jd|}Wn*tk rl|d|d|d=Yq*X|d|tjj|Sq*|jd}|dk r|d||rtjj|SdSdS)zReturn 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/rArN)r9rr7r%r8KeyErrorinsertrF)rrr%tailZpdirrrrr6s(       zbuild_py.get_package_dircCsj|dkr8tj|s td|tj|s8td||rftj|d}tj|rZ|Std|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%existsZDistutilsFileErrorisdirr8rBrwarn)rrrinit_pyrrr check_packages&   zbuild_py.check_packagecCs&tj|std||dSdSdS)Nz!file %s (for module %s) not foundFT)r7r%rBrrW)rmodule module_filerrr check_modules zbuild_py.check_modulec Cs|||ttjt|d}g}tj|jj}|D]P}tj|}||krtj tj |d}| |||fq>| d|q>|S)Nz*.pyrz excluding %s) rYrGr7r%r8rHabspathrZ script_namesplitextbasenamer<Z debug_print) rrrZ module_filesmodulesZ setup_scriptrZabs_frZrrrfind_package_moduless  zbuild_py.find_package_modulesc Csi}g}|jD]}|d}d|dd}|d}z||\}}Wn"tk rh||}d}YnX|s|||} |df||<| r||d| ftj||d} | || sq|||| fq|S)aFinds 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%rZ module_basercheckedrXr[rrr find_moduless*       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`rrmrrrfind_all_moduless    zbuild_py.find_all_modulescCsdd|DS)NcSsg|] }|dqS)rQr)r2rZrrrr5-sz-build_py.get_source_files..)rgrrrrget_source_files,szbuild_py.get_source_filescCs$|gt||dg}tjj|S)Nrc)listr7r%r8)rr?rrZZ outfile_pathrrrget_module_outfile/szbuild_py.get_module_outfiler0cCs|}g}|D]p\}}}|d}||j||}|||r|jr^|tjj|dd|j dkr|tjj||j dq|dd|j D7}|S)Nr/rA) optimizationrcSs,g|]$\}}}}|D]}tj||qqSr)r7r%r8)r2rr>r?r@rOrrrr5Bs z(build_py.get_outputs..) rgr9rjrr<r importlibutilcache_from_sourcerr)rr(r`ZoutputsrrZr[rOrrrr-3s*      zbuild_py.get_outputscCsbt|tr|d}nt|ttfs,td||j||}tj |}| ||j ||ddS)Nr/z:'package' must be a string (dot-separated), list, or tuplerrK) r strr9rituple TypeErrorrjrr7r%rMrLrN)rrZr[rZoutfiledirrrr 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_packagescCstjr|ddSddlm}|j}|dtjkr>|tj}|jrZ||d|j ||j d|j dkr||||j |j ||j ddS)Nz%byte-compiling is disabled, skipping.r)r,rQ)rr prefixdry_run) sysdont_write_bytecoderWdistutils.utilr,rr7sepr r rur)rrEr,rtrrrr,vs&    zbuild_py.byte_compileN)r0)__name__ __module__ __qualname__Z descriptionZ user_optionsZboolean_optionsZ negative_optrr&r.rr;r+r6rYr\rarergrhrjr-rsr)r*r,rrrrrs8    '4  rc@seZdZddZddZdS) build_py_2to3cCsLg|_|jr||jr*||||j||jdddSr') updated_filesrr)rr*r+Zrun_2to3r,r-rrrrr.s zbuild_py_2to3.runcCs,t||||}|dr(|j|d|S)Nr0r)rrsr~r<)rrZr[rresrrrrsszbuild_py_2to3.build_moduleN)rzr{r|r.rsrrrrr}sr})__doc__r7importlib.utilrlrvrGZdistutils.corerZdistutils.errorsrxrrZ distutilsrrr}rrrrs  }__pycache__/__init__.cpython-38.opt-2.pyc000064400000000664152345030560014114 0ustar00U e5d@s.dddddddddd d d d d dddddgZdS)ZbuildZbuild_pyZ build_extZ build_clibZ build_scriptsZcleanZinstallZ install_libZinstall_headersZinstall_scriptsZ install_dataZsdistregisterZbdistZ bdist_dumbZ bdist_rpmZ bdist_wininstZcheckZuploadN)__all__rr2/usr/lib64/python3.8/distutils/command/__init__.pys&__pycache__/check.cpython-38.opt-1.pyc000064400000011427152345030560013430 0ustar00U e5d@sdZddlmZddlmZzTddlmZddlmZddl m Z ddl m Z ddl m Z Gd d d eZd ZWnek rd ZYnXGd ddeZdS)zCdistutils.command.check Implements the Distutils 'check' command. )Command)DistutilsSetupError)Reporter)Parser)frontend)nodes)StringIOc@seZdZd ddZddZdS) SilentReporterNrasciireplacec Cs"g|_t||||||||dSN)messagesr__init__)selfsource report_level halt_levelstreamdebugencoding error_handlerr//usr/lib64/python3.8/distutils/command/check.pyrs zSilentReporter.__init__cOs6|j||||ftj|f|||j|d|S)N)leveltype)r appendrsystem_messageZlevels)rrmessageZchildrenkwargsrrrrszSilentReporter.system_message)Nrr r )__name__ __module__ __qualname__rrrrrrr s  r TFc@s`eZdZdZdZdddgZdddgZd d Zd d Zd dZ ddZ ddZ ddZ ddZ dS)checkz6This command checks the meta-data of the package. z"perform some checks on the package)metadatamzVerify meta-data)restructuredtextrzEChecks if long string meta-data syntax are reStructuredText-compliant)strictsz(Will exit with an error if a check failsr#r%r'cCsd|_d|_d|_d|_dS)z Sets default values for options.rN)r%r#r' _warningsrrrrinitialize_options1szcheck.initialize_optionscCsdSr rr+rrrfinalize_options8szcheck.finalize_optionscCs|jd7_t||S)z*Counts the number of warnings that occurs.r))r*rwarn)rmsgrrrr.;sz check.warncCsL|jr||jr0tr"|n|jr0td|jrH|jdkrHtddS)zRuns the command.zThe docutils package is needed.rzPlease correct your package.N)r#check_metadatar% HAS_DOCUTILScheck_restructuredtextr'rr*r+rrrrun@s z check.runcCs|jj}g}dD]"}t||r(t||s||q|rL|dd||jrd|js|dn"|j r||j s|dn |ddS)zEnsures 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. )nameversionZurlzmissing 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#hasattrgetattrrr.joinZauthorZ author_emailZ maintainerZmaintainer_email)rr#Zmissingattrrrrr0Ps   zcheck.check_metadatacCsX|j}||D]>}|dd}|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_datagetr.)rdataZwarningr<rrrr2ns  zcheck.check_restructuredtextc Cs|jjp d}t}tjtfd}d|_d|_d|_t ||j |j |j |j |j|jd}tj|||d}||dz|||Wn:tk r}z|jdd|d ifW5d}~XYnX|jS) z8Returns warnings when the provided data doesn't compile.zsetup.py)Z componentsN)rrrr)rr;z!Could not finish the parsing: %s.)r6Z script_namerrZ OptionParserZget_default_valuesZ tab_widthZpep_referencesZrfc_referencesr rrZwarning_streamrZerror_encodingZerror_encoding_error_handlerrdocumentZ note_sourceparseAttributeErrorr r)rr? source_pathparserZsettingsZreporterrBerrrr=ys.  zcheck._check_rst_dataN)rr r!__doc__Z descriptionZ user_optionsZboolean_optionsr,r-r.r3r0r2r=rrrrr"$s  r"N)rHZdistutils.corerZdistutils.errorsrZdocutils.utilsrZdocutils.parsers.rstrZdocutilsrriorr r1 Exceptionr"rrrrs        __pycache__/bdist_dumb.cpython-38.opt-1.pyc000064400000007012152345030560014462 0ustar00U e5d1@shdZddlZddlmZddlmZddlmZmZddl Tddl m Z ddl m Z Gd d d eZdS) zdistutils.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_treeensure_relative)*)get_python_version)logc @s^eZdZdZddddefdddd d d d g Zd ddgZdddZddZddZ ddZ 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-tempkzPkeep 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 rrZgztarzip)posixntcCs:d|_d|_d|_d|_d|_d|_d|_d|_d|_dS)Nr) bdist_dir plat_nameformat keep_tempdist_dir skip_buildrownergroup)selfr4/usr/lib64/python3.8/distutils/command/bdist_dumb.pyinitialize_options2szbdist_dumb.initialize_optionscCsz|jdkr&|dj}tj|d|_|jdkrfz|jtj|_Wn"t k rdt dtjYnX| dddddS)NZbdistZdumbz@don't know how to create dumb built distributions on platform %s)rr)rr)rr) rZget_finalized_command bdist_baseospathjoinrdefault_formatnameKeyErrorDistutilsPlatformErrorZset_undefined_options)rr"rrr finalize_options=s"    zbdist_dumb.finalize_optionscCs(|js|d|jddd}|j|_|j|_d|_td|j|dd|j |j f}t j |j|}|js~|j}nJ|jr|j|jkrtdt|jt|jfnt j |jt|j}|j||j||j|jd }|jrt}nd }|jjd ||f|js$t|j|jd dS) NZbuildinstall)Zreinit_subcommandsrzinstalling to %sz%s.%szScan't make a dumb built distribution where base and platbase are different (%s, %s))Zroot_dirrranyr )dry_run) rZ run_commandZreinitialize_commandrrootZwarn_dirrinfoZ distributionZ get_fullnamerr#r$r%rrZhas_ext_modulesZ install_baseZinstall_platbaser)reprrZ make_archiverrrrZ dist_filesappendrrr.)rr+Zarchive_basenameZpseudoinstall_rootZ archive_rootfilenameZ pyversionrrr runOsR        zbdist_dumb.runN) __name__ __module__ __qualname__Z descriptionrZ user_optionsZboolean_optionsr&r!r*r4rrrr r s,  r )__doc__r#Zdistutils.corerZdistutils.utilrZdistutils.dir_utilrrZdistutils.errorsZdistutils.sysconfigrZ distutilsrr rrrr s    __pycache__/bdist_msi.cpython-38.opt-1.pyc000064400000046121152345030560014327 0ustar00U e5d߉@sdZddlZddlZddlmZddlmZddlmZddl m Z ddl m Z ddl mZdd lmZddlZdd lmZmZmZdd lmZmZmZmZGd d d eZGdddeZdS)z# Implements the bdist_msi command. N)Command) remove_tree)get_python_version) StrictVersion)DistutilsOptionError) get_platform)log)schemasequencetext) DirectoryFeatureDialogadd_datac@sFeZdZdZddZddZddd Zdd d ZdddZddZ dS)PyDialogzDialog 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||jddS)zbDialog(database, name, x, y, w, h, attributes, title, first, default, cancel, bitmap=true)$iHZ BottomLinerN)r__init__hlinew)selfargskwZrulerZbmwidthr3/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 )rtitlerrrr"#szPyDialog.titleBackc Cs,|r d}nd}||d|jddd|||S)zAdd 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 associatedr$8 pushbuttonrrr"nextnameactiveflagsrrrback*sz PyDialog.backCancelc Cs,|r d}nd}||d|jddd|||S)zAdd 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,rrrcancel5szPyDialog.cancelNextc Cs,|r d}nd}||d|jddd|||S)zAdd 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)zAdd 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 associatedr'r(r)r%)r+intrr)rr.r"r-ZxposrrrxbuttonKszPyDialog.xbuttonN)r#r$)r2r$)r4r$) __name__ __module__ __qualname____doc__rr"r1r3r-r8rrrrrs  rc@seZdZdZddddefdddd d d d d g ZddddgZddddddddddddddd d!d"d#d$d%gZd&Zd'd(Z d)d*Z d+d,Z d-d.Z d/d0Z d1d2Zd3d4Zd5d6Zd7S)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-tempkzPkeep the pseudo-installation tree around after creating the distribution archive)ztarget-version=Nz6require a specific python version on the target system)no-target-compilecz/do not compile .py to .pyc on the target system)no-target-optimizeoz;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.9XcCsFd|_d|_d|_d|_d|_d|_d|_d|_d|_d|_ d|_ dS)Nr) bdist_dir plat_name keep_tempZno_target_compileZno_target_optimizetarget_versiondist_dir skip_buildinstall_scriptpre_install_scriptversions)rrrrinitialize_options}szbdist_msi.initialize_optionscCs|dd|jdkr2|dj}tj|d|_t}|jsN|j rN||_|jr|jg|_ |j s|j r|j|krt d|fn t|j|_ |ddd|jrt d|jr|j jD]}|jtj|krqqt d|jd|_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_optionsrHget_finalized_command bdist_baseospathjoinrrK distributionhas_ext_modulesrPrMrlist all_versionsrOrNZscriptsbasenameinstall_script_key)rrSZ short_versionZscriptrrrfinalize_optionssH      zbdist_msi.finalize_optionscCsz|js|d|jddd}|j|_|j|_d|_|d}d|_d|_|j r|j }|spdt j dd}d |j |f}|d}tj|jd ||_td |j|t jdtj|jd |t jd=||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|j0r| /d|j0f| rt1|j*d| |2|3|4|5|j*6t7|jdr^d|j pJd|f}|jj8/||j9svt:|j|j;ddS)Nbuildinstallr$)Zreinit_subcommandsr install_libz%d.%dz.%s-%slibzinstalling to %sZPURELIBZUNKNOWNz%d.%d.%dz Python %s %sz Python %sZ DistVersionZ ARPCONTACTZARPURLINFOABOUTProperty dist_filesr=any)dry_run) }|d?d%d@dAd%d)dB|d7d-dCdDd-d)dE|dFd-dGdHdddI| dJdKd-dLdHdMdNdOddd |jd1dPd1d/} | d0d1|j dPd }|d?d%d@dAd%d)d|d7d-d-dDd-d)d|dFd-ddHddd| ddd-ddHdddddd |ddndd d0d9t|d||||||ddd" }|d|dd%ddtddddXd }|dd ddd-d|dd ddd-d|jd#dd d!| dd"} | dddd| j d0d9dd|d"d} | ddst|d||||||d"d"d"d=d> }|d?d-d%dAd%d)d|dFddddwddġ|ddddd-ddơ|dd&d|d&d-dd} | ddF| ddddZddRddddd } | ddˡ|jddd=d!|j dd"d=d!|d"d# ddst|d||||||ddd" }|d͡|dd%ddHdhddС|dd%ddHddddXd }|dd ddAd{d֡|dd ddAd{d١|jddd=d!| dd"} | dddd| dddd@| ddddN| dddd| dddd| dddd| dddd| dddd| d0d9dd-|d"dѡ ddsdS)Nriri,z[ProductName] Setupr%r$ rc)Z DefaultUIFontDlgFont8)Z ErrorDialogErrorDlg)Z Progress1ZInstall)Z Progress2Zinstalls)MaintenanceForm_ActionRepair) WhichUsersALLZ TextStyle)rTahoma Nr)Z DlgFontBold8rNr$)Z VerdanaBold10VerdanarNr$)Z VerdanaRed9rrrr) 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 ActionTextUITextZ FatalErrorZFinishz)[ProductName] Installer ended prematurelyz< Backr)r/r2r#Z Description1rFrPr!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 Description2z.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] InstallerZ DescriptionZReturnZ FilesInUseZRetryF)Zbitmaprz{\DlgFontBold8}Files in Useiz8Some files that need to be updated are currently in use.ZText7iJzThe 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.ZListZListBoxkZFileInUseProcessIgnorerreiZ ErrorTextr0rNxHQZNoZErrorNoYZYesZErrorYesAZAbortZ ErrorAbortC*Z ErrorCancelIZ ErrorIgnoreOZOkZErrorOkRZ ErrorRetryZ CancelDlgiUz;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] Installernz Pondering...Z ActionDatar4Z SpawnDialogrzSelect 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 locationZEnableZShowZDisableZHiderZ DiskCostDlgZOKz&{\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 VolumeListZVolumeCostListdiz{120}{70}{70}{70}{70}g?rZ AdminInstallzGSelect whether to install [ProductName] for all users of this computer.rrzInstall for all usersZJUSTMEzInstall just for mez [ALLUSERS]zWhichUsers="ALL"rz({\DlgFontBold8}[Progress1] [ProductName]#AzYPlease wait while the Installer [Progress2] [ProductName]. This may take several minutes.Z StatusLabelzStatus:Z ProgressBariz Progress doneZ SetProgressZProgressrz)Welcome to the [ProductName] Setup WizardZBodyText?z:Select whether you want to repair or remove [ProductName].ZRepairRadioGrouplrrrz&Repair [ProductName]ZRemoverzRe&move [ProductName]z [REINSTALL]zMaintenanceForm_Action="Repair"z [Progress1]Z Repairingz [Progress2]ZrepairsZ Reinstallrz[REMOVE]zMaintenanceForm_Action="Remove" ZRemoving Zremoves z MaintenanceForm_Action<>"Change")rxrr rrrr"r1r3r-ZeventZcontrolrr+mappingrWrorPrZ conditionr8Z radiogroupadd)rrxxyrrr"ZmodalZmodelessZtrack_disk_spaceZfatalrBZ user_exitZ exit_dialogZinuseerrorr3ZcostingZprepZseldlgorderrvrZinstall_other_condZdont_install_other_condZcostZ whichusersgZprogressZmaintrrrr}sv                                                   zbdist_msi.add_uicCs<|jrd||j|jf}nd||jf}tj|j|}|S)Nz%s.%s-py%s.msiz %s.%s.msi)rKrIrTrUrVrL)rrZ base_namerrrrrpsz bdist_msi.get_installer_filenameN)r9r:r;Z descriptionrZ user_optionsZboolean_optionsrZrrQr]rnr{rzr|r}rprrrrr=Ss^  ([66&@r=)r<rjrTZdistutils.corerZdistutils.dir_utilrZdistutils.sysconfigrZdistutils.versionrZdistutils.errorsrZdistutils.utilrZ distutilsrrwr r r r r rrrr=rrrrs       >__pycache__/sdist.cpython-38.pyc000064400000034266152345030560012550 0ustar00U e5d=J@sdZddlZddlZddlmZddlmZddlmZddlm Z ddlm Z ddlm Z dd l m Z dd lmZdd lmZdd lmZdd lmZmZddZGdddeZdS)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)DistutilsTemplateErrorDistutilsOptionErrorcCs`ddlm}ddlm}g}|D] }|d|d||dfq$|||ddS)zoPrint all possible values for the 'formats' option (used by the "--help-formats" command-line option). r) FancyGetopt)ARCHIVE_FORMATSformats=Nz.List of available source distribution formats:)Zdistutils.fancy_getoptrZdistutils.archive_utilrkeysappendsortZ print_help)rrformatsformatr//usr/lib64/python3.8/distutils/command/sdist.py show_formatss     rc@s"eZdZdZddZdddddd d d d d ddddgZddddddgZdddefgZdddZ defgZ dZ ddZ d d!Z d"d#Zd$d%Zd&d'Zd(d)Zed*d+Zd,d-Zd.d/Zd0d1Zd2d3Zd4d5Zd6d7Zd8d9Zd:d;Zdd?Zd@dAZdBdCZdDdEZ dFdGZ!dHdIZ"dS)Jsdistz6create 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_checkselfrrrchecking_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)pruneNzspecifically 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-onlyozEjust regenerate the manifest and then stop (implies --force-manifest))force-manifestfzkforcibly regenerate the manifest and carry on as usual. Deprecated: now the manifest is always regenerated.)rNz6formats for source distribution (comma-separated list)) keep-tempkz@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)NrZgztar) templatemanifest use_defaultsr# manifest_onlyZforce_manifestr keep_tempdist_dir archive_filesrownergrouprrrrinitialize_optionseszsdist.initialize_optionscCsZ|jdkrd|_|jdkr d|_|dt|j}|rFtd||jdkrVd|_dS)NZMANIFESTz MANIFEST.inrzunknown archive format '%s'Zdist)r2r1Zensure_string_listrZcheck_archive_formatsrr r6)rZ bad_formatrrrfinalize_options|s     zsdist.finalize_optionscCs>t|_|D]}||q||jr2dS|dSN)r filelistZget_sub_commandsZ run_command get_file_listr4make_distribution)rZcmd_namerrrruns  z sdist.runcCs*tdt|jd}||dS)zDeprecated API.zadistutils.command.sdist.check_metadata is deprecated, use the check command insteadr/N)rPendingDeprecationWarning distributionZget_command_objZensure_finalizedr@)rr/rrrcheck_metadatas  zsdist.check_metadatacCstj|j}|s:|r:||j|jdS|sN| d|j|j |j rf| |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))ospathisfiler1_manifest_is_not_generated read_manifestr=rZremove_duplicatesrfindallr3 add_defaults read_templater#prune_file_listwrite_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_scriptsrrrrrJszsdist.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)rDrEexistsabspathsplitlistdir)fspathrVZ directoryfilenamerrr_cs_path_existss  zsdist._cs_path_existscCs|j|jjg}|D]~}t|trj|}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) READMESrBZ script_name isinstancetupler[r=rrjoin)rZ standardsfnZaltsZgot_itrrrrNs"    zsdist._add_defaults_standardscCs4ddg}|D]"}ttjjt|}|j|q dS)Nz test/test*.pyz setup.cfg)filterrDrErFrr=extend)rZoptionalpatternfilesrrrrOszsdist._add_defaults_optionalcCs\|d}|jr$|j||jD],\}}}}|D]}|jtj ||q:q*dS)Nbuild_py) get_finalized_commandrBZhas_pure_modulesr=rbget_source_files data_filesrrDrEr_)rreZpkgZsrc_dirZ build_dir filenamesrZrrrrPs   zsdist._add_defaults_pythoncCsz|jrv|jjD]b}t|trBt|}tj|rt|j |q|\}}|D]$}t|}tj|rN|j |qNqdSr<) rBZhas_data_filesrhr]strr rDrErFr=r)ritemdirnamerir(rrrrQ$s     zsdist._add_defaults_data_filescCs(|jr$|d}|j|dS)N build_ext)rBZhas_ext_modulesrfr=rbrg)rrmrrrrR5s  zsdist._add_defaults_extcCs(|jr$|d}|j|dS)N build_clib)rBZhas_c_librariesrfr=rbrg)rrnrrrrS:s  zsdist._add_defaults_c_libscCs(|jr$|d}|j|dS)N build_scripts)rBZ has_scriptsrfr=rbrg)rrorrrrT?s  zsdist._add_defaults_scriptsc Cstd|jt|jddddddd}zh|}|dkr:qz|j|Wq(tt fk r}z| d|j |j |fW5d}~XYq(Xq(W5|XdS)zRead 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_commentsZ skip_blanksZ join_linesZ lstrip_wsZ rstrip_wsZ collapse_joinNz%s, line %d: %s) r infor1rclosereadliner=Zprocess_template_liner ValueErrorrrZZ current_line)rr1linemsgrrrrKDs&   zsdist.read_templatecCs|d}|j}|jjd|jd|jjd|dtjdkrFd}nd}ddd d d d d g}d|d||f}|jj|dddS)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_basesysplatformr_)rrvbase_dirZsepsZvcs_dirsZvcs_ptrnrrrrLas    zsdist.prune_file_listcCsX|rtd|jdS|jjdd}|dd|tj |j|fd|jdS)zWrite 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=rdinsertZexecuterZ write_file)rZcontentrrrrMys zsdist.write_manifestcCs<tj|jsdSt|j}z |}W5|X|dkS)NFz+# file GENERATED by distutils, do NOT edit )rDrErFr2openrqrr)rfpZ first_linerrrrGs   z sdist._manifest_is_not_generatedc CsVtd|jt|j4}|D](}|}|ds|s:q|j|qW5QRXdS)zRead 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 rpr2rstrip startswithr=r)rr2rtrrrrHs zsdist.read_manifestcCs||tj|||jdttdr4d}d|}n d}d|}|sPtdn t||D]<}tj |s|td|q^tj ||}|j |||d q^|j j|dS) aCreate 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_runlinkZhardzmaking hard links in %s...Nzcopying files to %s...z)no files to distribute -- empty manifest?z#'%s' not a regular file -- skipping)r)ZmkpathrZ create_treerhasattrrDr rrprErFr_Z copy_filerBZmetadataZwrite_pkg_info)rr}rdrrufiledestrrrmake_release_trees      zsdist.make_release_treecCs|j}tj|j|}|||jjg}d|j krT|j |j |j d|j D]:}|j ||||j|jd}| ||jj dd|fqZ||_|jstj||jddS)aCreate 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}r8r9rrN)rBrzrDrEr_r6rr=rdrrpopindexZ make_archiver8r9Z dist_filesr7r5rZ remove_treer)rr}Z base_namer7Zfmtrrrrr?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. )r7rrrrget_archive_filesszsdist.get_archive_files)#__name__ __module__ __qualname__Z descriptionrZ user_optionsZboolean_optionsrZ help_optionsZ negative_optZ sub_commandsr\r:r;r@rCr>rJ staticmethodr[rNrOrPrQrRrSrTrKrLrMrGrHrr?rrrrrr$sp' (  *r)__doc__rDr{rwarningsrZdistutils.corerZ distutilsrrrZdistutils.text_filerZdistutils.filelistr r Zdistutils.utilr Zdistutils.errorsr r rrrrrrs          __pycache__/__init__.cpython-38.pyc000064400000001041152345030560013142 0ustar00U e5d@s2dZddddddddd d d d d ddddddgZdS)z\distutils.command Package containing implementation of all the standard Distutils commands.ZbuildZbuild_pyZ build_extZ build_clibZ build_scriptsZcleanZinstallZ install_libZinstall_headersZinstall_scriptsZ install_dataZsdistregisterZbdistZ bdist_dumbZ bdist_rpmZ bdist_wininstZcheckZuploadN)__doc____all__rr2/usr/lib64/python3.8/distutils/command/__init__.pys(__pycache__/bdist.cpython-38.opt-2.pyc000064400000006622152345030560013462 0ustar00U e5d@sDddlZddlmZddlTddlmZddZGdddeZdS) N)Command)*) get_platformcCsPddlm}g}tjD]"}|d|dtj|dfq||}|ddS)Nr) FancyGetoptformats=z'List of available distribution formats:)Zdistutils.fancy_getoptrbdistformat_commandsappendformat_commandZ print_help)rformatsformatZpretty_printerr//usr/lib64/python3.8/distutils/command/bdist.py show_formats s    rc @seZdZdZddddefdddd d gZd gZd d defgZdZ dddZ dddddddddg Z ddddddd d!d"d# Z d$d%Z d&d'Zd(d)Zd S)*rz$create a built (binary) distribution)z bdist-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_rpmgztarzip)posixntrpmbztarxztarztartarwininstmsi)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_buildgroupowner)selfrrrinitialize_optionsQszbdist.initialize_optionscCs|jdkr(|jrt|_n|dj|_|jdkrT|dj}tj|d|j|_| d|j dkrz|j tj g|_ Wn"t k rtdtj YnX|jdkrd|_dS)NZbuildzbdist.r z;don't know how to create built distributions on platform %sZdist)r%r'rZget_finalized_commandr$ build_baseospathjoinZensure_string_listr default_formatnameKeyErrorZDistutilsPlatformErrorr&)r*r,rrrfinalize_optionsZs*        zbdist.finalize_optionsc Csg}|jD]>}z||j|dWq tk rFtd|Yq Xq tt|jD]h}||}||}||jkr|j||_ |dkr|j |_ |j |_ |||ddkrd|_ | |qXdS)Nrzinvalid format '%s'r#r)r r r r2ZDistutilsOptionErrorrangelenZreinitialize_commandno_format_optionr r)r(Z keep_tempZ run_command)r*Zcommandsr iZcmd_nameZsub_cmdrrrrunvs"    z bdist.run)__name__ __module__ __qualname__Z descriptionrZ user_optionsZboolean_optionsrZ help_optionsr6r0r r r+r3r8rrrrrsR   r)r-Zdistutils.corerZdistutils.errorsZdistutils.utilrrrrrrrs    __pycache__/sdist.cpython-38.opt-1.pyc000064400000034266152345030560013507 0ustar00U e5d=J@sdZddlZddlZddlmZddlmZddlmZddlm Z ddlm Z ddlm Z dd l m Z dd lmZdd lmZdd lmZdd lmZmZddZGdddeZdS)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)DistutilsTemplateErrorDistutilsOptionErrorcCs`ddlm}ddlm}g}|D] }|d|d||dfq$|||ddS)zoPrint all possible values for the 'formats' option (used by the "--help-formats" command-line option). r) FancyGetopt)ARCHIVE_FORMATSformats=Nz.List of available source distribution formats:)Zdistutils.fancy_getoptrZdistutils.archive_utilrkeysappendsortZ print_help)rrformatsformatr//usr/lib64/python3.8/distutils/command/sdist.py show_formatss     rc@s"eZdZdZddZdddddd d d d d ddddgZddddddgZdddefgZdddZ defgZ dZ ddZ d d!Z d"d#Zd$d%Zd&d'Zd(d)Zed*d+Zd,d-Zd.d/Zd0d1Zd2d3Zd4d5Zd6d7Zd8d9Zd:d;Zdd?Zd@dAZdBdCZdDdEZ dFdGZ!dHdIZ"dS)Jsdistz6create 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_checkselfrrrchecking_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)pruneNzspecifically 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-onlyozEjust regenerate the manifest and then stop (implies --force-manifest))force-manifestfzkforcibly regenerate the manifest and carry on as usual. Deprecated: now the manifest is always regenerated.)rNz6formats for source distribution (comma-separated list)) keep-tempkz@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)NrZgztar) templatemanifest use_defaultsr# manifest_onlyZforce_manifestr keep_tempdist_dir archive_filesrownergrouprrrrinitialize_optionseszsdist.initialize_optionscCsZ|jdkrd|_|jdkr d|_|dt|j}|rFtd||jdkrVd|_dS)NZMANIFESTz MANIFEST.inrzunknown archive format '%s'Zdist)r2r1Zensure_string_listrZcheck_archive_formatsrr r6)rZ bad_formatrrrfinalize_options|s     zsdist.finalize_optionscCs>t|_|D]}||q||jr2dS|dSN)r filelistZget_sub_commandsZ run_command get_file_listr4make_distribution)rZcmd_namerrrruns  z sdist.runcCs*tdt|jd}||dS)zDeprecated API.zadistutils.command.sdist.check_metadata is deprecated, use the check command insteadr/N)rPendingDeprecationWarning distributionZget_command_objZensure_finalizedr@)rr/rrrcheck_metadatas  zsdist.check_metadatacCstj|j}|s:|r:||j|jdS|sN| d|j|j |j rf| |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))ospathisfiler1_manifest_is_not_generated read_manifestr=rZremove_duplicatesrfindallr3 add_defaults read_templater#prune_file_listwrite_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_scriptsrrrrrJszsdist.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)rDrEexistsabspathsplitlistdir)fspathrVZ directoryfilenamerrr_cs_path_existss  zsdist._cs_path_existscCs|j|jjg}|D]~}t|trj|}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) READMESrBZ script_name isinstancetupler[r=rrjoin)rZ standardsfnZaltsZgot_itrrrrNs"    zsdist._add_defaults_standardscCs4ddg}|D]"}ttjjt|}|j|q dS)Nz test/test*.pyz setup.cfg)filterrDrErFrr=extend)rZoptionalpatternfilesrrrrOszsdist._add_defaults_optionalcCs\|d}|jr$|j||jD],\}}}}|D]}|jtj ||q:q*dS)Nbuild_py) get_finalized_commandrBZhas_pure_modulesr=rbget_source_files data_filesrrDrEr_)rreZpkgZsrc_dirZ build_dir filenamesrZrrrrPs   zsdist._add_defaults_pythoncCsz|jrv|jjD]b}t|trBt|}tj|rt|j |q|\}}|D]$}t|}tj|rN|j |qNqdSr<) rBZhas_data_filesrhr]strr rDrErFr=r)ritemdirnamerir(rrrrQ$s     zsdist._add_defaults_data_filescCs(|jr$|d}|j|dS)N build_ext)rBZhas_ext_modulesrfr=rbrg)rrmrrrrR5s  zsdist._add_defaults_extcCs(|jr$|d}|j|dS)N build_clib)rBZhas_c_librariesrfr=rbrg)rrnrrrrS:s  zsdist._add_defaults_c_libscCs(|jr$|d}|j|dS)N build_scripts)rBZ has_scriptsrfr=rbrg)rrorrrrT?s  zsdist._add_defaults_scriptsc Cstd|jt|jddddddd}zh|}|dkr:qz|j|Wq(tt fk r}z| d|j |j |fW5d}~XYq(Xq(W5|XdS)zRead 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_commentsZ skip_blanksZ join_linesZ lstrip_wsZ rstrip_wsZ collapse_joinNz%s, line %d: %s) r infor1rclosereadliner=Zprocess_template_liner ValueErrorrrZZ current_line)rr1linemsgrrrrKDs&   zsdist.read_templatecCs|d}|j}|jjd|jd|jjd|dtjdkrFd}nd}ddd d d d d g}d|d||f}|jj|dddS)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_basesysplatformr_)rrvbase_dirZsepsZvcs_dirsZvcs_ptrnrrrrLas    zsdist.prune_file_listcCsX|rtd|jdS|jjdd}|dd|tj |j|fd|jdS)zWrite 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=rdinsertZexecuterZ write_file)rZcontentrrrrMys zsdist.write_manifestcCs<tj|jsdSt|j}z |}W5|X|dkS)NFz+# file GENERATED by distutils, do NOT edit )rDrErFr2openrqrr)rfpZ first_linerrrrGs   z sdist._manifest_is_not_generatedc CsVtd|jt|j4}|D](}|}|ds|s:q|j|qW5QRXdS)zRead 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 rpr2rstrip startswithr=r)rr2rtrrrrHs zsdist.read_manifestcCs||tj|||jdttdr4d}d|}n d}d|}|sPtdn t||D]<}tj |s|td|q^tj ||}|j |||d q^|j j|dS) aCreate 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_runlinkZhardzmaking hard links in %s...Nzcopying files to %s...z)no files to distribute -- empty manifest?z#'%s' not a regular file -- skipping)r)ZmkpathrZ create_treerhasattrrDr rrprErFr_Z copy_filerBZmetadataZwrite_pkg_info)rr}rdrrufiledestrrrmake_release_trees      zsdist.make_release_treecCs|j}tj|j|}|||jjg}d|j krT|j |j |j d|j D]:}|j ||||j|jd}| ||jj dd|fqZ||_|jstj||jddS)aCreate 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}r8r9rrN)rBrzrDrEr_r6rr=rdrrpopindexZ make_archiver8r9Z dist_filesr7r5rZ remove_treer)rr}Z base_namer7Zfmtrrrrr?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. )r7rrrrget_archive_filesszsdist.get_archive_files)#__name__ __module__ __qualname__Z descriptionrZ user_optionsZboolean_optionsrZ help_optionsZ negative_optZ sub_commandsr\r:r;r@rCr>rJ staticmethodr[rNrOrPrQrRrSrTrKrLrMrGrHrr?rrrrrr$sp' (  *r)__doc__rDr{rwarningsrZdistutils.corerZ distutilsrrrZdistutils.text_filerZdistutils.filelistr r Zdistutils.utilr Zdistutils.errorsr r rrrrrrs          __pycache__/build_ext.cpython-38.opt-1.pyc000064400000037413152345030560014335 0ustar00U e5dP{@sdZddlZddlZddlZddlZddlmZddlTddlm Z m Z ddlm Z ddl m Z ddlmZdd lmZdd lmZdd lmZed Zd dZGdddeZdS)zdistutils.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_compilerget_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)Nrshow_compilers)distutils.ccompilerr r r3/usr/lib64/python3.8/distutils/command/build_ext.pyr s r c@seZdZdZdejZdddddefdd d d efd d ddddefddddddddddgZddddd gZ d!d"d#e fgZ d$d%Z d&d'Z d(d)Zd*d+Zd,d-Zd.d/Zd0d1Zd2d3Zd4d5Zejd6d7Zd8d9Zd:d;Zdd?Zd@dAZdBdCZdDdEZdFdGZd"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)z build-temp=tz1directory for temporary files (build by-products)z plat-name=pz>platform name to cross-compile for, if supported (default: %s))inplaceiziignore 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)debuggz'compile/link with debugging information)forcefz2forcibly 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 compilerscCsd|_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_temprpackage include_dirsdefineundef libraries library_dirsrpath link_objectsrr compilerswigswig_cpp swig_optsr%parallelselfrrrinitialize_optionsjs*zbuild_ext.initialize_optionsc Csddlm}|ddddddd d |jdkr8|jj|_|jj|_|}|jd d }|j dkrn|jj pjg|_ t |j t r|j t j|_ tjtjkr|j t jtjd |j | t jj||kr|j | t jj|d|d|jdkrg|_|jdkrg|_nt |jt r:|j t j|_|jdkrNg|_nt |jt rl|j t j|_t jdkrh|jt jtjdtjtjkr|jt jtjd|jrt j|jd|_nt j|jd|_|j t jtt tdd}|r|j||j!dkr*d}n|j!dd}t jtjd}|r\t j||}|j|tj"dddkrtj#$t jtjdr|jt jtjddt%dn |jd|&dr|j's|j|&d n |jd|j(r|j( d!}d"d#|D|_(|j)r4|j) d!|_)|j*dkrHg|_*n|j* d$|_*|j+rt jt,d }t jt,d} t j-|r|j |t j-| r|j| |j| t |j.t rzt/|j.|_.Wnt0k rt1d%YnXdS)&Nr) sysconfigZbuild)r'r')r)r))r2r2)rr)r r )r6r6)r(r()Z plat_specificZincluder.r1ntZlibsZDebugZRelease_homewin32ZPCbuildcygwinbinlibpythonZconfig.Py_ENABLE_SHAREDZLIBDIR,cSsg|] }|dfqS)1r).0Zsymbolrrr sz.build_ext.finalize_options.. zparallel should be an integer)2 distutilsr:Zset_undefined_optionsr* distributionZ ext_packageZ ext_modulesr&Zget_python_incr+ isinstancestrsplitospathsepsys exec_prefixbase_exec_prefixappendpathjoinextendZensure_string_listr.r/r0nameprefixrr)dirnamergetattrr(platform executable startswithrget_config_varZ python_buildr,r-r5r%r isdirr6int ValueErrorZDistutilsOptionError) r8r:Z py_includeZplat_py_includeZ _sys_homesuffixZnew_libZdefinesZ user_includeZuser_librrrfinalize_optionss                           zbuild_ext.finalize_optionscCsjddlm}|jsdS|jrL|d}|j|p:g|j |j ||j |j |j|jd|_ t|j tjdkr|jtkr|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)r2verbosedry_runr r<)#rrgr&rMZhas_c_librariesget_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_objectsbuild_extensions)r8rgrhrZvaluemacrorrrruns@            z build_ext.runc Csvt|tstdt|D]T\}}t|tr0qt|trFt|dkrNtd|\}}td|t|t rvt |s~tdt|t stdt||d}dD]"}| |}|d k rt|||q| d |_d |krtd | d }|rhg|_g|_|D]b} t| tr"t| dks*tdt| dkrJ|j| dnt| dkr|j| q|||<qd S)aEnsure 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 instanceszMeach 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_objectsextra_compile_argsextra_link_argsNr0Zdef_filez9'def_file' element of build info dict no longer supportedmacros)r;rpz9'macros' element of build info dict must be 1- or 2-tupler;r)rNlistDistutilsSetupError enumeratertuplelenr warnrOextension_name_rematchdictgetsetattrruntime_library_dirs define_macros undef_macrosrV) r8r&rextext_nameZ build_infokeyvalrurnrrrcheck_extensions_listVs^        zbuild_ext.check_extensions_listcCs,||jg}|jD]}||jq|SN)rr&rYrq)r8 filenamesrrrrget_source_filess   zbuild_ext.get_source_filescCs2||jg}|jD]}|||jq|Sr)rr&rVget_ext_fullpathrZ)r8Zoutputsrrrr get_outputss   zbuild_ext.get_outputscCs(||j|jr|n|dSr)rr&r6_build_extensions_parallel_build_extensions_serialr7rrrrls  zbuild_ext.build_extensionsc sj}jdkrt}zddlm}Wntk r@d}YnX|dkrVdS||dPfddjD}tj|D]&\}} || W5QRXqW5QRXdS)NTr)ThreadPoolExecutor)Z max_workerscsg|]}j|qSr)Zsubmitbuild_extension)rIrZexecutorr8rrrJsz8build_ext._build_extensions_parallel..) r6rQ cpu_countZconcurrent.futuresr ImportErrorrr&zip_filter_build_errorsresult)r8ZworkersrZfuturesrZfutrrrrs"     z$build_ext._build_extensions_parallelc Cs0|jD]$}||||W5QRXqdSr)r&rr)r8rrrrrs  z"build_ext._build_extensions_serialc csTz dVWnDtttfk rN}z |js*|d|j|fW5d}~XYnXdS)Nz"building extension "%s" failed: %s)ZCCompilerErrorZDistutilsErrorZ CompileErrorZoptionalr{rZ)r8rerrrrs zbuild_ext._filter_build_errorsc CsP|j}|dkst|ttfs*td|jt|}||j}||j}|jslt ||dslt d|jdSt d|j| ||}|jpg}|jdd}|jD]}||fq|jj||j||j|j ||jd}|dd|_|jr||j|jpg}|jp|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+rextra_postargsdepends)r.r/rrexport_symbolsrr)Z target_lang)!rqrNrvryrwrZrrr rr rinfo swig_sourcesrsrrrVr2compiler)r+Z_built_objectsrrrYrtlanguageZdetect_languageZlink_shared_object get_librariesr/rget_export_symbols) r8rrqext_pathrZ extra_argsrur-ZobjectsrrrrrsX        zbuild_ext.build_extensioncCs$g}g}i}|jrtd|js6d|jks6d|jkrI don't know how to find (much less run) SWIG on platform '%s'N)rQrZrWrXisfileZDistutilsPlatformError)r8Zversfnrrrrgs    zbuild_ext.find_swigcCs||}|d}||d}|jsRtjj|dd|g}tj|j|Sd|dd}|d}tj | |}tj||S)zReturns the path of the filename for a given extension. The file is located in `build_lib` or directly in the package (inplace option). rErNrbuild_py) get_ext_fullnamerPget_ext_filenamerrQrWrXr'rkabspathZget_package_dir)r8rfullnamemodpathfilenamer*rZ package_dirrrrrs   zbuild_ext.get_ext_fullpathcCs |jdkr|S|jd|SdS)zSReturns the fullname of a given extension name. Adds the `package.` prefixNrE)r*)r8rrrrrs zbuild_ext.get_ext_fullnamecCs.ddlm}|d}|d}tjj||S)zConvert 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"). rrarEZ EXT_SUFFIX)distutils.sysconfigrarPrQrWrX)r8rrarZ ext_suffixrrrrs  zbuild_ext.get_ext_filenamecCsxd|jdd}z|dWn0tk rRd|dddd}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. _rErasciirZpunycode-_ZPyInit)rZrPencodeUnicodeEncodeErrorreplacedecoderrV)r8rreZ initfunc_namerrrrs"  zbuild_ext.get_export_symbolscCstjdkr^ddlm}t|j|sd}|jr4|d}|tjd?tjd?d@f}|j|gSndd l m }d }|d rt td rd }nr) MSVCCompilerz python%d%dZ_drFrFZgetandroidapilevelTrAZ_PYTHON_HOST_PLATFORMZANDROID_API_LEVELZMACHDEPZ LDVERSIONrD)rSr^Zdistutils._msvccompilerrrNr2r hexversionr.rrahasattrrQenviron)r8rrtemplateZ pythonlibraZlink_libpythonZ ldversionrrrrs4         zbuild_ext.get_libraries) __name__ __module__ __qualname__Z descriptionrQrRZsep_byr Z user_optionsZboolean_optionsr Z help_optionsr9rfrorrrrlrr contextlibcontextmanagerrrrrrrrrrrrrrr!sp +@N  K6  r)__doc__rrQrerSZdistutils.corerZdistutils.errorsrrrrZdistutils.dep_utilrZdistutils.extensionrZdistutils.utilr rLr Zsiter rr|r rrrrrs$       __pycache__/upload.cpython-38.opt-2.pyc000064400000011702152345030560013634 0ustar00U &.e@sddlZddlZddlZddlZddlmZddlmZmZm Z ddl m Z ddl m Z mZddlmZddlmZddlmZGd d d eZdS) N)standard_b64encode)urlopenRequest HTTPError)urlparse)DistutilsErrorDistutilsOptionError) PyPIRCCommand)spawn)logc@sJeZdZdZejddgZejdgZddZddZd d Z d d Z d S)uploadzupload binary package to PyPI)signszsign files to upload using gpg)z identity=izGPG identity used to sign filesr cCs,t|d|_d|_d|_d|_d|_dS)NrF)r initialize_optionsusernamepassword show_responser identity)selfr0/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 repositoryrealm) 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)rmsgcommand pyversionfilenamerrrrun: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 } d d | | tj|| f||t| d | | | | | | | | | | | | | d}zt!| }WnPt"k r}z0d|}|#|t$j%ddl&m'}|s|W5d}~XYn X||d<d|d<|jrt|dd "} tj|d| f|d<W5QRX|j(d|j)*d}dt+|,d}d}d|*d}|d}t-.}|/D]\}}d|}t0|t1sP|g}|D]j}t2|t3kr|d|d7}|d}nt4|*d }|5||5|*d |5d!|5|qTq.|5||6}d"||jf}|#|t$j%d#|t4t7||d$}t8|j||d%}zt9|}|:}|j;} Wnftk r}z|#t4|t$j?W5d}~XYnX|d&kr|#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_runrbZ file_upload1z1.0)z:actionZprotocol_versionnameversioncontentZfiletyper Z sha256_digestZmetadata_versionZsummaryZ home_pageZauthorZ author_emaillicense descriptionkeywordsplatformZ classifiersZ 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)dataheaderszServer response (%s): %s zK---------------------------------------------------------------------------zUpload failed (%s): %s)DrrAssertionErrorr rr r$openclosereadrZmetadataZget_nameZ get_versionospathbasenamehashlibZsha256Z hexdigestZget_descriptionZget_urlZ get_contactZget_contact_emailZ get_licenceZget_long_descriptionZ get_keywordsZ get_platformsZget_classifiersZget_download_urlZ get_providesZ get_requiresZ get_obsoletesZmd5 ValueErrorZannouncer INFOZ_hashlibr.rrencoderdecodeioBytesIOitems isinstancelisttypetuplestrwritegetvaluelenrrZgetcoderrcodeOSErrorZERRORrZ_read_pypi_responsejoinr)"rrr r!ZschemaZnetlocZurlZparamsZqueryZ fragmentsZgpg_argsfr)metar2Zdigesterr.Z user_passZauthboundaryZ sep_boundaryZ end_boundaryZbodykeyvaluetitler3ZrequestresultZstatusreasontextrrrrBs       !           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 distutilsr r rrrrs     __pycache__/check.cpython-38.opt-2.pyc000064400000010337152345030560013430 0ustar00U e5d@sddlmZddlmZzTddlmZddlmZddlm Z ddlm Z ddl m Z Gdd d eZ d ZWnek rd ZYnXGd d d eZdS))Command)DistutilsSetupError)Reporter)Parser)frontend)nodes)StringIOc@seZdZd ddZddZdS) SilentReporterNrasciireplacec Cs"g|_t||||||||dSN)messagesr__init__)selfsource report_level halt_levelstreamdebugencoding error_handlerr//usr/lib64/python3.8/distutils/command/check.pyrs zSilentReporter.__init__cOs6|j||||ftj|f|||j|d|S)N)leveltype)r appendrsystem_messageZlevels)rrmessageZchildrenkwargsrrrrszSilentReporter.system_message)Nrr r )__name__ __module__ __qualname__rrrrrrr s  r TFc@s\eZdZdZdddgZdddgZdd Zd d Zd d ZddZ ddZ ddZ ddZ dS)checkz"perform some checks on the package)metadatamzVerify meta-data)restructuredtextrzEChecks if long string meta-data syntax are reStructuredText-compliant)strictsz(Will exit with an error if a check failsr#r%r'cCsd|_d|_d|_d|_dS)Nr)r%r#r' _warningsrrrrinitialize_options1szcheck.initialize_optionscCsdSr rr+rrrfinalize_options8szcheck.finalize_optionscCs|jd7_t||S)Nr))r*rwarn)rmsgrrrr.;sz check.warncCsL|jr||jr0tr"|n|jr0td|jrH|jdkrHtddS)NzThe docutils package is needed.rzPlease correct your package.)r#check_metadatar% HAS_DOCUTILScheck_restructuredtextr'rr*r+rrrrun@s z check.runcCs|jj}g}dD]"}t||r(t||s||q|rL|dd||jrd|js|dn"|j r||j s|dn |ddS)N)nameversionZurlzmissing 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#hasattrgetattrrr.joinZauthorZ author_emailZ maintainerZmaintainer_email)rr#Zmissingattrrrrr0Ps   zcheck.check_metadatacCsX|j}||D]>}|dd}|dkr8|d}nd|d|f}||qdS)Nliner)z %s (line %s))r6Zget_long_description_check_rst_datagetr.)rdataZwarningr<rrrr2ns  zcheck.check_restructuredtextc Cs|jjp d}t}tjtfd}d|_d|_d|_t ||j |j |j |j |j|jd}tj|||d}||dz|||Wn:tk r}z|jdd|difW5d}~XYnX|jS) Nzsetup.py)Z components)rrrr)rr;z!Could not finish the parsing: %s.)r6Z script_namerrZ OptionParserZget_default_valuesZ tab_widthZpep_referencesZrfc_referencesr rrZwarning_streamrZerror_encodingZerror_encoding_error_handlerrdocumentZ note_sourceparseAttributeErrorr r)rr? source_pathparserZsettingsZreporterrBerrrr=ys.  zcheck._check_rst_dataN) rr r!Z descriptionZ user_optionsZboolean_optionsr,r-r.r3r0r2r=rrrrr"$s  r"N)Zdistutils.corerZdistutils.errorsrZdocutils.utilsrZdocutils.parsers.rstrZdocutilsrriorr r1 Exceptionr"rrrrs        __pycache__/install_headers.cpython-38.opt-1.pyc000064400000003256152345030560015515 0ustar00U e5d@s$dZddlmZGdddeZdS)zdistutils.command.install_headers Implements the Distutils 'install_headers' command, to install C/C++ header files to the Python include directory.)Commandc@sFeZdZdZddgZdgZddZddZd d Zd d Z d dZ dS)install_headerszinstall C/C++ header files)z install-dir=dz$directory to install header files to)forcefz-force installation (overwrite existing files)rcCsd|_d|_g|_dS)Nr) install_dirroutfilesselfr 9/usr/lib64/python3.8/distutils/command/install_headers.pyinitialize_optionssz"install_headers.initialize_optionscCs|ddddS)NZinstall)rr)rr)Zset_undefined_optionsr r r r finalize_optionssz install_headers.finalize_optionscCsH|jj}|sdS||j|D]"}|||j\}}|j|q dSN) distributionheadersZmkpathrZ copy_filerappend)r rheaderout_r r r run!s zinstall_headers.runcCs |jjp gSr)rrr r r r get_inputs+szinstall_headers.get_inputscCs|jSr)rr r r r get_outputs.szinstall_headers.get_outputsN) __name__ __module__ __qualname__Z descriptionZ user_optionsZboolean_optionsr rrrrr r r r r s rN)__doc__Zdistutils.corerrr r r r s __pycache__/config.cpython-38.pyc000064400000023765152345030560012671 0ustar00U e5d=3@sldZddlZddlZddlmZddlmZddlmZddl m Z ddd Z Gd d d eZ dd d Z dS)adistutils.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 @seZdZdZdddddddd d g Zd d Zd dZddZddZddZ ddZ ddZ ddZ ddZ d0dd Zd1d!d"Zd2d#d$Zd3d%d&Zd4d'd(Zd5d*d+Zdddgfd,d-Zd6d.d/ZdS)7configzprepare 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)z dump-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_filesselfr0/usr/lib64/python3.8/distutils/command/config.pyinitialize_options3szconfig.initialize_optionscCs|jdkr|jjpg|_nt|jtr6|jtj|_|jdkrHg|_nt|jtr^|jg|_|jdkrpg|_nt|jtr|jtj|_dSN) rZ distribution isinstancestrsplitospathseprrrrrrfinalize_optionsBs       zconfig.finalize_optionscCsdSrrrrrrrunRsz config.runcCszddlm}m}t|j|sv||j|jdd|_t|j|jrN|j|j|j rb|j |j |j rv|j |j dS)z^Check that 'self.compiler' really is a CCompiler object; if not, make it one. r) CCompiler new_compilerr)rdry_runZforceN) distutils.ccompilerr"r#rrr$rrZset_include_dirsrZ set_librariesrZset_library_dirs)rr"r#rrr_check_compilerYs  zconfig._check_compilerc Csldt|}t|dL}|r>|D]}|d|q |d|||ddkr^|dW5QRX|S)NZ _configtestwz#include <%s>  )LANG_EXTopenwrite)rbodyheaderslangfilenamefileheaderrrr_gen_temp_sourcefileks     zconfig._gen_temp_sourcefilecCs<||||}d}|j||g|jj|||d||fS)Nz _configtest.ir)r3rextendrZ preprocess)rr-r.rr/srcoutrrr _preprocessws zconfig._preprocesscCs\||||}|jr"t|d||j|g\}|j||g|jj|g|d||fS)Nzcompiling '%s':r4)r3r dump_filerZobject_filenamesrr5compile)rr-r.rr/r6objrrr_compile~szconfig._compilec Csr|||||\}}tjtj|d} |jj|g| |||d|jjdk r\| |jj} |j | ||| fS)Nr)rrZ target_lang) r<rpathsplitextbasenamerZlink_executableZ exe_extensionrappend) rr-r.rrrr/r6r;progrrr_links    z config._linkc GsT|s|j}g|_tdd||D](}zt|Wq&tk rLYq&Xq&dS)Nz removing: %s )rrinfojoinrremoveOSError)r filenamesr0rrr_cleansz 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&r8rIrr-r.rr/rKokrrrtry_cpps  zconfig.try_cppc Csx||||||\}}t|tr0t|}t|.}d} |} | dkrPqb|| r>d} qbq>W5QRX| | S)aConstruct 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. FT) r&r8rrrer:r+readlinesearchrI) rpatternr-r.rr/r6r7r1matchlinerrr search_cpps     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. rrJTFsuccess!failure.)r%rKr&r<rrDrIrLrrr try_compiles  zconfig.try_compilec Cspddlm}m}|z|||||||d} Wn||fk rPd} YnXt| r^dp`d|| S)zTry to compile and link a source file, built from 'body' and 'headers', to executable form. Return true on success, false otherwise. rrK LinkErrorTFrWrX)r%rKr[r&rBrrDrI) rr-r.rrrr/rKr[rMrrrtry_links  zconfig.try_linkc Csddlm}m}|z.|||||||\} } } || gd} Wn||tfk rdd} YnXt| rrdptd| | S)zTry 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;ZexerMrrrtry_runs    zconfig.try_runrc Cst|g}|r|d||d|r<|d|n|d||dd|d}||||||S)aDetermine 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\) rfuncr.rrrZdeclZcallr-rrr check_funcs   zconfig.check_funccCs ||d|||g||S)aDetermine 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|dS)zDetermine 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__Z descriptionZ user_optionsrr r!r&r3r8r<rBrIrNrVrYr\r]r`rarbrrrrrs\         rcCsJ|dkrtd|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+closeread)r0headr1rrrr9Ks r9)N)__doc__rrPZdistutils.corerZdistutils.errorsrZdistutils.sysconfigrZ distutilsrr*rr9rrrrs      8__pycache__/install_headers.cpython-38.pyc000064400000003256152345030560014556 0ustar00U e5d@s$dZddlmZGdddeZdS)zdistutils.command.install_headers Implements the Distutils 'install_headers' command, to install C/C++ header files to the Python include directory.)Commandc@sFeZdZdZddgZdgZddZddZd d Zd d Z d dZ dS)install_headerszinstall C/C++ header files)z install-dir=dz$directory to install header files to)forcefz-force installation (overwrite existing files)rcCsd|_d|_g|_dS)Nr) install_dirroutfilesselfr 9/usr/lib64/python3.8/distutils/command/install_headers.pyinitialize_optionssz"install_headers.initialize_optionscCs|ddddS)NZinstall)rr)rr)Zset_undefined_optionsr r r r finalize_optionssz install_headers.finalize_optionscCsH|jj}|sdS||j|D]"}|||j\}}|j|q dSN) distributionheadersZmkpathrZ copy_filerappend)r rheaderout_r r r run!s zinstall_headers.runcCs |jjp gSr)rrr r r r get_inputs+szinstall_headers.get_inputscCs|jSr)rr r r r get_outputs.szinstall_headers.get_outputsN) __name__ __module__ __qualname__Z descriptionZ user_optionsZboolean_optionsr rrrrr r r r r s rN)__doc__Zdistutils.corerrr r r r s __pycache__/register.cpython-38.opt-1.pyc000064400000020411152345030560014170 0ustar00U e5d-@sddZddlZddlZddlZddlZddlmZddlm Z ddl Tddl m Z Gddde Z dS) zhdistutils.command.register Implements the Distutils 'register' command (register with the repository). N)warn) PyPIRCCommand)*)logc@seZdZdZejddgZejdddgZddd fgZd d Zd d Z ddZ ddZ ddZ ddZ ddZddZddZdddZdS) 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 compliantverifyrrcheckcCsdS)NTselfr r 2/usr/lib64/python3.8/distutils/command/register.pyzregister.cCst|d|_d|_dS)Nr)rinitialize_optionslist_classifiersrr r r rrs zregister.initialize_optionscCs*t|d|jfdd}||jjd<dS)Nr)r)rrestructuredtextr )rfinalize_optionsr distributionZcommand_options)r Z check_optionsr r rr$s  zregister.finalize_optionscCsT|||D]}||q|jr8|n|jrH|n|dS)N) r _set_configZget_sub_commandsZ run_commandZdry_runverify_metadatar classifiers send_metadata)r Zcmd_namer r rrun+s    z register.runcCs8tdt|jd}||j|_d|_|dS)zDeprecated API.zddistutils.command.register.check_metadata is deprecated, use the check command insteadr rN)rPendingDeprecationWarningrZget_command_objZensure_finalizedrrr)r r r r rcheck_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. usernamepassword repositoryrealmTZpypiz%s not found in .pypircFN)Z _read_pypircrrr r! has_configZDEFAULT_REPOSITORY ValueError)r Zconfigr r rrDs     zregister._set_configcCs*|jd}tj|}t||dS)z8 Fetch the list of classifiers from the server. z?:action=list_classifiersN)r urllibrequestZurlopenrinfo_read_pypi_response)r ZurlZresponser r rrUs  zregister.classifierscCs&||d\}}td||dS)zF Send the metadata to the package index server to be checked. r Server response (%s): %sN)post_to_serverbuild_post_datarr&)r coderesultr r rr\szregister.verify_metadatac Cs|jrd}|j}|j}n d}d}}d}||krd|dtjt}|sRd}q,||kr,tdq,|dkrl|s|td}qn|st d}q|t j }t j |jd }||j|||||d |\}}|d ||ftj|d kr|jr||j_nf|d tj|d|tjd}|dkrNtd}|s*d}q*|dkr|||nl|dkrddi} d| d<| d<| d<d| d<| dstd| d<q| d| dkr0| dst d| d<q| dst d| d<q| d| dkrd| d<d| d<tdq| dsJtd| d<q0|| \}}|d krrtd ||ntdtd nP|d!krdd"i} d| d<| dstd#| d<q|| \}}td ||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. 1xz1 2 3 4zWe 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)?ny2:actionusernamerZemailNZconfirmz 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"rrsplitannouncerINFOinputprintgetpassr$r%ZHTTPPasswordMgrparseZurlparser Z add_passwordr!r)r*rZ _get_rc_filelowerZ _store_pypircr&) r ZchoicerrchoicesauthZhostr+r,datar r rrcs                   zregister.send_metadatacCs|jj}|d|||||||| | | | | |||d}|ds|ds|drd|d<|S)Nz1.0)r5metadata_versionr7versionZsummaryZ home_pageZauthorZ author_emaillicense descriptionkeywordsplatformrZ download_urlprovidesrequires obsoletesrJrKrLz1.1rD)rZmetadataZget_nameZ get_versionZget_descriptionZget_urlZ get_contactZget_contact_emailZ get_licenceZget_long_descriptionZ get_keywordsZ get_platformsZget_classifiersZget_download_urlZ get_providesZ get_requiresZ get_obsoletes)r actionmetarCr r rr*s,zregister.build_post_dataNc Csd|kr$|d|d|jftjd}d|}|d}t}|D]~\}}t|tgtdfkrn|g}|D]R}t|}| || d|| d| ||rr|d d krr| d qrqH| || d | d }d |tt |d} t j|j|| } t jt jj|d} d}z| | } Wnxt jjk r} z"|jrd| j}| j| jf} W5d} ~ XYnJt jjk r} zdt| f} W5d} ~ XYnX|jr|| }d} |jrd d|df}||tj| S)zC Post a query to the server, and return a string response. r7zRegistering %s to %sz3--------------GHSKFJDLGDS7543FJKLFHRE75642756743254z --z--r z* 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;ioStringIOitemstypestrwritegetvalueencodelenr$r%ZRequestZ build_openerZHTTPBasicAuthHandleropenerrorZ HTTPErrorZ show_responsefpreadr+msgZURLErrorr'join)r rCrBboundaryZ sep_boundaryZ end_boundaryZbodykeyvalueZheadersZreqZopenerr,er_r r rr)s^          zregister.post_to_server)N)__name__ __module__ __qualname__rGrZ user_optionsZboolean_optionsZ sub_commandsrrrrrrrrr*r)r r r rrs* zr)__doc__r>rRZ urllib.parser$Zurllib.requestwarningsrZdistutils.corerZdistutils.errorsZ distutilsrrr r r rs   __pycache__/install_lib.cpython-38.opt-1.pyc000064400000011773152345030560014653 0ustar00U e5d @sLdZddlZddlZddlZddlmZddlmZdZ GdddeZ dS)zkdistutils.command.install_lib Implements the Distutils 'install_lib' command (install all Python modules).N)Command)DistutilsOptionErrorz.pyc@seZdZdZdddddddgZd d d gZd d iZd dZddZddZ ddZ ddZ ddZ ddZ ddZddZdd 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))forcefz-force installation (overwrite existing files))compileczcompile .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 r cCs(d|_d|_d|_d|_d|_d|_dS)Nr) install_dir build_dirrr optimize skip_buildselfr5/usr/lib64/python3.8/distutils/command/install_lib.pyinitialize_options3s zinstall_lib.initialize_optionsc Cs|ddddddd|jdkr&d|_|jdkr6d |_t|jtszt|j|_|jd kr^tWn ttfk rtd YnXdS) Ninstall) build_libr)rr)rr)r r )rr)rrTF)rzoptimize must be 0, 1, or 2)Zset_undefined_optionsr r isinstanceintAssertionError ValueErrorrrrrrfinalize_options<s&     zinstall_lib.finalize_optionscCs0||}|dk r,|jr,||dSN)buildr distributionhas_pure_modules byte_compilerZoutfilesrrrrunVszinstall_lib.runcCs2|js.|jr|d|jr.|ddS)Nbuild_py build_ext)rr"r#Z run_commandhas_ext_modulesrrrrr!fs    zinstall_lib.buildcCs8tj|jr ||j|j}n|d|jdS|S)Nz3'%s' does not exist -- no Python modules to install)ospathisdirrZ copy_treerwarnr%rrrrmszinstall_lib.installcCsrtjr|ddSddlm}|dj}|jrH||d|j||j d|j dkrn|||j |j||j |j ddS)Nz%byte-compiling is disabled, skipping.r)r$r)rrprefixdry_run)rrr.verboser/) sysdont_write_bytecoder-Zdistutils.utilr$get_finalized_commandrootr rr/rr0)rfilesr$Z install_rootrrrr$vs$    zinstall_lib.byte_compilec Csd|sgS||}|}t||}t|ttj}g}|D] } |tj|| |dq>|Sr ) r3 get_outputsgetattrlenr*sepappendr+join) rZhas_anyZ build_cmdZ cmd_optionZ output_dirZ build_filesr prefix_lenZoutputsfilerrr_mutate_outputss  zinstall_lib._mutate_outputscCsrg}|D]d}tjtj|d}|tkr.q|jrJ|tjj |dd|j dkr|tjj ||j dq|S)Nr) optimizationr) r*r+splitextnormcasePYTHON_SOURCE_EXTENSIONr r: importlibutilcache_from_sourcer)rZ py_filenamesZbytecode_filesZpy_fileZextrrr_bytecode_filenamess     zinstall_lib._bytecode_filenamescCsR||jdd|j}|jr*||}ng}||jdd|j}|||S)zReturn 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_outputsZ ext_outputsrrrr6s    zinstall_lib.get_outputscCsLg}|jr&|d}|||jrH|d}|||S)zGet 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#r3extendr6r))rZinputsr'r(rrr get_inputss    zinstall_lib.get_inputsN)__name__ __module__ __qualname__Z descriptionZ user_optionsZboolean_optionsZ negative_optrrr&r!rr$r>rGr6rIrrrrrs*   r) __doc__r*importlib.utilrDr1Zdistutils.corerZdistutils.errorsrrCrrrrrs  __pycache__/install.cpython-38.opt-2.pyc000064400000030624152345030560014022 0ustar00U &.ej@sddlZddlZddlmZddlmZddlmZddlm Z ddl m Z ddl m Z ddlmZmZmZdd lmZdd l mZdd lmZdd lmZd ZddddddZddddddddddddedZerdddddded<ddd d!dded"<dZGd#d$d$eZdS)%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)purelibplatlibheadersscriptsdataz/$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_homentz $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 d d d ddddddgZdddgZer`edddefedddiZ ddZ ddZ dd Z d!d"Z d#d$Zd%d&Zd'd(Zd)d*Zd+d,Zd-d.Zd/d0Zd1d2Zd3d4Zd5d6Zd7d8Zd9d:Zd;d<Zd=d>Zd?d@ZdAdBZdCdDZdEefdFefdGefdHefdIdJdKfgZdS)Linstallz'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=Nzr)r%r&r+r(r)r*r,r-r r r.r select_schemer$r"r#hasattrrM base_prefixrGenvironr\normpath)r9Zadditionr:r:r;rKsZ          zinstall.finalize_unixcCs|jr8|jdkrtd|j|_|_|tjdn|jdk r\|j|_|_|dn\|j dkrvtj t j |_ |j |_|_z|tjWn"t k rtdtjYnXdS)NrmZ_userrz)I don't know how to install stuff on '%s')r r.rr%r&rorGrHr$r"r\rsrMKeyErrorr8r:r:r;rLs&    zinstall.finalize_othercCs<t|}tD]*}d|}t||dkr t||||q dSNZinstall_)INSTALL_SCHEMES SCHEME_KEYSrisetattr)r9rHZschemekeyattrnamer:r:r;ros zinstall.select_schemecCsX|D]N}t||}|dk rtjdks.tjdkr:tj|}t||j}t|||qdS)Nr=r)rirGrHr\ expanduserr rSrx)r9attrsattrrlr:r:r; _expand_attrss   zinstall._expand_attrscCs|dddgdS)Nr%r&r'r~r8r:r:r;rUszinstall.expand_basedirscCs|ddddddgdS)Nr(r)r+r*r,r-rr8r:r:r;rWs zinstall.expand_dirscGs,|D]"}d|}t||tt||qdSru)rxrrir9namesrHr}r:r:r;rYszinstall.convert_pathscCs|jdkr|jj|_|jdk rtdt|jtrB|jd|_t|jdkr`|jd}}n"t|jdkrz|j\}}ntdt |}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 isinstancestrrOlenr r path_filer^)r9rr^r:r:r;rZs(      zinstall.handle_extra_pathc Gs0|D]&}d|}t||t|jt||qdSru)rxr r'rirr:r:r;r_szinstall.change_rootscCsb|js dSttjd}|jD]8\}}||r$tj|s$| d|t |dq$dS)N~zos.makedirs('%s', 0o700)i) r rrGr\r{rSitems startswithisdirZ debug_printmakedirs)r9r$rHr\r:r:r;rXszinstall.create_home_pathcCs"|js6|d|jdj}|jr6|tkr6td|D]}||q>|j r\| |j r| }|j rt|j }tt|D]}|||d||<q|t|j |fd|j ttjjtj}ttjj|}tjtj|j}|jr|j r|js||krtd|jdS)NrFz"Can't install when cross-compilingz'writing list of installed files to '%s'zmodules installed to '%s', which is not in Python's module search path (sys.path) -- you'll have to change the search path yourself)r3Z run_commandrQZget_command_objZ plat_namer4r rget_sub_commandsrcreate_path_filer7 get_outputsr'rrangeexecutermaprGr\rsrMnormcaser+r2rre)r9Z build_platcmd_nameoutputsZroot_lenZcounterZsys_pathr+r:r:r;run(sD    z install.runcCsJtj|j|jd}|jr8|t||jgfd|n| d|dS)N.pthz creating %szpath file '%s' not created) rGr\r]r[rr2rrr^rI)r9filenamer:r:r;rTs  zinstall.create_path_filecCshg}|D].}||}|D]}||kr"||q"q |jrd|jrd|tj|j |jd|S)Nr) rget_finalized_commandrappendrr2rGr\r]r[)r9rrcmdrr:r:r;rbs    zinstall.get_outputscCs.g}|D]}||}||q |SN)rrextend get_inputs)r9Zinputsrrr:r:r;rss   zinstall.get_inputscCs|jp|jSr)rQZhas_pure_modulesZhas_ext_modulesr8r:r:r;has_libs zinstall.has_libcCs |jSr)rQ has_headersr8r:r:r;rszinstall.has_headerscCs |jSr)rQ has_scriptsr8r:r:r;rszinstall.has_scriptscCs |jSr)rQZhas_data_filesr8r:r:r;has_dataszinstall.has_datar+r*r,r-Zinstall_egg_infocCsdS)NTr:r8r:r:r;zinstall.) __name__ __module__ __qualname__Z descriptionrfZboolean_optionsrTrrrgr<r`rJrKrLror~rUrWrYrZr_rXrrrrrrrrZ sub_commandsr:r:r:r;rIsn ;  N3  " ,  r)rMrGZ distutilsrZdistutils.corerZdistutils.debugrZdistutils.sysconfigrZdistutils.errorsrZdistutils.file_utilrZdistutils.utilrr r r r Zsiter rrTZWINDOWS_SCHEMErvrwrr:r:r:r;s`             __pycache__/config.cpython-38.opt-1.pyc000064400000023765152345030560013630 0ustar00U e5d=3@sldZddlZddlZddlmZddlmZddlmZddl m Z ddd Z Gd d d eZ dd d Z dS)adistutils.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 @seZdZdZdddddddd d g Zd d Zd dZddZddZddZ ddZ ddZ ddZ ddZ d0dd Zd1d!d"Zd2d#d$Zd3d%d&Zd4d'd(Zd5d*d+Zdddgfd,d-Zd6d.d/ZdS)7configzprepare 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)z dump-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_filesselfr0/usr/lib64/python3.8/distutils/command/config.pyinitialize_options3szconfig.initialize_optionscCs|jdkr|jjpg|_nt|jtr6|jtj|_|jdkrHg|_nt|jtr^|jg|_|jdkrpg|_nt|jtr|jtj|_dSN) rZ distribution isinstancestrsplitospathseprrrrrrfinalize_optionsBs       zconfig.finalize_optionscCsdSrrrrrrrunRsz config.runcCszddlm}m}t|j|sv||j|jdd|_t|j|jrN|j|j|j rb|j |j |j rv|j |j dS)z^Check that 'self.compiler' really is a CCompiler object; if not, make it one. r) CCompiler new_compilerr)rdry_runZforceN) distutils.ccompilerr"r#rrr$rrZset_include_dirsrZ set_librariesrZset_library_dirs)rr"r#rrr_check_compilerYs  zconfig._check_compilerc Csldt|}t|dL}|r>|D]}|d|q |d|||ddkr^|dW5QRX|S)NZ _configtestwz#include <%s>  )LANG_EXTopenwrite)rbodyheaderslangfilenamefileheaderrrr_gen_temp_sourcefileks     zconfig._gen_temp_sourcefilecCs<||||}d}|j||g|jj|||d||fS)Nz _configtest.ir)r3rextendrZ preprocess)rr-r.rr/srcoutrrr _preprocessws zconfig._preprocesscCs\||||}|jr"t|d||j|g\}|j||g|jj|g|d||fS)Nzcompiling '%s':r4)r3r dump_filerZobject_filenamesrr5compile)rr-r.rr/r6objrrr_compile~szconfig._compilec Csr|||||\}}tjtj|d} |jj|g| |||d|jjdk r\| |jj} |j | ||| fS)Nr)rrZ target_lang) r<rpathsplitextbasenamerZlink_executableZ exe_extensionrappend) rr-r.rrrr/r6r;progrrr_links    z config._linkc GsT|s|j}g|_tdd||D](}zt|Wq&tk rLYq&Xq&dS)Nz removing: %s )rrinfojoinrremoveOSError)r filenamesr0rrr_cleansz 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&r8rIrr-r.rr/rKokrrrtry_cpps  zconfig.try_cppc Csx||||||\}}t|tr0t|}t|.}d} |} | dkrPqb|| r>d} qbq>W5QRX| | S)aConstruct 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. FT) r&r8rrrer:r+readlinesearchrI) rpatternr-r.rr/r6r7r1matchlinerrr search_cpps     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. rrJTFsuccess!failure.)r%rKr&r<rrDrIrLrrr try_compiles  zconfig.try_compilec Cspddlm}m}|z|||||||d} Wn||fk rPd} YnXt| r^dp`d|| S)zTry to compile and link a source file, built from 'body' and 'headers', to executable form. Return true on success, false otherwise. rrK LinkErrorTFrWrX)r%rKr[r&rBrrDrI) rr-r.rrrr/rKr[rMrrrtry_links  zconfig.try_linkc Csddlm}m}|z.|||||||\} } } || gd} Wn||tfk rdd} YnXt| rrdptd| | S)zTry 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;ZexerMrrrtry_runs    zconfig.try_runrc Cst|g}|r|d||d|r<|d|n|d||dd|d}||||||S)aDetermine 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\) rfuncr.rrrZdeclZcallr-rrr check_funcs   zconfig.check_funccCs ||d|||g||S)aDetermine 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|dS)zDetermine 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__Z descriptionZ user_optionsrr r!r&r3r8r<rBrIrNrVrYr\r]r`rarbrrrrrs\         rcCsJ|dkrtd|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+closeread)r0headr1rrrr9Ks r9)N)__doc__rrPZdistutils.corerZdistutils.errorsrZdistutils.sysconfigrZ distutilsrr*rr9rrrrs      8__pycache__/upload.cpython-38.pyc000064400000012100152345030560012665 0ustar00U &.e@sdZddlZddlZddlZddlZddlmZddlmZm Z m Z ddl m Z ddl mZmZddlmZddlmZdd lmZGd d d eZdS) zm distutils.command.upload Implements the Distutils 'upload' subcommand (upload package to a package index). N)standard_b64encode)urlopenRequest HTTPError)urlparse)DistutilsErrorDistutilsOptionError) PyPIRCCommand)spawn)logc@sJeZdZdZejddgZejdgZddZddZd d Z d d Z d S)uploadzupload binary package to PyPI)signszsign files to upload using gpg)z identity=izGPG identity used to sign filesr cCs,t|d|_d|_d|_d|_d|_dS)NrF)r initialize_optionsusernamepassword show_responser identity)selfr0/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 repositoryrealm) 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)rmsgcommand pyversionfilenamerrrrun: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 } d d | | tj|| f||t| d | | | | | | | | | | | | | d}zt!| }WnPt"k r}z0d|}|#|t$j%ddl&m'}|s|W5d}~XYn X||d<d|d<|jrt|dd "} tj|d| f|d<W5QRX|j(d|j)*d}dt+|,d}d}d|*d}|d}t-.}|/D]\}}d|}t0|t1sP|g}|D]j}t2|t3kr|d|d7}|d}nt4|*d }|5||5|*d |5d!|5|qTq.|5||6}d"||jf}|#|t$j%d#|t4t7||d$}t8|j||d%}zt9|}|:}|j;} Wnftk r}z|#t4|t$j?W5d}~XYnX|d&kr|#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_runrbZ file_upload1z1.0)z:actionZprotocol_versionnameversioncontentZfiletyper Z sha256_digestZmetadata_versionZsummaryZ home_pageZauthorZ author_emaillicense descriptionkeywordsplatformZ classifiersZ 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)dataheaderszServer response (%s): %s zK---------------------------------------------------------------------------zUpload failed (%s): %s)DrrAssertionErrorr rr r$openclosereadrZmetadataZget_nameZ get_versionospathbasenamehashlibZsha256Z hexdigestZget_descriptionZget_urlZ get_contactZget_contact_emailZ get_licenceZget_long_descriptionZ get_keywordsZ get_platformsZget_classifiersZget_download_urlZ get_providesZ get_requiresZ get_obsoletesZmd5 ValueErrorZannouncer INFOZ_hashlibr.rrencoderdecodeioBytesIOitems isinstancelisttypetuplestrwritegetvaluelenrrZgetcoderrcodeOSErrorZERRORrZ_read_pypi_responsejoinr)"rrr r!ZschemaZnetlocZurlZparamsZqueryZ fragmentsZgpg_argsfr)metar2Zdigesterr.Z user_passZauthboundaryZ sep_boundaryZ end_boundaryZbodykeyvaluetitler3ZrequestresultZstatusreasontextrrrrBs       !           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 distutilsr r rrrrs     __pycache__/build_py.cpython-38.opt-2.pyc000064400000022002152345030560014152 0ustar00U e5d&C@svddlZddlZddlZddlZddlmZddlTddlm Z m Z ddl m Z GdddeZ Gdd d e e ZdS) N)Command)*) convert_path Mixin2to3)logc@seZdZdZdddddgZddgZd diZd d Zd d ZddZ ddZ ddZ ddZ ddZ ddZddZddZddZd d!Zd"d#Zd$d%Zd2d'd(Zd)d*Zd+d,Zd-d.Zd/d0Zd1S)3build_pyz5"build" pure Python modules (copy to build directory))z build-lib=dzdirectory to "build" (copy) to)compileczcompile .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])forcefz2forcibly build everything (ignore file timestamps)r r r cCs4d|_d|_d|_d|_d|_d|_d|_d|_dS)Nr) build_lib py_modulespackage package_data package_dirr optimizer selfr2/usr/lib64/python3.8/distutils/command/build_py.pyinitialize_options szbuild_py.initialize_optionsc Cs|ddd|jj|_|jj|_|jj|_i|_|jjr^|jjD]\}}t||j|<qF||_ t |j t szt |j |_ Wn t tfk rtdYnXdS)NZbuild)rr)r r zoptimize must be 0, 1, or 2)Zset_undefined_options distributionpackagesrrritemsrget_data_files data_files isinstancerint ValueErrorAssertionErrorZDistutilsOptionError)rnamepathrrrfinalize_options*s$      zbuild_py.finalize_optionscCs:|jr||jr$||||jdddSNr)include_bytecode)r build_modulesrbuild_packagesbuild_package_data byte_compile get_outputsrrrrrunCs z build_py.runcsg}|js|S|jD]h}||}tjj|jg|d}d|rPt|dfdd|||D}| ||||fq|S)N.rcsg|]}|dqSNr).0fileZplenrr ssz+build_py.get_data_files..) rget_package_dirosr$joinrsplitlenfind_data_filesappend)rdatarsrc_dir build_dir filenamesrr3rras     zbuild_py.get_data_filescsd|jdg|j|g}g|D]:}ttjt|t|}fdd|Dq$S)Ncs$g|]}|krtj|r|qSr)r6r$isfile)r1fnfilesrrr4s z,build_py.find_data_files..) rgetglobr6r$r7escaperextend)rrr=ZglobspatternZfilelistrrCrr:ys  zbuild_py.find_data_filescCs`d}|jD]P\}}}}|D]>}tj||}|tj||jtj|||ddqq dS)NFZ preserve_mode)rr6r$r7mkpathdirname copy_file)rZlastdirrr=r>r?filenametargetrrrr*szbuild_py.build_package_datacCs|d}|js&|r tjj|SdSng}|rz|jd|}Wn*tk rl|d|d|d=Yq*X|d|tjj|Sq*|jd}|dk r|d||rtjj|SdSdS)Nr.r@r)r8rr6r$r7KeyErrorinsertrE)rrr$tailZpdirrrrr5s(       zbuild_py.get_package_dircCsj|dkr8tj|s td|tj|s8td||rftj|d}tj|rZ|Std|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$existsZDistutilsFileErrorisdirr7rArwarn)rrrinit_pyrrr check_packages&   zbuild_py.check_packagecCs&tj|std||dSdSdS)Nz!file %s (for module %s) not foundFT)r6r$rArrV)rmodule module_filerrr check_modules zbuild_py.check_modulec Cs|||ttjt|d}g}tj|jj}|D]P}tj|}||krtj tj |d}| |||fq>| d|q>|S)Nz*.pyrz excluding %s) rXrFr6r$r7rGabspathrZ script_namesplitextbasenamer;Z debug_print) rrrZ module_filesmodulesZ setup_scriptrZabs_frYrrrfind_package_moduless  zbuild_py.find_package_modulesc Csi}g}|jD]}|d}d|dd}|d}z||\}}Wn"tk rh||}d}YnX|s|||} |df||<| r||d| ftj||d} | || sq|||| fq|S)Nr.rrPr/__init__.py) rr8r7rQr5rXr;r6r$r[) rrr_rYr$rZ module_basercheckedrWrZrrr find_moduless*       zbuild_py.find_modulescCsNg}|jr|||jrJ|jD]$}||}|||}||q$|Sr0)rrHrdrr5r`)rr_rrmrrrfind_all_moduless    zbuild_py.find_all_modulescCsdd|DS)NcSsg|] }|dqS)rPr)r1rYrrrr4-sz-build_py.get_source_files..)rfrrrrget_source_files,szbuild_py.get_source_filescCs$|gt||dg}tjj|S)Nrb)listr6r$r7)rr>rrYZ outfile_pathrrrget_module_outfile/szbuild_py.get_module_outfiler/cCs|}g}|D]p\}}}|d}||j||}|||r|jr^|tjj|dd|j dkr|tjj||j dq|dd|j D7}|S)Nr.r@) optimizationrcSs,g|]$\}}}}|D]}tj||qqSr)r6r$r7)r1rr=r>r?rNrrrr4Bs z(build_py.get_outputs..) rfr8rirr;r importlibutilcache_from_sourcerr)rr'r_ZoutputsrrYrZrNrrrr,3s*      zbuild_py.get_outputscCsbt|tr|d}nt|ttfs,td||j||}tj |}| ||j ||ddS)Nr.z:'package' must be a string (dot-separated), list, or tuplerrJ) rstrr8rhtuple TypeErrorrirr6r$rLrKrM)rrYrZrZoutfiledirrrr 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_packagescCstjr|ddSddlm}|j}|dtjkr>|tj}|jrZ||d|j ||j d|j dkr||||j |j ||j ddS)Nz%byte-compiling is disabled, skipping.r)r+rP)rr prefixdry_run) sysdont_write_bytecoderVdistutils.utilr+rr6sepr r rtr)rrDr+rsrrrr+vs&    zbuild_py.byte_compileN)r/)__name__ __module__ __qualname__Z descriptionZ user_optionsZboolean_optionsZ negative_optrr%r-rr:r*r5rXr[r`rdrfrgrir,rrr(r)r+rrrrrs8    '4  rc@seZdZddZddZdS) build_py_2to3cCsLg|_|jr||jr*||||j||jdddSr&) updated_filesrr(rr)r*Zrun_2to3r+r,rrrrr-s zbuild_py_2to3.runcCs,t||||}|dr(|j|d|S)Nr/r)rrrr}r;)rrYrZrresrrrrrszbuild_py_2to3.build_moduleN)ryrzr{r-rrrrrrr|sr|)r6importlib.utilrkrurFZdistutils.corerZdistutils.errorsrwrrZ distutilsrrr|rrrrs  }__pycache__/install.cpython-38.pyc000064400000032663152345030560013067 0ustar00U &.ej@sdZddlZddlZddlmZddlmZddlmZddl m Z ddl m Z ddl mZdd lmZmZmZdd lmZdd l mZdd lmZdd lmZdZddddddZddddddddddddedZerdddddded <ddd!d"dded#<dZGd$d%d%eZdS)&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)purelibplatlibheadersscriptsdataz/$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_homentz $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 d d d ddddddgZdddgZer`edddefedddiZ ddZ ddZ dd Z d!d"Z d#d$Zd%d&Zd'd(Zd)d*Zd+d,Zd-d.Zd/d0Zd1d2Zd3d4Zd5d6Zd7d8Zd9d:Zd;d<Zd=d>Zd?d@ZdAdBZdCdDZdEefdFefdGefdHefdIdJdKfgZdS)Linstallz'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=Nzr)r%r&r+r(r)r*r,r-r r r.r select_schemer$r"r#hasattrrM base_prefixrGenvironr\normpath)r9Zadditionr:r:r;rKsZ          zinstall.finalize_unixcCs|jr8|jdkrtd|j|_|_|tjdn|jdk r\|j|_|_|dn\|j dkrvtj t j |_ |j |_|_z|tjWn"t k rtdtjYnXdS)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\rsrMKeyErrorr8r:r:r;rLs&    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_KEYSrisetattr)r9rHZschemekeyattrnamer:r:r;ros zinstall.select_schemecCsX|D]N}t||}|dk rtjdks.tjdkr:tj|}t||j}t|||qdS)Nr=r)rirGrHr\ expanduserr rSrx)r9attrsattrrlr:r:r; _expand_attrss   zinstall._expand_attrscCs|dddgdS)zNCalls `os.path.expanduser` on install_base, install_platbase and root.r%r&r'Nr~r8r:r:r;rUszinstall.expand_basedirscCs|ddddddgdS)z+Calls `os.path.expanduser` on install dirs.r(r)r+r*r,r-Nrr8r:r:r;rWs zinstall.expand_dirscGs,|D]"}d|}t||tt||qdS)z!Call `convert_path` over `names`.ruN)rxrrir9namesrHr}r:r:r;rYszinstall.convert_pathscCs|jdkr|jj|_|jdk rtdt|jtrB|jd|_t|jdkr`|jd}}n"t|jdkrz|j\}}ntdt |}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 isinstancestrrOlenr r path_filer^)r9rr^r:r:r;rZs(      zinstall.handle_extra_pathc Gs0|D]&}d|}t||t|jt||qdS)z:Change the install directories pointed by name using root.ruN)rxr r'rirr:r:r;r_szinstall.change_rootscCsb|js dSttjd}|jD]8\}}||r$tj|s$| d|t |dq$dS)zCreate directories under ~.N~zos.makedirs('%s', 0o700)i) r rrGr\r{rSitems startswithisdirZ debug_printmakedirs)r9r$rHr\r:r:r;rXszinstall.create_home_pathcCs"|js6|d|jdj}|jr6|tkr6td|D]}||q>|j r\| |j r| }|j rt|j }tt|D]}|||d||<q|t|j |fd|j ttjjtj}ttjj|}tjtj|j}|jr|j r|js||krtd|jdS)zRuns the command.rFz"Can't install when cross-compilingNz'writing list of installed files to '%s'zmodules installed to '%s', which is not in Python's module search path (sys.path) -- you'll have to change the search path yourself)r3Z run_commandrQZget_command_objZ plat_namer4r rget_sub_commandsrcreate_path_filer7 get_outputsr'rrangeexecutermaprGr\rsrMnormcaser+r2rre)r9Z build_platcmd_nameoutputsZroot_lenZcounterZsys_pathr+r:r:r;run(sD    z install.runcCsJtj|j|jd}|jr8|t||jgfd|n| d|dS)zCreates the .pth file.pthz creating %szpath file '%s' not createdN) rGr\r]r[rr2rrr^rI)r9filenamer:r:r;rTs  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) rget_finalized_commandrappendrr2rGr\r]r[)r9rrcmdrr:r:r;rbs    zinstall.get_outputscCs.g}|D]}||}||q |S)z*Returns the inputs of all the sub-commands)rrextend get_inputs)r9Zinputsrrr:r:r;rss   zinstall.get_inputscCs|jp|jS)zSReturns true if the current distribution has any Python modules to install.)rQZhas_pure_modulesZhas_ext_modulesr8r:r:r;has_libs zinstall.has_libcCs |jS)zLReturns true if the current distribution has any headers to install.)rQ has_headersr8r:r:r;rszinstall.has_headerscCs |jS)zMReturns true if the current distribution has any scripts to. install.)rQ has_scriptsr8r:r:r;rszinstall.has_scriptscCs |jS)zJReturns true if the current distribution has any data to. install.)rQZhas_data_filesr8r:r:r;has_dataszinstall.has_datar+r*r,r-Zinstall_egg_infocCsdS)NTr:r8r:r:r;zinstall.) __name__ __module__ __qualname__Z descriptionrfZboolean_optionsrTrrrgr<r`rJrKrLror~rUrWrYrZr_rXrrrrrrrrZ sub_commandsr:r:r:r;rIsn ;  N3  " ,  r)__doc__rMrGZ distutilsrZdistutils.corerZdistutils.debugrZdistutils.sysconfigrZdistutils.errorsrZdistutils.file_utilrZdistutils.utilrr r r r Zsiter rrTZWINDOWS_SCHEMErvrwrr:r:r:r;sb             __pycache__/config.cpython-38.opt-2.pyc000064400000015355152345030560013625 0ustar00U e5d=3@shddlZddlZddlmZddlmZddlmZddlm Z dddZ Gd d d eZ d d d Z dS)N)Command)DistutilsExecError)customize_compiler)logz.cz.cxx)czc++c @seZdZdZdddddddd d g Zd d Zd dZddZddZddZ ddZ ddZ ddZ ddZ d0dd Zd1d!d"Zd2d#d$Zd3d%d&Zd4d'd(Zd5d*d+Zdddgfd,d-Zd6d.d/ZdS)7configzprepare 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)z dump-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_filesselfr0/usr/lib64/python3.8/distutils/command/config.pyinitialize_options3szconfig.initialize_optionscCs|jdkr|jjpg|_nt|jtr6|jtj|_|jdkrHg|_nt|jtr^|jg|_|jdkrpg|_nt|jtr|jtj|_dSN) rZ distribution isinstancestrsplitospathseprrrrrrfinalize_optionsBs       zconfig.finalize_optionscCsdSrrrrrrrunRsz config.runcCszddlm}m}t|j|sv||j|jdd|_t|j|jrN|j|j|j rb|j |j |j rv|j |j dS)Nr) CCompiler new_compilerr)rdry_runZforce) distutils.ccompilerr"r#rrr$rrZset_include_dirsrZ set_librariesrZset_library_dirs)rr"r#rrr_check_compilerYs  zconfig._check_compilerc Csldt|}t|dL}|r>|D]}|d|q |d|||ddkr^|dW5QRX|S)NZ _configtestwz#include <%s>  )LANG_EXTopenwrite)rbodyheaderslangfilenamefileheaderrrr_gen_temp_sourcefileks     zconfig._gen_temp_sourcefilecCs<||||}d}|j||g|jj|||d||fS)Nz _configtest.ir)r3rextendrZ preprocess)rr-r.rr/srcoutrrr _preprocessws zconfig._preprocesscCs\||||}|jr"t|d||j|g\}|j||g|jj|g|d||fS)Nzcompiling '%s':r4)r3r dump_filerZobject_filenamesrr5compile)rr-r.rr/r6objrrr_compile~szconfig._compilec Csr|||||\}}tjtj|d} |jj|g| |||d|jjdk r\| |jj} |j | ||| fS)Nr)rrZ target_lang) r<rpathsplitextbasenamerZlink_executableZ exe_extensionrappend) rr-r.rrrr/r6r;progrrr_links    z config._linkc GsT|s|j}g|_tdd||D](}zt|Wq&tk rLYq&Xq&dS)Nz removing: %s )rrinfojoinrremoveOSError)r filenamesr0rrr_cleansz config._cleanNrcCsRddlm}|d}z|||||Wn|k rDd}YnX||S)Nr CompileErrorTF)r%rKr&r8rIrr-r.rr/rKokrrrtry_cpps  zconfig.try_cppc Csx||||||\}}t|tr0t|}t|.}d} |} | dkrPqb|| r>d} qbq>W5QRX| | S)NFT) r&r8rrrer:r+readlinesearchrI) rpatternr-r.rr/r6r7r1matchlinerrr search_cpps     zconfig.search_cppcCsdddlm}|z|||||d}Wn|k rDd}YnXt|rRdpTd||S)NrrJTFsuccess!failure.)r%rKr&r<rrDrIrLrrr try_compiles  zconfig.try_compilec Cspddlm}m}|z|||||||d} Wn||fk rPd} YnXt| r^dp`d|| SNr)rK LinkErrorTFrWrX)r%rKr[r&rBrrDrI) rr-r.rrrr/rKr[rMrrrtry_links  zconfig.try_linkc Csddlm}m}|z.|||||||\} } } || gd} Wn||tfk rdd} YnXt| rrdptd| | SrZ) r%rKr[r&rBZspawnrrrDrI) rr-r.rrrr/rKr[r6r;ZexerMrrrtry_runs    zconfig.try_runrc Cst|g}|r|d||d|r<|d|n|d||dd|d}||||||S)Nz int %s ();z int main () {z %s();z %s;}r()r&r@rEr\) rfuncr.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|dS)Nz /* No body */)r-r.r)rN)rr2rrr/rrr check_headerBs zconfig.check_header)NNNr)NNNr)NNr)NNNNr)NNNNr)NNNNrr)NNr)__name__ __module__ __qualname__Z descriptionZ user_optionsrr r!r&r3r8r<rBrIrNrVrYr\r]r`rarbrrrrrs\         rcCsJ|dkrtd|n t|t|}zt|W5|XdS)Nz%s)rrDr+closeread)r0headr1rrrr9Ks r9)N) rrPZdistutils.corerZdistutils.errorsrZdistutils.sysconfigrZ distutilsrr*rr9rrrr s     8__pycache__/clean.cpython-38.pyc000064400000004066152345030560012477 0ustar00U e5d @sDdZddlZddlmZddlmZddlmZGdddeZdS)zBdistutils.command.clean Implements the Distutils 'clean' command.N)Command) remove_tree)logc@s>eZdZdZddddddgZdgZd d Zd d Zd dZdS)cleanz-clean up temporary files from 'build' command)z build-base=bz2base build directory (default: 'build.build-base'))z build-lib=Nzs    __pycache__/build_ext.cpython-38.opt-2.pyc000064400000033546152345030560014341 0ustar00U e5dP{@sddlZddlZddlZddlZddlmZddlTddlmZm Z ddlm Z ddl m Z ddl mZddlmZdd lmZdd lmZed Zd d ZGdddeZdS)N)Command)*)customize_compilerget_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)Nrshow_compilers)distutils.ccompilerr r r3/usr/lib64/python3.8/distutils/command/build_ext.pyr s r c@seZdZdZdejZdddddefdd d d efd d ddddefddddddddddgZddddd gZ d!d"d#e fgZ d$d%Z d&d'Z d(d)Zd*d+Zd,d-Zd.d/Zd0d1Zd2d3Zd4d5Zejd6d7Zd8d9Zd:d;Zdd?Zd@dAZdBdCZdDdEZdFdGZd"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)z build-temp=tz1directory for temporary files (build by-products)z plat-name=pz>platform name to cross-compile for, if supported (default: %s))inplaceiziignore 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)debuggz'compile/link with debugging information)forcefz2forcibly 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 compilerscCsd|_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_temprpackage include_dirsdefineundef libraries library_dirsrpath link_objectsrr compilerswigswig_cpp swig_optsr%parallelselfrrrinitialize_optionsjs*zbuild_ext.initialize_optionsc Csddlm}|ddddddd d |jdkr8|jj|_|jj|_|}|jd d }|j dkrn|jj pjg|_ t |j t r|j t j|_ tjtjkr|j t jtjd |j | t jj||kr|j | t jj|d|d|jdkrg|_|jdkrg|_nt |jt r:|j t j|_|jdkrNg|_nt |jt rl|j t j|_t jdkrh|jt jtjdtjtjkr|jt jtjd|jrt j|jd|_nt j|jd|_|j t jtt tdd}|r|j||j!dkr*d}n|j!dd}t jtjd}|r\t j||}|j|tj"dddkrtj#$t jtjdr|jt jtjddt%dn |jd|&dr|j's|j|&d n |jd|j(r|j( d!}d"d#|D|_(|j)r4|j) d!|_)|j*dkrHg|_*n|j* d$|_*|j+rt jt,d }t jt,d} t j-|r|j |t j-| r|j| |j| t |j.t rzt/|j.|_.Wnt0k rt1d%YnXdS)&Nr) sysconfigZbuild)r'r')r)r))r2r2)rr)r r )r6r6)r(r()Z plat_specificZincluder.r1ntZlibsZDebugZRelease_homewin32ZPCbuildcygwinbinlibpythonZconfig.Py_ENABLE_SHAREDZLIBDIR,cSsg|] }|dfqS)1r).0Zsymbolrrr sz.build_ext.finalize_options.. zparallel should be an integer)2 distutilsr:Zset_undefined_optionsr* distributionZ ext_packageZ ext_modulesr&Zget_python_incr+ isinstancestrsplitospathsepsys exec_prefixbase_exec_prefixappendpathjoinextendZensure_string_listr.r/r0nameprefixrr)dirnamergetattrr(platform executable startswithrget_config_varZ python_buildr,r-r5r%r isdirr6int ValueErrorZDistutilsOptionError) r8r:Z py_includeZplat_py_includeZ _sys_homesuffixZnew_libZdefinesZ user_includeZuser_librrrfinalize_optionss                           zbuild_ext.finalize_optionscCsjddlm}|jsdS|jrL|d}|j|p:g|j |j ||j |j |j|jd|_ t|j tjdkr|jtkr|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)r2verbosedry_runr r<)#rrgr&rMZhas_c_librariesget_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_objectsbuild_extensions)r8rgrhrZvaluemacrorrrruns@            z build_ext.runc Csvt|tstdt|D]T\}}t|tr0qt|trFt|dkrNtd|\}}td|t|t rvt |s~tdt|t stdt||d}dD]"}| |}|dk rt|||q| d |_d |krtd | d }|rhg|_g|_|D]b} t| tr"t| d ks*tdt| dkrJ|j| dnt| dkr|j| q|||<qdS)Nz:'ext_modules' option must be a list of Extension instanceszMeach 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_objectsextra_compile_argsextra_link_argsr0Zdef_filez9'def_file' element of build info dict no longer supportedmacros)r;rpz9'macros' element of build info dict must be 1- or 2-tupler;r)rNlistDistutilsSetupError enumeratertuplelenr warnrOextension_name_rematchdictgetsetattrruntime_library_dirs define_macros undef_macrosrV) r8r&rextext_nameZ build_infokeyvalrurnrrrcheck_extensions_listVs^        zbuild_ext.check_extensions_listcCs,||jg}|jD]}||jq|SN)rr&rYrq)r8 filenamesrrrrget_source_filess   zbuild_ext.get_source_filescCs2||jg}|jD]}|||jq|Sr)rr&rVget_ext_fullpathrZ)r8Zoutputsrrrr get_outputss   zbuild_ext.get_outputscCs(||j|jr|n|dSr)rr&r6_build_extensions_parallel_build_extensions_serialr7rrrrls  zbuild_ext.build_extensionsc sj}jdkrt}zddlm}Wntk r@d}YnX|dkrVdS||dPfddjD}tj|D]&\}} || W5QRXqW5QRXdS)NTr)ThreadPoolExecutor)Z max_workerscsg|]}j|qSr)Zsubmitbuild_extension)rIrZexecutorr8rrrJsz8build_ext._build_extensions_parallel..) r6rQ cpu_countZconcurrent.futuresr ImportErrorrr&zip_filter_build_errorsresult)r8ZworkersrZfuturesrZfutrrrrs"     z$build_ext._build_extensions_parallelc Cs0|jD]$}||||W5QRXqdSr)r&rr)r8rrrrrs  z"build_ext._build_extensions_serialc csTz dVWnDtttfk rN}z |js*|d|j|fW5d}~XYnXdS)Nz"building extension "%s" failed: %s)ZCCompilerErrorZDistutilsErrorZ CompileErrorZoptionalr{rZ)r8rerrrrs zbuild_ext._filter_build_errorsc CsP|j}|dkst|ttfs*td|jt|}||j}||j}|jslt ||dslt d|jdSt d|j| ||}|jpg}|jdd}|jD]}||fq|jj||j||j|j ||jd}|dd|_|jr||j|jpg}|jp|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+rextra_postargsdepends)r.r/rrexport_symbolsrr)Z target_lang)!rqrNrvryrwrZrrr rr rinfo swig_sourcesrsrrrVr2compiler)r+Z_built_objectsrrrYrtlanguageZdetect_languageZlink_shared_object get_librariesr/rget_export_symbols) r8rrqext_pathrZ extra_argsrur-ZobjectsrrrrrsX        zbuild_ext.build_extensioncCs$g}g}i}|jrtd|js6d|jks6d|jkrI don't know how to find (much less run) SWIG on platform '%s')rQrZrWrXisfileZDistutilsPlatformError)r8Zversfnrrrrgs    zbuild_ext.find_swigcCs||}|d}||d}|jsRtjj|dd|g}tj|j|Sd|dd}|d}tj | |}tj||S)NrErrbuild_py) get_ext_fullnamerPget_ext_filenamerrQrWrXr'rkabspathZget_package_dir)r8rfullnamemodpathfilenamer*rZ package_dirrrrrs   zbuild_ext.get_ext_fullpathcCs |jdkr|S|jd|SdS)NrE)r*)r8rrrrrs zbuild_ext.get_ext_fullnamecCs.ddlm}|d}|d}tjj||S)NrrarEZ EXT_SUFFIX)distutils.sysconfigrarPrQrWrX)r8rrarZ ext_suffixrrrrs  zbuild_ext.get_ext_filenamecCsxd|jdd}z|dWn0tk rRd|dddd}YnXd |}||jkrr|j||jS) N_rErasciirZpunycode-_ZPyInit)rZrPencodeUnicodeEncodeErrorreplacedecoderrV)r8rreZ initfunc_namerrrrs"  zbuild_ext.get_export_symbolscCstjdkr^ddlm}t|j|sd}|jr4|d}|tjd?tjd?d@f}|j|gSndd l m }d }|d rt td rd }nr) MSVCCompilerz python%d%dZ_drFrFZgetandroidapilevelTrAZ_PYTHON_HOST_PLATFORMZANDROID_API_LEVELZMACHDEPZ LDVERSIONrD)rSr^Zdistutils._msvccompilerrrNr2r hexversionr.rrahasattrrQenviron)r8rrtemplateZ pythonlibraZlink_libpythonZ ldversionrrrrs4         zbuild_ext.get_libraries) __name__ __module__ __qualname__Z descriptionrQrRZsep_byr Z user_optionsZboolean_optionsr Z help_optionsr9rfrorrrrlrr contextlibcontextmanagerrrrrrrrrrrrrrr!sp +@N  K6  r)rrQrerSZdistutils.corerZdistutils.errorsrrrrZdistutils.dep_utilrZdistutils.extensionrZdistutils.utilr rLr Zsiter rr|r rrrrrs"       __pycache__/install_lib.cpython-38.pyc000064400000011773152345030560013714 0ustar00U e5d @sLdZddlZddlZddlZddlmZddlmZdZ GdddeZ dS)zkdistutils.command.install_lib Implements the Distutils 'install_lib' command (install all Python modules).N)Command)DistutilsOptionErrorz.pyc@seZdZdZdddddddgZd d d gZd d iZd dZddZddZ ddZ ddZ ddZ ddZ ddZddZdd 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))forcefz-force installation (overwrite existing files))compileczcompile .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 r cCs(d|_d|_d|_d|_d|_d|_dS)Nr) install_dir build_dirrr optimize skip_buildselfr5/usr/lib64/python3.8/distutils/command/install_lib.pyinitialize_options3s zinstall_lib.initialize_optionsc Cs|ddddddd|jdkr&d|_|jdkr6d |_t|jtszt|j|_|jd kr^tWn ttfk rtd YnXdS) Ninstall) build_libr)rr)rr)r r )rr)rrTF)rzoptimize must be 0, 1, or 2)Zset_undefined_optionsr r isinstanceintAssertionError ValueErrorrrrrrfinalize_options<s&     zinstall_lib.finalize_optionscCs0||}|dk r,|jr,||dSN)buildr distributionhas_pure_modules byte_compilerZoutfilesrrrrunVszinstall_lib.runcCs2|js.|jr|d|jr.|ddS)Nbuild_py build_ext)rr"r#Z run_commandhas_ext_modulesrrrrr!fs    zinstall_lib.buildcCs8tj|jr ||j|j}n|d|jdS|S)Nz3'%s' does not exist -- no Python modules to install)ospathisdirrZ copy_treerwarnr%rrrrmszinstall_lib.installcCsrtjr|ddSddlm}|dj}|jrH||d|j||j d|j dkrn|||j |j||j |j ddS)Nz%byte-compiling is disabled, skipping.r)r$r)rrprefixdry_run)rrr.verboser/) sysdont_write_bytecoder-Zdistutils.utilr$get_finalized_commandrootr rr/rr0)rfilesr$Z install_rootrrrr$vs$    zinstall_lib.byte_compilec Csd|sgS||}|}t||}t|ttj}g}|D] } |tj|| |dq>|Sr ) r3 get_outputsgetattrlenr*sepappendr+join) rZhas_anyZ build_cmdZ cmd_optionZ output_dirZ build_filesr prefix_lenZoutputsfilerrr_mutate_outputss  zinstall_lib._mutate_outputscCsrg}|D]d}tjtj|d}|tkr.q|jrJ|tjj |dd|j dkr|tjj ||j dq|S)Nr) optimizationr) r*r+splitextnormcasePYTHON_SOURCE_EXTENSIONr r: importlibutilcache_from_sourcer)rZ py_filenamesZbytecode_filesZpy_fileZextrrr_bytecode_filenamess     zinstall_lib._bytecode_filenamescCsR||jdd|j}|jr*||}ng}||jdd|j}|||S)zReturn 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_outputsZ ext_outputsrrrr6s    zinstall_lib.get_outputscCsLg}|jr&|d}|||jrH|d}|||S)zGet 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#r3extendr6r))rZinputsr'r(rrr get_inputss    zinstall_lib.get_inputsN)__name__ __module__ __qualname__Z descriptionZ user_optionsZboolean_optionsZ negative_optrrr&r!rr$r>rGr6rIrrrrrs*   r) __doc__r*importlib.utilrDr1Zdistutils.corerZdistutils.errorsrrCrrrrrs  __pycache__/build_clib.cpython-38.opt-2.pyc000064400000010246152345030560014442 0ustar00U e5dV@sPddlZddlmZddlTddlmZddlmZddZGdd d eZ dS) N)Command)*)customize_compiler)logcCsddlm}|dS)Nrshow_compilers)distutils.ccompilerrrr 4/usr/lib64/python3.8/distutils/command/build_clib.pyrs rc@sleZdZdZdddddgZddgZd d d efgZd d ZddZ ddZ ddZ ddZ ddZ ddZd S) build_clibz/build C/C++ libraries used by Python extensions)z build-clib=bz%directory to build C/C++ libraries to)z build-temp=tz,directory to put temporary build by-products)debuggz"compile with debugging information)forcefz2forcibly 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_dirsdefineundefrrcompilerselfr r r initialize_options4szbuild_clib.initialize_optionscCsh|dddddd|jj|_|jr0||j|jdkrH|jjpDg|_t|jtrd|jtj |_dS)NZbuild)rr )rr)rr)rr)rr) Zset_undefined_optionsZ distributionrcheck_library_listr isinstancestrsplitospathseprr 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^|j dk r|j D]}|j |q| |jdS)Nr) new_compiler)rdry_runr)rrr#rr$rrrZset_include_dirsrZ define_macrorZundefine_macrobuild_libraries)rr#namevalueZmacror r r run^s"      zbuild_clib.runcCst|tstd|D]z}t|ts8t|dkr8td|\}}t|tsRtdd|ksntjdkr~tj|kr~td|dt|tstdqdS) Nz+'libraries' option must be a list of tuplesz*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)) rlistDistutilsSetupErrortuplelenrr sepdict)rrlibr& build_infor r r rvs,   zbuild_clib.check_library_listcCs,|js dSg}|jD]\}}||q|S)N)rappend)rZ lib_nameslib_namer2r r r get_library_namess  zbuild_clib.get_library_namescCsZ||jg}|jD]>\}}|d}|dks>t|ttfsJtd|||q|S)Nsourcesfin 'libraries' option (library '%s'), 'sources' must be present and must be a list of source filenames)rrgetrr+r-r,extend)r filenamesr4r2r6r r r get_source_filess   zbuild_clib.get_source_filescCs|D]\}}|d}|dks,t|ttfs8td|t|}td||d}|d}|jj||j |||j d}|jj |||j |j dqdS)Nr6r7zbuilding '%s' librarymacrosr) output_dirr<rr)r=r) r8rr+r-r,rinforcompilerrZcreate_static_libr )rrr4r2r6r<rZobjectsr r r r%s,      zbuild_clib.build_libraries)__name__ __module__ __qualname__Z descriptionZ user_optionsZboolean_optionsrZ help_optionsrr"r(rr5r;r%r r r r r s( $ r ) r Zdistutils.corerZdistutils.errorsZdistutils.sysconfigrZ distutilsrrr r r r r s    __pycache__/build_scripts.cpython-38.opt-2.pyc000064400000007534152345030560015226 0ustar00U e5dX@sddlZddlZddlmZddlmZddlmZddlm Z ddl m Z m Z ddlm Z ddlZedZGd d d eZGd d d ee ZdS) N)ST_MODE) sysconfig)Command)newer) convert_path Mixin2to3)logs^#!.*python[0-9.]*([ ].*)?$c@sHeZdZdZdddgZdgZddZdd Zd d Zd d Z ddZ dS) build_scriptsz("build" scripts (copy and fixup #! line))z build-dir=dzdirectory to "build" (copy) to)forcefz1forcibly build everything (ignore file timestamps)z executable=ez*specify final destination interpreter pathr cCs"d|_d|_d|_d|_d|_dSN) build_dirscriptsr executableoutfilesselfr7/usr/lib64/python3.8/distutils/command/build_scripts.pyinitialize_optionss z build_scripts.initialize_optionscCs|dddd|jj|_dS)NZbuild)r r)r r )rr)Zset_undefined_optionsZ distributionrrrrrfinalize_options%s zbuild_scripts.finalize_optionscCs|jSr)rrrrrget_source_files,szbuild_scripts.get_source_filescCs|js dS|dSr)r copy_scriptsrrrrrun/szbuild_scripts.runc Cs||jg}g}|jD]}d}t|}tj|jtj|}|||j slt ||slt d|qzt |d}Wn tk r|jsd}YnXXt|j\}}|d|} | s|d|qt| } | rd}| dpd} |rt d ||j|||jstjs*|j} n(tjtd d td td f} t| } d| | d} z| dWn$tk rt d!| YnXz| |Wn&tk rt d!| |YnXt |d}|"| |#|$W5QRX|r8|%q|r"|%|||&||qtj'dkr|D]`}|jrdt d|nDt(|t)d@}|dBd@}||krJt d|||t*||qJ||fS)NFznot copying %s (up-to-date)rbrz%s is an empty file (skipping)Tzcopying 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 ({})wbposixzchanging mode of %siimz!changing mode of %s from %o to %o)+Zmkpathrrrospathjoinbasenameappendr rrdebugopenOSErrordry_runtokenizedetect_encodingreadlineseekwarn first_line_rematchgroupinforZ python_buildrZget_config_varfsencodedecodeUnicodeDecodeError ValueErrorformatwrite writelines readlinescloseZ copy_filenamestatrchmod)rr updated_filesZscriptZadjustZoutfiler encodinglinesZ first_liner1Z post_interprZshebangZoutffileZoldmodeZnewmoderrrr5s                   zbuild_scripts.copy_scriptsN) __name__ __module__ __qualname__Z descriptionZ user_optionsZboolean_optionsrrrrrrrrrr sr c@seZdZddZdS)build_scripts_2to3cCs&t|\}}|js||||fSr)r rr*Zrun_2to3)rrr@rrrrs zbuild_scripts_2to3.copy_scriptsN)rDrErFrrrrrrGsrG)r"rer>rZ distutilsrZdistutils.corerZdistutils.dep_utilrZdistutils.utilrrrr+compiler0r rGrrrrs       __pycache__/bdist_dumb.cpython-38.opt-2.pyc000064400000006502152345030560014466 0ustar00U e5d1@sdddlZddlmZddlmZddlmZmZddlTddl m Z ddl m Z Gdd d eZ dS) N)Command) get_platform) remove_treeensure_relative)*)get_python_version)logc @s^eZdZdZddddefdddd d d d g Zd ddgZdddZddZddZ ddZ 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-tempkzPkeep 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 rrZgztarzip)posixntcCs:d|_d|_d|_d|_d|_d|_d|_d|_d|_dS)Nr) bdist_dir plat_nameformat keep_tempdist_dir skip_buildrownergroup)selfr4/usr/lib64/python3.8/distutils/command/bdist_dumb.pyinitialize_options2szbdist_dumb.initialize_optionscCsz|jdkr&|dj}tj|d|_|jdkrfz|jtj|_Wn"t k rdt dtjYnX| dddddS)NZbdistZdumbz@don't know how to create dumb built distributions on platform %s)rr)rr)rr) rZget_finalized_command bdist_baseospathjoinrdefault_formatnameKeyErrorDistutilsPlatformErrorZset_undefined_options)rr"rrr finalize_options=s"    zbdist_dumb.finalize_optionscCs(|js|d|jddd}|j|_|j|_d|_td|j|dd|j |j f}t j |j|}|js~|j}nJ|jr|j|jkrtdt|jt|jfnt j |jt|j}|j||j||j|jd }|jrt}nd }|jjd ||f|js$t|j|jd dS) NZbuildinstall)Zreinit_subcommandsrzinstalling to %sz%s.%szScan't make a dumb built distribution where base and platbase are different (%s, %s))Zroot_dirrranyr )dry_run) rZ run_commandZreinitialize_commandrrootZwarn_dirrinfoZ distributionZ get_fullnamerr#r$r%rrZhas_ext_modulesZ install_baseZinstall_platbaser)reprrZ make_archiverrrrZ dist_filesappendrrr.)rr+Zarchive_basenameZpseudoinstall_rootZ archive_rootfilenameZ pyversionrrr runOsR        zbdist_dumb.runN) __name__ __module__ __qualname__Z descriptionrZ user_optionsZboolean_optionsr&r!r*r4rrrr r s,  r )r#Zdistutils.corerZdistutils.utilrZdistutils.dir_utilrrZdistutils.errorsZdistutils.sysconfigrZ distutilsrr rrrr s    __pycache__/install_scripts.cpython-38.pyc000064400000004137152345030560014631 0ustar00U e5d@sDdZddlZddlmZddlmZddlmZGdddeZdS)zudistutils.command.install_scripts Implements the Distutils 'install_scripts' command, for installing Python scripts.N)Command)log)ST_MODEc@sLeZdZdZddddgZddgZdd Zd d Zd d ZddZ ddZ 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))forcefz-force installation (overwrite existing files)) skip-buildNzskip the build stepsrr cCsd|_d|_d|_d|_dS)Nr) install_dirr build_dir skip_buildselfr9/usr/lib64/python3.8/distutils/command/install_scripts.pyinitialize_optionssz"install_scripts.initialize_optionscCs |dd|dddddS)NZbuild) build_scriptsr Zinstall)rr )rr)r r )Zset_undefined_optionsrrrrfinalize_options!s  z install_scripts.finalize_optionscCs|js|d||j|j|_tjdkr~|D]H}|j rLt d|q4t |t dBd@}t d||t||q4dS)Nrposixzchanging mode of %simizchanging mode of %s to %o)r Z run_commandZ copy_treer r outfilesosname get_outputsZdry_runrinfostatrchmod)rfilemoderrrrun)s   zinstall_scripts.runcCs |jjp gSN)Z distributionZscriptsrrrr get_inputs8szinstall_scripts.get_inputscCs |jpgSr )rrrrrr;szinstall_scripts.get_outputsN) __name__ __module__ __qualname__Z descriptionZ user_optionsZboolean_optionsrrrr!rrrrrrsr) __doc__rZdistutils.corerZ distutilsrrrrrrrrs    __pycache__/install_data.cpython-38.pyc000064400000004363152345030560014054 0ustar00U e5d @s<dZddlZddlmZddlmZmZGdddeZdS)zdistutils.command.install_data Implements the Distutils 'install_data' command, for installing platform-independent data files.N)Command) change_root convert_pathc@sHeZdZdZdddgZdgZddZdd Zd d Zd d Z ddZ dS) install_datazinstall data files)z install-dir=dzIbase directory for installing data files (default: installation base dir))zroot=Nzs __pycache__/bdist.cpython-38.opt-1.pyc000064400000007124152345030560013457 0ustar00U e5d@sHdZddlZddlmZddlTddlmZddZGdd d eZdS) zidistutils.command.bdist Implements the Distutils 'bdist' command (create a built [binary] distribution).N)Command)*) get_platformcCsPddlm}g}tjD]"}|d|dtj|dfq||}|ddS)zFPrint list of available formats (arguments to "--format" option). r) FancyGetoptformats=Nz'List of available distribution formats:)Zdistutils.fancy_getoptrbdistformat_commandsappendformat_commandZ print_help)rformatsformatZpretty_printerr//usr/lib64/python3.8/distutils/command/bdist.py show_formats s    rc @seZdZdZddddefdddd d gZd gZd d defgZdZ dddZ dddddddddg Z ddddddd d!d"d# Z d$d%Z d&d'Zd(d)Zd S)*rz$create a built (binary) distribution)z bdist-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_rpmgztarzip)posixntrpmbztarxztarztartarwininstmsi)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_buildgroupowner)selfrrrinitialize_optionsQszbdist.initialize_optionscCs|jdkr(|jrt|_n|dj|_|jdkrT|dj}tj|d|j|_| d|j dkrz|j tj g|_ Wn"t k rtdtj YnX|jdkrd|_dS)NZbuildzbdist.r z;don't know how to create built distributions on platform %sZdist)r%r'rZget_finalized_commandr$ build_baseospathjoinZensure_string_listr default_formatnameKeyErrorZDistutilsPlatformErrorr&)r*r,rrrfinalize_optionsZs*        zbdist.finalize_optionsc Csg}|jD]>}z||j|dWq tk rFtd|Yq Xq tt|jD]h}||}||}||jkr|j||_ |dkr|j |_ |j |_ |||ddkrd|_ | |qXdS)Nrzinvalid format '%s'r#r)r r r r2ZDistutilsOptionErrorrangelenZreinitialize_commandno_format_optionr r)r(Z keep_tempZ run_command)r*Zcommandsr iZcmd_nameZsub_cmdrrrrunvs"    z bdist.run)__name__ __module__ __qualname__Z descriptionrZ user_optionsZboolean_optionsrZ help_optionsr6r0r r r+r3r8rrrrrsR   r) __doc__r-Zdistutils.corerZdistutils.errorsZdistutils.utilrrrrrrrs    __pycache__/bdist_rpm.cpython-38.opt-2.pyc000064400000027415152345030560014343 0ustar00U e5dIT@s|ddlZddlZddlZddlmZddlmZddlmZddl m Z ddl Tddl m Z ddlmZGd d d eZdS) N)Command)DEBUG) get_platform) write_file)*)get_python_version)logc)@seZdZdZdddddddd d d d d ddddddddddddddddddd d!d"d#d$d%d&d'd(d)d*g)Zd+d,d-d.d/gZd+d,d-d0Zd1d2Zd3d4Zd5d6Z d7d8Z d9d:Z d;d<Z d=d>Z d?S)@ bdist_rpmzcreate an RPM distribution)z bdist-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)z source-onlyNzonly generate source RPM)z binary-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 ") [default: maintainer or author from setup script])z packager=NzBRPM packager (eg. "Jane Doe ") [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-tempkz"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=Nz3/usr/lib64/python3.8/distutils/command/bdist_rpm.pyinitialize_optionssNzbdist_rpm.initialize_optionscCs|dd|jdkr6|js$tdtj|jd|_|jdkrX|j rPt j |_qfd|_n|j rftdtj dkr~t dtj |jr|jrtd |jsd |_|dd |dS) NZbdist)rrz)you must specify --rpm-base in RPM 2 moderpmZpython3z8--python and --fix-python are mutually exclusive optionsposixz9don't know how to create RPM distributions on platform %sz6cannot supply both '--source-only' and '--binary-only'r)rr)Zset_undefined_optionsrr9ZDistutilsOptionErrorospathjoinrrrsys executablenameZDistutilsPlatformErrorrr distributionhas_ext_modulesr8finalize_package_datar<r>r>r?finalize_optionss6        zbdist_rpm.finalize_optionscCsT|dd|dd|j|jf|d|dt|jtrxdD]&}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|ddS)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_stringrIZ get_contactZget_contact_emailZensure_string_list isinstancer%listrCrDexistsappend_format_changelogr&Zensure_filename)r=Zreadmer>r>r?rKsB                        zbdist_rpm.finalize_package_datacCstrr>r?runs                            z bdist_rpm.runcCstj|jtj|S)N)rCrDrErre)r=rDr>r>r? _dist_pathszbdist_rpm._dist_pathc CsJd|jd|jddd|jd|jdddd|jg}td }d d d | D}d }d}|||}||kr| d| d|d | dddg|j r| dn | d| d|j d|jddg|js|js&| dn| d|jdD]V}t||}t|trb| d|d|fn|dk r*| d||fq*|jdkr| d |j|jr| d!|j|jr| d"d|j|jr| d#tj|j|jr| d$| dd%|jgd&|jtjtj d'f}d(|} |j!rXd)| } d*|} d+d,d-| fd.d/| fd0d1d2d3d4d5g } | D]n\} } }t|| }|s|r| dd6| g|rt"|}| |#$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? sz-bdist_rpm._make_spec_file..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)'rIrZZ get_versionreplacer!Zget_description subprocessZ getoutputrE splitlinesrQr]rZ get_licenser r;rJgetattrlowerrNrOZget_urlrr5r'rCrDrer:Zget_long_descriptionrrFargvr8openreadrcr%r&)r=Z spec_fileZ vendor_hookZproblemZfixedZ fixed_hookZfieldvalZdef_setup_callZ def_buildZ install_cmdZscript_optionsZrpm_optattrdefaultfr>r>r?r[s                       zbdist_rpm._make_spec_filecCs||s|Sg}|dD]N}|}|ddkrB|d|gq|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__Z descriptionZ user_optionsZboolean_optionsZ negative_optr@rLrKrkrlr[rRr>r>r>r?r sxm--*r )rvrFrCZdistutils.corerZdistutils.debugrZdistutils.utilrZdistutils.file_utilrZdistutils.errorsZdistutils.sysconfigrZ distutilsrr r>r>r>r?s      __pycache__/clean.cpython-38.opt-2.pyc000064400000003743152345030560013440 0ustar00U e5d @s@ddlZddlmZddlmZddlmZGdddeZdS)N)Command) remove_tree)logc@s>eZdZdZddddddgZdgZd d Zd d Zd dZdS)cleanz-clean up temporary files from 'build' command)z build-base=bz2base build directory (default: 'build.build-base'))z build-lib=Nzs   __pycache__/bdist_wininst.cpython-38.pyc000064400000020453152345030560014273 0ustar00U e5d>@sxdZddlZddlZddlZddlmZddlmZddlm Z m Z ddl Tddl m Z ddlmZGd d d eZdS) 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 seZdZdZddddefdddd d d d d dddg ZddddgZejdkZ fddZ ddZ ddZ ddZ ddZd'd!d"Zd#d$Zd%d&ZZS)( 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-tempkzPkeep the pseudo-installation tree around after creating the distribution archive)ztarget-version=Nz6require a specific python version on the target system)no-target-compilecz/do not compile .py to .pyc on the target system)no-target-optimizeoz;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=Nzspecify Vista's UAC handling - 'none'/default=no handling, 'auto'=use UAC if target Python installed for all users, 'force'=always use UACr r rrwin32cs tj||tdtddS)Nz^bdist_wininst command is deprecated since Python 3.8, use bdist_wheel (wheel packages) instead)super__init__warningswarnDeprecationWarning)selfargskw __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_tempno_target_compileno_target_optimizetarget_versiondist_dirbitmaptitle skip_buildinstall_scriptpre_install_scriptuser_access_control)rr!r!r"initialize_optionsEsz bdist_wininst.initialize_optionscCs|dd|jdkrR|jr6|jr6|jd}|j|_|dj}tj |d|_|j s^d|_ |js|j rt }|j r|j |krtd|f||_ |ddd|jr|jjD]}|jtj |krqqtd|jdS) Nbdist)r,r,ZwininstzMtarget 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_objget_finalized_command bdist_baseospathjoinr(has_ext_modulesrZDistutilsOptionErrorr-scriptsbasename)rr1r5Z short_versionscriptr!r!r"finalize_optionsUs>      zbdist_wininst.finalize_optionsc Cstjdkr&|js|jr&td|js6|d|jddd}|j |_ |j|_d|_ |j |_ |d}d|_ d|_|jr|j}|s|jstd d tjdd }d |j |f}|d}tj|jd ||_dD],}|}|dkr|d}t|d||qtd|j |tjdtj|j d|tjd=ddlm }|} |j!} |j"| d|j d} |#| | |j$|jrt%} nd} |jj&'d| |(| ft)d| t*| |j+st,|j |j-ddS)Nrz^distribution contains extensions and/or C libraries; must be compiled on a Windows 32 platformbuildinstall)Zreinit_subcommandsr install_libz Should have already checked thisz%d.%drz.%s-%slib)ZpurelibZplatlibheadersr:datarCz/Include/$dist_nameZinstall_zinstalling to %sZPURELIB)mktempzip)Zroot_diranyr zremoving temporary file '%s')dry_run).sysplatformr3r9Zhas_c_librariesZDistutilsPlatformErrorr,Z run_commandZreinitialize_commandr#rootZwarn_dirr$compileoptimizer(AssertionError version_infor4r6r7r8Z build_baseZ build_libuppersetattrrinfoZensure_finalizedinsertrunZtempfilerE get_fullnameZ make_archive create_exer*rZ dist_filesappendget_installer_filenamedebugremover%rrH) rr?rAr(Zplat_specifierr>keyvaluerEZarchive_basenamefullnamearcnameZ pyversionr!r!r"rT{st            zbdist_wininst.runc CsZg}|jj}|d|jpdd}dd}dD]B}t||d}|r0|d|||f}|d|||fq0|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 |ddS)Nr_z\n)replace)sr!r!r"escapesz)bdist_wininst.get_inidata..escape)ZauthorZ author_email descriptionZ maintainerZmaintainer_emailnameZurlversionz %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)r3metadatarWZlong_descriptiongetattr capitalizer-r&r'r(r/r+rUtime distutilsctime __version__r8) rlinesrfrRrbrdrDr+rirjZ build_infor!r!r" get_inidatas>   zbdist_wininst.get_inidataNc CsHddl}||j|}||}|d||r`t|d}|}W5QRXt|} nd} t|d} | | |r| |t |t r| d}|d}|jrt|jddd } |  d} W5QRX|| d }n|d}| ||d d t|| } | | t|d}| |W5QRXW5QRXdS) Nrz creating %srbwbmbcsrzlatin-1)encodings zs8          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"s    __pycache__/install_scripts.cpython-38.opt-2.pyc000064400000003731152345030560015570 0ustar00U e5d@s@ddlZddlmZddlmZddlmZGdddeZdS)N)Command)log)ST_MODEc@sLeZdZdZddddgZddgZdd Zd d Zd d ZddZ ddZ 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))forcefz-force installation (overwrite existing files)) skip-buildNzskip the build stepsrr cCsd|_d|_d|_d|_dS)Nr) install_dirr build_dir skip_buildselfr9/usr/lib64/python3.8/distutils/command/install_scripts.pyinitialize_optionssz"install_scripts.initialize_optionscCs |dd|dddddS)NZbuild) build_scriptsr Zinstall)rr )rr)r r )Zset_undefined_optionsrrrrfinalize_options!s  z install_scripts.finalize_optionscCs|js|d||j|j|_tjdkr~|D]H}|j rLt d|q4t |t dBd@}t d||t||q4dS)Nrposixzchanging mode of %simizchanging mode of %s to %o)r Z run_commandZ copy_treer r outfilesosname get_outputsZdry_runrinfostatrchmod)rfilemoderrrrun)s   zinstall_scripts.runcCs |jjp gSN)Z distributionZscriptsrrrr get_inputs8szinstall_scripts.get_inputscCs |jpgSr )rrrrrr;szinstall_scripts.get_outputsN) __name__ __module__ __qualname__Z descriptionZ user_optionsZboolean_optionsrrrr!rrrrrrsr)rZdistutils.corerZ distutilsrrrrrrrrs   __pycache__/upload.cpython-38.opt-1.pyc000064400000012100152345030560013624 0ustar00U &.e@sdZddlZddlZddlZddlZddlmZddlmZm Z m Z ddl m Z ddl mZmZddlmZddlmZdd lmZGd d d eZdS) zm distutils.command.upload Implements the Distutils 'upload' subcommand (upload package to a package index). N)standard_b64encode)urlopenRequest HTTPError)urlparse)DistutilsErrorDistutilsOptionError) PyPIRCCommand)spawn)logc@sJeZdZdZejddgZejdgZddZddZd d Z d d Z d S)uploadzupload binary package to PyPI)signszsign files to upload using gpg)z identity=izGPG identity used to sign filesr cCs,t|d|_d|_d|_d|_d|_dS)NrF)r initialize_optionsusernamepassword show_responser identity)selfr0/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 repositoryrealm) 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)rmsgcommand pyversionfilenamerrrrun: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 } d d | | tj|| f||t| d | | | | | | | | | | | | | d}zt!| }WnPt"k r}z0d|}|#|t$j%ddl&m'}|s|W5d}~XYn X||d<d|d<|jrt|dd "} tj|d| f|d<W5QRX|j(d|j)*d}dt+|,d}d}d|*d}|d}t-.}|/D]\}}d|}t0|t1sP|g}|D]j}t2|t3kr|d|d7}|d}nt4|*d }|5||5|*d |5d!|5|qTq.|5||6}d"||jf}|#|t$j%d#|t4t7||d$}t8|j||d%}zt9|}|:}|j;} Wnftk r}z|#t4|t$j?W5d}~XYnX|d&kr|#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_runrbZ file_upload1z1.0)z:actionZprotocol_versionnameversioncontentZfiletyper Z sha256_digestZmetadata_versionZsummaryZ home_pageZauthorZ author_emaillicense descriptionkeywordsplatformZ classifiersZ 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)dataheaderszServer response (%s): %s zK---------------------------------------------------------------------------zUpload failed (%s): %s)DrrAssertionErrorr rr r$openclosereadrZmetadataZget_nameZ get_versionospathbasenamehashlibZsha256Z hexdigestZget_descriptionZget_urlZ get_contactZget_contact_emailZ get_licenceZget_long_descriptionZ get_keywordsZ get_platformsZget_classifiersZget_download_urlZ get_providesZ get_requiresZ get_obsoletesZmd5 ValueErrorZannouncer INFOZ_hashlibr.rrencoderdecodeioBytesIOitems isinstancelisttypetuplestrwritegetvaluelenrrZgetcoderrcodeOSErrorZERRORrZ_read_pypi_responsejoinr)"rrr r!ZschemaZnetlocZurlZparamsZqueryZ fragmentsZgpg_argsfr)metar2Zdigesterr.Z user_passZauthboundaryZ sep_boundaryZ end_boundaryZbodykeyvaluetitler3ZrequestresultZstatusreasontextrrrrBs       !           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 distutilsr r rrrrs     __pycache__/__init__.cpython-38.opt-1.pyc000064400000001041152345030560014101 0ustar00U e5d@s2dZddddddddd d d d d ddddddgZdS)z\distutils.command Package containing implementation of all the standard Distutils commands.ZbuildZbuild_pyZ build_extZ build_clibZ build_scriptsZcleanZinstallZ install_libZinstall_headersZinstall_scriptsZ install_dataZsdistregisterZbdistZ bdist_dumbZ bdist_rpmZ bdist_wininstZcheckZuploadN)__doc____all__rr2/usr/lib64/python3.8/distutils/command/__init__.pys(__pycache__/bdist_msi.cpython-38.opt-2.pyc000064400000043114152345030560014327 0ustar00U e5d߉@sddlZddlZddlmZddlmZddlmZddlm Z ddl m Z ddl m Z ddlmZddlZdd lmZmZmZdd lmZmZmZmZGd d d eZGd ddeZdS)N)Command) remove_tree)get_python_version) StrictVersion)DistutilsOptionError) get_platform)log)schemasequencetext) DirectoryFeatureDialogadd_datac@sBeZdZddZddZdddZdd d Zdd dZddZdS)PyDialogcOs>tj|f||jd}d|d}|dd||jddS)N$iHZ BottomLiner)r__init__hlinew)selfargskwZrulerZbmwidthr3/usr/lib64/python3.8/distutils/command/bdist_msi.pyrs  zPyDialog.__init__c Cs|ddddddd|dS)NTitle @<z{\VerdanaBold10}%s)r )rtitlerrrr"#szPyDialog.titleBackc Cs,|r d}nd}||d|jddd|||S)Nr$8 pushbuttonrrr"nextnameactiveflagsrrrback*sz PyDialog.backCancelc Cs,|r d}nd}||d|jddd|||S)Nr%r$i0r'r(r)r*r,rrrcancel5szPyDialog.cancelNextc Cs,|r d}nd}||d|jddd|||S)Nr%r$r'r(r)r*r,rrrr-@sz PyDialog.nextc Cs,||t|j|d|jdddd||S)Nr'r(r)r%)r+intrr)rr.r"r-ZxposrrrxbuttonKszPyDialog.xbuttonN)r#r$)r2r$)r4r$) __name__ __module__ __qualname__rr"r1r3r-r8rrrrrs   rc@seZdZdZddddefdddd d d d d g ZddddgZddddddddddddddd d!d"d#d$d%gZd&Zd'd(Z d)d*Z d+d,Z d-d.Z d/d0Z d1d2Zd3d4Zd5d6Zd7S)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-tempkzPkeep the pseudo-installation tree around after creating the distribution archive)ztarget-version=Nz6require a specific python version on the target system)no-target-compilecz/do not compile .py to .pyc on the target system)no-target-optimizeoz;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.9XcCsFd|_d|_d|_d|_d|_d|_d|_d|_d|_d|_ d|_ dS)Nr) bdist_dir plat_name keep_tempZno_target_compileZno_target_optimizetarget_versiondist_dir skip_buildinstall_scriptpre_install_scriptversions)rrrrinitialize_options}szbdist_msi.initialize_optionscCs|dd|jdkr2|dj}tj|d|_t}|jsN|j rN||_|jr|jg|_ |j s|j r|j|krt d|fn t|j|_ |ddd|jrt d|jr|j jD]}|jtj|krqqt d|jd|_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_optionsrGget_finalized_command bdist_baseospathjoinrrJ distributionhas_ext_modulesrOrLrlist all_versionsrNrMZscriptsbasenameinstall_script_key)rrRZ short_versionZscriptrrrfinalize_optionssH      zbdist_msi.finalize_optionscCsz|js|d|jddd}|j|_|j|_d|_|d}d|_d|_|j r|j }|spdt j dd}d |j |f}|d}tj|jd ||_td |j|t jdtj|jd |t jd=||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|j0r| /d|j0f| rt1|j*d| |2|3|4|5|j*6t7|jdr^d|j pJd|f}|jj8/||j9svt:|j|j;ddS)Nbuildinstallr$)Zreinit_subcommandsr install_libz%d.%dz.%s-%slibzinstalling to %sZPURELIBZUNKNOWNz%d.%d.%dz Python %s %sz Python %sZ DistVersionZ ARPCONTACTZARPURLINFOABOUTProperty dist_filesr<any)dry_run) }|d?d%d@dAd%d)dB|d7d-dCdDd-d)dE|dFd-dGdHdddI| dJdKd-dLdHdMdNdOddd |jd1dPd1d/} | d0d1|j dPd }|d?d%d@dAd%d)d|d7d-d-dDd-d)d|dFd-ddHddd| ddd-ddHdddddd |ddndd d0d9t|d||||||ddd" }|d|dd%ddtddddXd }|dd ddd-d|dd ddd-d|jd#dd d!| dd"} | dddd| j d0d9dd|d"d} | ddst|d||||||d"d"d"d=d> }|d?d-d%dAd%d)d|dFddddwddġ|ddddd-ddơ|dd&d|d&d-dd} | ddF| ddddZddRddddd } | ddˡ|jddd=d!|j dd"d=d!|d"d# ddst|d||||||ddd" }|d͡|dd%ddHdhddС|dd%ddHddddXd }|dd ddAd{d֡|dd ddAd{d١|jddd=d!| dd"} | dddd| dddd@| ddddN| dddd| dddd| dddd| dddd| dddd| d0d9dd-|d"dѡ ddsdS)Nriri,z[ProductName] Setupr%r$ rb)Z DefaultUIFontDlgFont8)Z ErrorDialogErrorDlg)Z Progress1ZInstall)Z Progress2Zinstalls)MaintenanceForm_ActionRepair) WhichUsersALLZ TextStyle)rTahoma Nr)Z DlgFontBold8rNr$)Z VerdanaBold10VerdanarNr$)Z VerdanaRed9rrrr) 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 ActionTextUITextZ FatalErrorZFinishz)[ProductName] Installer ended prematurelyz< Backr)r/r2r#Z Description1rFrPr!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 Description2z.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] InstallerZ DescriptionZReturnZ FilesInUseZRetryF)Zbitmaprz{\DlgFontBold8}Files in Useiz8Some files that need to be updated are currently in use.ZText7iJzThe 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.ZListZListBoxkZFileInUseProcessIgnorerreiZ ErrorTextr0rNxHQZNoZErrorNoYZYesZErrorYesAZAbortZ ErrorAbortC*Z ErrorCancelIZ ErrorIgnoreOZOkZErrorOkRZ ErrorRetryZ CancelDlgiUz;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] Installernz Pondering...Z ActionDatar4Z SpawnDialogrzSelect 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 locationZEnableZShowZDisableZHiderZ DiskCostDlgZOKz&{\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 VolumeListZVolumeCostListdiz{120}{70}{70}{70}{70}g?rZ AdminInstallzGSelect whether to install [ProductName] for all users of this computer.rrzInstall for all usersZJUSTMEzInstall just for mez [ALLUSERS]zWhichUsers="ALL"rz({\DlgFontBold8}[Progress1] [ProductName]#AzYPlease wait while the Installer [Progress2] [ProductName]. This may take several minutes.Z StatusLabelzStatus:Z ProgressBariz Progress doneZ SetProgressZProgressrz)Welcome to the [ProductName] Setup WizardZBodyText?z:Select whether you want to repair or remove [ProductName].ZRepairRadioGrouplrrrz&Repair [ProductName]ZRemoverzRe&move [ProductName]z [REINSTALL]zMaintenanceForm_Action="Repair"z [Progress1]Z Repairingz [Progress2]ZrepairsZ Reinstallrz[REMOVE]zMaintenanceForm_Action="Remove" ZRemoving Zremoves z MaintenanceForm_Action<>"Change")rwrr rrrr"r1r3r-ZeventZcontrolrr+mappingrVrnrOrZ conditionr8Z radiogroupadd)rrwxyrrr"ZmodalZmodelessZtrack_disk_spaceZfatalrAZ user_exitZ exit_dialogZinuseerrorr3ZcostingZprepZseldlgorderrurZinstall_other_condZdont_install_other_condZcostZ whichusersgZprogressZmaintrrrr|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_namerrrrrosz bdist_msi.get_installer_filenameN)r9r:r;Z descriptionrZ user_optionsZboolean_optionsrYrrPr\rmrzryr{r|rorrrrr<Ss^  ([66&@r<)rirSZdistutils.corerZdistutils.dir_utilrZdistutils.sysconfigrZdistutils.versionrZdistutils.errorsrZdistutils.utilrZ distutilsrrvr r r r r rrrr<rrrr s       >__pycache__/bdist_rpm.cpython-38.pyc000064400000030216152345030560013374 0ustar00U e5dIT@sdZddlZddlZddlZddlmZddlmZddlm Z ddl m Z ddl Tddl mZdd lmZGd d d eZdS) 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)@seZdZdZdddddddd d d d d ddddddddddddddddddd d!d"d#d$d%d&d'd(d)d*g)Zd+d,d-d.d/gZd+d,d-d0Zd1d2Zd3d4Zd5d6Z d7d8Z d9d:Z d;d<Z d=d>Z d?S)@ bdist_rpmzcreate an RPM distribution)z bdist-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)z source-onlyNzonly generate source RPM)z binary-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 ") [default: maintainer or author from setup script])z packager=NzBRPM packager (eg. "Jane Doe ") [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-tempkz"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=Nz3/usr/lib64/python3.8/distutils/command/bdist_rpm.pyinitialize_optionssNzbdist_rpm.initialize_optionscCs|dd|jdkr6|js$tdtj|jd|_|jdkrX|j rPt j |_qfd|_n|j rftdtj dkr~t dtj |jr|jrtd |jsd |_|dd |dS) NZbdist)rrz)you must specify --rpm-base in RPM 2 moderpmZpython3z8--python and --fix-python are mutually exclusive optionsposixz9don't know how to create RPM distributions on platform %sz6cannot supply both '--source-only' and '--binary-only'r)rr)Zset_undefined_optionsrr9ZDistutilsOptionErrorospathjoinrrrsys executablenameZDistutilsPlatformErrorrr distributionhas_ext_modulesr8finalize_package_datar<r>r>r?finalize_optionss6        zbdist_rpm.finalize_optionscCsT|dd|dd|j|jf|d|dt|jtrxdD]&}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|ddS)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_stringrIZ get_contactZget_contact_emailZensure_string_list isinstancer%listrCrDexistsappend_format_changelogr&Zensure_filename)r=Zreadmer>r>r?rKsB                        zbdist_rpm.finalize_package_datacCstrr>r?runs                            z bdist_rpm.runcCstj|jtj|S)N)rCrDrErrh)r=rDr>r>r? _dist_pathszbdist_rpm._dist_pathc CsJd|jd|jddd|jd|jdddd|jg}td }d d d | D}d }d}|||}||kr| d| d|d | dddg|j r| dn | d| d|j d|jddg|js|js&| dn| d|jdD]V}t||}t|trb| d|d|fn|dk r*| d||fq*|jd kr| d!|j|jr| d"|j|jr| d#d|j|jr| d$tj|j|jr| d%| dd&|jgd'|jtjtj d(f}d)|} |j!rXd*| } d+|} d,d-d.| fd/d0| fd1d2d3d4d5d6g } | D]n\} } }t|| }|s|r| dd7| g|rt"|}| |#$d W5QRXn | |q| dd8d9g|j%r$| d:d|j%|j&rF| dd;g| |j&|S)r>r? sz-bdist_rpm._make_spec_file..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[Z get_versionreplacer!Zget_description subprocessZ getoutputrE splitlinesrQr^rZ get_licenser r;rJgetattrlowerrNrOZget_urlrr5r'rCrDrhr:Zget_long_descriptionrrFargvr8openreadrdr%r&)r=Z spec_fileZ vendor_hookZproblemZfixedZ fixed_hookZfieldvalZdef_setup_callZ def_buildZ install_cmdZscript_optionsZrpm_optattrdefaultfr>r>r?r\s                       zbdist_rpm._make_spec_filecCs||s|Sg}|dD]N}|}|ddkrB|d|gq|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__Z descriptionZ user_optionsZboolean_optionsZ negative_optr@rLrKrnror\rRr>r>r>r?r sxm--*r )__doc__ryrFrCZdistutils.corerZdistutils.debugrZdistutils.utilrZdistutils.file_utilrZdistutils.errorsZdistutils.sysconfigrZ distutilsrr r>r>r>r?s      __pycache__/build.cpython-38.opt-2.pyc000064400000007330152345030560013451 0ustar00U e5d@sPddlZddlZddlmZddlmZddlmZddZGdddeZ dS) N)Command)DistutilsOptionError) get_platformcCsddlm}|dS)Nrshow_compilers)Zdistutils.ccompilerrrr//usr/lib64/python3.8/distutils/command/build.pyr s rc @seZdZdZdddddddd d efd d d ddg ZddgZdddefgZddZ ddZ ddZ ddZ ddZ dd Zd!d"Zd#e fd$e fd%efd&efgZdS)'buildz"build everything needed to install)z build-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)z build-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)debuggz;compile extensions and libraries with debugging information)forcefz2forcibly build everything (ignore file timestamps))z executable=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 executableparallelselfrrrinitialize_options8szbuild.initialize_optionscCsb|jdkrt|_ntjdkr&tdd|jftjdd}ttdrR|d7}|jdkrntj |j d|_|j dkrtj |j d||_ |j dkr|jjr|j |_ n|j|_ |jdkrtj |j d||_|jdkrtj |j d tjdd|_|jdkr tjr tj tj|_t|jtr^zt|j|_Wntk r\td YnXdS) NntzW--plat-name only supported on Windows (try using './configure --help' on your platform)z .%s-%d.%dZgettotalrefcountz-pydebuglibZtempz scripts-%d.%dzparallel should be an integer)rrosnamersys version_infohasattrrpathjoinrrr distributionZ ext_modulesrrrnormpath isinstancerstrint ValueError)rZplat_specifierrrrfinalize_optionsHsD             zbuild.finalize_optionscCs|D]}||qdSN)Zget_sub_commandsZ run_command)rZcmd_namerrrruns z build.runcCs |jSr1)r*has_pure_modulesrrrrr3szbuild.has_pure_modulescCs |jSr1)r*has_c_librariesrrrrr4szbuild.has_c_librariescCs |jSr1)r*has_ext_modulesrrrrr5szbuild.has_ext_modulescCs |jSr1)r* has_scriptsrrrrr6szbuild.has_scriptsZbuild_pyZ build_clibZ build_extr)__name__ __module__ __qualname__Z descriptionrZ user_optionsZboolean_optionsrZ help_optionsrr0r2r3r4r5r6Z sub_commandsrrrrr sH8 r ) r%r#Zdistutils.corerZdistutils.errorsrZdistutils.utilrrr rrrrs    __pycache__/build_clib.cpython-38.opt-1.pyc000064400000011320152345030560014433 0ustar00U e5dV@sTdZddlZddlmZddlTddlmZddlmZddZ Gd d d eZ dS) zdistutils.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)Nrshow_compilers)distutils.ccompilerrrr 4/usr/lib64/python3.8/distutils/command/build_clib.pyrs rc@sleZdZdZdddddgZddgZd d d efgZd d ZddZ ddZ ddZ ddZ ddZ ddZd S) build_clibz/build C/C++ libraries used by Python extensions)z build-clib=bz%directory to build C/C++ libraries to)z build-temp=tz,directory to put temporary build by-products)debuggz"compile with debugging information)forcefz2forcibly 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_dirsdefineundefrrcompilerselfr r r initialize_options4szbuild_clib.initialize_optionscCsh|dddddd|jj|_|jr0||j|jdkrH|jjpDg|_t|jtrd|jtj |_dS)NZbuild)rr )rr)rr)rr)rr) Zset_undefined_optionsZ distributionrcheck_library_listr isinstancestrsplitospathseprr 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^|j dk r|j D]}|j |q| |jdS)Nr) new_compiler)rdry_runr)rrr#rr$rrrZset_include_dirsrZ define_macrorZundefine_macrobuild_libraries)rr#namevalueZmacror r r run^s"      zbuild_clib.runcCst|tstd|D]z}t|ts8t|dkr8td|\}}t|tsRtdd|ksntjdkr~tj|kr~td|dt|tstdqd 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 tuplesz*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) rlistDistutilsSetupErrortuplelenrr sepdict)rrlibr& build_infor r r rvs,   zbuild_clib.check_library_listcCs,|js dSg}|jD]\}}||q|S)N)rappend)rZ lib_nameslib_namer2r r r get_library_namess  zbuild_clib.get_library_namescCsZ||jg}|jD]>\}}|d}|dks>t|ttfsJtd|||q|S)Nsourcesfin 'libraries' option (library '%s'), 'sources' must be present and must be a list of source filenames)rrgetrr+r-r,extend)r filenamesr4r2r6r r r get_source_filess   zbuild_clib.get_source_filescCs|D]\}}|d}|dks,t|ttfs8td|t|}td||d}|d}|jj||j |||j d}|jj |||j |j dqdS)Nr6r7zbuilding '%s' librarymacrosr) output_dirr<rr)r=r) r8rr+r-r,rinforcompilerrZcreate_static_libr )rrr4r2r6r<rZobjectsr r r r%s,      zbuild_clib.build_libraries)__name__ __module__ __qualname__Z descriptionZ user_optionsZboolean_optionsrZ help_optionsrr"r(rr5r;r%r r r r r s( $ r ) __doc__r Zdistutils.corerZdistutils.errorsZdistutils.sysconfigrZ distutilsrrr r r r r s   __pycache__/install_data.cpython-38.opt-2.pyc000064400000004142152345030560015007 0ustar00U e5d @s8ddlZddlmZddlmZmZGdddeZdS)N)Command) change_root convert_pathc@sHeZdZdZdddgZdgZddZdd Zd d Zd d Z ddZ dS) install_datazinstall data files)z install-dir=dzIbase directory for installing data files (default: installation base dir))zroot=Nzs __pycache__/build.cpython-38.pyc000064400000007453152345030560012517 0ustar00U e5d@sTdZddlZddlZddlmZddlmZddlmZddZ Gdd d eZ dS) zBdistutils.command.build Implements the Distutils 'build' command.N)Command)DistutilsOptionError) get_platformcCsddlm}|dS)Nrshow_compilers)Zdistutils.ccompilerrrr//usr/lib64/python3.8/distutils/command/build.pyr s rc @seZdZdZdddddddd d efd d d ddg ZddgZdddefgZddZ ddZ ddZ ddZ ddZ dd Zd!d"Zd#e fd$e fd%efd&efgZdS)'buildz"build everything needed to install)z build-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)z build-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)debuggz;compile extensions and libraries with debugging information)forcefz2forcibly build everything (ignore file timestamps))z executable=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 executableparallelselfrrrinitialize_options8szbuild.initialize_optionscCsb|jdkrt|_ntjdkr&tdd|jftjdd}ttdrR|d7}|jdkrntj |j d|_|j dkrtj |j d||_ |j dkr|jjr|j |_ n|j|_ |jdkrtj |j d||_|jdkrtj |j d tjdd|_|jdkr tjr tj tj|_t|jtr^zt|j|_Wntk r\td YnXdS) NntzW--plat-name only supported on Windows (try using './configure --help' on your platform)z .%s-%d.%dZgettotalrefcountz-pydebuglibZtempz scripts-%d.%dzparallel should be an integer)rrosnamersys version_infohasattrrpathjoinrrr distributionZ ext_modulesrrrnormpath isinstancerstrint ValueError)rZplat_specifierrrrfinalize_optionsHsD             zbuild.finalize_optionscCs|D]}||qdSN)Zget_sub_commandsZ run_command)rZcmd_namerrrruns z build.runcCs |jSr1)r*has_pure_modulesrrrrr3szbuild.has_pure_modulescCs |jSr1)r*has_c_librariesrrrrr4szbuild.has_c_librariescCs |jSr1)r*has_ext_modulesrrrrr5szbuild.has_ext_modulescCs |jSr1)r* has_scriptsrrrrr6szbuild.has_scriptsZbuild_pyZ build_clibZ build_extr)__name__ __module__ __qualname__Z descriptionrZ user_optionsZboolean_optionsrZ help_optionsrr0r2r3r4r5r6Z sub_commandsrrrrr sH8 r ) __doc__r%r#Zdistutils.corerZdistutils.errorsrZdistutils.utilrrr rrrrs    __pycache__/register.cpython-38.pyc000064400000020411152345030560013231 0ustar00U e5d-@sddZddlZddlZddlZddlZddlmZddlm Z ddl Tddl m Z Gddde Z dS) zhdistutils.command.register Implements the Distutils 'register' command (register with the repository). N)warn) PyPIRCCommand)*)logc@seZdZdZejddgZejdddgZddd fgZd d Zd d Z ddZ ddZ ddZ ddZ ddZddZddZdddZdS) 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 compliantverifyrrcheckcCsdS)NTselfr r 2/usr/lib64/python3.8/distutils/command/register.pyzregister.cCst|d|_d|_dS)Nr)rinitialize_optionslist_classifiersrr r r rrs zregister.initialize_optionscCs*t|d|jfdd}||jjd<dS)Nr)r)rrestructuredtextr )rfinalize_optionsr distributionZcommand_options)r Z check_optionsr r rr$s  zregister.finalize_optionscCsT|||D]}||q|jr8|n|jrH|n|dS)N) r _set_configZget_sub_commandsZ run_commandZdry_runverify_metadatar classifiers send_metadata)r Zcmd_namer r rrun+s    z register.runcCs8tdt|jd}||j|_d|_|dS)zDeprecated API.zddistutils.command.register.check_metadata is deprecated, use the check command insteadr rN)rPendingDeprecationWarningrZget_command_objZensure_finalizedrrr)r r r r rcheck_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. usernamepassword repositoryrealmTZpypiz%s not found in .pypircFN)Z _read_pypircrrr r! has_configZDEFAULT_REPOSITORY ValueError)r Zconfigr r rrDs     zregister._set_configcCs*|jd}tj|}t||dS)z8 Fetch the list of classifiers from the server. z?:action=list_classifiersN)r urllibrequestZurlopenrinfo_read_pypi_response)r ZurlZresponser r rrUs  zregister.classifierscCs&||d\}}td||dS)zF Send the metadata to the package index server to be checked. r Server response (%s): %sN)post_to_serverbuild_post_datarr&)r coderesultr r rr\szregister.verify_metadatac Cs|jrd}|j}|j}n d}d}}d}||krd|dtjt}|sRd}q,||kr,tdq,|dkrl|s|td}qn|st d}q|t j }t j |jd }||j|||||d |\}}|d ||ftj|d kr|jr||j_nf|d tj|d|tjd}|dkrNtd}|s*d}q*|dkr|||nl|dkrddi} d| d<| d<| d<d| d<| dstd| d<q| d| dkr0| dst d| d<q| dst d| d<q| d| dkrd| d<d| d<tdq| dsJtd| d<q0|| \}}|d krrtd ||ntdtd nP|d!krdd"i} d| d<| dstd#| d<q|| \}}td ||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. 1xz1 2 3 4zWe 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)?ny2:actionusernamerZemailNZconfirmz 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"rrsplitannouncerINFOinputprintgetpassr$r%ZHTTPPasswordMgrparseZurlparser Z add_passwordr!r)r*rZ _get_rc_filelowerZ _store_pypircr&) r ZchoicerrchoicesauthZhostr+r,datar r rrcs                   zregister.send_metadatacCs|jj}|d|||||||| | | | | |||d}|ds|ds|drd|d<|S)Nz1.0)r5metadata_versionr7versionZsummaryZ home_pageZauthorZ author_emaillicense descriptionkeywordsplatformrZ download_urlprovidesrequires obsoletesrJrKrLz1.1rD)rZmetadataZget_nameZ get_versionZget_descriptionZget_urlZ get_contactZget_contact_emailZ get_licenceZget_long_descriptionZ get_keywordsZ get_platformsZget_classifiersZget_download_urlZ get_providesZ get_requiresZ get_obsoletes)r actionmetarCr r rr*s,zregister.build_post_dataNc Csd|kr$|d|d|jftjd}d|}|d}t}|D]~\}}t|tgtdfkrn|g}|D]R}t|}| || d|| d| ||rr|d d krr| d qrqH| || d | d }d |tt |d} t j|j|| } t jt jj|d} d}z| | } Wnxt jjk r} z"|jrd| j}| j| jf} W5d} ~ XYnJt jjk r} zdt| f} W5d} ~ XYnX|jr|| }d} |jrd d|df}||tj| S)zC Post a query to the server, and return a string response. r7zRegistering %s to %sz3--------------GHSKFJDLGDS7543FJKLFHRE75642756743254z --z--r z* 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;ioStringIOitemstypestrwritegetvalueencodelenr$r%ZRequestZ build_openerZHTTPBasicAuthHandleropenerrorZ HTTPErrorZ show_responsefpreadr+msgZURLErrorr'join)r rCrBboundaryZ sep_boundaryZ end_boundaryZbodykeyvalueZheadersZreqZopenerr,er_r r rr)s^          zregister.post_to_server)N)__name__ __module__ __qualname__rGrZ user_optionsZboolean_optionsZ sub_commandsrrrrrrrrr*r)r r r rrs* zr)__doc__r>rRZ urllib.parser$Zurllib.requestwarningsrZdistutils.corerZdistutils.errorsZ distutilsrrr r r rs   __pycache__/build_py.cpython-38.opt-1.pyc000064400000024271152345030560014163 0ustar00U e5d&C@szdZddlZddlZddlZddlZddlmZddlTddl m Z m Z ddl m Z GdddeZGd d d ee ZdS) zHdistutils.command.build_py Implements the Distutils 'build_py' command.N)Command)*) convert_path Mixin2to3)logc@seZdZdZdddddgZddgZd diZd d Zd d ZddZ ddZ ddZ ddZ ddZ ddZddZddZddZd d!Zd"d#Zd$d%Zd2d'd(Zd)d*Zd+d,Zd-d.Zd/d0Zd1S)3build_pyz5"build" pure Python modules (copy to build directory))z build-lib=dzdirectory to "build" (copy) to)compileczcompile .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])forcefz2forcibly build everything (ignore file timestamps)r r r cCs4d|_d|_d|_d|_d|_d|_d|_d|_dS)Nr) build_lib py_modulespackage package_data package_dirr optimizer selfr2/usr/lib64/python3.8/distutils/command/build_py.pyinitialize_options szbuild_py.initialize_optionsc Cs|ddd|jj|_|jj|_|jj|_i|_|jjr^|jjD]\}}t||j|<qF||_ t |j t szt |j |_ Wn t tfk rtdYnXdS)NZbuild)rr)r r zoptimize must be 0, 1, or 2)Zset_undefined_options distributionpackagesrrritemsrget_data_files data_files isinstancerint ValueErrorAssertionErrorZDistutilsOptionError)rnamepathrrrfinalize_options*s$      zbuild_py.finalize_optionscCs:|jr||jr$||||jdddSNr)include_bytecode)r build_modulesrbuild_packagesbuild_package_data byte_compile get_outputsrrrrrunCs z build_py.runcsg}|js|S|jD]h}||}tjj|jg|d}d|rPt|dfdd|||D}| ||||fq|S)z?Generate list of '(package,src_dir,build_dir,filenames)' tuples.rcsg|]}|dqSNr).0fileZplenrr ssz+build_py.get_data_files..) rget_package_dirosr$joinrsplitlenfind_data_filesappend)rdatarsrc_dir build_dir filenamesrr3rras     zbuild_py.get_data_filescsd|jdg|j|g}g|D]:}ttjt|t|}fdd|Dq$S)z6Return filenames for package's data files in 'src_dir'cs$g|]}|krtj|r|qSr)r6r$isfile)r1fnfilesrrr4s z,build_py.find_data_files..) rgetglobr6r$r7escaperextend)rrr=ZglobspatternZfilelistrrCrr:ys  zbuild_py.find_data_filescCs`d}|jD]P\}}}}|D]>}tj||}|tj||jtj|||ddqq dS)z$Copy data files into build directoryNFZ preserve_mode)rr6r$r7mkpathdirname copy_file)rZlastdirrr=r>r?filenametargetrrrr*szbuild_py.build_package_datacCs|d}|js&|r tjj|SdSng}|rz|jd|}Wn*tk rl|d|d|d=Yq*X|d|tjj|Sq*|jd}|dk r|d||rtjj|SdSdS)zReturn 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@rN)r8rr6r$r7KeyErrorinsertrE)rrr$tailZpdirrrrr5s(       zbuild_py.get_package_dircCsj|dkr8tj|s td|tj|s8td||rftj|d}tj|rZ|Std|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$existsZDistutilsFileErrorisdirr7rArwarn)rrrinit_pyrrr check_packages&   zbuild_py.check_packagecCs&tj|std||dSdSdS)Nz!file %s (for module %s) not foundFT)r6r$rArrV)rmodule module_filerrr check_modules zbuild_py.check_modulec Cs|||ttjt|d}g}tj|jj}|D]P}tj|}||krtj tj |d}| |||fq>| d|q>|S)Nz*.pyrz excluding %s) rXrFr6r$r7rGabspathrZ script_namesplitextbasenamer;Z debug_print) rrrZ module_filesmodulesZ setup_scriptrZabs_frYrrrfind_package_moduless  zbuild_py.find_package_modulesc Csi}g}|jD]}|d}d|dd}|d}z||\}}Wn"tk rh||}d}YnX|s|||} |df||<| r||d| ftj||d} | || sq|||| fq|S)aFinds 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$rZ module_basercheckedrWrZrrr find_moduless*       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_rrmrrrfind_all_moduless    zbuild_py.find_all_modulescCsdd|DS)NcSsg|] }|dqS)rPr)r1rYrrrr4-sz-build_py.get_source_files..)rfrrrrget_source_files,szbuild_py.get_source_filescCs$|gt||dg}tjj|S)Nrb)listr6r$r7)rr>rrYZ outfile_pathrrrget_module_outfile/szbuild_py.get_module_outfiler/cCs|}g}|D]p\}}}|d}||j||}|||r|jr^|tjj|dd|j dkr|tjj||j dq|dd|j D7}|S)Nr.r@) optimizationrcSs,g|]$\}}}}|D]}tj||qqSr)r6r$r7)r1rr=r>r?rNrrrr4Bs z(build_py.get_outputs..) rfr8rirr;r importlibutilcache_from_sourcerr)rr'r_ZoutputsrrYrZrNrrrr,3s*      zbuild_py.get_outputscCsbt|tr|d}nt|ttfs,td||j||}tj |}| ||j ||ddS)Nr.z:'package' must be a string (dot-separated), list, or tuplerrJ) rstrr8rhtuple TypeErrorrirr6r$rLrKrM)rrYrZrZoutfiledirrrr 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_packagescCstjr|ddSddlm}|j}|dtjkr>|tj}|jrZ||d|j ||j d|j dkr||||j |j ||j ddS)Nz%byte-compiling is disabled, skipping.r)r+rP)rr prefixdry_run) sysdont_write_bytecoderVdistutils.utilr+rr6sepr r rtr)rrDr+rsrrrr+vs&    zbuild_py.byte_compileN)r/)__name__ __module__ __qualname__Z descriptionZ user_optionsZboolean_optionsZ negative_optrr%r-rr:r*r5rXr[r`rdrfrgrir,rrr(r)r+rrrrrs8    '4  rc@seZdZddZddZdS) build_py_2to3cCsLg|_|jr||jr*||||j||jdddSr&) updated_filesrr(rr)r*Zrun_2to3r+r,rrrrr-s zbuild_py_2to3.runcCs,t||||}|dr(|j|d|S)Nr/r)rrrr}r;)rrYrZrresrrrrrszbuild_py_2to3.build_moduleN)ryrzr{r-rrrrrrr|sr|)__doc__r6importlib.utilrkrurFZdistutils.corerZdistutils.errorsrwrrZ distutilsrrr|rrrrs  }__pycache__/install_scripts.cpython-38.opt-1.pyc000064400000004137152345030560015570 0ustar00U e5d@sDdZddlZddlmZddlmZddlmZGdddeZdS)zudistutils.command.install_scripts Implements the Distutils 'install_scripts' command, for installing Python scripts.N)Command)log)ST_MODEc@sLeZdZdZddddgZddgZdd Zd d Zd d ZddZ ddZ 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))forcefz-force installation (overwrite existing files)) skip-buildNzskip the build stepsrr cCsd|_d|_d|_d|_dS)Nr) install_dirr build_dir skip_buildselfr9/usr/lib64/python3.8/distutils/command/install_scripts.pyinitialize_optionssz"install_scripts.initialize_optionscCs |dd|dddddS)NZbuild) build_scriptsr Zinstall)rr )rr)r r )Zset_undefined_optionsrrrrfinalize_options!s  z install_scripts.finalize_optionscCs|js|d||j|j|_tjdkr~|D]H}|j rLt d|q4t |t dBd@}t d||t||q4dS)Nrposixzchanging mode of %simizchanging mode of %s to %o)r Z run_commandZ copy_treer r outfilesosname get_outputsZdry_runrinfostatrchmod)rfilemoderrrrun)s   zinstall_scripts.runcCs |jjp gSN)Z distributionZscriptsrrrr get_inputs8szinstall_scripts.get_inputscCs |jpgSr )rrrrrr;szinstall_scripts.get_outputsN) __name__ __module__ __qualname__Z descriptionZ user_optionsZboolean_optionsrrrr!rrrrrrsr) __doc__rZdistutils.corerZ distutilsrrrrrrrrs    __pycache__/bdist_msi.cpython-38.pyc000064400000046251152345030560013374 0ustar00U e5d߉@sdZddlZddlZddlmZddlmZddlmZddl m Z ddl m Z ddl mZdd lmZddlZdd lmZmZmZdd lmZmZmZmZGd d d eZGdddeZdS)z# Implements the bdist_msi command. N)Command) remove_tree)get_python_version) StrictVersion)DistutilsOptionError) get_platform)log)schemasequencetext) DirectoryFeatureDialogadd_datac@sFeZdZdZddZddZddd Zdd d ZdddZddZ dS)PyDialogzDialog 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||jddS)zbDialog(database, name, x, y, w, h, attributes, title, first, default, cancel, bitmap=true)$iHZ BottomLinerN)r__init__hlinew)selfargskwZrulerZbmwidthr3/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 )rtitlerrrr"#szPyDialog.titleBackc Cs,|r d}nd}||d|jddd|||S)zAdd 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 associatedr$8 pushbuttonrrr"nextnameactiveflagsrrrback*sz PyDialog.backCancelc Cs,|r d}nd}||d|jddd|||S)zAdd 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,rrrcancel5szPyDialog.cancelNextc Cs,|r d}nd}||d|jddd|||S)zAdd 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)zAdd 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 associatedr'r(r)r%)r+intrr)rr.r"r-ZxposrrrxbuttonKszPyDialog.xbuttonN)r#r$)r2r$)r4r$) __name__ __module__ __qualname____doc__rr"r1r3r-r8rrrrrs  rc@seZdZdZddddefdddd d d d d g ZddddgZddddddddddddddd d!d"d#d$d%gZd&Zd'd(Z d)d*Z d+d,Z d-d.Z d/d0Z d1d2Zd3d4Zd5d6Zd7S)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-tempkzPkeep the pseudo-installation tree around after creating the distribution archive)ztarget-version=Nz6require a specific python version on the target system)no-target-compilecz/do not compile .py to .pyc on the target system)no-target-optimizeoz;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.9XcCsFd|_d|_d|_d|_d|_d|_d|_d|_d|_d|_ d|_ dS)Nr) bdist_dir plat_name keep_tempZno_target_compileZno_target_optimizetarget_versiondist_dir skip_buildinstall_scriptpre_install_scriptversions)rrrrinitialize_options}szbdist_msi.initialize_optionscCs|dd|jdkr2|dj}tj|d|_t}|jsN|j rN||_|jr|jg|_ |j s|j r|j|krt d|fn t|j|_ |ddd|jrt d|jr|j jD]}|jtj|krqqt d|jd|_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_optionsrHget_finalized_command bdist_baseospathjoinrrK distributionhas_ext_modulesrPrMrlist all_versionsrOrNZscriptsbasenameinstall_script_key)rrSZ short_versionZscriptrrrfinalize_optionssH      zbdist_msi.finalize_optionscCs|js|d|jddd}|j|_|j|_d|_|d}d|_d|_|j r|j }|s~|jslt ddt j dd }d |j|f}|d}tj|jd ||_td |j|t jdtj|jd |t jd=||j|j}||}tj|}tj|r0t ||jj!}|j"} | sJ|j#} | sTd} |$} dt%| j&} |j}|j rd|j |f} nd|} t'(|t)| t'*| | |_+t',|j+t-d| fg} |j.p|j/}|r| 0d|f|j1r| 0d|j1f| rt2|j+d| |3|4|5|6|j+7t8|jdrld|j pXd|f}|jj90||j:st;|j|j }|d?d%d@dAd%d)dB|d7d-dCdDd-d)dE|dFd-dGdHdddI| dJdKd-dLdHdMdNdOddd |jd1dPd1d/} | d0d1|j dPd }|d?d%d@dAd%d)d|d7d-d-dDd-d)d|dFd-ddHddd| ddd-ddHdddddd |ddndd d0d9t|d||||||ddd" }|d|dd%ddtddddXd }|dd ddd-d|dd ddd-d|jd#dd d!| dd"} | dddd| j d0d9dd|d"d} | ddst|d||||||d"d"d"d=d> }|d?d-d%dAd%d)d|dFddddwddġ|ddddd-ddơ|dd&d|d&d-dd} | ddF| ddddZddRddddd } | ddˡ|jddd=d!|j dd"d=d!|d"d# ddst|d||||||ddd" }|d͡|dd%ddHdhddС|dd%ddHddddXd }|dd ddAd{d֡|dd ddAd{d١|jddd=d!| dd"} | dddd| dddd@| ddddN| dddd| dddd| dddd| dddd| dddd| d0d9dd-|d"dѡ ddsdS)Nriri,z[ProductName] Setupr%r$ rc)Z DefaultUIFontDlgFont8)Z ErrorDialogErrorDlg)Z Progress1ZInstall)Z Progress2Zinstalls)MaintenanceForm_ActionRepair) WhichUsersALLZ TextStyle)rTahoma Nr)Z DlgFontBold8rNr$)Z VerdanaBold10VerdanarNr$)Z VerdanaRed9rrrr) 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 ActionTextUITextZ FatalErrorZFinishz)[ProductName] Installer ended prematurelyz< Backr)r/r2r#Z Description1rFrPr!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 Description2z.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] InstallerZ DescriptionZReturnZ FilesInUseZRetryF)Zbitmaprz{\DlgFontBold8}Files in Useiz8Some files that need to be updated are currently in use.ZText7iJzThe 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.ZListZListBoxkZFileInUseProcessIgnorerreiZ ErrorTextr0rNxHQZNoZErrorNoYZYesZErrorYesAZAbortZ ErrorAbortC*Z ErrorCancelIZ ErrorIgnoreOZOkZErrorOkRZ ErrorRetryZ CancelDlgiUz;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] Installernz Pondering...Z ActionDatar4Z SpawnDialogrzSelect 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 locationZEnableZShowZDisableZHiderZ DiskCostDlgZOKz&{\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 VolumeListZVolumeCostListdiz{120}{70}{70}{70}{70}g?rZ AdminInstallzGSelect whether to install [ProductName] for all users of this computer.rrzInstall for all usersZJUSTMEzInstall just for mez [ALLUSERS]zWhichUsers="ALL"rz({\DlgFontBold8}[Progress1] [ProductName]#AzYPlease wait while the Installer [Progress2] [ProductName]. This may take several minutes.Z StatusLabelzStatus:Z ProgressBariz Progress doneZ SetProgressZProgressrz)Welcome to the [ProductName] Setup WizardZBodyText?z:Select whether you want to repair or remove [ProductName].ZRepairRadioGrouplrrrz&Repair [ProductName]ZRemoverzRe&move [ProductName]z [REINSTALL]zMaintenanceForm_Action="Repair"z [Progress1]Z Repairingz [Progress2]ZrepairsZ Reinstallrz[REMOVE]zMaintenanceForm_Action="Remove" ZRemoving Zremoves z MaintenanceForm_Action<>"Change")ryrr rrrr"r1r3r-ZeventZcontrolrr+mappingrWrprPrZ conditionr8Z radiogroupadd)rryxyrrr"ZmodalZmodelessZtrack_disk_spaceZfatalrBZ user_exitZ exit_dialogZinuseerrorr3ZcostingZprepZseldlgorderrwrZinstall_other_condZdont_install_other_condZcostZ whichusersgZprogressZmaintrrrr~sv                                                   zbdist_msi.add_uicCs<|jrd||j|jf}nd||jf}tj|j|}|S)Nz%s.%s-py%s.msiz %s.%s.msi)rKrIrTrUrVrL)rrZ base_namerrrrrqsz bdist_msi.get_installer_filenameN)r9r:r;Z descriptionrZ user_optionsZboolean_optionsrZrrQr]ror|r{r}r~rqrrrrr=Ss^  ([66&@r=)r<rkrTZdistutils.corerZdistutils.dir_utilrZdistutils.sysconfigrZdistutils.versionrZdistutils.errorsrZdistutils.utilrZ distutilsrrxr r r r r rrrr=rrrrs       >install_lib.pyo000064400000015031152345555050007602 0ustar00 {fc@sdZdZddlZddlZddlmZddlmZeedrcej dZ ndZ d efd YZ dS( skdistutils.command.install_lib Implements the Distutils 'install_lib' command (install all Python modules).s$Id$iN(tCommand(tDistutilsOptionErrortextseptpys.pyt install_libc BseZdZddd d!d#d$d%gZdd dgZid d 6ZdZdZdZ dZ dZ dZ dZ dZdZdZRS(&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(tNonet install_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|jtsy.t|j|_|jdkrtnWqttfk rtd qXndS(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|jjrA|j|ndS(N(tbuildRR t distributionthas_pure_modulest byte_compile(Rtoutfiles((s5/usr/lib64/python2.7/distutils/command/install_lib.pytrunZs  cCsN|jsJ|jjr(|jdn|jjrJ|jdqJndS(Ntbuild_pyt build_ext(RRRt run_commandthas_ext_modules(R((s5/usr/lib64/python2.7/distutils/command/install_lib.pyRjs  cCsLtjj|jr0|j|j|j}n|jd|jdS|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 Cstjr|jddSddlm}|jdj}|jrp||ddd|jd|d |j n|j dkr||d|j d|jd|d |j d |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( R0t get_outputstgetattrtlenR%tseptappendR&tjoin( Rthas_anyt build_cmdt cmd_optiont output_dirt build_filesRt prefix_lentoutputstfile((s5/usr/lib64/python2.7/distutils/command/install_lib.pyt_mutate_outputss  $cCsg}x|D]z}tjjtjj|d}|tkrGq n|jrd|j|dn|jdkr |j|dq 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_filenamess "  cCsu|j|jjdd|j}|jr?|j|}ng}|j|jjdd|j}|||S(sReturn 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_outputst ext_outputs((s5/usr/lib64/python2.7/distutils/command/install_lib.pyR4s   cCsrg}|jjr:|jd}|j|jn|jjrn|jd}|j|jn|S(sGet 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_inputss(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=R slalso 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__t descriptionR 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.pyts  upload.pyo000064400000014244152345555050006577 0ustar00 {fc@sdZddlZddlZddlZddlmZmZmZddlm Z ddl Z ddl Z ddl mZddlmZmZddlmZddlmZdd lmZd efd YZdS( s`distutils.command.upload Implements the Distutils 'upload' subcommand (upload package to PyPI).iN(turlopentRequestt HTTPError(tstandard_b64encode(tmd5(tDistutilsErrortDistutilsOptionError(t PyPIRCCommand(tspawn(tlogtuploadcBsUeZdZejd d gZejdgZdZdZd 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_responsetFalseR tNonetidentity(tself((s0/usr/lib64/python2.7/distutils/command/upload.pyRs      cCstj||jr/|j r/tdn|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_optionsRR Rt _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_filesRt upload_file(Rtmsgtcommandt pyversiontfilename((s0/usr/lib64/python2.7/distutils/command/upload.pytrun8s  c"Cs`tj|j\}}}}}} |s6|s6| rLtd|jn|dEkrktd|n|jrddd|g} |jrd|jg| d d +nt| d |jnt|d } z| j} Wd| j X|j j } id d 6dd6| j d6| j d6tjj|| fd6|d6|d6t| jd6dd6| jd6| jd6| jd6| jd6| jd6| jd6| jd6| jd6| jd 6| jd!6| jd"6| jd#6| jd$6}d%}|d&krRt j!\}}}|rwd'||f}qwn%|d(krwd)t j d*d+}n||d,<|jrtjj|d-t|d-jf|d.|}yjt2|}|j3}|j4}|j5rd?j6d@dA|jd@dAf} |j,| t-j.nWnVt7j8k r}!|j,t/|!t-j9n%t:k r}!|!j;}|!j4}nX|dBkr-|j,dC||ft-j.n/dD||f} |j,| t-j9t<| dS(FNsIncompatible url %sthttpthttpssunsupported schema tgpgs --detach-signs-as --local-useritdry_runtrbt file_uploads:actiont1tprotcol_versiontnametversiontcontenttfiletypeR!t md5_digests1.0tmetadata_versiontsummaryt home_pagetauthort author_emailtlicenset descriptiontkeywordstplatformt classifierst 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-iKisServer response (%s): %ssUpload failed (%s): %s(R$R%(=turlparseRtAssertionErrorR RRR'topentreadtcloseRtmetadatatget_namet get_versiontostpathtbasenameRt hexdigesttget_descriptiontget_urlt get_contacttget_contact_emailt get_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$                                             &    (R R 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.pyts     __init__.pyc000064400000001231152345555050007026 0ustar00 {fc@sOdZdZdddddddd d d d d dddddddgZdS(s\distutils.command Package containing implementation of all the standard Distutils commands.s$Id$tbuildtbuild_pyt build_extt build_clibt build_scriptstcleantinstallt install_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__.pyts(build_clib.pyo000064400000014313152345555050007400 0ustar00 {fc@s{dZdZddlZddlmZddlmZddlmZddl m Z dZ d efd YZ dS( sdistutils.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$iN(tCommand(tDistutilsSetupError(tcustomize_compiler(tlogcCsddlm}|dS(Ni(tshow_compilers(tdistutils.ccompilerR(R((s4/usr/lib64/python2.7/distutils/command/build_clib.pyRst build_clibcBseZdZdddddgZdd gZdddefgZdZdZ dZ dZ dZ dZ dZRS(s/build C/C++ libraries used by Python extensionss build-clib=tbs%directory to build C/C++ libraries tos build-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 R tcompiler(tself((s4/usr/lib64/python2.7/distutils/command/build_clib.pytinitialize_options6s        cCs|jdddd d d |jj|_|jrG|j|jn|jdkrn|jjpeg|_nt|jtr|jjt j |_ndS( NtbuildRRRR R (RR(RR(RR(R R (R R ( 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 |jn|j dk rx-|j D]\}}|jj ||qWn|j dk rx$|j D]}|jj |qWn|j|jdS(Ni(t new_compilerRtdry_runR (RRR!RR"R RRRtset_include_dirsRt define_macroRtundefine_macrotbuild_libraries(RR!tnametvaluetmacro((s4/usr/lib64/python2.7/distutils/command/build_clib.pytrun_s    cCst|tstdnx|D]}t|t rVt|dkrVtdn|\}}t|tstddnd|kstjdkrtj|krtdd|d nt|ts"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_namess  cCs|j|jg}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_filess" c Csx|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$"    (s build-clib=Rs%directory to build C/C++ libraries to(s build-temp=Rs,directory to put temporary build by-products(R R s"compile with debugging information(R R s2forcibly build everything (ignore file timestamps)(s compiler=R sspecify the compiler typeN(t__name__t __module__t descriptiont 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.pyts  install_headers.pyo000064400000004317152345555050010454 0ustar00 {fc@s6dZdZddlmZdefdYZdS(sdistutils.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 gZdgZdZdZd 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(tNonet install_dirRtoutfiles(tself((s9/usr/lib64/python2.7/distutils/command/install_headers.pytinitialize_optionss  cCs|jddddS(NtinstallRRR(RR(RR(tset_undefined_options(R((s9/usr/lib64/python2.7/distutils/command/install_headers.pytfinalize_optionss cCsf|jj}|sdS|j|jx9|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.pyt get_outputs0s(s install-dir=Rs$directory to install header files to(RRs-force installation (overwrite existing files)( t__name__t __module__t descriptiont 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.pytsbdist_msi.pyc000064400000056631152345555050007262 0ustar00 {fc@sdZddlZddlZddlmZddlmZddlmZddl m Z ddl m Z ddl mZdd lmZddlZdd lmZmZmZdd lmZmZmZmZd efd YZdefdYZdS(s# Implements the bdist_msi command. iN(tget_python_version(tCommand(t remove_tree(t StrictVersion(tDistutilsOptionError(tlog(t get_platform(tschematsequencettext(t DirectorytFeaturetDialogtadd_datatPyDialogcBsVeZdZdZdZdddZdddZddd Zd ZRS( sDialog 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||jddS(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(sAdd 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 associatediiiii8i(t pushbuttonR(RRtnexttnametactivetflags((s3/usr/lib64/python2.7/distutils/command/bdist_msi.pytback+s tCancelc Cs>|rd}nd}|j|d|jddd|||S(sAdd 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(sAdd 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 associatediiiii8i(RR(RRRRRR((s3/usr/lib64/python2.7/distutils/command/bdist_msi.pyRAs c Cs:|j|t|j|d|jdddd||S(sAdd 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=eZdZdedfdddefdddd fd ed d fd ddfdddfdddfdedfdedfdedfg Zdd ddgZddddd d!d"d#d$d%d&d'd(d)d*d+d,d-d.d/gZd0Zd1Z d2Z d3Z d4Z d5Z d6Zd7Zd8ZRS(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|jdj}tjj|d|_nt}|j rz|j j rz||_ n|j r|j g|_ |j r|j j r|j |krtd|fqnt|j|_ |jdd d |jr tdn|jr\xF|j jD]%}|jtjj|kr Pq q Wtd|jnd|_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_optionss8        cCs|js|jdn|jddd}|j|_|j|_d|_|jd}d|_d|_|jj r|j }|s|jst dt j dd!}nd |j|f}|jd}tjj|jd ||_ntjd |j|jt jjdtjj|jd |jt jd=|j|j|jj}|j|}tjj|}tjj|rtj |n|jj!}|j"} | s|j#} n| sd } 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|fn|j0r| j/d|j0fn| rt1|j*d| n|j2|j3|j4|j5|j*j6t7|jdrid|j pJd|f}|jj8j/|n|j9st:|jd|j;ndS(Ntbuildtinstalltreinit_subcommandsiit install_libs Should have already checked thisis.%s-%stlibsinstalling to %stPURELIBtUNKNOWNs%d.%d.%ds Python %s %ss Python %st DistVersiont ARPCONTACTtARPURLINFOABOUTtPropertyt dist_filesR*tanytdry_run(<R9t run_commandtreinitialize_commandR2tprefixtwarn_dirtcompiletoptimizeRFRGR7tAssertionErrortsystversionR3RARCRDREt build_baset build_libRtinfotensure_finalizedtinserttruntmkpathR8t get_fullnametget_installer_filenametabspathtexiststunlinktmetadatatauthort maintainert get_versionRtmsilibt init_databaseRtgen_uuidtdbt add_tablesRt author_emailtmaintainer_emailtappendturlR tadd_find_pythont add_filest add_scriptstadd_uitCommitthasattrR[R4RR](RRQRSR7tplat_specifierRPtfullnametinstaller_nameRsRtRftsversiont product_nametpropstemailttup((s3/usr/lib64/python2.7/distutils/command/bdist_msi.pyRls~        %                  c Cs|j}tjd}tjj|j}t||d|dd}t |ddddddd}||d fg}x|j |j gD]}d|}d|} } d} ||j krd } d } nd |} d} t || | | d| d|}t|||||| }|j |||fqW|j i}x|D]\}}}|g}xg|r|j}xNtj|jD]:}tjj|j|}tjj|r d |j||f}||} t||||| |}|j |q|js.|j|j|dn||kr|j|}||<||jkr|jr|td|nd||_qq||}t|jd|||j|d|jfgqWqiW|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 R1R R<t other_versionR~RtpoptlistdirtabsoluteREtisdirt make_shortt componenttstart_componenttlogicaltadd_fileR:RLRR tcommit(RRztcabtrootdirtroottftitemsRfttargetRtdefaulttdescRtleveltdirtseentfeaturettodotfiletafiletshorttnewdirtkey((s3/usr/lib64/python2.7/distutils/command/bdist_msi.pyRs\    !          +c Csd}x|jD]}d|}d|}d|}d|}d|}d|}d|} d |} d |} d |} tjrd } nd } t|jd|d |d| f|d|d| fgt|jd||f||fgt|jd|d!| d|df| d"| d|df| d#| d| dfgt|jd|||f| ||df| d|d fgt|jd|||f| ||df| d|d fgt|jdd|dd|fg|d7}|dkstqWdS($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.exeis)SOFTWARE\Python\PythonCore\%s\InstallPathspython.machine.s python.user.sPYTHON.MACHINE.s PYTHON.USER.tPythonFromMachinetPythonFromUsert PythonExeRtPYTHONiit RegLocatorit AppSearcht CustomActioni3it[t]s ]\python.exetInstallExecuteSequencetInstallUISequencet ConditionRis NOT TARGETDIRiiNii3i3i3(R<RwtWin64R RzR1Rd(Rtstarttvert install_patht machine_regtuser_regt machine_propt user_proptmachine_actiont user_actiont exe_actionttarget_dir_proptexe_proptType((s3/usr/lib64/python2.7/distutils/command/bdist_msi.pyREsJ                       cCsQ|jrd}x|j|jgD]l}d|}d|}t|jd|d||jfgt|jd|d||fg|d7}q#Wn|jrMtjj |j d }t |d }|j d |j t |jj |jt|jd d tj|fgt|jddgt|jddgndS(Nisinstall_script.RRi2Rs &Python%s=3ispreinstall.batRsrem =""" %1 %0 exit """ tBinaryt PreInstallis NOT Installedi(RiRN(Rs NOT Installedi(R:R<RR RzRLR;RCRDRER2topentwritetreadtcloseRwRR1(RRRtinstall_actionRtscriptfnR((s3/usr/lib64/python2.7/distutils/command/bdist_msi.pyR{s,            cCsA|j}d}}d}d}d}d}d}t|dddddddgt|dddddgt|ddddddgt|d.tjt|d/tjt|d0||||||d1d1d1 } | jd2| jd3d1d4d| j d5d6d4d| jd7d8d9d:d;d<d=| jd>d8d?d:d@d<dA| j d1d5dBd1} | j dCdDt|dE||||||d1d1d1 } | jdF| jd3d1d4d| j d5d6d4d| jd7d8d9d:d;d<dG| jd>d8d?d:d@d<dA| j d1d5dBd1} | j dCdDt|dH||||||d1d1d1 } | jdI| jd3d1d4d| j d5d6d4d| jdJd8dKd:d@d<dA| j d1d5dBd1} | j dCdLt|dM||||dN|dOdOdOdPt } | jdQd8dRdSd8d<dT| jdJd@dUdVd@d<dW| jdXd@dYdZddd[| j d\d]d@d^dZd_d`daddd | jdDdbdBdD} | j dCdD| j dbdOdBdb} | j dCdb| j dOdDdBdO} | j dCdOt|d dddZdcdd|dedd }|jdedddVdfddg|jdhdidjdkdlddmdj dCdn|jdodpdjdkdlddqdj dCdr|jdsddjdkdlddtdj dCdu|jdvdwdjdkdldd5dj dCdx|jdydkdjdkdlddbdj dCdz|jd{d|djdkdldd}dj dCd~|jdddjdkdlddOdj dCdt|dddddd|dmdmdm }|jdXdfd8dddd|jdqdjdddddqdm} | j dCdD|jdmddddddmdq} | j dCdLt|ddddd||dLdLdL }|jdXdfd8dddd|jdLddddddLd} | j dCdDt|d ||||||d5d5d5 }|jdJd8d9d:dd<d|jd|jd.d8dd:d@d<d} | jd.dX|jdd8dd:dd<d} | jddX|jd6dd4d|j ddd4d|j d5d} | j ddt|d&||||||ddd5 }|jd|jdd8ddd@dd|jj|jd3dd4d|j dd5} d}| j ddd|xF|j|jgD]1}|d7}| j dd|d|d|qW| j ddd|d| j dCdLd|d|j d5d} | j dd|j ddd8dddiddddd } | j dd|j}d|}d|}|jdd8dSdd8dd} | jd|| jd|| jd|| jd||j ddd8ddddd|ddd } | jd|| jd|| jd|| jd|t|d||||||ddddPt }|jdQd8dRdSd8d<d|jdJd@d@dVd@d<d|jdXd@ddZddd|j ddd@ddZdddddd |jdd}ddj dCdLt|d#||||||ddd5 }|jd|jdd8ddddddgd }|jddddd@d|jddddd@d|jd6dd4d|j dd5} | j dddd| j dCdLdd|j d5d} | j ddt|d,||||||d5d5d5dPt }|jdQd@d8dSd8d<d|jdXdddddd|jddddd@dd|jd.d9d|d9d@dd} | jd.dX|j ddddiddddddd } | jdd|jd3dd4t |j dd5d4t |j d5d6j ddt|d)||||||ddd5 }|jd|jdd8ddZdwdd|jdd8ddZddddgd }|jddddSdd|jddddSdd|jd3dd4t |j d1d5} | j dddd| j ddddR| j dddd`| j dddd| j dddd| j dddd| j dddd| j dddd| j dCdLdd@|j d5dj dddS(Ni2iri,s[ProductName] SetupiiRZt DefaultUIFonttDlgFont8t ErrorDialogtErrorDlgt Progress1tInstallt Progress2tinstallstMaintenanceForm_ActiontRepairt WhichUserstALLt TextStyletTahomai it DlgFontBold8it VerdanaBold10tVerdanai t VerdanaRed9iRt PrepareDlgs(Not Privileged or Windows9x or Installedit WhichUsersDlgs.Privileged and not Windows9x and not InstalleditSelectFeaturesDlgs Not InstalleditMaintenanceTypeDlgs,Installed AND NOT RESUME AND NOT Preselectedit ProgressDlgit 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 Description2iis.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] Installert DescriptionitReturnt FilesInUseitRetrytbitmapRiis{\DlgFontBold8}Files in Useiis8Some files that need to be updated are currently in use.tTexti7iJsThe 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.tListtListBoxikiitFileInUseProcesstIgnoreieit ErrorTexti0RtNixiHiQitNotErrorNotYitYestErrorYestAtAbortt ErrorAborttCi*t ErrorCanceltIt ErrorIgnoretOitOktErrorOktRit ErrorRetryt CancelDlgiiUiis;Are you sure you want to cancel [ProductName] installation?i9i8iitWaitForCostingDlgsRPlease 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 ActionDataiR#t SpawnDialogsSelect 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 locationtEnabletShowtDisabletHideiiRt DiskCostDlgtOKs&{\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 VolumeListtVolumeCostListidiis{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.t StatusLabelsStatus:t ProgressBaris Progress donet SetProgresstProgresss)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"i tRemovingi tremovesi is MaintenanceForm_Action<>"Change"(RR(RR(RR(RR(RR(RR(RRi Ni(RRiNi(RRi Ni(RRi ii(Rs(Not Privileged or Windows9x or Installedi(Rs.Privileged and not Windows9x and not Installedi(Rs Not Installedi(Rs,Installed AND NOT RESUME AND NOT Preselectedi(RNi(RzR R1R RRRRR R"RteventtFalsetcontrolR RtmappingRFRnR<Rt conditionR&t radiogrouptadd(RRztxtyRRRtmodaltmodelesstfatalR-t user_exitt exit_dialogtinuseterrorR"tcostingtpreptseldlgtorderRfRtinstall_other_condtdont_install_other_condtcostt whichuserstgtprogresstmaint((s3/usr/lib64/python2.7/distutils/command/bdist_msi.pyRs                .......$$$ !!        "  % cCsT|jr%d||j|jf}nd||jf}tjj|j|}|S(Ns%s.%s-py%s.msis %s.%s.msi(R7R3RCRDRER8(RRt base_nameR((s3/usr/lib64/python2.7/distutils/command/bdist_msi.pyRos   (R'R(t descriptionR1Rt user_optionstboolean_optionsRIRR=RORlRRRRRo(((s3/usr/lib64/python2.7/distutils/command/bdist_msi.pyR*TsP     ) [ 6 6 & >(R)ReRCt sysconfigRtdistutils.coreRtdistutils.dir_utilRtdistutils.versionRtdistutils.errorsRt distutilsRtdistutils.utilRRwRRR R R R R RR*(((s3/usr/lib64/python2.7/distutils/command/bdist_msi.pyts "=build_ext.py.debug-build000064400000077016152345555050011303 0ustar00"""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 __init__.pyo000064400000001231152345555050007042 0ustar00 {fc@sOdZdZdddddddd d d d d dddddddgZdS(s\distutils.command Package containing implementation of all the standard Distutils commands.s$Id$tbuildtbuild_pyt build_extt build_clibt build_scriptstcleantinstallt install_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__.pyts(install_data.pyo000064400000006056152345555050007754 0ustar00 {fc@sXdZdZddlZddlmZddlmZmZdefdYZdS(sdistutils.command.install_data Implements the Distutils 'install_data' command, for installing platform-independent data files.s$Id$iN(tCommand(t change_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(tNonet install_dirtoutfilestrootRt distributiont data_filestwarn_dir(tself((s6/usr/lib64/python2.7/distutils/command/install_data.pytinitialize_optionss     cCs|jdddddS( NtinstallRRR R(RR(R R (RR(tset_undefined_options(R((s6/usr/lib64/python2.7/distutils/command/install_data.pytfinalize_options%s cCsk|j|jxT|jD]I}t|trt|}|jra|jd||jfn|j||j\}}|j j |qt|d}t j j |st j j|j|}n|jrt|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.pyt get_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__t descriptionRt 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.pyts  upload.pyc000064400000014244152345555050006563 0ustar00 {fc@sdZddlZddlZddlZddlmZmZmZddlm Z ddl Z ddl Z ddl mZddlmZmZddlmZddlmZdd lmZd efd YZdS( s`distutils.command.upload Implements the Distutils 'upload' subcommand (upload package to PyPI).iN(turlopentRequestt HTTPError(tstandard_b64encode(tmd5(tDistutilsErrortDistutilsOptionError(t PyPIRCCommand(tspawn(tlogtuploadcBsUeZdZejd d gZejdgZdZdZd 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_responsetFalseR tNonetidentity(tself((s0/usr/lib64/python2.7/distutils/command/upload.pyRs      cCstj||jr/|j r/tdn|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_optionsRR Rt _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_filesRt upload_file(Rtmsgtcommandt pyversiontfilename((s0/usr/lib64/python2.7/distutils/command/upload.pytrun8s  c"Cs`tj|j\}}}}}} |s6|s6| rLtd|jn|dEkrktd|n|jrddd|g} |jrd|jg| d d +nt| d |jnt|d } z| j} Wd| j X|j j } id d 6dd6| j d6| j d6tjj|| fd6|d6|d6t| jd6dd6| jd6| jd6| jd6| jd6| jd6| jd6| jd6| jd6| jd 6| jd!6| jd"6| jd#6| jd$6}d%}|d&krRt j!\}}}|rwd'||f}qwn%|d(krwd)t j d*d+}n||d,<|jrtjj|d-t|d-jf|d.|}yjt2|}|j3}|j4}|j5rd?j6d@dA|jd@dAf} |j,| t-j.nWnVt7j8k r}!|j,t/|!t-j9n%t:k r}!|!j;}|!j4}nX|dBkr-|j,dC||ft-j.n/dD||f} |j,| t-j9t<| dS(FNsIncompatible url %sthttpthttpssunsupported schema tgpgs --detach-signs-as --local-useritdry_runtrbt file_uploads:actiont1tprotcol_versiontnametversiontcontenttfiletypeR!t md5_digests1.0tmetadata_versiontsummaryt home_pagetauthort author_emailtlicenset descriptiontkeywordstplatformt classifierst 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-iKisServer response (%s): %ssUpload failed (%s): %s(R$R%(=turlparseRtAssertionErrorR RRR'topentreadtcloseRtmetadatatget_namet get_versiontostpathtbasenameRt hexdigesttget_descriptiontget_urlt get_contacttget_contact_emailt get_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$                                             &    (R R 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.pyts     build.pyc000064400000012032152345555050006367 0ustar00 {fc@swdZdZddlZddlZddlmZddlmZddlm Z dZ defd YZ dS( sBdistutils.command.build Implements the Distutils 'build' command.s$Id$iN(t get_platform(tCommand(tDistutilsOptionErrorcCsddlm}|dS(Ni(tshow_compilers(tdistutils.ccompilerR(R((s//usr/lib64/python2.7/distutils/command/build.pyR stbuildc BseZdZd,d.d/dd-d d fd0d1dddefd2d3d4d5g ZddgZdd-d efgZd!Z d"Z d#Z d$Z d%Z d&Zd'Zd(e fd)e fd*efd+efgZRS(6s"build everything needed to installs build-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 scriptss build-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)s executable=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<tdnd|jtjdd!f}ttdru|d7}n|j dkrtj j |j d|_ n|j dkrtj j |j d||_ n|jdkr |jjr|j |_q |j |_n|jdkr=tj j |j d ||_n|jdkrxtj j |j d tjdd!|_n|jdkrtjrtj jtj|_ndS( NtntsW--plat-name only supported on Windows (try using './configure --help' on your platform)s.%s-%siitgettotalrefcounts-pydebugtlibttempsscripts-(RRRtostnameRtsystversionthasattrRtpathtjoinRRRt distributiont ext_modulesRRRtnormpath(Rtplat_specifier((s//usr/lib64/python2.7/distutils/command/build.pytfinalize_optionsFs2   cCs(x!|jD]}|j|q WdS(N(tget_sub_commandst run_command(Rtcmd_name((s//usr/lib64/python2.7/distutils/command/build.pytrunxscCs |jjS(N(R&thas_pure_modules(R((s//usr/lib64/python2.7/distutils/command/build.pyR/scCs |jjS(N(R&thas_c_libraries(R((s//usr/lib64/python2.7/distutils/command/build.pyR0scCs |jjS(N(R&thas_ext_modules(R((s//usr/lib64/python2.7/distutils/command/build.pyR1scCs |jjS(N(R&t has_scripts(R((s//usr/lib64/python2.7/distutils/command/build.pyR2stbuild_pyt build_clibt build_extR(s build-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(s build-temp=Rstemporary build directory(s compiler=R sspecify the compiler type(R R s;compile extensions and libraries with debugging information(R R s2forcibly build everything (ignore file timestamps)(s executable=Rs5specify final destination interpreter path (build.py)(t__name__t __module__t descriptionRRt 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.pyts bdist_wininst.pyc000064400000024745152345555050010166 0ustar00 {fc@sdZdZddlZddlZddlZddlmZddlmZddl m Z ddl m 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$iN(tget_python_version(tCommand(t remove_tree(tDistutilsOptionErrortDistutilsPlatformError(tlog(t get_platformt bdist_wininstcBseZdZd,dddefdddd fd d+d d fd-d.d/d0d1d2d3d4d5g Zdd ddgZd$Zd%Zd&Z d'Z d+d(Z d)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=sspecify 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|jdj}t j j |d|_n|j sd|_ n|j r|jj rt}|j r|j |krtd|fn||_ n|jdd d |jrRxF|jjD]%}|jt j j|krPqqWtd|jndS( 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 Cstjdkr<|jjs-|jjr<tdn|jsU|jdn|jddd}|j |_ |j|_d|_ |j |_ |jd}d|_ d|_|jjrB|j}|s|jstd tjdd !}nd |j |f}|jd}tjj|jd ||_nxJdD]B}tj|}|dkrw|d}nt|d||qIWtjd|j |jtjjdtjj|j d|jtjd=ddl m!}|} |jj"} |j#| dd|j } |j$| | |j%|jjrYt&} nd} |jj'j(d| |j)| ftj*d| tj+| |j,st-|j d|j.ndS(Ntwin32s^distribution contains extensions and/or C libraries; must be compiled on a Windows 32 platformtbuildtinstalltreinit_subcommandsiit install_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_librariesRRt run_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              %       c Csg}|jj}|jd|jp+dd}d}xddddd d d d gD]a}t||d}|rZ|d tj|||f}|jd|||fqZqZW|jd|jr|jd|jn|jd|||jd|j |jd|j |j rM|jd|j n|j rm|jd|j n|j p|jj }|jd||ddl}ddl} d|j|j| jf} |jd| tj|dS(Ns [metadata]R!s cSstj|ddS(Ns s\n(RNtreplace(ts((s7/usr/lib64/python2.7/distutils/command/bdist_wininst.pytescapestauthort author_emailt descriptiont maintainertmaintainer_emailtnameturlRKs %s: %ss%s=%ss [Setup]sinstall_script=%ssinfo=%sstarget_compile=%dstarget_optimize=%dstarget_version=%ssuser_access_control=%sstitle=%sisBuilt %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.pyt get_inidatas<   $      c Csddl}|j|j|j}|j|}|jd||rrt|dj}t|}nd}t|d} | j |j |r| j |nyt Wnt k rn"Xt |t r|jd}n|d}|jr)t|jdj} || d }n |d}| j ||jd d t||} | j | | j t|djdS( Nis creating %strbitwbtmbcsstrs 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.msvccompilerRRRR'R(tdirnamet__file__RR)RRtclose(RRt cur_versiontbvt directorytsfixtfilenametf((s7/usr/lib64/python2.7/distutils/command/bdist_wininst.pyRCs$     "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-optimizeR s;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=Nsspecify 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.pyts   check.pyo000064400000014166152345555050006373 0ustar00 {fc@sdZdZddlmZddlmZddlmZypddlm Z ddl m Z ddl m Z dd l mZdd lmZd e fd YZeZWnek reZnXd efdYZdS(sCdistutils.command.check Implements the Distutils 'check' command. s$Id$i(tCommand(tPKG_INFO_ENCODING(tDistutilsSetupError(tReporter(tParser(tfrontend(tnodes(tStringIOtSilentReportercBs&eZdddddZdZRS(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||||ftj|d|d|j|||S(Ntlevelttype(R tappendRtsystem_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 ZdZ dZ dZ dZ 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|jn|jrMtr2|jqM|jrMtdqMn|jrt|jdkrttdndS(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|jddqn>|j r|j s|jdd qn|jd d d d S(sEnsures 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|ts0|jt}nxd|j|D]S}|djd}|dkrr|d}nd|d|f}|j |q@WdS(s4Checks if the long string fields are reST-compliant.itlineis %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}tjdtfj}d|_d |_d |_ t ||j |j d|j d|jd|jd|j}tj||d|}|j|d y|j||Wn3tk r}|jjd d |d ifnX|jS( s8Returns warnings when the provided data doesn't compile.ssetup.pyt componentsiRRRRRis!Could not finish the parsing: %s.tN(R3t script_nameRRt OptionParsertget_default_valuest tab_widthRtpep_referencestrfc_referencesRRRtwarning_streamRterror_encodingterror_encoding_error_handlerRtdocumentt note_sourcetparsetAttributeErrorR R(R RDt source_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__t descriptiont 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-t ImportErrortFalseR (((s//usr/lib64/python2.7/distutils/command/check.pyts   check.pyc000064400000014166152345555050006357 0ustar00 {fc@sdZdZddlmZddlmZddlmZypddlm Z ddl m Z ddl m Z dd l mZdd lmZd e fd YZeZWnek reZnXd efdYZdS(sCdistutils.command.check Implements the Distutils 'check' command. s$Id$i(tCommand(tPKG_INFO_ENCODING(tDistutilsSetupError(tReporter(tParser(tfrontend(tnodes(tStringIOtSilentReportercBs&eZdddddZdZRS(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||||ftj|d|d|j|||S(Ntlevelttype(R tappendRtsystem_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 ZdZ dZ dZ dZ 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|jn|jrMtr2|jqM|jrMtdqMn|jrt|jdkrttdndS(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|jddqn>|j r|j s|jdd qn|jd d d d S(sEnsures 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|ts0|jt}nxd|j|D]S}|djd}|dkrr|d}nd|d|f}|j |q@WdS(s4Checks if the long string fields are reST-compliant.itlineis %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}tjdtfj}d|_d |_d |_ t ||j |j d|j d|jd|jd|j}tj||d|}|j|d y|j||Wn3tk r}|jjd d |d ifnX|jS( s8Returns warnings when the provided data doesn't compile.ssetup.pyt componentsiRRRRRis!Could not finish the parsing: %s.tN(R3t script_nameRRt OptionParsertget_default_valuest tab_widthRtpep_referencestrfc_referencesRRRtwarning_streamRterror_encodingterror_encoding_error_handlerRtdocumentt note_sourcetparsetAttributeErrorR R(R RDt source_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__t descriptiont 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-t ImportErrortFalseR (((s//usr/lib64/python2.7/distutils/command/check.pyts   build_scripts.pyc000064400000010575152345555050010150 0ustar00 {fc@sdZdZddlZddlZddlmZddlmZddlm Z ddl m Z ddl m Z ejd Zd efd YZdS( sRdistutils.command.build_scripts Implements the Distutils 'build_scripts' command.s$Id$iN(tST_MODE(tCommand(tnewer(t convert_path(tlogs^#!.*python[0-9.]*([ ].*)?$t build_scriptscBsSeZdZdddgZdgZd Zd Zd Zd ZdZ RS(s("build" scripts (copy and fixup #! line)s build-dir=tdsdirectory to "build" (copy) totforcetfs1forcibly build everything (ignore file timestampss executable=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( NtbuildRR RR (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|jdS(N(R t copy_scripts(R((s7/usr/lib64/python2.7/distutils/command/build_scripts.pytrun/s c Cstd}|j|jg}x|jD]}d}t|}tjj|jtjj|}|j ||j rt || rt j d|q,nyt|d}Wn&tk r|jsnd}n]X|j}|s |jd|q,ntj|}|r=d}|jdp7d} n|rt jd||j|jst|d } |js| jd |j| fnK| jd tjj|jd d |jd |jdf| f| j|j| jn|r>|jq>q,|r.|jn|j||q,Wtj dkrx|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 %siims!changing mode of %s from %o to %oN($t __import__tmkpathR R RtostpathtjointbasenametappendRRRtdebugtopentIOErrortdry_runR treadlinetwarnt first_line_retmatchtgrouptinfotis_python_buildtwriteR tget_config_vart writelinest readlinestcloset copy_filetnametstatRtchmod(Rt _sysconfigRtscripttadjusttoutfileRt first_lineR.t post_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(s executable=R s*specify final destination interpreter path( t__name__t __module__t descriptiont 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.pytsbuild_py.pyc000064400000026345152345555050007113 0ustar00 {fc@sdZdZddlZddlZddlmZddlmZddlmZm Z ddl m Z ddl m Z d efd YZdS( sHdistutils.command.build_py Implements the Distutils 'build_py' command.s$Id$iN(tglob(tCommand(tDistutilsOptionErrortDistutilsFileError(t convert_path(tlogtbuild_pycBseZdZd#d$d&d'd(gZdd gZidd6ZdZdZdZ dZ dZ dZ dZ dZdZdZdZdZdZdZddZdZd 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_datat package_dirRtoptimizeR (tself((s2/usr/lib64/python2.7/distutils/command/build_py.pytinitialize_options!s       cCs|jddd|jj|_|jj|_|jj|_i|_|jjrx6|jjjD]\}}t||j|X|jd|tjj|Sq>W|jjd}|dk r|jd|n|rtjj|SdSdS(sReturn 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+R9iiN( 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|rtjj|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_packages  cCs1tjj|s)tjd||tStSdS(Ns!file %s (for module %s) not found(R-R"R<RRORFtTrue(Rtmodulet module_file((s2/usr/lib64/python2.7/distutils/command/build_py.pyt check_modulesc Cs|j||ttjj|d}g}tjj|jj}xx|D]p}tjj|}||krtjjtjj |d}|j |||fqP|j d|qPW|S(Ns*.pyis excluding %s( RQRR-R"R.tabspathRt script_nametsplitexttbasenameR2t debug_print( RRRt module_filestmodulest setup_scriptR tabs_fRS((s2/usr/lib64/python2.7/distutils/command/build_py.pytfind_package_moduless  "c Cs!i}g}x|jD]}|jd}dj|dd!}|d}y||\}}Wn&tk r|j|}d}nX|s|j||} |df||<| r|j|d| fqntjj||d} |j || sqn|j||| fqW|S(sFinds 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+iiit__init__s.py( RR/R.RIR,RQR2R-R"RU( RRR\RSR"Rt module_baseRtcheckedRPRT((s2/usr/lib64/python2.7/distutils/command/build_py.pyt find_moduless*   cCswg}|jr%|j|jn|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|jD]}|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_outfile0sic Cs|j}g}x|D]\}}}|jd}|j|j||}|j||r|jr|j|dn|jdkr|j|dqqqW|g|jD]4\}}} } | D]}tj j | |^qq7}|S(NR+R ito( ReR/RiRR2RRRR-R"R.( RR$R\toutputsRRSRTRGR4R5R8((s2/usr/lib64/python2.7/distutils/command/build_py.pyR)4s    )cCst|tr!|jd}n$t|ttfsEtdn|j|j||}tj j |}|j ||j ||ddS(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 Cstjr|jddSddlm}|j}|dtjkrV|tj}n|jr||ddd|j d|d|j n|j dkr||d|j d|j d|d|j ndS( Ns%byte-compiling is disabled, skipping.i(R(RiR tprefixtdry_run( tsystdont_write_bytecodeROtdistutils.utilR(RR-tsepRR RtR(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](R R s2forcibly build everything (ignore file timestamps)(t__name__t __module__t descriptionR 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.pyts  bdist.pyc000064400000012061152345555050006377 0ustar00 {fc@sqdZdZddlZddlmZddlmZddlmZm Z dZ defd YZ dS( sidistutils.command.bdist Implements the Distutils 'bdist' command (create a built [binary] distribution).s$Id$iN(t get_platform(tCommand(tDistutilsPlatformErrortDistutilsOptionErrorcCslddlm}g}x6tjD]+}|jd|dtj|dfq W||}|jddS(sFPrint list of available formats (arguments to "--format" option). i(t FancyGetoptsformats=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 BseZdZd0dddefd2d3d4d5d6gZd gZdd1defgZd7Z idd6dd6dd6Z dddddd dd!gZ id8d6d9d6d:d6d;d6d<d6d=d 6d>d6d?d!6Z d-Z d.Zd/ZRS(@s$create a built (binary) distributions bdist-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?|jdj|_n|jdkr|jdj}tjj |d|j|_n|j d|j dkry|j tj g|_ Wqtk rtddtj qXn|jdkrd|_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|dWqtk rRtd|qXqWxtt|jD]}||}|j|}||jkr|j||_ n|dkr|j |_ |j |_ n|||dkrd|_ n|j |qmWdS(Nisinvalid format '%s'R!i(R RR R6Rtrangetlentreinitialize_commandtno_format_optionR R)R(t keep_tempt run_command(R*tcommandsR titcmd_nametsub_cmd((s//usr/lib64/python2.7/distutils/command/bdist.pytrunys"     (s bdist-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__t descriptionRR 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.pyts  install_lib.pyc000064400000015031152345555050007566 0ustar00 {fc@sdZdZddlZddlZddlmZddlmZeedrcej dZ ndZ d efd YZ dS( skdistutils.command.install_lib Implements the Distutils 'install_lib' command (install all Python modules).s$Id$iN(tCommand(tDistutilsOptionErrortextseptpys.pyt install_libc BseZdZddd d!d#d$d%gZdd dgZid d 6ZdZdZdZ dZ dZ dZ dZ dZdZdZRS(&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(tNonet install_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|jtsy.t|j|_|jdkrtnWqttfk rtd qXndS(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|jjrA|j|ndS(N(tbuildRR t distributionthas_pure_modulest byte_compile(Rtoutfiles((s5/usr/lib64/python2.7/distutils/command/install_lib.pytrunZs  cCsN|jsJ|jjr(|jdn|jjrJ|jdqJndS(Ntbuild_pyt build_ext(RRRt run_commandthas_ext_modules(R((s5/usr/lib64/python2.7/distutils/command/install_lib.pyRjs  cCsLtjj|jr0|j|j|j}n|jd|jdS|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 Cstjr|jddSddlm}|jdj}|jrp||ddd|jd|d |j n|j dkr||d|j d|jd|d |j d |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( R0t get_outputstgetattrtlenR%tseptappendR&tjoin( Rthas_anyt build_cmdt cmd_optiont output_dirt build_filesRt prefix_lentoutputstfile((s5/usr/lib64/python2.7/distutils/command/install_lib.pyt_mutate_outputss  $cCsg}x|D]z}tjjtjj|d}|tkrGq n|jrd|j|dn|jdkr |j|dq 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_filenamess "  cCsu|j|jjdd|j}|jr?|j|}ng}|j|jjdd|j}|||S(sReturn 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_outputst ext_outputs((s5/usr/lib64/python2.7/distutils/command/install_lib.pyR4s   cCsrg}|jjr:|jd}|j|jn|jjrn|jd}|j|jn|S(sGet 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_inputss(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=R slalso 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__t descriptionR 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.pyts  install_egg_info.pyc000064400000007240152345555050010600 0ustar00 {fc@sdZddlmZddlmZmZddlZddlZddlZdefdYZ dZ dZ d Z dS( sdistutils.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 gZdZdZdZdZRS( 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(tNonet install_dir(tself((s:/usr/lib64/python2.7/distutils/command/install_egg_info.pytinitialize_optionsscCs|jdddtt|jjtt|jjtjd f}t j j |j ||_ |j g|_dS(Nt install_libRs%s-%s-py%s.egg-infoi(RR(tset_undefined_optionst to_filenamet safe_namet distributiontget_namet safe_versiont get_versiontsystversiontostpathtjoinRttargettoutputs(Rtbasename((s:/usr/lib64/python2.7/distutils/command/install_egg_info.pytfinalize_optionsscCs|j}tjj|rGtjj| rGtj|d|jnptjj|r||j tj |jfd|n;tjj|j s|j tj |j fd|j nt jd||jst|d}|jjj||jndS(Ntdry_runs Removing s Creating s Writing %stw(RRRtisdirtislinkRt remove_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.pyt get_outputs/s(s install-dir=Rsdirectory to install to( t__name__t __module__t__doc__t descriptiont user_optionsRRR)R*(((s:/usr/lib64/python2.7/distutils/command/install_egg_info.pyR s   cCstjdd|S(sConvert 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(sConvert 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|jddS(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.pyR Is( R-t distutils.cmdRt distutilsRRRRR1RR RR (((s:/usr/lib64/python2.7/distutils/command/install_egg_info.pyts$,  register.pyo000064400000023740152345555050007140 0ustar00 {fc@szdZdZddlZddlZddlZddlmZddlmZddl m Z defdYZ dS( shdistutils.command.register Implements the Distutils 'register' command (register with the repository). s$Id$iN(twarn(t PyPIRCCommand(tlogtregistercBseZdZejddgZejdddgZddfgZdZd Z d Z d Z d Z d Z dZdZdZddZRS(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.pyttcCs#tj|d|_d|_dS(Ni(Rtinitialize_optionstlist_classifiersR(R((s2/usr/lib64/python2.7/distutils/command/register.pyR s  cCs>tj|id|jfd6dd6}||jjds   sdist.pyo000064400000040470152345555050006441 0ustar00 {fc@sdZdZddlZddlZddlZddlmZddlmZddlm Z ddl m Z m Z m Z mZddlmZdd lmZmZmZdd lmZdd l mZdd lmZd Zde fdYZdS(sadistutils.command.sdist Implements the Distutils 'sdist' command (create a source distribution).s$Id$iN(tglob(twarn(tCommand(tdir_utiltdep_utilt file_utilt archive_util(tTextFile(tDistutilsPlatformErrortDistutilsOptionErrortDistutilsTemplateError(tFileList(tlog(t convert_pathcCsddlm}ddlm}g}x6|jD](}|jd|d||dfq3W|j||jddS(soPrint all possible values for the 'formats' option (used by the "--help-formats" command-line option). i(t FancyGetopt(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  tsdistcBs6eZdZdZd<d=d?d@dAdBdCdDdEddddfdFdGdHdIgZdd ddddgZd'd>d(efgZidd 6d d6Z id)d*6d+d,6Z d-efgZ d.Z d/Z d0Zd1Zd2Zd3Zd4Zd5Zd6Zd7Zd8Zd9Zd: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]s no-defaultss"don't include the default file settprunesspecifically 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|jdkry|jtjg|_Wqtk rt ddtjqXnt j |j}|rt d|n|j dkrd|_ ndS(NtMANIFESTs MANIFEST.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!|jD]}|j|qW|j|jrGdS|jdS(N(R tfilelisttget_sub_commandst run_commandt get_file_listR/tmake_distribution(Rtcmd_name((s//usr/lib64/python2.7/distutils/command/sdist.pytruns   cCs7tdt|jjd}|j|jdS(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_metadatas   cCstjj|j}| rP|jrP|j|jj|jjdS|sq|j dd|jn|jj |j r|j n|r|j n|jr|jn|jj|jj|jdS(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.pyRDs(            cCsd|jjg}x|D]}t|tr|}d}x:|D]2}tjj|rAd}|jj|PqAqAW|s|j dt j |dqqtjj|r|jj|q|j d|qWdd g}xB|D]:}t tjj t|}|r|jj|qqW|jd }|jjrb|jj|jnxM|jD]B\} } } } x-| D]%} |jjtjj | | qWqlW|jjrlx|jjD]}t|trt|}tjj |re|jj|qeq|\}} x?| D]7}t|}tjj |r*|jj|q*q*WqWn|jjr|jd }|jj|jn|jjr|jd }|jj|jn|jjr|jd }|jj|jndS(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(RIt script_namet isinstancettupleR;RMtexistsRARRtstringtjointfilterRNRtextendtget_finalized_commandthas_pure_modulestget_source_filest data_filesthas_data_fileststrR thas_ext_modulesthas_c_librariest has_scripts(Rt standardstfntaltstgot_ittoptionaltpatterntfilesRYtpkgtsrc_dirt build_dirt filenamestfilenametitemtdirnameR"RZR[R\((s//usr/lib64/python2.7/distutils/command/sdist.pyRSs^      '    cCstjd|jt|jdddddddddddd}zwxp|j}|d krhPny|jj|WqLtt fk r}|j d |j |j |fqLXqLWWd |j Xd S( sRead 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_commentsit skip_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 d d g}d |dj ||f}|jj|dddS(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(RRtbase_dirtsepstvcs_dirstvcs_ptrn((s//usr/lib64/python2.7/distutils/command/sdist.pyRUMs  cCsk|jr$tjd|jdS|jj}|jdd|jtj |j|fd|jdS(sWrite 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 RR-RARttinserttexecuteRt write_file(Rtcontent((s//usr/lib64/python2.7/distutils/command/sdist.pyRVgs    cCsStjj|jstSt|jd}z|j}Wd|jX|dkS(NtrUs+# file GENERATED by distutils, do NOT edit (R;RMRNR-tFalsetopenRR(Rtfpt first_line((s//usr/lib64/python2.7/distutils/command/sdist.pyROvs cCsytjd|jt|j}xF|D]>}|j}|jds)| rWq)n|jj|q)W|jdS(sRead 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 RR-Rtstript startswithRARR(RR-R((s//usr/lib64/python2.7/distutils/command/sdist.pyRPs  cCs|j|tj||d|jttdrHd}d|}nd}d|}|sntjdn tj |x_|D]W}tj j |stjd|qtj j ||}|j ||d|qW|jjj|dS( sCreate 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(tmkpathRt create_treeRthasattrR;RR RRRMRNRbt copy_fileRItmetadatatwrite_pkg_info(RRRtRRtfiletdest((s//usr/lib64/python2.7/distutils/command/sdist.pytmake_release_trees      c Cs|jj}tjj|j|}|j||jjg}d|j kr}|j j |j j |j j dnxd|j D]Y}|j ||d|d|jd|j}|j ||jjj dd|fqW||_|jstj|d|jndS( sCreate 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()'. ttarRR4R5RtRN(RIRR;RMRbR2RRARtRRtpoptindext make_archiveR4R5t dist_filesR3R1Rt remove_treeR(RRt base_nameR3tfmtR((s//usr/lib64/python2.7/distutils/command/sdist.pyREs +    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_filess(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](s no-defaultsNs"don't include the default file set(R Nsspecifically 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__t descriptionRRt user_optionstboolean_optionsRt help_optionst negative_optR:t sub_commandsR6R@RGRLRDRSRTRURVRORPRRER(((s//usr/lib64/python2.7/distutils/command/sdist.pyR$sn            ( R !    * (t__doc__t __revision__R;RaRRtwarningsRtdistutils.coreRt distutilsRRRRtdistutils.text_fileRtdistutils.errorsRR R tdistutils.filelistR R tdistutils.utilR RR(((s//usr/lib64/python2.7/distutils/command/sdist.pyts   " bdist_rpm.pyc000064400000042310152345555050007255 0ustar00 {fc@sdZdZddlZddlZddlZddlmZddlmZddl m Z ddl m Z ddl mZmZmZmZdd lmZd efd YZdS( swdistutils.command.bdist_rpm Implements the Distutils 'bdist_rpm' command (create RPM source and binary distributions).s$Id$iN(tCommand(tDEBUG(t write_file(tget_python_version(tDistutilsOptionErrortDistutilsPlatformErrortDistutilsFileErrortDistutilsExecError(tlogt bdist_rpmc+BseZdZd^d_d`dadbdcdddedfdgdhdidjdkdldmdndodpdqdrdsdtdudvdwdxdydzd{d|d}d~ddddddddg)Zd2d7d;d0dSgZid2d56d7d96d;d=6ZdVZdWZdXZ dYZ dZZ d[Z d\Z RS(screate an RPM distributions bdist-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 files source-onlysonly generate source RPMs binary-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 ") [default: maintainer or author from setup script]s packager=sBRPM packager (eg. "Jane Doe ") [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 builds force-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_onlyt binary_onlyt source_onlyt use_bzip2tdistribution_nametgrouptreleasetserialtvendortpackagert doc_filest changelogticont prep_scriptt build_scripttinstall_scriptt clean_scriptt verify_scriptt pre_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_optionssN                                      cCs|jdd |jdkrR|js4tdntjj|jd|_n|j dkr|j ryt j |_ qd|_ n|j rtdntj dkrtdtj n|jr|jrtd n|jjsd |_n|jdd |jdS(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_optionss0         cCs|jdd|jdd|jj|jjf|jd|jdt|jtrxEdD]:}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|jddS(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_stringRAt get_contacttget_contact_emailtensure_string_listt isinstanceRtlistR;R<texiststappendt_format_changelogRtensure_filename(R5treadme((s3/usr/lib64/python2.7/distutils/command/bdist_rpm.pyRCs>    !                  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||jfd ||jrdS|j j}|jd }|jr4dg|_n dg|_|jd ||j _|jd}|d}|j|||jrtj j|jr|j|j|qtd|jntjddg} tj jdstj jdrdg} n|jr)| jdn&|jrB| jdn | jd|j r| j!ddtj j"|j gn|j#s| jdn|j$r| jdn| j|d} | d} d | d!} d"| | |f} tj%| }zg}d}xt|j'}|s(Pnt(j)t(j*|}t+|d#ksXt,|j|d$|dkr|d}qqW|j-}|rt.d%t/| nWd|j-X|j0| |j1s|j j2rt3}nd&}|js{tj j |d |}tj j|s1t,|j4||jtj j |j|}|j jjd'||fn|jsx|D]}tj j |d |}tj j|r|j4||jtj j |jtj j5|}|j jjd'||fqqWqndS()Nsbefore _get_package_data():svendor =s packager =s doc_files =s changelog =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_commandRtformatst run_commandtget_archive_filest copy_fileR RMRRtinfoRRNRR2textendtabspathR0R tpopenRtreadlinetstringtsplittstriptlentAssertionErrortcloseRtreprtspawntdry_runRBRt move_filetbasename(R5tspec_dirtrpm_dirR t spec_pathtsaved_dist_filesRWtsourcet source_dirtrpm_cmdt nvr_stringtsrc_rpmt non_src_rpmtq_cmdtoutt binary_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_pathsc Csd|jjd|jjjddd|jjd|jjdddd|jjg}|jd d d g|jr|jd n |jd |jd|jj d|j ddg|j s|jj s|jdqn|jd|j x~dBD]v}t |tj|}t|trj|jd|tj|fq|dCk r|jd||fqqW|jjdkr|jd|jjn|jr|jd|jn|jr|jdtj|jn|jr;|jdtjj|jn|jrT|jd n|jdd!|jjgd"|jtjjtjd#f}d$|}|j rd%|}nd&|}dDd*d+|fd,d-|fdEdFdGdHdIdJg }x|D]\}} } t || }|s'| r|jdd;|g|ro|jtj!t"|d<j#d=q|j| qqW|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(RRRRRRN(R*R!s&%setup -n %{name}-%{unmangled_version}(RR$srm -rf $RPM_BUILD_ROOT(RR%N(RR&N(RR'N(RR(N(RR)N(&RAR]t get_versiontreplaceRtget_descriptionRgRRNt get_licenseRR4RBtgetattrRktlowerRKRLR=Rtget_urlRR.R R;R<RuR3tget_long_descriptionRR>targvR1RltopentreadRR( R5t spec_filetfieldtvaltdef_setup_callt def_buildt install_cmdtscript_optionstrpm_opttattrtdefault((s3/usr/lib64/python2.7/distutils/command/bdist_rpm.pyR_s        #     # &       +     cCs|s |Sg}xtjtj|dD]l}tj|}|ddkrg|jd|gq,|ddkr|j|q,|jd|q,W|ds|d=n|S(sKFormat the changelog correctly and convert it to a list of strings s it*RRs (RkRlRmRgRN(R5Rt new_changelogR((s3/usr/lib64/python2.7/distutils/command/bdist_rpm.pyRO5s"  N(s bdist-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(s source-onlyNsonly generate source RPM(s binary-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 ") [default: maintainer or author from setup script](s packager=NsBRPM packager (eg. "Jane Doe ") [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-tempR s"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(s force-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__t descriptionRt user_optionstboolean_optionst negative_optR6RDRCRRR_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.pyts   "install_egg_info.pyo000064400000007240152345555050010614 0ustar00 {fc@sdZddlmZddlmZmZddlZddlZddlZdefdYZ dZ dZ d Z dS( sdistutils.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 gZdZdZdZdZRS( 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(tNonet install_dir(tself((s:/usr/lib64/python2.7/distutils/command/install_egg_info.pytinitialize_optionsscCs|jdddtt|jjtt|jjtjd f}t j j |j ||_ |j g|_dS(Nt install_libRs%s-%s-py%s.egg-infoi(RR(tset_undefined_optionst to_filenamet safe_namet distributiontget_namet safe_versiont get_versiontsystversiontostpathtjoinRttargettoutputs(Rtbasename((s:/usr/lib64/python2.7/distutils/command/install_egg_info.pytfinalize_optionsscCs|j}tjj|rGtjj| rGtj|d|jnptjj|r||j tj |jfd|n;tjj|j s|j tj |j fd|j nt jd||jst|d}|jjj||jndS(Ntdry_runs Removing s Creating s Writing %stw(RRRtisdirtislinkRt remove_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.pyt get_outputs/s(s install-dir=Rsdirectory to install to( t__name__t __module__t__doc__t descriptiont user_optionsRRR)R*(((s:/usr/lib64/python2.7/distutils/command/install_egg_info.pyR s   cCstjdd|S(sConvert 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(sConvert 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|jddS(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.pyR Is( R-t distutils.cmdRt distutilsRRRRR1RR RR (((s:/usr/lib64/python2.7/distutils/command/install_egg_info.pyts$,  install_headers.pyc000064400000004317152345555050010440 0ustar00 {fc@s6dZdZddlmZdefdYZdS(sdistutils.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 gZdgZdZdZd 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(tNonet install_dirRtoutfiles(tself((s9/usr/lib64/python2.7/distutils/command/install_headers.pytinitialize_optionss  cCs|jddddS(NtinstallRRR(RR(RR(tset_undefined_options(R((s9/usr/lib64/python2.7/distutils/command/install_headers.pytfinalize_optionss cCsf|jj}|sdS|j|jx9|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.pyt get_outputs0s(s install-dir=Rs$directory to install header files to(RRs-force installation (overwrite existing files)( t__name__t __module__t descriptiont 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.pytsregister.pyc000064400000023740152345555050007124 0ustar00 {fc@szdZdZddlZddlZddlZddlmZddlmZddl m Z defdYZ dS( shdistutils.command.register Implements the Distutils 'register' command (register with the repository). s$Id$iN(twarn(t PyPIRCCommand(tlogtregistercBseZdZejddgZejdddgZddfgZdZd Z d Z d Z d Z d Z dZdZdZddZRS(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.pyttcCs#tj|d|_d|_dS(Ni(Rtinitialize_optionstlist_classifiersR(R((s2/usr/lib64/python2.7/distutils/command/register.pyR s  cCs>tj|id|jfd6dd6}||jjds   install_scripts.pyo000064400000005560152345555050010531 0ustar00 {fc@sbdZdZddlZddlmZddlmZddlmZdefdYZ dS( sudistutils.command.install_scripts Implements the Distutils 'install_scripts' command, for installing Python scripts.s$Id$iN(tCommand(tlog(tST_MODEtinstall_scriptscBsYeZdZddddgZdd gZd Zd ZdZdZ dZ 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(tNonet install_dirRt build_dirt skip_build(tself((s9/usr/lib64/python2.7/distutils/command/install_scripts.pytinitialize_optionss   cCs*|jdd |jdd d d dS( Ntbuildt build_scriptsR tinstallRR RR (RR (RR (RR(R R (tset_undefined_options(R ((s9/usr/lib64/python2.7/distutils/command/install_scripts.pytfinalize_options#s  cCs|js|jdn|j|j|j|_tjdkrxq|jD]`}|j rrt j d|qPtj |t dBd@}t j d||tj||qPWndS(NRtposixschanging mode of %simischanging mode of %s to %o(R t run_commandt copy_treeR R toutfilestostnamet get_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__t descriptionRt 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.pyts  config.pyo000064400000030615152345555050006560 0ustar00 {fc@sdZdZddlZddlZddlmZddlmZddlm Z ddl m Z idd 6d d 6Z d efd YZ edZdS(sdistutils.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$iN(tCommand(tDistutilsExecError(tcustomize_compiler(tlogs.ctcs.cxxsc++tconfigc Bs.eZdZd,d-d.d/d0d1d2d3d4g ZdZdZdZdZdZ dZ dZ dZ 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, ...) takens dump-sources=dump generated source files before attempting to compile themcCsLd|_d|_d|_d|_d|_d|_d|_g|_dS(Ni( tNonetcompilertcct include_dirst librariest library_dirsR t dump_sourcet temp_files(tself((s0/usr/lib64/python2.7/distutils/command/config.pytinitialize_options6s       cCs|jdkr'|jjpg|_n-t|jtrT|jjtj|_n|jdkrog|_n$t|jtr|jg|_n|j dkrg|_ n-t|j tr|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.pytrunUscCsddlm}m}t|j|s|d|jd|jdd|_t|j|jrx|jj|jn|j r|jj |j n|j r|jj |j qndS(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    cCsdt|}t|d}|rUx|D]}|jd|q*W|jdn|j||ddkr|jdn|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_compiles c Cs|j||||\}}tjjtjj|d} |jj|g| d|d|d||jjdk r| |jj} n|j j | ||| fS(NiRRt target_lang( R=RtpathtsplitexttbasenameR tlink_executablet exe_extensionR Rtappend( RR-R.RRRR/R6R<tprog((s0/usr/lib64/python2.7/distutils/command/config.pyt_links"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_cleans    RcCsbddlm}|jd}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_cpps    c Cs|j|j||||\}}t|trItj|}nt|}d} x9|j} | dkrzPn|j| r^d} Pq^q^W|j |j | S(sConstruct 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_cpps      cCs{ddlm}|jy |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.pyt try_compiles     c Csddlm}m}|jy&|j||||||d} Wn||fk red} nXtj| rxdp{d|j| S(sTry 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_links     c Csddlm}m}|jyA|j||||||\} } } |j| gd} Wn ||tfk rd} nXtj| rdpd|j | S(sTry 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|jg}|r*|jd|n|jd|rQ|jd|n|jd||jddj|d}|j|||||S(sDetermine 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(sDetermine 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(sDetermine 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(R Ns1show every action (compile, link, run, ...) taken(s dump-sourceNs=dump generated source files before attempting to compile them(t__name__t __module__t descriptionR t user_optionsRRRR&R3R8R=RFRMRPRXRYR[R^RcRfRg(((s0/usr/lib64/python2.7/distutils/command/config.pyRsT            !cCsb|dkr tjd|n tj|t|}ztj|jWd|jXdS(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 s  Abuild_clib.pyc000064400000014313152345555050007364 0ustar00 {fc@s{dZdZddlZddlmZddlmZddlmZddl m Z dZ d efd YZ dS( sdistutils.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$iN(tCommand(tDistutilsSetupError(tcustomize_compiler(tlogcCsddlm}|dS(Ni(tshow_compilers(tdistutils.ccompilerR(R((s4/usr/lib64/python2.7/distutils/command/build_clib.pyRst build_clibcBseZdZdddddgZdd gZdddefgZdZdZ dZ dZ dZ dZ dZRS(s/build C/C++ libraries used by Python extensionss build-clib=tbs%directory to build C/C++ libraries tos build-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 R tcompiler(tself((s4/usr/lib64/python2.7/distutils/command/build_clib.pytinitialize_options6s        cCs|jdddd d d |jj|_|jrG|j|jn|jdkrn|jjpeg|_nt|jtr|jjt j |_ndS( NtbuildRRRR R (RR(RR(RR(R R (R R ( 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 |jn|j dk rx-|j D]\}}|jj ||qWn|j dk rx$|j D]}|jj |qWn|j|jdS(Ni(t new_compilerRtdry_runR (RRR!RR"R RRRtset_include_dirsRt define_macroRtundefine_macrotbuild_libraries(RR!tnametvaluetmacro((s4/usr/lib64/python2.7/distutils/command/build_clib.pytrun_s    cCst|tstdnx|D]}t|t rVt|dkrVtdn|\}}t|tstddnd|kstjdkrtj|krtdd|d nt|ts"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_namess  cCs|j|jg}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_filess" c Csx|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$"    (s build-clib=Rs%directory to build C/C++ libraries to(s build-temp=Rs,directory to put temporary build by-products(R R s"compile with debugging information(R R s2forcibly build everything (ignore file timestamps)(s compiler=R sspecify the compiler typeN(t__name__t __module__t descriptiont 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.pyts  bdist_msi.pyo000064400000056456152345555050007303 0ustar00 {fc@sdZddlZddlZddlmZddlmZddlmZddl m Z ddl m Z ddl mZdd lmZddlZdd lmZmZmZdd lmZmZmZmZd efd YZdefdYZdS(s# Implements the bdist_msi command. iN(tget_python_version(tCommand(t remove_tree(t StrictVersion(tDistutilsOptionError(tlog(t get_platform(tschematsequencettext(t DirectorytFeaturetDialogtadd_datatPyDialogcBsVeZdZdZdZdddZdddZddd Zd ZRS( sDialog 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||jddS(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(sAdd 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 associatediiiii8i(t pushbuttonR(RRtnexttnametactivetflags((s3/usr/lib64/python2.7/distutils/command/bdist_msi.pytback+s tCancelc Cs>|rd}nd}|j|d|jddd|||S(sAdd 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(sAdd 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 associatediiiii8i(RR(RRRRRR((s3/usr/lib64/python2.7/distutils/command/bdist_msi.pyRAs c Cs:|j|t|j|d|jdddd||S(sAdd 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=eZdZdedfdddefdddd fd ed d fd ddfdddfdddfdedfdedfdedfg Zdd ddgZddddd d!d"d#d$d%d&d'd(d)d*d+d,d-d.d/gZd0Zd1Z d2Z d3Z d4Z d5Z d6Zd7Zd8ZRS(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|jdj}tjj|d|_nt}|j rz|j j rz||_ n|j r|j g|_ |j r|j j r|j |krtd|fqnt|j|_ |jdd d |jr tdn|jr\xF|j jD]%}|jtjj|kr Pq q Wtd|jnd|_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_optionss8        cCsz|js|jdn|jddd}|j|_|j|_d|_|jd}d|_d|_|jj r|j }|st j dd!}nd|j |f}|jd}tjj|jd ||_ntjd |j|jt jjdtjj|jd |jt jd=|j|j|jj}|j|}tjj|}tjj|rtj|n|jj }|j!} | s|j"} n| sd } 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|fn|j/r| j.d|j/fn| rt0|j)d| n|j1|j2|j3|j4|j)j5t6|jdrTd|j p5d|f}|jj7j.|n|j8svt9|jd|j:ndS(Ntbuildtinstalltreinit_subcommandsiit install_libis.%s-%stlibsinstalling to %stPURELIBtUNKNOWNs%d.%d.%ds Python %s %ss Python %st DistVersiont ARPCONTACTtARPURLINFOABOUTtPropertyt dist_filesR*tanytdry_run(;R9t run_commandtreinitialize_commandR2tprefixtwarn_dirtcompiletoptimizeRFRGR7tsystversionR3RARCRDREt build_baset build_libRtinfotensure_finalizedtinserttruntmkpathR8t get_fullnametget_installer_filenametabspathtexiststunlinktmetadatatauthort maintainert get_versionRtmsilibt init_databaseRtgen_uuidtdbt add_tablesRt author_emailtmaintainer_emailtappendturlR tadd_find_pythont add_filest add_scriptstadd_uitCommitthasattrR[R4RR](RRQRSR7tplat_specifierRPtfullnametinstaller_nameRrRsRetsversiont product_nametpropstemailttup((s3/usr/lib64/python2.7/distutils/command/bdist_msi.pyRks|        %                  c Cs|j}tjd}tjj|j}t||d|dd}t |ddddddd}||d fg}x|j |j gD]}d|}d|} } d} ||j krd } d } nd |} d} t || | | d| d|}t|||||| }|j |||fqW|j i}x|D]\}}}|g}xg|r|j}xNtj|jD]:}tjj|j|}tjj|r d |j||f}||} t||||| |}|j |q|js.|j|j|dn||kr|j|}||<||jkr|jr|td|nd||_qq||}t|jd|||j|d|jfgqWqiW|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 R1R R<t other_versionR}RtpoptlistdirtabsoluteREtisdirt make_shortt componenttstart_componenttlogicaltadd_fileR:RLRR tcommit(RRytcabtrootdirtroottftitemsRettargetRtdefaulttdescRtleveltdirtseentfeaturettodotfiletafiletshorttnewdirtkey((s3/usr/lib64/python2.7/distutils/command/bdist_msi.pyRs\    !          +c Csd}x|jD]}d|}d|}d|}d|}d|}d|}d|} d |} d |} d |} tjrd} nd } t|jd|d |d| f|d|d| fgt|jd||f||fgt|jd|d | d|df| d!| d|df| d"| d| dfgt|jd|||f| ||df| d|d fgt|jd|||f| ||df| d|d fgt|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.exeis)SOFTWARE\Python\PythonCore\%s\InstallPathspython.machine.s python.user.sPYTHON.MACHINE.s PYTHON.USER.tPythonFromMachinetPythonFromUsert PythonExeRtPYTHONiit RegLocatorit AppSearcht CustomActioni3it[t]s ]\python.exetInstallExecuteSequencetInstallUISequencet ConditionRis NOT TARGETDIRiNii3i3i3(R<RvtWin64R RyR1(Rtstarttvert install_patht machine_regtuser_regt machine_propt user_proptmachine_actiont user_actiont exe_actionttarget_dir_proptexe_proptType((s3/usr/lib64/python2.7/distutils/command/bdist_msi.pyREsJ                       cCsQ|jrd}x|j|jgD]l}d|}d|}t|jd|d||jfgt|jd|d||fg|d7}q#Wn|jrMtjj |j d }t |d }|j d |j t |jj |jt|jd d tj|fgt|jddgt|jddgndS(Nisinstall_script.RRi2Rs &Python%s=3ispreinstall.batRsrem =""" %1 %0 exit """ tBinaryt PreInstallis NOT Installedi(RiRN(Rs NOT Installedi(R:R<RR RyRLR;RCRDRER2topentwritetreadtcloseRvRR1(RRRtinstall_actionRtscriptfnR((s3/usr/lib64/python2.7/distutils/command/bdist_msi.pyR{s,            cCsA|j}d}}d}d}d}d}d}t|dddddddgt|dddddgt|ddddddgt|d.tjt|d/tjt|d0||||||d1d1d1 } | jd2| jd3d1d4d| j d5d6d4d| jd7d8d9d:d;d<d=| jd>d8d?d:d@d<dA| j d1d5dBd1} | j dCdDt|dE||||||d1d1d1 } | jdF| jd3d1d4d| j d5d6d4d| jd7d8d9d:d;d<dG| jd>d8d?d:d@d<dA| j d1d5dBd1} | j dCdDt|dH||||||d1d1d1 } | jdI| jd3d1d4d| j d5d6d4d| jdJd8dKd:d@d<dA| j d1d5dBd1} | j dCdLt|dM||||dN|dOdOdOdPt } | jdQd8dRdSd8d<dT| jdJd@dUdVd@d<dW| jdXd@dYdZddd[| j d\d]d@d^dZd_d`daddd | jdDdbdBdD} | j dCdD| j dbdOdBdb} | j dCdb| j dOdDdBdO} | j dCdOt|d dddZdcdd|dedd }|jdedddVdfddg|jdhdidjdkdlddmdj dCdn|jdodpdjdkdlddqdj dCdr|jdsddjdkdlddtdj dCdu|jdvdwdjdkdldd5dj dCdx|jdydkdjdkdlddbdj dCdz|jd{d|djdkdldd}dj dCd~|jdddjdkdlddOdj dCdt|dddddd|dmdmdm }|jdXdfd8dddd|jdqdjdddddqdm} | j dCdD|jdmddddddmdq} | j dCdLt|ddddd||dLdLdL }|jdXdfd8dddd|jdLddddddLd} | j dCdDt|d ||||||d5d5d5 }|jdJd8d9d:dd<d|jd|jd.d8dd:d@d<d} | jd.dX|jdd8dd:dd<d} | jddX|jd6dd4d|j ddd4d|j d5d} | j ddt|d&||||||ddd5 }|jd|jdd8ddd@dd|jj|jd3dd4d|j dd5} d}| j ddd|xF|j|jgD]1}|d7}| j dd|d|d|qW| j ddd|d| j dCdLd|d|j d5d} | j dd|j ddd8dddiddddd } | j dd|j}d|}d|}|jdd8dSdd8dd} | jd|| jd|| jd|| jd||j ddd8ddddd|ddd } | jd|| jd|| jd|| jd|t|d||||||ddddPt }|jdQd8dRdSd8d<d|jdJd@d@dVd@d<d|jdXd@ddZddd|j ddd@ddZdddddd |jdd}ddj dCdLt|d#||||||ddd5 }|jd|jdd8ddddddgd }|jddddd@d|jddddd@d|jd6dd4d|j dd5} | j dddd| j dCdLdd|j d5d} | j ddt|d,||||||d5d5d5dPt }|jdQd@d8dSd8d<d|jdXdddddd|jddddd@dd|jd.d9d|d9d@dd} | jd.dX|j ddddiddddddd } | jdd|jd3dd4t |j dd5d4t |j d5d6j ddt|d)||||||ddd5 }|jd|jdd8ddZdwdd|jdd8ddZddddgd }|jddddSdd|jddddSdd|jd3dd4t |j d1d5} | j dddd| j ddddR| j dddd`| j dddd| j dddd| j dddd| j dddd| j dddd| j dCdLdd@|j d5dj dddS(Ni2iri,s[ProductName] SetupiiRZt DefaultUIFonttDlgFont8t ErrorDialogtErrorDlgt Progress1tInstallt Progress2tinstallstMaintenanceForm_ActiontRepairt WhichUserstALLt TextStyletTahomai it DlgFontBold8it VerdanaBold10tVerdanai t VerdanaRed9iRt PrepareDlgs(Not Privileged or Windows9x or Installedit WhichUsersDlgs.Privileged and not Windows9x and not InstalleditSelectFeaturesDlgs Not InstalleditMaintenanceTypeDlgs,Installed AND NOT RESUME AND NOT Preselectedit ProgressDlgit 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 Description2iis.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] Installert DescriptionitReturnt FilesInUseitRetrytbitmapRiis{\DlgFontBold8}Files in Useiis8Some files that need to be updated are currently in use.tTexti7iJsThe 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.tListtListBoxikiitFileInUseProcesstIgnoreieit ErrorTexti0RtNixiHiQitNotErrorNotYitYestErrorYestAtAbortt ErrorAborttCi*t ErrorCanceltIt ErrorIgnoretOitOktErrorOktRit ErrorRetryt CancelDlgiiUiis;Are you sure you want to cancel [ProductName] installation?i9i8iitWaitForCostingDlgsRPlease 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 ActionDataiR#t SpawnDialogsSelect 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 locationtEnabletShowtDisabletHideiiRt DiskCostDlgtOKs&{\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 VolumeListtVolumeCostListidiis{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.t StatusLabelsStatus:t ProgressBaris Progress donet SetProgresstProgresss)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"i tRemovingi tremovesi is MaintenanceForm_Action<>"Change"(RR(RR(RR(RR(RR(RR(RRi Ni(RRiNi(RRi Ni(RRi ii(Rs(Not Privileged or Windows9x or Installedi(Rs.Privileged and not Windows9x and not Installedi(Rs Not Installedi(Rs,Installed AND NOT RESUME AND NOT Preselectedi(RNi(RyR R1R RRRRR R"RteventtFalsetcontrolR RtmappingRFRmR<Rt conditionR&t radiogrouptadd(RRytxtyRRRtmodaltmodelesstfatalR-t user_exitt exit_dialogtinuseterrorR"tcostingtpreptseldlgtorderReRtinstall_other_condtdont_install_other_condtcostt whichuserstgtprogresstmaint((s3/usr/lib64/python2.7/distutils/command/bdist_msi.pyRs                .......$$$ !!        "  % cCsT|jr%d||j|jf}nd||jf}tjj|j|}|S(Ns%s.%s-py%s.msis %s.%s.msi(R7R3RCRDRER8(RRt base_nameR((s3/usr/lib64/python2.7/distutils/command/bdist_msi.pyRns   (R'R(t descriptionR1Rt user_optionstboolean_optionsRIRR=RORkRRRRRn(((s3/usr/lib64/python2.7/distutils/command/bdist_msi.pyR*TsP     ) [ 6 6 & >(R)RdRCt sysconfigRtdistutils.coreRtdistutils.dir_utilRtdistutils.versionRtdistutils.errorsRt distutilsRtdistutils.utilRRvRRR R R R R RR*(((s3/usr/lib64/python2.7/distutils/command/bdist_msi.pyts "=build_scripts.pyo000064400000010575152345555050010164 0ustar00 {fc@sdZdZddlZddlZddlmZddlmZddlm Z ddl m Z ddl m Z ejd Zd efd YZdS( sRdistutils.command.build_scripts Implements the Distutils 'build_scripts' command.s$Id$iN(tST_MODE(tCommand(tnewer(t convert_path(tlogs^#!.*python[0-9.]*([ ].*)?$t build_scriptscBsSeZdZdddgZdgZd Zd Zd Zd ZdZ RS(s("build" scripts (copy and fixup #! line)s build-dir=tdsdirectory to "build" (copy) totforcetfs1forcibly build everything (ignore file timestampss executable=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( NtbuildRR RR (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|jdS(N(R t copy_scripts(R((s7/usr/lib64/python2.7/distutils/command/build_scripts.pytrun/s c Cstd}|j|jg}x|jD]}d}t|}tjj|jtjj|}|j ||j rt || rt j d|q,nyt|d}Wn&tk r|jsnd}n]X|j}|s |jd|q,ntj|}|r=d}|jdp7d} n|rt jd||j|jst|d } |js| jd |j| fnK| jd tjj|jd d |jd |jdf| f| j|j| jn|r>|jq>q,|r.|jn|j||q,Wtj dkrx|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 %siims!changing mode of %s from %o to %oN($t __import__tmkpathR R RtostpathtjointbasenametappendRRRtdebugtopentIOErrortdry_runR treadlinetwarnt first_line_retmatchtgrouptinfotis_python_buildtwriteR tget_config_vart writelinest readlinestcloset copy_filetnametstatRtchmod(Rt _sysconfigRtscripttadjusttoutfileRt first_lineR.t post_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(s executable=R s*specify final destination interpreter path( t__name__t __module__t descriptiont 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.pytsclean.pyc000064400000005775152345555050006372 0ustar00 {fc@sbdZdZddlZddlmZddlmZddlmZdefdYZ dS( sBdistutils.command.clean Implements the Distutils 'clean' command.s$Id$iN(tCommand(t remove_tree(tlogtcleancBsJeZdZddddddgZd gZdZdZdZRS(s-clean up temporary files from 'build' commands build-base=tbs2base build directory (default: 'build.build-base')s build-lib=s<build directory for all modules (default: 'build.build-lib')s build-temp=tts7temporary build directory (default: 'build.build-temp')sbuild-scripts=s<build directory for scripts (default: 'build.build-scripts')s bdist-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 R tbdistR (R R (R R (R R (R R (R R (tset_undefined_options(R((s//usr/lib64/python2.7/distutils/command/clean.pytfinalize_options*s  cCstjj|jr.t|jd|jntjd|j|jrx[|j |j |j fD]>}tjj|rt|d|jqctj d|qcWn|jsy'tj |jtjd|jWqtk rqXndS(Ntdry_runs%'%s' does not exist -- can't clean its removing '%s'(tostpathtexistsR RRRtdebugRR R R twarntrmdirR tinfotOSError(Rt directory((s//usr/lib64/python2.7/distutils/command/clean.pytrun3s$       (s build-base=Rs2base build directory (default: 'build.build-base')N(s build-lib=Ns<build directory for all modules (default: 'build.build-lib')(s build-temp=Rs7temporary build directory (default: 'build.build-temp')(sbuild-scripts=Ns<build directory for scripts (default: 'build.build-scripts')(s bdist-base=Ns+temporary directory for built distributions(RRs7remove all build output, not just temporary by-products( t__name__t __module__t descriptionRt 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.pyts  bdist_rpm.pyo000064400000042164152345555050007300 0ustar00 {fc@sdZdZddlZddlZddlZddlmZddlmZddl m Z ddl m Z ddl mZmZmZmZdd lmZd efd YZdS( swdistutils.command.bdist_rpm Implements the Distutils 'bdist_rpm' command (create RPM source and binary distributions).s$Id$iN(tCommand(tDEBUG(t write_file(tget_python_version(tDistutilsOptionErrortDistutilsPlatformErrortDistutilsFileErrortDistutilsExecError(tlogt bdist_rpmc+BseZdZd^d_d`dadbdcdddedfdgdhdidjdkdldmdndodpdqdrdsdtdudvdwdxdydzd{d|d}d~ddddddddg)Zd2d7d;d0dSgZid2d56d7d96d;d=6ZdVZdWZdXZ dYZ dZZ d[Z d\Z RS(screate an RPM distributions bdist-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 files source-onlysonly generate source RPMs binary-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 ") [default: maintainer or author from setup script]s packager=sBRPM packager (eg. "Jane Doe ") [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 builds force-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_onlyt binary_onlyt source_onlyt use_bzip2tdistribution_nametgrouptreleasetserialtvendortpackagert doc_filest changelogticont prep_scriptt build_scripttinstall_scriptt clean_scriptt verify_scriptt pre_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_optionssN                                      cCs|jdd |jdkrR|js4tdntjj|jd|_n|j dkr|j ryt j |_ qd|_ n|j rtdntj dkrtdtj n|jr|jrtd n|jjsd |_n|jdd |jdS(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_optionss0         cCs|jdd|jdd|jj|jjf|jd|jdt|jtrxEdD]:}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|jddS(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_stringRAt get_contacttget_contact_emailtensure_string_listt isinstanceRtlistR;R<texiststappendt_format_changelogRtensure_filename(R5treadme((s3/usr/lib64/python2.7/distutils/command/bdist_rpm.pyRCs>    !                  cCstr>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||jfd ||jrdS|j j}|jd }|jr4dg|_n dg|_|jd ||j _|jd}|d}|j|||jrtj j|jr|j|j|qtd|jntjddg} tj jdstj jdrdg} n|jr)| jdn&|jrB| jdn | jd|j r| j!ddtj j"|j gn|j#s| jdn|j$r| jdn| j|d} | d} d | d!} d"| | |f} tj%| }zg}d}x\|j'}|s(Pnt(j)t(j*|}|j|d#|dkr|d}qqW|j+}|rt,d$t-| nWd|j+X|j.| |j/s|j j0rt1}nd%}|jsKtj j |d |}|j2||jtj j |j|}|j jjd&||fn|jsx|D]}tj j |d |}tj j|r[|j2||jtj j |jtj j3|}|j jjd&||fq[q[WqndS((Nsbefore _get_package_data():svendor =s packager =s doc_files =s changelog =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_commandRtformatst run_commandtget_archive_filest copy_fileR RMRRtinfoRRNRR2textendtabspathR0R tpopenRtreadlinetstringtsplittstriptcloseRtreprtspawntdry_runRBRt move_filetbasename(R5tspec_dirtrpm_dirR t spec_pathtsaved_dist_filesRWtsourcet source_dirtrpm_cmdt nvr_stringtsrc_rpmt non_src_rpmtq_cmdtoutt binary_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_pathsc Csd|jjd|jjjddd|jjd|jjdddd|jjg}|jd d d g|jr|jd n |jd |jd|jj d|j ddg|j s|jj s|jdqn|jd|j x~dBD]v}t |tj|}t|trj|jd|tj|fq|dCk r|jd||fqqW|jjdkr|jd|jjn|jr|jd|jn|jr|jdtj|jn|jr;|jdtjj|jn|jrT|jd n|jdd!|jjgd"|jtjjtjd#f}d$|}|j rd%|}nd&|}dDd*d+|fd,d-|fdEdFdGdHdIdJg }x|D]\}} } t || }|s'| r|jdd;|g|ro|jtj!t"|d<j#d=q|j| qqW|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(RRRRRRN(R*R!s&%setup -n %{name}-%{unmangled_version}(RR$srm -rf $RPM_BUILD_ROOT(RR%N(RR&N(RR'N(RR(N(RR)N(&RAR]t get_versiontreplaceRtget_descriptionRgRRNt get_licenseRR4RBtgetattrRktlowerRKRLR=Rtget_urlRR.R R;R<RsR3tget_long_descriptionRR>targvR1RltopentreadRR( R5t spec_filetfieldtvaltdef_setup_callt def_buildt install_cmdtscript_optionstrpm_opttattrtdefault((s3/usr/lib64/python2.7/distutils/command/bdist_rpm.pyR_s        #     # &       +     cCs|s |Sg}xtjtj|dD]l}tj|}|ddkrg|jd|gq,|ddkr|j|q,|jd|q,W|ds|d=n|S(sKFormat the changelog correctly and convert it to a list of strings s it*RRs (RkRlRmRgRN(R5Rt new_changelogR((s3/usr/lib64/python2.7/distutils/command/bdist_rpm.pyRO5s"  N(s bdist-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(s source-onlyNsonly generate source RPM(s binary-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 ") [default: maintainer or author from setup script](s packager=NsBRPM packager (eg. "Jane Doe ") [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-tempR s"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(s force-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__t descriptionRt user_optionstboolean_optionst negative_optR6RDRCRRR_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.pyts   "install.pyc000064400000040662152345555050006750 0ustar00 {fc@sdZddlmZdZddlZddlZddlZddlTddlm Z ddl m Z ddl m Z dd lmZdd lmZdd lmZmZmZdd 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_varst change_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/bint unix_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_hometinstallcBseZdZdHdIdJddGdefdKd dGd d fdLdMdNddGddfdOdPdQdRdSdTdUdVdWgZdd%d(dgZidd 6Zd,Zd-Z d.Z d/Z d0Z d1Z d2Zd3Zd4Zd5Zd6Zd7Zd8Zd9Zd:Zd;Zd<Zd=Zd>Zd?Zd@ZdAefdBefdCefdDefdEdFfgZRS(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 filescCsd|_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(tNonetprefixt exec_prefixthomeRt install_basetinstall_platbasetroottinstall_purelibtinstall_platlibtinstall_headerst install_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_optionss2                       c CsL|js|js|jr=|js-|jr=tddn|jrd|jsX|jrdtdn|jr|js|js|js|js|jrtdntjdkr|jr|j dd|_qn|j dtjdkr|j n |j |j dtjtjd }td d \}}i |jjd 6|jjd 6|jjd6|d6|d d!d6|d |dd6|d6|d 6|d6|d 6|jd6|jd6|_|j|j d|j|jd<|j|jdR"R#RG((s1/usr/lib64/python2.7/distutils/command/install.pytfinalize_optionss~  $                    cCstrddlm}|dGHx|jD]}|d}|ddkrY|dd!}n||jkrtj|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|jdkrt dndS|j r|j dkrt dn|j |_|_|j dn|jdk r|j|_|_|j dn|jdkra|jdk r.t dntjjtj|_tjjtj|_n|jdkr|j|_n|j|_|j|_|j ddS(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-R RR.Rt select_schemeR$R"R#RKRatnormpathRS(R8((s1/usr/lib64/python2.7/distutils/command/install.pyROs<      cCs|jrQ|jdkr'tdn|j|_|_|jtjdn|j dk r|j |_|_|jdnu|j dkrtj j t j |_ n|j |_|_y|jtjWn!tk rtdtjnXdS(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.pyRPs"   cCsUt|}xDtD]<}d|}t||dkrt||||qqWdS(Ntinstall_(tINSTALL_SCHEMESt SCHEME_KEYSRnR!tsetattr(R8RLtschemetkeytattrname((s1/usr/lib64/python2.7/distutils/command/install.pyRss    cCsx|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_attrss  cCs|jdddgdS(NR%R&R'(R(R8((s1/usr/lib64/python2.7/distutils/command/install.pyRZs cCs#|jddddddgdS(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 rt|jtkr`tj|jd|_nt|jdkr|jd}}n0t|jdkr|j\}}n tdt |}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 StringTypeRQRRtlenR Rt path_fileRc(R8RRc((s1/usr/lib64/python2.7/distutils/command/install.pyR_s  c GsDx=|D]5}d|}t||t|jt||qWdS(NRw(RzR R'Rn(R8RRLR((s1/usr/lib64/python2.7/distutils/command/install.pyRds  cCs|js dSttjjd}xc|jjD]R\}}|j|r5tjj| r5|j d|tj |dq5q5WdS(s#Create directories under ~ Nt~sos.makedirs('%s', 0700)i( RRRKRaR~RYt iteritemst startswithtisdirt debug_printtmakedirs(R8R$RLRa((s1/usr/lib64/python2.7/distutils/command/install.pyR\"s "cCs|jsU|jd|jjdj}|jrU|tkrUtdqUnx!|jD]}|j|qbW|j r|j n|j r|j }|j rt|j }x/tt|D]}|||||RN(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__t descriptionR!R Rktboolean_optionsRlR9RfRNRORPRsRRZR[R^R_RdR\RRRRRRRRt 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 R tsiteR R RTtWINDOWS_SCHEMERxRyR(((s1/usr/lib64/python2.7/distutils/command/install.pyts$        install_scripts.pyc000064400000005560152345555050010515 0ustar00 {fc@sbdZdZddlZddlmZddlmZddlmZdefdYZ dS( sudistutils.command.install_scripts Implements the Distutils 'install_scripts' command, for installing Python scripts.s$Id$iN(tCommand(tlog(tST_MODEtinstall_scriptscBsYeZdZddddgZdd gZd Zd ZdZdZ dZ 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(tNonet install_dirRt build_dirt skip_build(tself((s9/usr/lib64/python2.7/distutils/command/install_scripts.pytinitialize_optionss   cCs*|jdd |jdd d d dS( Ntbuildt build_scriptsR tinstallRR RR (RR (RR (RR(R R (tset_undefined_options(R ((s9/usr/lib64/python2.7/distutils/command/install_scripts.pytfinalize_options#s  cCs|js|jdn|j|j|j|_tjdkrxq|jD]`}|j rrt j d|qPtj |t dBd@}t j d||tj||qPWndS(NRtposixschanging mode of %simischanging mode of %s to %o(R t run_commandt copy_treeR R toutfilestostnamet get_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__t descriptionRt 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.pyts  bdist_dumb.pyc000064400000011567152345555050007420 0ustar00 {fc@sdZdZddlZddlmZddlmZddlmZddl m Z m Z ddl m Z dd lmZd efd YZdS( sdistutils.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$iN(tget_python_version(t get_platform(tCommand(t remove_treetensure_relative(tDistutilsPlatformError(tlogt bdist_dumbc BseZdZd"dddefd#d d d d fd$d&d'd(d)g Zd ddgZidd6dd6dd6ZdZd 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<|jdj}tjj|d|_n|jdkry|jtj |_Wqt k rt ddtj qXn|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|jdn|jddd}|j|_|j|_d|_tjd|j|jdd|jj |j f}t j dkr|j d d }nt jj|j|}|js|j}nj|jjr&|j|jkr&td t|jt|jfn!t jj|jt|j}|j||jd |d |jd|j}|jjrt}nd}|jjjd||f|jst |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("Rt run_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__t descriptionRRt 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.pyts install_data.pyc000064400000006056152345555050007740 0ustar00 {fc@sXdZdZddlZddlmZddlmZmZdefdYZdS(sdistutils.command.install_data Implements the Distutils 'install_data' command, for installing platform-independent data files.s$Id$iN(tCommand(t change_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(tNonet install_dirtoutfilestrootRt distributiont data_filestwarn_dir(tself((s6/usr/lib64/python2.7/distutils/command/install_data.pytinitialize_optionss     cCs|jdddddS( NtinstallRRR R(RR(R R (RR(tset_undefined_options(R((s6/usr/lib64/python2.7/distutils/command/install_data.pytfinalize_options%s cCsk|j|jxT|jD]I}t|trt|}|jra|jd||jfn|j||j\}}|j j |qt|d}t j j |st j j|j|}n|jrt|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.pyt get_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__t descriptionRt 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.pyts  clean.pyo000064400000005775152345555050006406 0ustar00 {fc@sbdZdZddlZddlmZddlmZddlmZdefdYZ dS( sBdistutils.command.clean Implements the Distutils 'clean' command.s$Id$iN(tCommand(t remove_tree(tlogtcleancBsJeZdZddddddgZd gZdZdZdZRS(s-clean up temporary files from 'build' commands build-base=tbs2base build directory (default: 'build.build-base')s build-lib=s<build directory for all modules (default: 'build.build-lib')s build-temp=tts7temporary build directory (default: 'build.build-temp')sbuild-scripts=s<build directory for scripts (default: 'build.build-scripts')s bdist-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 R tbdistR (R R (R R (R R (R R (R R (tset_undefined_options(R((s//usr/lib64/python2.7/distutils/command/clean.pytfinalize_options*s  cCstjj|jr.t|jd|jntjd|j|jrx[|j |j |j fD]>}tjj|rt|d|jqctj d|qcWn|jsy'tj |jtjd|jWqtk rqXndS(Ntdry_runs%'%s' does not exist -- can't clean its removing '%s'(tostpathtexistsR RRRtdebugRR R R twarntrmdirR tinfotOSError(Rt directory((s//usr/lib64/python2.7/distutils/command/clean.pytrun3s$       (s build-base=Rs2base build directory (default: 'build.build-base')N(s build-lib=Ns<build directory for all modules (default: 'build.build-lib')(s build-temp=Rs7temporary build directory (default: 'build.build-temp')(sbuild-scripts=Ns<build directory for scripts (default: 'build.build-scripts')(s bdist-base=Ns+temporary directory for built distributions(RRs7remove all build output, not just temporary by-products( t__name__t __module__t descriptionRt 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.pyts  config.pyc000064400000030615152345555050006544 0ustar00 {fc@sdZdZddlZddlZddlmZddlmZddlm Z ddl m Z idd 6d d 6Z d efd YZ edZdS(sdistutils.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$iN(tCommand(tDistutilsExecError(tcustomize_compiler(tlogs.ctcs.cxxsc++tconfigc Bs.eZdZd,d-d.d/d0d1d2d3d4g ZdZdZdZdZdZ dZ dZ dZ 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, ...) takens dump-sources=dump generated source files before attempting to compile themcCsLd|_d|_d|_d|_d|_d|_d|_g|_dS(Ni( tNonetcompilertcct include_dirst librariest library_dirsR t dump_sourcet temp_files(tself((s0/usr/lib64/python2.7/distutils/command/config.pytinitialize_options6s       cCs|jdkr'|jjpg|_n-t|jtrT|jjtj|_n|jdkrog|_n$t|jtr|jg|_n|j dkrg|_ n-t|j tr|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.pytrunUscCsddlm}m}t|j|s|d|jd|jdd|_t|j|jrx|jj|jn|j r|jj |j n|j r|jj |j qndS(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    cCsdt|}t|d}|rUx|D]}|jd|q*W|jdn|j||ddkr|jdn|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_compiles c Cs|j||||\}}tjjtjj|d} |jj|g| d|d|d||jjdk r| |jj} n|j j | ||| fS(NiRRt target_lang( R=RtpathtsplitexttbasenameR tlink_executablet exe_extensionR Rtappend( RR-R.RRRR/R6R<tprog((s0/usr/lib64/python2.7/distutils/command/config.pyt_links"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_cleans    RcCsbddlm}|jd}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_cpps    c Cs|j|j||||\}}t|trItj|}nt|}d} x9|j} | dkrzPn|j| r^d} Pq^q^W|j |j | S(sConstruct 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_cpps      cCs{ddlm}|jy |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.pyt try_compiles     c Csddlm}m}|jy&|j||||||d} Wn||fk red} nXtj| rxdp{d|j| S(sTry 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_links     c Csddlm}m}|jyA|j||||||\} } } |j| gd} Wn ||tfk rd} nXtj| rdpd|j | S(sTry 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|jg}|r*|jd|n|jd|rQ|jd|n|jd||jddj|d}|j|||||S(sDetermine 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(sDetermine 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(sDetermine 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(R Ns1show every action (compile, link, run, ...) taken(s dump-sourceNs=dump generated source files before attempting to compile them(t__name__t __module__t descriptionR t user_optionsRRRR&R3R8R=RFRMRPRXRYR[R^RcRfRg(((s0/usr/lib64/python2.7/distutils/command/config.pyRsT            !cCsb|dkr tjd|n tj|t|}ztj|jWd|jXdS(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 s  Abuild_py.pyo000064400000026235152345555050007125 0ustar00 {fc@sdZdZddlZddlZddlmZddlmZddlmZm Z ddl m Z ddl m Z d efd YZdS( sHdistutils.command.build_py Implements the Distutils 'build_py' command.s$Id$iN(tglob(tCommand(tDistutilsOptionErrortDistutilsFileError(t convert_path(tlogtbuild_pycBseZdZd#d$d&d'd(gZdd gZidd6ZdZdZdZ dZ dZ dZ dZ dZdZdZdZdZdZdZddZdZd 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_datat package_dirRtoptimizeR (tself((s2/usr/lib64/python2.7/distutils/command/build_py.pytinitialize_options!s       cCs|jddd|jj|_|jj|_|jj|_i|_|jjrx6|jjjD]\}}t||j|X|jd|tjj|Sq>W|jjd}|dk r|jd|n|rtjj|SdSdS(sReturn 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+R9iiN( 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|rtjj|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_packages  cCs1tjj|s)tjd||tStSdS(Ns!file %s (for module %s) not found(R-R"R<RRORFtTrue(Rtmodulet module_file((s2/usr/lib64/python2.7/distutils/command/build_py.pyt check_modulesc Cs|j||ttjj|d}g}tjj|jj}xx|D]p}tjj|}||krtjjtjj |d}|j |||fqP|j d|qPW|S(Ns*.pyis excluding %s( RQRR-R"R.tabspathRt script_nametsplitexttbasenameR2t debug_print( RRRt module_filestmodulest setup_scriptR tabs_fRS((s2/usr/lib64/python2.7/distutils/command/build_py.pytfind_package_moduless  "c Cs!i}g}x|jD]}|jd}dj|dd!}|d}y||\}}Wn&tk r|j|}d}nX|s|j||} |df||<| r|j|d| fqntjj||d} |j || sqn|j||| fqW|S(sFinds 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+iiit__init__s.py( RR/R.RIR,RQR2R-R"RU( RRR\RSR"Rt module_baseRtcheckedRPRT((s2/usr/lib64/python2.7/distutils/command/build_py.pyt find_moduless*   cCswg}|jr%|j|jn|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|jD]}|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_outfile0sic Cs|j}g}x|D]\}}}|jd}|j|j||}|j||r|jr|j|dn|jdkr|j|dqqqW|g|jD]4\}}} } | D]}tj j | |^qq7}|S(NR+R ito( ReR/RiRR2RRRR-R"R.( RR$R\toutputsRRSRTRGR4R5R8((s2/usr/lib64/python2.7/distutils/command/build_py.pyR)4s    )cCst|tr!|jd}n$t|ttfsEtdn|j|j||}tj j |}|j ||j ||ddS(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 Cstjr|jddSddlm}|j}|dtjkrV|tj}n|jr||ddd|j d|d|j n|j dkr||d|j d|j d|d|j ndS( Ns%byte-compiling is disabled, skipping.i(R(RiR tprefixtdry_run( tsystdont_write_bytecodeROtdistutils.utilR(RR-tsepRR RtR(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](R R s2forcibly build everything (ignore file timestamps)(t__name__t __module__t descriptionR 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.pyts  build_ext.pyo000064400000045620152345555050007274 0ustar00 {fc@s/dZdZddlZddlZddlZddlZddlTddlmZm Z ddl m Z ddl Tddl mZmZddlmZdd lmZdd lmZdd lmZejd krdd lmZeeZnejdZdZde fdYZ dS(sdistutils.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$iN(t*(t USER_BASEt USER_SITE(tCommand(tcustomize_compilertget_python_version(t newer_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 efd d d dfdddefdHdIdJdddefdKdLdMdNdOdQdRdSdTgZd d$d'd-d3gZ d5dPd6e fgZ d7Z d8Z d9Zd:Zd;Zd<Zd=Zd>Zd?Zd@ZdAZdBZdCZdDZdEZRS(Us8build C/C++ extensions (compile/link to build directory)s (separated by '%s')s build-lib=tbs(directory for compiled extension moduless build-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 compilerscCsd|_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 Csddlm}|jdd.d/d0d1d2d3|jdkrP|jj|_n|jj|_|j }|j d d }|j dkr|jj pg|_ nt |j t r|j j tj|_ n|j j|||kr|j j|n|jd |jd |jdkr5g|_n|jdkrPg|_n3t|jtkrtj |jtj|_n|jdkrg|_n3t|jtkrtj |jtj|_ntjdkr|jjtjjtjd|jr)tjj|jd|_ntjj|jd|_|j jtjjtjdtdkr|j dkrd}n |j d}xd4d5fD]L}tjjtj|}|rtjj||}n|jj|qWqtdkr+|jjtjjtjddqtdkr_|jjtjjtjddq|jjtjjtjddntjdkr|jjtjjtjdntj!d d!kstj!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,rtjjt-d-}tjjt-d$} tjj.|rm|j j|ntjj.| r|jj| |jj| qndS(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.pytR<t tinclude(R#R#(R%R%(R.R.(RR(RR(R$R$(R=(R:sVS9.0(/t distutilsR4tset_undefined_optionsR&R!t distributiont ext_packaget ext_modulesR"tget_python_incR't isinstancetstrtsplittostpathseptappendtensure_string_listR*R+ttypet StringTypetstringR,tnametpathtjointsyst exec_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_optionss        " "     %&$       c Csddlm}|jsdS|jjrm|jd}|jj|jpSg|j j |j n|d|j d|j d|jd|j|_ t|j tjdkr|jtkr|j j|jn|jdk r|j j|jn|jdk rEx-|jD]\}}|j j||qWn|jdk r{x$|jD]}|j j|q^Wn|jdk r|j j|jn|j dk r|j j|j n|jdk r|j j |jn|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|tstdnxt|D]\}}t|trIq(nt|t skt|dkrwtdn|\}}tjd|t|t ot j |stdnt|t stdnt||d}x<dD]4}|j |}|dk rt|||qqW|j d|_d|krYtjdn|j d}|rg|_g|_x|D]} t| tot| dkstdnt| dkr|jj| dqt| dkr|jj| qqWn||||j|jg}x!|jD]}|j|jq W|S(N(RR"R}R(R2t filenamesR((s3/usr/lib64/python2.7/distutils/command/build_ext.pytget_source_filess cCsG|j|jg}x*|jD]}|j|j|jq W|S(N(RR"R[tget_ext_fullpathR`(R2toutputsR((s3/usr/lib64/python2.7/distutils/command/build_ext.pyt get_outputss cCs5|j|jx|jD]}|j|qWdS(N(RR"tbuild_extension(R2R((s3/usr/lib64/python2.7/distutils/command/build_ext.pyRsc Cs|j}|dks-t|ttfkrHtddd|jnt|}|j|j}||j }|j pt ||dst j d|jdSt jd|j|j||}|jpg}|j}x!|jD]}|j|fqW|jj|d|jd|d |jd |j d |d |j }||_|jro|j|jn|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_dirRR'Rtextra_postargstdependsR*R+Rtexport_symbolsR%t target_lang(#RR!R]tListTypet TupleTypeRR`RRRRRR Rtinfot swig_sourcesRRRR[R.tcompileR%R't_built_objectsRR}Rtlanguagetdetect_languagetlink_shared_objectt get_librariesR+Rtget_export_symbols( R2RRtext_pathRt extra_argsRR)tobjectsR((s3/usr/lib64/python2.7/distutils/command/build_ext.pyRsN $              cCsg}g}i}|jr+tjdn|jsRd|jksRd|jkr[d}nd}xr|D]j}tjj|\}} | dkr|j|d||j||d||          cCstjdkrdStjdkrixgd D]5}tjjd|d}tjj|r)|Sq)WdSn#tjd kr|dStd tjd S( sReturn 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.pyRPs c Cstjdtjd}|j|}|j|}|jd}|j|}tjj|d}|j stjj |d |g}tjj |j |Sdj |dd!}|j d}tjj |j|}tjj ||S(sReturns 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..RGiitbuild_py(R_t maketransRYtsept translatetget_ext_fullnameRXtget_ext_filenameRaRRbR#R|tabspathtget_package_dir( R2Rtall_dotstfullnametmodpathtfilenameR&Rt package_dir((s3/usr/lib64/python2.7/distutils/command/build_ext.pyRqs 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.pyRscCsddlm}tj|d}tjdkrZ|t|dd |t|ds$0    bdist_dumb.pyo000064400000011567152345555050007434 0ustar00 {fc@sdZdZddlZddlmZddlmZddlmZddl m Z m Z ddl m Z dd lmZd efd YZdS( sdistutils.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$iN(tget_python_version(t get_platform(tCommand(t remove_treetensure_relative(tDistutilsPlatformError(tlogt bdist_dumbc BseZdZd"dddefd#d d d d fd$d&d'd(d)g Zd ddgZidd6dd6dd6ZdZd 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<|jdj}tjj|d|_n|jdkry|jtj |_Wqt k rt ddtj qXn|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|jdn|jddd}|j|_|j|_d|_tjd|j|jdd|jj |j f}t j dkr|j d d }nt jj|j|}|js|j}nj|jjr&|j|jkr&td t|jt|jfn!t jj|jt|j}|j||jd |d |jd|j}|jjrt}nd}|jjjd||f|jst |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("Rt run_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__t descriptionRRt 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.pyts bdist_wininst.pyo000064400000024626152345555050010200 0ustar00 {fc@sdZdZddlZddlZddlZddlmZddlmZddl m Z ddl m 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$iN(tget_python_version(tCommand(t remove_tree(tDistutilsOptionErrortDistutilsPlatformError(tlog(t get_platformt bdist_wininstcBseZdZd,dddefdddd fd d+d d fd-d.d/d0d1d2d3d4d5g Zdd ddgZd$Zd%Zd&Z d'Z d+d(Z d)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=sspecify 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|jdj}t j j |d|_n|j sd|_ n|j r|jj rt}|j r|j |krtd|fn||_ n|jdd d |jrRxF|jjD]%}|jt j j|krPqqWtd|jndS( 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 Cstjdkr<|jjs-|jjr<tdn|jsU|jdn|jddd}|j |_ |j|_d|_ |j |_ |jd}d|_ d|_|jjr-|j}|stjdd !}nd |j |f}|jd}tjj|jd ||_nxJdD]B}tj|}|dkrb|d}nt|d||q4Wtjd|j |jtjjdtjj|j d|jtjd=ddlm }|} |jj!} |j"| dd|j } |j#| | |j$|jjrDt%} nd} |jj&j'd| |j(| ftj)d| tj*| |j+st,|j d|j-ndS(Ntwin32s^distribution contains extensions and/or C libraries; must be compiled on a Windows 32 platformtbuildtinstalltreinit_subcommandsiit install_libis.%s-%stlibtpurelibtplatlibtheadersR+tdatas/Include/$dist_nametinstall_sinstalling to %stPURELIBi(tmktemptziptroot_dirtanyRsremoving temporary file '%s'tdry_run(R6R7R8R+R9(.tsystplatformR#R*thas_c_librariesRRt run_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              %       c Csg}|jj}|jd|jp+dd}d}xddddd d d d gD]a}t||d}|rZ|d tj|||f}|jd|||fqZqZW|jd|jr|jd|jn|jd|||jd|j |jd|j |j rM|jd|j n|j rm|jd|j n|j p|jj }|jd||ddl}ddl} d|j|j| jf} |jd| tj|dS(Ns [metadata]R!s cSstj|ddS(Ns s\n(RMtreplace(ts((s7/usr/lib64/python2.7/distutils/command/bdist_wininst.pytescapestauthort author_emailt descriptiont maintainertmaintainer_emailtnameturlRJs %s: %ss%s=%ss [Setup]sinstall_script=%ssinfo=%sstarget_compile=%dstarget_optimize=%dstarget_version=%ssuser_access_control=%sstitle=%sisBuilt %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.pyt get_inidatas<   $      c Csddl}|j|j|j}|j|}|jd||rrt|dj}t|}nd}t|d} | j |j |r| j |nyt Wnt k rn"Xt |t r|jd}n|d}|jr)t|jdj} || d }n |d}| j ||jd d t||} | j | | j t|djdS( Nis creating %strbitwbtmbcsstrs 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.msvccompilerRRRR'R(tdirnamet__file__RR)RRtclose(RRt cur_versiontbvt directorytsfixtfilenametf((s7/usr/lib64/python2.7/distutils/command/bdist_wininst.pyRCs$     "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-optimizeR s;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=Nsspecify 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.pyts   build.pyo000064400000012032152345555050006403 0ustar00 {fc@swdZdZddlZddlZddlmZddlmZddlm Z dZ defd YZ dS( sBdistutils.command.build Implements the Distutils 'build' command.s$Id$iN(t get_platform(tCommand(tDistutilsOptionErrorcCsddlm}|dS(Ni(tshow_compilers(tdistutils.ccompilerR(R((s//usr/lib64/python2.7/distutils/command/build.pyR stbuildc BseZdZd,d.d/dd-d d fd0d1dddefd2d3d4d5g ZddgZdd-d efgZd!Z d"Z d#Z d$Z d%Z d&Zd'Zd(e fd)e fd*efd+efgZRS(6s"build everything needed to installs build-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 scriptss build-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)s executable=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<tdnd|jtjdd!f}ttdru|d7}n|j dkrtj j |j d|_ n|j dkrtj j |j d||_ n|jdkr |jjr|j |_q |j |_n|jdkr=tj j |j d ||_n|jdkrxtj j |j d tjdd!|_n|jdkrtjrtj jtj|_ndS( NtntsW--plat-name only supported on Windows (try using './configure --help' on your platform)s.%s-%siitgettotalrefcounts-pydebugtlibttempsscripts-(RRRtostnameRtsystversionthasattrRtpathtjoinRRRt distributiont ext_modulesRRRtnormpath(Rtplat_specifier((s//usr/lib64/python2.7/distutils/command/build.pytfinalize_optionsFs2   cCs(x!|jD]}|j|q WdS(N(tget_sub_commandst run_command(Rtcmd_name((s//usr/lib64/python2.7/distutils/command/build.pytrunxscCs |jjS(N(R&thas_pure_modules(R((s//usr/lib64/python2.7/distutils/command/build.pyR/scCs |jjS(N(R&thas_c_libraries(R((s//usr/lib64/python2.7/distutils/command/build.pyR0scCs |jjS(N(R&thas_ext_modules(R((s//usr/lib64/python2.7/distutils/command/build.pyR1scCs |jjS(N(R&t has_scripts(R((s//usr/lib64/python2.7/distutils/command/build.pyR2stbuild_pyt build_clibt build_extR(s build-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(s build-temp=Rstemporary build directory(s compiler=R sspecify the compiler type(R R s;compile extensions and libraries with debugging information(R R s2forcibly build everything (ignore file timestamps)(s executable=Rs5specify final destination interpreter path (build.py)(t__name__t __module__t descriptionRRt 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.pyts sdist.pyc000064400000040470152345555050006425 0ustar00 {fc@sdZdZddlZddlZddlZddlmZddlmZddlm Z ddl m Z m Z m Z mZddlmZdd lmZmZmZdd lmZdd l mZdd lmZd Zde fdYZdS(sadistutils.command.sdist Implements the Distutils 'sdist' command (create a source distribution).s$Id$iN(tglob(twarn(tCommand(tdir_utiltdep_utilt file_utilt archive_util(tTextFile(tDistutilsPlatformErrortDistutilsOptionErrortDistutilsTemplateError(tFileList(tlog(t convert_pathcCsddlm}ddlm}g}x6|jD](}|jd|d||dfq3W|j||jddS(soPrint all possible values for the 'formats' option (used by the "--help-formats" command-line option). i(t FancyGetopt(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  tsdistcBs6eZdZdZd<d=d?d@dAdBdCdDdEddddfdFdGdHdIgZdd ddddgZd'd>d(efgZidd 6d d6Z id)d*6d+d,6Z d-efgZ d.Z d/Z d0Zd1Zd2Zd3Zd4Zd5Zd6Zd7Zd8Zd9Zd: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]s no-defaultss"don't include the default file settprunesspecifically 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|jdkry|jtjg|_Wqtk rt ddtjqXnt j |j}|rt d|n|j dkrd|_ ndS(NtMANIFESTs MANIFEST.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!|jD]}|j|qW|j|jrGdS|jdS(N(R tfilelisttget_sub_commandst run_commandt get_file_listR/tmake_distribution(Rtcmd_name((s//usr/lib64/python2.7/distutils/command/sdist.pytruns   cCs7tdt|jjd}|j|jdS(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_metadatas   cCstjj|j}| rP|jrP|j|jj|jjdS|sq|j dd|jn|jj |j r|j n|r|j n|jr|jn|jj|jj|jdS(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.pyRDs(            cCsd|jjg}x|D]}t|tr|}d}x:|D]2}tjj|rAd}|jj|PqAqAW|s|j dt j |dqqtjj|r|jj|q|j d|qWdd g}xB|D]:}t tjj t|}|r|jj|qqW|jd }|jjrb|jj|jnxM|jD]B\} } } } x-| D]%} |jjtjj | | qWqlW|jjrlx|jjD]}t|trt|}tjj |re|jj|qeq|\}} x?| D]7}t|}tjj |r*|jj|q*q*WqWn|jjr|jd }|jj|jn|jjr|jd }|jj|jn|jjr|jd }|jj|jndS(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(RIt script_namet isinstancettupleR;RMtexistsRARRtstringtjointfilterRNRtextendtget_finalized_commandthas_pure_modulestget_source_filest data_filesthas_data_fileststrR thas_ext_modulesthas_c_librariest has_scripts(Rt standardstfntaltstgot_ittoptionaltpatterntfilesRYtpkgtsrc_dirt build_dirt filenamestfilenametitemtdirnameR"RZR[R\((s//usr/lib64/python2.7/distutils/command/sdist.pyRSs^      '    cCstjd|jt|jdddddddddddd}zwxp|j}|d krhPny|jj|WqLtt fk r}|j d |j |j |fqLXqLWWd |j Xd S( sRead 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_commentsit skip_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 d d g}d |dj ||f}|jj|dddS(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(RRtbase_dirtsepstvcs_dirstvcs_ptrn((s//usr/lib64/python2.7/distutils/command/sdist.pyRUMs  cCsk|jr$tjd|jdS|jj}|jdd|jtj |j|fd|jdS(sWrite 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 RR-RARttinserttexecuteRt write_file(Rtcontent((s//usr/lib64/python2.7/distutils/command/sdist.pyRVgs    cCsStjj|jstSt|jd}z|j}Wd|jX|dkS(NtrUs+# file GENERATED by distutils, do NOT edit (R;RMRNR-tFalsetopenRR(Rtfpt first_line((s//usr/lib64/python2.7/distutils/command/sdist.pyROvs cCsytjd|jt|j}xF|D]>}|j}|jds)| rWq)n|jj|q)W|jdS(sRead 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 RR-Rtstript startswithRARR(RR-R((s//usr/lib64/python2.7/distutils/command/sdist.pyRPs  cCs|j|tj||d|jttdrHd}d|}nd}d|}|sntjdn tj |x_|D]W}tj j |stjd|qtj j ||}|j ||d|qW|jjj|dS( sCreate 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(tmkpathRt create_treeRthasattrR;RR RRRMRNRbt copy_fileRItmetadatatwrite_pkg_info(RRRtRRtfiletdest((s//usr/lib64/python2.7/distutils/command/sdist.pytmake_release_trees      c Cs|jj}tjj|j|}|j||jjg}d|j kr}|j j |j j |j j dnxd|j D]Y}|j ||d|d|jd|j}|j ||jjj dd|fqW||_|jstj|d|jndS( sCreate 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()'. ttarRR4R5RtRN(RIRR;RMRbR2RRARtRRtpoptindext make_archiveR4R5t dist_filesR3R1Rt remove_treeR(RRt base_nameR3tfmtR((s//usr/lib64/python2.7/distutils/command/sdist.pyREs +    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_filess(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](s no-defaultsNs"don't include the default file set(R Nsspecifically 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__t descriptionRRt user_optionstboolean_optionsRt help_optionst negative_optR:t sub_commandsR6R@RGRLRDRSRTRURVRORPRRER(((s//usr/lib64/python2.7/distutils/command/sdist.pyR$sn            ( R !    * (t__doc__t __revision__R;RaRRtwarningsRtdistutils.coreRt distutilsRRRRtdistutils.text_fileRtdistutils.errorsRR R tdistutils.filelistR R tdistutils.utilR RR(((s//usr/lib64/python2.7/distutils/command/sdist.pyts   " bdist.pyo000064400000012061152345555050006413 0ustar00 {fc@sqdZdZddlZddlmZddlmZddlmZm Z dZ defd YZ dS( sidistutils.command.bdist Implements the Distutils 'bdist' command (create a built [binary] distribution).s$Id$iN(t get_platform(tCommand(tDistutilsPlatformErrortDistutilsOptionErrorcCslddlm}g}x6tjD]+}|jd|dtj|dfq W||}|jddS(sFPrint list of available formats (arguments to "--format" option). i(t FancyGetoptsformats=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 BseZdZd0dddefd2d3d4d5d6gZd gZdd1defgZd7Z idd6dd6dd6Z dddddd dd!gZ id8d6d9d6d:d6d;d6d<d6d=d 6d>d6d?d!6Z d-Z d.Zd/ZRS(@s$create a built (binary) distributions bdist-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?|jdj|_n|jdkr|jdj}tjj |d|j|_n|j d|j dkry|j tj g|_ Wqtk rtddtj qXn|jdkrd|_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|dWqtk rRtd|qXqWxtt|jD]}||}|j|}||jkr|j||_ n|dkr|j |_ |j |_ n|||dkrd|_ n|j |qmWdS(Nisinvalid format '%s'R!i(R RR R6Rtrangetlentreinitialize_commandtno_format_optionR R)R(t keep_tempt run_command(R*tcommandsR titcmd_nametsub_cmd((s//usr/lib64/python2.7/distutils/command/bdist.pytrunys"     (s bdist-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__t descriptionRR 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.pyts  install.pyo000064400000040662152345555050006764 0ustar00 {fc@sdZddlmZdZddlZddlZddlZddlTddlm Z ddl m Z ddl m Z dd lmZdd lmZdd lmZmZmZdd 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_varst change_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/bint unix_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_hometinstallcBseZdZdHdIdJddGdefdKd dGd d fdLdMdNddGddfdOdPdQdRdSdTdUdVdWgZdd%d(dgZidd 6Zd,Zd-Z d.Z d/Z d0Z d1Z d2Zd3Zd4Zd5Zd6Zd7Zd8Zd9Zd:Zd;Zd<Zd=Zd>Zd?Zd@ZdAefdBefdCefdDefdEdFfgZRS(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 filescCsd|_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(tNonetprefixt exec_prefixthomeRt install_basetinstall_platbasetroottinstall_purelibtinstall_platlibtinstall_headerst install_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_optionss2                       c CsL|js|js|jr=|js-|jr=tddn|jrd|jsX|jrdtdn|jr|js|js|js|js|jrtdntjdkr|jr|j dd|_qn|j dtjdkr|j n |j |j dtjtjd }td d \}}i |jjd 6|jjd 6|jjd6|d6|d d!d6|d |dd6|d6|d 6|d6|d 6|jd6|jd6|_|j|j d|j|jd<|j|jdR"R#RG((s1/usr/lib64/python2.7/distutils/command/install.pytfinalize_optionss~  $                    cCstrddlm}|dGHx|jD]}|d}|ddkrY|dd!}n||jkrtj|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|jdkrt dndS|j r|j dkrt dn|j |_|_|j dn|jdk r|j|_|_|j dn|jdkra|jdk r.t dntjjtj|_tjjtj|_n|jdkr|j|_n|j|_|j|_|j ddS(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-R RR.Rt select_schemeR$R"R#RKRatnormpathRS(R8((s1/usr/lib64/python2.7/distutils/command/install.pyROs<      cCs|jrQ|jdkr'tdn|j|_|_|jtjdn|j dk r|j |_|_|jdnu|j dkrtj j t j |_ n|j |_|_y|jtjWn!tk rtdtjnXdS(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.pyRPs"   cCsUt|}xDtD]<}d|}t||dkrt||||qqWdS(Ntinstall_(tINSTALL_SCHEMESt SCHEME_KEYSRnR!tsetattr(R8RLtschemetkeytattrname((s1/usr/lib64/python2.7/distutils/command/install.pyRss    cCsx|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_attrss  cCs|jdddgdS(NR%R&R'(R(R8((s1/usr/lib64/python2.7/distutils/command/install.pyRZs cCs#|jddddddgdS(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 rt|jtkr`tj|jd|_nt|jdkr|jd}}n0t|jdkr|j\}}n tdt |}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 StringTypeRQRRtlenR Rt path_fileRc(R8RRc((s1/usr/lib64/python2.7/distutils/command/install.pyR_s  c GsDx=|D]5}d|}t||t|jt||qWdS(NRw(RzR R'Rn(R8RRLR((s1/usr/lib64/python2.7/distutils/command/install.pyRds  cCs|js dSttjjd}xc|jjD]R\}}|j|r5tjj| r5|j d|tj |dq5q5WdS(s#Create directories under ~ Nt~sos.makedirs('%s', 0700)i( RRRKRaR~RYt iteritemst startswithtisdirt debug_printtmakedirs(R8R$RLRa((s1/usr/lib64/python2.7/distutils/command/install.pyR\"s "cCs|jsU|jd|jjdj}|jrU|tkrUtdqUnx!|jD]}|j|qbW|j r|j n|j r|j }|j rt|j }x/tt|D]}|||||RN(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__t descriptionR!R Rktboolean_optionsRlR9RfRNRORPRsRRZR[R^R_RdR\RRRRRRRRt 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 R tsiteR R RTtWINDOWS_SCHEMERxRyR(((s1/usr/lib64/python2.7/distutils/command/install.pyts$        build_ext.pyc000064400000045620152345555050007260 0ustar00 {fc@s/dZdZddlZddlZddlZddlZddlTddlmZm Z ddl m Z ddl Tddl mZmZddlmZdd lmZdd lmZdd lmZejd krdd lmZeeZnejdZdZde fdYZ dS(sdistutils.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$iN(t*(t USER_BASEt USER_SITE(tCommand(tcustomize_compilertget_python_version(t newer_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 efd d d dfdddefdHdIdJdddefdKdLdMdNdOdQdRdSdTgZd d$d'd-d3gZ d5dPd6e fgZ d7Z d8Z d9Zd:Zd;Zd<Zd=Zd>Zd?Zd@ZdAZdBZdCZdDZdEZRS(Us8build C/C++ extensions (compile/link to build directory)s (separated by '%s')s build-lib=tbs(directory for compiled extension moduless build-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 compilerscCsd|_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 Csddlm}|jdd.d/d0d1d2d3|jdkrP|jj|_n|jj|_|j }|j d d }|j dkr|jj pg|_ nt |j t r|j j tj|_ n|j j|||kr|j j|n|jd |jd |jdkr5g|_n|jdkrPg|_n3t|jtkrtj |jtj|_n|jdkrg|_n3t|jtkrtj |jtj|_ntjdkr|jjtjjtjd|jr)tjj|jd|_ntjj|jd|_|j jtjjtjdtdkr|j dkrd}n |j d}xd4d5fD]L}tjjtj|}|rtjj||}n|jj|qWqtdkr+|jjtjjtjddqtdkr_|jjtjjtjddq|jjtjjtjddntjdkr|jjtjjtjdntj!d d!kstj!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,rtjjt-d-}tjjt-d$} tjj.|rm|j j|ntjj.| r|jj| |jj| qndS(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.pytR<t tinclude(R#R#(R%R%(R.R.(RR(RR(R$R$(R=(R:sVS9.0(/t distutilsR4tset_undefined_optionsR&R!t distributiont ext_packaget ext_modulesR"tget_python_incR't isinstancetstrtsplittostpathseptappendtensure_string_listR*R+ttypet StringTypetstringR,tnametpathtjointsyst exec_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_optionss        " "     %&$       c Csddlm}|jsdS|jjrm|jd}|jj|jpSg|j j |j n|d|j d|j d|jd|j|_ t|j tjdkr|jtkr|j j|jn|jdk r|j j|jn|jdk rEx-|jD]\}}|j j||qWn|jdk r{x$|jD]}|j j|q^Wn|jdk r|j j|jn|j dk r|j j|j n|jdk r|j j |jn|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|tstdnxt|D]\}}t|trIq(nt|t skt|dkrwtdn|\}}tjd|t|t ot j |stdnt|t stdnt||d}x<dD]4}|j |}|dk rt|||qqW|j d|_d|krYtjdn|j d}|rg|_g|_x|D]} t| tot| dkstdnt| dkr|jj| dqt| dkr|jj| qqWn||||j|jg}x!|jD]}|j|jq W|S(N(RR"R}R(R2t filenamesR((s3/usr/lib64/python2.7/distutils/command/build_ext.pytget_source_filess cCsG|j|jg}x*|jD]}|j|j|jq W|S(N(RR"R[tget_ext_fullpathR`(R2toutputsR((s3/usr/lib64/python2.7/distutils/command/build_ext.pyt get_outputss cCs5|j|jx|jD]}|j|qWdS(N(RR"tbuild_extension(R2R((s3/usr/lib64/python2.7/distutils/command/build_ext.pyRsc Cs|j}|dks-t|ttfkrHtddd|jnt|}|j|j}||j }|j pt ||dst j d|jdSt jd|j|j||}|jpg}|j}x!|jD]}|j|fqW|jj|d|jd|d |jd |j d |d |j }||_|jro|j|jn|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_dirRR'Rtextra_postargstdependsR*R+Rtexport_symbolsR%t target_lang(#RR!R]tListTypet TupleTypeRR`RRRRRR Rtinfot swig_sourcesRRRR[R.tcompileR%R't_built_objectsRR}Rtlanguagetdetect_languagetlink_shared_objectt get_librariesR+Rtget_export_symbols( R2RRtext_pathRt extra_argsRR)tobjectsR((s3/usr/lib64/python2.7/distutils/command/build_ext.pyRsN $              cCsg}g}i}|jr+tjdn|jsRd|jksRd|jkr[d}nd}xr|D]j}tjj|\}} | dkr|j|d||j||d||          cCstjdkrdStjdkrixgd D]5}tjjd|d}tjj|r)|Sq)WdSn#tjd kr|dStd tjd S( sReturn 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.pyRPs c Cstjdtjd}|j|}|j|}|jd}|j|}tjj|d}|j stjj |d |g}tjj |j |Sdj |dd!}|j d}tjj |j|}tjj ||S(sReturns 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..RGiitbuild_py(R_t maketransRYtsept translatetget_ext_fullnameRXtget_ext_filenameRaRRbR#R|tabspathtget_package_dir( R2Rtall_dotstfullnametmodpathtfilenameR&Rt package_dir((s3/usr/lib64/python2.7/distutils/command/build_ext.pyRqs 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.pyRscCsddlm}tj|d}tjdkrZ|t|dd |t|ds$0