Skip to content

Commit 73befc0

Browse files
committed
Account for fileless folders (compilers/C)
1 parent fecc957 commit 73befc0

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

Diff for: setup.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -38,16 +38,16 @@ def pypi_link(pkg_filename):
3838
return '/'.join(parts)
3939

4040

41-
_vendored_distutils_path = Path(here) / "setuptools" / "_distutils"
41+
vendored_distutils_path = Path(here) / "setuptools" / "_distutils"
4242

4343

4444
def generate_distutils_stubs(destination: Path) -> None:
45-
for path in _vendored_distutils_path.rglob("*.py"):
46-
relative_path = path.relative_to(_vendored_distutils_path)
45+
for path in vendored_distutils_path.rglob("*.py"):
46+
relative_path = path.relative_to(vendored_distutils_path)
4747
if relative_path.parts[0] == "tests":
4848
continue
4949
stub_path = (destination / relative_path).with_suffix(".pyi")
50-
stub_path.parent.mkdir(exist_ok=True)
50+
stub_path.parent.mkdir(parents=True, exist_ok=True)
5151
module = "setuptools._distutils." + str(relative_path.with_suffix("")).replace(
5252
os.sep, "."
5353
).removesuffix(".__init__")

0 commit comments

Comments
 (0)