# HG changeset patch # User Franz Glasner # Date 1698677173 -3600 # Node ID 95d3239bec732f0ccbb4fb5dc6f3438e923b6ff8 # Parent d6646cfcdddd78ef91b70bd6b9209d1638aca85d FIX: Root-Is-PureLib: false installs into "purelib" but should install into "platlib". Overwrite also the "install" command. diff -r d6646cfcdddd -r 95d3239bec73 setup.py --- a/setup.py Mon Oct 30 09:25:19 2023 +0100 +++ b/setup.py Mon Oct 30 15:46:13 2023 +0100 @@ -178,6 +178,21 @@ cmdclass["bdist_wheel"] = BDistWheel + + # + # See also: https://peps.python.org/pep-0427/ + # See also: https://github.com/google/or-tools/issues/616 + # + from setuptools.command.install import install + + class InstallPlatlib(install): + def finalize_options(self): + super().finalize_options() + if self.distribution.has_ext_modules(): + self.install_lib = self.install_platlib + + cmdclass["install"] = InstallPlatlib + from setuptools.dist import Distribution #