Changeset: 7f707f075ee9 for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=7f707f075ee9
Modified Files:
configure.ag
debian/fix-deb.sh
monetdb5/extras/pyapi/pyapi.c
Branch: iot
Log Message:
Merge default
diffs (92 lines):
diff --git a/configure.ag b/configure.ag
--- a/configure.ag
+++ b/configure.ag
@@ -2359,7 +2359,7 @@ if test "x$enable_pyintegration" != xno;
;;
esac
if test "x$have_pyconfig" = x; then
- AC_PATH_PROG(PYCMD,python-config,,$XPATH)
+ AC_PATH_PROG(PYCMD,python-config,no,$PATH)
if test "x$PYCMD" = x; then
if test "x$enable_pyintegration" = xyes; then
AC_MSG_ERROR([python-config library required
for Python integration support])
diff --git a/debian/fix-deb.sh b/debian/fix-deb.sh
--- a/debian/fix-deb.sh
+++ b/debian/fix-deb.sh
@@ -1,16 +1,41 @@
#!/bin/bash
-if [ -f /etc/lsb-release ]; then
- source /etc/lsb-release
- ID=${DISTRIB_ID,,}
- VERSION_ID=$DISTRIB_RELEASE
-elif [ -f /etc/os-release ]; then
- source /etc/os-release
-else
- echo "don't know what distro this is"
- exit 1
-fi
+case $# in
+0)
+ # figure out which distribution this is
+ if [ -f /etc/lsb-release ]; then
+ source /etc/lsb-release
+ SUITE=$DISTRIB_CODENAME
+ elif [ -f /etc/os-release ]; then
+ source /etc/os-release
+ if [[ $ID == debian ]]; then
+ SUITE="${VERSION#*(}"
+ SUITE="${SUITE%)*}"
+ else
+ case $VERSION in
+ *\(*\)*)
+ SUITE="${VERSION#*(}"
+ SUITE="${SUITE% *)*}"
+ ;;
+ *)
+ SUITE="${VERSION#*, }"
+ SUITE="${SUITE% *)*}"
+ ;;
+ esac
+ SUITE=${SUITE,,}
+ fi
+ else
+ echo "don't know what distro this is"
+ exit 1
+ fi
+ ;;
+1)
+ # we're passed the name of the distribution
+ SUITE=$1
+ ;;
+esac
-if [[ ( $ID == debian && $VERSION_ID -lt 8 ) || ( $ID == ubuntu && $VERSION_ID
< 15.10 ) ]]; then
+case $SUITE in
+wheezy | precise | trusty)
# fix control file because these systems don't have liblas and a
# too old version of libgeos
sed -i 's/, libgeos-dev[^,]*//;s/, liblas-c-dev[^,]*//' debian/control
@@ -18,4 +43,5 @@ if [[ ( $ID == debian && $VERSION_ID -lt
sed -i '/^Package:.*geom/,/^$/d' debian/control
rm debian/libmonetdb5-server-lidar.install
debian/libmonetdb5-server-geom.install
sed -i
'/geo[ms]=yes/s/yes/no/;/gdal=yes/s/yes/no/;/lidar=yes/s/yes/no/;/liblas=yes/s/yes/no/'
debian/rules
-fi
+ ;;
+esac
diff --git a/monetdb5/extras/pyapi/pyapi.c b/monetdb5/extras/pyapi/pyapi.c
--- a/monetdb5/extras/pyapi/pyapi.c
+++ b/monetdb5/extras/pyapi/pyapi.c
@@ -1620,10 +1620,10 @@ str
MT_lock_set(&pyapiLock);
if (!pyapiInitialized) {
str msg = MAL_SUCCEED;
- char* iar = NULL;
Py_Initialize();
- PyRun_SimpleString("import numpy");
- import_array1(iar);
+ if (PyRun_SimpleString("import numpy") != 0 || _import_array() <
0) {
+ return PyError_CreateException("Failed to initialize embedded
python", NULL);
+ }
msg = _connection_init();
marshal_module = PyImport_Import(PyString_FromString("marshal"));
if (marshal_module == NULL) {
_______________________________________________
checkin-list mailing list
[email protected]
https://www.monetdb.org/mailman/listinfo/checkin-list