Print

Print


> @matthewfeickert & @nsmith- : is there an action needed or can we just close this issue?

> If there's a self-contained `pip install xrootd` in the future that will include the main library and successfully compile then this standalone setup is obviated.

@nsmith- Does this seem okay as a solution that provides the Python bindings [from PyPI](https://pypi.org/project/xrootd/) when XRootD is already installed? Or do you have a use case that I'm still missing here?

```Dockerfile
FROM cern/cc7-base:latest

RUN yum update -y && \
    yum install --nogpg -y \
        cmake3 \
        make \
        krb5-devel \
        libuuid-devel \
        libxml2-devel \
        openssl-devel \
        systemd-devel \
        zlib-devel \
        devtoolset-7-gcc-c++ \
        which \
        python3-devel \
        python3-setuptools \
        git \
        cppunit-devel && \
    yum clean all

# Find libXrdCl.so.3 once installed under /usr/local
ENV LD_LIBRARY_PATH="/usr/local/lib64:${LD_LIBRARY_PATH}"
# Install XRootD v5.4.2 with no Python bindings
RUN . /opt/rh/devtoolset-7/enable && \
    git clone --depth 1 https://github.com/xrootd/xrootd \
        --branch v5.4.2 \
        --single-branch && \
    cmake3 \
        -DCMAKE_INSTALL_PREFIX=/usr/local/ \
        -S xrootd \
        -B build && \
    cmake3 build -LH && \
    cmake3 \
        --build build \
        --clean-first \
        --parallel $(($(nproc) - 1)) && \
    cmake3 --build build --target install && \
    command -v xrootd && \
    command -v xrdcp && \
    xrdcp --version

# Install XRootD Python bindings from sdist on PyPI
RUN . /opt/rh/devtoolset-7/enable && \
    python3 -m venv venv && \
    . venv/bin/activate && \
    python -m pip install --upgrade pip setuptools wheel && \
    python -m pip install --verbose 'xrootd==5.4.2' && \
    python -m pip list && \
    python -m pip show xrootd && \
    command -v xrootd && \
    command -v xrdcp && \
    xrdcp --version && \
    python -c 'import XRootD; print(XRootD)' && \
    python -c 'import pyxrootd; print(pyxrootd)' && \
    python -c 'from XRootD import client; print(client.FileSystem("root://someserver:1094"))'
```

```console
$ docker build -f Dockerfile -t xrootd/xrootd:issue-1594 .
$ docker run --rm -ti xrootd/xrootd:issue-1594 /bin/bash
[root@ddbe76d3b2f7 /]# . venv/bin/activate
(venv) [root@ddbe76d3b2f7 /]# xrdcp --version
v5.4.2
(venv) [root@ddbe76d3b2f7 /]# python -m pip show xrootd  # PyPI metadata is missing from sdist at the moment
WARNING: No metadata found in /venv/lib/python3.6/site-packages
WARNING: No metadata found in /venv/lib/python3.6/site-packages
WARNING: No metadata found in /venv/lib/python3.6/site-packages
Name: xrootd
Version: 5.4.2
Summary: 
Home-page: 
Author: 
Author-email: 
License: 
Location: /venv/lib/python3.6/site-packages
Requires: 
Required-by: 
(venv) [root@ddbe76d3b2f7 /]# python -c 'from XRootD import client; print(client.FileSystem("root://someserver:1094"))'
<XRootD.client.filesystem.FileSystem object at 0x7f9fb1787128>
(venv) [root@ddbe76d3b2f7 /]# 
```

-- 
Reply to this email directly or view it on GitHub:
https://github.com/xrootd/xrootd/issues/1594#issuecomment-1063761052
You are receiving this because you are subscribed to this thread.

Message ID: <[log in to unmask]>

########################################################################
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