Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pygtkglext: init at 1.1.0 #42555

Closed
wants to merge 1 commit into from
Closed

pygtkglext: init at 1.1.0 #42555

wants to merge 1 commit into from

Conversation

numinit
Copy link
Contributor

@numinit numinit commented Jun 25, 2018

This is a rather old library that is a dependency of the xpra client.
If it's not provided, the xpra client warns you.

Motivation for this change

This library was missing and xpra was warning me.

This is my first new derivation, let me know if anything looks unnecessary. This package's setup.py doesn't even work, so I had to use the standard build process. Is there a way that the site-packages folder can automatically be added to Python's module search directories? I'm not sure it's totally functional at this point.

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nox --run "nox-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Fits CONTRIBUTING.md.

Copy link
Member

@FRidh FRidh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks mostly OK, some small changes are needed.

However, I'm not so sure we should add this package. It is indeed old. You mention you saw warnings, but if everything works fine without this package, why add it?

{ stdenv, fetchurl, buildPythonPackage, pkgconfig, gtk2, pygtk, gtkglext, pygobject2
, libglade ? null, libGLU, xorg, isPy3k }:

stdenv.mkDerivation rec {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

buildPythonPackage and pass format = "other";

stdenv.mkDerivation rec {
pname = "pygtkglext";
version = "1.1.0";
name = pname + "-" + version;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The name attribute is added by buildPython* and should therefore be removed.

pygtk pygobject2 gtk2 gtkglext
libGLU xorg.libXmu
];
configureScript = "./configure";
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this would not be needed.

@numinit
Copy link
Contributor Author

numinit commented Jun 25, 2018

Here are the logs from attaching to a locally running xpra session:

2018-06-25 09:14:18,740  running on Linux
2018-06-25 09:14:18,741 Warning: failed to import opencv:
2018-06-25 09:14:18,741  No module named cv2
2018-06-25 09:14:18,741  webcam forwarding is disabled
Error: cannot get X11 property 'PULSE_SERVER'
Traceback (most recent call last):
  File "/nix/store/m3vai0plam6jswcxq11981l8qyhnyln7-xpra-2.1.3/lib/python2.7/site-packages/xpra/sound/pulseaudio/pulseaudio_common_util.py", line 24, in get_x11_property
    from xpra.x11.bindings.window_bindings import X11WindowBindings
  File "xpra/x11/bindings/window_bindings.pyx", line 12, in init xpra.x11.bindings.window_bindings
  File "/nix/store/m3vai0plam6jswcxq11981l8qyhnyln7-xpra-2.1.3/lib/python2.7/site-packages/xpra/gtk_common/error.py", line 42, in <module>
    gdk = import_gdk()
  File "/nix/store/m3vai0plam6jswcxq11981l8qyhnyln7-xpra-2.1.3/lib/python2.7/site-packages/xpra/gtk_common/gobject_compat.py", line 118, in import_gdk
    return  _try_import(import_gdk3, import_gdk2)
  File "/nix/store/m3vai0plam6jswcxq11981l8qyhnyln7-xpra-2.1.3/lib/python2.7/site-packages/xpra/gtk_common/gobject_compat.py", line 38, in _try_import
    return  import_method_gtk3()
  File "/nix/store/m3vai0plam6jswcxq11981l8qyhnyln7-xpra-2.1.3/lib/python2.7/site-packages/xpra/gtk_common/gobject_compat.py", line 113, in import_gdk3
    gi.require_version('Gdk', '3.0')
  File "/nix/store/vlh89kxfdmldscnx37fhfhrlhjad4x78-python2.7-pygobject-3.26.1/lib/python2.7/site-packages/gi/__init__.py", line 134, in require_version
    (namespace, version))
ValueError: Namespace Gdk not available for version 3.0
 for python sys.version_info(major=2, minor=7, micro=15, releaselevel='final', serial=0)
 xpra command=['/nix/store/m3vai0plam6jswcxq11981l8qyhnyln7-xpra-2.1.3/bin/.xpra-wrapped', '_sound_query']
2018-06-25 09:14:18,915 GStreamer version 1.12.3 for Python 2.7.15 64-bit
2018-06-25 09:14:18,997 OpenGL support is missing:
2018-06-25 09:14:18,998  cannot import name gdkgl

I'm not sure what it falls back to without OpenGL support, but that message seemed scary enough that it was worth looking into what provides gdkgl.

This is a rather old library that is a dependency of the xpra client.
If it's not provided, the xpra client warns you.
@jtojnar
Copy link
Contributor

jtojnar commented Jun 25, 2018

It looks like there is new xpra (2.3.1) which should support GTK 3 and Python 3. This is therefore unnecessary if we update the package.

@numinit
Copy link
Contributor Author

numinit commented Jun 25, 2018

D'oh, I was testing with the version of xpra from 18.03. Thanks for the heads up.

@numinit numinit closed this Jun 25, 2018
@jtojnar
Copy link
Contributor

jtojnar commented Jun 25, 2018

Note that our package still uses GTK 2, because it was auto-updated. It should be changed to Python 3 and Gtk 3 and then xpraGtk3 package should be removed.

@numinit numinit deleted the pygtkglext branch July 13, 2018 06:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants