diff --git a/distutils/compilers/C/base.py b/distutils/compilers/C/base.py index 5efd2a39..93385e13 100644 --- a/distutils/compilers/C/base.py +++ b/distutils/compilers/C/base.py @@ -865,7 +865,7 @@ def library_dir_option(self, dir: str) -> str: """ raise NotImplementedError - def runtime_library_dir_option(self, dir: str) -> str: + def runtime_library_dir_option(self, dir: str) -> str | list[str]: """Return the compiler option to add 'dir' to the list of directories searched for runtime libraries. """ diff --git a/distutils/compilers/C/unix.py b/distutils/compilers/C/unix.py index e8a53d45..77ff4edc 100644 --- a/distutils/compilers/C/unix.py +++ b/distutils/compilers/C/unix.py @@ -323,7 +323,7 @@ def _is_gcc(self): compiler = os.path.basename(shlex.split(cc_var)[0]) return "gcc" in compiler or "g++" in compiler - def runtime_library_dir_option(self, dir: str) -> str | list[str]: # type: ignore[override] # Fixed in pypa/distutils#339 + def runtime_library_dir_option(self, dir: str) -> str | list[str]: # XXX Hackish, at the very least. See Python bug #445902: # https://bugs.python.org/issue445902 # Linkers on different platforms need different options to diff --git a/newsfragments/4902.bugfix.rst b/newsfragments/4902.bugfix.rst new file mode 100644 index 00000000..6388d722 --- /dev/null +++ b/newsfragments/4902.bugfix.rst @@ -0,0 +1 @@ +Reverted distutils changes that broke the monkey patching of command classes.