Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FEATURE] Configure custom environment variables #372

Merged
merged 2 commits into from
Jan 6, 2013

Conversation

dakcarto
Copy link
Member

@dakcarto dakcarto commented Jan 3, 2013

- Fix for qgis#3097
- Could help plugins, like SEXTANTE, work better across platforms via abstracted coding based upon env vars
- In app prefs, configure variables and view current set, with tooltips to show pre-startup value (if any)
@dakcarto
Copy link
Member Author

dakcarto commented Jan 4, 2013

Hi,

Would appreciate a test of this on Windows platform. To test, set some custom vars in the dialog, restart QGIS and see if the vars are in the 'current' vars table; then, verify they are passed down to Python by running the following in console:

import os
os.environ

Dialog should look like this:
http://drive.dakotacarto.com/qgis/app-prefs_custom-env-vars.png

Feature branch is available here:
https://github.com/dakcarto/Quantum-GIS/tree/iface_enviro_3

@timlinux
Copy link
Member

timlinux commented Jan 4, 2013

Hi

It would be nice to filter the env vars to show only the QGIS specific ones e.g. QGIS_PREFIX_PATH etc.

Regards

Tim

@dakcarto
Copy link
Member Author

dakcarto commented Jan 4, 2013

Do you mean a general line edit filter for the 'current' env vars table? Or a 'Show QGIS variables' checkbox? Maybe just style the base set of known QGIS-specific vars to italics?

With ever new SEXTANTE algorithms looking for env var configuration from external installs, it might be problematic to keep up with what is considered QGIS-specific.

@dakcarto
Copy link
Member Author

dakcarto commented Jan 5, 2013

I would like to merge this if no one has any other concerns, suggestions or comments.

On Mac, this is just the first step towards getting SEXTANTE to fully work with its external processes. Also, it would be good to go through the codebase and remove the hardcoded env vars currently being set for Mac (mostly for GDAL and GRASS) and move them into this custom env var setup. So, there is still a bit of work and a lot of testing to do for SEXTANTE on Mac before the 2.0 release.

@timlinux
Copy link
Member

timlinux commented Jan 5, 2013

Hi

With ever new SEXTANTE algorithms looking for env var configuration from external installs, it might be problematic to keep up with what is considered QGIS-specific.

Indeed. Perhaps the rule of thumb would be 'those defined / used in the C++ API and those with QGIS in the env var name"

+1 from me to merge anyway.

Regards

Tim

dakcarto added a commit that referenced this pull request Jan 6, 2013
[FEATURE] Configure custom environment variables
@dakcarto dakcarto merged commit 5cd7dc5 into qgis:master Jan 6, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants