From patchwork Wed Apr 17 23:49:39 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Thompson, David" X-Patchwork-Id: 63112 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id E7A6127BBE9; Thu, 18 Apr 2024 00:51:08 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,SPF_HELO_PASS autolearn=unavailable autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 6DC4627BBEA for ; Thu, 18 Apr 2024 00:51:07 +0100 (BST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rxF3I-0002YI-RX; Wed, 17 Apr 2024 19:50:56 -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 1rxF3F-0002Xn-EZ for guix-patches@gnu.org; Wed, 17 Apr 2024 19:50:53 -0400 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rxF3C-0004mO-46 for guix-patches@gnu.org; Wed, 17 Apr 2024 19:50:53 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rxF3P-0000Kc-0G for guix-patches@gnu.org; Wed, 17 Apr 2024 19:51:03 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#70445] [PATCH] gnu: blender: Add wrap-bin phase. Resent-From: "Thompson, David" Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Wed, 17 Apr 2024 23:51:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 70445 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 70445@debbugs.gnu.org X-Debbugs-Original-To: Ryan Prior via Guix-patches Received: via spool by submit@debbugs.gnu.org id=B.1713397817948 (code B ref -1); Wed, 17 Apr 2024 23:51:02 +0000 Received: (at submit) by debbugs.gnu.org; 17 Apr 2024 23:50:17 +0000 Received: from localhost ([127.0.0.1]:48888 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rxF2e-0000F5-GT for submit@debbugs.gnu.org; Wed, 17 Apr 2024 19:50:17 -0400 Received: from lists.gnu.org ([2001:470:142::17]:45438) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rxF2b-0000Dn-RK for submit@debbugs.gnu.org; Wed, 17 Apr 2024 19:50:14 -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 1rxF2J-0002Kz-AU for guix-patches@gnu.org; Wed, 17 Apr 2024 19:49:55 -0400 Received: from mail-qt1-x82f.google.com ([2607:f8b0:4864:20::82f]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rxF2H-0004R3-KY for guix-patches@gnu.org; Wed, 17 Apr 2024 19:49:55 -0400 Received: by mail-qt1-x82f.google.com with SMTP id d75a77b69052e-434a6024d0aso641531cf.0 for ; Wed, 17 Apr 2024 16:49:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=worcester-edu.20230601.gappssmtp.com; s=20230601; t=1713397792; x=1714002592; darn=gnu.org; h=to:subject:message-id:date:from:mime-version:from:to:cc:subject :date:message-id:reply-to; bh=76TWaTDAu7y+BDpx5BtGLRNss7sOQM+Z0eF6SqyhzwE=; b=rx0vNUossah6Jcctb4KPNuRTlBurhRvW6l/05y27t1slD3UH8RQ3vdGWuVLN4mUvQh Ye8q7Iorg6LaCyqU/FFYc3NZRIFXkyM9rW5H7nd8lB56X0oKkw4sZrZRGSdBhngaS7gJ h2BfexkHb8KMlyLJ/lgUYcmgd/jKa4oNnTJ9FoNl+wJSvdxiHZCO9nuxMTDDSFSlqyl2 puDK2vYzgUx02H6YyMZoDvpJ/mAsjEuBsFFfWQ4OHSzNi6HVHIZJazw/3a9pcp2y1PPI jp9DSqVwuQCIS7S5Elm9TUdq6M56aOcr+gIDsenUW4jaMo+LCHhvkzEif6aEfgiEkPAb UPQg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1713397792; x=1714002592; h=to:subject:message-id:date:from:mime-version:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=76TWaTDAu7y+BDpx5BtGLRNss7sOQM+Z0eF6SqyhzwE=; b=iW+b6mkvKp0HuJcTppQCLhXvsetYs9op9yoNwed9O5kLCdC9JfL9pO346PMnuA4+WP B0dIyY4yvlbZ5jlK1ohXq2O9TWl3iZ2aXIQDuTTsNt+yvwAu4GA6zREz3MhFQ+FgjzEh rYf6qor1buWsx6Ju0juyYchTvRbdV4IJSvapvGrb86OX7yeUS5ay0D5EP3ICcCwZR5hE Q1HvqTY40YBpOoeyls9iIMqfux4NY2oVRWOtROLPOecNUvBj+6EDW6tvtDlqFg2TKpvN 9NBXbP4xFRgmv6j1zMCPyziqgetPY4hhqHggD9haVg1he3PUjaMk8pzFSRSWpTCGCxB2 4hGg== X-Gm-Message-State: AOJu0YwI44Q9lwvNWSl8Thm+1h0gE96tmel4B95oaMp2c74qe18sm+GQ yx4vkBUWHKIKscieujmmRYE8LeV+LU7yuqbchZQv/0tyOgNmf5C/sD+PuIvwfaZ2uDPEsr+C3Y0 t6mPjF9ka694E+14C5WHJwhqhQUmvSe5Cfe/ge6ftSvnJTKoB X-Google-Smtp-Source: AGHT+IHhmjgkPBpDLjxMQGszg6zf0NVMoRNG1rfD4fMdQxl6x8DcUwS4x2rNbrCWSPhA9xUWigS+XCzeR9MdMOgDE30= X-Received: by 2002:a05:622a:1910:b0:436:8890:6aca with SMTP id w16-20020a05622a191000b0043688906acamr1252992qtc.31.1713397791686; Wed, 17 Apr 2024 16:49:51 -0700 (PDT) MIME-Version: 1.0 From: "Thompson, David" Date: Wed, 17 Apr 2024 19:49:39 -0400 Message-ID: Received-SPF: pass client-ip=2607:f8b0:4864:20::82f; envelope-from=dthompson2@worcester.edu; helo=mail-qt1-x82f.google.com X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 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: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches Hi all, I started learning Blender this past week and when I tried to export a model to glTF I was shown an error console saying that the numpy module couldn't be found. We already had python-numpy in the inputs list, but the blender binary was not being wrapped to add it to Python's load path. This patch fixes this and presumably fixes other extensions that use Python modules. Thanks, - Dave From 66305eda88e2d1967b6c241b34e79dcdee837f63 Mon Sep 17 00:00:00 2001 Message-ID: <66305eda88e2d1967b6c241b34e79dcdee837f63.1713394687.git.dthompson2@worcester.edu> From: David Thompson Date: Wed, 17 Apr 2024 18:50:49 -0400 Subject: [PATCH] gnu: blender: Add wrap-bin phase. * gnu/packages/graphics.scm (blender)[arguments]: Add wrap-bin phase to set proper GUIX_PYTHONPATH. [inputs]: Add bash-minimal per 'guix lint'. Change-Id: I435957baf181ef7f92d4160529439357e16714f6 --- gnu/packages/graphics.scm | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/gnu/packages/graphics.scm b/gnu/packages/graphics.scm index 85e4eed3b1..5a8c907ccd 100644 --- a/gnu/packages/graphics.scm +++ b/gnu/packages/graphics.scm @@ -543,9 +543,18 @@ (define-public blender (string-append "-DPYTHON_NUMPY_PATH=" (assoc-ref %build-inputs "python-numpy") "/lib/python" #$python-version - "/site-packages/"))))) + "/site-packages/"))) + #:phases + '(modify-phases %standard-phases + (add-after 'install 'wrap-bin + (lambda* (#:key outputs #:allow-other-keys) + (let* ((out (assoc-ref outputs "out")) + (python-path (getenv "GUIX_PYTHONPATH"))) + (wrap-program (string-append out "/bin/blender") + `("GUIX_PYTHONPATH" ":" prefix (,python-path))))))))) (inputs - (list boost + (list bash-minimal + boost bullet eigen embree base-commit: dbfb691c5b4bc66682657ebf124815f5b93fcdbd -- 2.41.0