1. Felix Krull
  2. deadsnakes-python3.4

Commits

Felix Krull  committed e145cde Merge

Merge with precise

  • Participants
  • Parent commits 716cc2c, 8f02790
  • Branches saucy

Comments (0)

Files changed (539)

File .hgtags

View file
  • Ignore whitespace
 7d2c527ab4ef68d3a8e8a2a766f8506741aa8df0 python3.4_3.4.0
 15fc0c2cf7cd6605b687c8c233efd9dc686c74f5 python3.4_3.4.0-1+precise1
 89a5eaf2eb090b4736de38c0f23fd6cd4f8a1449 python3.4_3.4.0-1+saucy1
+f177ab42bce0efdae6963a63a93cacd3c241bcfb python3.4_3.4.1
+29404c01751b0a636e0ad778bb0745d7ce341bd5 python3.4_3.4.1-1+precise1

File .pc/7358ca69f351-fix-sphinx-1.1-docs-build.diff/.timestamp

  • Ignore whitespace
Empty file removed.

File .pc/7358ca69f351-fix-sphinx-1.1-docs-build.diff/Doc/tools/sphinxext/pyspecific.py

  • Ignore whitespace
-# -*- coding: utf-8 -*-
-"""
-    pyspecific.py
-    ~~~~~~~~~~~~~
-
-    Sphinx extension with Python doc-specific markup.
-
-    :copyright: 2008-2014 by Georg Brandl.
-    :license: Python license.
-"""
-
-ISSUE_URI = 'http://bugs.python.org/issue%s'
-SOURCE_URI = 'http://hg.python.org/cpython/file/3.4/%s'
-
-from docutils import nodes, utils
-
-import sphinx
-from sphinx.util.nodes import split_explicit_title
-from sphinx.writers.html import HTMLTranslator
-from sphinx.writers.latex import LaTeXTranslator
-from sphinx.locale import versionlabels
-
-# monkey-patch reST parser to disable alphabetic and roman enumerated lists
-from docutils.parsers.rst.states import Body
-Body.enum.converters['loweralpha'] = \
-    Body.enum.converters['upperalpha'] = \
-    Body.enum.converters['lowerroman'] = \
-    Body.enum.converters['upperroman'] = lambda x: None
-
-if sphinx.__version__[:3] < '1.2':
-    # monkey-patch HTML translator to give versionmodified paragraphs a class
-    def new_visit_versionmodified(self, node):
-        self.body.append(self.starttag(node, 'p', CLASS=node['type']))
-        text = versionlabels[node['type']] % node['version']
-        if len(node):
-            text += ':'
-        else:
-            text += '.'
-        self.body.append('<span class="versionmodified">%s</span> ' % text)
-    HTMLTranslator.visit_versionmodified = new_visit_versionmodified
-
-# monkey-patch HTML and LaTeX translators to keep doctest blocks in the
-# doctest docs themselves
-orig_visit_literal_block = HTMLTranslator.visit_literal_block
-def new_visit_literal_block(self, node):
-    meta = self.builder.env.metadata[self.builder.current_docname]
-    old_trim_doctest_flags = self.highlighter.trim_doctest_flags
-    if 'keepdoctest' in meta:
-        self.highlighter.trim_doctest_flags = False
-    try:
-        orig_visit_literal_block(self, node)
-    finally:
-        self.highlighter.trim_doctest_flags = old_trim_doctest_flags
-
-HTMLTranslator.visit_literal_block = new_visit_literal_block
-
-orig_depart_literal_block = LaTeXTranslator.depart_literal_block
-def new_depart_literal_block(self, node):
-    meta = self.builder.env.metadata[self.curfilestack[-1]]
-    old_trim_doctest_flags = self.highlighter.trim_doctest_flags
-    if 'keepdoctest' in meta:
-        self.highlighter.trim_doctest_flags = False
-    try:
-        orig_depart_literal_block(self, node)
-    finally:
-        self.highlighter.trim_doctest_flags = old_trim_doctest_flags
-
-LaTeXTranslator.depart_literal_block = new_depart_literal_block
-
-# Support for marking up and linking to bugs.python.org issues
-
-def issue_role(typ, rawtext, text, lineno, inliner, options={}, content=[]):
-    issue = utils.unescape(text)
-    text = 'issue ' + issue
-    refnode = nodes.reference(text, text, refuri=ISSUE_URI % issue)
-    return [refnode], []
-
-
-# Support for linking to Python source files easily
-
-def source_role(typ, rawtext, text, lineno, inliner, options={}, content=[]):
-    has_t, title, target = split_explicit_title(text)
-    title = utils.unescape(title)
-    target = utils.unescape(target)
-    refnode = nodes.reference(title, title, refuri=SOURCE_URI % target)
-    return [refnode], []
-
-
-# Support for marking up implementation details
-
-from sphinx.util.compat import Directive
-
-class ImplementationDetail(Directive):
-
-    has_content = True
-    required_arguments = 0
-    optional_arguments = 1
-    final_argument_whitespace = True
-
-    def run(self):
-        pnode = nodes.compound(classes=['impl-detail'])
-        content = self.content
-        add_text = nodes.strong('CPython implementation detail:',
-                                'CPython implementation detail:')
-        if self.arguments:
-            n, m = self.state.inline_text(self.arguments[0], self.lineno)
-            pnode.append(nodes.paragraph('', '', *(n + m)))
-        self.state.nested_parse(content, self.content_offset, pnode)
-        if pnode.children and isinstance(pnode[0], nodes.paragraph):
-            pnode[0].insert(0, add_text)
-            pnode[0].insert(1, nodes.Text(' '))
-        else:
-            pnode.insert(0, nodes.paragraph('', '', add_text))
-        return [pnode]
-
-
-# Support for documenting decorators
-
-from sphinx import addnodes
-from sphinx.domains.python import PyModulelevel, PyClassmember
-
-class PyDecoratorMixin(object):
-    def handle_signature(self, sig, signode):
-        ret = super(PyDecoratorMixin, self).handle_signature(sig, signode)
-        signode.insert(0, addnodes.desc_addname('@', '@'))
-        return ret
-
-    def needs_arglist(self):
-        return False
-
-class PyDecoratorFunction(PyDecoratorMixin, PyModulelevel):
-    def run(self):
-        # a decorator function is a function after all
-        self.name = 'py:function'
-        return PyModulelevel.run(self)
-
-class PyDecoratorMethod(PyDecoratorMixin, PyClassmember):
-    def run(self):
-        self.name = 'py:method'
-        return PyClassmember.run(self)
-
-
-# Support for documenting version of removal in deprecations
-
-from sphinx.locale import versionlabels
-from sphinx.util.compat import Directive
-
-
-class DeprecatedRemoved(Directive):
-    has_content = True
-    required_arguments = 2
-    optional_arguments = 1
-    final_argument_whitespace = True
-    option_spec = {}
-
-    _label = 'Deprecated since version %s, will be removed in version %s'
-
-    def run(self):
-        node = addnodes.versionmodified()
-        node.document = self.state.document
-        node['type'] = 'deprecated-removed'
-        version = (self.arguments[0], self.arguments[1])
-        node['version'] = version
-        text = self._label % version
-        if len(self.arguments) == 3:
-            inodes, messages = self.state.inline_text(self.arguments[2],
-                                                      self.lineno+1)
-            para = nodes.paragraph(self.arguments[2], '', *inodes)
-            node.append(para)
-        else:
-            messages = []
-        if self.content:
-            self.state.nested_parse(self.content, self.content_offset, node)
-        if len(node):
-            if isinstance(node[0], nodes.paragraph) and node[0].rawsource:
-                content = nodes.inline(node[0].rawsource, translatable=True)
-                content.source = node[0].source
-                content.line = node[0].line
-                content += node[0].children
-                node[0].replace_self(nodes.paragraph('', '', content))
-            node[0].insert(0, nodes.inline('', '%s: ' % text,
-                                           classes=['versionmodified']))
-        else:
-            para = nodes.paragraph('', '',
-                nodes.inline('', '%s.' % text, classes=['versionmodified']))
-            node.append(para)
-        env = self.state.document.settings.env
-        env.note_versionchange('deprecated', version[0], node, self.lineno)
-        return [node] + messages
-
-
-# Support for including Misc/NEWS
-
-import re
-import codecs
-
-issue_re = re.compile('([Ii])ssue #([0-9]+)')
-whatsnew_re = re.compile(r"(?im)^what's new in (.*?)\??$")
-
-class MiscNews(Directive):
-    has_content = False
-    required_arguments = 1
-    optional_arguments = 0
-    final_argument_whitespace = False
-    option_spec = {}
-
-    def run(self):
-        fname = self.arguments[0]
-        source = self.state_machine.input_lines.source(
-            self.lineno - self.state_machine.input_offset - 1)
-        source_dir = path.dirname(path.abspath(source))
-        fpath = path.join(source_dir, fname)
-        self.state.document.settings.record_dependencies.add(fpath)
-        try:
-            fp = codecs.open(fpath, encoding='utf-8')
-            try:
-                content = fp.read()
-            finally:
-                fp.close()
-        except Exception:
-            text = 'The NEWS file is not available.'
-            node = nodes.strong(text, text)
-            return [node]
-        content = issue_re.sub(r'`\1ssue #\2 <http://bugs.python.org/\2>`__',
-                               content)
-        content = whatsnew_re.sub(r'\1', content)
-        # remove first 3 lines as they are the main heading
-        lines = ['.. default-role:: obj', ''] + content.splitlines()[3:]
-        self.state_machine.insert_input(lines, fname)
-        return []
-
-
-# Support for building "topic help" for pydoc
-
-pydoc_topic_labels = [
-    'assert', 'assignment', 'atom-identifiers', 'atom-literals',
-    'attribute-access', 'attribute-references', 'augassign', 'binary',
-    'bitwise', 'bltin-code-objects', 'bltin-ellipsis-object',
-    'bltin-null-object', 'bltin-type-objects', 'booleans',
-    'break', 'callable-types', 'calls', 'class', 'comparisons', 'compound',
-    'context-managers', 'continue', 'conversions', 'customization', 'debugger',
-    'del', 'dict', 'dynamic-features', 'else', 'exceptions', 'execmodel',
-    'exprlists', 'floating', 'for', 'formatstrings', 'function', 'global',
-    'id-classes', 'identifiers', 'if', 'imaginary', 'import', 'in', 'integers',
-    'lambda', 'lists', 'naming', 'nonlocal', 'numbers', 'numeric-types',
-    'objects', 'operator-summary', 'pass', 'power', 'raise', 'return',
-    'sequence-types', 'shifting', 'slicings', 'specialattrs', 'specialnames',
-    'string-methods', 'strings', 'subscriptions', 'truth', 'try', 'types',
-    'typesfunctions', 'typesmapping', 'typesmethods', 'typesmodules',
-    'typesseq', 'typesseq-mutable', 'unary', 'while', 'with', 'yield'
-]
-
-from os import path
-from time import asctime
-from pprint import pformat
-from docutils.io import StringOutput
-from docutils.utils import new_document
-
-from sphinx.builders import Builder
-from sphinx.writers.text import TextWriter
-
-
-class PydocTopicsBuilder(Builder):
-    name = 'pydoc-topics'
-
-    def init(self):
-        self.topics = {}
-
-    def get_outdated_docs(self):
-        return 'all pydoc topics'
-
-    def get_target_uri(self, docname, typ=None):
-        return ''  # no URIs
-
-    def write(self, *ignored):
-        writer = TextWriter(self)
-        for label in self.status_iterator(pydoc_topic_labels,
-                                          'building topics... ',
-                                          length=len(pydoc_topic_labels)):
-            if label not in self.env.domaindata['std']['labels']:
-                self.warn('label %r not in documentation' % label)
-                continue
-            docname, labelid, sectname = self.env.domaindata['std']['labels'][label]
-            doctree = self.env.get_and_resolve_doctree(docname, self)
-            document = new_document('<section node>')
-            document.append(doctree.ids[labelid])
-            destination = StringOutput(encoding='utf-8')
-            writer.write(document, destination)
-            self.topics[label] = writer.output.encode('utf-8')
-
-    def finish(self):
-        f = open(path.join(self.outdir, 'topics.py'), 'w')
-        try:
-            f.write('# -*- coding: utf-8 -*-\n')
-            f.write('# Autogenerated by Sphinx on %s\n' % asctime())
-            f.write('topics = ' + pformat(self.topics) + '\n')
-        finally:
-            f.close()
-
-
-# Support for checking for suspicious markup
-
-import suspicious
-
-
-# Support for documenting Opcodes
-
-import re
-
-opcode_sig_re = re.compile(r'(\w+(?:\+\d)?)(?:\s*\((.*)\))?')
-
-def parse_opcode_signature(env, sig, signode):
-    """Transform an opcode signature into RST nodes."""
-    m = opcode_sig_re.match(sig)
-    if m is None:
-        raise ValueError
-    opname, arglist = m.groups()
-    signode += addnodes.desc_name(opname, opname)
-    if arglist is not None:
-        paramlist = addnodes.desc_parameterlist()
-        signode += paramlist
-        paramlist += addnodes.desc_parameter(arglist, arglist)
-    return opname.strip()
-
-
-# Support for documenting pdb commands
-
-pdbcmd_sig_re = re.compile(r'([a-z()!]+)\s*(.*)')
-
-# later...
-#pdbargs_tokens_re = re.compile(r'''[a-zA-Z]+  |  # identifiers
-#                                   [.,:]+     |  # punctuation
-#                                   [\[\]()]   |  # parens
-#                                   \s+           # whitespace
-#                                   ''', re.X)
-
-def parse_pdb_command(env, sig, signode):
-    """Transform a pdb command signature into RST nodes."""
-    m = pdbcmd_sig_re.match(sig)
-    if m is None:
-        raise ValueError
-    name, args = m.groups()
-    fullname = name.replace('(', '').replace(')', '')
-    signode += addnodes.desc_name(name, name)
-    if args:
-        signode += addnodes.desc_addname(' '+args, ' '+args)
-    return fullname
-
-
-def setup(app):
-    app.add_role('issue', issue_role)
-    app.add_role('source', source_role)
-    app.add_directive('impl-detail', ImplementationDetail)
-    app.add_directive('deprecated-removed', DeprecatedRemoved)
-    app.add_builder(PydocTopicsBuilder)
-    app.add_builder(suspicious.CheckSuspiciousMarkupBuilder)
-    app.add_description_unit('opcode', 'opcode', '%s (opcode)',
-                             parse_opcode_signature)
-    app.add_description_unit('pdbcommand', 'pdbcmd', '%s (pdb command)',
-                             parse_pdb_command)
-    app.add_description_unit('2to3fixer', '2to3fixer', '%s (2to3 fixer)')
-    app.add_directive_to_domain('py', 'decorator', PyDecoratorFunction)
-    app.add_directive_to_domain('py', 'decoratormethod', PyDecoratorMethod)
-    app.add_directive('miscnews', MiscNews)

File .pc/applied-patches

View file
  • Ignore whitespace
 platform-lsbrelease.diff
 bdist-wininst-notfound.diff
 no-zip-on-sys.path.diff
-doc-nodownload.diff
 makesetup-bashism.diff
 hurd-disable-nonworking-constants.diff
 enable-fpectl.diff
 link-timemodule.diff
 lto-link-flags.diff
 libffi-shared.diff
-avoid-rpath.diff
 multiarch.diff
-ncurses-configure.diff
 distutils-init.diff
 lib2to3-no-pickled-grammar.diff
 ext-no-libpython-link.diff
-kfreebsd-xattrs.diff
 installed-testsuite.diff
 test-no-random-order.diff
-kfreebsd-testsuite.diff
 multiarch-extname.diff
 tempfile-minimal.diff
-7358ca69f351-fix-sphinx-1.1-docs-build.diff

File .pc/avoid-rpath.diff/.timestamp

  • Ignore whitespace
Empty file removed.

File .pc/avoid-rpath.diff/setup.py

  • Ignore whitespace
-# Autodetecting setup.py script for building the Python extensions
-#
-
-import sys, os, importlib.machinery, re, optparse
-from glob import glob
-import importlib._bootstrap
-import importlib.util
-import sysconfig
-
-from distutils import log
-from distutils import text_file
-from distutils.errors import *
-from distutils.core import Extension, setup
-from distutils.command.build_ext import build_ext
-from distutils.command.install import install
-from distutils.command.install_lib import install_lib
-from distutils.command.build_scripts import build_scripts
-from distutils.spawn import find_executable
-
-cross_compiling = "_PYTHON_HOST_PLATFORM" in os.environ
-
-def get_platform():
-    # cross build
-    if "_PYTHON_HOST_PLATFORM" in os.environ:
-        return os.environ["_PYTHON_HOST_PLATFORM"]
-    # Get value of sys.platform
-    if sys.platform.startswith('osf1'):
-        return 'osf1'
-    return sys.platform
-host_platform = get_platform()
-
-# Were we compiled --with-pydebug or with #define Py_DEBUG?
-COMPILED_WITH_PYDEBUG = ('--with-pydebug' in sysconfig.get_config_var("CONFIG_ARGS"))
-
-# This global variable is used to hold the list of modules to be disabled.
-disabled_module_list = []
-
-def add_dir_to_list(dirlist, dir):
-    """Add the directory 'dir' to the list 'dirlist' (after any relative
-    directories) if:
-
-    1) 'dir' is not already in 'dirlist'
-    2) 'dir' actually exists, and is a directory.
-    """
-    if dir is None or not os.path.isdir(dir) or dir in dirlist:
-        return
-    for i, path in enumerate(dirlist):
-        if not os.path.isabs(path):
-            dirlist.insert(i + 1, dir)
-            return
-    dirlist.insert(0, dir)
-
-def macosx_sdk_root():
-    """
-    Return the directory of the current OSX SDK,
-    or '/' if no SDK was specified.
-    """
-    cflags = sysconfig.get_config_var('CFLAGS')
-    m = re.search(r'-isysroot\s+(\S+)', cflags)
-    if m is None:
-        sysroot = '/'
-    else:
-        sysroot = m.group(1)
-    return sysroot
-
-def is_macosx_sdk_path(path):
-    """
-    Returns True if 'path' can be located in an OSX SDK
-    """
-    return ( (path.startswith('/usr/') and not path.startswith('/usr/local'))
-                or path.startswith('/System/')
-                or path.startswith('/Library/') )
-
-def find_file(filename, std_dirs, paths):
-    """Searches for the directory where a given file is located,
-    and returns a possibly-empty list of additional directories, or None
-    if the file couldn't be found at all.
-
-    'filename' is the name of a file, such as readline.h or libcrypto.a.
-    'std_dirs' is the list of standard system directories; if the
-        file is found in one of them, no additional directives are needed.
-    'paths' is a list of additional locations to check; if the file is
-        found in one of them, the resulting list will contain the directory.
-    """
-    if host_platform == 'darwin':
-        # Honor the MacOSX SDK setting when one was specified.
-        # An SDK is a directory with the same structure as a real
-        # system, but with only header files and libraries.
-        sysroot = macosx_sdk_root()
-
-    # Check the standard locations
-    for dir in std_dirs:
-        f = os.path.join(dir, filename)
-
-        if host_platform == 'darwin' and is_macosx_sdk_path(dir):
-            f = os.path.join(sysroot, dir[1:], filename)
-
-        if os.path.exists(f): return []
-
-    # Check the additional directories
-    for dir in paths:
-        f = os.path.join(dir, filename)
-
-        if host_platform == 'darwin' and is_macosx_sdk_path(dir):
-            f = os.path.join(sysroot, dir[1:], filename)
-
-        if os.path.exists(f):
-            return [dir]
-
-    # Not found anywhere
-    return None
-
-def find_library_file(compiler, libname, std_dirs, paths):
-    result = compiler.find_library_file(std_dirs + paths, libname)
-    if result is None:
-        return None
-
-    if host_platform == 'darwin':
-        sysroot = macosx_sdk_root()
-
-    # Check whether the found file is in one of the standard directories
-    dirname = os.path.dirname(result)
-    for p in std_dirs:
-        # Ensure path doesn't end with path separator
-        p = p.rstrip(os.sep)
-
-        if host_platform == 'darwin' and is_macosx_sdk_path(p):
-            if os.path.join(sysroot, p[1:]) == dirname:
-                return [ ]
-
-        if p == dirname:
-            return [ ]
-
-    # Otherwise, it must have been in one of the additional directories,
-    # so we have to figure out which one.
-    for p in paths:
-        # Ensure path doesn't end with path separator
-        p = p.rstrip(os.sep)
-
-        if host_platform == 'darwin' and is_macosx_sdk_path(p):
-            if os.path.join(sysroot, p[1:]) == dirname:
-                return [ p ]
-
-        if p == dirname:
-            return [p]
-    else:
-        assert False, "Internal error: Path not found in std_dirs or paths"
-
-def module_enabled(extlist, modname):
-    """Returns whether the module 'modname' is present in the list
-    of extensions 'extlist'."""
-    extlist = [ext for ext in extlist if ext.name == modname]
-    return len(extlist)
-
-def find_module_file(module, dirlist):
-    """Find a module in a set of possible folders. If it is not found
-    return the unadorned filename"""
-    list = find_file(module, [], dirlist)
-    if not list:
-        return module
-    if len(list) > 1:
-        log.info("WARNING: multiple copies of %s found"%module)
-    return os.path.join(list[0], module)
-
-class PyBuildExt(build_ext):
-
-    def __init__(self, dist):
-        build_ext.__init__(self, dist)
-        self.failed = []
-
-    def build_extensions(self):
-
-        # Detect which modules should be compiled
-        missing = self.detect_modules()
-
-        # Remove modules that are present on the disabled list
-        extensions = [ext for ext in self.extensions
-                      if ext.name not in disabled_module_list]
-        # move ctypes to the end, it depends on other modules
-        ext_map = dict((ext.name, i) for i, ext in enumerate(extensions))
-        if "_ctypes" in ext_map:
-            ctypes = extensions.pop(ext_map["_ctypes"])
-            extensions.append(ctypes)
-        self.extensions = extensions
-
-        # Fix up the autodetected modules, prefixing all the source files
-        # with Modules/.
-        srcdir = sysconfig.get_config_var('srcdir')
-        if not srcdir:
-            # Maybe running on Windows but not using CYGWIN?
-            raise ValueError("No source directory; cannot proceed.")
-        srcdir = os.path.abspath(srcdir)
-        moddirlist = [os.path.join(srcdir, 'Modules')]
-
-        # Fix up the paths for scripts, too
-        self.distribution.scripts = [os.path.join(srcdir, filename)
-                                     for filename in self.distribution.scripts]
-
-        # Python header files
-        headers = [sysconfig.get_config_h_filename()]
-        headers += glob(os.path.join(sysconfig.get_path('include'), "*.h"))
-
-        for ext in self.extensions[:]:
-            ext.sources = [ find_module_file(filename, moddirlist)
-                            for filename in ext.sources ]
-            if ext.depends is not None:
-                ext.depends = [find_module_file(filename, moddirlist)
-                               for filename in ext.depends]
-            else:
-                ext.depends = []
-            # re-compile extensions if a header file has been changed
-            ext.depends.extend(headers)
-
-            # If a module has already been built statically,
-            # don't build it here
-            if ext.name in sys.builtin_module_names:
-                self.extensions.remove(ext)
-
-        # Parse Modules/Setup and Modules/Setup.local to figure out which
-        # modules are turned on in the file.
-        remove_modules = []
-        for filename in ('Modules/Setup', 'Modules/Setup.local'):
-            input = text_file.TextFile(filename, join_lines=1)
-            while 1:
-                line = input.readline()
-                if not line: break
-                line = line.split()
-                remove_modules.append(line[0])
-            input.close()
-
-        for ext in self.extensions[:]:
-            if ext.name in remove_modules:
-                self.extensions.remove(ext)
-
-        # When you run "make CC=altcc" or something similar, you really want
-        # those environment variables passed into the setup.py phase.  Here's
-        # a small set of useful ones.
-        compiler = os.environ.get('CC')
-        args = {}
-        # unfortunately, distutils doesn't let us provide separate C and C++
-        # compilers
-        if compiler is not None:
-            (ccshared, cppflags, cflags) = \
-                sysconfig.get_config_vars('CCSHARED', 'CPPFLAGS', 'CFLAGS')
-            cppflags = ' '.join([f for f in cppflags.split() if not f.startswith('-I')])
-            args['compiler_so'] = compiler + ' ' + ccshared + ' ' + cppflags + ' ' + cflags
-        self.compiler.set_executables(**args)
-
-        build_ext.build_extensions(self)
-
-        longest = max([len(e.name) for e in self.extensions])
-        if self.failed:
-            longest = max(longest, max([len(name) for name in self.failed]))
-
-        def print_three_column(lst):
-            lst.sort(key=str.lower)
-            # guarantee zip() doesn't drop anything
-            while len(lst) % 3:
-                lst.append("")
-            for e, f, g in zip(lst[::3], lst[1::3], lst[2::3]):
-                print("%-*s   %-*s   %-*s" % (longest, e, longest, f,
-                                              longest, g))
-
-        if missing:
-            print()
-            print("Python build finished successfully!")
-            print("The necessary bits to build these optional modules were not "
-                  "found:")
-            print_three_column(missing)
-            print("To find the necessary bits, look in setup.py in"
-                  " detect_modules() for the module's name.")
-            print()
-
-        if self.failed:
-            failed = self.failed[:]
-            print()
-            print("Failed to build these modules:")
-            print_three_column(failed)
-            print()
-
-    def build_extension(self, ext):
-
-        if ext.name == '_ctypes':
-            if not self.configure_ctypes(ext):
-                return
-
-        try:
-            build_ext.build_extension(self, ext)
-        except (CCompilerError, DistutilsError) as why:
-            self.announce('WARNING: building of extension "%s" failed: %s' %
-                          (ext.name, sys.exc_info()[1]))
-            self.failed.append(ext.name)
-            return
-        # Workaround for Mac OS X: The Carbon-based modules cannot be
-        # reliably imported into a command-line Python
-        if 'Carbon' in ext.extra_link_args:
-            self.announce(
-                'WARNING: skipping import check for Carbon-based "%s"' %
-                ext.name)
-            return
-
-        if host_platform == 'darwin' and (
-                sys.maxsize > 2**32 and '-arch' in ext.extra_link_args):
-            # Don't bother doing an import check when an extension was
-            # build with an explicit '-arch' flag on OSX. That's currently
-            # only used to build 32-bit only extensions in a 4-way
-            # universal build and loading 32-bit code into a 64-bit
-            # process will fail.
-            self.announce(
-                'WARNING: skipping import check for "%s"' %
-                ext.name)
-            return
-
-        # Workaround for Cygwin: Cygwin currently has fork issues when many
-        # modules have been imported
-        if host_platform == 'cygwin':
-            self.announce('WARNING: skipping import check for Cygwin-based "%s"'
-                % ext.name)
-            return
-        ext_filename = os.path.join(
-            self.build_lib,
-            self.get_ext_filename(self.get_ext_fullname(ext.name)))
-
-        # If the build directory didn't exist when setup.py was
-        # started, sys.path_importer_cache has a negative result
-        # cached.  Clear that cache before trying to import.
-        sys.path_importer_cache.clear()
-
-        # Don't try to load extensions for cross builds
-        if cross_compiling:
-            return
-
-        loader = importlib.machinery.ExtensionFileLoader(ext.name, ext_filename)
-        spec = importlib.util.spec_from_file_location(ext.name, ext_filename,
-                                                      loader=loader)
-        try:
-            importlib._bootstrap._SpecMethods(spec).load()
-        except ImportError as why:
-            self.failed.append(ext.name)
-            self.announce('*** WARNING: renaming "%s" since importing it'
-                          ' failed: %s' % (ext.name, why), level=3)
-            assert not self.inplace
-            basename, tail = os.path.splitext(ext_filename)
-            newname = basename + "_failed" + tail
-            if os.path.exists(newname):
-                os.remove(newname)
-            os.rename(ext_filename, newname)
-
-            # XXX -- This relies on a Vile HACK in
-            # distutils.command.build_ext.build_extension().  The
-            # _built_objects attribute is stored there strictly for
-            # use here.
-            # If there is a failure, _built_objects may not be there,
-            # so catch the AttributeError and move on.
-            try:
-                for filename in self._built_objects:
-                    os.remove(filename)
-            except AttributeError:
-                self.announce('unable to remove files (ignored)')
-        except:
-            exc_type, why, tb = sys.exc_info()
-            self.announce('*** WARNING: importing extension "%s" '
-                          'failed with %s: %s' % (ext.name, exc_type, why),
-                          level=3)
-            self.failed.append(ext.name)
-
-    def add_multiarch_paths(self):
-        # Debian/Ubuntu multiarch support.
-        # https://wiki.ubuntu.com/MultiarchSpec
-        cc = sysconfig.get_config_var('CC')
-        tmpfile = os.path.join(self.build_temp, 'multiarch')
-        if not os.path.exists(self.build_temp):
-            os.makedirs(self.build_temp)
-        ret = os.system(
-            '%s -print-multiarch > %s 2> /dev/null' % (cc, tmpfile))
-        multiarch_path_component = ''
-        try:
-            if ret >> 8 == 0:
-                with open(tmpfile) as fp:
-                    multiarch_path_component = fp.readline().strip()
-        finally:
-            os.unlink(tmpfile)
-
-        if multiarch_path_component != '':
-            add_dir_to_list(self.compiler.library_dirs,
-                            '/usr/lib/' + multiarch_path_component)
-            add_dir_to_list(self.compiler.include_dirs,
-                            '/usr/include/' + multiarch_path_component)
-            return
-
-        if not find_executable('dpkg-architecture'):
-            return
-        opt = ''
-        if cross_compiling:
-            opt = '-t' + sysconfig.get_config_var('HOST_GNU_TYPE')
-        tmpfile = os.path.join(self.build_temp, 'multiarch')
-        if not os.path.exists(self.build_temp):
-            os.makedirs(self.build_temp)
-        ret = os.system(
-            'dpkg-architecture %s -qDEB_HOST_MULTIARCH > %s 2> /dev/null' %
-            (opt, tmpfile))
-        try:
-            if ret >> 8 == 0:
-                with open(tmpfile) as fp:
-                    multiarch_path_component = fp.readline().strip()
-                add_dir_to_list(self.compiler.library_dirs,
-                                '/usr/lib/' + multiarch_path_component)
-                add_dir_to_list(self.compiler.include_dirs,
-                                '/usr/include/' + multiarch_path_component)
-        finally:
-            os.unlink(tmpfile)
-
-    def add_gcc_paths(self):
-        gcc = sysconfig.get_config_var('CC')
-        tmpfile = os.path.join(self.build_temp, 'gccpaths')
-        if not os.path.exists(self.build_temp):
-            os.makedirs(self.build_temp)
-        ret = os.system('%s -E -v - </dev/null 2>%s 1>/dev/null' % (gcc, tmpfile))
-        is_gcc = False
-        in_incdirs = False
-        inc_dirs = []
-        lib_dirs = []
-        try:
-            if ret >> 8 == 0:
-                with open(tmpfile) as fp:
-                    for line in fp.readlines():
-                        if line.startswith("gcc version"):
-                            is_gcc = True
-                        elif line.startswith("#include <...>"):
-                            in_incdirs = True
-                        elif line.startswith("End of search list"):
-                            in_incdirs = False
-                        elif is_gcc and line.startswith("LIBRARY_PATH"):
-                            for d in line.strip().split("=")[1].split(":"):
-                                d = os.path.normpath(d)
-                                if '/gcc/' not in d:
-                                    add_dir_to_list(self.compiler.library_dirs,
-                                                    d)
-                        elif is_gcc and in_incdirs and '/gcc/' not in line:
-                            add_dir_to_list(self.compiler.include_dirs,
-                                            line.strip())
-        finally:
-            os.unlink(tmpfile)
-
-    def detect_modules(self):
-        # On Debian /usr/local is always used, so we don't include it twice
-        # only change this for cross builds for 3.3, issues on Mageia
-        if cross_compiling:
-            self.add_gcc_paths()
-        self.add_multiarch_paths()
-
-        # Add paths specified in the environment variables LDFLAGS and
-        # CPPFLAGS for header and library files.
-        # We must get the values from the Makefile and not the environment
-        # directly since an inconsistently reproducible issue comes up where
-        # the environment variable is not set even though the value were passed
-        # into configure and stored in the Makefile (issue found on OS X 10.3).
-        for env_var, arg_name, dir_list in (
-                ('LDFLAGS', '-R', self.compiler.runtime_library_dirs),
-                ('LDFLAGS', '-L', self.compiler.library_dirs),
-                ('CPPFLAGS', '-I', self.compiler.include_dirs)):
-            env_val = sysconfig.get_config_var(env_var)
-            if env_val:
-                # To prevent optparse from raising an exception about any
-                # options in env_val that it doesn't know about we strip out
-                # all double dashes and any dashes followed by a character
-                # that is not for the option we are dealing with.
-                #
-                # Please note that order of the regex is important!  We must
-                # strip out double-dashes first so that we don't end up with
-                # substituting "--Long" to "-Long" and thus lead to "ong" being
-                # used for a library directory.
-                env_val = re.sub(r'(^|\s+)-(-|(?!%s))' % arg_name[1],
-                                 ' ', env_val)
-                parser = optparse.OptionParser()
-                # Make sure that allowing args interspersed with options is
-                # allowed
-                parser.allow_interspersed_args = True
-                parser.error = lambda msg: None
-                parser.add_option(arg_name, dest="dirs", action="append")
-                options = parser.parse_args(env_val.split())[0]
-                if options.dirs:
-                    for directory in reversed(options.dirs):
-                        add_dir_to_list(dir_list, directory)
-
-        if os.path.normpath(sys.base_prefix) != '/usr' \
-                and not sysconfig.get_config_var('PYTHONFRAMEWORK'):
-            # OSX note: Don't add LIBDIR and INCLUDEDIR to building a framework
-            # (PYTHONFRAMEWORK is set) to avoid # linking problems when
-            # building a framework with different architectures than
-            # the one that is currently installed (issue #7473)
-            add_dir_to_list(self.compiler.library_dirs,
-                            sysconfig.get_config_var("LIBDIR"))
-            add_dir_to_list(self.compiler.include_dirs,
-                            sysconfig.get_config_var("INCLUDEDIR"))
-
-        # lib_dirs and inc_dirs are used to search for files;
-        # if a file is found in one of those directories, it can
-        # be assumed that no additional -I,-L directives are needed.
-        if not cross_compiling:
-            lib_dirs = self.compiler.library_dirs + [
-                '/lib64', '/usr/lib64',
-                '/lib', '/usr/lib',
-                ]
-            inc_dirs = self.compiler.include_dirs + ['/usr/include']
-        else:
-            lib_dirs = self.compiler.library_dirs[:]
-            inc_dirs = self.compiler.include_dirs[:]
-        exts = []
-        missing = []
-
-        config_h = sysconfig.get_config_h_filename()
-        with open(config_h) as file:
-            config_h_vars = sysconfig.parse_config_h(file)
-
-        srcdir = sysconfig.get_config_var('srcdir')
-
-        # OSF/1 and Unixware have some stuff in /usr/ccs/lib (like -ldb)
-        if host_platform in ['osf1', 'unixware7', 'openunix8']:
-            lib_dirs += ['/usr/ccs/lib']
-
-        # HP-UX11iv3 keeps files in lib/hpux folders.
-        if host_platform == 'hp-ux11':
-            lib_dirs += ['/usr/lib/hpux64', '/usr/lib/hpux32']
-
-        if host_platform == 'darwin':
-            # This should work on any unixy platform ;-)
-            # If the user has bothered specifying additional -I and -L flags
-            # in OPT and LDFLAGS we might as well use them here.
-            #
-            # NOTE: using shlex.split would technically be more correct, but
-            # also gives a bootstrap problem. Let's hope nobody uses
-            # directories with whitespace in the name to store libraries.
-            cflags, ldflags = sysconfig.get_config_vars(
-                    'CFLAGS', 'LDFLAGS')
-            for item in cflags.split():
-                if item.startswith('-I'):
-                    inc_dirs.append(item[2:])
-
-            for item in ldflags.split():
-                if item.startswith('-L'):
-                    lib_dirs.append(item[2:])
-
-        # Check for MacOS X, which doesn't need libm.a at all
-        math_libs = ['m']
-        if host_platform == 'darwin':
-            math_libs = []
-
-        # XXX Omitted modules: gl, pure, dl, SGI-specific modules
-
-        #
-        # The following modules are all pretty straightforward, and compile
-        # on pretty much any POSIXish platform.
-        #
-
-        # array objects
-        exts.append( Extension('array', ['arraymodule.c']) )
-        # complex math library functions
-        exts.append( Extension('cmath', ['cmathmodule.c', '_math.c'],
-                               depends=['_math.h'],
-                               libraries=math_libs) )
-        # math library functions, e.g. sin()
-        exts.append( Extension('math',  ['mathmodule.c', '_math.c'],
-                               depends=['_math.h'],
-                               libraries=math_libs) )
-
-        # time libraries: librt may be needed for clock_gettime()
-        time_libs = []
-        lib = sysconfig.get_config_var('TIMEMODULE_LIB')
-        if lib:
-            time_libs.append(lib)
-
-        # time operations and variables
-        exts.append( Extension('time', ['timemodule.c'],
-                               libraries=time_libs) )
-        exts.append( Extension('_datetime', ['_datetimemodule.c']) )
-        # random number generator implemented in C
-        exts.append( Extension("_random", ["_randommodule.c"]) )
-        # bisect
-        exts.append( Extension("_bisect", ["_bisectmodule.c"]) )
-        # heapq
-        exts.append( Extension("_heapq", ["_heapqmodule.c"]) )
-        # C-optimized pickle replacement
-        exts.append( Extension("_pickle", ["_pickle.c"]) )
-        # atexit
-        exts.append( Extension("atexit", ["atexitmodule.c"]) )
-        # _json speedups
-        exts.append( Extension("_json", ["_json.c"]) )
-        # Python C API test module
-        exts.append( Extension('_testcapi', ['_testcapimodule.c'],
-                               depends=['testcapi_long.h']) )
-        # Python PEP-3118 (buffer protocol) test module
-        exts.append( Extension('_testbuffer', ['_testbuffer.c']) )
-        # Test loading multiple modules from one compiled file (http://bugs.python.org/issue16421)
-        exts.append( Extension('_testimportmultiple', ['_testimportmultiple.c']) )
-        # profiler (_lsprof is for cProfile.py)
-        exts.append( Extension('_lsprof', ['_lsprof.c', 'rotatingtree.c']) )
-        # static Unicode character database
-        exts.append( Extension('unicodedata', ['unicodedata.c']) )
-        # _opcode module
-        exts.append( Extension('_opcode', ['_opcode.c']) )
-
-        # Modules with some UNIX dependencies -- on by default:
-        # (If you have a really backward UNIX, select and socket may not be
-        # supported...)
-
-        # fcntl(2) and ioctl(2)
-        libs = []
-        if (config_h_vars.get('FLOCK_NEEDS_LIBBSD', False)):
-            # May be necessary on AIX for flock function
-            libs = ['bsd']
-        exts.append( Extension('fcntl', ['fcntlmodule.c'], libraries=libs) )
-        # pwd(3)
-        exts.append( Extension('pwd', ['pwdmodule.c']) )
-        # grp(3)
-        exts.append( Extension('grp', ['grpmodule.c']) )
-        # spwd, shadow passwords
-        if (config_h_vars.get('HAVE_GETSPNAM', False) or
-                config_h_vars.get('HAVE_GETSPENT', False)):
-            exts.append( Extension('spwd', ['spwdmodule.c']) )
-        else:
-            missing.append('spwd')
-
-        # select(2); not on ancient System V
-        exts.append( Extension('select', ['selectmodule.c']) )
-
-        # Fred Drake's interface to the Python parser
-        exts.append( Extension('parser', ['parsermodule.c']) )
-
-        # Memory-mapped files (also works on Win32).
-        exts.append( Extension('mmap', ['mmapmodule.c']) )
-
-        # Lance Ellinghaus's syslog module
-        # syslog daemon interface
-        exts.append( Extension('syslog', ['syslogmodule.c']) )
-
-        #
-        # Here ends the simple stuff.  From here on, modules need certain
-        # libraries, are platform-specific, or present other surprises.
-        #
-
-        # Multimedia modules
-        # These don't work for 64-bit platforms!!!
-        # These represent audio samples or images as strings:
-
-        # Operations on audio samples
-        # According to #993173, this one should actually work fine on
-        # 64-bit platforms.
-        exts.append( Extension('audioop', ['audioop.c']) )
-
-        # readline
-        do_readline = self.compiler.find_library_file(lib_dirs, 'readline')
-        readline_termcap_library = ""
-        curses_library = ""
-        # Cannot use os.popen here in py3k.
-        tmpfile = os.path.join(self.build_temp, 'readline_termcap_lib')
-        if not os.path.exists(self.build_temp):
-            os.makedirs(self.build_temp)
-        # Determine if readline is already linked against curses or tinfo.
-        if do_readline:
-            if cross_compiling:
-                ret = os.system("%s -d %s | grep '(NEEDED)' > %s" \
-                                % (sysconfig.get_config_var('READELF'),
-                                   do_readline, tmpfile))
-            elif find_executable('ldd'):
-                ret = os.system("ldd %s > %s" % (do_readline, tmpfile))
-            else:
-                ret = 256
-            if ret >> 8 == 0:
-                with open(tmpfile) as fp:
-                    for ln in fp:
-                        if 'curses' in ln:
-                            readline_termcap_library = re.sub(
-                                r'.*lib(n?cursesw?)\.so.*', r'\1', ln
-                            ).rstrip()
-                            break
-                        # termcap interface split out from ncurses
-                        if 'tinfo' in ln:
-                            readline_termcap_library = 'tinfo'
-                            break
-            if os.path.exists(tmpfile):
-                os.unlink(tmpfile)
-        # Issue 7384: If readline is already linked against curses,
-        # use the same library for the readline and curses modules.
-        if 'curses' in readline_termcap_library:
-            curses_library = readline_termcap_library
-        elif self.compiler.find_library_file(lib_dirs, 'ncursesw'):
-            curses_library = 'ncursesw'
-        elif self.compiler.find_library_file(lib_dirs, 'ncurses'):
-            curses_library = 'ncurses'
-        elif self.compiler.find_library_file(lib_dirs, 'curses'):
-            curses_library = 'curses'
-
-        if host_platform == 'darwin':
-            os_release = int(os.uname()[2].split('.')[0])
-            dep_target = sysconfig.get_config_var('MACOSX_DEPLOYMENT_TARGET')
-            if dep_target and dep_target.split('.') < ['10', '5']:
-                os_release = 8
-            if os_release < 9:
-                # MacOSX 10.4 has a broken readline. Don't try to build
-                # the readline module unless the user has installed a fixed
-                # readline package
-                if find_file('readline/rlconf.h', inc_dirs, []) is None:
-                    do_readline = False
-        if do_readline:
-            if host_platform == 'darwin' and os_release < 9:
-                # In every directory on the search path search for a dynamic
-                # library and then a static library, instead of first looking
-                # for dynamic libraries on the entire path.
-                # This way a staticly linked custom readline gets picked up
-                # before the (possibly broken) dynamic library in /usr/lib.
-                readline_extra_link_args = ('-Wl,-search_paths_first',)
-            else:
-                readline_extra_link_args = ()
-
-            readline_libs = ['readline']
-            if readline_termcap_library:
-                pass # Issue 7384: Already linked against curses or tinfo.
-            elif curses_library:
-                readline_libs.append(curses_library)
-            elif self.compiler.find_library_file(lib_dirs +
-                                                     ['/usr/lib/termcap'],
-                                                     'termcap'):
-                readline_libs.append('termcap')
-            exts.append( Extension('readline', ['readline.c'],
-                                   library_dirs=['/usr/lib/termcap'],
-                                   extra_link_args=readline_extra_link_args,
-                                   libraries=readline_libs) )
-        else:
-            missing.append('readline')
-
-        # crypt module.
-
-        if self.compiler.find_library_file(lib_dirs, 'crypt'):
-            libs = ['crypt']
-        else:
-            libs = []
-        exts.append( Extension('_crypt', ['_cryptmodule.c'], libraries=libs) )
-
-        # CSV files
-        exts.append( Extension('_csv', ['_csv.c']) )
-
-        # POSIX subprocess module helper.
-        exts.append( Extension('_posixsubprocess', ['_posixsubprocess.c']) )
-
-        # socket(2)
-        exts.append( Extension('_socket', ['socketmodule.c'],
-                               depends = ['socketmodule.h']) )
-        # Detect SSL support for the socket module (via _ssl)
-        search_for_ssl_incs_in = [
-                              '/usr/local/ssl/include',
-                              '/usr/contrib/ssl/include/'
-                             ]
-        ssl_incs = find_file('openssl/ssl.h', inc_dirs,
-                             search_for_ssl_incs_in
-                             )
-        if ssl_incs is not None:
-            krb5_h = find_file('krb5.h', inc_dirs,
-                               ['/usr/kerberos/include'])
-            if krb5_h:
-                ssl_incs += krb5_h
-        ssl_libs = find_library_file(self.compiler, 'ssl',lib_dirs,
-                                     ['/usr/local/ssl/lib',
-                                      '/usr/contrib/ssl/lib/'
-                                     ] )
-
-        if (ssl_incs is not None and
-            ssl_libs is not None):
-            exts.append( Extension('_ssl', ['_ssl.c'],
-                                   include_dirs = ssl_incs,
-                                   library_dirs = ssl_libs,
-                                   libraries = ['ssl', 'crypto'],
-                                   depends = ['socketmodule.h']), )
-        else:
-            missing.append('_ssl')
-
-        # find out which version of OpenSSL we have
-        openssl_ver = 0
-        openssl_ver_re = re.compile(
-            '^\s*#\s*define\s+OPENSSL_VERSION_NUMBER\s+(0x[0-9a-fA-F]+)' )
-
-        # look for the openssl version header on the compiler search path.
-        opensslv_h = find_file('openssl/opensslv.h', [],
-                inc_dirs + search_for_ssl_incs_in)
-        if opensslv_h:
-            name = os.path.join(opensslv_h[0], 'openssl/opensslv.h')
-            if host_platform == 'darwin' and is_macosx_sdk_path(name):
-                name = os.path.join(macosx_sdk_root(), name[1:])
-            try:
-                with open(name, 'r') as incfile:
-                    for line in incfile:
-                        m = openssl_ver_re.match(line)
-                        if m:
-                            openssl_ver = int(m.group(1), 16)
-                            break
-            except IOError as msg:
-                print("IOError while reading opensshv.h:", msg)
-
-        #print('openssl_ver = 0x%08x' % openssl_ver)
-        min_openssl_ver = 0x00907000
-        have_any_openssl = ssl_incs is not None and ssl_libs is not None
-        have_usable_openssl = (have_any_openssl and
-                               openssl_ver >= min_openssl_ver)
-
-        if have_any_openssl:
-            if have_usable_openssl:
-                # The _hashlib module wraps optimized implementations
-                # of hash functions from the OpenSSL library.
-                exts.append( Extension('_hashlib', ['_hashopenssl.c'],
-                                       depends = ['hashlib.h'],
-                                       include_dirs = ssl_incs,
-                                       library_dirs = ssl_libs,
-                                       libraries = ['ssl', 'crypto']) )
-            else:
-                print("warning: openssl 0x%08x is too old for _hashlib" %
-                      openssl_ver)
-                missing.append('_hashlib')
-
-        # We always compile these even when OpenSSL is available (issue #14693).
-        # It's harmless and the object code is tiny (40-50 KB per module,
-        # only loaded when actually used).
-        exts.append( Extension('_sha256', ['sha256module.c'],
-                               depends=['hashlib.h']) )
-        exts.append( Extension('_sha512', ['sha512module.c'],
-                               depends=['hashlib.h']) )
-        exts.append( Extension('_md5', ['md5module.c'],
-                               depends=['hashlib.h']) )
-        exts.append( Extension('_sha1', ['sha1module.c'],
-                               depends=['hashlib.h']) )
-
-        # Modules that provide persistent dictionary-like semantics.  You will
-        # probably want to arrange for at least one of them to be available on
-        # your machine, though none are defined by default because of library
-        # dependencies.  The Python module dbm/__init__.py provides an
-        # implementation independent wrapper for these; dbm/dumb.py provides
-        # similar functionality (but slower of course) implemented in Python.
-