Skip to content

Commit

Permalink
autoconf: support python 3.12
Browse files Browse the repository at this point in the history
problem: flux-core currently can't configure with python3.12 due to
setuptools no longer being part of the default distribution

solution: import setuptools where necessary to keep things working in
the ax_python_devel file

Also add setuptools as an explicit dep in our scripts and the one
dockerfile that lacked it.
  • Loading branch information
trws committed Sep 26, 2024
1 parent cab4755 commit e287c87
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 1 deletion.
3 changes: 2 additions & 1 deletion config/ax_python_devel.m4
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ AC_DEFUN([AX_PYTHON_DEVEL],[
# Check for a version of Python >= 2.1.0
#
AC_MSG_CHECKING([for a version of Python >= '2.1.0'])
ac_supports_python_ver=`$PYTHON -c "import sys; \
ac_supports_python_ver=`$PYTHON -c "import sys;import setuptools; \
ver = sys.version.split ()[[0]]; \
print (ver >= '2.1.0')"`
if test "$ac_supports_python_ver" != "True"; then
Expand Down Expand Up @@ -150,6 +150,7 @@ class VPy:
return tuple(map(int, s.strip().replace("rc", ".").split(".")))
def __init__(self):
import sys
import setuptools
self.vpy = tuple(sys.version_info)[[:3]]
def __eq__(self, s):
return self.vpy == self.vtup(s)
Expand Down
1 change: 1 addition & 0 deletions scripts/install-deps-deb.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ apt install \
python3-dev \
python3-cffi \
python3-ply \
python3-setuptools \
python3-yaml \
python3-sphinx \
aspell \
Expand Down
1 change: 1 addition & 0 deletions scripts/install-deps-rpm.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ yum install \
python36-ply \
python36-yaml \
python3-sphinx \
python3-setuptools \
aspell \
aspell-en \
time \
Expand Down
1 change: 1 addition & 0 deletions src/test/docker/alpine/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ RUN apk add \
py3-yaml \
py3-jsonschema \
py3-ply \
py3-setuptools \
py3-sphinx \
lua5.1-dev \
lua5.1-posix \
Expand Down

0 comments on commit e287c87

Please sign in to comment.