gnucash master: Multiple changes pushed
Geert Janssens
gjanssens at code.gnucash.org
Wed Oct 2 06:36:03 EDT 2019
Updated via https://github.com/Gnucash/gnucash/commit/c59515f7 (commit)
via https://github.com/Gnucash/gnucash/commit/0eb0b922 (commit)
from https://github.com/Gnucash/gnucash/commit/4ffc8bbb (commit)
commit c59515f7b74f8f5f5b624b96065347724c3cd750
Author: Geert Janssens <geert at kobaltwit.be>
Date: Tue Oct 1 18:08:03 2019 +0200
Revert unintended copy-paste error
diff --git a/libgnucash/core-utils/CMakeLists.txt b/libgnucash/core-utils/CMakeLists.txt
index 3960cd7c4..a999f15e2 100644
--- a/libgnucash/core-utils/CMakeLists.txt
+++ b/libgnucash/core-utils/CMakeLists.txt
@@ -151,7 +151,7 @@ if (WITH_PYTHON)
)
target_compile_definitions (sw_core_utils PRIVATE -DG_LOG_DOMAIN=\"gnc.core-utils\")
- if (CORELE)
+ if (APPLE)
set_target_properties (sw_core_utils PROPERTIES INSTALL_NAME_DIR "${CMAKE_INSTALL_FULL_LIBDIR}/gnucash")
endif()
commit 0eb0b922d7a1142b0148e16f20b9b01112f811e7
Author: Geert Janssens <geert at kobaltwit.be>
Date: Tue Oct 1 16:27:28 2019 +0200
Python - remove 2.x only code paths
diff --git a/common/test-core/unittest-support.i b/common/test-core/unittest-support.i
index 948a5548a..fe48bfec9 100644
--- a/common/test-core/unittest-support.i
+++ b/common/test-core/unittest-support.i
@@ -35,12 +35,7 @@ SCM scm_init_unittest_support_module (void);
#if defined(SWIGPYTHON)
%{
/* avoid no previous prototype warning/error */
-#if PY_VERSION_HEX >= 0x03000000
-PyObject*
-#else
-void
-#endif
-SWIG_init (void);
+PyObject* SWIG_init (void);
%}
#endif
diff --git a/gnucash/python/gncmod-python.c b/gnucash/python/gncmod-python.c
index ea314daba..f28769327 100644
--- a/gnucash/python/gncmod-python.c
+++ b/gnucash/python/gncmod-python.c
@@ -57,13 +57,8 @@ libgncmod_python_gnc_module_description(void)
return g_strdup("An embedded Python interpreter");
}
-#if PY_VERSION_HEX >= 0x03000000
//extern PyObject* PyInit__sw_app_utils(void);
//extern PyObject* PyInit__sw_core_utils(void);
-#else
-//extern void init_sw_app_utils(void);
-//extern void init_sw_core_utils(void);
-#endif
int
libgncmod_python_gnc_module_init(int refcount)
@@ -73,23 +68,15 @@ libgncmod_python_gnc_module_init(int refcount)
*/
FILE *fp;
gchar *pkgdatadir, *init_filename;
-#if PY_VERSION_HEX >= 0x03000000
wchar_t* argv = NULL;
-#else
- char* argv = "";
-#endif
+
Py_Initialize();
PySys_SetArgv(0, &argv);
// I don't quite understand why these are loaded here
// - these are python modules so should be able to just import them
// in init.py
-#if PY_VERSION_HEX >= 0x03000000
//PyInit__sw_app_utils();
//PyInit__sw_core_utils();
-#else
- //init_sw_app_utils();
- //init_sw_core_utils();
-#endif
/* There isn't yet a python module to init.
pName = PyString_FromString("path/to/init.py");
diff --git a/libgnucash/app-utils/app-utils.i b/libgnucash/app-utils/app-utils.i
index 7ded4efa8..d09b4ee10 100644
--- a/libgnucash/app-utils/app-utils.i
+++ b/libgnucash/app-utils/app-utils.i
@@ -49,12 +49,7 @@ SCM scm_init_sw_app_utils_module (void);
#if defined(SWIGPYTHON)
%{
/* avoid no previous prototype warning/error */
-#if PY_VERSION_HEX >= 0x03000000
-PyObject*
-#else
-void
-#endif
-SWIG_init (void);
+PyObject* SWIG_init (void);
%}
#endif
diff --git a/libgnucash/core-utils/core-utils.i b/libgnucash/core-utils/core-utils.i
index 234cb0489..9a5eaf530 100644
--- a/libgnucash/core-utils/core-utils.i
+++ b/libgnucash/core-utils/core-utils.i
@@ -39,12 +39,7 @@ SCM scm_init_sw_core_utils_module (void);
#endif
#if defined(SWIGPYTHON)
%{
-#if PY_VERSION_HEX >= 0x03000000
-PyObject*
-#else
-void
-#endif
- SWIG_init (void);
+PyObject* SWIG_init (void);
%}
#endif
%import "base-typemaps.i"
Summary of changes:
common/test-core/unittest-support.i | 7 +------
gnucash/python/gncmod-python.c | 15 +--------------
libgnucash/app-utils/app-utils.i | 7 +------
libgnucash/core-utils/CMakeLists.txt | 2 +-
libgnucash/core-utils/core-utils.i | 7 +------
5 files changed, 5 insertions(+), 33 deletions(-)
More information about the gnucash-changes
mailing list