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:
Fred Gleason
2021-12-23 11:31:11 -05:00
parent c1d95b01a9
commit 77fd2a2497
5 changed files with 63 additions and 3 deletions

View File

@@ -22836,3 +22836,7 @@
2021-12-23 Fred Gleason <fredg@paravelsystems.com> 2021-12-23 Fred Gleason <fredg@paravelsystems.com>
* Refactored the build of the 'python3-rivwebpyapi' deb package * Refactored the build of the 'python3-rivwebpyapi' deb package
so as to include proper PyPI package metadata. so as to include proper PyPI package metadata.
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.

View File

@@ -50,7 +50,7 @@ OggVorbis - Open Source Audio Coding Library. Needed for OggVorbis
importing and exporting. Included with most distros, or available at: importing and exporting. Included with most distros, or available at:
http://www.xiph.org/. http://www.xiph.org/.
Python, v3.4 or later Python, v3.6 or later
Open source scripting language. Included with most distros, or available at: Open source scripting language. Included with most distros, or available at:
https://www.python.org/. https://www.python.org/.
@@ -127,6 +127,9 @@ Available at http://www.underbit.com/products/mad/.
TwoLAME - MPEG Layer 2 Encoder Library. Needed for MPEG Layer 2 exporting and TwoLAME - MPEG Layer 2 Encoder Library. Needed for MPEG Layer 2 exporting and
capture. Available at http://www.twolame.org/. capture. Available at http://www.twolame.org/.
Python3 'build' and 'twine' modules. Needed to build DEB packages using
the 'make deb' target. Available from the Python Packaging Index (PyPI).
DOCUMENTATION DOCUMENTATION
------------- -------------

View File

@@ -2,7 +2,7 @@
# #
# Local Autoconf macro definitions # 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 # 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 # 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 # https://www.gnu.org/software/autoconf-archive/ax_count_cpus.html
# =========================================================================== # ===========================================================================

View File

@@ -23,7 +23,7 @@
SUBDIRS = api\ SUBDIRS = api\
tests tests
all: pypi all: @PYPI@
pypi: pypi:
rm -rf pypi rm -rf pypi

View File

@@ -340,6 +340,22 @@ else
AC_ARG_VAR(pyexecdir,[the Python extension modules directory]) AC_ARG_VAR(pyexecdir,[the Python extension modules directory])
fi fi
#
# Check for PyPI Module Build Chain
#
AR_PYTHON_MODULE([build],[BUILD_FOUND=yes],[])
AR_PYTHON_MODULE([twine],[TWINE_FOUND=yes],[])
if test $BUILD_FOUND ; then
if test $TWINE_FOUND ; then
PYPI_FOUND=yes
AC_SUBST(PYPI,pypi)
else
AC_SUBST(PYPI,"")
fi
else
AC_SUBST(PYPI,"")
fi
# #
# Check for FLAC # Check for FLAC
# #
@@ -718,6 +734,11 @@ AC_MSG_NOTICE("| Update I18N Data ... Yes |")
else else
AC_MSG_NOTICE("| Update I18N Data ... No |") AC_MSG_NOTICE("| Update I18N Data ... No |")
fi fi
if test $PYPI_FOUND ; then
AC_MSG_NOTICE("| PyPI Module Build Chain Detected ... Yes |")
else
AC_MSG_NOTICE("| PyPI Module Build Chain Detected ... No |")
fi
AC_MSG_NOTICE("| |") AC_MSG_NOTICE("| |")
AC_MSG_NOTICE("| Configured Audio Drivers: |") AC_MSG_NOTICE("| Configured Audio Drivers: |")
if test -z $USING_ALSA ; then if test -z $USING_ALSA ; then