diff --git a/llava/lib/python3.10/distutils/__pycache__/__init__.cpython-310.pyc b/llava/lib/python3.10/distutils/__pycache__/__init__.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..9577ec65edbdf7bf9c90dc81ecc9a87ef293a276 Binary files /dev/null and b/llava/lib/python3.10/distutils/__pycache__/__init__.cpython-310.pyc differ diff --git a/llava/lib/python3.10/distutils/__pycache__/_msvccompiler.cpython-310.pyc b/llava/lib/python3.10/distutils/__pycache__/_msvccompiler.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..74562c6c049498f4f246f01006245788d65ea8b3 Binary files /dev/null and b/llava/lib/python3.10/distutils/__pycache__/_msvccompiler.cpython-310.pyc differ diff --git a/llava/lib/python3.10/distutils/__pycache__/archive_util.cpython-310.pyc b/llava/lib/python3.10/distutils/__pycache__/archive_util.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..08879c6e00b66d63d6c0c011cef3c861a7b07c1e Binary files /dev/null and b/llava/lib/python3.10/distutils/__pycache__/archive_util.cpython-310.pyc differ diff --git a/llava/lib/python3.10/distutils/__pycache__/bcppcompiler.cpython-310.pyc b/llava/lib/python3.10/distutils/__pycache__/bcppcompiler.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..89adb7456145b5d3f5a601bb7f05035eac86fd7d Binary files /dev/null and b/llava/lib/python3.10/distutils/__pycache__/bcppcompiler.cpython-310.pyc differ diff --git a/llava/lib/python3.10/distutils/__pycache__/cmd.cpython-310.pyc b/llava/lib/python3.10/distutils/__pycache__/cmd.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..f608690879664b8c8b771f4e5009cc136f26a142 Binary files /dev/null and b/llava/lib/python3.10/distutils/__pycache__/cmd.cpython-310.pyc differ diff --git a/llava/lib/python3.10/distutils/__pycache__/core.cpython-310.pyc b/llava/lib/python3.10/distutils/__pycache__/core.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..2a0d9222479e919b071612caf25d6937a0ed1448 Binary files /dev/null and b/llava/lib/python3.10/distutils/__pycache__/core.cpython-310.pyc differ diff --git a/llava/lib/python3.10/distutils/__pycache__/cygwinccompiler.cpython-310.pyc b/llava/lib/python3.10/distutils/__pycache__/cygwinccompiler.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..e6f54e047a63ea3697ae8355f52515f03a26adce Binary files /dev/null and b/llava/lib/python3.10/distutils/__pycache__/cygwinccompiler.cpython-310.pyc differ diff --git a/llava/lib/python3.10/distutils/__pycache__/debug.cpython-310.pyc b/llava/lib/python3.10/distutils/__pycache__/debug.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..6e97a40435ceb19dea332d553bf10ddb9495ca41 Binary files /dev/null and b/llava/lib/python3.10/distutils/__pycache__/debug.cpython-310.pyc differ diff --git a/llava/lib/python3.10/distutils/__pycache__/dep_util.cpython-310.pyc b/llava/lib/python3.10/distutils/__pycache__/dep_util.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..a6c320211465a3bff998f282ffaa2720f4b4572f Binary files /dev/null and b/llava/lib/python3.10/distutils/__pycache__/dep_util.cpython-310.pyc differ diff --git a/llava/lib/python3.10/distutils/__pycache__/dir_util.cpython-310.pyc b/llava/lib/python3.10/distutils/__pycache__/dir_util.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..ea59d088c55b978452925f14534cf378a8b5eee7 Binary files /dev/null and b/llava/lib/python3.10/distutils/__pycache__/dir_util.cpython-310.pyc differ diff --git a/llava/lib/python3.10/distutils/__pycache__/dist.cpython-310.pyc b/llava/lib/python3.10/distutils/__pycache__/dist.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..6b4315956eddb41d61dcd24ecefed6db02db6210 Binary files /dev/null and b/llava/lib/python3.10/distutils/__pycache__/dist.cpython-310.pyc differ diff --git a/llava/lib/python3.10/distutils/__pycache__/errors.cpython-310.pyc b/llava/lib/python3.10/distutils/__pycache__/errors.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..e57784824255caef4f3489acaa00a7249690a118 Binary files /dev/null and b/llava/lib/python3.10/distutils/__pycache__/errors.cpython-310.pyc differ diff --git a/llava/lib/python3.10/distutils/__pycache__/extension.cpython-310.pyc b/llava/lib/python3.10/distutils/__pycache__/extension.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..88c52ffb5506b0b69510c9988345be82761f1e06 Binary files /dev/null and b/llava/lib/python3.10/distutils/__pycache__/extension.cpython-310.pyc differ diff --git a/llava/lib/python3.10/distutils/__pycache__/fancy_getopt.cpython-310.pyc b/llava/lib/python3.10/distutils/__pycache__/fancy_getopt.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..beaa1db4d824215bb42f5f857d5f7863ed4dbc0a Binary files /dev/null and b/llava/lib/python3.10/distutils/__pycache__/fancy_getopt.cpython-310.pyc differ diff --git a/llava/lib/python3.10/distutils/__pycache__/file_util.cpython-310.pyc b/llava/lib/python3.10/distutils/__pycache__/file_util.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..3a9cb1d6cd88f75bb4fa20718a27303f2f461047 Binary files /dev/null and b/llava/lib/python3.10/distutils/__pycache__/file_util.cpython-310.pyc differ diff --git a/llava/lib/python3.10/distutils/__pycache__/filelist.cpython-310.pyc b/llava/lib/python3.10/distutils/__pycache__/filelist.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..20c01532e727132a4c1a7a0f941b6715f0e1a3ef Binary files /dev/null and b/llava/lib/python3.10/distutils/__pycache__/filelist.cpython-310.pyc differ diff --git a/llava/lib/python3.10/distutils/__pycache__/log.cpython-310.pyc b/llava/lib/python3.10/distutils/__pycache__/log.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..e46db920f80610a4bb1e10d0e6e91a8b174992f2 Binary files /dev/null and b/llava/lib/python3.10/distutils/__pycache__/log.cpython-310.pyc differ diff --git a/llava/lib/python3.10/distutils/__pycache__/msvc9compiler.cpython-310.pyc b/llava/lib/python3.10/distutils/__pycache__/msvc9compiler.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..1c22174e59ada0ca9fdd4deea5ea0d2b3e2d64e7 Binary files /dev/null and b/llava/lib/python3.10/distutils/__pycache__/msvc9compiler.cpython-310.pyc differ diff --git a/llava/lib/python3.10/distutils/__pycache__/msvccompiler.cpython-310.pyc b/llava/lib/python3.10/distutils/__pycache__/msvccompiler.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..9d00d6024175967f81a092b0bcc7523ebab6e79c Binary files /dev/null and b/llava/lib/python3.10/distutils/__pycache__/msvccompiler.cpython-310.pyc differ diff --git a/llava/lib/python3.10/distutils/__pycache__/spawn.cpython-310.pyc b/llava/lib/python3.10/distutils/__pycache__/spawn.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..b76ff596f7ff7aceda73736649e8b5f2a4d5be33 Binary files /dev/null and b/llava/lib/python3.10/distutils/__pycache__/spawn.cpython-310.pyc differ diff --git a/llava/lib/python3.10/distutils/__pycache__/sysconfig.cpython-310.pyc b/llava/lib/python3.10/distutils/__pycache__/sysconfig.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..45b27278f870f5920f916015dd5bb70b4ac67fab Binary files /dev/null and b/llava/lib/python3.10/distutils/__pycache__/sysconfig.cpython-310.pyc differ diff --git a/llava/lib/python3.10/distutils/__pycache__/text_file.cpython-310.pyc b/llava/lib/python3.10/distutils/__pycache__/text_file.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..f3cf5db038aa0b2cccc46c7f405d0026d46c3a43 Binary files /dev/null and b/llava/lib/python3.10/distutils/__pycache__/text_file.cpython-310.pyc differ diff --git a/llava/lib/python3.10/distutils/__pycache__/unixccompiler.cpython-310.pyc b/llava/lib/python3.10/distutils/__pycache__/unixccompiler.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..98f89a78f7e4ab356b561f0b21580a9a871dd13b Binary files /dev/null and b/llava/lib/python3.10/distutils/__pycache__/unixccompiler.cpython-310.pyc differ diff --git a/llava/lib/python3.10/distutils/__pycache__/version.cpython-310.pyc b/llava/lib/python3.10/distutils/__pycache__/version.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..ed18dc9bbfd0a150484919353ad61c742b14b506 Binary files /dev/null and b/llava/lib/python3.10/distutils/__pycache__/version.cpython-310.pyc differ diff --git a/llava/lib/python3.10/distutils/__pycache__/versionpredicate.cpython-310.pyc b/llava/lib/python3.10/distutils/__pycache__/versionpredicate.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..ffeaa94c98e79c00acf1a96beb8f0548078e4fb9 Binary files /dev/null and b/llava/lib/python3.10/distutils/__pycache__/versionpredicate.cpython-310.pyc differ diff --git a/llava/lib/python3.10/distutils/tests/__pycache__/__init__.cpython-310.pyc b/llava/lib/python3.10/distutils/tests/__pycache__/__init__.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..94a6d2f9c7c1812d88182bbe4a3c680c0c64c9ad Binary files /dev/null and b/llava/lib/python3.10/distutils/tests/__pycache__/__init__.cpython-310.pyc differ diff --git a/llava/lib/python3.10/distutils/tests/__pycache__/support.cpython-310.pyc b/llava/lib/python3.10/distutils/tests/__pycache__/support.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..0ed399244154a293c4840bde9c084b1384e42fd2 Binary files /dev/null and b/llava/lib/python3.10/distutils/tests/__pycache__/support.cpython-310.pyc differ diff --git a/llava/lib/python3.10/distutils/tests/__pycache__/test_archive_util.cpython-310.pyc b/llava/lib/python3.10/distutils/tests/__pycache__/test_archive_util.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..55fc029e4534cf2ca8d22e553b95f9cff8d06d8a Binary files /dev/null and b/llava/lib/python3.10/distutils/tests/__pycache__/test_archive_util.cpython-310.pyc differ diff --git a/llava/lib/python3.10/distutils/tests/__pycache__/test_bdist.cpython-310.pyc b/llava/lib/python3.10/distutils/tests/__pycache__/test_bdist.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..09b1578bc9ec2e410deb17a5c5b8354f7ebc4d0d Binary files /dev/null and b/llava/lib/python3.10/distutils/tests/__pycache__/test_bdist.cpython-310.pyc differ diff --git a/llava/lib/python3.10/distutils/tests/__pycache__/test_bdist_dumb.cpython-310.pyc b/llava/lib/python3.10/distutils/tests/__pycache__/test_bdist_dumb.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..4cee510087f6db45c8c02289c8c3f412e90d2cf4 Binary files /dev/null and b/llava/lib/python3.10/distutils/tests/__pycache__/test_bdist_dumb.cpython-310.pyc differ diff --git a/llava/lib/python3.10/distutils/tests/__pycache__/test_build.cpython-310.pyc b/llava/lib/python3.10/distutils/tests/__pycache__/test_build.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..e0c1b2164b88e35c0d33fcb6cc04fe55c452caf0 Binary files /dev/null and b/llava/lib/python3.10/distutils/tests/__pycache__/test_build.cpython-310.pyc differ diff --git a/llava/lib/python3.10/distutils/tests/__pycache__/test_build_clib.cpython-310.pyc b/llava/lib/python3.10/distutils/tests/__pycache__/test_build_clib.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..16c9e6532f20eda1ae620bb1bce4814394b4e6e6 Binary files /dev/null and b/llava/lib/python3.10/distutils/tests/__pycache__/test_build_clib.cpython-310.pyc differ diff --git a/llava/lib/python3.10/distutils/tests/__pycache__/test_build_ext.cpython-310.pyc b/llava/lib/python3.10/distutils/tests/__pycache__/test_build_ext.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..335cae666de3a9fc0698c7f7afbeb51ce8aa4a8a Binary files /dev/null and b/llava/lib/python3.10/distutils/tests/__pycache__/test_build_ext.cpython-310.pyc differ diff --git a/llava/lib/python3.10/distutils/tests/__pycache__/test_build_py.cpython-310.pyc b/llava/lib/python3.10/distutils/tests/__pycache__/test_build_py.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..60059b9638b794e9eff49f797ab4f6fd198eeab1 Binary files /dev/null and b/llava/lib/python3.10/distutils/tests/__pycache__/test_build_py.cpython-310.pyc differ diff --git a/llava/lib/python3.10/distutils/tests/__pycache__/test_build_scripts.cpython-310.pyc b/llava/lib/python3.10/distutils/tests/__pycache__/test_build_scripts.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..918d587e8d8f894ceb50b7ec88737d4e1ab5c9dc Binary files /dev/null and b/llava/lib/python3.10/distutils/tests/__pycache__/test_build_scripts.cpython-310.pyc differ diff --git a/llava/lib/python3.10/distutils/tests/__pycache__/test_check.cpython-310.pyc b/llava/lib/python3.10/distutils/tests/__pycache__/test_check.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..f4cb6538f200ce88cf4bd9ae671be40695c01276 Binary files /dev/null and b/llava/lib/python3.10/distutils/tests/__pycache__/test_check.cpython-310.pyc differ diff --git a/llava/lib/python3.10/distutils/tests/__pycache__/test_clean.cpython-310.pyc b/llava/lib/python3.10/distutils/tests/__pycache__/test_clean.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..e9ba64723254221ab2c97baeeb45566c1f3ce344 Binary files /dev/null and b/llava/lib/python3.10/distutils/tests/__pycache__/test_clean.cpython-310.pyc differ diff --git a/llava/lib/python3.10/distutils/tests/__pycache__/test_cmd.cpython-310.pyc b/llava/lib/python3.10/distutils/tests/__pycache__/test_cmd.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..fc560dad7afb7b39abbb26014724fb28659ad68d Binary files /dev/null and b/llava/lib/python3.10/distutils/tests/__pycache__/test_cmd.cpython-310.pyc differ diff --git a/llava/lib/python3.10/distutils/tests/__pycache__/test_config.cpython-310.pyc b/llava/lib/python3.10/distutils/tests/__pycache__/test_config.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..d840e97fcc11aac7121d8c340c1ed13f5ca74ba8 Binary files /dev/null and b/llava/lib/python3.10/distutils/tests/__pycache__/test_config.cpython-310.pyc differ diff --git a/llava/lib/python3.10/distutils/tests/__pycache__/test_config_cmd.cpython-310.pyc b/llava/lib/python3.10/distutils/tests/__pycache__/test_config_cmd.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..321af26f2ec418e38bfe8602fee4d94dd7f3e136 Binary files /dev/null and b/llava/lib/python3.10/distutils/tests/__pycache__/test_config_cmd.cpython-310.pyc differ diff --git a/llava/lib/python3.10/distutils/tests/__pycache__/test_core.cpython-310.pyc b/llava/lib/python3.10/distutils/tests/__pycache__/test_core.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..270aa0b4df9b67f4ab29df3ce305476f9b1fa6f5 Binary files /dev/null and b/llava/lib/python3.10/distutils/tests/__pycache__/test_core.cpython-310.pyc differ diff --git a/llava/lib/python3.10/distutils/tests/__pycache__/test_dep_util.cpython-310.pyc b/llava/lib/python3.10/distutils/tests/__pycache__/test_dep_util.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..2e790b3a53265c85700f2bd2ffc211cb1b61b4c0 Binary files /dev/null and b/llava/lib/python3.10/distutils/tests/__pycache__/test_dep_util.cpython-310.pyc differ diff --git a/llava/lib/python3.10/distutils/tests/__pycache__/test_dir_util.cpython-310.pyc b/llava/lib/python3.10/distutils/tests/__pycache__/test_dir_util.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..780de8e0441b13b76b37fe52c0442461e4563092 Binary files /dev/null and b/llava/lib/python3.10/distutils/tests/__pycache__/test_dir_util.cpython-310.pyc differ diff --git a/llava/lib/python3.10/distutils/tests/__pycache__/test_dist.cpython-310.pyc b/llava/lib/python3.10/distutils/tests/__pycache__/test_dist.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..f85cca7f2accfdd5a7f0fde3003db4f6ef7a462a Binary files /dev/null and b/llava/lib/python3.10/distutils/tests/__pycache__/test_dist.cpython-310.pyc differ diff --git a/llava/lib/python3.10/distutils/tests/__pycache__/test_install.cpython-310.pyc b/llava/lib/python3.10/distutils/tests/__pycache__/test_install.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..a852dcdf07a713ba3d39aefd06ee6c3deb01b59c Binary files /dev/null and b/llava/lib/python3.10/distutils/tests/__pycache__/test_install.cpython-310.pyc differ diff --git a/llava/lib/python3.10/distutils/tests/__pycache__/test_install_data.cpython-310.pyc b/llava/lib/python3.10/distutils/tests/__pycache__/test_install_data.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..ff15b53ee8f0d6624f1b4e7433fadc6e253b55eb Binary files /dev/null and b/llava/lib/python3.10/distutils/tests/__pycache__/test_install_data.cpython-310.pyc differ diff --git a/llava/lib/python3.10/distutils/tests/__pycache__/test_install_headers.cpython-310.pyc b/llava/lib/python3.10/distutils/tests/__pycache__/test_install_headers.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..ca3829dd6f5f0fc01b379c290d85da8dc5751041 Binary files /dev/null and b/llava/lib/python3.10/distutils/tests/__pycache__/test_install_headers.cpython-310.pyc differ diff --git a/llava/lib/python3.10/distutils/tests/__pycache__/test_install_lib.cpython-310.pyc b/llava/lib/python3.10/distutils/tests/__pycache__/test_install_lib.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..4d5a67984179e8156a1d45c4292572cb86225c41 Binary files /dev/null and b/llava/lib/python3.10/distutils/tests/__pycache__/test_install_lib.cpython-310.pyc differ diff --git a/llava/lib/python3.10/distutils/tests/__pycache__/test_install_scripts.cpython-310.pyc b/llava/lib/python3.10/distutils/tests/__pycache__/test_install_scripts.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..99a41ff3e23db8dc381cbf624638bb35bdd8a816 Binary files /dev/null and b/llava/lib/python3.10/distutils/tests/__pycache__/test_install_scripts.cpython-310.pyc differ diff --git a/llava/lib/python3.10/distutils/tests/__pycache__/test_log.cpython-310.pyc b/llava/lib/python3.10/distutils/tests/__pycache__/test_log.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..57e7d3e974b4eee7b98bdbf897f43e9992876b99 Binary files /dev/null and b/llava/lib/python3.10/distutils/tests/__pycache__/test_log.cpython-310.pyc differ diff --git a/llava/lib/python3.10/distutils/tests/__pycache__/test_msvc9compiler.cpython-310.pyc b/llava/lib/python3.10/distutils/tests/__pycache__/test_msvc9compiler.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..7040d66e442699e09a17f2441db5df3bed0bc2a7 Binary files /dev/null and b/llava/lib/python3.10/distutils/tests/__pycache__/test_msvc9compiler.cpython-310.pyc differ diff --git a/llava/lib/python3.10/distutils/tests/__pycache__/test_msvccompiler.cpython-310.pyc b/llava/lib/python3.10/distutils/tests/__pycache__/test_msvccompiler.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..c3243ea01c6cd76335f010725194b25f10290106 Binary files /dev/null and b/llava/lib/python3.10/distutils/tests/__pycache__/test_msvccompiler.cpython-310.pyc differ diff --git a/llava/lib/python3.10/distutils/tests/__pycache__/test_register.cpython-310.pyc b/llava/lib/python3.10/distutils/tests/__pycache__/test_register.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..8cefa594d907f037bc26695a8df53fd5bdf35478 Binary files /dev/null and b/llava/lib/python3.10/distutils/tests/__pycache__/test_register.cpython-310.pyc differ diff --git a/llava/lib/python3.10/distutils/tests/__pycache__/test_sdist.cpython-310.pyc b/llava/lib/python3.10/distutils/tests/__pycache__/test_sdist.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..c6063b04d7a676f4191589bf008c5bd9e4fbca2b Binary files /dev/null and b/llava/lib/python3.10/distutils/tests/__pycache__/test_sdist.cpython-310.pyc differ diff --git a/llava/lib/python3.10/distutils/tests/__pycache__/test_spawn.cpython-310.pyc b/llava/lib/python3.10/distutils/tests/__pycache__/test_spawn.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..cc83e330c25a66aca40e985213caa196b8ed553c Binary files /dev/null and b/llava/lib/python3.10/distutils/tests/__pycache__/test_spawn.cpython-310.pyc differ diff --git a/llava/lib/python3.10/distutils/tests/__pycache__/test_sysconfig.cpython-310.pyc b/llava/lib/python3.10/distutils/tests/__pycache__/test_sysconfig.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..d9cfbefbfb1c1ba56dbab7b3f0d1263329e57fce Binary files /dev/null and b/llava/lib/python3.10/distutils/tests/__pycache__/test_sysconfig.cpython-310.pyc differ diff --git a/llava/lib/python3.10/distutils/tests/__pycache__/test_text_file.cpython-310.pyc b/llava/lib/python3.10/distutils/tests/__pycache__/test_text_file.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..c39e8722c757bdc8ec58eeeb46b12ba4c989cde1 Binary files /dev/null and b/llava/lib/python3.10/distutils/tests/__pycache__/test_text_file.cpython-310.pyc differ diff --git a/llava/lib/python3.10/distutils/tests/__pycache__/test_unixccompiler.cpython-310.pyc b/llava/lib/python3.10/distutils/tests/__pycache__/test_unixccompiler.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..cd8c0451318ff74cf36f8bf283e87a09d99b20ed Binary files /dev/null and b/llava/lib/python3.10/distutils/tests/__pycache__/test_unixccompiler.cpython-310.pyc differ diff --git a/llava/lib/python3.10/distutils/tests/__pycache__/test_upload.cpython-310.pyc b/llava/lib/python3.10/distutils/tests/__pycache__/test_upload.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..387d25e3be371f40a2a131297012d720f8cf4325 Binary files /dev/null and b/llava/lib/python3.10/distutils/tests/__pycache__/test_upload.cpython-310.pyc differ diff --git a/llava/lib/python3.10/distutils/tests/__pycache__/test_util.cpython-310.pyc b/llava/lib/python3.10/distutils/tests/__pycache__/test_util.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..4440d0f9655a2bedd2ecdadcfc9286793281a58c Binary files /dev/null and b/llava/lib/python3.10/distutils/tests/__pycache__/test_util.cpython-310.pyc differ diff --git a/llava/lib/python3.10/distutils/tests/__pycache__/test_version.cpython-310.pyc b/llava/lib/python3.10/distutils/tests/__pycache__/test_version.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..7b002ea837ec60fba657cf4bac21447633bd7bd4 Binary files /dev/null and b/llava/lib/python3.10/distutils/tests/__pycache__/test_version.cpython-310.pyc differ diff --git a/llava/lib/python3.10/distutils/tests/__pycache__/test_versionpredicate.cpython-310.pyc b/llava/lib/python3.10/distutils/tests/__pycache__/test_versionpredicate.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..07cd00968ef3c857c22d60f75b6fca8178293a28 Binary files /dev/null and b/llava/lib/python3.10/distutils/tests/__pycache__/test_versionpredicate.cpython-310.pyc differ diff --git a/llava/lib/python3.10/distutils/tests/test_bdist.py b/llava/lib/python3.10/distutils/tests/test_bdist.py new file mode 100644 index 0000000000000000000000000000000000000000..55fa3930dd92f20f5d142a8a594dfc0238ccd698 --- /dev/null +++ b/llava/lib/python3.10/distutils/tests/test_bdist.py @@ -0,0 +1,56 @@ +"""Tests for distutils.command.bdist.""" +import os +import unittest +from test.support import run_unittest + +import warnings +with warnings.catch_warnings(): + warnings.simplefilter('ignore', DeprecationWarning) + from distutils.command.bdist import bdist + from distutils.tests import support + + +class BuildTestCase(support.TempdirManager, + unittest.TestCase): + + def test_formats(self): + # let's create a command and make sure + # we can set the format + dist = self.create_dist()[1] + cmd = bdist(dist) + cmd.formats = ['msi'] + cmd.ensure_finalized() + self.assertEqual(cmd.formats, ['msi']) + + # what formats does bdist offer? + formats = ['bztar', 'gztar', 'msi', 'rpm', 'tar', + 'xztar', 'zip', 'ztar'] + found = sorted(cmd.format_command) + self.assertEqual(found, formats) + + def test_skip_build(self): + # bug #10946: bdist --skip-build should trickle down to subcommands + dist = self.create_dist()[1] + cmd = bdist(dist) + cmd.skip_build = 1 + cmd.ensure_finalized() + dist.command_obj['bdist'] = cmd + + names = ['bdist_dumb'] # bdist_rpm does not support --skip-build + if os.name == 'nt': + names.append('bdist_msi') + + for name in names: + subcmd = cmd.get_finalized_command(name) + if getattr(subcmd, '_unsupported', False): + # command is not supported on this build + continue + self.assertTrue(subcmd.skip_build, + '%s should take --skip-build from bdist' % name) + + +def test_suite(): + return unittest.makeSuite(BuildTestCase) + +if __name__ == '__main__': + run_unittest(test_suite()) diff --git a/llava/lib/python3.10/distutils/tests/test_bdist_dumb.py b/llava/lib/python3.10/distutils/tests/test_bdist_dumb.py new file mode 100644 index 0000000000000000000000000000000000000000..01a233bce37ff97ca5e64f305146307aaf50d887 --- /dev/null +++ b/llava/lib/python3.10/distutils/tests/test_bdist_dumb.py @@ -0,0 +1,97 @@ +"""Tests for distutils.command.bdist_dumb.""" + +import os +import sys +import zipfile +import unittest +from test.support import run_unittest + +from distutils.core import Distribution +from distutils.command.bdist_dumb import bdist_dumb +from distutils.tests import support + +SETUP_PY = """\ +from distutils.core import setup +import foo + +setup(name='foo', version='0.1', py_modules=['foo'], + url='xxx', author='xxx', author_email='xxx') + +""" + +try: + import zlib + ZLIB_SUPPORT = True +except ImportError: + ZLIB_SUPPORT = False + + +class BuildDumbTestCase(support.TempdirManager, + support.LoggingSilencer, + support.EnvironGuard, + unittest.TestCase): + + def setUp(self): + super(BuildDumbTestCase, self).setUp() + self.old_location = os.getcwd() + self.old_sys_argv = sys.argv, sys.argv[:] + + def tearDown(self): + os.chdir(self.old_location) + sys.argv = self.old_sys_argv[0] + sys.argv[:] = self.old_sys_argv[1] + super(BuildDumbTestCase, self).tearDown() + + @unittest.skipUnless(ZLIB_SUPPORT, 'Need zlib support to run') + def test_simple_built(self): + + # let's create a simple package + tmp_dir = self.mkdtemp() + pkg_dir = os.path.join(tmp_dir, 'foo') + os.mkdir(pkg_dir) + self.write_file((pkg_dir, 'setup.py'), SETUP_PY) + self.write_file((pkg_dir, 'foo.py'), '#') + self.write_file((pkg_dir, 'MANIFEST.in'), 'include foo.py') + self.write_file((pkg_dir, 'README'), '') + + dist = Distribution({'name': 'foo', 'version': '0.1', + 'py_modules': ['foo'], + 'url': 'xxx', 'author': 'xxx', + 'author_email': 'xxx'}) + dist.script_name = 'setup.py' + os.chdir(pkg_dir) + + sys.argv = ['setup.py'] + cmd = bdist_dumb(dist) + + # so the output is the same no matter + # what is the platform + cmd.format = 'zip' + + cmd.ensure_finalized() + cmd.run() + + # see what we have + dist_created = os.listdir(os.path.join(pkg_dir, 'dist')) + base = "%s.%s.zip" % (dist.get_fullname(), cmd.plat_name) + + self.assertEqual(dist_created, [base]) + + # now let's check what we have in the zip file + fp = zipfile.ZipFile(os.path.join('dist', base)) + try: + contents = fp.namelist() + finally: + fp.close() + + contents = sorted(filter(None, map(os.path.basename, contents))) + wanted = ['foo-0.1-py%s.%s.egg-info' % sys.version_info[:2], 'foo.py'] + if not sys.dont_write_bytecode: + wanted.append('foo.%s.pyc' % sys.implementation.cache_tag) + self.assertEqual(contents, sorted(wanted)) + +def test_suite(): + return unittest.makeSuite(BuildDumbTestCase) + +if __name__ == '__main__': + run_unittest(test_suite()) diff --git a/llava/lib/python3.10/distutils/tests/test_build_clib.py b/llava/lib/python3.10/distutils/tests/test_build_clib.py new file mode 100644 index 0000000000000000000000000000000000000000..19e012a58ce8cb06e68de84324f35a1cd0075cf2 --- /dev/null +++ b/llava/lib/python3.10/distutils/tests/test_build_clib.py @@ -0,0 +1,144 @@ +"""Tests for distutils.command.build_clib.""" +import unittest +import os +import sys +import sysconfig + +from test.support import run_unittest, missing_compiler_executable + +from distutils.command.build_clib import build_clib +from distutils.errors import DistutilsSetupError +from distutils.tests import support + +class BuildCLibTestCase(support.TempdirManager, + support.LoggingSilencer, + unittest.TestCase): + + def setUp(self): + super().setUp() + self._backup_CONFIG_VARS = dict(sysconfig._CONFIG_VARS) + + def tearDown(self): + super().tearDown() + sysconfig._CONFIG_VARS.clear() + sysconfig._CONFIG_VARS.update(self._backup_CONFIG_VARS) + + def test_check_library_dist(self): + pkg_dir, dist = self.create_dist() + cmd = build_clib(dist) + + # 'libraries' option must be a list + self.assertRaises(DistutilsSetupError, cmd.check_library_list, 'foo') + + # each element of 'libraries' must a 2-tuple + self.assertRaises(DistutilsSetupError, cmd.check_library_list, + ['foo1', 'foo2']) + + # first element of each tuple in 'libraries' + # must be a string (the library name) + self.assertRaises(DistutilsSetupError, cmd.check_library_list, + [(1, 'foo1'), ('name', 'foo2')]) + + # library name may not contain directory separators + self.assertRaises(DistutilsSetupError, cmd.check_library_list, + [('name', 'foo1'), + ('another/name', 'foo2')]) + + # second element of each tuple must be a dictionary (build info) + self.assertRaises(DistutilsSetupError, cmd.check_library_list, + [('name', {}), + ('another', 'foo2')]) + + # those work + libs = [('name', {}), ('name', {'ok': 'good'})] + cmd.check_library_list(libs) + + def test_get_source_files(self): + pkg_dir, dist = self.create_dist() + cmd = build_clib(dist) + + # "in 'libraries' option 'sources' must be present and must be + # a list of source filenames + cmd.libraries = [('name', {})] + self.assertRaises(DistutilsSetupError, cmd.get_source_files) + + cmd.libraries = [('name', {'sources': 1})] + self.assertRaises(DistutilsSetupError, cmd.get_source_files) + + cmd.libraries = [('name', {'sources': ['a', 'b']})] + self.assertEqual(cmd.get_source_files(), ['a', 'b']) + + cmd.libraries = [('name', {'sources': ('a', 'b')})] + self.assertEqual(cmd.get_source_files(), ['a', 'b']) + + cmd.libraries = [('name', {'sources': ('a', 'b')}), + ('name2', {'sources': ['c', 'd']})] + self.assertEqual(cmd.get_source_files(), ['a', 'b', 'c', 'd']) + + def test_build_libraries(self): + + pkg_dir, dist = self.create_dist() + cmd = build_clib(dist) + class FakeCompiler: + def compile(*args, **kw): + pass + create_static_lib = compile + + cmd.compiler = FakeCompiler() + + # build_libraries is also doing a bit of typo checking + lib = [('name', {'sources': 'notvalid'})] + self.assertRaises(DistutilsSetupError, cmd.build_libraries, lib) + + lib = [('name', {'sources': list()})] + cmd.build_libraries(lib) + + lib = [('name', {'sources': tuple()})] + cmd.build_libraries(lib) + + def test_finalize_options(self): + pkg_dir, dist = self.create_dist() + cmd = build_clib(dist) + + cmd.include_dirs = 'one-dir' + cmd.finalize_options() + self.assertEqual(cmd.include_dirs, ['one-dir']) + + cmd.include_dirs = None + cmd.finalize_options() + self.assertEqual(cmd.include_dirs, []) + + cmd.distribution.libraries = 'WONTWORK' + self.assertRaises(DistutilsSetupError, cmd.finalize_options) + + @unittest.skipIf(sys.platform == 'win32', "can't test on Windows") + def test_run(self): + pkg_dir, dist = self.create_dist() + cmd = build_clib(dist) + + foo_c = os.path.join(pkg_dir, 'foo.c') + self.write_file(foo_c, 'int main(void) { return 1;}\n') + cmd.libraries = [('foo', {'sources': [foo_c]})] + + build_temp = os.path.join(pkg_dir, 'build') + os.mkdir(build_temp) + cmd.build_temp = build_temp + cmd.build_clib = build_temp + + # Before we run the command, we want to make sure + # all commands are present on the system. + ccmd = missing_compiler_executable() + if ccmd is not None: + self.skipTest('The %r command is not found' % ccmd) + + # this should work + cmd.run() + + # let's check the result + self.assertIn('libfoo.a', os.listdir(build_temp)) + +def test_suite(): + return unittest.makeSuite(BuildCLibTestCase) + +if __name__ == "__main__": + run_unittest(test_suite()) diff --git a/llava/lib/python3.10/distutils/tests/test_check.py b/llava/lib/python3.10/distutils/tests/test_check.py new file mode 100644 index 0000000000000000000000000000000000000000..e534aca1d47637ce8058740bfd4385719c505dab --- /dev/null +++ b/llava/lib/python3.10/distutils/tests/test_check.py @@ -0,0 +1,163 @@ +"""Tests for distutils.command.check.""" +import os +import textwrap +import unittest +from test.support import run_unittest + +from distutils.command.check import check, HAS_DOCUTILS +from distutils.tests import support +from distutils.errors import DistutilsSetupError + +try: + import pygments +except ImportError: + pygments = None + + +HERE = os.path.dirname(__file__) + + +class CheckTestCase(support.LoggingSilencer, + support.TempdirManager, + unittest.TestCase): + + def _run(self, metadata=None, cwd=None, **options): + if metadata is None: + metadata = {} + if cwd is not None: + old_dir = os.getcwd() + os.chdir(cwd) + pkg_info, dist = self.create_dist(**metadata) + cmd = check(dist) + cmd.initialize_options() + for name, value in options.items(): + setattr(cmd, name, value) + cmd.ensure_finalized() + cmd.run() + if cwd is not None: + os.chdir(old_dir) + return cmd + + def test_check_metadata(self): + # let's run the command with no metadata at all + # by default, check is checking the metadata + # should have some warnings + cmd = self._run() + self.assertEqual(cmd._warnings, 2) + + # now let's add the required fields + # and run it again, to make sure we don't get + # any warning anymore + metadata = {'url': 'xxx', 'author': 'xxx', + 'author_email': 'xxx', + 'name': 'xxx', 'version': 'xxx'} + cmd = self._run(metadata) + self.assertEqual(cmd._warnings, 0) + + # now with the strict mode, we should + # get an error if there are missing metadata + self.assertRaises(DistutilsSetupError, self._run, {}, **{'strict': 1}) + + # and of course, no error when all metadata are present + cmd = self._run(metadata, strict=1) + self.assertEqual(cmd._warnings, 0) + + # now a test with non-ASCII characters + metadata = {'url': 'xxx', 'author': '\u00c9ric', + 'author_email': 'xxx', 'name': 'xxx', + 'version': 'xxx', + 'description': 'Something about esszet \u00df', + 'long_description': 'More things about esszet \u00df'} + cmd = self._run(metadata) + self.assertEqual(cmd._warnings, 0) + + @unittest.skipUnless(HAS_DOCUTILS, "won't test without docutils") + def test_check_document(self): + pkg_info, dist = self.create_dist() + cmd = check(dist) + + # let's see if it detects broken rest + broken_rest = 'title\n===\n\ntest' + msgs = cmd._check_rst_data(broken_rest) + self.assertEqual(len(msgs), 1) + + # and non-broken rest + rest = 'title\n=====\n\ntest' + msgs = cmd._check_rst_data(rest) + self.assertEqual(len(msgs), 0) + + @unittest.skipUnless(HAS_DOCUTILS, "won't test without docutils") + def test_check_restructuredtext(self): + # let's see if it detects broken rest in long_description + broken_rest = 'title\n===\n\ntest' + pkg_info, dist = self.create_dist(long_description=broken_rest) + cmd = check(dist) + cmd.check_restructuredtext() + self.assertEqual(cmd._warnings, 1) + + # let's see if we have an error with strict=1 + metadata = {'url': 'xxx', 'author': 'xxx', + 'author_email': 'xxx', + 'name': 'xxx', 'version': 'xxx', + 'long_description': broken_rest} + self.assertRaises(DistutilsSetupError, self._run, metadata, + **{'strict': 1, 'restructuredtext': 1}) + + # and non-broken rest, including a non-ASCII character to test #12114 + metadata['long_description'] = 'title\n=====\n\ntest \u00df' + cmd = self._run(metadata, strict=1, restructuredtext=1) + self.assertEqual(cmd._warnings, 0) + + # check that includes work to test #31292 + metadata['long_description'] = 'title\n=====\n\n.. include:: includetest.rst' + cmd = self._run(metadata, cwd=HERE, strict=1, restructuredtext=1) + self.assertEqual(cmd._warnings, 0) + + @unittest.skipUnless(HAS_DOCUTILS, "won't test without docutils") + def test_check_restructuredtext_with_syntax_highlight(self): + # Don't fail if there is a `code` or `code-block` directive + + example_rst_docs = [] + example_rst_docs.append(textwrap.dedent("""\ + Here's some code: + + .. code:: python + + def foo(): + pass + """)) + example_rst_docs.append(textwrap.dedent("""\ + Here's some code: + + .. code-block:: python + + def foo(): + pass + """)) + + for rest_with_code in example_rst_docs: + pkg_info, dist = self.create_dist(long_description=rest_with_code) + cmd = check(dist) + cmd.check_restructuredtext() + msgs = cmd._check_rst_data(rest_with_code) + if pygments is not None: + self.assertEqual(len(msgs), 0) + else: + self.assertEqual(len(msgs), 1) + self.assertEqual( + str(msgs[0][1]), + 'Cannot analyze code. Pygments package not found.' + ) + + def test_check_all(self): + + metadata = {'url': 'xxx', 'author': 'xxx'} + self.assertRaises(DistutilsSetupError, self._run, + {}, **{'strict': 1, + 'restructuredtext': 1}) + +def test_suite(): + return unittest.makeSuite(CheckTestCase) + +if __name__ == "__main__": + run_unittest(test_suite()) diff --git a/llava/lib/python3.10/distutils/tests/test_clean.py b/llava/lib/python3.10/distutils/tests/test_clean.py new file mode 100644 index 0000000000000000000000000000000000000000..c605afd86012b693bc5e14c9d5005fda2694d52e --- /dev/null +++ b/llava/lib/python3.10/distutils/tests/test_clean.py @@ -0,0 +1,49 @@ +"""Tests for distutils.command.clean.""" +import os +import unittest + +from distutils.command.clean import clean +from distutils.tests import support +from test.support import run_unittest + +class cleanTestCase(support.TempdirManager, + support.LoggingSilencer, + unittest.TestCase): + + def test_simple_run(self): + pkg_dir, dist = self.create_dist() + cmd = clean(dist) + + # let's add some elements clean should remove + dirs = [(d, os.path.join(pkg_dir, d)) + for d in ('build_temp', 'build_lib', 'bdist_base', + 'build_scripts', 'build_base')] + + for name, path in dirs: + os.mkdir(path) + setattr(cmd, name, path) + if name == 'build_base': + continue + for f in ('one', 'two', 'three'): + self.write_file(os.path.join(path, f)) + + # let's run the command + cmd.all = 1 + cmd.ensure_finalized() + cmd.run() + + # make sure the files where removed + for name, path in dirs: + self.assertFalse(os.path.exists(path), + '%s was not removed' % path) + + # let's run the command again (should spit warnings but succeed) + cmd.all = 1 + cmd.ensure_finalized() + cmd.run() + +def test_suite(): + return unittest.makeSuite(cleanTestCase) + +if __name__ == "__main__": + run_unittest(test_suite()) diff --git a/llava/lib/python3.10/distutils/tests/test_config.py b/llava/lib/python3.10/distutils/tests/test_config.py new file mode 100644 index 0000000000000000000000000000000000000000..344084afb77912dec8cc5a2076bae2eceeab96d4 --- /dev/null +++ b/llava/lib/python3.10/distutils/tests/test_config.py @@ -0,0 +1,141 @@ +"""Tests for distutils.pypirc.pypirc.""" +import os +import unittest + +from distutils.core import PyPIRCCommand +from distutils.core import Distribution +from distutils.log import set_threshold +from distutils.log import WARN + +from distutils.tests import support +from test.support import run_unittest + +PYPIRC = """\ +[distutils] + +index-servers = + server1 + server2 + server3 + +[server1] +username:me +password:secret + +[server2] +username:meagain +password: secret +realm:acme +repository:http://another.pypi/ + +[server3] +username:cbiggles +password:yh^%#rest-of-my-password +""" + +PYPIRC_OLD = """\ +[server-login] +username:tarek +password:secret +""" + +WANTED = """\ +[distutils] +index-servers = + pypi + +[pypi] +username:tarek +password:xxx +""" + + +class BasePyPIRCCommandTestCase(support.TempdirManager, + support.LoggingSilencer, + support.EnvironGuard, + unittest.TestCase): + + def setUp(self): + """Patches the environment.""" + super(BasePyPIRCCommandTestCase, self).setUp() + self.tmp_dir = self.mkdtemp() + os.environ['HOME'] = self.tmp_dir + os.environ['USERPROFILE'] = self.tmp_dir + self.rc = os.path.join(self.tmp_dir, '.pypirc') + self.dist = Distribution() + + class command(PyPIRCCommand): + def __init__(self, dist): + PyPIRCCommand.__init__(self, dist) + def initialize_options(self): + pass + finalize_options = initialize_options + + self._cmd = command + self.old_threshold = set_threshold(WARN) + + def tearDown(self): + """Removes the patch.""" + set_threshold(self.old_threshold) + super(BasePyPIRCCommandTestCase, self).tearDown() + + +class PyPIRCCommandTestCase(BasePyPIRCCommandTestCase): + + def test_server_registration(self): + # This test makes sure PyPIRCCommand knows how to: + # 1. handle several sections in .pypirc + # 2. handle the old format + + # new format + self.write_file(self.rc, PYPIRC) + cmd = self._cmd(self.dist) + config = cmd._read_pypirc() + + config = list(sorted(config.items())) + waited = [('password', 'secret'), ('realm', 'pypi'), + ('repository', 'https://upload.pypi.org/legacy/'), + ('server', 'server1'), ('username', 'me')] + self.assertEqual(config, waited) + + # old format + self.write_file(self.rc, PYPIRC_OLD) + config = cmd._read_pypirc() + config = list(sorted(config.items())) + waited = [('password', 'secret'), ('realm', 'pypi'), + ('repository', 'https://upload.pypi.org/legacy/'), + ('server', 'server-login'), ('username', 'tarek')] + self.assertEqual(config, waited) + + def test_server_empty_registration(self): + cmd = self._cmd(self.dist) + rc = cmd._get_rc_file() + self.assertFalse(os.path.exists(rc)) + cmd._store_pypirc('tarek', 'xxx') + self.assertTrue(os.path.exists(rc)) + f = open(rc) + try: + content = f.read() + self.assertEqual(content, WANTED) + finally: + f.close() + + def test_config_interpolation(self): + # using the % character in .pypirc should not raise an error (#20120) + self.write_file(self.rc, PYPIRC) + cmd = self._cmd(self.dist) + cmd.repository = 'server3' + config = cmd._read_pypirc() + + config = list(sorted(config.items())) + waited = [('password', 'yh^%#rest-of-my-password'), ('realm', 'pypi'), + ('repository', 'https://upload.pypi.org/legacy/'), + ('server', 'server3'), ('username', 'cbiggles')] + self.assertEqual(config, waited) + + +def test_suite(): + return unittest.makeSuite(PyPIRCCommandTestCase) + +if __name__ == "__main__": + run_unittest(test_suite()) diff --git a/llava/lib/python3.10/distutils/tests/test_config_cmd.py b/llava/lib/python3.10/distutils/tests/test_config_cmd.py new file mode 100644 index 0000000000000000000000000000000000000000..0127ba71fc4bc4c6d019fca645ae95e1b6bcbec5 --- /dev/null +++ b/llava/lib/python3.10/distutils/tests/test_config_cmd.py @@ -0,0 +1,100 @@ +"""Tests for distutils.command.config.""" +import unittest +import os +import sys +import sysconfig +from test.support import run_unittest, missing_compiler_executable + +from distutils.command.config import dump_file, config +from distutils.tests import support +from distutils import log + +class ConfigTestCase(support.LoggingSilencer, + support.TempdirManager, + unittest.TestCase): + + def _info(self, msg, *args): + for line in msg.splitlines(): + self._logs.append(line) + + def setUp(self): + super(ConfigTestCase, self).setUp() + self._logs = [] + self.old_log = log.info + log.info = self._info + self.old_config_vars = dict(sysconfig._CONFIG_VARS) + + def tearDown(self): + log.info = self.old_log + sysconfig._CONFIG_VARS.clear() + sysconfig._CONFIG_VARS.update(self.old_config_vars) + super(ConfigTestCase, self).tearDown() + + def test_dump_file(self): + this_file = os.path.splitext(__file__)[0] + '.py' + f = open(this_file) + try: + numlines = len(f.readlines()) + finally: + f.close() + + dump_file(this_file, 'I am the header') + self.assertEqual(len(self._logs), numlines+1) + + @unittest.skipIf(sys.platform == 'win32', "can't test on Windows") + def test_search_cpp(self): + cmd = missing_compiler_executable(['preprocessor']) + if cmd is not None: + self.skipTest('The %r command is not found' % cmd) + pkg_dir, dist = self.create_dist() + cmd = config(dist) + cmd._check_compiler() + compiler = cmd.compiler + if sys.platform[:3] == "aix" and "xlc" in compiler.preprocessor[0].lower(): + self.skipTest('xlc: The -E option overrides the -P, -o, and -qsyntaxonly options') + + # simple pattern searches + match = cmd.search_cpp(pattern='xxx', body='/* xxx */') + self.assertEqual(match, 0) + + match = cmd.search_cpp(pattern='_configtest', body='/* xxx */') + self.assertEqual(match, 1) + + def test_finalize_options(self): + # finalize_options does a bit of transformation + # on options + pkg_dir, dist = self.create_dist() + cmd = config(dist) + cmd.include_dirs = 'one%stwo' % os.pathsep + cmd.libraries = 'one' + cmd.library_dirs = 'three%sfour' % os.pathsep + cmd.ensure_finalized() + + self.assertEqual(cmd.include_dirs, ['one', 'two']) + self.assertEqual(cmd.libraries, ['one']) + self.assertEqual(cmd.library_dirs, ['three', 'four']) + + def test_clean(self): + # _clean removes files + tmp_dir = self.mkdtemp() + f1 = os.path.join(tmp_dir, 'one') + f2 = os.path.join(tmp_dir, 'two') + + self.write_file(f1, 'xxx') + self.write_file(f2, 'xxx') + + for f in (f1, f2): + self.assertTrue(os.path.exists(f)) + + pkg_dir, dist = self.create_dist() + cmd = config(dist) + cmd._clean(f1, f2) + + for f in (f1, f2): + self.assertFalse(os.path.exists(f)) + +def test_suite(): + return unittest.makeSuite(ConfigTestCase) + +if __name__ == "__main__": + run_unittest(test_suite()) diff --git a/llava/lib/python3.10/distutils/tests/test_dir_util.py b/llava/lib/python3.10/distutils/tests/test_dir_util.py new file mode 100644 index 0000000000000000000000000000000000000000..d436cf8319171554ba17b9590e4db61d6bed53e5 --- /dev/null +++ b/llava/lib/python3.10/distutils/tests/test_dir_util.py @@ -0,0 +1,139 @@ +"""Tests for distutils.dir_util.""" +import unittest +import os +import stat +import sys +from unittest.mock import patch + +from distutils import dir_util, errors +from distutils.dir_util import (mkpath, remove_tree, create_tree, copy_tree, + ensure_relative) + +from distutils import log +from distutils.tests import support +from test.support import run_unittest + + +class DirUtilTestCase(support.TempdirManager, unittest.TestCase): + + def _log(self, msg, *args): + if len(args) > 0: + self._logs.append(msg % args) + else: + self._logs.append(msg) + + def setUp(self): + super(DirUtilTestCase, self).setUp() + self._logs = [] + tmp_dir = self.mkdtemp() + self.root_target = os.path.join(tmp_dir, 'deep') + self.target = os.path.join(self.root_target, 'here') + self.target2 = os.path.join(tmp_dir, 'deep2') + self.old_log = log.info + log.info = self._log + + def tearDown(self): + log.info = self.old_log + super(DirUtilTestCase, self).tearDown() + + def test_mkpath_remove_tree_verbosity(self): + + mkpath(self.target, verbose=0) + wanted = [] + self.assertEqual(self._logs, wanted) + remove_tree(self.root_target, verbose=0) + + mkpath(self.target, verbose=1) + wanted = ['creating %s' % self.root_target, + 'creating %s' % self.target] + self.assertEqual(self._logs, wanted) + self._logs = [] + + remove_tree(self.root_target, verbose=1) + wanted = ["removing '%s' (and everything under it)" % self.root_target] + self.assertEqual(self._logs, wanted) + + @unittest.skipIf(sys.platform.startswith('win'), + "This test is only appropriate for POSIX-like systems.") + def test_mkpath_with_custom_mode(self): + # Get and set the current umask value for testing mode bits. + umask = os.umask(0o002) + os.umask(umask) + mkpath(self.target, 0o700) + self.assertEqual( + stat.S_IMODE(os.stat(self.target).st_mode), 0o700 & ~umask) + mkpath(self.target2, 0o555) + self.assertEqual( + stat.S_IMODE(os.stat(self.target2).st_mode), 0o555 & ~umask) + + def test_create_tree_verbosity(self): + + create_tree(self.root_target, ['one', 'two', 'three'], verbose=0) + self.assertEqual(self._logs, []) + remove_tree(self.root_target, verbose=0) + + wanted = ['creating %s' % self.root_target] + create_tree(self.root_target, ['one', 'two', 'three'], verbose=1) + self.assertEqual(self._logs, wanted) + + remove_tree(self.root_target, verbose=0) + + def test_copy_tree_verbosity(self): + + mkpath(self.target, verbose=0) + + copy_tree(self.target, self.target2, verbose=0) + self.assertEqual(self._logs, []) + + remove_tree(self.root_target, verbose=0) + + mkpath(self.target, verbose=0) + a_file = os.path.join(self.target, 'ok.txt') + with open(a_file, 'w') as f: + f.write('some content') + + wanted = ['copying %s -> %s' % (a_file, self.target2)] + copy_tree(self.target, self.target2, verbose=1) + self.assertEqual(self._logs, wanted) + + remove_tree(self.root_target, verbose=0) + remove_tree(self.target2, verbose=0) + + def test_copy_tree_skips_nfs_temp_files(self): + mkpath(self.target, verbose=0) + + a_file = os.path.join(self.target, 'ok.txt') + nfs_file = os.path.join(self.target, '.nfs123abc') + for f in a_file, nfs_file: + with open(f, 'w') as fh: + fh.write('some content') + + copy_tree(self.target, self.target2) + self.assertEqual(os.listdir(self.target2), ['ok.txt']) + + remove_tree(self.root_target, verbose=0) + remove_tree(self.target2, verbose=0) + + def test_ensure_relative(self): + if os.sep == '/': + self.assertEqual(ensure_relative('/home/foo'), 'home/foo') + self.assertEqual(ensure_relative('some/path'), 'some/path') + else: # \\ + self.assertEqual(ensure_relative('c:\\home\\foo'), 'c:home\\foo') + self.assertEqual(ensure_relative('home\\foo'), 'home\\foo') + + def test_copy_tree_exception_in_listdir(self): + """ + An exception in listdir should raise a DistutilsFileError + """ + with patch("os.listdir", side_effect=OSError()), \ + self.assertRaises(errors.DistutilsFileError): + src = self.tempdirs[-1] + dir_util.copy_tree(src, None) + + +def test_suite(): + return unittest.makeSuite(DirUtilTestCase) + +if __name__ == "__main__": + run_unittest(test_suite()) diff --git a/llava/lib/python3.10/distutils/tests/test_install_scripts.py b/llava/lib/python3.10/distutils/tests/test_install_scripts.py new file mode 100644 index 0000000000000000000000000000000000000000..1f7b1038cb2719a441699e092dac35ec77135226 --- /dev/null +++ b/llava/lib/python3.10/distutils/tests/test_install_scripts.py @@ -0,0 +1,82 @@ +"""Tests for distutils.command.install_scripts.""" + +import os +import unittest + +from distutils.command.install_scripts import install_scripts +from distutils.core import Distribution + +from distutils.tests import support +from test.support import run_unittest + + +class InstallScriptsTestCase(support.TempdirManager, + support.LoggingSilencer, + unittest.TestCase): + + def test_default_settings(self): + dist = Distribution() + dist.command_obj["build"] = support.DummyCommand( + build_scripts="/foo/bar") + dist.command_obj["install"] = support.DummyCommand( + install_scripts="/splat/funk", + force=1, + skip_build=1, + ) + cmd = install_scripts(dist) + self.assertFalse(cmd.force) + self.assertFalse(cmd.skip_build) + self.assertIsNone(cmd.build_dir) + self.assertIsNone(cmd.install_dir) + + cmd.finalize_options() + + self.assertTrue(cmd.force) + self.assertTrue(cmd.skip_build) + self.assertEqual(cmd.build_dir, "/foo/bar") + self.assertEqual(cmd.install_dir, "/splat/funk") + + def test_installation(self): + source = self.mkdtemp() + expected = [] + + def write_script(name, text): + expected.append(name) + f = open(os.path.join(source, name), "w") + try: + f.write(text) + finally: + f.close() + + write_script("script1.py", ("#! /usr/bin/env python2.3\n" + "# bogus script w/ Python sh-bang\n" + "pass\n")) + write_script("script2.py", ("#!/usr/bin/python\n" + "# bogus script w/ Python sh-bang\n" + "pass\n")) + write_script("shell.sh", ("#!/bin/sh\n" + "# bogus shell script w/ sh-bang\n" + "exit 0\n")) + + target = self.mkdtemp() + dist = Distribution() + dist.command_obj["build"] = support.DummyCommand(build_scripts=source) + dist.command_obj["install"] = support.DummyCommand( + install_scripts=target, + force=1, + skip_build=1, + ) + cmd = install_scripts(dist) + cmd.finalize_options() + cmd.run() + + installed = os.listdir(target) + for name in expected: + self.assertIn(name, installed) + + +def test_suite(): + return unittest.makeSuite(InstallScriptsTestCase) + +if __name__ == "__main__": + run_unittest(test_suite()) diff --git a/llava/lib/python3.10/distutils/tests/test_log.py b/llava/lib/python3.10/distutils/tests/test_log.py new file mode 100644 index 0000000000000000000000000000000000000000..75cf900617be6c52ef52361996a35e29b2ae6137 --- /dev/null +++ b/llava/lib/python3.10/distutils/tests/test_log.py @@ -0,0 +1,46 @@ +"""Tests for distutils.log""" + +import io +import sys +import unittest +from test.support import swap_attr, run_unittest + +from distutils import log + +class TestLog(unittest.TestCase): + def test_non_ascii(self): + # Issues #8663, #34421: test that non-encodable text is escaped with + # backslashreplace error handler and encodable non-ASCII text is + # output as is. + for errors in ('strict', 'backslashreplace', 'surrogateescape', + 'replace', 'ignore'): + with self.subTest(errors=errors): + stdout = io.TextIOWrapper(io.BytesIO(), + encoding='cp437', errors=errors) + stderr = io.TextIOWrapper(io.BytesIO(), + encoding='cp437', errors=errors) + old_threshold = log.set_threshold(log.DEBUG) + try: + with swap_attr(sys, 'stdout', stdout), \ + swap_attr(sys, 'stderr', stderr): + log.debug('Dεbug\tMėssãge') + log.fatal('Fαtal\tÈrrōr') + finally: + log.set_threshold(old_threshold) + + stdout.seek(0) + self.assertEqual(stdout.read().rstrip(), + 'Dεbug\tM?ss?ge' if errors == 'replace' else + 'Dεbug\tMssge' if errors == 'ignore' else + 'Dεbug\tM\\u0117ss\\xe3ge') + stderr.seek(0) + self.assertEqual(stderr.read().rstrip(), + 'Fαtal\t?rr?r' if errors == 'replace' else + 'Fαtal\trrr' if errors == 'ignore' else + 'Fαtal\t\\xc8rr\\u014dr') + +def test_suite(): + return unittest.makeSuite(TestLog) + +if __name__ == "__main__": + run_unittest(test_suite()) diff --git a/llava/lib/python3.10/distutils/tests/test_msvc9compiler.py b/llava/lib/python3.10/distutils/tests/test_msvc9compiler.py new file mode 100644 index 0000000000000000000000000000000000000000..77a07ef39dd1a6fe26ada95099d824c89f1ac54c --- /dev/null +++ b/llava/lib/python3.10/distutils/tests/test_msvc9compiler.py @@ -0,0 +1,184 @@ +"""Tests for distutils.msvc9compiler.""" +import sys +import unittest +import os + +from distutils.errors import DistutilsPlatformError +from distutils.tests import support +from test.support import run_unittest + +# A manifest with the only assembly reference being the msvcrt assembly, so +# should have the assembly completely stripped. Note that although the +# assembly has a reference the assembly is removed - that is +# currently a "feature", not a bug :) +_MANIFEST_WITH_ONLY_MSVC_REFERENCE = """\ + + + + + + + + + + + + + + + + + +""" + +# A manifest with references to assemblies other than msvcrt. When processed, +# this assembly should be returned with just the msvcrt part removed. +_MANIFEST_WITH_MULTIPLE_REFERENCES = """\ + + + + + + + + + + + + + + + + + + + + + + +""" + +_CLEANED_MANIFEST = """\ + + + + + + + + + + + + + + + + + + +""" + +if sys.platform=="win32": + from distutils.msvccompiler import get_build_version + if get_build_version()>=8.0: + SKIP_MESSAGE = None + else: + SKIP_MESSAGE = "These tests are only for MSVC8.0 or above" +else: + SKIP_MESSAGE = "These tests are only for win32" + +@unittest.skipUnless(SKIP_MESSAGE is None, SKIP_MESSAGE) +class msvc9compilerTestCase(support.TempdirManager, + unittest.TestCase): + + def test_no_compiler(self): + # makes sure query_vcvarsall raises + # a DistutilsPlatformError if the compiler + # is not found + from distutils.msvc9compiler import query_vcvarsall + def _find_vcvarsall(version): + return None + + from distutils import msvc9compiler + old_find_vcvarsall = msvc9compiler.find_vcvarsall + msvc9compiler.find_vcvarsall = _find_vcvarsall + try: + self.assertRaises(DistutilsPlatformError, query_vcvarsall, + 'wont find this version') + finally: + msvc9compiler.find_vcvarsall = old_find_vcvarsall + + def test_reg_class(self): + from distutils.msvc9compiler import Reg + self.assertRaises(KeyError, Reg.get_value, 'xxx', 'xxx') + + # looking for values that should exist on all + # windows registry versions. + path = r'Control Panel\Desktop' + v = Reg.get_value(path, 'dragfullwindows') + self.assertIn(v, ('0', '1', '2')) + + import winreg + HKCU = winreg.HKEY_CURRENT_USER + keys = Reg.read_keys(HKCU, 'xxxx') + self.assertEqual(keys, None) + + keys = Reg.read_keys(HKCU, r'Control Panel') + self.assertIn('Desktop', keys) + + def test_remove_visual_c_ref(self): + from distutils.msvc9compiler import MSVCCompiler + tempdir = self.mkdtemp() + manifest = os.path.join(tempdir, 'manifest') + f = open(manifest, 'w') + try: + f.write(_MANIFEST_WITH_MULTIPLE_REFERENCES) + finally: + f.close() + + compiler = MSVCCompiler() + compiler._remove_visual_c_ref(manifest) + + # see what we got + f = open(manifest) + try: + # removing trailing spaces + content = '\n'.join([line.rstrip() for line in f.readlines()]) + finally: + f.close() + + # makes sure the manifest was properly cleaned + self.assertEqual(content, _CLEANED_MANIFEST) + + def test_remove_entire_manifest(self): + from distutils.msvc9compiler import MSVCCompiler + tempdir = self.mkdtemp() + manifest = os.path.join(tempdir, 'manifest') + f = open(manifest, 'w') + try: + f.write(_MANIFEST_WITH_ONLY_MSVC_REFERENCE) + finally: + f.close() + + compiler = MSVCCompiler() + got = compiler._remove_visual_c_ref(manifest) + self.assertIsNone(got) + + +def test_suite(): + return unittest.makeSuite(msvc9compilerTestCase) + +if __name__ == "__main__": + run_unittest(test_suite()) diff --git a/llava/lib/python3.10/distutils/tests/test_spawn.py b/llava/lib/python3.10/distutils/tests/test_spawn.py new file mode 100644 index 0000000000000000000000000000000000000000..4ec767b120e7189d234ce3264975005fe90fc396 --- /dev/null +++ b/llava/lib/python3.10/distutils/tests/test_spawn.py @@ -0,0 +1,137 @@ +"""Tests for distutils.spawn.""" +import os +import stat +import sys +import unittest.mock +from test.support import run_unittest, unix_shell +from test.support import os_helper + +from distutils.spawn import find_executable +from distutils.spawn import spawn +from distutils.errors import DistutilsExecError +from distutils.tests import support + +class SpawnTestCase(support.TempdirManager, + support.LoggingSilencer, + unittest.TestCase): + + @unittest.skipUnless(os.name in ('nt', 'posix'), + 'Runs only under posix or nt') + def test_spawn(self): + tmpdir = self.mkdtemp() + + # creating something executable + # through the shell that returns 1 + if sys.platform != 'win32': + exe = os.path.join(tmpdir, 'foo.sh') + self.write_file(exe, '#!%s\nexit 1' % unix_shell) + else: + exe = os.path.join(tmpdir, 'foo.bat') + self.write_file(exe, 'exit 1') + + os.chmod(exe, 0o777) + self.assertRaises(DistutilsExecError, spawn, [exe]) + + # now something that works + if sys.platform != 'win32': + exe = os.path.join(tmpdir, 'foo.sh') + self.write_file(exe, '#!%s\nexit 0' % unix_shell) + else: + exe = os.path.join(tmpdir, 'foo.bat') + self.write_file(exe, 'exit 0') + + os.chmod(exe, 0o777) + spawn([exe]) # should work without any error + + def test_find_executable(self): + with os_helper.temp_dir() as tmp_dir: + # use TESTFN to get a pseudo-unique filename + program_noeext = os_helper.TESTFN + # Give the temporary program an ".exe" suffix for all. + # It's needed on Windows and not harmful on other platforms. + program = program_noeext + ".exe" + + filename = os.path.join(tmp_dir, program) + with open(filename, "wb"): + pass + os.chmod(filename, stat.S_IXUSR) + + # test path parameter + rv = find_executable(program, path=tmp_dir) + self.assertEqual(rv, filename) + + if sys.platform == 'win32': + # test without ".exe" extension + rv = find_executable(program_noeext, path=tmp_dir) + self.assertEqual(rv, filename) + + # test find in the current directory + with os_helper.change_cwd(tmp_dir): + rv = find_executable(program) + self.assertEqual(rv, program) + + # test non-existent program + dont_exist_program = "dontexist_" + program + rv = find_executable(dont_exist_program , path=tmp_dir) + self.assertIsNone(rv) + + # PATH='': no match, except in the current directory + with os_helper.EnvironmentVarGuard() as env: + env['PATH'] = '' + with unittest.mock.patch('distutils.spawn.os.confstr', + return_value=tmp_dir, create=True), \ + unittest.mock.patch('distutils.spawn.os.defpath', + tmp_dir): + rv = find_executable(program) + self.assertIsNone(rv) + + # look in current directory + with os_helper.change_cwd(tmp_dir): + rv = find_executable(program) + self.assertEqual(rv, program) + + # PATH=':': explicitly looks in the current directory + with os_helper.EnvironmentVarGuard() as env: + env['PATH'] = os.pathsep + with unittest.mock.patch('distutils.spawn.os.confstr', + return_value='', create=True), \ + unittest.mock.patch('distutils.spawn.os.defpath', ''): + rv = find_executable(program) + self.assertIsNone(rv) + + # look in current directory + with os_helper.change_cwd(tmp_dir): + rv = find_executable(program) + self.assertEqual(rv, program) + + # missing PATH: test os.confstr("CS_PATH") and os.defpath + with os_helper.EnvironmentVarGuard() as env: + env.pop('PATH', None) + + # without confstr + with unittest.mock.patch('distutils.spawn.os.confstr', + side_effect=ValueError, + create=True), \ + unittest.mock.patch('distutils.spawn.os.defpath', + tmp_dir): + rv = find_executable(program) + self.assertEqual(rv, filename) + + # with confstr + with unittest.mock.patch('distutils.spawn.os.confstr', + return_value=tmp_dir, create=True), \ + unittest.mock.patch('distutils.spawn.os.defpath', ''): + rv = find_executable(program) + self.assertEqual(rv, filename) + + def test_spawn_missing_exe(self): + with self.assertRaises(DistutilsExecError) as ctx: + spawn(['does-not-exist']) + self.assertIn("command 'does-not-exist' failed", str(ctx.exception)) + + +def test_suite(): + return unittest.makeSuite(SpawnTestCase) + +if __name__ == "__main__": + run_unittest(test_suite()) diff --git a/llava/lib/python3.10/distutils/tests/test_versionpredicate.py b/llava/lib/python3.10/distutils/tests/test_versionpredicate.py new file mode 100644 index 0000000000000000000000000000000000000000..28ae09dc2058dab6258c41b3f65a0034adf0c4ba --- /dev/null +++ b/llava/lib/python3.10/distutils/tests/test_versionpredicate.py @@ -0,0 +1,13 @@ +"""Tests harness for distutils.versionpredicate. + +""" + +import distutils.versionpredicate +import doctest +from test.support import run_unittest + +def test_suite(): + return doctest.DocTestSuite(distutils.versionpredicate) + +if __name__ == '__main__': + run_unittest(test_suite())