diff --git a/ChangeLog b/ChangeLog index 25ace3ea..83d08a7b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,6 +1,38 @@ commit unknown Author: Thibaut Paumard -Date: Tue Oct 23 16:47:04 2019 +0200 +Date: Tue Oct 25 15:15:04 2019 +0200 + + Releasing 1.4.2 + +commit ea20fb536aae58f008a282feaa12868e72ce78d9 +Author: Thibaut Paumard +Date: Fri Oct 25 14:33:14 2019 +0200 + + plugins/python: support Python 3.8 + + With Python 3.8, modules are no longer link with libpython by default. Therefore + codes that are meant for embedding Python must pass --embed to python-configure + in order to get the complete set of flags to do so. + +commit d9fe7496b7172f28c22760627ff201ab5595c9e1 +Author: Thibaut Paumard +Date: Thu Oct 24 12:29:08 2019 +0200 + + EquatorialHotSpot: fix "==" that was meant to be "=" + + In XML backward compatibility code. + +commit 557f90287d0c4225f960ba035409ab7a85b8d01b +Author: Thibaut Paumard +Date: Thu Oct 24 12:26:10 2019 +0200 + + GridData2D: explicitly convert size_t to long + + Implicit narrowing conversion is an error for some compilers. + +commit 9f912f8233fc1cc42c05bd4338eec2fd8085a5fa +Author: Thibaut Paumard +Date: Wed Oct 23 16:48:04 2019 +0200 Releasing 1.4.1 diff --git a/NEWS b/NEWS index 26e6bc1b..a6658c8d 100644 --- a/NEWS +++ b/NEWS @@ -1,3 +1,8 @@ +1.4.2 2019/10/25 BUG + * plugins/python: support Python 3.8 + * Astrobj::EquatorialHotSpot: fix XML compatibility code + * GridData2D: make one conversion explicit to please clang + 1.4.1 2019/10/23 BUG * MPI: fix computation of number of quantities to evaluate * check suite: use all files in doc/examples diff --git a/configure b/configure index 64b56846..101b5afd 100755 --- a/configure +++ b/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69 for Gyoto 1.4.1. +# Generated by GNU Autoconf 2.69 for Gyoto 1.4.2. # # Report bugs to . # @@ -590,8 +590,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='Gyoto' PACKAGE_TARNAME='gyoto' -PACKAGE_VERSION='1.4.1' -PACKAGE_STRING='Gyoto 1.4.1' +PACKAGE_VERSION='1.4.2' +PACKAGE_STRING='Gyoto 1.4.2' PACKAGE_BUGREPORT='gyoto@sympa.obspm.fr' PACKAGE_URL='' @@ -1488,7 +1488,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures Gyoto 1.4.1 to adapt to many kinds of systems. +\`configure' configures Gyoto 1.4.2 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1560,7 +1560,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of Gyoto 1.4.1:";; + short | recursive ) echo "Configuration of Gyoto 1.4.2:";; esac cat <<\_ACEOF @@ -1809,7 +1809,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -Gyoto configure 1.4.1 +Gyoto configure 1.4.2 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. @@ -2508,7 +2508,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by Gyoto $as_me 1.4.1, which was +It was created by Gyoto $as_me 1.4.2, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -3484,7 +3484,7 @@ fi # Define the identity of the package. PACKAGE='gyoto' - VERSION='1.4.1' + VERSION='1.4.2' cat >>confdefs.h <<_ACEOF @@ -15742,7 +15742,7 @@ ac_config_headers="$ac_config_headers config.h include/GyotoConfig.h" # C: current; R: revision; A: age # Linux library name is: libgyoto.so.(C-A).A.R VERSINFO_C=8 -VERSINFO_R=0 +VERSINFO_R=1 VERSINFO_A=0 VERSINFO=${VERSINFO_C}:${VERSINFO_R}:${VERSINFO_A} @@ -16087,6 +16087,11 @@ $as_echo "no" >&6; } fi +if test "x" = "xyes" && $PYTHON_CONFIGURE --embed; then : + PYTHON_EMBED_FLAG="--embed" +else + PYTHON_EMBED_FLAG="" +fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Python includes" >&5 $as_echo_n "checking for Python includes... " >&6; } @@ -16094,7 +16099,7 @@ if ${pc_cv_python_includes+:} false; then : $as_echo_n "(cached) " >&6 else if test -x "$PYTHON_CONFIG"; then - pc_cv_python_includes=`$PYTHON_CONFIG --includes 2>&5` + pc_cv_python_includes=`$PYTHON_CONFIG $PYTHON_EMBED_FLAG --includes 2>&5` else pc_cv_python_includes="-I$includedir/$_PYTHON_BASENAME" fi @@ -16112,7 +16117,7 @@ if ${pc_cv_python_prefix+:} false; then : $as_echo_n "(cached) " >&6 else if test -x "$PYTHON_CONFIG"; then - pc_cv_python_prefix=`$PYTHON_CONFIG --prefix 2>&5` + pc_cv_python_prefix=`$PYTHON_CONFIG $PYTHON_EMBED_FLAG --prefix 2>&5` else ac_ext=py ac_compile='chmod +x conftest.$ac_ext >&5' @@ -16158,7 +16163,7 @@ if ${pc_cv_python_exec_prefix+:} false; then : $as_echo_n "(cached) " >&6 else if test -x "$PYTHON_CONFIG"; then - pc_cv_python_exec_prefix=`$PYTHON_CONFIG --exec-prefix 2>&5` + pc_cv_python_exec_prefix=`$PYTHON_CONFIG $PYTHON_EMBED_FLAG --exec-prefix 2>&5` else ac_ext=py ac_compile='chmod +x conftest.$ac_ext >&5' @@ -16210,7 +16215,7 @@ if ${pc_cv_python_includes+:} false; then : $as_echo_n "(cached) " >&6 else if test -x "$PYTHON_CONFIG"; then - pc_cv_python_includes=`$PYTHON_CONFIG --includes 2>&5` + pc_cv_python_includes=`$PYTHON_CONFIG $PYTHON_EMBED_FLAG --includes 2>&5` else pc_cv_python_includes="-I$includedir/$_PYTHON_BASENAME" fi @@ -16226,7 +16231,7 @@ if ${pc_cv_python_cflags+:} false; then : $as_echo_n "(cached) " >&6 else if test -x "$PYTHON_CONFIG"; then - pc_cv_python_cflags=`$PYTHON_CONFIG --cflags 2>&5` + pc_cv_python_cflags=`$PYTHON_CONFIG $PYTHON_EMBED_FLAG --cflags 2>&5` else pc_cv_python_cflags= fi @@ -16242,7 +16247,7 @@ if ${pc_cv_python_ldflags+:} false; then : $as_echo_n "(cached) " >&6 else if test -x "$PYTHON_CONFIG"; then - pc_cv_python_ldflags=`$PYTHON_CONFIG --ldflags 2>&5` + pc_cv_python_ldflags=`$PYTHON_CONFIG $PYTHON_EMBED_FLAG --ldflags 2>&5` else pc_cv_python_ldflags= fi @@ -16258,7 +16263,7 @@ if ${pc_cv_python_libs+:} false; then : $as_echo_n "(cached) " >&6 else if test -x "$PYTHON_CONFIG"; then - pc_cv_python_libs=`$PYTHON_CONFIG --libs 2>&5` + pc_cv_python_libs=`$PYTHON_CONFIG $PYTHON_EMBED_FLAG --libs 2>&5` else pc_cv_python_libs="-l$_PYTHON_BASENAME" fi @@ -16424,7 +16429,7 @@ if ${pc_cv_python_extension_suffix+:} false; then : $as_echo_n "(cached) " >&6 else if test -x "$PYTHON_CONFIG"; then - pc_cv_python_extension_suffix=`$PYTHON_CONFIG --extension-suffix 2>&5` + pc_cv_python_extension_suffix=`$PYTHON_CONFIG $PYTHON_EMBED_FLAG --extension-suffix 2>&5` else pc_cv_python_extension_suffix= fi @@ -21955,7 +21960,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by Gyoto $as_me 1.4.1, which was +This file was extended by Gyoto $as_me 1.4.2, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -22021,7 +22026,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -Gyoto config.status 1.4.1 +Gyoto config.status 1.4.2 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" diff --git a/configure.ac b/configure.ac index 57998000..b709416b 100644 --- a/configure.ac +++ b/configure.ac @@ -10,7 +10,7 @@ dnl without any warranty. AC_PREREQ([2.69]) -AC_INIT([Gyoto], [1.4.1], [gyoto@sympa.obspm.fr]) +AC_INIT([Gyoto], [1.4.2], [gyoto@sympa.obspm.fr]) gyoto_test_CXXFLAGS=${CXXFLAGS+set} gyoto_test_CPPFLAGS=${CPPFLAGS+set} AC_CANONICAL_SYSTEM @@ -27,7 +27,7 @@ AC_SUBST([VERBATIM], []) # C: current; R: revision; A: age # Linux library name is: libgyoto.so.(C-A).A.R VERSINFO_C=8 -VERSINFO_R=0 +VERSINFO_R=1 VERSINFO_A=0 VERSINFO=${VERSINFO_C}:${VERSINFO_R}:${VERSINFO_A} AC_SUBST([VERSINFO]) diff --git a/lib/EquatorialHotSpot.C b/lib/EquatorialHotSpot.C index 13a79f16..f6d0f7d1 100644 --- a/lib/EquatorialHotSpot.C +++ b/lib/EquatorialHotSpot.C @@ -78,7 +78,7 @@ int EquatorialHotSpot::setParameter(string name, string content, string unit) { double coord[8]; char* tc = const_cast(content.c_str()); if (name=="InitialCoordinate") { - name=="InitCoord"; + name="InitCoord"; return ThinDisk::setParameter(name, content, unit); } else if (name=="Position") { if (FactoryMessenger::parseArray(content, coord, 4) != 4) diff --git a/lib/GridData2D.C b/lib/GridData2D.C index 2f8d558e..f9d0f14e 100644 --- a/lib/GridData2D.C +++ b/lib/GridData2D.C @@ -214,7 +214,7 @@ void GridData2D::fitsWriteHDU(fitsfile* fptr, int status = 0; long fpixel [] = {1,1,1,1}; long ndim = length?4:3; - long naxes [] = {long(nr_),long(nphi_),long(nt_),length}; + long naxes [] = {long(nr_),long(nphi_),long(nt_),long(length)}; char ermsg[31] = ""; // ermsg is used in throwCfitsioError() char * CNULL = NULL; diff --git a/m4/python.m4 b/m4/python.m4 index 58aef433..345a2aaa 100644 --- a/m4/python.m4 +++ b/m4/python.m4 @@ -1,4 +1,5 @@ # Copyright 2012, 2013, 2014 Brandon Invergo +# Copyright 2019 Thibaut Paumard # # This file is part of pyconfigure. This program is free # software; you can redistribute it and/or modify it under the @@ -43,6 +44,7 @@ # # 4. Looking for specific libs & functionality +# 2019-10-25 Thibaut Paumard add support for --embed in Python >= 3.8 ## ----------------------- ## ## 1. Language selection. ## @@ -160,9 +162,10 @@ m4_ifval([$1], ])# PC_PROG_PYTHON -# PC_PYTHON_PROG_PYTHON_CONFIG(PROG-TO-CHECK-FOR) +# PC_PYTHON_PROG_PYTHON_CONFIG(PROG-TO-CHECK-FOR,EMBED) # ---------------------------------------------- # Find the python-config program +# Set EMBED to 'yes' if embedding Python. AC_DEFUN([PC_PYTHON_PROG_PYTHON_CONFIG], [AC_REQUIRE([PC_PROG_PYTHON])[]dnl AC_ARG_VAR([PYTHON_CONFIG], [the Python-config program]) @@ -172,6 +175,9 @@ m4_define([_PYTHON_BASENAME], [`basename $PYTHON`]) m4_ifval([$1], [AC_PATH_PROGS(PYTHON_CONFIG, [$1 _PYTHON_BASENAME-config])], [AC_PATH_PROG(PYTHON_CONFIG, _PYTHON_BASENAME-config)]) +AS_IF([test "x$2" = "xyes" && $PYTHON_CONFIGURE --embed], + [PYTHON_EMBED_FLAG="--embed"], + [PYTHON_EMBED_FLAG=""]) ]) # PC_PYTHON_PROG_PYTHON_CONFIG @@ -252,7 +258,7 @@ AC_DEFUN([PC_PYTHON_CHECK_PREFIX], dnl Try to get it with python-config otherwise do it from within Python AC_CACHE_CHECK([for Python prefix], [pc_cv_python_prefix], [if test -x "$PYTHON_CONFIG"; then - pc_cv_python_prefix=`$PYTHON_CONFIG --prefix 2>&AS_MESSAGE_LOG_FD` + pc_cv_python_prefix=`$PYTHON_CONFIG $PYTHON_EMBED_FLAG --prefix 2>&AS_MESSAGE_LOG_FD` else AC_LANG_PUSH(Python)[]dnl AC_LINK_IFELSE([AC_LANG_PROGRAM([dnl @@ -277,7 +283,7 @@ AC_DEFUN([PC_PYTHON_CHECK_EXEC_PREFIX], dnl Try to get it with python-config otherwise do it from within Python AC_CACHE_CHECK([for Python exec-prefix], [pc_cv_python_exec_prefix], [if test -x "$PYTHON_CONFIG"; then - pc_cv_python_exec_prefix=`$PYTHON_CONFIG --exec-prefix 2>&AS_MESSAGE_LOG_FD` + pc_cv_python_exec_prefix=`$PYTHON_CONFIG $PYTHON_EMBED_FLAG --exec-prefix 2>&AS_MESSAGE_LOG_FD` else AC_LANG_PUSH(Python)[]dnl AC_LINK_IFELSE([AC_LANG_PROGRAM([dnl @@ -305,7 +311,7 @@ AC_DEFUN([PC_PYTHON_CHECK_INCLUDES], dnl Try to find the headers location with python-config otherwise guess AC_CACHE_CHECK([for Python includes], [pc_cv_python_includes], [if test -x "$PYTHON_CONFIG"; then - pc_cv_python_includes=`$PYTHON_CONFIG --includes 2>&AS_MESSAGE_LOG_FD` + pc_cv_python_includes=`$PYTHON_CONFIG $PYTHON_EMBED_FLAG --includes 2>&AS_MESSAGE_LOG_FD` else pc_cv_python_includes="[-I$includedir/$_PYTHON_BASENAME]m4_ifdef(PYTHON_ABI_FLAGS, PYTHON_ABI_FLAGS,)" @@ -334,7 +340,7 @@ AC_DEFUN([PC_PYTHON_CHECK_LIBS], dnl Try to find the lib flags with python-config otherwise guess AC_CACHE_CHECK([for Python libs], [pc_cv_python_libs], [if test -x "$PYTHON_CONFIG"; then - pc_cv_python_libs=`$PYTHON_CONFIG --libs 2>&AS_MESSAGE_LOG_FD` + pc_cv_python_libs=`$PYTHON_CONFIG $PYTHON_EMBED_FLAG --libs 2>&AS_MESSAGE_LOG_FD` else pc_cv_python_libs="[-l$_PYTHON_BASENAME]m4_ifdef(PYTHON_ABI_FLAGS, PYTHON_ABI_FLAGS,)" fi @@ -368,7 +374,7 @@ AC_DEFUN([PC_PYTHON_CHECK_CFLAGS], dnl Try to find the CFLAGS with python-config otherwise give up AC_CACHE_CHECK([for Python CFLAGS], [pc_cv_python_cflags], [if test -x "$PYTHON_CONFIG"; then - pc_cv_python_cflags=`$PYTHON_CONFIG --cflags 2>&AS_MESSAGE_LOG_FD` + pc_cv_python_cflags=`$PYTHON_CONFIG $PYTHON_EMBED_FLAG --cflags 2>&AS_MESSAGE_LOG_FD` else pc_cv_python_cflags= fi @@ -384,7 +390,7 @@ AC_DEFUN([PC_PYTHON_CHECK_LDFLAGS], dnl Try to find the LDFLAGS with python-config otherwise give up AC_CACHE_CHECK([for Python LDFLAGS], [pc_cv_python_ldflags], [if test -x "$PYTHON_CONFIG"; then - pc_cv_python_ldflags=`$PYTHON_CONFIG --ldflags 2>&AS_MESSAGE_LOG_FD` + pc_cv_python_ldflags=`$PYTHON_CONFIG $PYTHON_EMBED_FLAG --ldflags 2>&AS_MESSAGE_LOG_FD` else pc_cv_python_ldflags= fi @@ -400,7 +406,7 @@ AC_DEFUN([PC_PYTHON_CHECK_EXTENSION_SUFFIX], dnl Try to find the suffix with python-config otherwise give up AC_CACHE_CHECK([for Python extension suffix], [pc_cv_python_extension_suffix], [if test -x "$PYTHON_CONFIG"; then - pc_cv_python_extension_suffix=`$PYTHON_CONFIG --extension-suffix 2>&AS_MESSAGE_LOG_FD` + pc_cv_python_extension_suffix=`$PYTHON_CONFIG $PYTHON_EMBED_FLAG --extension-suffix 2>&AS_MESSAGE_LOG_FD` else pc_cv_python_extension_suffix= fi @@ -416,7 +422,7 @@ AC_DEFUN([PC_PYTHON_CHECK_ABI_FLAGS], dnl Try to find the ABI flags with python-config otherwise give up AC_CACHE_CHECK([for Python ABI flags], [pc_cv_python_abi_flags], [if test -x "$PYTHON_CONFIG"; then - pc_cv_python_abi_flags=`$PYTHON_CONFIG --abiflags 2>&AS_MESSAGE_LOG_FD` + pc_cv_python_abi_flags=`$PYTHON_CONFIG $PYTHON_EMBED_FLAG --abiflags 2>&AS_MESSAGE_LOG_FD` else pc_cv_python_abi_flags= fi diff --git a/plugins/python/configure b/plugins/python/configure index e03d217e..39e94d8a 100755 --- a/plugins/python/configure +++ b/plugins/python/configure @@ -17008,6 +17008,11 @@ $as_echo "no" >&6; } fi +if test "xyes" = "xyes" && $PYTHON_CONFIGURE --embed; then : + PYTHON_EMBED_FLAG="--embed" +else + PYTHON_EMBED_FLAG="" +fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Python includes" >&5 $as_echo_n "checking for Python includes... " >&6; } @@ -17015,7 +17020,7 @@ if ${pc_cv_python_includes+:} false; then : $as_echo_n "(cached) " >&6 else if test -x "$PYTHON_CONFIG"; then - pc_cv_python_includes=`$PYTHON_CONFIG --includes 2>&5` + pc_cv_python_includes=`$PYTHON_CONFIG $PYTHON_EMBED_FLAG --includes 2>&5` else pc_cv_python_includes="-I$includedir/$_PYTHON_BASENAME" fi @@ -17041,7 +17046,7 @@ if ${pc_cv_python_cflags+:} false; then : $as_echo_n "(cached) " >&6 else if test -x "$PYTHON_CONFIG"; then - pc_cv_python_cflags=`$PYTHON_CONFIG --cflags 2>&5` + pc_cv_python_cflags=`$PYTHON_CONFIG $PYTHON_EMBED_FLAG --cflags 2>&5` else pc_cv_python_cflags= fi @@ -17057,7 +17062,7 @@ if ${pc_cv_python_ldflags+:} false; then : $as_echo_n "(cached) " >&6 else if test -x "$PYTHON_CONFIG"; then - pc_cv_python_ldflags=`$PYTHON_CONFIG --ldflags 2>&5` + pc_cv_python_ldflags=`$PYTHON_CONFIG $PYTHON_EMBED_FLAG --ldflags 2>&5` else pc_cv_python_ldflags= fi @@ -17073,7 +17078,7 @@ if ${pc_cv_python_libs+:} false; then : $as_echo_n "(cached) " >&6 else if test -x "$PYTHON_CONFIG"; then - pc_cv_python_libs=`$PYTHON_CONFIG --libs 2>&5` + pc_cv_python_libs=`$PYTHON_CONFIG $PYTHON_EMBED_FLAG --libs 2>&5` else pc_cv_python_libs="-l$_PYTHON_BASENAME" fi diff --git a/plugins/python/configure.ac b/plugins/python/configure.ac index 7d745780..bfe8ef56 100644 --- a/plugins/python/configure.ac +++ b/plugins/python/configure.ac @@ -84,7 +84,7 @@ AC_ARG_WITH([python], []) PC_PROG_PYTHON([python3], [2.7], [4.0]) -PC_PYTHON_PROG_PYTHON_CONFIG +PC_PYTHON_PROG_PYTHON_CONFIG([],[yes]) PC_PYTHON_CHECK_INCLUDES PC_PYTHON_CHECK_HEADERS PC_PYTHON_CHECK_CFLAGS