From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms9.migadu.com with LMTPS id AG5oOFqLmmRc2AAASxT56A (envelope-from ) for ; Tue, 27 Jun 2023 09:10:18 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id +PJZOFqLmmQKPAEAauVa8A (envelope-from ) for ; Tue, 27 Jun 2023 09:10:18 +0200 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 7B6754DC0 for ; Tue, 27 Jun 2023 09:10:18 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qE2py-00047J-0H; Tue, 27 Jun 2023 03:10:06 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qE2pv-00046t-MW for guix-patches@gnu.org; Tue, 27 Jun 2023 03:10:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qE2pv-0001GW-Di for guix-patches@gnu.org; Tue, 27 Jun 2023 03:10:03 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qE2pu-0007Jy-Eh; Tue, 27 Jun 2023 03:10:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#64314] [PATCH] gnu: Add python-glcontext. Resent-From: Daniel =?UTF-8?Q?Mei=C3=9Fner?= Original-Sender: "Debbugs-submit" Resent-CC: lars@6xq.net, jgart@dismail.de, guix-patches@gnu.org Resent-Date: Tue, 27 Jun 2023 07:10:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 64314 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 64314@debbugs.gnu.org Cc: Daniel =?UTF-8?Q?Mei=C3=9Fner?= , Lars-Dominik Braun , jgart X-Debbugs-Original-To: guix-patches@gnu.org X-Debbugs-Original-Xcc: Lars-Dominik Braun , jgart Received: via spool by submit@debbugs.gnu.org id=B.168784974228039 (code B ref -1); Tue, 27 Jun 2023 07:10:02 +0000 Received: (at submit) by debbugs.gnu.org; 27 Jun 2023 07:09:02 +0000 Received: from localhost ([127.0.0.1]:47484 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qE2ov-0007Hx-W4 for submit@debbugs.gnu.org; Tue, 27 Jun 2023 03:09:02 -0400 Received: from lists.gnu.org ([209.51.188.17]:49518) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qE2ou-0007Hc-3x for submit@debbugs.gnu.org; Tue, 27 Jun 2023 03:09:00 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qE2os-0003xV-AL for guix-patches@gnu.org; Tue, 27 Jun 2023 03:08:58 -0400 Received: from out1.mail.ruhr-uni-bochum.de ([2a05:3e00:8:1001::8693:3595]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qE2op-0000g4-B8 for guix-patches@gnu.org; Tue, 27 Jun 2023 03:08:57 -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 4Qqwmb1V3cz8SCH for ; Tue, 27 Jun 2023 09:08:47 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=rub.de; s=mail-2017; t=1687849727; bh=dKUg1wmC6SaMiZfG+Kv5+J3oRItp8c1H0to0kBkDWgg=; h=From:To:Cc:Subject:Date:From; b=lXY9NnU4c4xlbDqzXyX1da79gWdchmVBFr5NWSMcAG1JUbdCdj+tNtQRZ+Ml+PxNW I5fLRNNM/UzBuFDk5Vs+DY4Xm/0aQlxGVz9Ehn27HZDzYMtyUDFQeU5v0B9By/oIMB 7cl/QeLF9OuffBETIvZyJs6kLO1tmnOpyULU8UHg= 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 4Qqwmb0X8Fz8SCB; Tue, 27 Jun 2023 09:08:47 +0200 (CEST) X-Envelope-Sender: X-RUB-Notes: Internal origin=134.147.42.236 Received: from mail2.mail.ruhr-uni-bochum.de (mail2.mail.ruhr-uni-bochum.de [134.147.42.236]) by out1.mail.ruhr-uni-bochum.de (Postfix mi-int) with ESMTPS id 4QqwmZ6DxSz8SB7; Tue, 27 Jun 2023 09:08:46 +0200 (CEST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.8 at mx1.mail.ruhr-uni-bochum.de Received: from think.local (dslb-088-067-241-116.088.067.pools.vodafone-ip.de [88.67.241.116]) by mail2.mail.ruhr-uni-bochum.de (Postfix) with ESMTPSA id 4QqwmZ2nvHzDgyd; Tue, 27 Jun 2023 09:08:46 +0200 (CEST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 1.0.0 at mail2.mail.ruhr-uni-bochum.de Date: Tue, 27 Jun 2023 09:08:07 +0200 Message-Id: <20230627070807.16383-1-daniel.meissner-i4k@rub.de> X-Mailer: git-send-email 2.40.1 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Received-SPF: pass client-ip=2a05:3e00:8:1001::8693:3595; envelope-from=daniel.meissner-i4k@rub.de; helo=out1.mail.ruhr-uni-bochum.de X-Spam_score_int: -43 X-Spam_score: -4.4 X-Spam_bar: ---- X-Spam_report: (-4.4 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action 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: , Reply-to: Daniel =?UTF-8?Q?Mei=C3=9Fner?= X-ACL-Warn: , =?utf-8?q?Daniel_Mei=C3=9Fner_via_Guix-patches?= From: =?utf-8?q?Daniel_Mei=C3=9Fner_via_Guix-patches?= via Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: guix-patches-bounces+larch=yhetil.org@gnu.org X-Migadu-Country: US X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1687849818; 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-type:content-type: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:list-id:list-help: list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=ItGZpsTt7lmUELvxGy55Cg8hT4dqSQhPPUaGKabXZpM=; b=C9SOBXyNb5w4b+8fHq2rOScR+K5CBWI+Ir7HjkYO5fgYX1rb1qCkblIbLkzSMx6jZaRCQe 0umqJasc5ftPVw4IARyk1MUYNw4FFK5mGDdCaJWA2TC4jIhCFmRxxzIUUiPgSQc9NGcIOZ i8r8P4SN+13aqjSjtTi/8Nsl/cKEDKoGX6kpfwU8gYCoaq56yzfBKmXi4wNBnSFAUQMnCX KujKwuPIdQb2VAjIa6Af1tzttEteK+giuZlu8GCweLDpMSom0V253JcqE9swgjEkmJWgU8 jBZ3y5vu4eZrMI6VfnvJNHvFdg+u+V616om1FcSAA1aVouLQ8RNj/5kjKt2XIg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=rub.de header.s=mail-2017 header.b=lXY9NnU4; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" ARC-Seal: i=1; s=key1; d=yhetil.org; t=1687849818; a=rsa-sha256; cv=none; b=tnLSAFiIxLKVjbaVvVRsJgnSqPV2LsjXWcyUUyw5BZGDccl3K3ggYSCXa1thr5M3J7K9Il /O5Jag5fNH5YMT8Y89rdwQPp9L0ThpYaYYBTP0yXTH+GxYq1cLNvvXOm9WUCs4olMKja7L 9fFaVwLFRQMYDjmQoQMFP2M5O9m0yrpziRQVSKxvw41pXs18ZV/fmNzfouG0w0U0yzBJgR dGUDMt9W7+FTeWbePfnJmqQZvpSUegDx3wOLPrKLFGcic7h+CiZfOd9AzD6sn6vlaXWAUS dod+Fx6Bafj/gaIAT/H3yMca1yupUBVlgU+fLzokT0s7dw9UljNVdihEF3qwKg== X-Migadu-Scanner: scn1.migadu.com X-Migadu-Spam-Score: -4.35 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=rub.de header.s=mail-2017 header.b=lXY9NnU4; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" X-Migadu-Queue-Id: 7B6754DC0 X-Spam-Score: -4.35 X-TUID: ZaXyDdN2OerK From: Daniel Meißner * gnu/packages/python-xyz.scm (python-glcontext): New variable. --- gnu/packages/python-xyz.scm | 51 +++++++++++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm index 4c926ede92..6124b87a15 100644 --- a/gnu/packages/python-xyz.scm +++ b/gnu/packages/python-xyz.scm @@ -22673,6 +22673,57 @@ (define-public python-pyopengl-accelerate (description "This is the Cython-coded accelerator module for PyOpenGL."))) +(define-public python-glcontext + (package + (name "python-glcontext") + (version "2.4.0") + (source (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/moderngl/glcontext") + (commit version))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "0zzpwyqg19y600n09xz07cxk4jimh9vjraszda7g7ipijq6iasac")))) + (build-system pyproject-build-system) + (arguments + (list #:phases #~(modify-phases %standard-phases + (add-before 'build 'fix-lib-paths + (lambda* (#:key inputs outputs #:allow-other-keys) + (let ((mesa (assoc-ref inputs "mesa")) + (libx11 (assoc-ref inputs "libx11"))) + (substitute* '("glcontext/x11.cpp" + "glcontext/egl.cpp") + (("\"libGL.so\"") + (string-append "\"" mesa "/lib/libGL.so\"")) + (("\"libEGL.so\"") + (string-append "\"" mesa "/lib/libEGL.so\"")) + (("\"libX11.so\"") + (string-append "\"" libx11 "/lib/libX11.so\""))) + (substitute* '("glcontext/__init__.py") + (("find_library\\('GL'\\)") + (string-append "'" mesa "/lib/libGL.so'")) + (("find_library\\('EGL'\\)") + (string-append "'" mesa "/lib/libEGL.so'")) + (("find_library\\(\"X11\"\\)") + (string-append "'" libx11 "/lib/libX11.so'")))))) + (replace 'check + (lambda* (#:key inputs outputs tests? + #:allow-other-keys) + (when tests? + (system "Xvfb :1 &") + (setenv "DISPLAY" ":1") + (add-installed-pythonpath inputs outputs) + (invoke "pytest" "tests"))))))) + (inputs (list libx11 mesa)) + (native-inputs (list xorg-server-for-tests python-pytest python-psutil)) + (home-page "https://github.com/moderngl/glcontext") + (synopsis "Portable OpenGL Context for ModernGL") + (description "Python-glcontext is a library providing an OpenGL +implementation for ModernGL on multiple platforms.") + (license license:expat))) + (define-public python-rencode (package (name "python-rencode") -- 2.39.1