|
267 | 267 | from typing import Any, ClassVar, IO |
268 | 268 |
|
269 | 269 | import setuptools.command.build_ext |
270 | | -import setuptools.command.install |
271 | 270 | import setuptools.command.sdist |
272 | 271 | import setuptools.errors |
273 | 272 | from setuptools import Command, Extension, find_packages, setup |
@@ -767,8 +766,7 @@ def run(self) -> None: |
767 | 766 | ): |
768 | 767 | os.environ["CC"] = str(os.environ["CC"]) |
769 | 768 |
|
770 | | - # It's an old-style class in Python 2.7... |
771 | | - setuptools.command.build_ext.build_ext.run(self) |
| 769 | + super().run() |
772 | 770 |
|
773 | 771 | if IS_DARWIN: |
774 | 772 | self._embed_libomp() |
@@ -835,10 +833,10 @@ def build_extensions(self) -> None: |
835 | 833 | os.makedirs(dst_dir) |
836 | 834 | self.copy_file(src, dst) |
837 | 835 |
|
838 | | - setuptools.command.build_ext.build_ext.build_extensions(self) |
| 836 | + super().build_extensions() |
839 | 837 |
|
840 | 838 | def get_outputs(self) -> list[str]: |
841 | | - outputs = setuptools.command.build_ext.build_ext.get_outputs(self) |
| 839 | + outputs = super().get_outputs() |
842 | 840 | outputs.append(os.path.join(self.build_lib, "caffe2")) |
843 | 841 | report(f"setup.py::get_outputs returning {outputs}") |
844 | 842 | return outputs |
@@ -942,11 +940,6 @@ def write_wheelfile(self, *args: Any, **kwargs: Any) -> None: |
942 | 940 | open(os.path.join(self.bdist_dir, "torch", "__init__.py"), "w").close() |
943 | 941 |
|
944 | 942 |
|
945 | | -class install(setuptools.command.install.install): |
946 | | - def run(self) -> None: |
947 | | - super().run() |
948 | | - |
949 | | - |
950 | 943 | class clean(Command): |
951 | 944 | user_options: ClassVar[list[tuple[str, str | None, str]]] = [] |
952 | 945 |
|
@@ -1144,7 +1137,6 @@ def make_relative_rpath_args(path: str) -> list[str]: |
1144 | 1137 | cmdclass = { |
1145 | 1138 | "build_ext": build_ext, |
1146 | 1139 | "clean": clean, |
1147 | | - "install": install, |
1148 | 1140 | "sdist": sdist, |
1149 | 1141 | } |
1150 | 1142 | if wheel_concatenate is not None: |
|
0 commit comments