Age | Commit message (Collapse) | Author |
|
|
|
|
|
|
|
|
|
In python 3.8, in order to link to -lpython3.8, you need to use the
exported pkg-config interface 'python3-embed' (or 'python3-config --libs
--embed'), see https://bugs.python.org/issue36721 for details.
|
|
cmake documentation is absolutely atrocious, and I don't know why they
mention all the wrong things to use, and the cargo cult of successfully
writing a cmake build definition (copy-pasting what works from other
projects) also uses all the wrong things. But it turns out it is
possible to correctly link a PkgConfig target despite all that, at
least, *iff* you use cmake >= 3.13. I've chosen option 2, which is to
vendor in cmake >= 3.13's FindPkgConfig module in the previous commit.
Using IMPORTED_TARGET GLOBAL in a pkg-config check will result in a
proper linker target being created. For comparison, this is like using
meson's dependency() target, except meson forces you to do this by
default. The result is that the build system's internal representation
of how to link something, is used instead of manually passing build
flags defined in variables.
This is an important distinction to make, because cmake does not have a
list datatype, and instead turns lists into strings separated by ';'
which are indistinguishable from, like, strings which contain ';'
characters. When you pass the resulting list-which-isn't-really-a-list
to link an executable/library, you either need to preprocess the
variable to replace ';' with ' ' (just in case there are multiple
elements) or use cmake functions which magically know to do this
themselves -- or at least, I assume there are cmake functions that
correctly handle so-called "lists", or there would be no need for
"lists" to exist.
The IMPORTED_TARGET will define a bunch of INTERFACE_* properties which
do seem to do exactly this. The resulting build definition should
actually, correctly, link python, thereby fixing #1398 in a better way.
|
|
|
|
fixes incorrect (non)detection of libpython3.Ym.so due to PEP 3149 since
python's officially exported build flags know how to correctly link to
python.
|
|
The CMake option ENABLE_PYTHON3 is renamed to ENABLE_PYTHON2, to use Python 2
first then fallback on Python 3.
In the same way, the configure option --enable-python3 is renamed to
--enable-python2, to use Python 2 first then fallback on Python 3.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
When linking against a python with shared libraries, this script ONLY asked for the LD flags, not any additional libraries. This could result in a condition where required libraries (such as libutil on Centos 6.7 against Python 2.7) are not loaded and the load of the plugin thus fails. This change asks the python being linked against which libraries it was linked using, and then ensures those are also linked against by the python plugin for weechat.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
With this option, the python plugin will be built and linked with Python 3
(if found, or Python 2 as fallback).
This option it not (yet) recommended, because many scripts are working only
with Python 2.x. It should be used only to tests scripts with Python 3.x
in WeeChat.
|
|
|
|
Peter Boström)
|
|
(bug #36835)
|
|
|
|
Note that Python 2.x is still the only Python compiled if found:
Python 3.x is not auto-detected by cmake neither configure.
Many official Python scripts will not load/run with Python 3.x,
so Python 2.x (2.7 or 2.6) is still the recommended version.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|