From afbd54dd13ff2ff54280e1376dced74c5e033cd7 Mon Sep 17 00:00:00 2001 From: "Yamashita, Yuu" Date: Sat, 28 Jan 2017 20:21:25 +0900 Subject: [PATCH] Revert "use $ORIGIN for rpath so the built python can be copied" --- plugins/python-build/README.md | 4 ++-- plugins/python-build/bin/python-build | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/plugins/python-build/README.md b/plugins/python-build/README.md index 247922ac..c13c51c9 100644 --- a/plugins/python-build/README.md +++ b/plugins/python-build/README.md @@ -153,12 +153,12 @@ You can build CPython with `--enable-shared` to install a version with shared object. If `--enabled-shared` was found in `PYTHON_CONFIGURE_OPTS` or `CONFIGURE_OPTS`, -`python-build` will automatically set `RPATH` to the pyenv's `bin/../lib` directory. +`python-build` will automatically set `RPATH` to the pyenv's prefix directory. This means you don't have to set `LD_LIBRARY_PATH` or `DYLD_LIBRARY_PATH` for the version(s) installed with `--enable-shared`. ```sh -$ env PYTHON_CONFIGURE_OPTS="--enable-shared" pyenv install 2.7.9 +$ env PYTHON_CONFIGURE_OPTS="--enable-shared` pyenv install 2.7.9 ``` ### Checksum verification diff --git a/plugins/python-build/bin/python-build b/plugins/python-build/bin/python-build index ab7734a3..a0058afb 100755 --- a/plugins/python-build/bin/python-build +++ b/plugins/python-build/bin/python-build @@ -1911,7 +1911,7 @@ package_option python configure --libdir="${PREFIX_PATH}/lib" if [[ "$CONFIGURE_OPTS" == *"--enable-shared"* ]] || [[ "$PYTHON_CONFIGURE_OPTS" == *"--enable-shared"* ]]; then # The ld on Darwin embeds the full paths to each dylib by default if [[ "$LDFLAGS" != *"-rpath="* ]] && ! is_mac; then - export LDFLAGS="-Wl,-rpath='\$\$ORIGIN/../lib' ${LDFLAGS}" + export LDFLAGS="-Wl,-rpath=${PREFIX_PATH}/lib ${LDFLAGS}" fi fi