Skip to content

Commit c1b2cbd

Browse files
committed
Add explicit test for Python >= v3.7 in configure
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 * Remove a test later in configure for Python >= v3.6 for generating the Fortran bindings * Since we will now always have Python >= v3.7, remove all the conditional logic for generating the Fortran bindings * Update several places in the docs to note that Open MPI now requires Python >= v3.7 to build * 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 c1b2cbd

File tree

12 files changed

+46
-28
lines changed

12 files changed

+46
-28
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: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,7 @@ 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"
@@ -85,7 +86,10 @@ AC_PROG_SED
8586

8687
AC_CHECK_PROG([PERL],[perl],[perl],[no])
8788
AS_IF([test "X$PERL" = "Xno"],
88-
[AC_MSG_ERROR(["Open MPI requires perl. Aborting"])])
89+
[AC_MSG_ERROR([Open MPI requires perl to build. Aborting.])])
90+
91+
AM_PATH_PYTHON([$python_min_version],[],
92+
[AC_MSG_ERROR([Open MPI requires Python >=$python_min_version to build. Aborting.])])
8993

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

154158
# Get shared library version numbers
155159

156-
. $srcdir/VERSION
157160
m4_ifdef([project_ompi],
158161
[AC_SUBST(libmpi_so_version)
159162
AC_SUBST(libmpi_mpifh_so_version)

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: 18 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -50,11 +50,25 @@ 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+
* Generating the Fortran bindings
57+
58+
* Generating Fortran constants and compiler-specific symbols
59+
60+
* Generating the "show help" messages
61+
62+
* Generating bindings in the MPI man pages (from the pympistandrd
63+
module)
64+
65+
* Building the Open MPI documentation and man pages
66+
67+
All of these are necessary are necessary when building from a Git
68+
clone. Most of these can be accomplished with core Python; only
69+
building the full Open MPI documentation and man pages requires
70+
additional packages (:ref:`see below
71+
<developers-requirements-sphinx-label>`).
5872

5973
Perl
6074
----

docs/installing-open-mpi/quickstart.rst

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,8 @@ 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 uses both Perl and Python >= |python_min_version|
66+
as part of its build process. Typical installs can be of the pattern:
6667

6768
.. code-block:: sh
6869

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

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,15 @@ Open MPI to compile and run properly. The biggest obstacle is
2323
typically the assembly language, but that's fairly modular and we're
2424
happy to provide information about how to port it to new platforms.
2525

26+
Open MPI uses both Perl and Python >= |python_min_version| while
27+
building. You will need to have both of these available to build Open
28+
MPI from a source tarball.
29+
30+
.. note:: The Open MPI community is slowly converting its Perl scripts
31+
to Python; it is expected (hoped) that we'll someday have no
32+
more Perl in the build process for official distribution
33+
tarballs or Git clones.
34+
2635
It should be noted that we are quite open to accepting patches for
2736
operating systems that we do not currently support. If we do not have
2837
systems to test these on, we probably will only claim to

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

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,5 +9,12 @@ 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.
14+
15+
- Open MPI has always required Perl to build; our Perl scripts are
16+
slowly being converted to Python.
17+
1218
- Removed ROMIO package.
19+
1320
- Added MPI-4.1 ``MPI_Status_*`` functions.

ompi/mpi/c/Makefile.am

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -539,7 +539,7 @@ libmpi_c_noprofile_la_SOURCES = $(interface_profile_sources)
539539
libmpi_c_noprofile_la_CPPFLAGS = -DOMPI_BUILD_MPI_PROFILING=0
540540

541541
# ABI generation rules
542-
if OMPI_GENERATE_BINDINGS
542+
543543
%_generated.c: %.c.in
544544
$(OMPI_V_GEN) $(PYTHON) $(top_srcdir)/ompi/mpi/bindings/bindings.py \
545545
--builddir $(abs_top_builddir) \
@@ -550,6 +550,5 @@ if OMPI_GENERATE_BINDINGS
550550
ompi \
551551
$<
552552

553-
endif
554553
# Delete generated files on maintainer-clean
555554
MAINTAINERCLEANFILES = *_generated.c

ompi/mpi/fortran/use-mpi-f08/Makefile.am

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -431,8 +431,6 @@ lib@OMPI_LIBMPI_NAME@_usempif08_profile_la_FCFLAGS = \
431431
# *.in template.
432432
#
433433

434-
if OMPI_GENERATE_BINDINGS
435-
436434
include Makefile.prototype_files
437435
template_files =${prototype_files:%=$(abs_top_srcdir)/ompi/mpi/fortran/use-mpi-f08/%}
438436

@@ -453,8 +451,6 @@ api_f08_generated.F90: $(template_files)
453451

454452
EXTRA_DIST = $(prototype_files)
455453

456-
endif
457-
458454
# Delete generated file on maintainer-clean
459455
MAINTAINERCLEANFILES = api_f08_generated.F90
460456

0 commit comments

Comments
 (0)