Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Support py2 and py3 at the same time
This patch reworks the build system so that we use the same sources to build both a python2 loader and a python3 loader. The python 2 one keeps the same name for backward compatibility, while the python 3 one is explicitely called "python3". Supporting py2 and py3 in the same build is tricky since the existing autotools support is limited, so we make some assumptions: - there are separate --enable-python2 and --enable-python3 flags, --enable-python has been removed - the py3 loader is in a separate dir but compliles the files from the py2 loader - for py2 we only check the binary and the python2-config tool, while for py3 we use the proper AM_PATH_PYTHON macro - for py2 we manually detect pyexecdir, hopefully with the same logic used by the AM_PATH_PYTHON macro - we do not check for Python.h header anymore since it is not strictly needed and autoconf caching makes it difficult - for we build the demos only for python3 (unit tests instead are replicated for both) https://bugzilla.gnome.org/show_bug.cgi?id=691081
- Loading branch information
Showing
17 changed files
with
324 additions
and
71 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
# Python 3 plugin loader | ||
|
||
loaderdir = $(libdir)/libpeas-1.0/loaders | ||
|
||
INCLUDES = \ | ||
-I$(top_srcdir) \ | ||
$(PEAS_CFLAGS) \ | ||
$(GCOV_CFLAGS) \ | ||
$(WARN_CFLAGS) \ | ||
$(DISABLE_DEPRECATED) \ | ||
$(PYGOBJECT_CFLAGS) \ | ||
$(PYTHON3_CFLAGS) \ | ||
-DPEAS_PYEXECDIR=\""$(PYTHON3_PYEXECDIR)"\" \ | ||
-DPEAS_LOCALEDIR=\""$(prefix)/$(DATADIRNAME)/locale"\" | ||
|
||
loader_LTLIBRARIES = libpython3loader.la | ||
|
||
libpython3loader_la_SOURCES = \ | ||
$(top_srcdir)/loaders/python/peas-extension-python.c \ | ||
$(top_srcdir)/loaders/python/peas-extension-python.h \ | ||
$(top_srcdir)/loaders/python/peas-plugin-loader-python.c \ | ||
$(top_srcdir)/loaders/python/peas-plugin-loader-python.h | ||
|
||
libpython3loader_la_LDFLAGS = \ | ||
$(LOADER_LIBTOOL_FLAGS) \ | ||
$(GCOV_LDFLAGS) | ||
|
||
libpython3loader_la_LIBADD = \ | ||
$(PEAS_LIBS) \ | ||
$(PYGOBJECT_LIBS) \ | ||
$(PYTHON3_LIBS) | ||
|
||
gcov_sources = $(libpython3loader_la_SOURCES) | ||
include $(top_srcdir)/Makefile.gcov |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.