]> git.proxmox.com Git - mirror_edk2.git/blobdiff - AppPkg/Applications/Python/Python-2.7.2/Lib/distutils/tests/setuptools_extension.py
edk2: Remove AppPkg, StdLib, StdLibPrivateInternalFiles
[mirror_edk2.git] / AppPkg / Applications / Python / Python-2.7.2 / Lib / distutils / tests / setuptools_extension.py
diff --git a/AppPkg/Applications/Python/Python-2.7.2/Lib/distutils/tests/setuptools_extension.py b/AppPkg/Applications/Python/Python-2.7.2/Lib/distutils/tests/setuptools_extension.py
deleted file mode 100644 (file)
index 993fb54..0000000
+++ /dev/null
@@ -1,51 +0,0 @@
-from distutils.core import Extension as _Extension\r
-from distutils.core import Distribution as _Distribution\r
-\r
-def _get_unpatched(cls):\r
-    """Protect against re-patching the distutils if reloaded\r
-\r
-    Also ensures that no other distutils extension monkeypatched the distutils\r
-    first.\r
-    """\r
-    while cls.__module__.startswith('setuptools'):\r
-        cls, = cls.__bases__\r
-    if not cls.__module__.startswith('distutils'):\r
-        raise AssertionError(\r
-            "distutils has already been patched by %r" % cls\r
-        )\r
-    return cls\r
-\r
-_Distribution = _get_unpatched(_Distribution)\r
-_Extension = _get_unpatched(_Extension)\r
-\r
-try:\r
-    from Pyrex.Distutils.build_ext import build_ext\r
-except ImportError:\r
-    have_pyrex = False\r
-else:\r
-    have_pyrex = True\r
-\r
-\r
-class Extension(_Extension):\r
-    """Extension that uses '.c' files in place of '.pyx' files"""\r
-\r
-    if not have_pyrex:\r
-        # convert .pyx extensions to .c\r
-        def __init__(self,*args,**kw):\r
-            _Extension.__init__(self,*args,**kw)\r
-            sources = []\r
-            for s in self.sources:\r
-                if s.endswith('.pyx'):\r
-                    sources.append(s[:-3]+'c')\r
-                else:\r
-                    sources.append(s)\r
-            self.sources = sources\r
-\r
-class Library(Extension):\r
-    """Just like a regular Extension, but built as a library instead"""\r
-\r
-import sys, distutils.core, distutils.extension\r
-distutils.core.Extension = Extension\r
-distutils.extension.Extension = Extension\r
-if 'distutils.command.build_ext' in sys.modules:\r
-    sys.modules['distutils.command.build_ext'].Extension = Extension\r