Commit 2960b813 authored by Alexandre Duret-Lutz's avatar Alexandre Duret-Lutz
Browse files

"import" may now load "spot-extra/"

This is needed for tcltl.

* python/spot/ Alter __path__ to add any spot-extra/
directory we find.
* NEWS: Mention this.
parent 865427c7
......@@ -2,6 +2,12 @@ New in spot (not yet released)
Nothing yet.
- Doing "import" will now load any spot-extra/ on
Python's search path. This can be used to install third-party
packages that want to behave as plugins for Spot.
New in spot 2.8.2 (2019-09-27)
Command-line tools:
......@@ -36,6 +36,16 @@ if 'SPOT_UNINSTALLED' in os.environ:
# into .libs/
# We may have third-party plugins that want to be loaded as "", but
# that are installed in a different $prefix. This sets things so that any
# file that looks like spot-extra/ can be loaded with "import".
for path in sys.path:
if path not in __path__:
path += "/spot-extra"
if os.path.isdir(path):
from spot.impl import *
from spot.aux import \
extend as _extend, \
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment