--disable-python does not fully disable Python (which leads to compile errors)

Bug #424481 reported by Sebastian Pipping
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Referencer
New
Undecided
Unassigned

Bug Description

In src/PluginManager.h the header Python.h i included in spite of --disable-python which leads to this compile error:

In file included from Preferences.h:23,
                 from BibData.C:20:
PluginManager.h:8:20: error: Python.h: No such file or directory

Version of referencer is 1.1.6.

Please see related bug in Gentoo for more details:
https://bugs.gentoo.org/show_bug.cgi?id=164750

Revision history for this message
Daniel Landau (daniel-landau) wrote :

Hi,

The attached patch (created with bzr send, I hope that's correct way to do it) allows building without a python installed. It compiles and seems to run fine.

Revision history for this message
Mads Chr. Olesen (shiyee) wrote :

Thank you for the patch!
However, a lot has happened in Referencer in the last couple of years: a lof of the functionality is moving towards being implemented by Python plugins. Furthermore, most (all?) distributions are building WITH Python support.

Is there a genuine need for being able to build WITHOUT Python support today?

Otherwise, I would lean towards not having an "--disable-python" option, and making Python a hard requirement.

Revision history for this message
Daniel Landau (daniel-landau) wrote :

I think it's mostly Gentoo. There's this system of "USE" flags in Gentoo which allow customizing packages at build-time to include or exclude features such as GUI toolkit support, alsa, and python just to mention a few. (Build-time ~ install-time in Gentoo as the default way to install packages is from source).

I don't use Gentoo, but as the basic functionality seems to work fine without Python I think the Gentoo folks would appreciate the option of building without it.

(I forgot to include "config.h" in some places, here's a fixed patch)

Revision history for this message
Mads Chr. Olesen (shiyee) wrote :

But are there actually users, today, who build without Python?

Having the option in the source code is an additional burden (albeit small at first), but a burden at no benefit. I would rather make Python a hard requirement.

Revision history for this message
Daniel Landau (daniel-landau) wrote :

Well today, no, because it's not possible to build without Python as it stands.

I agree that making Python a hard requirement is another valid option, feel free to go with that instead. (you might want to at the same time fix the Python support for systems where the default interpreter is Python 3, see e.g. https://aur.archlinux.org/packages/re/referencer/PKGBUILD).

Revision history for this message
Sebastian Pipping (sebastian-pipping) wrote :

I'd be as happy with Python as a hard build requirement as with a working --disable-python.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.