-
Notifications
You must be signed in to change notification settings - Fork 149
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Staged installation of Python bindings not working after migration to pip #1768
Comments
@amadio You should just use the Example: xrootd/.github/workflows/build.yml Lines 136 to 142 in dc680e5
Though I'm skeptical of why |
Shall we close this then? |
Yes, I think we can close this. |
I've decided to take a look at this again due to #1807 and because I think that --- a/bindings/python/CMakeLists.txt
+++ b/bindings/python/CMakeLists.txt
@@ -95,7 +95,7 @@ else()
CODE
"EXECUTE_PROCESS(
COMMAND /usr/bin/env ${XROOTD_PYBUILD_ENV} ${PYTHON_EXECUTABLE} -m pip install \
- ${PIP_OPTIONS} \
+ --prefix \$ENV{DESTDIR}/${CMAKE_INSTALL_PREFIX} ${PIP_OPTIONS} \
${CMAKE_CURRENT_BINARY_DIR}
)"
) After applying this, with the default
@matthewfeickert What do you think about this? |
The problem is that with a single slash as in \$ENV{DESTDIR}, the variable gets expanded too early (i.e., when passing ${PIP_OPTIONS} in the call to install(CODE...)), so when "make DESTDIR=$INSTALL_DIR install" is run, the variable is not part of the recipe, as $ENV{DESTDIR} has been passed to install(CODE..) and has been expanded into an empty value. By adding one more level of quoting, the expansion of DESTDIR happens at the right place and the staged installation works correctly. Closes: xrootd#1768
Using "--prefix" for DESTDIR is wrong, as pip may then write the DESTDIR into some generated files. The correct way to specify DESTDIR is by using "--root". E.g.: Using |
Unfortunately, using
|
This is a rewrite of the packaging of the Python bindings. The new packaging supports building the Python bindings both as part of a standard CMake build, as well as against a previously installed version of XRootD without the Python bindings. A new setup.py at the top level has been created to replace the old one from packaging/wheel. It can be used to drive the main CMake build using pip to create source and binary distributions of XRootD. Closes: xrootd#1768, xrootd#1807 xrootd#1833, xrootd#1844, xrootd#2001, xrootd#2002.
This is a rewrite of the packaging of the Python bindings. The new packaging supports building the Python bindings both as part of a standard CMake build, as well as against a previously installed version of XRootD without the Python bindings. A new setup.py at the top level has been created to replace the old one from packaging/wheel. It can be used to drive the main CMake build using pip to create source and binary distributions of XRootD. Closes: xrootd#1768, xrootd#1807 xrootd#1833, xrootd#1844, xrootd#2001, xrootd#2002.
This is a rewrite of the packaging of the Python bindings. The new packaging supports building the Python bindings both as part of a standard CMake build, as well as against a previously installed version of XRootD without the Python bindings. A new setup.py at the top level has been created to replace the old one from packaging/wheel. It can be used to drive the main CMake build using pip to create source and binary distributions of XRootD. Closes: xrootd#1768, xrootd#1807 xrootd#1833, xrootd#1844, xrootd#2001, xrootd#2002.
This is a rewrite of the packaging of the Python bindings. The new packaging supports building the Python bindings both as part of a standard CMake build, as well as against a previously installed version of XRootD without the Python bindings. A new setup.py at the top level has been created to replace the old one from packaging/wheel. It can be used to drive the main CMake build using pip to create source and binary distributions of XRootD. Closes: xrootd#1768, xrootd#1807 xrootd#1833, xrootd#1844, xrootd#2001, xrootd#2002.
This is a rewrite of the packaging of the Python bindings. The new packaging supports building the Python bindings both as part of a standard CMake build, as well as against a previously installed version of XRootD without the Python bindings. A new setup.py at the top level has been created to replace the old one from packaging/wheel. It can be used to drive the main CMake build using pip to create source and binary distributions of XRootD. Closes: xrootd#1768, xrootd#1807 xrootd#1833, xrootd#1844, xrootd#2001, xrootd#2002.
Original bug report from Gentoo Linux: https://bugs.gentoo.org/861452
Bisection with git points to commit 31e3d71 as the problematic change.
How to reproduce the problem:
What I get:
Edit (09/11/2022): There are some existing issues with pip for this behavior: pypa/pip#3063, pypa/pip#1716, and pypa/pip#2677.
The text was updated successfully, but these errors were encountered: