hugin/cmake patch

50 views
Skip to first unread message

Wirz

unread,
Oct 10, 2019, 4:11:11 PM10/10/19
to hugin-ptx
Hi,

The cmake command to find python executables and libraries has changed
in cmake 3.12. As a results hugin doesn't build for example in the
current debian/testing.

Attached is a patch to fix this problem. It's tested against
linux/cmake 3.13.4. I have not changed the WIN32 branches because I
have no way of verifying the correctness.

cheers, lukas
hugin-cmake.patch
signature.asc

Andreas Metzler

unread,
Oct 14, 2019, 2:05:23 PM10/14/19
to hugi...@googlegroups.com
On 2019-10-10 Wirz <sp...@lukas-wirz.de> wrote:
> Hi,

> The cmake command to find python executables and libraries has changed
> in cmake 3.12. As a results hugin doesn't build for example in the
> current debian/testing.
[...]

Hello,

I have no opinion on the patch, it might be the correct thing to do.
I had successful builds about a month ago though ...

https://buildd.debian.org/status/package.php?p=hugin&suite=unstable

... and these were against cmake 3.13.4.

I am explicitely specifying the to-be-found python version with

-DBUILD_HSI:BOOL=ON
-DPython_ADDITIONAL_VERSIONS=3.7

cu Andreas

Wirz

unread,
Oct 14, 2019, 3:15:01 PM10/14/19
to hugi...@googlegroups.com
My patch is is based on
https://cmake.org/cmake/help/v3.13/module/FindPythonInterp.html . I
must admit I don't understand how cmake finds python3.7 when using the
obsolete FindPythonInterp in your case.

Given that this command is not supported in future it might save us
trouble (and the requirement to specify the python version) to adapt the
cmake files.

cheers, lukas

signature.asc

T. Modes

unread,
Oct 19, 2019, 3:12:25 AM10/19/19
to hugin and other free panoramic software
Hi Lukas,


Am Donnerstag, 10. Oktober 2019 22:11:11 UTC+2 schrieb lukas:
The cmake command to find python executables and libraries has changed
in cmake 3.12.  As a results hugin doesn't build for example in the
current debian/testing.

Attached is a patch to fix this problem.  It's tested against
linux/cmake 3.13.4.  

I don't like the duplication of lot of code. (Especially under the aspect that nearly nobody is using/maintaining the Python interface and that there no practical applications of the script interface.)
I was aware of the changes. But current CMake version 3.16 still ships with FindPythonInterp which also finds Python 3.7 and 3.8. It is only marked as deprecated.
Maybe it is sufficient for you to specify the Python version explicit on the command line as Andreas does or update CMake to a more up-to-date version, which also support current Python versions in FindPythonInterp.

Thomas

Wirz

unread,
Oct 19, 2019, 12:06:16 PM10/19/19
to hugi...@googlegroups.com
Hi Thomas,

That's fine by me. I still think that what I typed was close to the
correct (TM) solution but we can agree that it's not important enough to
justify the additional cmake code.

Thank you for merging the enblend patch!

cheers, lukas
signature.asc
Reply all
Reply to author
Forward
0 new messages