1515
1616from setuptools .command .bdist_wheel import bdist_wheel as _bdist_wheel
1717from setuptools .command .build_py import build_py as _build_py
18+ from setuptools .command .install import install as _install
1819from setuptools .errors import SetupError
1920
2021if sys .version_info >= (3 , 11 ):
@@ -249,12 +250,17 @@ def stage_payload(config: PackageBuildConfig, build_lib: Path) -> None:
249250
250251def make_build_commands (
251252 config : PackageBuildConfig ,
252- ) -> tuple [type [_build_py ], type [_bdist_wheel ]]:
253+ ) -> tuple [type [_build_py ], type [_bdist_wheel ], type [ _install ] ]:
253254 class build_py (_build_py ):
254255 def run (self ) -> None :
255256 super ().run ()
256257 stage_payload (config , Path (self .build_lib ))
257258
259+ class install (_install ):
260+ def finalize_options (self ) -> None :
261+ super ().finalize_options ()
262+ self .install_lib = self .install_platlib
263+
258264 class bdist_wheel (_bdist_wheel ):
259265 def finalize_options (self ) -> None :
260266 super ().finalize_options ()
@@ -264,4 +270,4 @@ def get_tag(self) -> tuple[str, str, str]:
264270 _ , _ , platform_tag = super ().get_tag ()
265271 return "py3" , "none" , platform_tag
266272
267- return build_py , bdist_wheel
273+ return build_py , bdist_wheel , install
0 commit comments