Opened 3 weeks ago

Closed 3 weeks ago

Last modified 3 weeks ago

#70667 closed defect (fixed)

gobject-introspection @1.78.1_2: g-ir-scanner doesn't work with setuptools 74.0.0

Reported by: christophecvr (christophecvr) Owned by: mascguy (Christopher Nielsen)
Priority: Normal Milestone:
Component: ports Version:
Keywords: Cc: jmroot (Joshua Root), RobK88
Port: gobject-introspection py-setuptools

Description

Since the upgrade of py-setuptools to version 74.0.0 all packages requiring Gobject and needing g-ir-scanner do not configure anymore with error message :

Traceback (most recent call last):
  File "/opt/local/var/macports/build/_opt_mports_macports-ports_gnome_gobject-introspection/gobject-introspection/work/build/tools/g-ir-scanner", line 103, in <module>
    from giscanner.scannermain import scanner_main
  File "/opt/local/var/macports/build/_opt_mports_macports-ports_gnome_gobject-introspection/gobject-introspection/work/build/giscanner/scannermain.py", line 35, in <module>
    from giscanner.ast import Include, Namespace
  File "/opt/local/var/macports/build/_opt_mports_macports-ports_gnome_gobject-introspection/gobject-introspection/work/build/giscanner/ast.py", line 29, in <module>
    from .sourcescanner import CTYPE_TYPEDEF, CSYMBOL_TYPE_TYPEDEF
  File "/opt/local/var/macports/build/_opt_mports_macports-ports_gnome_gobject-introspection/gobject-introspection/work/build/giscanner/sourcescanner.py", line 25, in <module>
    from .ccompiler import CCompiler
  File "/opt/local/var/macports/build/_opt_mports_macports-ports_gnome_gobject-introspection/gobject-introspection/work/build/giscanner/ccompiler.py", line 29, in <module>
    from distutils.msvccompiler import MSVCCompiler
ModuleNotFoundError: No module named 'distutils.msvccompiler'

Found the difference concerning version-72.2.0 and the new one 74.0.0 The msvccompiler is build in both versions. With one exception. In the version-72.2.0 We find the same compiler module under 2 names :

  • -msvccompiler.py
  • msvccompiler.py

With version 74.0.0. only one name

  • -msvccompiler.py

Since g-ir-scanner is only searching under the name :

  • distutils.msvccompiler

it does not find it.

How to solve ? I do not know. But this is a critical issue.

I downgraded py-setuptools for the time.

Change History (9)

comment:1 Changed 3 weeks ago by reneeotten (Renee Otten)

Cc: jmroot added
Port: gi-ir-scanner added
Priority: HighNormal

comment:2 in reply to:  1 Changed 3 weeks ago by christophecvr (christophecvr)

Replying to reneeotten:

Hello nice you see the ticket. I did see you changed the Priority to normal.

For Info : If You find so not my decision anyway but ...

This is a critical build issue for so what all gobject related packages. All packages using the gi-ir-scanner will fail to build.

comment:3 Changed 3 weeks ago by jmroot (Joshua Root)

Owner: set to mascguy
Port: gobject-introspection added; gi-ir-scanner removed
Status: newassigned
Summary: Upgrade py-setuptools to versions 74.0.0 breaks g-ir-scannergobject-introspection @1.78.1_2: g-ir-scanner doesn't work with setuptools 74.0.0

distutils.msvccompiler was initially removed two years ago: https://setuptools.pypa.io/en/stable/history.html#v65-0-0

It was subsequently restored to give a longer deprecation period, and has been raising deprecation warnings this whole time.

Upstream PR: https://gitlab.gnome.org/GNOME/gobject-introspection/-/merge_requests/490

comment:4 Changed 3 weeks ago by kencu (Ken)

if it was raising warnings before, it's raising errors now.

This patch fixed it for me:

https://gitlab.gnome.org/GNOME/gobject-introspection/-/merge_requests/490/diffs?commit_id=fcf79ca8d068d2e30a6aefdc42dcc6aeab4655e2

The MR is still open, but looks like approved by EB who is a big cheese there.

comment:5 in reply to:  4 Changed 3 weeks ago by christophecvr (christophecvr)

Replying to kencu:

if it was raising warnings before, it's raising errors now.

This patch fixed it for me:

https://gitlab.gnome.org/GNOME/gobject-introspection/-/merge_requests/490/diffs?commit_id=fcf79ca8d068d2e30a6aefdc42dcc6aeab4655e2

The MR is still open, but looks like approved by EB who is a big cheese there.

Thank's for this, I made a patch to our gobject-introspection version with this changes and problems are solved.

The patch I made can be found on:

https://github.com/christophecvr/macports-ports/commit/7437dfab028df6c603c70dcfcd760ca5c4fa5cd3

Changed repo's on :

https://github.com/christophecvr/macports-ports/tree/cvrquartzx11/gnome/gobject-introspection

comment:6 Changed 3 weeks ago by christophecvr (christophecvr)

For some of You you al so maybe interested in the solution to a current bug in meson-1.5.1 which occurs when searching a framework containing Gobj library's and in the project the CXXFLAG -std=c++* -std=gnu++* is needed when using clang.

Those flag breaks the clang search command used with message:

error: invalid argument '-std=gnu++17' not allowed with 'C'

As example.

There is a simple patch for that. I will submit it to meson coming week. patch is

https://github.com/christophecvr/macports-ports/blob/cvrquartzx11/python/py-meson/files/patch-meson-unbreak-framework-find.diff

comment:7 Changed 3 weeks ago by RobK88

Cc: RobK88 added

comment:8 Changed 3 weeks ago by ryandesign (Ryan Carsten Schmidt)

Resolution: fixed
Status: assignedclosed

In bd6d608c8525b6f2ac49818eff47da98454e8fe1/macports-ports (master):

gobject-introspection: Fix giscanner with setuptools 74

Closes: #70667

comment:9 Changed 3 weeks ago by christophecvr (christophecvr)

In 96fdd5cd816c41e63dc947340b560707f92313da/macports-ports (master):

gobject-introspection-devel: Fix giscanner with setuptools 74

Closes: #70667

Note: See TracTickets for help on using tickets.