Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH 1/2] package/python-gobject: depend on python2
@ 2019-12-01  3:06 aduskett at gmail.com
  2019-12-01  3:06 ` [Buildroot] [PATCH 2/2] support/testing: add python-gobject test aduskett at gmail.com
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: aduskett at gmail.com @ 2019-12-01  3:06 UTC (permalink / raw)
  To: buildroot

From: Adam Duskett <Aduskett@gmail.com>

Version 2.86.6 of python-gobject is quite old and no longer works with
Python versions > 3.7. When importing a user will recieve the following error:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/lib/python3.8/site-packages/gobject/__init__.py", line 26, in
  <module>
  File "/usr/lib/python3.8/site-packages/glib/__init__.py", line 22, in <module>
SystemError: initialization of _glib raised unreported exception

Because new versions of python-gobject require gobject-introspection, which is
not currently available in Buildroot, add a dependency on python2 to prevent
users from receiving the above error.

Signed-off-by: Adam Duskett <Aduskett@gmail.com>
---
 package/python-gobject/Config.in | 1 +
 1 file changed, 1 insertion(+)

diff --git a/package/python-gobject/Config.in b/package/python-gobject/Config.in
index 475ff25185..fa801cd411 100644
--- a/package/python-gobject/Config.in
+++ b/package/python-gobject/Config.in
@@ -3,6 +3,7 @@ config BR2_PACKAGE_PYTHON_GOBJECT
 	depends on BR2_USE_WCHAR # libglib2
 	depends on BR2_TOOLCHAIN_HAS_THREADS # libglib2
 	depends on BR2_USE_MMU # libglib2
+	depends on BR2_PACKAGE_PYTHON # Broken with python 3.8
 	select BR2_PACKAGE_LIBGLIB2
 	help
 	  Python bindings for the GLib/GObject library
-- 
2.23.0

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [Buildroot] [PATCH 2/2] support/testing: add python-gobject test
  2019-12-01  3:06 [Buildroot] [PATCH 1/2] package/python-gobject: depend on python2 aduskett at gmail.com
@ 2019-12-01  3:06 ` aduskett at gmail.com
  2019-12-01  9:01 ` [Buildroot] [PATCH 1/2] package/python-gobject: depend on python2 Thomas Petazzoni
  2019-12-06  9:01 ` Peter Korsgaard
  2 siblings, 0 replies; 4+ messages in thread
From: aduskett at gmail.com @ 2019-12-01  3:06 UTC (permalink / raw)
  To: buildroot

From: Adam Duskett <Aduskett@gmail.com>

Add a simple test case that imports the module.

Signed-off-by: Adam Duskett <Aduskett@gmail.com>
---
 DEVELOPERS                                            |  1 +
 .../testing/tests/package/sample_python_gobject.py    |  1 +
 support/testing/tests/package/test_python_gobject.py  | 11 +++++++++++
 3 files changed, 13 insertions(+)
 create mode 100644 support/testing/tests/package/sample_python_gobject.py
 create mode 100644 support/testing/tests/package/test_python_gobject.py

diff --git a/DEVELOPERS b/DEVELOPERS
index 16e8510b0a..90aa50d789 100644
--- a/DEVELOPERS
+++ b/DEVELOPERS
@@ -75,6 +75,7 @@ F:	package/setools/
 F:	package/sngrep/
 F:	package/spidermonkey/
 F:	package/systemd/
+F:	support/testing/tests/package/test_python_gobject.py
 
 N:	Adam Heinrich <adam@adamh.cz>
 F:	package/jack1/
diff --git a/support/testing/tests/package/sample_python_gobject.py b/support/testing/tests/package/sample_python_gobject.py
new file mode 100644
index 0000000000..84ebee7362
--- /dev/null
+++ b/support/testing/tests/package/sample_python_gobject.py
@@ -0,0 +1 @@
+import gobject  # noqa
diff --git a/support/testing/tests/package/test_python_gobject.py b/support/testing/tests/package/test_python_gobject.py
new file mode 100644
index 0000000000..0a59447adb
--- /dev/null
+++ b/support/testing/tests/package/test_python_gobject.py
@@ -0,0 +1,11 @@
+from tests.package.test_python import TestPythonPackageBase
+
+
+class TestPythonPy2Gobject(TestPythonPackageBase):
+    __test__ = True
+    config = TestPythonPackageBase.config + \
+        """
+        BR2_PACKAGE_PYTHON=y
+        BR2_PACKAGE_PYTHON_GOBJECT=y
+        """
+    sample_scripts = ["tests/package/sample_python_gobject.py"]
-- 
2.23.0

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [Buildroot] [PATCH 1/2] package/python-gobject: depend on python2
  2019-12-01  3:06 [Buildroot] [PATCH 1/2] package/python-gobject: depend on python2 aduskett at gmail.com
  2019-12-01  3:06 ` [Buildroot] [PATCH 2/2] support/testing: add python-gobject test aduskett at gmail.com
@ 2019-12-01  9:01 ` Thomas Petazzoni
  2019-12-06  9:01 ` Peter Korsgaard
  2 siblings, 0 replies; 4+ messages in thread
From: Thomas Petazzoni @ 2019-12-01  9:01 UTC (permalink / raw)
  To: buildroot

On Sat, 30 Nov 2019 19:06:55 -0800
aduskett at gmail.com wrote:

> From: Adam Duskett <Aduskett@gmail.com>
> 
> Version 2.86.6 of python-gobject is quite old and no longer works with
> Python versions > 3.7. When importing a user will recieve the following error:
> 
> Traceback (most recent call last):
>   File "<stdin>", line 1, in <module>
>   File "/usr/lib/python3.8/site-packages/gobject/__init__.py", line 26, in
>   <module>
>   File "/usr/lib/python3.8/site-packages/glib/__init__.py", line 22, in <module>
> SystemError: initialization of _glib raised unreported exception
> 
> Because new versions of python-gobject require gobject-introspection, which is
> not currently available in Buildroot, add a dependency on python2 to prevent
> users from receiving the above error.
> 
> Signed-off-by: Adam Duskett <Aduskett@gmail.com>

This commit "fixes" bug https://bugs.busybox.net/show_bug.cgi?id=12286

> diff --git a/package/python-gobject/Config.in b/package/python-gobject/Config.in
> index 475ff25185..fa801cd411 100644
> --- a/package/python-gobject/Config.in
> +++ b/package/python-gobject/Config.in
> @@ -3,6 +3,7 @@ config BR2_PACKAGE_PYTHON_GOBJECT
>  	depends on BR2_USE_WCHAR # libglib2
>  	depends on BR2_TOOLCHAIN_HAS_THREADS # libglib2
>  	depends on BR2_USE_MMU # libglib2
> +	depends on BR2_PACKAGE_PYTHON # Broken with python 3.8

You forgot to update the Config.in comment regarding this new
dependency. I don't know if we need to show a comment about this being
not available with Python 3.x, but at least the existing comment about
threads/wchar dependency should only be shown if BR2_PACKAGE_PYTHON=y.

Thanks,

Thomas
-- 
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Buildroot] [PATCH 1/2] package/python-gobject: depend on python2
  2019-12-01  3:06 [Buildroot] [PATCH 1/2] package/python-gobject: depend on python2 aduskett at gmail.com
  2019-12-01  3:06 ` [Buildroot] [PATCH 2/2] support/testing: add python-gobject test aduskett at gmail.com
  2019-12-01  9:01 ` [Buildroot] [PATCH 1/2] package/python-gobject: depend on python2 Thomas Petazzoni
@ 2019-12-06  9:01 ` Peter Korsgaard
  2 siblings, 0 replies; 4+ messages in thread
From: Peter Korsgaard @ 2019-12-06  9:01 UTC (permalink / raw)
  To: buildroot

>>>>> "aduskett" == aduskett  <aduskett@gmail.com> writes:

 > From: Adam Duskett <Aduskett@gmail.com>
 > Version 2.86.6 of python-gobject is quite old and no longer works with
 > Python versions > 3.7. When importing a user will recieve the following error:

 > Traceback (most recent call last):
 >   File "<stdin>", line 1, in <module>
 >   File "/usr/lib/python3.8/site-packages/gobject/__init__.py", line 26, in
 >   <module>
 >   File "/usr/lib/python3.8/site-packages/glib/__init__.py", line 22, in <module>
 > SystemError: initialization of _glib raised unreported exception

 > Because new versions of python-gobject require gobject-introspection, which is
 > not currently available in Buildroot, add a dependency on python2 to prevent
 > users from receiving the above error.

 > Signed-off-by: Adam Duskett <Aduskett@gmail.com>

Committed to 2019.11.x, thanks.

-- 
Bye, Peter Korsgaard

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2019-12-06  9:01 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-12-01  3:06 [Buildroot] [PATCH 1/2] package/python-gobject: depend on python2 aduskett at gmail.com
2019-12-01  3:06 ` [Buildroot] [PATCH 2/2] support/testing: add python-gobject test aduskett at gmail.com
2019-12-01  9:01 ` [Buildroot] [PATCH 1/2] package/python-gobject: depend on python2 Thomas Petazzoni
2019-12-06  9:01 ` Peter Korsgaard

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox