FS#54742 - [geany-plugins] add python2 "geanypy" plugin

Attached to Project: Community Packages
Opened by David McInnis (daavve) - Saturday, 08 July 2017, 23:15 GMT
Last edited by Alexander F. Rødseth (xyproto) - Wednesday, 19 July 2017, 12:48 GMT
Task Type Feature Request
Category Packages
Status Closed
Assigned To Alexander F. Rødseth (xyproto)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 1
Private No

Details

Description:

The .configure script in geanypy-plugins uses the PYTHON environtment variable for finding the python2 binary, library, and header files. With the PYTHON variable unset the resulting makefiles use python3 in Makefile and header generation.

This causes problems building the geanypy plugin because geanypy is python2 all makefiles need to point to python2 components, not python3

Additional info:
* community/geany-plugins 1.30-1


Steps to reproduce:

install geany
Download PKGBUILD for geany-plugins-1.30-1
use makepkg script

You will probably get something like the following:
make[3]: Entering directory '/home/dave/projects/geany-plugins/pkg/src/geany-plugins-1.30/geanypy/src'
CC geanypy_la-geanypy-app.lo
CC geanypy_la-geanypy-dialogs.lo
CC geanypy_la-geanypy-document.lo
CC geanypy_la-geanypy-editor.lo
geanypy-app.c: In function ‘App_dealloc’:
geanypy-app.c:18:8: error: ‘App {aka struct <anonymous>}’ has no member named ‘ob_type’; did you mean ‘ob_base’?
self->ob_type->tp_free((PyObject *) self);
This error results from geanypy.h, including <Python.h> instead of <python2.7/Python.h>

How to fix:
Add this change to the PKGBUILD Script
----------------------------------------------------------------------------------------
2a3
> # Contributor: David McInnis <dave@dave3.xyz>
23,24c24,25
<
< ./configure --prefix=/usr --libexecdir=/usr/lib
---
>
> PYTHON=/usr/bin/python2 ./configure --prefix=/usr --libexecdir=/usr/lib
----------------------------------------------------------------------------------------

This task depends upon

Closed by  Alexander F. Rødseth (xyproto)
Wednesday, 19 July 2017, 12:48 GMT
Reason for closing:  Fixed
Additional comments about closing:  The updated package will appear shortly in [community].
Comment by Eli Schwartz (eschwartz) - Sunday, 09 July 2017, 02:52 GMT
  • Field changed: Task Type (Bug Report → Feature Request)
  • Field changed: Summary (geany-plugins needs PYTHON2 environment vairable set when running .configure → [geany-plugins] add python2 "geanypy" plugin)
  • Field changed: Status (Unconfirmed → Assigned)
  • Field changed: Severity (Medium → Low)
  • Task assigned to Alexander F. Rødseth (xyproto)
Since neither python nor python2 are in the default build chroot, and python2 is not in the depends array this package simply doesn't build the geanypy plugin at all. Changing to a feature request, to build that plugin.
Comment by Alexander F. Rødseth (xyproto) - Sunday, 09 July 2017, 13:46 GMT
Thanks for reporting. I'll look into adding the geanypy plugin.
Comment by David McInnis (daavve) - Saturday, 15 July 2017, 19:16 GMT
Thanks for looking into this Alexander. I am somewhat unfamiliar with the build process, so I thought it was similar to just using makepkg inside a typical Arch install.
Comment by Alexander F. Rødseth (xyproto) - Saturday, 15 July 2017, 23:03 GMT
I want to see if there is a way to add support for Python 3 instead of Python 2 which will be phased out and unsupported 900 days from now.
Comment by David McInnis (daavve) - Saturday, 15 July 2017, 23:17 GMT
I would much prefer python3 as well!

I think the most natural place for Python 3 Geanypy plugin is upstream:

https://github.com/geany/geany-plugins/

I'm almost certain this requires writing a new Plugin for Python3. It doesn't sound too hard, I'll take a look at it.

-Dave
Comment by Alexander F. Rødseth (xyproto) - Wednesday, 19 July 2017, 12:47 GMT
Added the geanypy plugin for Python 2.

If there is support for Python 3 in the future, please contact me (or re-open this bug report) and I'll try to add that plugin instead.

Loading...