Inkscape overwrites PYTHONPATH and PATH environment variables
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Inkscape |
In Progress
|
Wishlist
|
jazzynico |
Bug Description
Inkscape (only in Windows!) overwrites PYTHONPATH and PATH environment variables prepending inkscape's own subdirectories. AFIK there is no trivial possibility to use another Python interpreter in windows.
In Windows systems (#ifdef WIN32) Inkscape (since rev 5073) sets PYTHONPATH environment variable hard coded and points (from rev 5073) to inkscape's python subdirectory ignoring the system PYTHONPATH variable,
later (from rev 5106) inkscape's python subdirectory is prepended to a system PYTHONPATH variable (if existing).
(For windows) the PATH variable is also (from rev 5073) hard coded prepending the existing system PATH variable.
http://
http://
Suggested solutions:
A. do not change the PYTHONPATH and PATH environment variables if existing. This solution has some problems if the system is using a PYTHONPATH pointing to a Python environment not compatible with inkscape's extensions (e.g. inkex.py).
B. let the user configure two environment variables, e.g. INKSCAPE_
here is a patch for my proposed solution B. Based on RELEASE_0_91_BRANCH rev #13849 of file <inkscape>
542a543,544
> gchar const *inkscape_
> gchar const *inkscape_
560,563c562,569
< if (path) {
< new_path = g_strdup_
< } else {
< new_path = g_strdup_
---
> if (inkscape_
> new_path = inkscape_
> } else {
> if (path) {
> new_path = g_strdup_
> } else {
> new_path = g_strdup_
> }
565,570c571,580
< if (pythonpath) {
< new_pythonpath = g_strdup_
< python_s, pythonlib_s, pythondll_s, pythonpath);
< } else {
< new_pythonpath = g_strdup_
< python_s, pythonlib_s, pythondll_s);
---
> if (inkscape_
> new_pythonpath = inkscape_
> } else {
> if (pythonpath) {
> new_pythonpath = g_strdup_
> python_s, pythonlib_s, pythondll_s, pythonpath);
> } else {
> new_pythonpath = g_strdup_
> python_s, pythonlib_s, pythondll_s);
> }
Changed in inkscape: | |
status: | New → In Progress |
assignee: | nobody → jazzynico (jazzynico) |
Attaching in-line diff as separate diff file (against lp:inkscape/0.91.x r13849) to ease testing on other systems.