38 Commits

Author SHA1 Message Date
Sébastien Helleu
efc7a588d6 core: update copyright dates 2021-01-02 21:34:16 +01:00
Sébastien Helleu
feb6258910 core: update copyright dates 2020-01-04 10:41:26 +01:00
Eli Schwartz
76c6f52e8c build: support python 3.8
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.
2019-11-12 21:19:47 +01:00
Eli Schwartz
5c8ac69f73 python: use more idiomatic cmake pkg-config linking
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.
2019-11-12 21:19:47 +01:00
Sébastien Helleu
baf8f635ff core: fix style in CMake files 2019-10-01 18:31:41 +02:00
Eli Schwartz
ad7d16a5b3 build: use pkg-config to properly link python
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.
2019-07-31 20:45:59 +02:00
Sébastien Helleu
ab81128a7a core: compile with Python 3 by default
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.
2019-07-01 21:28:33 +02:00
Sébastien Helleu
2b0057239b core: update copyright dates 2019-01-01 15:40:51 +01:00
Sébastien Helleu
4712d0bb06 core: use https for links to GNU GPL license 2018-11-29 23:16:07 +01:00
Sébastien Helleu
7554febf7e python: add detection of Python 3.7 2018-07-12 19:24:56 +02:00
Sébastien Helleu
ed4837b2f6 core: update copyright dates 2018-01-05 00:54:18 +01:00
Sébastien Helleu
36187a240a python: add detection of Python 3.6 2017-05-08 17:17:41 +02:00
Sébastien Helleu
705d86e684 core: update copyright dates 2017-01-01 11:32:04 +01:00
Sébastien Helleu
aec9e2ebca python: add detection of Python 3.5 2016-06-21 19:39:20 +02:00
Shane McCarron
c00ae68019 Python plugin shared libraries missing
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.
2016-02-01 12:46:16 -06:00
Sébastien Helleu
3330724574 core: update copyright dates 2016-01-01 11:09:53 +01:00
Sébastien Helleu
a020c28ea6 core: update copyright dates 2015-01-01 09:23:23 +01:00
Tim D. Smith
9fe0aabb38 core: use HINTS for introspected values in Python detection 2014-09-28 15:00:32 +02:00
Sébastien Helleu
7618fdd240 core: use lower case for CMake keywords 2014-04-12 18:00:27 +02:00
Sebastien Helleu
892aa79fb5 core: update copyright dates 2014-01-01 00:14:12 +01:00
Sebastien Helleu
5d2382caab core: fix detection of python on Ubuntu Raring 2013-01-31 17:14:34 +01:00
Sebastien Helleu
323801f869 core: add cmake option ENABLE_PYTHON3 and configure option --enable-python3
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.
2013-01-05 20:46:22 +01:00
Sebastien Helleu
f97598b4aa core: update copyright dates 2013-01-01 13:12:49 +01:00
Sebastien Helleu
cc5118b3b6 core: check that python version is >= 2.5 in cmake/autotools (patch from Peter Boström) 2012-08-21 09:27:49 +02:00
Sebastien Helleu
24a06f0e08 python: fix detection of python (first try "python2.x" and then "python") (bug #36835) 2012-07-17 14:07:03 +02:00
Sebastien Helleu
47e4a03be6 core: update copyright dates 2012-01-08 18:59:50 +01:00
Sebastien Helleu
daea95866c python: support of Python 3.x (task #11704)
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.
2012-01-03 19:35:05 +01:00
Sebastien Helleu
dfdf42e27b core: remove unneeded whitespace 2011-10-26 20:37:03 +02:00
Sebastien Helleu
d24f6e9e17 Update copyright dates 2011-01-01 18:06:29 +01:00
Sebastien Helleu
62dc84f4e9 Add support of python 2.7 in cmake and configure (debian #606989) 2010-12-13 22:20:57 +01:00
Sebastien Helleu
6562d676fe Update licenses and copyrights, add missing author names in sources 2010-06-22 19:46:28 +02:00
Sebastien Helleu
2801b8437c Reformat multi-line comments 2010-03-19 23:33:14 +01:00
Sebastien Helleu
2133eb30ff Update copyright dates 2010-01-03 19:31:55 +01:00
Julien Louis
0904715603 Add check for python 2.6 2009-02-02 17:10:02 +01:00
Sebastien Helleu
2115f3f675 Update copyright dates 2009-01-03 10:06:53 +01:00
Sebastien Helleu
e3b52115c7 Update of year in some copyrights 2008-01-02 12:47:09 +01:00
Sebastien Helleu
f1a39ce7d7 Replaced GPL 2 license by GPL 3 2007-07-02 12:25:13 +00:00
Sebastien Helleu
9f5d99f57e Added cmake for weechat compile 2007-05-21 16:30:04 +00:00