Print

Print


@matthewfeickert commented on this pull request.



> @@ -40,7 +40,9 @@ fi
 cd ../bindings/python
 
 # Determine if shutil.which is available for a modern Python package install
-${6} -c 'import shutil.which' &> /dev/null  # $6 holds the python sys.executable
+# (shutil.which was added in Python 3.3, so any version of Python 3 now will have it)
+# TODO: Drop support for Python 3.3 and simplify to pip approach
+${6} -c 'from shutil import which' &> /dev/null  # $6 holds the python sys.executable

This is the relevant fix. 

## Wrong behavior
```pytb
>>> import shutil.which
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ModuleNotFoundError: No module named 'shutil.which'; 'shutil' is not a package

```

## Correct behavior
```python
>>> from shutil import which
```

-- 
Reply to this email directly or view it on GitHub:
https://github.com/xrootd/xrootd/pull/1672#pullrequestreview-944599345
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