From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2 ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id yBxWFVURQmF16QAAgWs5BA (envelope-from ) for ; Wed, 15 Sep 2021 17:29:25 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2 with LMTPS id mAD3EFURQmExMwAAB5/wlQ (envelope-from ) for ; Wed, 15 Sep 2021 15:29:25 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 4EAEE3EFB for ; Wed, 15 Sep 2021 17:29:24 +0200 (CEST) Received: from localhost ([::1]:50264 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mQWqh-0006e3-DF for larch@yhetil.org; Wed, 15 Sep 2021 11:29:23 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:43784) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mQWqN-0006c2-LG for guix-patches@gnu.org; Wed, 15 Sep 2021 11:29:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:41424) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mQWqN-0001ye-E1 for guix-patches@gnu.org; Wed, 15 Sep 2021 11:29:03 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mQWqN-0001Te-At for guix-patches@gnu.org; Wed, 15 Sep 2021 11:29:03 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#50505] [PATCH v2 09/13] gnu: Add python-moderngl-window. Resent-From: Daniel =?UTF-8?Q?Mei=C3=9Fner?= Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Wed, 15 Sep 2021 15:29:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 50505 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 50505@debbugs.gnu.org Cc: Daniel =?UTF-8?Q?Mei=C3=9Fner?= Received: via spool by 50505-submit@debbugs.gnu.org id=B50505.16317197005605 (code B ref 50505); Wed, 15 Sep 2021 15:29:03 +0000 Received: (at 50505) by debbugs.gnu.org; 15 Sep 2021 15:28:20 +0000 Received: from localhost ([127.0.0.1]:52968 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mQWpf-0001SG-SX for submit@debbugs.gnu.org; Wed, 15 Sep 2021 11:28:20 -0400 Received: from out1.mail.ruhr-uni-bochum.de ([134.147.53.149]:19232) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mQWp9-0001Nq-BF for 50505@debbugs.gnu.org; Wed, 15 Sep 2021 11:28:01 -0400 Received: from mx1.mail.ruhr-uni-bochum.de (localhost [127.0.0.1]) by out1.mail.ruhr-uni-bochum.de (Postfix mo-ext) with ESMTP id 4H8kcF6X6Rz8S25 for <50505@debbugs.gnu.org>; Wed, 15 Sep 2021 17:27:41 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ruhr-uni-bochum.de; s=mail-2017; t=1631719661; bh=qui5MEj++IQr1vgnL811kqwmZIAxkvWNZPb+L8fj6x0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=FBi8ry0003sV/3el06cwxllEp8Qt57HaF+jRQiWn0/UtKAMAW2WZtlka3vwvY1jIx 75jaDUvTfpumEbhA/n7QzPqtiHssDRZSdUC6Ij1ZXttMsI3UJpIAKu/TXddSdpk6QM 1rJ2ljERkY4/Vume3ny/MaurXUeb0uNxHuv8XNgE= Received: from out1.mail.ruhr-uni-bochum.de (localhost [127.0.0.1]) by mx1.mail.ruhr-uni-bochum.de (Postfix idis) with ESMTP id 4H8kcF5ykbz8SBb; Wed, 15 Sep 2021 17:27:41 +0200 (CEST) X-Envelope-Sender: X-RUB-Notes: Internal origin=IPv6:2a05:3e00:c:1001::8693:2aec Received: from mail2.mail.ruhr-uni-bochum.de (mail2.mail.ruhr-uni-bochum.de [IPv6:2a05:3e00:c:1001::8693:2aec]) by out1.mail.ruhr-uni-bochum.de (Postfix mi-int) with ESMTP id 4H8kcF4j0wz8S8t; Wed, 15 Sep 2021 17:27:41 +0200 (CEST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.1 at mx1.mail.ruhr-uni-bochum.de Received: from xii-04.mg07.ruhr-uni-bochum.de (pm26.mg07.ruhr-uni-bochum.de [10.150.49.41]) by mail2.mail.ruhr-uni-bochum.de (Postfix) with ESMTPSA id 4H8kcF39t7zDgyX; Wed, 15 Sep 2021 17:27:41 +0200 (CEST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.0 at mail2.mail.ruhr-uni-bochum.de Date: Wed, 15 Sep 2021 17:25:15 +0200 Message-Id: <20210915152519.25572-10-daniel.meissner-i4k@ruhr-uni-bochum.de> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20210910112231.6411-1-daniel.meissner-i4k@ruhr-uni-bochum.de> References: <20210910112231.6411-1-daniel.meissner-i4k@ruhr-uni-bochum.de> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: "Guix-patches" Reply-to: Daniel =?UTF-8?Q?Mei=C3=9Fner?= X-ACL-Warn: , Daniel =?UTF-8?Q?Mei=C3=9Fner?= via Guix-patches From: Daniel =?UTF-8?Q?Mei=C3=9Fner?= via Guix-patches via X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1631719764; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=MMBlZC+nWlIhxVwz9puIJ3bjyge4LwUcpyRebqwlrtA=; b=dj0PlS6Tl0065m0sDVnz7UyRtPtTnHmESM5D7g1EXUuZMqsoabsD37Ylv9Y5nyC90WoKuw BC7llsCtm3uca/Ht7OUK7sKA4IGuKR6UoAWoEGKksPVOmw78uupcA5J4BW/igO1xJ1Lpve XwweeI6HCPwJ3/p9a1c+Mm4GYlee92e5HSF1wWiJBWBP5QMT++E/8oP0KLCw5zbZ0zJ6k7 F9nWuxrAm9UTzbjPlJe5+iO0LmJ2acTN9bOzkJJfwFP04arUMOwJAUchCI+BFLCXD1dc0x 9Oz94WAr/AtPoUiqp6pTbnSgR941KsRVgCRRC9JIPEeyIPZBDtZHiPbsbWkpSw== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1631719764; a=rsa-sha256; cv=none; b=SfaK/WJOsa4eKZ7L7J5XpvB95IqHscufDlZkGNIB8DWH1rVoc1oIuDXi2cp1U+FclrdSz7 EQVDZVmMWKcSl8jxSrp0zSoG6qVEKz+EWbsexrPf6khCOkQZZ3ZCjqoHpbPMxs1iBUmP72 OHv6XhI+MEbqUHnjz4lLfmPhcHo9ftAAbqRx+IzHybYozUwxZhGj7GyqYLtTj5x+Okk0pf DHIEq5BNoB/aW8hK5LCslLyo/hqqi9gI8S6u4ynG5bvFXwjNpwHUwpsyhFVHVjefGr7CnH Pir3qANGJ940F0q0gds5DsxWTUUyUObLMMBr75Tl+8QVcWtp8niFMal7Swxk3g== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=ruhr-uni-bochum.de header.s=mail-2017 header.b=FBi8ry00; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Migadu-Spam-Score: -0.40 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=ruhr-uni-bochum.de header.s=mail-2017 header.b=FBi8ry00; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Migadu-Queue-Id: 4EAEE3EFB X-Spam-Score: -0.40 X-Migadu-Scanner: scn1.migadu.com X-TUID: eG95JZykfqCU * gnu/packages/python-xyz.scm (python-moderngl-window): New variable. --- gnu/local.mk | 1 + .../python-moderngl-window-skip-tests.patch | 62 +++++++++++++++++++ gnu/packages/python-xyz.scm | 49 +++++++++++++++ 3 files changed, 112 insertions(+) create mode 100644 gnu/packages/patches/python-moderngl-window-skip-tests.= patch diff --git a/gnu/local.mk b/gnu/local.mk index 175e691a63..d738f97ca8 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1648,6 +1648,7 @@ dist_patch_DATA =3D \ %D%/packages/patches/python-libxml2-utf8.patch \ %D%/packages/patches/python-matplotlib-run-under-wayland-gtk3.patch \ %D%/packages/patches/python-memcached-syntax-warnings.patch \ + %D%/packages/patches/python-moderngl-window-skip-tests.patch \ %D%/packages/patches/python-mox3-python3.6-compat.patch \ %D%/packages/patches/python-testtools.patch \ %D%/packages/patches/python-packaging-test-arch.patch \ diff --git a/gnu/packages/patches/python-moderngl-window-skip-tests.patch b= /gnu/packages/patches/python-moderngl-window-skip-tests.patch new file mode 100644 index 0000000000..cbfefa6c3a --- /dev/null +++ b/gnu/packages/patches/python-moderngl-window-skip-tests.patch @@ -0,0 +1,62 @@ +Skip tests for optional dependencies + +The Python packages pywavefront and trimesh are optional dependencies and = not +yet packaged in Guix but the tests try to load the modules anyway. Theref= ore +skip them. + +diff --git a/tests/test_docs.py b/tests/test_docs.py +index e4a38df..99a2aa0 100644 +--- a/tests/test_docs.py ++++ b/tests/test_docs.py +@@ -133,20 +133,11 @@ class TestCase(unittest.TestCase): + =0D + # --- Loaders : Scene ---=0D + =0D +- def test_loaders_wavefront(self):=0D +- self.validate('loaders/wavefront.rst', 'moderngl_window.loaders.s= cene.wavefront', 'Loader')=0D +-=0D + def test_loaders_gltf(self):=0D + self.validate('loaders/gltf2.rst', 'moderngl_window.loaders.scene= .gltf2', 'Loader')=0D + =0D +- def test_loaders_stl(self):=0D +- self.validate('loaders/wavefront.rst', 'moderngl_window.loaders.s= cene.stl', 'Loader')=0D +-=0D + # --- Loaders : Program ---=0D + =0D +- def test_loader_single(self):=0D +- self.validate('loaders/single.rst', 'moderngl_window.loaders.prog= ram.single', 'Loader')=0D +-=0D + def test_loader_separate(self):=0D + self.validate('loaders/separate.rst', 'moderngl_window.loaders.pr= ogram.separate', 'Loader')=0D + =0D +diff --git a/tests/test_loaders_scene.py b/tests/test_loaders_scene.py +index c577315..2eef889 100644 +--- a/tests/test_loaders_scene.py ++++ b/tests/test_loaders_scene.py +@@ -16,16 +16,6 @@ class SceneLoadersTestCase(HeadlessTestCase): + window_size =3D (16, 16) + aspect_ratio =3D 1.0 +=20 +- def test_wavefront(self): +- """Load wavefront file""" +- scene =3D resources.scenes.load(SceneDescription(path=3D'scenes/c= rate/crate.obj')) +- self.assertIsInstance(scene, Scene) +- +- def test_wavefont_not_found(self): +- """Ensure ImproperlyConfigured is raised when wavefront is not fo= und""" +- with self.assertRaises(ImproperlyConfigured): +- resources.scenes.load(SceneDescription(path=3D'scenes/doesnot= exist.obj')) +- + def test_gltf(self): + """Load standard gltf""" + scene =3D resources.scenes.load(SceneDescription(path=3D'scenes/B= oxTextured/glTF/BoxTextured.gltf')) +@@ -45,7 +35,3 @@ class SceneLoadersTestCase(HeadlessTestCase): + """Attempt to load nonexisting gltf""" + with self.assertRaises(ImproperlyConfigured): + resources.scenes.load(SceneDescription(path=3D'scenes/doesnot= exist.gltf')) +- +- def test_stl(self): +- scene =3D resources.scenes.load(SceneDescription(path=3D'scenes/u= plink.stl')) +- self.assertIsInstance(scene, Scene) +--=20 +2.33.0 diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm index 3a984eaa68..0d3efe2700 100644 --- a/gnu/packages/python-xyz.scm +++ b/gnu/packages/python-xyz.scm @@ -19071,6 +19071,55 @@ Joysticks, OpenGL graphics, loading images and vid= eos, and playing sounds and music. All of this with a friendly Pythonic API that's simple to learn.") (license license:bsd-3))) =20 +(define-public python-moderngl-window + (package + (name "python-moderngl-window") + (version "2.4.0") + (source (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/moderngl/moderngl-window") + (commit version))) + (file-name (git-file-name name version)) + (patches + (search-patches "python-moderngl-window-skip-tests.patch")) + (sha256 + (base32 + "1fvhm6ln3q5kl5m5q3gzfmx1kpyn054fhpcrgpqz8809dxi7pzcv")))) + (build-system python-build-system) + (arguments + '(#:phases + (modify-phases %standard-phases + (add-before 'check 'prepare-x + (lambda _ + (system "Xvfb :1 &") + (setenv "DISPLAY" ":1"))) + (add-before 'check 'fix-test + (lambda _ + (substitute* '("tests/test_windowconfig.py") + (("terrain_Vs.glsl") "terrain_vs.glsl")))) + (replace 'check + (lambda* (#:key inputs outputs #:allow-other-keys) + (add-installed-pythonpath inputs outputs) + (invoke "pytest" "tests" )))))) + (propagated-inputs + `(("python-pillow" ,python-pillow) + ("python-pyrr" ,python-pyrr) + ("python-numpy" ,python-numpy) + ("python-moderngl" ,python-moderngl) + ("python-pyglet" ,python-pyglet))) + (native-inputs + `(("python-pytest" ,python-pytest) + ("xorg-server" ,xorg-server-for-tests))) + (home-page "https://github.com/moderngl/moderngl-window") + (synopsis "Cross-platform utility library for ModernGL") + (description "This ModernGL utility library simplifies window creation = and +resource loading. You can create a window for ModernGL using pyglet, pyga= me, +PySide2, GLFW, SDL2, PyQt5 or tkinter. Events are unified into a single e= vent +system. Resource loading includes loading of 2D textures/texture arrays, +shaders and objects/scenes.") + (license license:expat))) + (define-public python-screeninfo (package (name "python-screeninfo") --=20 2.33.0