[Python-modules-commits] [pythonmagick] 07/10: Add minimal python version for compiling

Bastien ROUCARIES broucaries-guest at moszumanska.debian.org
Sun Oct 30 22:47:47 UTC 2016


This is an automated email from the git hooks/post-receive script.

broucaries-guest pushed a commit to branch master
in repository pythonmagick.

commit 67c2b20cbb4ad9f7585425393b582294c04c3c19
Author: Bastien ROUCARIÈS <roucaries.bastien at gmail.com>
Date:   Sun Oct 30 23:17:53 2016 +0100

    Add minimal python version for compiling
    
    Will allow to compile python2 and python3 package
    
    Forwarded: yes, https://github.com/ImageMagick/PythonMagick/issues/6
---
 configure.ac | 12 +++++++++++-
 1 file changed, 11 insertions(+), 1 deletion(-)

diff --git a/configure.ac b/configure.ac
index 99278ef..94ee01f 100644
--- a/configure.ac
+++ b/configure.ac
@@ -27,14 +27,24 @@ AC_PROG_INSTALL
 AC_PROG_LN_S
 AC_PROG_MAKE_SET
 AC_PROG_LIBTOOL
-AM_PATH_PYTHON([2.4])
 PKG_PROG_PKG_CONFIG
 
 # Add configure option --enable-maintainer-mode which enables dependency
 # checking and generation useful to package maintainers.  This is made an
 # option to avoid confusing end users.
+
+AC_ARG_WITH([python-min-version],
+        [AS_HELP_STRING([--with-python-min-version=version : python version to use])],
+        [PYTHON_MIN_VERSION="$withval"],
+        [PYTHON_MIN_VERSION="2.4"])
 AM_MAINTAINER_MODE
 
+AX_COMPARE_VERSION($PYTHON_MIN_VERSION, lt, 2.4,AC_MSG_ERROR([Python version not supported]))
+AC_MSG_CHECKING([for python with minimal version])
+AC_MSG_RESULT([$PYTHON_MIN_VERSION])
+AM_PATH_PYTHON([$PYTHON_MIN_VERSION])
+AX_PYTHON_DEVEL([>= '$PYTHON_MIN_VERSION'])
+
 # Checks for libraries.
 AX_BOOST_BASE
 AX_BOOST_PYTHON

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/python-modules/packages/pythonmagick.git



More information about the Python-modules-commits mailing list