[PATCH] Upgrade xpra to 4.0.2

  • Done
  • quality assurance status badge
Details
2 participants
  • Lars-Dominik Braun
  • Ludovic Courtès
Owner
unassigned
Submitted by
Lars-Dominik Braun
Severity
normal
L
L
Lars-Dominik Braun wrote on 27 Jun 2020 15:26
(address . guix-patches@gnu.org)(address . rhelling@mykolab.com)
20200627132655.GA1396@noor.fritz.box
Hi,

the following patchset upgrade xpra to version 4.0.2, which will finally
use Python 3 and GTK 3. It removes the Python 2 variants of PyOpenGL,
because xpra is the only dependent. I’ve been running this package for a
week now and connected to both version 4 and version 3 on an Ubuntu
machine, which still works. OpenGL also works, despite failing tests for
PyOpenGL.

Rutger: You have been working on xpra in the past. Could you take a
look and make sure I did not break any use case?

Cheers,
Lars
From 03f07d5544f5c4ef9baffe5924a14386d2128eff Mon Sep 17 00:00:00 2001
From: Lars-Dominik Braun <lars@6xq.net>
Date: Sat, 27 Jun 2020 15:06:14 +0200
Subject: [PATCH 1/6] gnu: Add python-pyopengl.

* gnu/packages/python-xyz.scm (python-pyopengl): New variable.
---
gnu/packages/python-xyz.scm | 46 +++++++++++++++++++++++++++++++++++++
1 file changed, 46 insertions(+)

Toggle diff (59 lines)
diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index 300277f045..d6966dceeb 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -15362,6 +15362,52 @@ library.")
(description
"This is the Cython-coded accelerator module for PyOpenGL.")))
+(define-public python-pyopengl
+ (package
+ (name "python-pyopengl")
+ (version "3.1.5")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (pypi-uri "PyOpenGL" version))
+ (sha256
+ (base32
+ "091lp9bpqi8yf1nmyg19xmvw611lrzq2q94cl1k5gnlh0c6vl1s1"))))
+ (build-system python-build-system)
+ (inputs
+ `(("mesa" ,mesa)
+ ("freeglut" ,freeglut)
+ ("glu" ,glu)))
+ (arguments
+ `(#:tests? #f ; Tests fail: AttributeError: 'GLXPlatform' object has no
+ ;attribute 'OSMesa'
+ #:phases
+ (modify-phases %standard-phases
+ (add-before 'build 'fix-paths
+ (lambda* (#:key inputs outputs #:allow-other-keys)
+ (substitute* '("OpenGL/platform/ctypesloader.py")
+ (("filenames_to_try = \\[\\]") "filenames_to_try = [name]"))
+ (substitute* '("OpenGL/platform/glx.py" "tests/check_glut_load.py")
+ (("'GL'")
+ (string-append "'" (assoc-ref inputs "mesa") "/lib/libGL.so'"))
+ (("'GLU'")
+ (string-append "'" (assoc-ref inputs "glu") "/lib/libGLU.so'"))
+ (("'glut',")
+ (string-append "'" (assoc-ref inputs "freeglut") "/lib/libglut.so',"))
+ (("'GLESv1_CM'")
+ (string-append "'" (assoc-ref inputs "mesa") "/lib/libGLESv1_CM.so'"))
+ (("'GLESv2'")
+ (string-append "'" (assoc-ref inputs "mesa") "/lib/libGLESv2.so'")))
+ ;; Not providing libgle. It seems to be very old.
+ #t)))))
+ (home-page "http://pyopengl.sourceforge.net")
+ (synopsis "Standard OpenGL bindings for Python")
+ (description
+ "PyOpenGL is the most common cross platform Python binding to OpenGL and
+related APIs. The binding is created using the standard @code{ctypes}
+library.")
+ (license license:bsd-3)))
+
(define-public python-rencode
(package
(name "python-rencode")
--
2.26.2
From d0d12814ae00154a20ad6d8bd9504a20f7d86161 Mon Sep 17 00:00:00 2001
From: Lars-Dominik Braun <lars@6xq.net>
Date: Sat, 27 Jun 2020 15:07:01 +0200
Subject: [PATCH 2/6] gnu: Add python-pyopengl-accelerate.

* gnu/packages/python-xyz.scm (gnu/packages/python-xyz.scm): New
variable.
---
gnu/packages/python-xyz.scm | 25 +++++++++++++++++++++++++
1 file changed, 25 insertions(+)

Toggle diff (38 lines)
diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index d6966dceeb..318d55360b 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -15408,6 +15408,31 @@ related APIs. The binding is created using the standard @code{ctypes}
library.")
(license license:bsd-3)))
+(define-public python-pyopengl-accelerate
+ (package
+ (inherit python-pyopengl)
+ (name "python-pyopengl-accelerate")
+ (version "3.1.5")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (pypi-uri "PyOpenGL-accelerate" version))
+ (sha256
+ (base32
+ "01iggy5jwxv7lxnj51zbmlbhag9wcb7dvrbwgi97i90n0a5m3r8j"))))
+ (inputs
+ `(("mesa" ,mesa)
+ ("python-numpy" ,python-numpy))) ; for cython module
+ ; numpy_formathandler, thus not propagated
+ (arguments
+ `(#:tests? #f
+ #:phases
+ (modify-phases %standard-phases
+ (delete 'fix-paths))))
+ (synopsis "Acceleration code for PyOpenGL")
+ (description
+ "This is the Cython-coded accelerator module for PyOpenGL.")))
+
(define-public python-rencode
(package
(name "python-rencode")
--
2.26.2
From cb4b362f34c1be34bf1e084bca19f8fec65e20e4 Mon Sep 17 00:00:00 2001
From: Lars-Dominik Braun <lars@6xq.net>
Date: Sat, 27 Jun 2020 15:15:03 +0200
Subject: [PATCH 6/6] gnu: python2-pyopengl: Remove.

* gnu/packages/python-xyz.scm (python2-pyopengl): Remove variable.
---
gnu/packages/python-xyz.scm | 22 ----------------------
1 file changed, 22 deletions(-)

Toggle diff (35 lines)
diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index c4eb1cd4f8..afa0bb21c4 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -15324,28 +15324,6 @@ functionality like full case-folding for case-insensitive matches in Unicode.")
(define-public python2-regex
(package-with-python2 python-regex))
-(define-public python2-pyopengl
- (package
- (name "python2-pyopengl")
- (version "3.1.0")
- (source
- (origin
- (method url-fetch)
- (uri (pypi-uri "PyOpenGL" version))
- (sha256
- (base32
- "1byxjj6a8rwzhxhjqlc588zdad2qwxdd7vlam2653ylll31waiwv"))))
- (arguments
- `(#:python ,python-2))
- (build-system python-build-system)
- (home-page "http://pyopengl.sourceforge.net")
- (synopsis "Standard OpenGL bindings for Python")
- (description
- "PyOpenGL is the most common cross platform Python binding to OpenGL and
-related APIs. The binding is created using the standard @code{ctypes}
-library.")
- (license license:bsd-3)))
-
(define-public python-pyopengl
(package
(name "python-pyopengl")
--
2.26.2
From b520f8dcde2dd916b4c94b8e9691292be258af2f Mon Sep 17 00:00:00 2001
From: Lars-Dominik Braun <lars@6xq.net>
Date: Sat, 27 Jun 2020 15:08:02 +0200
Subject: [PATCH 3/6] gnu: Add xf86-video-dummy.

* gnu/packages/xorg.scm (xf86-video-dummy): New variable.
---
gnu/packages/xorg.scm | 24 ++++++++++++++++++++----
1 file changed, 20 insertions(+), 4 deletions(-)

Toggle diff (37 lines)
diff --git a/gnu/packages/xorg.scm b/gnu/packages/xorg.scm
index 9b663aa158..f02d459d28 100644
--- a/gnu/packages/xorg.scm
+++ b/gnu/packages/xorg.scm
@@ -2827,10 +2827,26 @@ X server.")
X server.")
(license license:x11)))
-
-;; non-free license
-;; (define-public xf86-video-dummy
-
+(define-public xf86-video-dummy
+ (package
+ (name "xf86-video-dummy")
+ (version "0.3.8")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (string-append "mirror://xorg/individual/driver/"
+ "xf86-video-dummy-" version ".tar.bz2"))
+ (sha256
+ (base32 "1fcm9vwgv8wnffbvkzddk4yxrh3kc0np6w65wj8k88q7jf3bn4ip"))))
+ (build-system gnu-build-system)
+ (inputs `(("xorg-server" ,xorg-server)))
+ (native-inputs `(("pkg-config" ,pkg-config)))
+ (home-page "https://www.x.org/wiki/")
+ (synopsis "Dummy video driver for X server")
+ (description
+ "Virtual/offscreen frame buffer driver for the Xorg X server.")
+ ;; per https://lists.freedesktop.org/archives/xorg/2020-June/060316.html
+ (license license:x11)))
(define-public xf86-video-fbdev
(package
--
2.26.2
From ca8c4504f025ddd6ad67cf0fe4471c2dd1fa89c9 Mon Sep 17 00:00:00 2001
From: Lars-Dominik Braun <lars@6xq.net>
Date: Sat, 27 Jun 2020 15:14:25 +0200
Subject: [PATCH 5/6] gnu: python2-pyopengl-accelerate: Remove.

* gnu/packages/python-xyz.scm (python2-pyopengl-accelerate): Remove
variable.
---
gnu/packages/python-xyz.scm | 16 ----------------
1 file changed, 16 deletions(-)

Toggle diff (29 lines)
diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index 318d55360b..c4eb1cd4f8 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -15346,22 +15346,6 @@ related APIs. The binding is created using the standard @code{ctypes}
library.")
(license license:bsd-3)))
-(define-public python2-pyopengl-accelerate
- (package
- (inherit python2-pyopengl)
- (name "python2-pyopengl-accelerate")
- (version "3.1.0")
- (source
- (origin
- (method url-fetch)
- (uri (pypi-uri "PyOpenGL-accelerate" version))
- (sha256
- (base32
- "0464c1ifzk0k92lyndikmvzjgnx1y25r7bkkc8pnxm4kp1q4czwj"))))
- (synopsis "Acceleration code for PyOpenGL")
- (description
- "This is the Cython-coded accelerator module for PyOpenGL.")))
-
(define-public python-pyopengl
(package
(name "python-pyopengl")
--
2.26.2
L
L
Ludovic Courtès wrote on 11 Jul 2020 16:15
(name . Lars-Dominik Braun)(address . lars@6xq.net)
87zh86w31z.fsf@gnu.org
Hi Lars-Dominik,

Lars-Dominik Braun <lars@6xq.net> skribis:

Toggle quote (10 lines)
> the following patchset upgrade xpra to version 4.0.2, which will finally
> use Python 3 and GTK 3. It removes the Python 2 variants of PyOpenGL,
> because xpra is the only dependent. I’ve been running this package for a
> week now and connected to both version 4 and version 3 on an Ubuntu
> machine, which still works. OpenGL also works, despite failing tests for
> PyOpenGL.
>
> Rutger: You have been working on xpra in the past. Could you take a
> look and make sure I did not break any use case?

Rutger has been inactive in Guix for a few months (last commit in
Sep. 2019). If these patches work for you, I suggest applying them.
If it turns out to break another use case, we can always fix it up
afterwards.

WDYT?

Thanks,
Ludo’.
L
L
Lars-Dominik Braun wrote on 12 Jul 2020 08:12
(name . Ludovic Courtès)(address . ludo@gnu.org)
20200712061248.GA1318@noor.fritz.box
Hi Ludo,

Toggle quote (4 lines)
> Rutger has been inactive in Guix for a few months (last commit in
> Sep. 2019). If these patches work for you, I suggest applying them.
> If it turns out to break another use case, we can always fix it up
> afterwards.
oh, I did not know that. Sure, go ahead and feel free to CC me if any
problems arise.

Lars
L
L
Ludovic Courtès wrote on 13 Jul 2020 12:55
(name . Lars-Dominik Braun)(address . lars@6xq.net)
87mu43smz5.fsf@gnu.org
Hi,

Lars-Dominik Braun <lars@6xq.net> skribis:

Toggle quote (7 lines)
>> Rutger has been inactive in Guix for a few months (last commit in
>> Sep. 2019). If these patches work for you, I suggest applying them.
>> If it turns out to break another use case, we can always fix it up
>> afterwards.
> oh, I did not know that. Sure, go ahead and feel free to CC me if any
> problems arise.

I’ve pushed the whole series after building everything on x86_64-linux.

Thanks!

Ludo’.
Closed
?