mirror of
https://github.com/ElvishArtisan/rivendell.git
synced 2025-11-29 16:50:13 +01:00
2021-12-23 Fred Gleason <fredg@paravelsystems.com>
* Added an 'AR_PYTHON_MODULE()' autoconf macro. * Added a test for the PyPI module build chain to 'configure.ac'. * Bumped the minimum Python version dependency from 3.4 to 3.6. Signed-off-by: Fred Gleason <fredg@paravelsystems.com>
This commit is contained in:
34
acinclude.m4
34
acinclude.m4
@@ -2,7 +2,7 @@
|
||||
#
|
||||
# Local Autoconf macro definitions
|
||||
#
|
||||
# (C) Copyright 2006-2019 Fred Gleason <fredg@paravelsystems.com>
|
||||
# (C) Copyright 2006-2021 Fred Gleason <fredg@paravelsystems.com>
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License version 2 as
|
||||
@@ -63,6 +63,38 @@ AC_DEFUN([AR_GET_DISTRO],[]
|
||||
]
|
||||
)
|
||||
|
||||
#
|
||||
# AR_PYTHON_MODULE(modname,[ACTION-IF-DETECTED],[ACTION-IF-NOT-DETECTED])
|
||||
#
|
||||
# Check for the existence of the {modname} python3 module.
|
||||
#
|
||||
# On successful detection, ACTION-IF-DETECTED is executed if present. If
|
||||
# the detection fails, then ACTION-IF-NOT-DETECTED is triggered.
|
||||
#
|
||||
# Based on code from the AX_PYTHON_MODULE() macro by Andrew Collier.
|
||||
#
|
||||
# Copyright (c) 2008 Andrew Collier
|
||||
#
|
||||
# Copying and distribution of this file, with or without modification, are
|
||||
# permitted in any medium without royalty provided the copyright notice
|
||||
# and this notice are preserved. This file is offered as-is, without any
|
||||
# warranty.
|
||||
#
|
||||
AC_DEFUN([AR_PYTHON_MODULE],[
|
||||
PYTHON="python3"
|
||||
PYTHON_NAME=`basename $PYTHON`
|
||||
AC_MSG_CHECKING($PYTHON_NAME module: $1)
|
||||
$PYTHON -c "import $1" 2>/dev/null
|
||||
if test $? -eq 0;
|
||||
then
|
||||
AC_MSG_RESULT(yes)
|
||||
$2
|
||||
else
|
||||
AC_MSG_RESULT(no)
|
||||
$3
|
||||
fi
|
||||
])
|
||||
|
||||
# ===========================================================================
|
||||
# https://www.gnu.org/software/autoconf-archive/ax_count_cpus.html
|
||||
# ===========================================================================
|
||||
|
||||
Reference in New Issue
Block a user