From d7eb37f40340becfb088819429c1be6a9b043075 Mon Sep 17 00:00:00 2001 From: Samuel Rounce Date: Sat, 13 Dec 2025 12:39:17 +0000 Subject: [PATCH] freecad: fix PYTHONPATH patch header attribution In the course of updating this patch to apply cleanly I'd accidentally erased evidence of Andreas Rammhold's earlier work. Updating the patch header and formatting to amend this error. Co-authored-by: Andreas Rammhold --- .../0001-NIXOS-don-t-ignore-PYTHONPATH.patch | 29 +++++++++---------- 1 file changed, 14 insertions(+), 15 deletions(-) diff --git a/pkgs/by-name/fr/freecad/0001-NIXOS-don-t-ignore-PYTHONPATH.patch b/pkgs/by-name/fr/freecad/0001-NIXOS-don-t-ignore-PYTHONPATH.patch index 185d6effa25e..da4facbd5d2b 100644 --- a/pkgs/by-name/fr/freecad/0001-NIXOS-don-t-ignore-PYTHONPATH.patch +++ b/pkgs/by-name/fr/freecad/0001-NIXOS-don-t-ignore-PYTHONPATH.patch @@ -1,21 +1,20 @@ commit c534a831c2f7186ebabe4e17f1e1df6d11ebff89 -Author: Samuel Rounce +From: Andreas Rammhold Date: Thu Sep 5 22:17:21 2024 +0100 +Subject: [PATCH] NIXOS: don't ignore PYTHONPATH - [PATCH] NIXOS: don't ignore PYTHONPATH - - On NixOS or rather within nixpkgs we provide the runtime Python - packages via the PYTHONPATH environment variable. FreeCAD tries its - best to ignore Python environment variables that are being inherited - from the environment. For Python versions >=3.11 it also tries to - initialize the interpreter config without any environmental data. We - have to initialize the configuration *with* the information from the - environment for our packaging to work. - - Upstream has purposely isolated the environments AFAIK and thus - shouldn't accept this patch (as is). What they might accept (once - support for older Python versions has been dropped) is removing the - PYTHONPATH specific putenv calls. +On NixOS or rather within nixpkgs we provide the runtime Python +packages via the PYTHONPATH environment variable. FreeCAD tries its +best to ignore Python environment variables that are being inherited +from the environment. For Python versions >=3.11 it also tries to +initialize the interpreter config without any environmental data. We +have to initialize the configuration *with* the information from the +environment for our packaging to work. + +Upstream has purposely isolated the environments AFAIK and thus +shouldn't accept this patch (as is). What they might accept (once +support for older Python versions has been dropped) is removing the +PYTHONPATH specific putenv calls. --- src/Base/Interpreter.cpp | 1 + src/Main/MainGui.cpp | 3 ---