|
|
b3a79c |
diff --color -ruN a/mesonpy/__init__.py b/mesonpy/__init__.py
|
|
|
b3a79c |
--- a/mesonpy/__init__.py 2024-06-05 11:10:53.628398345 +0200
|
|
|
b3a79c |
+++ b/mesonpy/__init__.py 2024-06-05 11:31:13.600792738 +0200
|
|
|
b3a79c |
@@ -410,6 +410,7 @@
|
|
|
b3a79c |
# directory, in the form of a relative RPATH entry. meson-python
|
|
|
b3a79c |
# relocates the shared libraries to the $project.mesonpy.libs
|
|
|
b3a79c |
# folder. Rewrite the RPATH to point to that folder instead.
|
|
|
b3a79c |
+ assert False, "Patchelf is not allowed to run on RHEL"
|
|
|
b3a79c |
libspath = os.path.relpath(self._libs_dir, destination.parent)
|
|
|
b3a79c |
mesonpy._rpath.fix_rpath(origin, libspath)
|
|
|
b3a79c |
|
|
|
b3a79c |
@@ -1007,9 +1008,6 @@
|
|
|
b3a79c |
if os.environ.get('NINJA') is None and _env_ninja_command() is None:
|
|
|
b3a79c |
dependencies.append(f'ninja >= {_NINJA_REQUIRED_VERSION}')
|
|
|
b3a79c |
|
|
|
b3a79c |
- if sys.platform.startswith('linux') and not shutil.which('patchelf'):
|
|
|
b3a79c |
- dependencies.append('patchelf >= 0.11.0')
|
|
|
b3a79c |
-
|
|
|
b3a79c |
return dependencies
|
|
|
b3a79c |
|
|
|
b3a79c |
|
|
|
b3a79c |
diff --color -ruN a/mesonpy/_rpath.py b/mesonpy/_rpath.py
|
|
|
b3a79c |
--- a/mesonpy/_rpath.py 2024-06-05 11:10:53.628398345 +0200
|
|
|
b3a79c |
+++ b/mesonpy/_rpath.py 2024-06-05 11:31:18.954861673 +0200
|
|
|
b3a79c |
@@ -17,12 +17,13 @@
|
|
|
b3a79c |
|
|
|
b3a79c |
|
|
|
b3a79c |
if sys.platform == 'linux':
|
|
|
b3a79c |
-
|
|
|
b3a79c |
def _get_rpath(filepath: Path) -> List[str]:
|
|
|
b3a79c |
+ assert False, "Patchelf is not allowed to run on RHEL"
|
|
|
b3a79c |
r = subprocess.run(['patchelf', '--print-rpath', os.fspath(filepath)], capture_output=True, text=True)
|
|
|
b3a79c |
return r.stdout.strip().split(':')
|
|
|
b3a79c |
|
|
|
b3a79c |
def _set_rpath(filepath: Path, rpath: Iterable[str]) -> None:
|
|
|
b3a79c |
+ assert False, "Patchelf is not allowed to run on RHEL"
|
|
|
b3a79c |
subprocess.run(['patchelf','--set-rpath', ':'.join(rpath), os.fspath(filepath)], check=True)
|
|
|
b3a79c |
|
|
|
b3a79c |
def fix_rpath(filepath: Path, libs_relative_path: str) -> None:
|