2 Commits (2453d13b03a1affa1f151f84005f80cd55829086)

Author SHA1 Message Date
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>
5 years ago
Pro-Panda aa8a5e70c4 Port from Python 2 to six
Signed-off-by: James Cameron <quozl@laptop.org>
5 years ago