Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 879523

Summary: dev-python/sip-6.7.3 misspelled property name in pyi.py
Product: Gentoo Linux Reporter: Stefan Prostler <stefan.prostler>
Component: Current packagesAssignee: Qt Bug Alias <qt>
Status: RESOLVED FIXED    
Severity: normal CC: espinafre, sam
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: patch

Description Stefan Prostler 2022-11-04 08:50:14 UTC
Created attachment 826909 [details, diff]
patch

When emerging sci-geosciences/qgis-3.26.3 process failed with 
 
```bash
Querying qmake about your Qt installation...
These bindings will be built: core.
Generating the core bindings...
Generating the _core .pyi file...
sip-build: An internal error occurred...
Traceback (most recent call last):
  File "/usr/lib/python-exec/python3.10/sip-build", line 8, in <module>
    sys.exit(main())
  File "/usr/lib/python3.10/site-packages/sipbuild/tools/build.py", line 37, in main
    handle_exception(e)
  File "/usr/lib/python3.10/site-packages/sipbuild/exceptions.py", line 81, in handle_exception
    raise e
  File "/usr/lib/python3.10/site-packages/sipbuild/tools/build.py", line 34, in main
    project.build()
  File "/usr/lib/python3.10/site-packages/sipbuild/project.py", line 244, in build
    self.builder.build()
  File "/usr/lib/python3.10/site-packages/sipbuild/builder.py", line 48, in build
    self._generate_bindings()
  File "/usr/lib/python3.10/site-packages/sipbuild/builder.py", line 277, in _generate_bindings
    buildable = bindings.generate()
  File "/usr/lib/python3.10/site-packages/sipbuild/bindings.py", line 214, in generate
    output_pyi(spec, pyi_path)
  File "/usr/lib/python3.10/site-packages/sipbuild/generator/outputs/pyi.py", line 55, in output_pyi
    _module(pf, spec, module)
  File "/usr/lib/python3.10/site-packages/sipbuild/generator/outputs/pyi.py", line 125, in _module
    _class(pf, spec, module, klass, defined)
  File "/usr/lib/python3.10/site-packages/sipbuild/generator/outputs/pyi.py", line 255, in _class
    _class(pf, spec, module, nested, defined, indent)
  File "/usr/lib/python3.10/site-packages/sipbuild/generator/outputs/pyi.py", line 285, in _class
    _property(pf, spec, module, prop, False, getter, klass.overloads,
  File "/usr/lib/python3.10/site-packages/sipbuild/generator/outputs/pyi.py", line 498, in _property
    s += f'def {prop.name.name}{sinature}: ...\n'
NameError: name 'sinature' is not defined. Did you mean: 'signature'?
```

Looks like a typo in dev-python/sip-6.7.3
Proposed patch

```diff
diff --git a/sipbuild/generator/outputs/pyi.py b/sipbuild/generator/outputs/pyi.py
index 4c3705c..f601b9c 100644
--- a/sipbuild/generator/outputs/pyi.py
+++ b/sipbuild/generator/outputs/pyi.py
@@ -495,7 +495,7 @@ def _property(pf, spec, module, prop, is_setter, member, overloads, defined,
                 defined)
 
         s = _indent(indent)
-        s += f'def {prop.name.name}{sinature}: ...\n'
+        s += f'def {prop.name.name}{signature}: ...\n'
         pf.write(s)
 
         break
Comment 1 Stefan Prostler 2022-11-04 08:53:27 UTC
Involves dev-python/sip-6.7.3
and  sci-geosciences/qgis-3.26.3
Comment 2 José de Paula Rodrigues 2022-11-04 20:31:13 UTC
Same error when building qgis-9999. The proposed user patch works wonderfully for me, thanks.
Comment 3 Larry the Git Cow gentoo-dev 2022-11-05 06:35:49 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2c7f2d51f490c7e18fa9cc6ce8da8c5f3ea427cc

commit 2c7f2d51f490c7e18fa9cc6ce8da8c5f3ea427cc
Author:     Sam James <sam@gentoo.org>
AuthorDate: 2022-11-05 06:31:42 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2022-11-05 06:31:42 +0000

    dev-python/sip: add 6.7.4
    
    Closes: https://bugs.gentoo.org/879523
    Signed-off-by: Sam James <sam@gentoo.org>

 dev-python/sip/Manifest         |  1 +
 dev-python/sip/sip-6.7.4.ebuild | 34 ++++++++++++++++++++++++++++++++++
 2 files changed, 35 insertions(+)

Additionally, it has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=350a9431779c5ae619234fb749e5e344662995ba

commit 350a9431779c5ae619234fb749e5e344662995ba
Author:     Sam James <sam@gentoo.org>
AuthorDate: 2022-11-05 06:31:58 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2022-11-05 06:31:58 +0000

    dev-python/sip: drop 6.7.3
    
    Bug: https://bugs.gentoo.org/879523
    Signed-off-by: Sam James <sam@gentoo.org>

 dev-python/sip/Manifest         |  1 -
 dev-python/sip/sip-6.7.3.ebuild | 34 ----------------------------------
 2 files changed, 35 deletions(-)