Some minor fixes

This commit is contained in:
Eric Hermes 2018-10-08 11:57:03 -07:00
parent 4e9c631591
commit bb3fb8f0f0
4 changed files with 14 additions and 8 deletions

View file

@ -1322,7 +1322,8 @@ ifeq ($(BUILDING_PYTHON),python)
# EXTRA_LIBS += -L/home/edo/tcltk/lib/LINUX -ltk8.3 -ltcl8.3 -L/usr/X11R6/lib -lX11 -ldl
# needed if python was built with pthread support
ifneq ($(GOTMINGW32),1)
PYMAJOR = $(echo $PYTHONVERSION | cut -d. -f1)
PYMAJOR:=$(word 1, $(subst ., ,$(PYTHONVERSION)))
$(error pyversion is $(echo $PYTHONVERSION | cut -d. -f1))
ifeq (${PYMAJOR},3)
EXTRA_LIBS += $(shell $(PYTHONHOME)/bin/python3-config --libs) -lnwcutil
else
@ -2404,7 +2405,8 @@ ifeq ($(_CPU),$(findstring $(_CPU), ppc64 ppc64le))
ifeq ($(BUILDING_PYTHON),python)
# EXTRA_LIBS += -ltk -ltcl -L/usr/X11R6/lib -lX11 -ldl
PYMAJOR = $(echo $PYTHONVERSION | cut -d. -f1)
PYMAJOR:=$(word 1, $(subst ., ,$(PYTHONVERSION)))
$(error pyversion is ${PYMAJOR})
ifeq (${PYMAJOR},3)
EXTRA_LIBS += -lnwcutil $(shell $(PYTHONHOME)/bin/python3-config --libs) #-lz
else
@ -2586,7 +2588,7 @@ $(error )
endif
#
ifdef USE_PYTHONCONFIG
PYMAJOR = $(echo $PYTHONVERSION | cut -d. -f1)
PYMAJOR:=$(word 1, $(subst ., ,$(PYTHONVERSION)))
ifeq (${PYMAJOR},3)
EXTRA_LIBS += $(shell $(PYTHONHOME)/bin/python3-config --ldflags)
else

View file

@ -19,7 +19,7 @@ error1:
@exit 1
endif
PYMAJOR = $(echo $PYTHONVERSION | cut -d. -f1)
PYMAJOR:=$(word 1, $(subst ., ,$(PYTHONVERSION)))
ifeq (${PYMAJOR},3)
LIB_INCLUDES = $(shell $(PYTHONHOME)/bin/python3-config --includes)
else

View file

@ -150,7 +150,7 @@ char *Parse_String(PyObject *arg)
if (PyUnicode_Check(arg)) {
ascii_string = PyUnicode_AsASCIIString(arg);
out = PyBytes_AsString(ascii_string);
Py_DECREF(ascii_string)
Py_DECREF(ascii_string);
} else if (PyBytes_Check(arg)) {
out = PyBytes_AsString(arg);
} else {
@ -240,8 +240,8 @@ static PyObject *wrap_rtdb_put(PyObject *self, PyObject *args)
void *array = 0;
PyObject *obj, *obj_item, *ascii_string;
ma_type = -1
PyArg_ParseTuple(args, "so|i", &name, &obj, &ma_type)
ma_type = -1;
PyArg_ParseTuple(args, "so|i", &name, &obj, &ma_type);
if (PyList_Check(obj))
list = 1;
@ -1709,7 +1709,7 @@ static struct module_state _state;
#endif
static PyObject* error_out(PyObject *m) {
struct module-state *st = GETSTATE(m);
struct module_state *st = GETSTATE(m);
PyErr_SetString(st->error, "something bad happened");
return NULL;
}

View file

@ -11,7 +11,11 @@
#include <stdlib.h>
#include "typesf2c.h"
#if PY_MAJOR_VERSION >= 3
extern PyMODINIT_FUNC PyInit_nwchem();
#else
extern void initnwchem();
#endif
extern void util_file_parallel_copy(const char *, const char *);