Skip to content

Commit

Permalink
force-use install into purelib as that's where cppyy_backend resides
Browse files Browse the repository at this point in the history
  • Loading branch information
wlav committed Nov 14, 2023
1 parent 4205d5e commit 17ec932
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion clingwrapper/setup.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import codecs, glob, os, sys, subprocess
import codecs, glob, os, sys, sysconfig, subprocess
from setuptools import setup, find_packages, Extension
from distutils import log

Expand Down Expand Up @@ -135,6 +135,13 @@ def _get_install_path(self):
# depending on goal, copy over pre-installed tree
if hasattr(self, 'bdist_dir') and self.bdist_dir:
install_path = self.bdist_dir
elif "purelib" in sysconfig.get_paths():
# this is illogical but cppyy-cling is treated as pure and the backend
# needs to be co-located with it to be found; purelib and platlib are
# the same on many platforms, but not all (eg. not on Fedora)
# TODO: fix this in cppyy-cling to install in platlib, or the loader to
# look into platlib, then remove this
install_path = sysconfig.get_paths()["purelib"]
else:
install_path = self.install_lib
return install_path
Expand Down

0 comments on commit 17ec932

Please sign in to comment.