-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Statically alias distutils-stubs to setuptools._distutils
- Loading branch information
Showing
53 changed files
with
137 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
import os | ||
import shutil | ||
from pathlib import Path | ||
|
||
_vendored_distutils_path = Path(__file__).parent.parent / "setuptools" / "_distutils" | ||
_distutils_stubs_path = Path(__file__).parent.parent / "typings" / "distutils-stubs" | ||
|
||
DONT_TOUCH_COMMENT = "# DO NOT MODIFY ! This file was automatically generated by tools/update_distutils_stubs.py\n" | ||
|
||
|
||
def main(): | ||
if _distutils_stubs_path.exists(): | ||
shutil.rmtree(_distutils_stubs_path) | ||
_distutils_stubs_path.mkdir(parents=True) | ||
(_distutils_stubs_path / "ruff.toml").write_text( | ||
f'{DONT_TOUCH_COMMENT}[lint]\nignore = ["F403"]' | ||
) | ||
for path in _vendored_distutils_path.rglob("*.py"): | ||
relative_path = path.relative_to(_vendored_distutils_path) | ||
if relative_path.parts[0] == "tests": | ||
continue | ||
stub_path = (_distutils_stubs_path / relative_path).with_suffix(".pyi") | ||
stub_path.parent.mkdir(exist_ok=True) | ||
module = ( | ||
"setuptools._distutils." | ||
+ str(relative_path.with_suffix("")).replace(os.sep, ".") | ||
).removesuffix(".__init__") | ||
stub_path.write_text(f"{DONT_TOUCH_COMMENT}from {module} import *\n") | ||
|
||
|
||
if __name__ == "__main__": | ||
main() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
# DO NOT MODIFY ! This file was automatically generated by tools/update_distutils_stubs.py | ||
from setuptools._distutils import * |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
# DO NOT MODIFY ! This file was automatically generated by tools/update_distutils_stubs.py | ||
from setuptools._distutils._log import * |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
# DO NOT MODIFY ! This file was automatically generated by tools/update_distutils_stubs.py | ||
from setuptools._distutils._macos_compat import * |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
# DO NOT MODIFY ! This file was automatically generated by tools/update_distutils_stubs.py | ||
from setuptools._distutils._modified import * |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
# DO NOT MODIFY ! This file was automatically generated by tools/update_distutils_stubs.py | ||
from setuptools._distutils._msvccompiler import * |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
# DO NOT MODIFY ! This file was automatically generated by tools/update_distutils_stubs.py | ||
from setuptools._distutils.archive_util import * |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
# DO NOT MODIFY ! This file was automatically generated by tools/update_distutils_stubs.py | ||
from setuptools._distutils.ccompiler import * |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
# DO NOT MODIFY ! This file was automatically generated by tools/update_distutils_stubs.py | ||
from setuptools._distutils.cmd import * |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
# DO NOT MODIFY ! This file was automatically generated by tools/update_distutils_stubs.py | ||
from setuptools._distutils.command import * |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
# DO NOT MODIFY ! This file was automatically generated by tools/update_distutils_stubs.py | ||
from setuptools._distutils.command._framework_compat import * |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
# DO NOT MODIFY ! This file was automatically generated by tools/update_distutils_stubs.py | ||
from setuptools._distutils.command.bdist import * |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
# DO NOT MODIFY ! This file was automatically generated by tools/update_distutils_stubs.py | ||
from setuptools._distutils.command.bdist_dumb import * |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
# DO NOT MODIFY ! This file was automatically generated by tools/update_distutils_stubs.py | ||
from setuptools._distutils.command.bdist_rpm import * |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
# DO NOT MODIFY ! This file was automatically generated by tools/update_distutils_stubs.py | ||
from setuptools._distutils.command.build import * |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
# DO NOT MODIFY ! This file was automatically generated by tools/update_distutils_stubs.py | ||
from setuptools._distutils.command.build_clib import * |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
# DO NOT MODIFY ! This file was automatically generated by tools/update_distutils_stubs.py | ||
from setuptools._distutils.command.build_ext import * |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
# DO NOT MODIFY ! This file was automatically generated by tools/update_distutils_stubs.py | ||
from setuptools._distutils.command.build_py import * |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
# DO NOT MODIFY ! This file was automatically generated by tools/update_distutils_stubs.py | ||
from setuptools._distutils.command.build_scripts import * |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
# DO NOT MODIFY ! This file was automatically generated by tools/update_distutils_stubs.py | ||
from setuptools._distutils.command.check import * |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
# DO NOT MODIFY ! This file was automatically generated by tools/update_distutils_stubs.py | ||
from setuptools._distutils.command.clean import * |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
# DO NOT MODIFY ! This file was automatically generated by tools/update_distutils_stubs.py | ||
from setuptools._distutils.command.config import * |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
# DO NOT MODIFY ! This file was automatically generated by tools/update_distutils_stubs.py | ||
from setuptools._distutils.command.install import * |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
# DO NOT MODIFY ! This file was automatically generated by tools/update_distutils_stubs.py | ||
from setuptools._distutils.command.install_data import * |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
# DO NOT MODIFY ! This file was automatically generated by tools/update_distutils_stubs.py | ||
from setuptools._distutils.command.install_egg_info import * |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
# DO NOT MODIFY ! This file was automatically generated by tools/update_distutils_stubs.py | ||
from setuptools._distutils.command.install_headers import * |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
# DO NOT MODIFY ! This file was automatically generated by tools/update_distutils_stubs.py | ||
from setuptools._distutils.command.install_lib import * |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
# DO NOT MODIFY ! This file was automatically generated by tools/update_distutils_stubs.py | ||
from setuptools._distutils.command.install_scripts import * |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
# DO NOT MODIFY ! This file was automatically generated by tools/update_distutils_stubs.py | ||
from setuptools._distutils.command.sdist import * |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
# DO NOT MODIFY ! This file was automatically generated by tools/update_distutils_stubs.py | ||
from setuptools._distutils.compat import * |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
# DO NOT MODIFY ! This file was automatically generated by tools/update_distutils_stubs.py | ||
from setuptools._distutils.compat.py38 import * |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
# DO NOT MODIFY ! This file was automatically generated by tools/update_distutils_stubs.py | ||
from setuptools._distutils.compat.py39 import * |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
# DO NOT MODIFY ! This file was automatically generated by tools/update_distutils_stubs.py | ||
from setuptools._distutils.core import * |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
# DO NOT MODIFY ! This file was automatically generated by tools/update_distutils_stubs.py | ||
from setuptools._distutils.cygwinccompiler import * |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
# DO NOT MODIFY ! This file was automatically generated by tools/update_distutils_stubs.py | ||
from setuptools._distutils.debug import * |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
# DO NOT MODIFY ! This file was automatically generated by tools/update_distutils_stubs.py | ||
from setuptools._distutils.dep_util import * |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
# DO NOT MODIFY ! This file was automatically generated by tools/update_distutils_stubs.py | ||
from setuptools._distutils.dir_util import * |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
# DO NOT MODIFY ! This file was automatically generated by tools/update_distutils_stubs.py | ||
from setuptools._distutils.dist import * |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
# DO NOT MODIFY ! This file was automatically generated by tools/update_distutils_stubs.py | ||
from setuptools._distutils.errors import * |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
# DO NOT MODIFY ! This file was automatically generated by tools/update_distutils_stubs.py | ||
from setuptools._distutils.extension import * |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
# DO NOT MODIFY ! This file was automatically generated by tools/update_distutils_stubs.py | ||
from setuptools._distutils.fancy_getopt import * |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
# DO NOT MODIFY ! This file was automatically generated by tools/update_distutils_stubs.py | ||
from setuptools._distutils.file_util import * |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
# DO NOT MODIFY ! This file was automatically generated by tools/update_distutils_stubs.py | ||
from setuptools._distutils.filelist import * |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
# DO NOT MODIFY ! This file was automatically generated by tools/update_distutils_stubs.py | ||
from setuptools._distutils.log import * |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# DO NOT MODIFY ! This file was automatically generated by tools/update_distutils_stubs.py | ||
[lint] | ||
ignore = ["F403"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
# DO NOT MODIFY ! This file was automatically generated by tools/update_distutils_stubs.py | ||
from setuptools._distutils.spawn import * |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
# DO NOT MODIFY ! This file was automatically generated by tools/update_distutils_stubs.py | ||
from setuptools._distutils.sysconfig import * |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
# DO NOT MODIFY ! This file was automatically generated by tools/update_distutils_stubs.py | ||
from setuptools._distutils.text_file import * |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
# DO NOT MODIFY ! This file was automatically generated by tools/update_distutils_stubs.py | ||
from setuptools._distutils.unixccompiler import * |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
# DO NOT MODIFY ! This file was automatically generated by tools/update_distutils_stubs.py | ||
from setuptools._distutils.util import * |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
# DO NOT MODIFY ! This file was automatically generated by tools/update_distutils_stubs.py | ||
from setuptools._distutils.version import * |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
# DO NOT MODIFY ! This file was automatically generated by tools/update_distutils_stubs.py | ||
from setuptools._distutils.versionpredicate import * |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
# DO NOT MODIFY ! This file was automatically generated by tools/update_distutils_stubs.py | ||
from setuptools._distutils.zosccompiler import * |