I've decided to take a look at this again due to #1807 and because I think that make DESTDIR=$INSTALL install should work by default without having to change $PIP_OPTIONS. The patch below seems sufficient (just add the same --prefix option from the command used on Debian):

--- 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 CMAKE_INSTALL_PREFIX=/usr/local I now see things get installed in the right place with a staged installation:

build $ tree -d install
install
└── usr
    └── local
        ├── bin
        ├── include
        │   └── xrootd
        │       ├── XProtocol
        │       ├── Xrd
        │       ├── XrdCl
        │       ├── XrdHttp
        │       ├── XrdNet
        │       ├── XrdOuc
        │       ├── XrdPosix
        │       ├── XrdSec
        │       ├── XrdSys
        │       ├── XrdXml
        │       ├── XrdXrootd
        │       └── private
        │           ├── Xrd
        │           ├── XrdCl
        │           ├── XrdNet
        │           ├── XrdOuc
        │           ├── XrdPosix
        │           ├── XrdSecsss
        │           ├── XrdSys
        │           └── XrdZip
        ├── lib
        │   └── python3.10
        │       └── site-packages
        │           ├── XRootD
        │           │   ├── __pycache__
        │           │   └── client
        │           │       └── __pycache__
        │           ├── pyxrootd
        │           │   └── __pycache__
        │           └── xrootd-2022.1020+3a0998333.dist-info
        ├── lib64
        └── share
            ├── man
            │   ├── man1
            │   └── man8
            └── xrootd
                └── cmake

42 directories


Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.Message ID: <xrootd/xrootd/issues/1768/1303754272@github.com>

[ { "@context": "http://schema.org", "@type": "EmailMessage", "potentialAction": { "@type": "ViewAction", "target": "https://github.com/xrootd/xrootd/issues/1768#issuecomment-1303754272", "url": "https://github.com/xrootd/xrootd/issues/1768#issuecomment-1303754272", "name": "View Issue" }, "description": "View this Issue on GitHub", "publisher": { "@type": "Organization", "name": "GitHub", "url": "https://github.com" } } ]

Use REPLY-ALL to reply to list

To unsubscribe from the XROOTD-DEV list, click the following link:
https://listserv.slac.stanford.edu/cgi-bin/wa?SUBED1=XROOTD-DEV&A=1