Skip to content

Python wheel install.sh is using deprecated instructions as of setuptools v0.60.0 #1579

@matthewfeickert

Description

@matthewfeickert

Problem

Hi. 👋 With the release of setuptools v0.60.0 on 2021-12-19, the Python wheel install.sh script will produce warnings (here shown for Python 3.9) of the form

/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)

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,

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 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).

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions