summarylogtreecommitdiffstats
path: root/fix-wheel.patch
blob: 3b45c6509592d85d900bfe2207fedd96e81cb01e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
From da96b938e847a9b338570c5b7596970c46e02ca0 Mon Sep 17 00:00:00 2001
From: Wim Lavrijsen <WLavrijsen@lbl.gov>
Date: Thu, 16 Jan 2025 13:27:32 -0800
Subject: [PATCH] prevent duplicate `libcppyy_backend` in wheel

---
 clingwrapper/setup.py | 35 +----------------------------------
 1 file changed, 1 insertion(+), 34 deletions(-)

diff --git a/clingwrapper/setup.py b/clingwrapper/setup.py
index f5a6e14b..f94d93ac 100755
--- a/clingwrapper/setup.py
+++ b/clingwrapper/setup.py
@@ -131,41 +131,8 @@ def run(self):
         _clean.run(self)
 
 class my_install(_install):
-    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 "platlib" in self.install_lib:
-            # 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 = self.install_purelib
-        else:
-            install_path = self.install_lib
-        return install_path
-
     def run(self):
-        # base install
-        _install.run(self)
-
-        # custom install of backend
-        log.info('Now installing cppyy_backend')
-        builddir = self.build_lib
-        if not os.path.exists(builddir):
-            raise DistutilsSetupError('Failed to find build dir!')
-
-        install_path = self._get_install_path()
-        log.info('Copying installation to: %s ...', install_path)
-        self.copy_tree(builddir, install_path)
-
-        log.info('Install finished')
-
-    def get_outputs(self):
-        outputs = _install.get_outputs(self)
-        #outputs.append(os.path.join(self._get_install_path(), 'cppyy_backend'))
-        return outputs
+        return _install.run(self)
 
 
 cmdclass = {