mirror of
git://sourceware.org/git/libabigail.git
synced 2024-12-13 21:44:52 +00:00
57dcfb18f5
fedabipkgdiff is a convenient way to compare the ABI of Fedora packages easily. The first version of fedabipkgdiff introduced by this patch lets users perform operations like: fedabipkgdiff --from fc23 foo-0.1-1.fc23.x86_64.rpm fedabipkgdiff --from fc23 --to fc24 foo fedabipkgdiff foo-0.1-1.fc23 foo-0.1-1.fc24 fedabipkgdiff foo-0.1-1.fc23.i686 foo-0.1-1.fc24.i686 fedabipkgdiff --all-subpackages foo-0.1-1.fc23 foo-0.1-1.fc24 * autoconf-archive/ax_compare_version.m4: New file copied from the autoconf-archive project. * autoconf-archive/ax_prog_python_version.m4: Likewise. * autoconf-archive/ax_python_module.m4: Likewise. * Makefile.am: Add the new files above to the source distribution. * configure.ac: Include the new m4 macros from the autoconf archive. Add a new --enable-fedabipkgdiff option. Update the report at the end of the configure process to show the status of the fedabipkgdiff feature. Add check for prerequisite python modules argparse, glob, logging, os, re, shlex, subprocess, sys, itertools, urlparse, itertools, shutil, unittest, xdg, koji and mock. These are necessary for the unit test of fedabipkgdiff. Generate tests/runtestfedabipkgdiff.py into the build directory, from the tests/runtestfedabipkgdiff.py.in input file. * tools/Makefile.am: Include the fedabipkgdiff to the source distribution and install it if the "fedabipkgdiff" feature is enabled. * tests/Makefile.am: Rename runtestfedabipkgdiff.sh into runtestfedabipkgdiff.py. Add the new runtestfedabipkgdiff.py.in autoconf template file in here. * tests/runtestfedabipkgdiff.py.in: New unit test file. * tools/fedabipkgdiff: New fedabipkgdiff tool. * doc/manuals/fedabipkgdiff.rst: New manual. Signed-off-by: Chenxiong Qi <cqi@redhat.com> Signed-off-by: Dodji Seketeli <dodji@redhat.com>
67 lines
2.1 KiB
Plaintext
67 lines
2.1 KiB
Plaintext
# ===========================================================================
|
|
# http://www.gnu.org/software/autoconf-archive/ax_prog_python_version.html
|
|
# ===========================================================================
|
|
#
|
|
# SYNOPSIS
|
|
#
|
|
# AX_PROG_PYTHON_VERSION([VERSION],[ACTION-IF-TRUE],[ACTION-IF-FALSE])
|
|
#
|
|
# DESCRIPTION
|
|
#
|
|
# Makes sure that python supports the version indicated. If true the shell
|
|
# commands in ACTION-IF-TRUE are executed. If not the shell commands in
|
|
# ACTION-IF-FALSE are run. Note if $PYTHON is not set (for example by
|
|
# running AC_CHECK_PROG or AC_PATH_PROG) the macro will fail.
|
|
#
|
|
# Example:
|
|
#
|
|
# AC_PATH_PROG([PYTHON],[python])
|
|
# AX_PROG_PYTHON_VERSION([2.4.4],[ ... ],[ ... ])
|
|
#
|
|
# This will check to make sure that the python you have supports at least
|
|
# version 2.4.4.
|
|
#
|
|
# NOTE: This macro uses the $PYTHON variable to perform the check.
|
|
# AX_WITH_PYTHON can be used to set that variable prior to running this
|
|
# macro. The $PYTHON_VERSION variable will be valorized with the detected
|
|
# version.
|
|
#
|
|
# LICENSE
|
|
#
|
|
# Copyright (c) 2009 Francesco Salvestrini <salvestrini@users.sourceforge.net>
|
|
#
|
|
# 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.
|
|
|
|
#serial 11
|
|
|
|
AC_DEFUN([AX_PROG_PYTHON_VERSION],[
|
|
AC_REQUIRE([AC_PROG_SED])
|
|
AC_REQUIRE([AC_PROG_GREP])
|
|
|
|
AS_IF([test -n "$PYTHON"],[
|
|
ax_python_version="$1"
|
|
|
|
AC_MSG_CHECKING([for python version])
|
|
changequote(<<,>>)
|
|
python_version=`$PYTHON -V 2>&1 | $GREP "^Python " | $SED -e 's/^.* \([0-9]*\.[0-9]*\.[0-9]*\)/\1/'`
|
|
changequote([,])
|
|
AC_MSG_RESULT($python_version)
|
|
|
|
AC_SUBST([PYTHON_VERSION],[$python_version])
|
|
|
|
AX_COMPARE_VERSION([$ax_python_version],[le],[$python_version],[
|
|
:
|
|
$2
|
|
],[
|
|
:
|
|
$3
|
|
])
|
|
],[
|
|
AC_MSG_WARN([could not find the python interpreter])
|
|
$3
|
|
])
|
|
])
|