Commit Graph

9 Commits

Author SHA1 Message Date
Sławomir Nizio
7fe54dc2e0 [entropy_path_loader] make _add_import_path private 2018-11-26 20:15:36 +01:00
Sławomir Nizio
ed93a3737d update RigoDaemon imports 2018-11-26 20:15:36 +01:00
Sławomir Nizio
503e7077f3 update rigo imports 2018-11-26 20:15:36 +01:00
Sławomir Nizio
3e74fa847c update matter imports 2018-11-26 20:15:36 +01:00
Sławomir Nizio
321d59614f update eit imports + minor rename in entropy_path_loader 2018-11-26 20:15:36 +01:00
Sławomir Nizio
713cf0e927 usage magneto imports 2018-11-26 20:15:36 +01:00
Sławomir Nizio
7cf7e1f6b7 convert solo imports, with needed changes to entropy_path_loader
The module entropy_path_loader (used only for running from within the
checkout; otherwise not even installed) is made to provide the _entropy
namespace.

(Other ideas instead of this entropy_path_loader change would be to
reorganise files layout; drop support for running from the checkout as
is - and perhaps require virtualenvs; require sourcing a script that
sets PYTHONPATH. However, as implemented, it is not intrusive, and the
good part is that it is quite isolated, not used in normal usage after
installation. Basically, it only does sys.path + provides _entropy
namespace.)
2018-11-26 20:15:36 +01:00
Sławomir Nizio
252c260f06 use entropy_path_loader only for running from the checkout
After this commit alone it would not work when installed (unless module
paths are set in a special way). Next changes will introduce
installation to site-packages so no custom PYTHONPATH will be necessary.
2018-11-26 20:15:36 +01:00
Sławomir Nizio
41ba9b6d63 [*] be strict about Python modules paths being loaded
For convenience (seemingly, and it really is convenient) equo and other
tools can be run from the checkout, and Entropy modules are loaded from
the checkout. Now there is a strict separation when system paths and
when paths from the checkout are used.

It makes it a bit more robust, secure and preditable at the cost of
a little more complexity.

A pleasant side effect of this change is that it is not required to
change directory to the tool (to use non-system one), as paths in the
checkout are relative to scripts.

Imports in lib/tests were not adjusted.
2018-10-27 13:03:58 +02:00