Commit Graph

11 Commits

Author SHA1 Message Date
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
Fabio Erculiani
ebf63e6060 [entropy.locks] fix shared/exclusive locking mix due to reentrancy, add tests 2013-12-08 16:15:39 +01:00
Fabio Erculiani
1917771b54 [entropy.locks] move Entropy Resources Lock code to a separate module 2013-12-08 14:37:57 +01:00
Fabio Erculiani
0725612508 [kernel-switcher] use Client class with acquire_entropy_locks 2013-12-07 20:29:19 +01:00
Fabio Erculiani
6e81d188c3 [kernel-switcher] add concurrency support 2013-12-07 20:29:19 +01:00
Fabio Erculiani
385c2934c5 [client] deal with Python bug #16308 2013-08-23 10:57:36 +02:00
Fabio Erculiani
b44c89ad19 [kernel-switcher] turn the kernel switcher library into an OO interface 2013-03-06 15:51:35 +00:00
Fabio Erculiani
23738ead62 [kernel-switcher] force superuser access 2013-03-06 15:44:32 +00:00
Fabio Erculiani
d05426e618 [kernel-switcher] move kswitch to entropy lib, kernel-switcher back to equo 2013-03-06 15:28:56 +00:00