diff options
author | Paolo Borelli <pborelli@gnome.org> | 2013-01-03 14:08:24 +0100 |
---|---|---|
committer | Paolo Borelli <pborelli@gnome.org> | 2013-01-05 18:21:26 +0100 |
commit | 590b5e1c3f11b4c5d6b15826aec05caeafaf9258 (patch) | |
tree | 91ef0a920fca3aea40485a84c5114a005433478d /peas-demo | |
parent | 519d9ebe0608c855ea84a1050036c93eda7dacbe (diff) | |
download | libpeas-590b5e1c3f11b4c5d6b15826aec05caeafaf9258.tar.gz |
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
Diffstat (limited to 'peas-demo')
-rw-r--r-- | peas-demo/plugins/Makefile.am | 2 | ||||
-rw-r--r-- | peas-demo/plugins/pythonhello/pythonhello.plugin | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/peas-demo/plugins/Makefile.am b/peas-demo/plugins/Makefile.am index 92ac90b..d9ea866 100644 --- a/peas-demo/plugins/Makefile.am +++ b/peas-demo/plugins/Makefile.am @@ -4,7 +4,7 @@ if ENABLE_GJS SUBDIRS += gjshello endif -if ENABLE_PYTHON +if ENABLE_PYTHON3 SUBDIRS += pythonhello endif diff --git a/peas-demo/plugins/pythonhello/pythonhello.plugin b/peas-demo/plugins/pythonhello/pythonhello.plugin index 59139bb..6b96e73 100644 --- a/peas-demo/plugins/pythonhello/pythonhello.plugin +++ b/peas-demo/plugins/pythonhello/pythonhello.plugin @@ -1,6 +1,6 @@ [Plugin] Module=pythonhello -Loader=python +Loader=python3 Name=Python Says Hello Description=Inserts a box containing "Python Says Hello" in every windows. Authors=Steve Frécinaux <code@istique.net> |