Print

Print


This is part one of two PRs that will address Issue #1579.

As distutils and Easy Install are deprecated

c.f.:

this PR converts all use of distutils to either use existing CPython libraries or
use setuptool's versions of them, as advocated by the PyPA.

The XRootD docs are not clear on how to run the test suite(or at least don't make it easy to find at all), so while I'd really appreciate it if someone could tell me how to do that at there doesn't seem to be any CI hooked up on GitHub here's an example Dockerfile that demonstrates on my fork that things still build fine

# docker/Dockerfile
ARG BASE_IMAGE=neubauergroup/centos-build-base:3.8.11
FROM ${BASE_IMAGE} as base

SHELL [ "/bin/bash", "-c" ]

RUN yum update -y && \
    yum install -y \
        cmake \
        krb5-devel \
        libuuid-devel \
        libxml2-devel \
        openssl-devel \
        systemd-devel \
        zlib-devel \
        curl \
        git && \
    yum clean all && \
    python -m pip install --no-cache-dir --upgrade pip setuptools wheel

COPY . /code/xrootd

WORKDIR /code
RUN source scl_source enable devtoolset-8 && \
    . /usr/local/venv/bin/activate && \
    cmake \
        -DCMAKE_INSTALL_PREFIX=/usr/local/venv \
        -DPYTHON_EXECUTABLE=$(command -v python3) \
        -S xrootd \
        -B build && \
    cmake build -LH && \
    cmake \
        --build build \
        --clean-first \
        --parallel $(($(nproc) - 1)) && \
    cmake --build build --target install && \
    cd / && \
    rm -rf /code && \
    python -m pip list

WORKDIR /

# Load libraries
ENV LD_LIBRARY_PATH=/usr/local/venv/lib:$LD_LIBRARY_PATH

ENTRYPOINT ["/bin/bash", "-l", "-c"]
CMD ["/bin/bash"]

that when built from the top level of my fork with

docker build --file docker/Dockerfile --tag xrootd/xrootd:debug-local .

still builds okay

$ docker run --rm -ti xrootd/xrootd:debug-local
[root@58ad262bf249 /]# cat /etc/os-release 
NAME="CentOS Linux"
VERSION="7 (Core)"
ID="centos"
ID_LIKE="rhel fedora"
VERSION_ID="7"
PRETTY_NAME="CentOS Linux 7 (Core)"
ANSI_COLOR="0;31"
CPE_NAME="cpe:/o:centos:centos:7"
HOME_URL="https://www.centos.org/"
BUG_REPORT_URL="https://bugs.centos.org/"

CENTOS_MANTISBT_PROJECT="CentOS-7"
CENTOS_MANTISBT_PROJECT_VERSION="7"
REDHAT_SUPPORT_PRODUCT="centos"
REDHAT_SUPPORT_PRODUCT_VERSION="7"

[root@58ad262bf249 /]# python -c "import pyxrootd; print(pyxrootd)"
<module 'pyxrootd' from '/usr/local/venv/lib/python3.8/site-packages/xrootd-v20220110_1d50f8d-py3.8-linux-x86_64.egg/pyxrootd/__init__.py'>
[root@58ad262bf249 /]# python -c "import XRootD; print(XRootD)"
<module 'XRootD' from '/usr/local/venv/lib/python3.8/site-packages/xrootd-v20220110_1d50f8d-py3.8-linux-x86_64.egg/XRootD/__init__.py'>
[root@58ad262bf249 /]# command -v xrootd
/usr/local/venv/bin/xrootd
[root@58ad262bf249 /]# command -v xrdcp
/usr/local/venv/bin/xrdcp
[root@58ad262bf249 /]# python
Python 3.8.11 (default, Aug  2 2021, 20:01:57) 
[GCC 8.3.1 20190311 (Red Hat 8.3.1-3)] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> from XRootD import client
>>> from XRootD.client.flags import DirListFlags, OpenFlags, MkDirFlags, QueryCode
>>> myclient = client.FileSystem('root://someserver:1094')
>>> 
KeyboardInterrupt
>>> 
[root@58ad262bf249 /]# exit
exit

You can view, comment on, or merge this pull request online at:

  https://github.com/xrootd/xrootd/pull/1585

Commit Summary

File Changes

(4 files)

Patch Links:


Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications on the go with GitHub Mobile for iOS or Android.
You are receiving this because you are subscribed to this thread.Message ID: <xrootd/xrootd/pull/1585@github.com>

[ { "@context": "http://schema.org", "@type": "EmailMessage", "potentialAction": { "@type": "ViewAction", "target": "https://github.com/xrootd/xrootd/pull/1585", "url": "https://github.com/xrootd/xrootd/pull/1585", "name": "View Pull Request" }, "description": "View this Pull Request 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