comparison setup.py @ 747:95d3239bec73

FIX: Root-Is-PureLib: false installs into "purelib" but should install into "platlib". Overwrite also the "install" command.
author Franz Glasner <f.glasner@feldmann-mg.com>
date Mon, 30 Oct 2023 15:46:13 +0100
parents 7b3c3a89f720
children c27d0812b30d
comparison
equal deleted inserted replaced
746:d6646cfcdddd 747:95d3239bec73
175 # 175 #
176 self.py_limited_api = 'cp37' 176 self.py_limited_api = 'cp37'
177 super().finalize_options() 177 super().finalize_options()
178 178
179 cmdclass["bdist_wheel"] = BDistWheel 179 cmdclass["bdist_wheel"] = BDistWheel
180
181
182 #
183 # See also: https://peps.python.org/pep-0427/
184 # See also: https://github.com/google/or-tools/issues/616
185 #
186 from setuptools.command.install import install
187
188 class InstallPlatlib(install):
189 def finalize_options(self):
190 super().finalize_options()
191 if self.distribution.has_ext_modules():
192 self.install_lib = self.install_platlib
193
194 cmdclass["install"] = InstallPlatlib
180 195
181 from setuptools.dist import Distribution 196 from setuptools.dist import Distribution
182 197
183 # 198 #
184 # Force a binary package. An empty ext_modules does not do this always. 199 # Force a binary package. An empty ext_modules does not do this always.