Print

Print


## Problem

Hi. :wave: With the release of [`setuptools` `v0.60.0` on 2021-12-19](https://pypi.org/project/setuptools/60.0.0/), the Python [wheel `install.sh`](https://github.com/xrootd/xrootd/blob/af217b9a5c196f921bdc460930390828a9f927f4/packaging/wheel/install.sh) script will produce warnings (here shown for Python 3.9) of the form 

```pytb
/usr/local/venv/lib/python3.9/site-packages/setuptools/command/install.py:34: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools.
  warnings.warn(
/usr/local/venv/lib/python3.9/site-packages/setuptools/command/easy_install.py:156: EasyInstallDeprecationWarning: easy_install command is deprecated. Use build and pip and other standards-based tools.
  warnings.warn(
```

and the resulting directory structure in `site-packages` will change from installing `pyxrootd` in `site-packages`'s top level (correctly)

```console
root@d68489115a42:/# ls -lhtr /usr/local/venv/lib/python3.9/site-packages/
total 48K
drwxr-xr-x 2 root root 4.0K Dec 21 05:23 wheel-0.37.0.dist-info
drwxr-xr-x 5 root root 4.0K Dec 21 05:23 wheel
drwxr-xr-x 5 root root 4.0K Dec 21 05:23 pip
drwxr-xr-x 2 root root 4.0K Dec 21 05:23 pip-21.3.1.dist-info
drwxr-xr-x 7 root root 4.0K Dec 21 06:22 setuptools
drwxr-xr-x 6 root root 4.0K Dec 21 06:22 pkg_resources
-rw-r--r-- 1 root root  152 Dec 21 06:22 distutils-precedence.pth
drwxr-xr-x 3 root root 4.0K Dec 21 06:22 _distutils_hack
drwxr-xr-x 2 root root 4.0K Dec 21 06:22 setuptools-59.8.0.dist-info
-rw-r--r-- 1 root root  252 Dec 21 06:24 xrootd-v5.4.0-py3.9.egg-info
drwxr-xr-x 3 root root 4.0K Dec 21 06:24 pyxrootd
drwxr-xr-x 4 root root 4.0K Dec 21 06:24 XRootD
```

to installing `pyxrootd` below in `site-packages/xrootd-5.4.0-py3.9-linux-x86_64.egg`,

```console
root@ec762b69abe0:/# ls -lhtr /usr/local/venv/lib/python3.9/site-packages/
total 44K
drwxr-xr-x 2 root root 4.0K Dec 21 05:23 wheel-0.37.0.dist-info
drwxr-xr-x 5 root root 4.0K Dec 21 05:23 wheel
drwxr-xr-x 5 root root 4.0K Dec 21 05:23 pip
drwxr-xr-x 2 root root 4.0K Dec 21 05:23 pip-21.3.1.dist-info
drwxr-xr-x 2 root root 4.0K Dec 21 06:24 setuptools-60.0.0.dist-info
drwxr-xr-x 7 root root 4.0K Dec 21 06:24 setuptools
drwxr-xr-x 6 root root 4.0K Dec 21 06:24 pkg_resources
-rw-r--r-- 1 root root  151 Dec 21 06:24 distutils-precedence.pth
drwxr-xr-x 3 root root 4.0K Dec 21 06:24 _distutils_hack
drwxr-xr-x 5 root root 4.0K Dec 21 06:26 xrootd-5.4.0-py3.9-linux-x86_64.egg
-rw-r--r-- 1 root root   38 Dec 21 06:26 easy-install.pth
root@ec762b69abe0:/# ls -lhtr /usr/local/venv/lib/python3.9/site-packages/xrootd-5.4.0-py3.9-linux-x86_64.egg/
total 12K
drwxr-xr-x 3 root root 4.0K Dec 21 06:26 pyxrootd
drwxr-xr-x 4 root root 4.0K Dec 21 06:26 XRootD
drwxr-xr-x 2 root root 4.0K Dec 21 06:26 EGG-INFO
```

which is atypical and not good in general as you're now dependent on the deprecated `easy-install.pth`.

## Minimal Reproducible Example

To make this easier to see, [here's a GitHub Gist](https://gist.github.com/matthewfeickert/6ff43901c7a76e07b5b92620be1496c5) with a fully reproducible example in the form of a Dockerfile and a Makefile that will produce a working (`setuptools` `v59.8.0`) and failing (`setuptools` `v60.0.0`) example. c.f. `setuptools-60.0.0-fail.log.txt` for the warnings I describe above. (I know that all the packages I have in `packages.txt` aren't needed, but that was easiest for me to grab from an existing build, so feel free to remove the unneeded ones if you want.)

## Requested Action

Can you please update the install script to be compatible with modern `setuptools`? This will help a lot when people are trying to install xrootd with its full Python bindings in scenarios that require some "creative" installs (I have a few of them, sadly).

-- 
Reply to this email directly or view it on GitHub:
https://github.com/xrootd/xrootd/issues/1579
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