mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-25 00:12:56 +00:00
b3a7a2a38d
FreeCAD is pedantic about the source of its python packages. It has been unsetting the PYTHONPATH environment variable for some time. With the recent support for Python 3.11 they are initializing the Python environment using an "isolated" configuration. That means our previous approach of removing the `putenv` line from the MainGui doesn't cut it anymore. In this commit I'm replacing the isolated configuration with a regular configuration. This means that FreeCAD will again pickup our PYTHONPATH. An alternative approach would have been to pass each of our (runtime) python dependencies with the `-P` argument to the FreeCAD binary using (yet another) wrapper. Perhaps the best approach, one that I might explore, is to figure out where FreeCAD usually expects the python dependencies to be. It might be that we can just symlink them into the package itself. One escape hatch that has been there for a while but hasn't been used (by us at least) is the `VIRTUAL_ENV` environment variable. We could provide an environment to the binary and get away without patching the source code. This requires some (new) machinery to produce virtualenv-alike folders. |
||
---|---|---|
.. | ||
0001-NIXOS-don-t-ignore-PYTHONPATH.patch | ||
default.nix |