flux-framework / flux-core

core services for the Flux resource management framework
GNU Lesser General Public License v3.0
167 stars 50 forks source link

configure: ModuleNotFoundError: No module named 'setuptools' #6327

Open garlick opened 3 hours ago

garlick commented 3 hours ago

Problem: when python3-setuptools is not installed, the user doesn't get a very nice error at configure time:

checking for a version of Python >= '2.1.0'... Traceback (most recent call last):
  File "<string>", line 1, in <module>
ModuleNotFoundError: No module named 'setuptools'
no
configure: WARNING:
This version of the AC_PYTHON_DEVEL macro
doesn't work properly with versions of Python before
2.1.0. You may need to re-run configure, setting the
variables PYTHON_CPPFLAGS, PYTHON_LIBS, PYTHON_SITE_PKG,
PYTHON_EXTRA_LIBS and PYTHON_EXTRA_LDFLAGS by hand.
Moreover, to disable this check, set PYTHON_NOVERSIONCHECK
to something else than an empty string.

configure: error: in `/nfshome/garlick/proj/flux-core':
configure: error: Giving up
See `config.log' for more details

Or at least the suggestion to set environment variables may send the uninitiated off in the wrong direction. Perhaps we can check explicitly for that package earlier in configure.ac and fail nicely.

grondo commented 3 hours ago

Perhaps we can check explicitly for that package earlier in configure.ac and fail nicely.

That would be great. Kinda crazy we need to check for a python package in configure that is only needed by something else in configure :face_with_diagonal_mouth: