From c7e07965b4cca95d47265d99b7261b6cb74c22a4 Mon Sep 17 00:00:00 2001 From: Jürgen Knödlseder Date: Fri, 4 Sep 2020 15:06:49 +0200 Subject: [PATCH] Add Python include path in search for Python.h (#3329) --- ChangeLog | 3 ++- NEWS | 6 +++++- README.md | 2 +- configure.ac | 8 +++++++- doc/source/admin/release_history/1.7.1.rst | 6 ++++-- 5 files changed, 19 insertions(+), 6 deletions(-) diff --git a/ChangeLog b/ChangeLog index 267d868..8a5bdeb 100644 --- a/ChangeLog +++ b/ChangeLog @@ -4,11 +4,12 @@ ======================== -2020-08-21 +2020-09-04 * Bug fix version 1.7.1 released ================================ + Add Python include path in search for Python.h (#3329) Test for Big Sur in configuration step (#3326) Copy Python modules into pyext/gammalib folder (#3322) Write units of response cubes into FITS files (#3321) diff --git a/NEWS b/NEWS index dcc0919..8c852fe 100644 --- a/NEWS +++ b/NEWS @@ -1,6 +1,6 @@ New Features and Important Changes in GammaLib 1.7.1 -20 August 2020 +4 September 2020 1. Introduction @@ -38,6 +38,10 @@ The return value of the following methods has been changed: 3. Configuration ----------------- +The Python include path was added in the Python.h header check in configure.ac +since due to a bug introduced in Python 3.8 the cpython/initconfig.h header was +not found (#3329). + The configuration now checks for Big Sur and later so that the path names in the Python modules are adapted as needed (#3326). diff --git a/README.md b/README.md index 926dcef..a257041 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ GammaLib information ==================== -* Version: 1.7.1 (20 August 2020) +* Version: 1.7.1 (4 September 2020) [![Build Status](https://cta-jenkins.irap.omp.eu/buildStatus/icon?job=gammalib-integrate-os)](https://cta-jenkins.irap.omp.eu/job/gammalib-integrate-os/) diff --git a/configure.ac b/configure.ac index f3fd1dc..50c0fc3 100644 --- a/configure.ac +++ b/configure.ac @@ -921,7 +921,10 @@ else python_path=`$PYTHON -c "import distutils.sysconfig; \ print(distutils.sysconfig.get_python_inc());"` if test -n "${python_path}"; then - AC_CHECK_HEADERS($python_path/Python.h, [has_python_h="yes"], [has_python_h="no"]) + SAVED_CPPFLAGS="$CPPFLAGS" + CPPFLAGS="$CPPFLAGS -I$python_path" + AC_CHECK_HEADERS($python_path/Python.h, [has_python_h="yes"], [has_python_h="no"]) + CPPFLAGS=$SAVED_CPPFLAGS python_path="-I$python_path" fi PYTHON_CPPFLAGS=$python_path @@ -963,7 +966,10 @@ else PY_INCLUDE="$PY_INCLUDE$PYTHON_VERSION" # Check if we have Python.h + SAVED_CPPFLAGS="$CPPFLAGS" + CPPFLAGS="$CPPFLAGS -I$PY_INCLUDE" AC_CHECK_HEADERS($PY_INCLUDE/Python.h, [has_python_h="yes"], [has_python_h="no"]) + CPPFLAGS=$SAVED_CPPFLAGS fi diff --git a/doc/source/admin/release_history/1.7.1.rst b/doc/source/admin/release_history/1.7.1.rst index 07910fa..05ca430 100644 --- a/doc/source/admin/release_history/1.7.1.rst +++ b/doc/source/admin/release_history/1.7.1.rst @@ -1,7 +1,7 @@ .. _1.7.1: -GammaLib 1.7.1 release (21 August 2020) -======================================= +GammaLib 1.7.1 release (4 September 2020) +========================================= Overview -------- @@ -10,6 +10,8 @@ GammaLib 1.7.1 is a bug fix release for GammaLib release 1.7. The following bugs were fixed: +* [`3329 `_] - + Add Python include path in search for ``Python.h`` * [`3326 `_] - Test for Big Sur in configuration step * [`3322 `_] - -- libgit2 0.21.4