Commit Graph

4 Commits

Author SHA1 Message Date
James Cameron
90c2539135 Fix unnecessary whitespace in warning
Regression introduced by 3b28597 ("flake8 fixes").

Fixes https://github.com/sugarlabs/sugar-toolkit-gtk3/issues/424
2019-08-28 17:28:37 +10:00
Aniket21mathur
3b28597486 flake8 fixes 2019-07-09 14:54:57 +10:00
James Cameron
2453d13b03 Clean up activity environment variables
Ensure environment variables needed by Python activities are available
in each of the three supported scenarios;

- started from Sugar,

- started from Terminal inside Sugar,

- started by other desktop environments.

Variables always available are;

SUGAR_ACTIVITY_ROOT
SUGAR_BUNDLE_ID
SUGAR_BUNDLE_NAME
SUGAR_BUNDLE_PATH
SUGAR_BUNDLE_VERSION

Variables also available when started from Sugar are;

SUGAR_ACTIVITIES_HIDDEN
SUGAR_APISOCKET_KEY
SUGAR_APISOCKET_PORT
SUGAR_GROUP_LABELS
SUGAR_HOME
SUGAR_MIME_DEFAULTS
SUGAR_PROFILE
SUGAR_SCALING
SUGAR_VERSION

Variables also available when started from Terminal are;

SUGAR_TERMINAL_VERSION

Other changes;

- use os.makedirs in place of distutils.dir_util.mkpath,

- avoid redundant setting of SUGAR_BUNDLE_PATH,

- do not set SUGAR_BUNDLE_ID unnecessarily,

- add explanatory comment,

Tested on Ubuntu 18.04.

Signed-off-by: James Cameron <quozl@laptop.org>
2019-03-28 15:29:02 +11:00
Pro-Panda
aa8a5e70c4 Port from Python 2 to six
Signed-off-by: James Cameron <quozl@laptop.org>
2019-03-13 14:23:06 +11:00