<feed xmlns='http://www.w3.org/2005/Atom'>
<title>extra-cmake-modules.git/find-modules, branch v5.51.0-rc1</title>
<subtitle>hurd extra-cmake-modules.git</subtitle>
<link rel='alternate' type='text/html' href='https://dynamicmalloc.com/cgit/extra-cmake-modules.git/'/>
<entry>
<title>Compile python bindings with the same sip flags used by PyQt</title>
<updated>2018-09-30T20:46:18+00:00</updated>
<author>
<name>Antonio Rojas</name>
<email>arojas@archlinux.org</email>
</author>
<published>2018-09-30T20:46:18+00:00</published>
<link rel='alternate' type='text/html' href='https://dynamicmalloc.com/cgit/extra-cmake-modules.git/commit/?id=05bd97492704029647d442d0f83acb9e6436ed53'/>
<id>05bd97492704029647d442d0f83acb9e6436ed53</id>
<content type='text'>
PyQt&gt;=5.11 is compiled with the 'PyQt5.sip' sipname by default. This causes a sipname mismatch with KF5 bindings and prevents them from loading:

To fix this, we compile KF5 bindings using the same sip flags (name and tags) that PyQt was compiled with. This ensures that we always use the correct sip name. We also stop setting the sip tags in FindPythonModuleGeneration.cmake to avoid duplication, and remove a (seemingly) unnecessary check for the Qt version that was forcing PyQt to be rebuilt for every patch Qt update.

Differential Revision: https://phabricator.kde.org/D15091
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
PyQt&gt;=5.11 is compiled with the 'PyQt5.sip' sipname by default. This causes a sipname mismatch with KF5 bindings and prevents them from loading:

To fix this, we compile KF5 bindings using the same sip flags (name and tags) that PyQt was compiled with. This ensures that we always use the correct sip name. We also stop setting the sip tags in FindPythonModuleGeneration.cmake to avoid duplication, and remove a (seemingly) unnecessary check for the Qt version that was forcing PyQt to be rebuilt for every patch Qt update.

Differential Revision: https://phabricator.kde.org/D15091
</pre>
</div>
</content>
</entry>
<entry>
<title>Python bindings: use cmake_parse_arguments, fix documentation</title>
<updated>2018-09-20T12:22:54+00:00</updated>
<author>
<name>Stefan Brüns</name>
<email>stefan.bruens@rwth-aachen.de</email>
</author>
<published>2018-09-16T19:46:01+00:00</published>
<link rel='alternate' type='text/html' href='https://dynamicmalloc.com/cgit/extra-cmake-modules.git/commit/?id=b322901ca22f9c944b07eebbdcb4d45230d74084'/>
<id>b322901ca22f9c944b07eebbdcb4d45230d74084</id>
<content type='text'>
Summary:
Use of positional arguments is error prone, as e.g. switching order
of NAMESPACE and MODULENAME wont have the desired effect, as
the keywords are ignored for the first three arguments.

Parse all arguments with cmake_parse_arguments, and fix the documentation
(list supported arguments) and example (add TARGET keyword).

Test Plan: build bindings

Reviewers: #frameworks, dfaure

Reviewed By: dfaure

Subscribers: kde-frameworks-devel, kde-buildsystem

Tags: #frameworks, #build_system

Differential Revision: https://phabricator.kde.org/D15559
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Summary:
Use of positional arguments is error prone, as e.g. switching order
of NAMESPACE and MODULENAME wont have the desired effect, as
the keywords are ignored for the first three arguments.

Parse all arguments with cmake_parse_arguments, and fix the documentation
(list supported arguments) and example (add TARGET keyword).

Test Plan: build bindings

Reviewers: #frameworks, dfaure

Reviewed By: dfaure

Subscribers: kde-frameworks-devel, kde-buildsystem

Tags: #frameworks, #build_system

Differential Revision: https://phabricator.kde.org/D15559
</pre>
</div>
</content>
</entry>
<entry>
<title>Bindings: Correct handling of sources containing utf-8</title>
<updated>2018-09-14T12:45:41+00:00</updated>
<author>
<name>Stefan Brüns</name>
<email>stefan.bruens@rwth-aachen.de</email>
</author>
<published>2018-08-19T00:32:14+00:00</published>
<link rel='alternate' type='text/html' href='https://dynamicmalloc.com/cgit/extra-cmake-modules.git/commit/?id=28da9e614f663210f4e5e0790b56055ce517bf38'/>
<id>28da9e614f663210f4e5e0790b56055ce517bf38</id>
<content type='text'>
Summary:
Depending on the locale, python3 may try to decode the source as ASCII
when the file is opened in text mode. This will fail as soon as the
code contains utf-8, e.g. (c) symbols.

While it is possible to specify the encoding when reading the file,
this is bad for several reasons:
- only a very small part of the source is processed via _read_source,
  no need to decode the complete source and store it as string objects
- the clang Cursor.extent.{start,end}.column refers to bytes, not
  multibyte characters.

While python2 processes utf-8 containing sources without error messages,
wrong extent borders are also an issue.

The practical impact is low, as the issue only manifests if there is a
multibyte character in front of *and* on the same line as the read token.

Test Plan:
Python3: Build any bindings which contains sources with non-ASCII codepoints,
e.g. kcoreaddons. Unpatched version fails when using e.g. LANG=C.
Python2: Both versions generate sources successfully.

Bytes vs characters test:
```
#define Q_SLOTS
class foo {
/* a */ public Q_SLOTS:
/* ä */ public Q_SLOTS:
};
```
`sip_generator.py --flags "" /usr/lib64/libclang.so Qt5Ruleset.py  test.h out.sip`
Obviously, both lines should result in the same code, the unfixed version generates `public Q_SLOTS:` vs `public:`.

Reviewers: #frameworks, lbeltrame

Reviewed By: lbeltrame

Subscribers: lbeltrame, bcooksley, jtamate, kde-frameworks-devel, kde-buildsystem

Tags: #frameworks, #build_system

Differential Revision: https://phabricator.kde.org/D15068
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Summary:
Depending on the locale, python3 may try to decode the source as ASCII
when the file is opened in text mode. This will fail as soon as the
code contains utf-8, e.g. (c) symbols.

While it is possible to specify the encoding when reading the file,
this is bad for several reasons:
- only a very small part of the source is processed via _read_source,
  no need to decode the complete source and store it as string objects
- the clang Cursor.extent.{start,end}.column refers to bytes, not
  multibyte characters.

While python2 processes utf-8 containing sources without error messages,
wrong extent borders are also an issue.

The practical impact is low, as the issue only manifests if there is a
multibyte character in front of *and* on the same line as the read token.

Test Plan:
Python3: Build any bindings which contains sources with non-ASCII codepoints,
e.g. kcoreaddons. Unpatched version fails when using e.g. LANG=C.
Python2: Both versions generate sources successfully.

Bytes vs characters test:
```
#define Q_SLOTS
class foo {
/* a */ public Q_SLOTS:
/* ä */ public Q_SLOTS:
};
```
`sip_generator.py --flags "" /usr/lib64/libclang.so Qt5Ruleset.py  test.h out.sip`
Obviously, both lines should result in the same code, the unfixed version generates `public Q_SLOTS:` vs `public:`.

Reviewers: #frameworks, lbeltrame

Reviewed By: lbeltrame

Subscribers: lbeltrame, bcooksley, jtamate, kde-frameworks-devel, kde-buildsystem

Tags: #frameworks, #build_system

Differential Revision: https://phabricator.kde.org/D15068
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix minor EBN issues</title>
<updated>2018-09-07T06:06:35+00:00</updated>
<author>
<name>Yuri Chornoivan</name>
<email>yurchor@ukr.net</email>
</author>
<published>2018-09-07T06:06:35+00:00</published>
<link rel='alternate' type='text/html' href='https://dynamicmalloc.com/cgit/extra-cmake-modules.git/commit/?id=a519c29e93de84e949ac308831160102cc733e59'/>
<id>a519c29e93de84e949ac308831160102cc733e59</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Bindings: Check if bindings can be generated for a specific python version</title>
<updated>2018-08-31T21:45:30+00:00</updated>
<author>
<name>Stefan Brüns</name>
<email>stefan.bruens@rwth-aachen.de</email>
</author>
<published>2018-08-17T19:02:23+00:00</published>
<link rel='alternate' type='text/html' href='https://dynamicmalloc.com/cgit/extra-cmake-modules.git/commit/?id=4275cfc3f75d784398034dcc5e096c375dba6c2b'/>
<id>4275cfc3f75d784398034dcc5e096c375dba6c2b</id>
<content type='text'>
Summary:
The generated C++ sources include &lt;sip.h&gt;, so it must be available.
Check for it in the version specific directories and fall back to
the default include directories.

Test Plan:
install python2-devel and python3-devel
install one of python{x}-sip-devel

bindings should be generated for the matching python version.

Reviewers: #frameworks, arojas

Reviewed By: arojas

Subscribers: arojas, kde-frameworks-devel, kde-buildsystem

Tags: #frameworks, #build_system

Differential Revision: https://phabricator.kde.org/D14915
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Summary:
The generated C++ sources include &lt;sip.h&gt;, so it must be available.
Check for it in the version specific directories and fall back to
the default include directories.

Test Plan:
install python2-devel and python3-devel
install one of python{x}-sip-devel

bindings should be generated for the matching python version.

Reviewers: #frameworks, arojas

Reviewed By: arojas

Subscribers: arojas, kde-frameworks-devel, kde-buildsystem

Tags: #frameworks, #build_system

Differential Revision: https://phabricator.kde.org/D14915
</pre>
</div>
</content>
</entry>
<entry>
<title>Bindings: Use python version matching the found clang python module</title>
<updated>2018-08-31T21:44:25+00:00</updated>
<author>
<name>Stefan Brüns</name>
<email>stefan.bruens@rwth-aachen.de</email>
</author>
<published>2018-08-15T01:25:56+00:00</published>
<link rel='alternate' type='text/html' href='https://dynamicmalloc.com/cgit/extra-cmake-modules.git/commit/?id=451bc7609c2d6380599c71e371ccb7b183abef8c'/>
<id>451bc7609c2d6380599c71e371ccb7b183abef8c</id>
<content type='text'>
Summary:
In case both python 2.7 and 3 are installed, but clang python bindings
are only installed for python 3, there will be no error message but
the self check will fail.

Check for clang bindings for both python2 and python3 (if installed),
and use the first one found to generate the sip bindings files.

Note, it is possible to e.g. use python2 to generate the sip binding
files (requires clang bindings), but generate bindings for python
2, 3, or both (requires matching python-devel and python-sip-devel
packages).

Test Plan:
install python3-clang bindings
install python2-clang bindings
or one of the above

the matching python version is used to run sip_generator.py

Reviewers: #frameworks, arojas

Reviewed By: arojas

Subscribers: kde-frameworks-devel, kde-buildsystem

Tags: #frameworks, #build_system

Differential Revision: https://phabricator.kde.org/D14914
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Summary:
In case both python 2.7 and 3 are installed, but clang python bindings
are only installed for python 3, there will be no error message but
the self check will fail.

Check for clang bindings for both python2 and python3 (if installed),
and use the first one found to generate the sip bindings files.

Note, it is possible to e.g. use python2 to generate the sip binding
files (requires clang bindings), but generate bindings for python
2, 3, or both (requires matching python-devel and python-sip-devel
packages).

Test Plan:
install python3-clang bindings
install python2-clang bindings
or one of the above

the matching python version is used to run sip_generator.py

Reviewers: #frameworks, arojas

Reviewed By: arojas

Subscribers: kde-frameworks-devel, kde-buildsystem

Tags: #frameworks, #build_system

Differential Revision: https://phabricator.kde.org/D14914
</pre>
</div>
</content>
</entry>
<entry>
<title>Bindings: Make generator forward compatible with Python 3</title>
<updated>2018-08-31T21:41:37+00:00</updated>
<author>
<name>Stefan Brüns</name>
<email>stefan.bruens@rwth-aachen.de</email>
</author>
<published>2018-08-15T00:37:20+00:00</published>
<link rel='alternate' type='text/html' href='https://dynamicmalloc.com/cgit/extra-cmake-modules.git/commit/?id=b6e4e645dac67abf02c01b6f55a55ba0b84ca32e'/>
<id>b6e4e645dac67abf02c01b6f55a55ba0b84ca32e</id>
<content type='text'>
Summary:
iteritems is no longer an available method for dict in Python 3. Using
dict.items() is functionally identical, although it creates some overhead
for Python 2.7 (creation of a temporary list). As this is only called
when tracing, this is not a big issue. For Python 3, there is no
overhead (dict.items() returns an iterator).

Test Plan:
Run python3 sip_generator.py ...
Run python2 sip_generator.py ...
Both generate the same code

Reviewers: #frameworks, arojas

Reviewed By: arojas

Subscribers: arojas, kde-frameworks-devel, kde-buildsystem

Tags: #frameworks, #build_system

Differential Revision: https://phabricator.kde.org/D14912
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Summary:
iteritems is no longer an available method for dict in Python 3. Using
dict.items() is functionally identical, although it creates some overhead
for Python 2.7 (creation of a temporary list). As this is only called
when tracing, this is not a big issue. For Python 3, there is no
overhead (dict.items() returns an iterator).

Test Plan:
Run python3 sip_generator.py ...
Run python2 sip_generator.py ...
Both generate the same code

Reviewers: #frameworks, arojas

Reviewed By: arojas

Subscribers: arojas, kde-frameworks-devel, kde-buildsystem

Tags: #frameworks, #build_system

Differential Revision: https://phabricator.kde.org/D14912
</pre>
</div>
</content>
</entry>
<entry>
<title>Bindings: Add support for scoped enums</title>
<updated>2018-08-25T02:14:41+00:00</updated>
<author>
<name>Stefan Brüns</name>
<email>stefan.bruens@rwth-aachen.de</email>
</author>
<published>2018-08-17T03:30:40+00:00</published>
<link rel='alternate' type='text/html' href='https://dynamicmalloc.com/cgit/extra-cmake-modules.git/commit/?id=1790a6994a3536a9d6c73901cb7898615eb64861'/>
<id>1790a6994a3536a9d6c73901cb7898615eb64861</id>
<content type='text'>
Summary:
Keep the enum intact by emitting the class keyword in case the enum is
scoped.
Use the complete enum scope for parameter values, the enclosing scope is
only correct to use for unscoped enums.
The python Cursor.is_scoped_enum() method has been added with LLVM/Clang
version 5.0.

BUG: 397154

Test Plan: build kcoreaddons

Reviewers: #frameworks, mpyne

Reviewed By: mpyne

Subscribers: mpyne, kde-frameworks-devel, kde-buildsystem

Tags: #frameworks, #build_system

Differential Revision: https://phabricator.kde.org/D14908
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Summary:
Keep the enum intact by emitting the class keyword in case the enum is
scoped.
Use the complete enum scope for parameter values, the enclosing scope is
only correct to use for unscoped enums.
The python Cursor.is_scoped_enum() method has been added with LLVM/Clang
version 5.0.

BUG: 397154

Test Plan: build kcoreaddons

Reviewers: #frameworks, mpyne

Reviewed By: mpyne

Subscribers: mpyne, kde-frameworks-devel, kde-buildsystem

Tags: #frameworks, #build_system

Differential Revision: https://phabricator.kde.org/D14908
</pre>
</div>
</content>
</entry>
<entry>
<title>Bindings: Check for libclang without version suffix also</title>
<updated>2018-08-17T22:23:23+00:00</updated>
<author>
<name>Stefan Brüns</name>
<email>stefan.bruens@rwth-aachen.de</email>
</author>
<published>2018-08-15T01:29:57+00:00</published>
<link rel='alternate' type='text/html' href='https://dynamicmalloc.com/cgit/extra-cmake-modules.git/commit/?id=4b59c77083625219238d6e12d11554b7fd685a7a'/>
<id>4b59c77083625219238d6e12d11554b7fd685a7a</id>
<content type='text'>
Summary:
The canonical name is libclang.so, which seems to be available on all
distributions (RH, SUSE, Ubuntu, Debian, ...) while the symlinks with
version suffix (e.g. libclang-6.0) are specific to Debian and derivatives.
Keep the current checks, but fallback to the unversioned library name.

Test Plan:
on openSUSE TW/Leap:
run cmake
-&gt; libclang is found

Reviewers: #frameworks, dfaure

Reviewed By: dfaure

Subscribers: kde-frameworks-devel, kde-buildsystem

Tags: #frameworks, #build_system

Differential Revision: https://phabricator.kde.org/D14909
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Summary:
The canonical name is libclang.so, which seems to be available on all
distributions (RH, SUSE, Ubuntu, Debian, ...) while the symlinks with
version suffix (e.g. libclang-6.0) are specific to Debian and derivatives.
Keep the current checks, but fallback to the unversioned library name.

Test Plan:
on openSUSE TW/Leap:
run cmake
-&gt; libclang is found

Reviewers: #frameworks, dfaure

Reviewed By: dfaure

Subscribers: kde-frameworks-devel, kde-buildsystem

Tags: #frameworks, #build_system

Differential Revision: https://phabricator.kde.org/D14909
</pre>
</div>
</content>
</entry>
<entry>
<title>Change the 'since' version.</title>
<updated>2018-07-16T06:43:40+00:00</updated>
<author>
<name>Christophe Giboudeaux</name>
<email>christophe@krop.fr</email>
</author>
<published>2018-07-16T06:43:13+00:00</published>
<link rel='alternate' type='text/html' href='https://dynamicmalloc.com/cgit/extra-cmake-modules.git/commit/?id=f19f90956b4daf457eba2eb12342ed211d2dc147'/>
<id>f19f90956b4daf457eba2eb12342ed211d2dc147</id>
<content type='text'>
These changes are not available in ECM 5.48.0.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
These changes are not available in ECM 5.48.0.
</pre>
</div>
</content>
</entry>
</feed>
