public inbox for cygwin-apps@cygwin.com
 help / color / mirror / Atom feed
From: Lemures Lemniscati <lemures.lemniscati@gmail.com>
To: cygwin-apps@cygwin.com
Subject: Re: g-ir-scanner fails with python-3.8
Date: Sun, 23 May 2021 08:44:24 +0900	[thread overview]
Message-ID: <20210523084421.9873.50F79699@gmail.com> (raw)
In-Reply-To: <32e99f35-dff1-5374-6410-2c5b34879bfc@dronecode.org.uk>

[-- Attachment #1: Type: text/plain, Size: 1610 bytes --]

On Wed, 19 May 2021 22:09:59 +0100, Jon Turney
> On 19/05/2021 20:32, Ken Brown via Cygwin-apps wrote:
> > Trying to build harfbuzz, I get the following python failure with
> > python-3.8
> >
> > Traceback (most recent call last):
....
> >    File "/usr/lib/gobject-introspection/giscanner/xmlwriter.py", line
> > 46, in <module>
> >      from giscanner._giscanner import collect_attributes
> > ImportError: dynamic module does not define module export function
> > (PyInit__giscanner)
> 
> This a problem with the gobject-introspection package.
> 
> _giscanner.dll is linked with python2, but the shbang names 'python', which is now python3.
> 
> I have been working on rebuilding this package, but not quite there yet.
> 
> You can work around this by fixing the shebang in /usr/bin/g-ir-scanner to explicitly name python3.


Here are patches...

* 0002-gobject-introspection-1.54.1-4.patch:
    python3.8 is used explicitly.
      Shebangs of g-ir-doc-tool and g-ir-scanner are '/usr/bin/env python3.8'
      _giscanner.dll is linked with libpython3.8.dll

* 0001-Fix-a-patch-for-giscanner-shlibs.py-to-pass-a-pep8-c.patch:
    This has no effect while building.
    But needed in order to avoid an error in a test
      cygport gobject-introspection.cygport test

And with them, following build and test by cygport has succeeded
both in x86_64 and i686, on my local machine.

  cygport gobject-introspection.cygport download finish all test


But on scallywag, only x86_64 build is successful:
https://cygwin.com/cgi-bin2/jobs.cgi?id=2841


Regards,

Lem

[-- Attachment #2: 0001-Fix-a-patch-for-giscanner-shlibs.py-to-pass-a-pep8-c.patch --]
[-- Type: application/octet-stream, Size: 829 bytes --]

From 6099555188a005051e56e2e517ffdb2a8d380cda Mon Sep 17 00:00:00 2001
From: Lemures Lemniscati <lemures.lemniscati@gmail.com>
Date: Sat, 22 May 2021 23:25:36 +0900
Subject: [PATCH] Fix a patch for giscanner/shlibs.py to pass a pep8 check

---
 1.54.1-2-cygwin.patch | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/1.54.1-2-cygwin.patch b/1.54.1-2-cygwin.patch
index 96a8c62..c25836d 100644
--- a/1.54.1-2-cygwin.patch
+++ b/1.54.1-2-cygwin.patch
@@ -96,7 +96,7 @@
      if platform.system() == 'Darwin':
          pattern = "([^\s]*lib*%s[^A-Za-z0-9_-][^\s\(\)]*)"
 +    elif platform.platform().startswith('CYGWIN'):
-+        pattern = "([^\s]*cyg%s[-.0-9]*\.[^\s\(\)]*)" 
++        pattern = "([^\s]*cyg%s[-.0-9]*\.[^\s\(\)]*)"
      return re.compile(pattern % re.escape(library_name))
  
  
-- 
2.31.1


[-- Attachment #3: 0002-gobject-introspection-1.54.1-4.patch --]
[-- Type: application/octet-stream, Size: 1699 bytes --]

From 1f435122b29fdc5a7c3f71f6da0cb28bbb843847 Mon Sep 17 00:00:00 2001
From: Lemures Lemniscati <lemures.lemniscati@gmail.com>
Date: Sat, 22 May 2021 23:25:37 +0900
Subject: [PATCH] gobject-introspection 1.54.1-4

Use python3.8 explicitly

  Shebangs of g-ir-doc-tool and g-ir-scanner are '/usr/bin/env python3.8'
  _giscanner.dll is linked with libpython3.8.dll
---
 gobject-introspection.cygport | 14 ++++++++------
 1 file changed, 8 insertions(+), 6 deletions(-)

diff --git a/gobject-introspection.cygport b/gobject-introspection.cygport
index 11af658..8e1ef29 100644
--- a/gobject-introspection.cygport
+++ b/gobject-introspection.cygport
@@ -1,8 +1,8 @@
-inherit gnome2 python2
+inherit gnome2 python3
 
 NAME="gobject-introspection"
 VERSION=1.54.1
-RELEASE=3
+RELEASE=4
 CATEGORY="Libs"
 SUMMARY="GObject Introspection tools"
 DESCRIPTION="The goal of the project is to describe GObject APIs and collect
@@ -16,7 +16,8 @@ PATCH_URI="
 	1.54.1-2-cygwin.patch
 "
 
-CYGCONF_ARGS="--with-python=python2"
+PYTHON3=python3.8
+CYGCONF_ARGS="--with-python=${PYTHON3}"
 
 PKG_NAMES="${NAME} libgirepository1.0_1 libgirepository1.0-devel libgirepository1.0-doc"
 gobject_introspection_CATEGORY="Devel"
@@ -47,14 +48,15 @@ girepository_x11_CONTENTS="--exclude=cairo-1.0.* --exclude=G*-2.0.* usr/*/gir*/"
 
 DIFF_EXCLUDES="config.py *.pc gi.types"
 
-gobject_introspection_REQUIRES="libgirepository1.0-devel python27-mako"
+gobject_introspection_REQUIRES="libgirepository1.0-devel python38-mako"
 
 BUILD_REQUIRES=" \
 	flex \
+	gnome-common \
 	gtk-doc \
 	libcairo-devel \
 	libffi-devel \
 	libglib2.0-devel \
-	python2-devel \
-	python27-mako \
+	python38-devel \
+	python38-mako \
 "
-- 
2.31.1


  reply	other threads:[~2021-05-22 23:44 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-19 19:32 Ken Brown
2021-05-19 21:09 ` Jon Turney
2021-05-22 23:44   ` Lemures Lemniscati [this message]
2021-05-23  3:51     ` Marco Atzeri
2021-05-23  4:01       ` Marco Atzeri
2021-05-23  4:45         ` Marco Atzeri
2021-05-23  5:04         ` Lemures Lemniscati
2023-01-12 19:50           ` Jon Turney
2021-05-23  6:00     ` Brian Inglis
2021-05-23 11:50       ` Lemures Lemniscati
2021-05-23 18:17         ` Jon Turney
2021-05-23 18:13     ` Jon Turney
2021-05-19 21:21 ` Marco Atzeri

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210523084421.9873.50F79699@gmail.com \
    --to=lemures.lemniscati@gmail.com \
    --cc=cygwin-apps@cygwin.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).