{
    "mode": "pydoc",
    "parameter": "_distutils_hack",
    "section": "",
    "url": "https://www.chedong.com/phpMan.php/pydoc/_distutils_hack/json",
    "generated": "2026-06-02T15:01:16Z",
    "sections": {
        "NAME": {
            "content": "distutilshack\n",
            "subsections": []
        },
        "PACKAGE CONTENTS": {
            "content": "override\n",
            "subsections": []
        },
        "CLASSES": {
            "content": "builtins.object\nDistutilsMetaFinder\n",
            "subsections": [
                {
                    "name": "class DistutilsMetaFinder",
                    "content": "|  Methods defined here:\n|\n|  findspec(self, fullname, path, target=None)\n|\n|  specfordistutils(self)\n|\n|  specforpip(self)\n|      Ensure stdlib distutils when running under pip.\n|      See pypa/pip#8761 for rationale.\n|\n|  ----------------------------------------------------------------------\n|  Static methods defined here:\n|\n|  pipimportedduringbuild()\n|      Detect if pip is being imported in a build script. Ref #2355.\n|\n|  ----------------------------------------------------------------------\n|  Data descriptors defined here:\n|\n|  dict\n|      dictionary for instance variables (if defined)\n|\n|  weakref\n|      list of weak references to the object (if defined)\n"
                }
            ]
        },
        "FUNCTIONS": {
            "content": "",
            "subsections": [
                {
                    "name": "add_shim",
                    "content": ""
                },
                {
                    "name": "clear_distutils",
                    "content": ""
                },
                {
                    "name": "do_override",
                    "content": "Ensure that the local copy of distutils is preferred over stdlib.\n\nSee https://github.com/pypa/setuptools/issues/417#issuecomment-392298401\nfor more motivation.\n"
                },
                {
                    "name": "enabled",
                    "content": "Allow selection of distutils by environment variable.\n"
                },
                {
                    "name": "ensure_local_distutils",
                    "content": ""
                },
                {
                    "name": "remove_shim",
                    "content": ""
                },
                {
                    "name": "warn_distutils_present",
                    "content": ""
                }
            ]
        },
        "DATA": {
            "content": "DISTUTILSFINDER = <distutilshack.DistutilsMetaFinder object>\nispypy = False\n",
            "subsections": []
        },
        "FILE": {
            "content": "/usr/lib/python3/dist-packages/distutilshack/init.py\n\n",
            "subsections": []
        }
    },
    "summary": "distutilshack",
    "flags": [],
    "examples": [],
    "see_also": []
}