|
| 1 | +$NetBSD: patch-setup.py,v 1.1 2024/12/02 13:49:09 bacon Exp $ |
| 2 | + |
| 3 | +# Hack to fix PLIST on macOS |
| 4 | + |
| 5 | +--- setup.py.orig 2024-08-17 08:56:33.000000000 +0000 |
| 6 | ++++ setup.py |
| 7 | +@@ -455,6 +455,10 @@ class BasePackage: |
| 8 | + |
| 9 | + hook_dirs = hook() if hook is not None else [None, None, None] |
| 10 | + |
| 11 | ++ print("locations = ", locations) |
| 12 | ++ print("hook_dirs = ", hook_dirs) |
| 13 | ++ print("pkgconfig_dirs = ", pkgconfig_dirs) |
| 14 | ++ |
| 15 | + directories = [None, None, None] # headers, libraries, runtime |
| 16 | + for idx, (name, find_path, default_dirs) in enumerate(dirdata): |
| 17 | + use_locations = ( |
| 18 | +@@ -463,6 +467,7 @@ class BasePackage: |
| 19 | + or hook_dirs[idx] |
| 20 | + or default_dirs |
| 21 | + ) |
| 22 | ++ print("use_locations = ", use_locations) |
| 23 | + # pkgconfig does not list bin/ as the runtime dir |
| 24 | + if ( |
| 25 | + name == "blosc" # blosc |
| 26 | +@@ -475,8 +480,12 @@ class BasePackage: |
| 27 | + use_locations = list(use_locations) |
| 28 | + use_locations[0] = use_locations[0].parent / "bin" |
| 29 | + print(f"Patching runtime dir: {str(use_locations[0])}") |
| 30 | ++ |
| 31 | ++ # FIXME: path is coming up empty for blosc rundir on macOS, |
| 32 | ++ # while returning True on other platforms. |
| 33 | + path = find_path(use_locations) |
| 34 | + if path: |
| 35 | ++ print("path = ", path) |
| 36 | + if path is True: |
| 37 | + directories[idx] = True |
| 38 | + continue |
| 39 | +@@ -496,7 +505,19 @@ class BasePackage: |
| 40 | + directories[idx] = Path(path[: path.rfind(name)]) |
| 41 | + else: |
| 42 | + directories[idx] = Path(path).parent |
| 43 | +- |
| 44 | ++ else: |
| 45 | ++ print("path is not set!! This is a problem.") |
| 46 | ++ if name == "blosc" or name == "blosc2": |
| 47 | ++ print("directories = ", directories) |
| 48 | ++ print("rundir (should be 'True') = ", directories[2]) |
| 49 | ++ # FIXME: tables-3.10.1 hack |
| 50 | ++ # Forcing rundir to True for macOS. This is a |
| 51 | ++ # hack, but it's the value it should have, since the |
| 52 | ++ # headers and libs are found. When rundir is None, |
| 53 | ++ # setup.py copyies libblosc into the py-tables |
| 54 | ++ # installation, breaking PLIST. |
| 55 | ++ if directories[0] and directories[1]: |
| 56 | ++ directories[2] = True |
| 57 | + return tuple(directories) |
| 58 | + |
| 59 | + |
0 commit comments