From 7cf7e1f6b7cbce4d7f5094ab4d2f1cb6023f7d71 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C5=82awomir=20Nizio?= Date: Mon, 26 Nov 2018 20:15:36 +0100 Subject: [PATCH] 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.) --- client/doc/generate | 2 +- client/equo.py | 2 +- client/kernel-switcher | 4 ++-- client/solo/commands/__init__.py | 2 +- client/solo/commands/_manage.py | 4 ++-- client/solo/commands/cache.py | 4 ++-- client/solo/commands/cleanup.py | 6 +++--- client/solo/commands/command.py | 2 +- client/solo/commands/conf.py | 4 ++-- client/solo/commands/config.py | 6 +++--- client/solo/commands/deptest.py | 4 ++-- client/solo/commands/download.py | 4 ++-- client/solo/commands/help.py | 6 +++--- client/solo/commands/hop.py | 4 ++-- client/solo/commands/install.py | 6 +++--- client/solo/commands/libtest.py | 4 ++-- client/solo/commands/mark.py | 4 ++-- client/solo/commands/mask.py | 6 +++--- client/solo/commands/match.py | 6 +++--- client/solo/commands/moo.py | 4 ++-- client/solo/commands/notice.py | 4 ++-- client/solo/commands/pkg.py | 4 ++-- client/solo/commands/preservedlibs.py | 6 +++--- client/solo/commands/query.py | 10 +++++----- client/solo/commands/remove.py | 6 +++--- client/solo/commands/repo.py | 6 +++--- client/solo/commands/rescue.py | 5 +++-- client/solo/commands/search.py | 6 +++--- client/solo/commands/security.py | 6 +++--- client/solo/commands/source.py | 4 ++-- client/solo/commands/status.py | 4 ++-- client/solo/commands/ugc.py | 6 +++--- client/solo/commands/unused.py | 4 ++-- client/solo/commands/update.py | 4 ++-- client/solo/commands/upgrade.py | 6 +++--- client/solo/commands/version.py | 6 +++--- client/solo/commands/yell.py | 4 ++-- client/solo/main.py | 4 ++-- entropy_path_loader/compat/_entropy/__init__.py | 4 ++++ entropy_path_loader/entropy_path_loader.py | 3 ++- lib/tests/client.py | 2 +- 41 files changed, 97 insertions(+), 91 deletions(-) create mode 100644 entropy_path_loader/compat/_entropy/__init__.py diff --git a/client/doc/generate b/client/doc/generate index 9c6d84f85..3d6fb3b8d 100755 --- a/client/doc/generate +++ b/client/doc/generate @@ -13,7 +13,7 @@ if os.path.isfile(osp.join(_base, "entropy-in-vcs-checkout")): import entropy_path_loader del osp -from solo.commands.descriptor import SoloCommandDescriptor +from _entropy.solo.commands.descriptor import SoloCommandDescriptor MAN_HEADER="""\ EQUO(1) diff --git a/client/equo.py b/client/equo.py index c0f0d15f1..2566c980b 100755 --- a/client/equo.py +++ b/client/equo.py @@ -11,6 +11,6 @@ if os.path.isfile(osp.join(_base, "entropy-in-vcs-checkout")): import entropy_path_loader del osp -from solo.main import main +from _entropy.solo.main import main sys.argv[0] = "equo" main() diff --git a/client/kernel-switcher b/client/kernel-switcher index 3c6e06962..4fdf86ff3 100755 --- a/client/kernel-switcher +++ b/client/kernel-switcher @@ -18,8 +18,8 @@ from entropy.client.interfaces import Client import entropy.dep import entropy.tools -from solo.commands.install import SoloInstall -from solo.utils import print_package_info +from _entropy.solo.commands.install import SoloInstall +from _entropy.solo.utils import print_package_info import kswitch diff --git a/client/solo/commands/__init__.py b/client/solo/commands/__init__.py index 138234635..f0fa28923 100644 --- a/client/solo/commands/__init__.py +++ b/client/solo/commands/__init__.py @@ -21,7 +21,7 @@ for py_file in os.listdir(_cur_dir): if py_file.startswith("_"): continue # strip .py - _mod = "solo.commands." + py_file[:-3] + _mod = "_entropy.solo.commands." + py_file[:-3] if _mod in _excluded_mods: continue try: diff --git a/client/solo/commands/_manage.py b/client/solo/commands/_manage.py index 199daaa92..bfb4fa663 100644 --- a/client/solo/commands/_manage.py +++ b/client/solo/commands/_manage.py @@ -30,8 +30,8 @@ from entropy.client.interfaces.package.preservedlibs import PreservedLibraries import entropy.tools import entropy.dep -from solo.utils import enlightenatom, get_entropy_webservice -from solo.commands.command import SoloCommand +from _entropy.solo.utils import enlightenatom, get_entropy_webservice +from _entropy.solo.commands.command import SoloCommand class SoloManage(SoloCommand): """ diff --git a/client/solo/commands/cache.py b/client/solo/commands/cache.py index 80f267be1..3334b7ed1 100644 --- a/client/solo/commands/cache.py +++ b/client/solo/commands/cache.py @@ -15,8 +15,8 @@ import argparse from entropy.i18n import _ from entropy.output import blue, brown, darkgreen -from solo.commands.descriptor import SoloCommandDescriptor -from solo.commands.command import SoloCommand, sharedlock +from _entropy.solo.commands.descriptor import SoloCommandDescriptor +from _entropy.solo.commands.command import SoloCommand, sharedlock class SoloCache(SoloCommand): """ diff --git a/client/solo/commands/cleanup.py b/client/solo/commands/cleanup.py index e1d54ff9e..389bcb0c9 100644 --- a/client/solo/commands/cleanup.py +++ b/client/solo/commands/cleanup.py @@ -16,9 +16,9 @@ import argparse from entropy.i18n import _ from entropy.const import etpConst -from solo.commands.descriptor import SoloCommandDescriptor -from solo.commands.command import SoloCommand -from solo.utils import cleanup +from _entropy.solo.commands.descriptor import SoloCommandDescriptor +from _entropy.solo.commands.command import SoloCommand +from _entropy.solo.utils import cleanup class SoloCleanup(SoloCommand): """ diff --git a/client/solo/commands/command.py b/client/solo/commands/command.py index fd391ccf7..e81c0b29d 100644 --- a/client/solo/commands/command.py +++ b/client/solo/commands/command.py @@ -26,7 +26,7 @@ from entropy.core.settings.base import SystemSettings import entropy.tools -from solo.utils import enlightenatom +from _entropy.solo.utils import enlightenatom def _fix_argparse_print_help(): diff --git a/client/solo/commands/conf.py b/client/solo/commands/conf.py index 435e544d5..dd33adfcd 100644 --- a/client/solo/commands/conf.py +++ b/client/solo/commands/conf.py @@ -28,8 +28,8 @@ from entropy.output import readtext, darkgreen, brown, teal, purple, \ import entropy.tools -from solo.commands.descriptor import SoloCommandDescriptor -from solo.commands.command import SoloCommand +from _entropy.solo.commands.descriptor import SoloCommandDescriptor +from _entropy.solo.commands.command import SoloCommand class SoloConf(SoloCommand): diff --git a/client/solo/commands/config.py b/client/solo/commands/config.py index eceb81423..89cef029a 100644 --- a/client/solo/commands/config.py +++ b/client/solo/commands/config.py @@ -16,9 +16,9 @@ import argparse from entropy.i18n import _ from entropy.output import darkred, darkgreen, blue, brown -from solo.utils import enlightenatom -from solo.commands.descriptor import SoloCommandDescriptor -from solo.commands._manage import SoloManage +from _entropy.solo.utils import enlightenatom +from _entropy.solo.commands.descriptor import SoloCommandDescriptor +from _entropy.solo.commands._manage import SoloManage class SoloConfig(SoloManage): """ diff --git a/client/solo/commands/deptest.py b/client/solo/commands/deptest.py index 97d5021bb..78202c48b 100644 --- a/client/solo/commands/deptest.py +++ b/client/solo/commands/deptest.py @@ -16,8 +16,8 @@ import time from entropy.i18n import _ from entropy.output import darkred, blue, darkgreen -from solo.commands.descriptor import SoloCommandDescriptor -from solo.commands.install import SoloInstall +from _entropy.solo.commands.descriptor import SoloCommandDescriptor +from _entropy.solo.commands.install import SoloInstall class SoloDeptest(SoloInstall): """ diff --git a/client/solo/commands/download.py b/client/solo/commands/download.py index 8b6bf274f..630a91354 100644 --- a/client/solo/commands/download.py +++ b/client/solo/commands/download.py @@ -16,8 +16,8 @@ import argparse from entropy.i18n import _ from entropy.output import darkred, darkgreen, blue -from solo.commands.descriptor import SoloCommandDescriptor -from solo.commands._manage import SoloManage +from _entropy.solo.commands.descriptor import SoloCommandDescriptor +from _entropy.solo.commands._manage import SoloManage class SoloDownload(SoloManage): """ diff --git a/client/solo/commands/help.py b/client/solo/commands/help.py index a553ddaba..a749b91bc 100644 --- a/client/solo/commands/help.py +++ b/client/solo/commands/help.py @@ -14,9 +14,9 @@ import argparse from entropy.i18n import _ from entropy.output import teal, purple, darkgreen -from solo.colorful import ColorfulFormatter -from solo.commands.descriptor import SoloCommandDescriptor -from solo.commands.command import SoloCommand +from _entropy.solo.colorful import ColorfulFormatter +from _entropy.solo.commands.descriptor import SoloCommandDescriptor +from _entropy.solo.commands.command import SoloCommand class SoloHelp(SoloCommand): """ diff --git a/client/solo/commands/hop.py b/client/solo/commands/hop.py index e74e1105a..bad01d8cc 100644 --- a/client/solo/commands/hop.py +++ b/client/solo/commands/hop.py @@ -16,8 +16,8 @@ from entropy.i18n import _ from entropy.output import brown, purple, teal, darkred, bold, \ red, darkgreen -from solo.commands.descriptor import SoloCommandDescriptor -from solo.commands.command import SoloCommand, exclusivelock +from _entropy.solo.commands.descriptor import SoloCommandDescriptor +from _entropy.solo.commands.command import SoloCommand, exclusivelock class SoloHop(SoloCommand): """ diff --git a/client/solo/commands/install.py b/client/solo/commands/install.py index 4d1f725c4..8e13c698f 100644 --- a/client/solo/commands/install.py +++ b/client/solo/commands/install.py @@ -23,9 +23,9 @@ from entropy.client.interfaces.package.actions.action import PackageAction import entropy.tools -from solo.utils import enlightenatom -from solo.commands.descriptor import SoloCommandDescriptor -from solo.commands._manage import SoloManage +from _entropy.solo.utils import enlightenatom +from _entropy.solo.commands.descriptor import SoloCommandDescriptor +from _entropy.solo.commands._manage import SoloManage class SoloInstall(SoloManage): """ diff --git a/client/solo/commands/libtest.py b/client/solo/commands/libtest.py index e133aeb4f..dea5b7f8f 100644 --- a/client/solo/commands/libtest.py +++ b/client/solo/commands/libtest.py @@ -16,8 +16,8 @@ import time from entropy.i18n import _ from entropy.output import blue, darkred, brown, purple, teal, darkgreen -from solo.commands.descriptor import SoloCommandDescriptor -from solo.commands.install import SoloInstall +from _entropy.solo.commands.descriptor import SoloCommandDescriptor +from _entropy.solo.commands.install import SoloInstall class SoloLibtest(SoloInstall): """ diff --git a/client/solo/commands/mark.py b/client/solo/commands/mark.py index 7521308e7..46bb6291e 100644 --- a/client/solo/commands/mark.py +++ b/client/solo/commands/mark.py @@ -16,8 +16,8 @@ from entropy.i18n import _ from entropy.const import etpConst, const_convert_to_unicode from entropy.output import darkred, red, blue, brown, teal, purple -from solo.commands.descriptor import SoloCommandDescriptor -from solo.commands.command import SoloCommand, exclusivelock +from _entropy.solo.commands.descriptor import SoloCommandDescriptor +from _entropy.solo.commands.command import SoloCommand, exclusivelock class SoloMark(SoloCommand): diff --git a/client/solo/commands/mask.py b/client/solo/commands/mask.py index 152bd24b4..f55fca820 100644 --- a/client/solo/commands/mask.py +++ b/client/solo/commands/mask.py @@ -17,9 +17,9 @@ from entropy.const import const_convert_to_unicode from entropy.output import purple, teal, darkred, brown, red, \ darkgreen, blue -from solo.commands.descriptor import SoloCommandDescriptor -from solo.commands.command import SoloCommand -from solo.utils import enlightenatom +from _entropy.solo.commands.descriptor import SoloCommandDescriptor +from _entropy.solo.commands.command import SoloCommand +from _entropy.solo.utils import enlightenatom class SoloMaskUnmask(SoloCommand): diff --git a/client/solo/commands/match.py b/client/solo/commands/match.py index 89b2b9ccb..4c2e4e0bb 100644 --- a/client/solo/commands/match.py +++ b/client/solo/commands/match.py @@ -15,9 +15,9 @@ import argparse from entropy.i18n import _, ngettext from entropy.output import darkred, blue, brown, darkgreen, purple -from solo.commands.descriptor import SoloCommandDescriptor -from solo.commands.command import SoloCommand, sharedlock -from solo.utils import print_table, print_package_info +from _entropy.solo.commands.descriptor import SoloCommandDescriptor +from _entropy.solo.commands.command import SoloCommand, sharedlock +from _entropy.solo.utils import print_table, print_package_info import entropy.dep diff --git a/client/solo/commands/moo.py b/client/solo/commands/moo.py index e410cdaf2..c16bd3dad 100644 --- a/client/solo/commands/moo.py +++ b/client/solo/commands/moo.py @@ -13,8 +13,8 @@ import argparse from entropy.i18n import _ -from solo.commands.descriptor import SoloCommandDescriptor -from solo.commands.command import SoloCommand +from _entropy.solo.commands.descriptor import SoloCommandDescriptor +from _entropy.solo.commands.command import SoloCommand class SoloFunny(SoloCommand): diff --git a/client/solo/commands/notice.py b/client/solo/commands/notice.py index a8f21423d..a29f64cf2 100644 --- a/client/solo/commands/notice.py +++ b/client/solo/commands/notice.py @@ -17,8 +17,8 @@ from entropy.output import darkred, blue, brown, darkgreen from entropy.client.interfaces.noticeboard import NoticeBoard -from solo.commands.descriptor import SoloCommandDescriptor -from solo.commands.command import SoloCommand +from _entropy.solo.commands.descriptor import SoloCommandDescriptor +from _entropy.solo.commands.command import SoloCommand class SoloNotice(SoloCommand): """ diff --git a/client/solo/commands/pkg.py b/client/solo/commands/pkg.py index 1178a9e6d..faf494351 100644 --- a/client/solo/commands/pkg.py +++ b/client/solo/commands/pkg.py @@ -23,8 +23,8 @@ from entropy.output import darkgreen, teal, brown, purple, darkred, blue import entropy.tools import entropy.dep -from solo.commands.descriptor import SoloCommandDescriptor -from solo.commands.command import SoloCommand, sharedlock +from _entropy.solo.commands.descriptor import SoloCommandDescriptor +from _entropy.solo.commands.command import SoloCommand, sharedlock class SoloPkg(SoloCommand): diff --git a/client/solo/commands/preservedlibs.py b/client/solo/commands/preservedlibs.py index 9a3af6dd8..35a1c9dff 100644 --- a/client/solo/commands/preservedlibs.py +++ b/client/solo/commands/preservedlibs.py @@ -18,10 +18,10 @@ from entropy.output import brown, blue, darkred, darkgreen, purple, teal from entropy.client.interfaces.package import preservedlibs -from solo.commands.descriptor import SoloCommandDescriptor -from solo.commands.command import SoloCommand, sharedlock +from _entropy.solo.commands.descriptor import SoloCommandDescriptor +from _entropy.solo.commands.command import SoloCommand, sharedlock -from solo.utils import enlightenatom +from _entropy.solo.utils import enlightenatom class SoloPreservedLibs(SoloCommand): diff --git a/client/solo/commands/query.py b/client/solo/commands/query.py index e18c28caa..5a371e513 100644 --- a/client/solo/commands/query.py +++ b/client/solo/commands/query.py @@ -22,10 +22,10 @@ from entropy.output import darkgreen, darkred, blue, teal, purple, brown, \ import entropy.tools -from solo.commands.descriptor import SoloCommandDescriptor -from solo.commands.command import SoloCommand, sharedlock -from solo.utils import print_package_info, print_table, get_file_mime, \ - graph_packages, revgraph_packages +from _entropy.solo.commands.descriptor import SoloCommandDescriptor +from _entropy.solo.commands.command import SoloCommand, sharedlock +from _entropy.solo.utils import print_package_info, print_table, \ + get_file_mime, graph_packages, revgraph_packages class SoloQuery(SoloCommand): @@ -725,7 +725,7 @@ Repository query tools. Solo Query Installed command. Alias of "solo search --installed". """ - from solo.commands.search import SoloSearch + from _entropy.solo.commands.search import SoloSearch search = SoloSearch( self._nsargs, quiet=self._nsargs.quiet, verbose=self._nsargs.verbose, diff --git a/client/solo/commands/remove.py b/client/solo/commands/remove.py index d16373f4d..2127cd90b 100644 --- a/client/solo/commands/remove.py +++ b/client/solo/commands/remove.py @@ -21,9 +21,9 @@ from entropy.exceptions import DependenciesNotRemovable import entropy.tools -from solo.utils import enlightenatom -from solo.commands.descriptor import SoloCommandDescriptor -from solo.commands._manage import SoloManage +from _entropy.solo.utils import enlightenatom +from _entropy.solo.commands.descriptor import SoloCommandDescriptor +from _entropy.solo.commands._manage import SoloManage class SoloRemove(SoloManage): """ diff --git a/client/solo/commands/repo.py b/client/solo/commands/repo.py index 6c2b33af7..9fea55baf 100644 --- a/client/solo/commands/repo.py +++ b/client/solo/commands/repo.py @@ -21,9 +21,9 @@ from entropy.const import etpConst import entropy.tools -from solo.commands.descriptor import SoloCommandDescriptor -from solo.commands.command import SoloCommand -from solo.utils import print_table +from _entropy.solo.commands.descriptor import SoloCommandDescriptor +from _entropy.solo.commands.command import SoloCommand +from _entropy.solo.utils import print_table class SoloRepo(SoloCommand): """ diff --git a/client/solo/commands/rescue.py b/client/solo/commands/rescue.py index 6f8b5fe49..93f0f60c5 100644 --- a/client/solo/commands/rescue.py +++ b/client/solo/commands/rescue.py @@ -23,8 +23,9 @@ from entropy.exceptions import SystemDatabaseError from entropy.db.exceptions import OperationalError, DatabaseError from entropy.client.interfaces.db import InstalledPackagesRepository -from solo.commands.descriptor import SoloCommandDescriptor -from solo.commands.command import SoloCommand, sharedlock, exclusivelock +from _entropy.solo.commands.descriptor import SoloCommandDescriptor +from _entropy.solo.commands.command import SoloCommand, sharedlock, \ + exclusivelock import entropy.dep import entropy.tools diff --git a/client/solo/commands/search.py b/client/solo/commands/search.py index b675f3369..fd07e6fc0 100644 --- a/client/solo/commands/search.py +++ b/client/solo/commands/search.py @@ -15,9 +15,9 @@ import argparse from entropy.i18n import _, ngettext from entropy.output import darkred, blue, brown, darkgreen, purple -from solo.commands.descriptor import SoloCommandDescriptor -from solo.commands.command import SoloCommand, sharedlock -from solo.utils import print_table, print_package_info +from _entropy.solo.commands.descriptor import SoloCommandDescriptor +from _entropy.solo.commands.command import SoloCommand, sharedlock +from _entropy.solo.utils import print_table, print_package_info import entropy.dep diff --git a/client/solo/commands/security.py b/client/solo/commands/security.py index cb01519aa..1310201ac 100644 --- a/client/solo/commands/security.py +++ b/client/solo/commands/security.py @@ -19,9 +19,9 @@ from entropy.output import darkgreen, darkred, brown, blue, red, \ import entropy.tools -from solo.commands.descriptor import SoloCommandDescriptor -from solo.commands.install import SoloInstall -from solo.utils import print_table +from _entropy.solo.commands.descriptor import SoloCommandDescriptor +from _entropy.solo.commands.install import SoloInstall +from _entropy.solo.utils import print_table class SoloSecurity(SoloInstall): diff --git a/client/solo/commands/source.py b/client/solo/commands/source.py index 971aa14d9..f4c1463ea 100644 --- a/client/solo/commands/source.py +++ b/client/solo/commands/source.py @@ -16,8 +16,8 @@ import argparse from entropy.i18n import _ from entropy.output import darkred, darkgreen, blue -from solo.commands.descriptor import SoloCommandDescriptor -from solo.commands._manage import SoloManage +from _entropy.solo.commands.descriptor import SoloCommandDescriptor +from _entropy.solo.commands._manage import SoloManage class SoloSource(SoloManage): """ diff --git a/client/solo/commands/status.py b/client/solo/commands/status.py index 4e63265e4..1572d1fd9 100644 --- a/client/solo/commands/status.py +++ b/client/solo/commands/status.py @@ -19,8 +19,8 @@ from entropy.const import etpConst, const_convert_to_unicode import entropy.tools -from solo.commands.descriptor import SoloCommandDescriptor -from solo.commands.command import SoloCommand +from _entropy.solo.commands.descriptor import SoloCommandDescriptor +from _entropy.solo.commands.command import SoloCommand class SoloStatus(SoloCommand): """ diff --git a/client/solo/commands/ugc.py b/client/solo/commands/ugc.py index 9539fa94c..17133c08c 100644 --- a/client/solo/commands/ugc.py +++ b/client/solo/commands/ugc.py @@ -24,9 +24,9 @@ from entropy.client.services.interfaces import Document, DocumentFactory, \ import entropy.tools -from solo.commands.descriptor import SoloCommandDescriptor -from solo.commands.command import SoloCommand -from solo.utils import get_entropy_webservice as _get_service +from _entropy.solo.commands.descriptor import SoloCommandDescriptor +from _entropy.solo.commands.command import SoloCommand +from _entropy.solo.utils import get_entropy_webservice as _get_service class SoloUgc(SoloCommand): diff --git a/client/solo/commands/unused.py b/client/solo/commands/unused.py index 8968cc47b..fd95a2570 100644 --- a/client/solo/commands/unused.py +++ b/client/solo/commands/unused.py @@ -20,8 +20,8 @@ from entropy.output import red, blue, brown, darkgreen import entropy.tools -from solo.commands.descriptor import SoloCommandDescriptor -from solo.commands.command import SoloCommand, sharedlock +from _entropy.solo.commands.descriptor import SoloCommandDescriptor +from _entropy.solo.commands.command import SoloCommand, sharedlock class SoloUnused(SoloCommand): diff --git a/client/solo/commands/update.py b/client/solo/commands/update.py index f0c6fcd18..f6e3ca041 100644 --- a/client/solo/commands/update.py +++ b/client/solo/commands/update.py @@ -22,8 +22,8 @@ from entropy.client.interfaces.noticeboard import NoticeBoard import entropy.tools -from solo.commands.descriptor import SoloCommandDescriptor -from solo.commands.command import SoloCommand +from _entropy.solo.commands.descriptor import SoloCommandDescriptor +from _entropy.solo.commands.command import SoloCommand class SoloUpdate(SoloCommand): """ diff --git a/client/solo/commands/upgrade.py b/client/solo/commands/upgrade.py index 318623f55..07fd0bfa5 100644 --- a/client/solo/commands/upgrade.py +++ b/client/solo/commands/upgrade.py @@ -20,9 +20,9 @@ from entropy.locks import EntropyResourcesLock import entropy.tools -from solo.commands.descriptor import SoloCommandDescriptor -from solo.commands.install import SoloInstall -from solo.commands.remove import SoloRemove +from _entropy.solo.commands.descriptor import SoloCommandDescriptor +from _entropy.solo.commands.install import SoloInstall +from _entropy.solo.commands.remove import SoloRemove class SoloUpgrade(SoloInstall, SoloRemove): diff --git a/client/solo/commands/version.py b/client/solo/commands/version.py index 5ecd23868..57d081eb1 100644 --- a/client/solo/commands/version.py +++ b/client/solo/commands/version.py @@ -12,10 +12,10 @@ from entropy.i18n import _ from entropy.output import TextInterface -from solo.commands.descriptor import SoloCommandDescriptor -from solo.commands.command import SoloCommand +from _entropy.solo.commands.descriptor import SoloCommandDescriptor +from _entropy.solo.commands.command import SoloCommand -from solo.utils import read_client_release +from _entropy.solo.utils import read_client_release class SoloVersion(SoloCommand): """ diff --git a/client/solo/commands/yell.py b/client/solo/commands/yell.py index 9f3b913e9..7dc6543ab 100644 --- a/client/solo/commands/yell.py +++ b/client/solo/commands/yell.py @@ -15,8 +15,8 @@ from entropy.i18n import _ from entropy.output import TextInterface from entropy.cache import EntropyCacher -from solo.commands.descriptor import SoloCommandDescriptor -from solo.commands.command import SoloCommand +from _entropy.solo.commands.descriptor import SoloCommandDescriptor +from _entropy.solo.commands.command import SoloCommand class SoloYell(SoloCommand): """ diff --git a/client/solo/main.py b/client/solo/main.py index 4939734e4..60c8cedf8 100644 --- a/client/solo/main.py +++ b/client/solo/main.py @@ -25,8 +25,8 @@ from entropy.exceptions import SystemDatabaseError, OnlineMirrorError, \ import entropy.tools -from solo.commands.descriptor import SoloCommandDescriptor -from solo.utils import read_client_release +from _entropy.solo.commands.descriptor import SoloCommandDescriptor +from _entropy.solo.utils import read_client_release def handle_exception(exc_class, exc_instance, exc_tb): diff --git a/entropy_path_loader/compat/_entropy/__init__.py b/entropy_path_loader/compat/_entropy/__init__.py new file mode 100644 index 000000000..7ff8ac835 --- /dev/null +++ b/entropy_path_loader/compat/_entropy/__init__.py @@ -0,0 +1,4 @@ +import sys + +import solo +sys.modules['_entropy.solo'] = solo diff --git a/entropy_path_loader/entropy_path_loader.py b/entropy_path_loader/entropy_path_loader.py index 60bdaab1f..798ea6f56 100644 --- a/entropy_path_loader/entropy_path_loader.py +++ b/entropy_path_loader/entropy_path_loader.py @@ -31,7 +31,8 @@ def add_import_path(mod): mods = ( "client", "server", - "lib" + "lib", + "entropy_path_loader/compat" ) for mod in mods: diff --git a/lib/tests/client.py b/lib/tests/client.py index 5b6efd654..ac195fec9 100644 --- a/lib/tests/client.py +++ b/lib/tests/client.py @@ -308,7 +308,7 @@ else: # this test might be considered controversial, for now, let's keep it # here, we use equo stuff to make sure it keeps working - from solo.commands.pkg import SoloPkg + from _entropy.solo.commands.pkg import SoloPkg # we need to tweak the default unpack dir to make pkg install available # for uids != 0