Skip to content

Commit 5b8fdfe

Browse files
committed
configure.ac: Add explicit test for Python >= v3.7
Open MPI's Python scripts have been tested with v3.6 and work, but the pympistandard module requires Python >= v3.7. Hence, the minimum Python version required is v3.7. * Add an explicit test to early in configure.ac for Python >= v3.7 if: * We're building the Fortran MPI bindings * We're in a Git clone * Remove a test later in configure for Python >= v3.6 for generating the Fortran bindings * Update several places in the docs to note that Open MPI now requires Python >= v3.7 to build in certain conditions * Maintain the minimum required Python version in VERSION (along with other external dependency minimum versions) Signed-off-by: Jeff Squyres <[email protected]>
1 parent fcdc735 commit 5b8fdfe

File tree

8 files changed

+75
-23
lines changed

8 files changed

+75
-23
lines changed

VERSION

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ automake_min_version=1.13.4
3333
autoconf_min_version=2.69.0
3434
libtool_min_version=2.4.2
3535
flex_min_version=2.5.4
36+
python_min_version=3.7
3637

3738
# greek is generally used for alpha or beta release tags. If it is
3839
# non-empty, it will be appended to the version number. It does not

config/ompi_configure_options.m4

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -252,13 +252,4 @@ else
252252
ompi_want_ompio=1
253253
fi
254254
AM_CONDITIONAL(OMPI_OMPIO_SUPPORT, test "$ompi_want_ompio" = "1")
255-
256-
# If the binding source files don't exist, then we need Python to generate them
257-
AM_PATH_PYTHON([3.6],,[:])
258-
binding_file="${srcdir}/ompi/mpi/c/ompi_send.c"
259-
AS_IF([! test -e "$binding_file" && test "$PYTHON" = ":"],
260-
[AC_MSG_ERROR([Open MPI requires Python >=3.6 for generating the bindings. Aborting])])
261-
AM_CONDITIONAL(OMPI_GENERATE_BINDINGS,[test "$PYTHON" != ":"])
262-
263255
])dnl
264-

configure.ac

Lines changed: 27 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -77,15 +77,41 @@ OPAL_MAKEDIST_DISABLE=""
7777
# Start it up
7878
#
7979

80+
. $srcdir/VERSION
8081
OPAL_CONFIGURE_SETUP
8182
opal_show_title "Configuring project_name_long"
8283
opal_show_subtitle "Prerequisites"
8384

85+
OMPI_TOP_BUILDDIR="`pwd`"
86+
AC_SUBST(OMPI_TOP_BUILDDIR)
87+
cd "$srcdir"
88+
OMPI_TOP_SRCDIR="`pwd`"
89+
AC_SUBST(OMPI_TOP_SRCDIR)
90+
cd "$OMPI_TOP_BUILDDIR"
91+
8492
AC_PROG_SED
8593

8694
AC_CHECK_PROG([PERL],[perl],[perl],[no])
8795
AS_IF([test "X$PERL" = "Xno"],
88-
[AC_MSG_ERROR(["Open MPI requires perl. Aborting"])])
96+
[AC_MSG_ERROR([Open MPI requires perl to build. Aborting.])])
97+
98+
# We need Python if any of these are true:
99+
# - you're building the MPI Fortran bindings
100+
# - you're in a git clone (i.e., not a distribution tarball that has
101+
# already been bootstrapped)
102+
AC_MSG_CHECKING([if we need Python])
103+
need_python=no
104+
AS_IF([test "$enable_mpi_fortran" = "yes"],[need_python=yes])
105+
106+
AS_IF([test -d "${OMPI_TOP_SRCDIR}/.git"], [need_python=yes])
107+
AC_MSG_RESULT([$need_python])
108+
have_good_python=0
109+
AS_IF([test "$need_python" = "yes"],
110+
[AM_PATH_PYTHON([$python_min_version],
111+
[have_good_python=1],
112+
[AC_MSG_ERROR([Open MPI requires Python >=$python_min_version to build. Aborting.])])
113+
])
114+
AM_CONDITIONAL(OMPI_GENERATE_BINDINGS, [test $have_good_python -eq 1])
89115

90116
#
91117
# Setup some things that must be done before AM-INIT-AUTOMAKE
@@ -153,7 +179,6 @@ OPAL_SAVE_VERSION([OPAL], [Open Portable Access Layer], [$srcdir/VERSION],
153179

154180
# Get shared library version numbers
155181

156-
. $srcdir/VERSION
157182
m4_ifdef([project_ompi],
158183
[AC_SUBST(libmpi_so_version)
159184
AC_SUBST(libmpi_mpifh_so_version)
@@ -206,13 +231,6 @@ m4_ifdef([project_oshmem],
206231

207232
opal_show_subtitle "Initialization, setup"
208233

209-
OMPI_TOP_BUILDDIR="`pwd`"
210-
AC_SUBST(OMPI_TOP_BUILDDIR)
211-
cd "$srcdir"
212-
OMPI_TOP_SRCDIR="`pwd`"
213-
AC_SUBST(OMPI_TOP_SRCDIR)
214-
cd "$OMPI_TOP_BUILDDIR"
215-
216234
AC_MSG_NOTICE([builddir: $OMPI_TOP_BUILDDIR])
217235
AC_MSG_NOTICE([srcdir: $OMPI_TOP_SRCDIR])
218236
if test "$OMPI_TOP_BUILDDIR" != "$OMPI_TOP_SRCDIR"; then

docs/conf.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,7 @@ def get_tarball_version(path, expr):
101101
autoconf_min_version = f"{ompi_data['autoconf_min_version']}"
102102
libtool_min_version = f"{ompi_data['libtool_min_version']}"
103103
flex_min_version = f"{ompi_data['flex_min_version']}"
104+
python_min_version = f"{ompi_data['python_min_version']}"
104105
mpi_standard_major_version = f"{ompi_data['mpi_standard_version']}"
105106
mpi_standard_minor_version = f"{ompi_data['mpi_standard_subversion']}"
106107

@@ -304,6 +305,7 @@ def _doit(topdir):
304305
.. |autoconf_min_version| replace:: {autoconf_min_version}
305306
.. |libtool_min_version| replace:: {libtool_min_version}
306307
.. |flex_min_version| replace:: {flex_min_version}
308+
.. |python_min_version| replace:: {python_min_version}
307309
.. |mpi_standard_version| replace:: {mpi_standard_major_version}.{mpi_standard_minor_version}
308310
.. |mpi_standard_major_version| replace:: {mpi_standard_major_version}
309311
.. |mpi_standard_minor_version| replace:: {mpi_standard_minor_version}

docs/developers/prerequisites.rst

Lines changed: 22 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -50,11 +50,29 @@ more detail.
5050
Python
5151
------
5252

53-
Python >= v3.6 is required for generating the Fortran bindings, which
54-
is necessary if you build Open MPI from a Git clone.
53+
Python >= |python_min_version| is required for several tasks during
54+
the Open MPI build, such as (but not limited to):
5555

56-
Python is also required for running Sphinx to generate the docs, too
57-
(:ref:`see below <developers-requirements-sphinx-label>`).
56+
* In all cases (including from distribution tarballs):
57+
58+
* Generating Fortran constants and compiler-specific symbols
59+
60+
* When building from a Git clone:
61+
62+
* Generating the Fortran bindings
63+
64+
* Generating the "show help" messages
65+
66+
* Generating bindings in the MPI man pages (via the `pympistandard
67+
module <https://github.com/mpi-forum/pympistandard/>`_) module)
68+
69+
* Building the Open MPI documentation and man pages
70+
71+
All of these are necessary are necessary when building from a Git
72+
clone. Most of these can be accomplished with core Python; only
73+
building the full Open MPI documentation and man pages requires
74+
additional packages (:ref:`see below
75+
<developers-requirements-sphinx-label>`).
5876

5977
Perl
6078
----

docs/installing-open-mpi/quickstart.rst

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,9 @@ Download the Open MPI source code from `the main Open MPI web site
6262
They are **not** official Open MPI releases.
6363

6464
Open MPI uses a traditional ``configure`` script paired with ``make``
65-
to build. Typical installs can be of the pattern:
65+
to build. Open MPI requires Perl, and may require Python >=
66+
|python_min_version|, as part of its build process. Typical installs
67+
can be of the pattern:
6668

6769
.. code-block:: sh
6870

docs/installing-open-mpi/supported-systems.rst

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,18 @@ operating systems that we do not currently support. If we do not have
2828
systems to test these on, we probably will only claim to
2929
"unofficially" support those systems.
3030

31+
Perl and Python
32+
^^^^^^^^^^^^^^^
33+
34+
Open MPI requires Perl while building. If you are building the
35+
Fortran MPI bindings, or if you are building from a Git clone, Open
36+
MPI also requires Python >= |python_min_version| while building.
37+
38+
.. note:: The Open MPI community is slowly converting its Perl scripts
39+
to Python; it is expected (hoped) that we'll someday have no
40+
more Perl in the build process for official distribution
41+
tarballs or Git clones.
42+
3143
Supported Hardware Platforms
3244
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
3345

docs/release-notes/changelog/v6.0.x.rst

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,5 +9,13 @@ Open MPI version v6.0.0
99
:Date: ...fill me in...
1010

1111
- Open MPI now requires a C11-compliant compiler to build.
12+
13+
- Open MPI now requires Python >= |python_min_version| to build the
14+
Fortran MPI bindings (or when building from a Git clone).
15+
16+
- Open MPI has always required Perl to build; our Perl scripts are
17+
slowly being converted to Python.
18+
1219
- Removed ROMIO package.
20+
1321
- Added MPI-4.1 ``MPI_Status_*`` functions.

0 commit comments

Comments
 (0)