diff --git a/client/Makefile b/client/Makefile index 638833e7c..37670f918 100644 --- a/client/Makefile +++ b/client/Makefile @@ -11,7 +11,7 @@ all: install: install -d $(DESTDIR)/$(LIBDIR)/entropy/client - install -d $(DESTDIR)/$(PYTHON_SITEDIR)/entropy/client/solo/commands + install -d $(DESTDIR)/$(PYTHON_SITEDIR)/_entropy/solo/commands install -d -m 775 $(DESTDIR)/etc/entropy install -d $(DESTDIR)$(BINDIR) install -d $(DESTDIR)$(PREFIX)/share/man/man1 @@ -19,8 +19,8 @@ install: # copying portage bashrc install -m 644 ../conf/client.conf $(DESTDIR)/etc/entropy/ - install -m 644 solo/*.py $(DESTDIR)/$(PYTHON_SITEDIR)/entropy/client/solo/ - install -m 644 solo/commands/*.py $(DESTDIR)/$(PYTHON_SITEDIR)/entropy/client/solo/commands/ + install -m 644 solo/*.py $(DESTDIR)/$(PYTHON_SITEDIR)/_entropy/solo/ + install -m 644 solo/commands/*.py $(DESTDIR)/$(PYTHON_SITEDIR)/_entropy/solo/commands/ install -m 644 revision $(DESTDIR)/$(LIBDIR)/entropy/client/ install -m 755 equo.py $(DESTDIR)/$(BINDIR)/equo install -m 755 kernel-switcher $(DESTDIR)/$(BINDIR)/ diff --git a/client/doc/generate b/client/doc/generate index b18d79ce9..3d6fb3b8d 100755 --- a/client/doc/generate +++ b/client/doc/generate @@ -10,12 +10,10 @@ from os import path as osp _base = osp.dirname(osp.dirname(osp.dirname(osp.realpath(__file__)))) if os.path.isfile(osp.join(_base, "entropy-in-vcs-checkout")): sys.path.insert(0, osp.join(_base, "entropy_path_loader")) -else: - sys.path.insert(0, "/usr/lib/entropy/entropy_path_loader") + import entropy_path_loader del osp -import entropy_path_loader -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 5f7ed1702..2566c980b 100755 --- a/client/equo.py +++ b/client/equo.py @@ -8,11 +8,9 @@ from os import path as osp _base = osp.dirname(osp.dirname(osp.realpath(__file__))) if os.path.isfile(osp.join(_base, "entropy-in-vcs-checkout")): sys.path.insert(0, osp.join(_base, "entropy_path_loader")) -else: - sys.path.insert(0, "/usr/lib/entropy/entropy_path_loader") + import entropy_path_loader del osp -import entropy_path_loader -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 8f5e194db..4fdf86ff3 100755 --- a/client/kernel-switcher +++ b/client/kernel-switcher @@ -6,10 +6,8 @@ from os import path as osp _base = osp.dirname(osp.dirname(osp.realpath(__file__))) if os.path.isfile(osp.join(_base, "entropy-in-vcs-checkout")): sys.path.insert(0, osp.join(_base, "entropy_path_loader")) -else: - sys.path.insert(0, "/usr/lib/entropy/entropy_path_loader") + import entropy_path_loader del osp -import entropy_path_loader import argparse @@ -20,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..fb6622bc6 --- /dev/null +++ b/entropy_path_loader/compat/_entropy/__init__.py @@ -0,0 +1,32 @@ +# -*- coding: utf-8 -*- +""" + + @author: Slawomir Nizio + @contact: lxnay@sabayon.org, slawomir.nizio@sabayon.org + @copyright: Slawomir Nizio + @license: GPL-2 + + B{Module to provide _entropy namespace}. + + When installed, internal modules go into B{_entropy}. This provides it for + running from the checkout. +""" +import sys + +import solo +sys.modules['_entropy.solo'] = solo + +import magneto +sys.modules['_entropy.magneto'] = magneto + +import eit +sys.modules['_entropy.eit'] = eit + +import matter +sys.modules['_entropy.matter'] = matter + +import rigo +sys.modules['_entropy.rigo'] = rigo + +import RigoDaemon +sys.modules['_entropy.RigoDaemon'] = RigoDaemon diff --git a/entropy_path_loader/entropy_path_loader.py b/entropy_path_loader/entropy_path_loader.py index e8398194f..e06c84abf 100644 --- a/entropy_path_loader/entropy_path_loader.py +++ b/entropy_path_loader/entropy_path_loader.py @@ -8,8 +8,9 @@ B{Python module path setter}. - This is a module that sets paths to other modules, which can be installed - on system or taken from sources checkout. + This module sets paths to other modules from sources checkout. + It must not be imported in case of installed application, system wide or + otherwise. """ import sys @@ -18,30 +19,24 @@ from os import path as osp base_dir = osp.dirname(osp.dirname(osp.realpath(__file__))) in_checkout = osp.isfile(osp.join(base_dir, "entropy-in-vcs-checkout")) -# Ugly, can go away if paths are in sys.path. -mods_outside_entropy_dir = set([ - "rigo", - "matter" -]) - -def add_import_path(mod): - if in_checkout: - base = base_dir - elif mod in mods_outside_entropy_dir: - base = "/usr/lib" - else: - base = "/usr/lib/entropy" - - lib = osp.join(base, mod) +def _add_import_path(path): + if not in_checkout: + raise RuntimeError( + "entropy_path_loader used when not in checkout") + lib = osp.join(base_dir, path) sys.path.insert(0, lib) -mods = ( +mod_paths = ( "client", "server", - "lib" + "lib", + "magneto/src", + "matter", + "rigo", + "entropy_path_loader/compat" ) -for mod in mods: - add_import_path(mod) +for path in mod_paths: + _add_import_path(path) diff --git a/lib/Makefile b/lib/Makefile index 5d9cfb583..41659afb8 100644 --- a/lib/Makefile +++ b/lib/Makefile @@ -13,16 +13,19 @@ all: install: install -d $(DESTDIR)/$(LIBDIR)/entropy/lib/entropy - install -d $(DESTDIR)/$(PYTHON_SITEDIR)/entropy/lib + install -d $(DESTDIR)/$(PYTHON_SITEDIR) + install -d $(DESTDIR)/$(PYTHON_SITEDIR)/_entropy install -d $(DESTDIR)$(PREFIX)/sbin install -d $(DESTDIR)$(BINDIR) install -d -m 775 $(DESTDIR)/etc/entropy install -d $(DESTDIR)/etc/env.d install -d $(DESTDIR)/etc/init.d install -d $(DESTDIR)/etc/logrotate.d - install -d $(DESTDIR)/$(PYTHON_SITEDIR)/entropy/services install -d $(DESTDIR)/$(TMPFILESDIR) + # Make it a package + touch $(DESTDIR)/$(PYTHON_SITEDIR)/_entropy/__init__.py + # Empty directories that should be created and kept install -d -m 775 $(DESTDIR)$(VARDIR)/tmp/entropy touch $(DESTDIR)$(VARDIR)/tmp/entropy/.keep @@ -37,11 +40,10 @@ install: touch $(DESTDIR)/$(VARDIR)/log/entropy/.keep chmod +x entropy/spm/plugins/interfaces/portage_plugin/env_sourcer.sh - cp -Ra entropy $(DESTDIR)/$(PYTHON_SITEDIR)/entropy/lib/ - rm $(DESTDIR)/$(PYTHON_SITEDIR)/entropy/lib/entropy/revision + cp -Ra entropy $(DESTDIR)/$(PYTHON_SITEDIR) + rm $(DESTDIR)/$(PYTHON_SITEDIR)/entropy/revision install -m 644 entropy/revision $(DESTDIR)/$(LIBDIR)/entropy/lib/entropy/ - ln -sf lib $(DESTDIR)/$(PYTHON_SITEDIR)/entropy/libraries install -m 755 ../misc/entropy.sh $(DESTDIR)$(PREFIX)/sbin/ install -m 755 ../misc/entropy_hwgen.sh $(DESTDIR)$(BINDIR)/ install -m 644 ../misc/entropy.logrotate $(DESTDIR)/etc/logrotate.d/entropy @@ -62,7 +64,6 @@ install: install -m 644 ../misc/05entropy.envd $(DESTDIR)/etc/env.d/05entropy install -m 644 ../docs/COPYING $(DESTDIR)/$(LIBDIR)/entropy/ - cp ../entropy_path_loader $(DESTDIR)/$(PYTHON_SITEDIR)/entropy/ -Ra install -m 644 ../conf/entropy-tmpfiles.d.conf $(DESTDIR)/$(TMPFILESDIR)/entropy.conf diff --git a/lib/kswitch/Makefile b/lib/kswitch/Makefile index 00475e992..4a13166ab 100644 --- a/lib/kswitch/Makefile +++ b/lib/kswitch/Makefile @@ -8,7 +8,7 @@ all: install: - install -d $(DESTDIR)/$(PYTHON_SITEDIR)/entropy/lib/kswitch - install -m 644 *.py $(DESTDIR)/$(PYTHON_SITEDIR)/entropy/lib/kswitch/ + install -d $(DESTDIR)/$(PYTHON_SITEDIR)/kswitch + install -m 644 *.py $(DESTDIR)/$(PYTHON_SITEDIR)/kswitch/ clean: diff --git a/lib/tests/client.py b/lib/tests/client.py index 5b6efd654..d30fe6b53 100644 --- a/lib/tests/client.py +++ b/lib/tests/client.py @@ -1,15 +1,17 @@ # -*- coding: utf-8 -*- import sys -sys.path.insert(0, 'client') -sys.path.insert(0, '../../client') -sys.path.insert(0, '.') -sys.path.insert(0, '../') import unittest import os import shutil import signal import time +from os import path as osp +_base = osp.dirname(osp.dirname(osp.dirname(osp.realpath(__file__)))) +sys.path.insert(0, osp.join(_base, "entropy_path_loader")) +import entropy_path_loader +del osp + from entropy.client.interfaces import Client from entropy.client.interfaces.db import InstalledPackagesRepository from entropy.client.interfaces.package.actions._triggers import Trigger @@ -308,7 +310,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 diff --git a/magneto/Makefile b/magneto/Makefile index ffc56068b..e004470ba 100644 --- a/magneto/Makefile +++ b/magneto/Makefile @@ -14,11 +14,11 @@ all: magneto-core-install: mkdir -p $(DESTDIR)$(PREFIX)/share/pixmaps/magneto mkdir -p $(DESTDIR)$(PREFIX)/share/magneto/icons - mkdir -p $(DESTDIR)/$(PYTHON_SITEDIR)/entropy/magneto/magneto/core + mkdir -p $(DESTDIR)/$(PYTHON_SITEDIR)/_entropy/magneto/core install -m644 src/magneto/*.py \ - $(DESTDIR)/$(PYTHON_SITEDIR)/entropy/magneto/magneto/. + $(DESTDIR)/$(PYTHON_SITEDIR)/_entropy/magneto/. install -m644 src/magneto/core/*.py \ - $(DESTDIR)/$(PYTHON_SITEDIR)/entropy/magneto/magneto/core/. + $(DESTDIR)/$(PYTHON_SITEDIR)/_entropy/magneto/core/. install -m644 $(PIXDIR)/* $(DESTDIR)$(PREFIX)/share/pixmaps/magneto/. install -m644 $(ICONDIR)/* $(DESTDIR)$(PREFIX)/share/magneto/icons/. @@ -34,26 +34,26 @@ magneto-loader-install: magneto-gtk-install: mkdir -p $(DESTDIR)/$(LIBDIR)/entropy/magneto/magneto/gtk - mkdir -p $(DESTDIR)/$(PYTHON_SITEDIR)/entropy/magneto/magneto/gtk + mkdir -p $(DESTDIR)/$(PYTHON_SITEDIR)/_entropy/magneto/gtk install -m644 src/magneto/gtk/*.py \ - $(DESTDIR)/$(PYTHON_SITEDIR)/entropy/magneto/magneto/gtk/. + $(DESTDIR)/$(PYTHON_SITEDIR)/_entropy/magneto/gtk/. install -m644 src/magneto/gtk/*.glade \ $(DESTDIR)/$(LIBDIR)/entropy/magneto/magneto/gtk/. magneto-gtk3-install: mkdir -p $(DESTDIR)/$(LIBDIR)/entropy/magneto/magneto/gtk3 - mkdir -p $(DESTDIR)/$(PYTHON_SITEDIR)/entropy/magneto/magneto/gtk3 + mkdir -p $(DESTDIR)/$(PYTHON_SITEDIR)/_entropy/magneto/gtk3 install -m644 src/magneto/gtk3/*.py \ - $(DESTDIR)/$(PYTHON_SITEDIR)/entropy/magneto/magneto/gtk3/. + $(DESTDIR)/$(PYTHON_SITEDIR)/_entropy/magneto/gtk3/. install -m644 src/magneto/gtk3/*.ui \ $(DESTDIR)/$(LIBDIR)/entropy/magneto/magneto/gtk3/. magneto-kde-install: - mkdir -p $(DESTDIR)/$(PYTHON_SITEDIR)/entropy/magneto/magneto/qt5 + mkdir -p $(DESTDIR)/$(PYTHON_SITEDIR)/_entropy/magneto/qt5 mkdir -p $(DESTDIR)$(PREFIX)/share/apps/magneto install -m644 src/magneto/qt5/*.py \ - $(DESTDIR)/$(PYTHON_SITEDIR)/entropy/magneto/magneto/qt5/. + $(DESTDIR)/$(PYTHON_SITEDIR)/_entropy/magneto/qt5/. # install Magneto notification service install -m644 $(MISCDIR)/magneto.notifyrc \ $(DESTDIR)$(PREFIX)/share/apps/magneto/. diff --git a/magneto/src/magneto/core/interfaces.py b/magneto/src/magneto/core/interfaces.py index fc12775d4..66c285e81 100644 --- a/magneto/src/magneto/core/interfaces.py +++ b/magneto/src/magneto/core/interfaces.py @@ -28,11 +28,11 @@ from entropy.i18n import _, ngettext from entropy.misc import ParallelTask # Magneto imports -from magneto.core import config +from _entropy.magneto.core import config # RigoDaemon imports -from RigoDaemon.config import DbusConfig -from RigoDaemon.enums import ActivityStates +from _entropy.RigoDaemon.config import DbusConfig +from _entropy.RigoDaemon.enums import ActivityStates class MagnetoIconMap(object): diff --git a/magneto/src/magneto/gtk/interfaces.py b/magneto/src/magneto/gtk/interfaces.py index 28b7b59c9..b3a1ece99 100644 --- a/magneto/src/magneto/gtk/interfaces.py +++ b/magneto/src/magneto/gtk/interfaces.py @@ -20,9 +20,9 @@ import gobject import pynotify # applet imports -from magneto.core import config -from magneto.core.interfaces import MagnetoCore -from magneto.gtk.components import AppletNoticeWindow +from _entropy.magneto.core import config +from _entropy.magneto.core.interfaces import MagnetoCore +from _entropy.magneto.gtk.components import AppletNoticeWindow # Entropy imports from entropy.i18n import _ diff --git a/magneto/src/magneto/gtk3/interfaces.py b/magneto/src/magneto/gtk3/interfaces.py index e07303df7..395c6ce03 100644 --- a/magneto/src/magneto/gtk3/interfaces.py +++ b/magneto/src/magneto/gtk3/interfaces.py @@ -17,9 +17,9 @@ import time import subprocess # applet imports -from magneto.core import config -from magneto.core.interfaces import MagnetoCore -from magneto.gtk3.components import AppletNoticeWindow +from _entropy.magneto.core import config +from _entropy.magneto.core.interfaces import MagnetoCore +from _entropy.magneto.gtk3.components import AppletNoticeWindow # Entropy imports from entropy.i18n import _ diff --git a/magneto/src/magneto/qt5/interfaces.py b/magneto/src/magneto/qt5/interfaces.py index 7998a73ae..9246dbf96 100644 --- a/magneto/src/magneto/qt5/interfaces.py +++ b/magneto/src/magneto/qt5/interfaces.py @@ -19,9 +19,9 @@ from PyQt5.QtWidgets import QApplication, QSystemTrayIcon, QMenu, \ QAction, QDialog # Magneto imports -from magneto.core import config -from magneto.core.interfaces import MagnetoCore -from magneto.qt5.components import AppletNoticeWindow +from _entropy.magneto.core import config +from _entropy.magneto.core.interfaces import MagnetoCore +from _entropy.magneto.qt5.components import AppletNoticeWindow # Entropy imports from entropy.i18n import _ diff --git a/magneto/src/magneto_app.py b/magneto/src/magneto_app.py index bfb39c84b..12efe062c 100755 --- a/magneto/src/magneto_app.py +++ b/magneto/src/magneto_app.py @@ -20,13 +20,8 @@ _base = osp.dirname( osp.dirname(osp.dirname(osp.realpath(__file__)))) if os.path.isfile(osp.join(_base, "entropy-in-vcs-checkout")): sys.path.insert(0, osp.join(_base, "entropy_path_loader")) -else: - sys.path.insert(0, "/usr/lib/entropy/entropy_path_loader") + import entropy_path_loader del osp -import entropy_path_loader - -entropy_path_loader.add_import_path("rigo") -entropy_path_loader.add_import_path("magneto") from entropy.locks import SimpleFileLock @@ -50,34 +45,34 @@ def _startup(unlock_callback): is_mate = desktop_session == "MATE" if "--kde" in sys.argv: - from magneto.qt5.interfaces import Magneto + from _entropy.magneto.qt5.interfaces import Magneto elif "--gtk" in sys.argv: - from magneto.gtk.interfaces import Magneto + from _entropy.magneto.gtk.interfaces import Magneto elif "--gtk3" in sys.argv: - from magneto.gtk3.interfaces import Magneto + from _entropy.magneto.gtk3.interfaces import Magneto else: if kde_env is not None: # this is KDE! try: - from magneto.qt5.interfaces import Magneto + from _entropy.magneto.qt5.interfaces import Magneto except (ImportError, RuntimeError,): # try GTK3, then GTK try: - from magneto.gtk3.interfaces import Magneto + from _entropy.magneto.gtk3.interfaces import Magneto except ImportError: - from magneto.gtk.interfaces import Magneto + from _entropy.magneto.gtk.interfaces import Magneto elif is_mate: # Load GTK2, fallback to GTK3 try: - from magneto.gtk.interfaces import Magneto + from _entropy.magneto.gtk.interfaces import Magneto except ImportError: - from magneto.gtk3.interfaces import Magneto + from _entropy.magneto.gtk3.interfaces import Magneto else: # load GTK3, fallback to GTK2 try: - from magneto.gtk3.interfaces import Magneto + from _entropy.magneto.gtk3.interfaces import Magneto except ImportError: - from magneto.gtk.interfaces import Magneto + from _entropy.magneto.gtk.interfaces import Magneto import entropy.tools magneto = Magneto() diff --git a/matter/Makefile b/matter/Makefile index 4ae21aeb5..a50b88772 100644 --- a/matter/Makefile +++ b/matter/Makefile @@ -4,7 +4,7 @@ LIBDIR = $(PREFIX)/lib PYTHON_SITEDIR = $(LIBDIR) SBINDIR = $(PREFIX)/sbin DESTDIR = -MATTER_PYDIR = $(DESTDIR)$(PYTHON_SITEDIR)/matter +MATTER_PYDIR = $(DESTDIR)$(PYTHON_SITEDIR)/_entropy all: for d in $(SUBDIRS); do $(MAKE) -C $$d; done diff --git a/matter/antimatter.py b/matter/antimatter.py index abf364fee..a8356e628 100755 --- a/matter/antimatter.py +++ b/matter/antimatter.py @@ -14,10 +14,8 @@ from os import path as osp _base = osp.dirname(osp.dirname(osp.realpath(__file__))) if os.path.isfile(osp.join(_base, "entropy-in-vcs-checkout")): sys.path.insert(0, osp.join(_base, "entropy_path_loader")) -else: - sys.path.insert(0, "/usr/lib/entropy/entropy_path_loader") + import entropy_path_loader del osp -import entropy_path_loader # Entropy imports from entropy.output import print_info, print_error, print_warning, \ diff --git a/matter/matter/binpms/base.py b/matter/matter/binpms/base.py index b8993249e..5e0444d8d 100644 --- a/matter/matter/binpms/base.py +++ b/matter/matter/binpms/base.py @@ -17,7 +17,7 @@ import os import shutil import subprocess -from matter.output import print_info, print_warning +from _entropy.matter.output import print_info, print_warning class BaseBinaryResourceLock(object): diff --git a/matter/matter/binpms/entropysrv.py b/matter/matter/binpms/entropysrv.py index 746b184ec..847f9001c 100644 --- a/matter/matter/binpms/entropysrv.py +++ b/matter/matter/binpms/entropysrv.py @@ -17,11 +17,12 @@ import subprocess import sys import threading -from matter.binpms.base import BaseBinaryResourceLock, \ +from _entropy.matter.binpms.base import BaseBinaryResourceLock, \ BaseBinaryPMS -from matter.spec import MatterSpec, MatterSpecParser, GenericSpecFunctions -from matter.output import print_info, print_warning, print_error -from matter.utils import print_traceback +from _entropy.matter.spec import MatterSpec, MatterSpecParser, \ + GenericSpecFunctions +from _entropy.matter.output import print_info, print_warning, print_error +from _entropy.matter.utils import print_traceback os.environ["ETP_GETTEXT_DOMAIN"] = "entropy-server" @@ -33,10 +34,8 @@ _base = osp.dirname( osp.dirname(osp.dirname(osp.dirname(osp.realpath(__file__))))) if os.path.isfile(osp.join(_base, "entropy-in-vcs-checkout")): sys.path.insert(0, osp.join(_base, "entropy_path_loader")) -else: - sys.path.insert(0, "/usr/lib/entropy/entropy_path_loader") + import entropy_path_loader del osp -import entropy_path_loader from entropy.exceptions import PermissionDenied, OnlineMirrorError from entropy.server.interfaces import Server diff --git a/matter/matter/builder.py b/matter/matter/builder.py index 926fc3a7c..cf423879a 100644 --- a/matter/matter/builder.py +++ b/matter/matter/builder.py @@ -19,8 +19,8 @@ import shutil import subprocess import tempfile -from matter.utils import mkstemp, mkdtemp, print_traceback -from matter.output import is_stdout_a_tty, print_info, print_warning, \ +from _entropy.matter.utils import mkstemp, mkdtemp, print_traceback +from _entropy.matter.output import is_stdout_a_tty, print_info, print_warning, \ print_error, getcolor, darkgreen, purple, brown # default mandatory features diff --git a/matter/matter/main.py b/matter/matter/main.py index 900620848..80ef1656b 100644 --- a/matter/matter/main.py +++ b/matter/matter/main.py @@ -17,14 +17,13 @@ import argparse import collections # keep these before PackageBuilder due to the os.environ stuff inside -from matter.binpms.base import BaseBinaryPMS, BaseBinaryResourceLock -from matter.builder import PackageBuilder -from matter.lock import MatterResourceLock -from matter.output import purple, darkgreen, print_info, \ +from _entropy.matter.binpms.base import BaseBinaryPMS, BaseBinaryResourceLock +from _entropy.matter.builder import PackageBuilder +from _entropy.matter.lock import MatterResourceLock +from _entropy.matter.output import purple, darkgreen, print_info, \ print_generic, print_warning, print_error, is_stdout_a_tty, nocolor -from matter.spec import SpecParser, MatterSpec -from matter.utils import print_exception - +from _entropy.matter.spec import SpecParser, MatterSpec +from _entropy.matter.utils import print_exception def install_exception_handler(): sys.excepthook = handle_exception @@ -260,7 +259,7 @@ def main(): nocolor() # Load Binary PMS modules - import matter.binpms as _pms + import _entropy.matter.binpms as _pms pms_dir = os.path.dirname(_pms.__file__) for thing in os.listdir(pms_dir): if thing.startswith("__init__.py"): @@ -274,7 +273,7 @@ def main(): name = os.path.basename(thing) name = name.rstrip(".py") - package = "matter.binpms.%s" % (name,) + package = "_entropy.matter.binpms.%s" % (name,) try: importlib.import_module(package) # they will then register diff --git a/matter/matter/output.py b/matter/matter/output.py index 8482430d7..06f3c9f6e 100644 --- a/matter/matter/output.py +++ b/matter/matter/output.py @@ -17,7 +17,7 @@ import errno import os import sys -from matter.utils import is_python3 +from _entropy.matter.utils import is_python3 stuff = {} diff --git a/matter/matter/spec.py b/matter/matter/spec.py index 4c85ca2fc..5d22219e3 100644 --- a/matter/matter/spec.py +++ b/matter/matter/spec.py @@ -12,7 +12,7 @@ import os import shlex -from matter.utils import convert_to_unicode, get_stringtype +from _entropy.matter.utils import convert_to_unicode, get_stringtype class GenericSpecFunctions(object): diff --git a/matter/matter_app.py b/matter/matter_app.py index 05c2b80ff..4b709e3c5 100755 --- a/matter/matter_app.py +++ b/matter/matter_app.py @@ -17,14 +17,10 @@ from os import path as osp _base = osp.dirname(osp.dirname(osp.realpath(__file__))) if os.path.isfile(osp.join(_base, "entropy-in-vcs-checkout")): sys.path.insert(0, osp.join(_base, "entropy_path_loader")) -else: - sys.path.insert(0, "/usr/lib/entropy/entropy_path_loader") + import entropy_path_loader del osp -import entropy_path_loader -entropy_path_loader.add_import_path("matter") - -from matter.main import main +from _entropy.matter.main import main if __name__ == "__main__": sys.argv[0] = "matter" diff --git a/rigo/Makefile b/rigo/Makefile index 0f84f3491..ded5bd54f 100644 --- a/rigo/Makefile +++ b/rigo/Makefile @@ -3,7 +3,7 @@ PREFIX = /usr BINDIR = $(PREFIX)/bin LIBDIR = $(PREFIX)/lib PYTHON_SITEDIR = $(LIBDIR) -RIGO_PYDIR = $(PYTHON_SITEDIR)/rigo +RIGO_PYDIR = $(PYTHON_SITEDIR)/_entropy DESTDIR = all: diff --git a/rigo/RigoDaemon/Makefile b/rigo/RigoDaemon/Makefile index 155cabcc8..179a43a6f 100644 --- a/rigo/RigoDaemon/Makefile +++ b/rigo/RigoDaemon/Makefile @@ -11,8 +11,8 @@ all: install: install -d $(DESTDIR)$(LIBEXECDIR) - install -d $(DESTDIR)$(PYTHON_SITEDIR)/rigo/RigoDaemon - install -m 644 $(wildcard *.py) $(DESTDIR)$(PYTHON_SITEDIR)/rigo/RigoDaemon/ + install -d $(DESTDIR)$(PYTHON_SITEDIR)/_entropy/RigoDaemon + install -m 644 $(wildcard *.py) $(DESTDIR)$(PYTHON_SITEDIR)/_entropy/RigoDaemon/ install -m 755 app/RigoDaemon_app.py $(DESTDIR)$(LIBEXECDIR)/ for d in $(SUBDIRS); do $(MAKE) -C $$d install; done diff --git a/rigo/RigoDaemon/app/RigoDaemon_app.py b/rigo/RigoDaemon/app/RigoDaemon_app.py index 701769763..384ba5fc3 100755 --- a/rigo/RigoDaemon/app/RigoDaemon_app.py +++ b/rigo/RigoDaemon/app/RigoDaemon_app.py @@ -57,12 +57,8 @@ _base = osp.dirname(osp.dirname( osp.dirname(osp.dirname(osp.realpath(__file__))))) if os.path.isfile(osp.join(_base, "entropy-in-vcs-checkout")): sys.path.insert(0, osp.join(_base, "entropy_path_loader")) -else: - sys.path.insert(0, "/usr/lib/entropy/entropy_path_loader") + import entropy_path_loader del osp -import entropy_path_loader - -entropy_path_loader.add_import_path("rigo") from entropy.cache import EntropyCacher # update default writeback timeout @@ -99,10 +95,10 @@ import kswitch import entropy.tools import entropy.dep -from RigoDaemon.enums import ActivityStates, AppActions, \ +from _entropy.RigoDaemon.enums import ActivityStates, AppActions, \ AppTransactionOutcome, AppTransactionStates -from RigoDaemon.config import DbusConfig, PolicyActions -from RigoDaemon.authentication import AuthenticationController +from _entropy.RigoDaemon.config import DbusConfig, PolicyActions +from _entropy.RigoDaemon.authentication import AuthenticationController TEXT = TextInterface() DAEMON_LOGFILE = os.path.join(etpConst['syslogdir'], "rigo-daemon.log") diff --git a/rigo/rigo/controllers/daemon.py b/rigo/rigo/controllers/daemon.py index 93720c5a1..7726d0a69 100644 --- a/rigo/rigo/controllers/daemon.py +++ b/rigo/rigo/controllers/daemon.py @@ -28,25 +28,26 @@ import dbus from gi.repository import Gtk, GLib, GObject -from rigo.enums import AppActions, RigoViewStates, \ +from _entropy.rigo.enums import AppActions, RigoViewStates, \ LocalActivityStates -from rigo.models.application import Application -from rigo.models.configupdate import ConfigUpdate -from rigo.models.noticeboard import Notice -from rigo.ui.gtk3.widgets.notifications import NotificationBox, \ +from _entropy.rigo.models.application import Application +from _entropy.rigo.models.configupdate import ConfigUpdate +from _entropy.rigo.models.noticeboard import Notice +from _entropy.rigo.ui.gtk3.widgets.notifications import NotificationBox, \ PleaseWaitNotificationBox, LicensesNotificationBox, \ OrphanedAppsNotificationBox, InstallNotificationBox, \ RemovalNotificationBox, QueueActionNotificationBox, \ UpdatesNotificationBox, RepositoriesUpdateNotificationBox, \ PreservedLibsNotificationBox -from rigo.utils import prepare_markup +from _entropy.rigo.utils import prepare_markup -from RigoDaemon.enums import ActivityStates as DaemonActivityStates, \ +from _entropy.RigoDaemon.enums import \ + ActivityStates as DaemonActivityStates, \ AppActions as DaemonAppActions, \ AppTransactionOutcome as DaemonAppTransactionOutcome, \ AppTransactionStates as DaemonAppTransactionStates -from RigoDaemon.config import DbusConfig as DaemonDbusConfig +from _entropy.RigoDaemon.config import DbusConfig as DaemonDbusConfig from entropy.const import const_debug_write, \ const_debug_enabled, etpConst diff --git a/rigo/rigo/entropyapi.py b/rigo/rigo/entropyapi.py index fec001e81..cb9d9bdf2 100644 --- a/rigo/rigo/entropyapi.py +++ b/rigo/rigo/entropyapi.py @@ -22,7 +22,7 @@ import os import tempfile from threading import Lock -from rigo.paths import CONF_DIR +from _entropy.rigo.paths import CONF_DIR from entropy.misc import ReadersWritersSemaphore from entropy.services.client import WebService diff --git a/rigo/rigo/models/application.py b/rigo/rigo/models/application.py index 0d629bf44..1b61bab5b 100644 --- a/rigo/rigo/models/application.py +++ b/rigo/rigo/models/application.py @@ -41,8 +41,8 @@ from entropy.client.services.interfaces import ClientWebService, \ import entropy.tools import entropy.dep -from rigo.enums import Icons -from rigo.utils import build_application_store_url, escape_markup, \ +from _entropy.rigo.enums import Icons +from _entropy.rigo.utils import build_application_store_url, escape_markup, \ prepare_markup diff --git a/rigo/rigo/models/configupdate.py b/rigo/rigo/models/configupdate.py index 22fb51e15..3989800c9 100644 --- a/rigo/rigo/models/configupdate.py +++ b/rigo/rigo/models/configupdate.py @@ -25,8 +25,8 @@ from threading import Semaphore from gi.repository import Gtk, GLib -from rigo.utils import escape_markup, prepare_markup, open_editor -from rigo.ui.gtk3.widgets.notifications import NotificationBox +from _entropy.rigo.utils import escape_markup, prepare_markup, open_editor +from _entropy.rigo.ui.gtk3.widgets.notifications import NotificationBox from entropy.const import const_file_writable from entropy.i18n import _ diff --git a/rigo/rigo/models/group.py b/rigo/rigo/models/group.py index cfd4fe2e8..e860ee846 100644 --- a/rigo/rigo/models/group.py +++ b/rigo/rigo/models/group.py @@ -19,7 +19,7 @@ this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA """ -from rigo.utils import prepare_markup, escape_markup +from _entropy.rigo.utils import prepare_markup, escape_markup class Group(object): diff --git a/rigo/rigo/models/noticeboard.py b/rigo/rigo/models/noticeboard.py index 25a3eda51..db43817b1 100644 --- a/rigo/rigo/models/noticeboard.py +++ b/rigo/rigo/models/noticeboard.py @@ -21,7 +21,7 @@ this program; if not, write to the Free Software Foundation, Inc., import hashlib import email.utils -from rigo.utils import prepare_markup, escape_markup +from _entropy.rigo.utils import prepare_markup, escape_markup class Notice(object): diff --git a/rigo/rigo/models/preference.py b/rigo/rigo/models/preference.py index 37085f9fe..bb29adeda 100644 --- a/rigo/rigo/models/preference.py +++ b/rigo/rigo/models/preference.py @@ -18,7 +18,7 @@ You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA """ -from rigo.utils import prepare_markup +from _entropy.rigo.utils import prepare_markup class Preference(object): diff --git a/rigo/rigo/models/repository.py b/rigo/rigo/models/repository.py index 00e7bb7c8..b50a536eb 100644 --- a/rigo/rigo/models/repository.py +++ b/rigo/rigo/models/repository.py @@ -21,7 +21,7 @@ this program; if not, write to the Free Software Foundation, Inc., import hashlib import email.utils -from rigo.utils import prepare_markup, escape_markup +from _entropy.rigo.utils import prepare_markup, escape_markup from entropy.i18n import _ diff --git a/rigo/rigo/ui/gtk3/controllers/application.py b/rigo/rigo/ui/gtk3/controllers/application.py index 317fc82e6..a6d1cc05b 100644 --- a/rigo/rigo/ui/gtk3/controllers/application.py +++ b/rigo/rigo/ui/gtk3/controllers/application.py @@ -21,18 +21,18 @@ this program; if not, write to the Free Software Foundation, Inc., from gi.repository import Gtk, Gdk, GLib, GObject -from rigo.em import StockEms -from rigo.enums import AppActions, RigoViewStates -from rigo.ui.gtk3.widgets.notifications import NotificationBox, \ +from _entropy.rigo.em import StockEms +from _entropy.rigo.enums import AppActions, RigoViewStates +from _entropy.rigo.ui.gtk3.widgets.notifications import NotificationBox, \ LoginNotificationBox -from rigo.ui.gtk3.widgets.stars import ReactiveStar -from rigo.ui.gtk3.widgets.comments import CommentBox -from rigo.ui.gtk3.widgets.images import ImageBox -from rigo.utils import build_application_store_url, \ +from _entropy.rigo.ui.gtk3.widgets.stars import ReactiveStar +from _entropy.rigo.ui.gtk3.widgets.comments import CommentBox +from _entropy.rigo.ui.gtk3.widgets.images import ImageBox +from _entropy.rigo.utils import build_application_store_url, \ escape_markup, prepare_markup -from rigo.models.preference import Preference +from _entropy.rigo.models.preference import Preference -from RigoDaemon.enums import AppActions as DaemonAppActions, \ +from _entropy.RigoDaemon.enums import AppActions as DaemonAppActions, \ ActivityStates as DaemonActivityStates from entropy.const import etpConst, const_debug_write, \ diff --git a/rigo/rigo/ui/gtk3/controllers/applications.py b/rigo/rigo/ui/gtk3/controllers/applications.py index 174dc4e26..86ca5f750 100644 --- a/rigo/rigo/ui/gtk3/controllers/applications.py +++ b/rigo/rigo/ui/gtk3/controllers/applications.py @@ -26,12 +26,12 @@ from threading import Lock, Semaphore, Timer from gi.repository import Gtk, GLib, GObject -from rigo.paths import CONF_DIR -from rigo.enums import RigoViewStates, AppActions, Icons -from rigo.models.application import Application, ApplicationMetadata -from rigo.models.preference import Preference -from rigo.utils import escape_markup, prepare_markup -from rigo.ui.gtk3.widgets.notifications import \ +from _entropy.rigo.paths import CONF_DIR +from _entropy.rigo.enums import RigoViewStates, AppActions, Icons +from _entropy.rigo.models.application import Application, ApplicationMetadata +from _entropy.rigo.models.preference import Preference +from _entropy.rigo.utils import escape_markup, prepare_markup +from _entropy.rigo.ui.gtk3.widgets.notifications import \ NotificationBox from entropy.cache import EntropyCacher diff --git a/rigo/rigo/ui/gtk3/controllers/confupdate.py b/rigo/rigo/ui/gtk3/controllers/confupdate.py index 280d1506a..fc4dc3c3f 100644 --- a/rigo/rigo/ui/gtk3/controllers/confupdate.py +++ b/rigo/rigo/ui/gtk3/controllers/confupdate.py @@ -22,9 +22,9 @@ from gi.repository import GObject, Gtk, GLib from threading import Lock -from rigo.ui.gtk3.widgets.notifications import \ +from _entropy.rigo.ui.gtk3.widgets.notifications import \ ConfigUpdatesNotificationBox, NotificationBox -from rigo.utils import prepare_markup +from _entropy.rigo.utils import prepare_markup from entropy.i18n import _ from entropy.const import const_debug_write diff --git a/rigo/rigo/ui/gtk3/controllers/group.py b/rigo/rigo/ui/gtk3/controllers/group.py index 7c1016012..dcb48025e 100644 --- a/rigo/rigo/ui/gtk3/controllers/group.py +++ b/rigo/rigo/ui/gtk3/controllers/group.py @@ -24,10 +24,10 @@ import errno from gi.repository import Gtk, GObject, GLib -from rigo.enums import Icons, RigoViewStates -from rigo.utils import prepare_markup -from rigo.models.preference import Preference -from rigo.models.group import Group +from _entropy.rigo.enums import Icons, RigoViewStates +from _entropy.rigo.utils import prepare_markup +from _entropy.rigo.models.preference import Preference +from _entropy.rigo.models.group import Group from entropy.const import const_debug_write from entropy.misc import ParallelTask diff --git a/rigo/rigo/ui/gtk3/controllers/noticeboard.py b/rigo/rigo/ui/gtk3/controllers/noticeboard.py index 5e6b8e760..8d9e24fd8 100644 --- a/rigo/rigo/ui/gtk3/controllers/noticeboard.py +++ b/rigo/rigo/ui/gtk3/controllers/noticeboard.py @@ -25,11 +25,11 @@ import tempfile from gi.repository import GObject, GLib -from rigo.paths import CONF_DIR -from rigo.ui.gtk3.widgets.notifications import \ +from _entropy.rigo.paths import CONF_DIR +from _entropy.rigo.ui.gtk3.widgets.notifications import \ NoticeBoardNotificationBox -from rigo.enums import RigoViewStates -from rigo.utils import open_url +from _entropy.rigo.enums import RigoViewStates +from _entropy.rigo.utils import open_url from entropy.cache import EntropyCacher from entropy.const import etpConst diff --git a/rigo/rigo/ui/gtk3/controllers/notifications.py b/rigo/rigo/ui/gtk3/controllers/notifications.py index 938464f21..d8e7688f9 100644 --- a/rigo/rigo/ui/gtk3/controllers/notifications.py +++ b/rigo/rigo/ui/gtk3/controllers/notifications.py @@ -21,8 +21,8 @@ this program; if not, write to the Free Software Foundation, Inc., from gi.repository import Gtk, GLib, GObject -from rigo.enums import LocalActivityStates -from rigo.ui.gtk3.widgets.notifications import NotificationBox, \ +from _entropy.rigo.enums import LocalActivityStates +from _entropy.rigo.ui.gtk3.widgets.notifications import NotificationBox, \ ConnectivityNotificationBox from entropy.misc import ParallelTask diff --git a/rigo/rigo/ui/gtk3/controllers/repository.py b/rigo/rigo/ui/gtk3/controllers/repository.py index 049254b02..98a5a8f9e 100644 --- a/rigo/rigo/ui/gtk3/controllers/repository.py +++ b/rigo/rigo/ui/gtk3/controllers/repository.py @@ -24,12 +24,12 @@ import errno from gi.repository import Gtk, GObject, GLib -from rigo.enums import Icons, RigoViewStates -from rigo.utils import prepare_markup -from rigo.models.repository import Repository -from rigo.ui.gtk3.widgets.notifications import NotificationBox, \ +from _entropy.rigo.enums import Icons, RigoViewStates +from _entropy.rigo.utils import prepare_markup +from _entropy.rigo.models.repository import Repository +from _entropy.rigo.ui.gtk3.widgets.notifications import NotificationBox, \ RenameRepositoryNotificationBox -from rigo.models.preference import Preference +from _entropy.rigo.models.preference import Preference from entropy.const import const_debug_write from entropy.misc import ParallelTask diff --git a/rigo/rigo/ui/gtk3/controllers/work.py b/rigo/rigo/ui/gtk3/controllers/work.py index d17917805..9ff481f1d 100644 --- a/rigo/rigo/ui/gtk3/controllers/work.py +++ b/rigo/rigo/ui/gtk3/controllers/work.py @@ -22,12 +22,12 @@ import os from gi.repository import GObject, GLib, Gtk, GdkPixbuf, Pango -from rigo.ui.gtk3.widgets.stars import Star -from rigo.ui.gtk3.widgets.terminal import TerminalWidget +from _entropy.rigo.ui.gtk3.widgets.stars import Star +from _entropy.rigo.ui.gtk3.widgets.terminal import TerminalWidget -from rigo.enums import Icons -from rigo.utils import escape_markup, prepare_markup -from RigoDaemon.enums import AppActions as DaemonAppActions +from _entropy.rigo.enums import Icons +from _entropy.rigo.utils import escape_markup, prepare_markup +from _entropy.RigoDaemon.enums import AppActions as DaemonAppActions from entropy.i18n import _, ngettext diff --git a/rigo/rigo/ui/gtk3/models/appliststore.py b/rigo/rigo/ui/gtk3/models/appliststore.py index 92d378a4d..41b0ecc43 100644 --- a/rigo/rigo/ui/gtk3/models/appliststore.py +++ b/rigo/rigo/ui/gtk3/models/appliststore.py @@ -23,8 +23,8 @@ from threading import Lock, Semaphore from gi.repository import Gtk, GLib, GObject, GdkPixbuf -from rigo.enums import Icons -from rigo.models.application import Application, ApplicationMetadata +from _entropy.rigo.enums import Icons +from _entropy.rigo.models.application import Application, ApplicationMetadata from entropy.const import const_debug_write, const_debug_enabled diff --git a/rigo/rigo/ui/gtk3/utils.py b/rigo/rigo/ui/gtk3/utils.py index 61fba165a..e3d41ce55 100644 --- a/rigo/rigo/ui/gtk3/utils.py +++ b/rigo/rigo/ui/gtk3/utils.py @@ -28,7 +28,7 @@ from gi.repository import Gtk, GdkPixbuf, GObject from entropy.const import const_mkstemp -from rigo.paths import ICON_PATH +from _entropy.rigo.paths import ICON_PATH LOG = logging.getLogger(__name__) diff --git a/rigo/rigo/ui/gtk3/widgets/apptreeview.py b/rigo/rigo/ui/gtk3/widgets/apptreeview.py index b34fafcc4..e7f0ca61e 100644 --- a/rigo/rigo/ui/gtk3/widgets/apptreeview.py +++ b/rigo/rigo/ui/gtk3/widgets/apptreeview.py @@ -27,12 +27,12 @@ from entropy.i18n import _ from .cellrenderers import CellRendererAppView, CellButtonRenderer, \ CellButtonIDs -from rigo.em import em, StockEms -from rigo.enums import Icons, AppActions -from rigo.models.application import Application -from rigo.ui.gtk3.widgets.generictreeview import GenericTreeView +from _entropy.rigo.em import em, StockEms +from _entropy.rigo.enums import Icons, AppActions +from _entropy.rigo.models.application import Application +from _entropy.rigo.ui.gtk3.widgets.generictreeview import GenericTreeView -from RigoDaemon.enums import AppActions as DaemonAppActions, \ +from _entropy.RigoDaemon.enums import AppActions as DaemonAppActions, \ ActivityStates as DaemonActivityStates diff --git a/rigo/rigo/ui/gtk3/widgets/cellrenderers.py b/rigo/rigo/ui/gtk3/widgets/cellrenderers.py index 78db031c9..2c719139b 100644 --- a/rigo/rigo/ui/gtk3/widgets/cellrenderers.py +++ b/rigo/rigo/ui/gtk3/widgets/cellrenderers.py @@ -25,9 +25,9 @@ from gi.repository import GLib, Gtk, Gdk, GObject, Pango from threading import Lock, Timer -from rigo.em import Ems -from rigo.utils import escape_markup -from rigo.enums import Icons +from _entropy.rigo.em import Ems +from _entropy.rigo.utils import escape_markup +from _entropy.rigo.enums import Icons from .stars import StarRenderer, StarSize diff --git a/rigo/rigo/ui/gtk3/widgets/comments.py b/rigo/rigo/ui/gtk3/widgets/comments.py index fb7030390..cf4f67077 100644 --- a/rigo/rigo/ui/gtk3/widgets/comments.py +++ b/rigo/rigo/ui/gtk3/widgets/comments.py @@ -20,8 +20,8 @@ this program; if not, write to the Free Software Foundation, Inc., """ from gi.repository import Gtk, Pango, GObject, GLib -from rigo.utils import escape_markup -from rigo.ui.gtk3.widgets.notifications import NotificationBox +from _entropy.rigo.utils import escape_markup +from _entropy.rigo.ui.gtk3.widgets.notifications import NotificationBox from entropy.i18n import _ from entropy.misc import ParallelTask diff --git a/rigo/rigo/ui/gtk3/widgets/confupdatetreeview.py b/rigo/rigo/ui/gtk3/widgets/confupdatetreeview.py index 34fb260b8..a33e6b42d 100644 --- a/rigo/rigo/ui/gtk3/widgets/confupdatetreeview.py +++ b/rigo/rigo/ui/gtk3/widgets/confupdatetreeview.py @@ -27,10 +27,11 @@ from entropy.i18n import _ from .cellrenderers import CellButtonRenderer, \ CellRendererConfigUpdateView, ConfigUpdateCellButtonIDs -from rigo.em import em, StockEms, Ems -from rigo.ui.gtk3.models.confupdateliststore import ConfigUpdatesListStore +from _entropy.rigo.em import em, StockEms, Ems +from _entropy.rigo.ui.gtk3.models.confupdateliststore import \ + ConfigUpdatesListStore -from rigo.ui.gtk3.widgets.generictreeview import GenericTreeView +from _entropy.rigo.ui.gtk3.widgets.generictreeview import GenericTreeView class ConfigUpdatesTreeView(GenericTreeView): diff --git a/rigo/rigo/ui/gtk3/widgets/generictreeview.py b/rigo/rigo/ui/gtk3/widgets/generictreeview.py index bbb3ef590..5b252fd0f 100644 --- a/rigo/rigo/ui/gtk3/widgets/generictreeview.py +++ b/rigo/rigo/ui/gtk3/widgets/generictreeview.py @@ -22,7 +22,7 @@ this program; if not, write to the Free Software Foundation, Inc., """ from gi.repository import Gtk, Gdk, GObject -from rigo.em import em, StockEms, Ems +from _entropy.rigo.em import em, StockEms, Ems class GenericTreeView(Gtk.TreeView): diff --git a/rigo/rigo/ui/gtk3/widgets/grouptreeview.py b/rigo/rigo/ui/gtk3/widgets/grouptreeview.py index d2342ed54..de94fb611 100644 --- a/rigo/rigo/ui/gtk3/widgets/grouptreeview.py +++ b/rigo/rigo/ui/gtk3/widgets/grouptreeview.py @@ -23,9 +23,9 @@ from gi.repository import Gtk, GObject from .cellrenderers import CellButtonRenderer, CellRendererGroupView, \ GroupCellButtonIDs -from rigo.ui.gtk3.models.groupliststore import GroupListStore +from _entropy.rigo.ui.gtk3.models.groupliststore import GroupListStore -from rigo.ui.gtk3.widgets.generictreeview import GenericTreeView +from _entropy.rigo.ui.gtk3.widgets.generictreeview import GenericTreeView from entropy.i18n import _ diff --git a/rigo/rigo/ui/gtk3/widgets/images.py b/rigo/rigo/ui/gtk3/widgets/images.py index 516e31bb0..f38c280f9 100644 --- a/rigo/rigo/ui/gtk3/widgets/images.py +++ b/rigo/rigo/ui/gtk3/widgets/images.py @@ -23,12 +23,12 @@ from threading import Lock from gi.repository import Gtk, Gdk, Pango, GObject, GdkPixbuf -from rigo.utils import escape_markup -from rigo.ui.gtk3.utils import get_sc_icon_theme -from rigo.paths import DATA_DIR -from rigo.enums import Icons -from rigo.utils import open_url -from rigo.ui.gtk3.models.appliststore import AppListStore +from _entropy.rigo.utils import escape_markup +from _entropy.rigo.ui.gtk3.utils import get_sc_icon_theme +from _entropy.rigo.paths import DATA_DIR +from _entropy.rigo.enums import Icons +from _entropy.rigo.utils import open_url +from _entropy.rigo.ui.gtk3.models.appliststore import AppListStore from entropy.client.services.interfaces import Document, DocumentFactory from entropy.i18n import _ diff --git a/rigo/rigo/ui/gtk3/widgets/noticeboardtreeview.py b/rigo/rigo/ui/gtk3/widgets/noticeboardtreeview.py index c2afc60ed..7d54bf8da 100644 --- a/rigo/rigo/ui/gtk3/widgets/noticeboardtreeview.py +++ b/rigo/rigo/ui/gtk3/widgets/noticeboardtreeview.py @@ -23,10 +23,11 @@ from gi.repository import Gtk, GObject from .cellrenderers import CellButtonRenderer, CellRendererNoticeView, \ NoticeCellButtonIDs -from rigo.utils import open_url -from rigo.ui.gtk3.models.noticeboardliststore import NoticeBoardListStore +from _entropy.rigo.utils import open_url +from _entropy.rigo.ui.gtk3.models.noticeboardliststore import \ + NoticeBoardListStore -from rigo.ui.gtk3.widgets.generictreeview import GenericTreeView +from _entropy.rigo.ui.gtk3.widgets.generictreeview import GenericTreeView class NoticeBoardTreeView(GenericTreeView): diff --git a/rigo/rigo/ui/gtk3/widgets/notifications.py b/rigo/rigo/ui/gtk3/widgets/notifications.py index ca9a70392..1537486e1 100644 --- a/rigo/rigo/ui/gtk3/widgets/notifications.py +++ b/rigo/rigo/ui/gtk3/widgets/notifications.py @@ -25,11 +25,11 @@ from threading import Timer, Semaphore, Lock from gi.repository import Gtk, GLib, GObject, Pango -from rigo.em import StockEms -from rigo.utils import build_register_url, open_url, escape_markup, \ +from _entropy.rigo.em import StockEms +from _entropy.rigo.utils import build_register_url, open_url, escape_markup, \ prepare_markup -from rigo.models.application import Application -from rigo.enums import AppActions, LocalActivityStates, RigoViewStates +from _entropy.rigo.models.application import Application +from _entropy.rigo.enums import AppActions, LocalActivityStates, RigoViewStates from entropy.const import etpConst, const_convert_to_unicode, \ const_debug_write, const_mkstemp diff --git a/rigo/rigo/ui/gtk3/widgets/preferencestreeview.py b/rigo/rigo/ui/gtk3/widgets/preferencestreeview.py index cdaa22506..9c7f4d087 100644 --- a/rigo/rigo/ui/gtk3/widgets/preferencestreeview.py +++ b/rigo/rigo/ui/gtk3/widgets/preferencestreeview.py @@ -23,9 +23,10 @@ from gi.repository import Gtk, GObject from .cellrenderers import CellButtonRenderer, CellRendererPreferenceView, \ PreferenceCellButtonIDs -from rigo.ui.gtk3.models.preferencesliststore import PreferencesListStore +from _entropy.rigo.ui.gtk3.models.preferencesliststore import \ + PreferencesListStore -from rigo.ui.gtk3.widgets.generictreeview import GenericTreeView +from _entropy.rigo.ui.gtk3.widgets.generictreeview import GenericTreeView from entropy.i18n import _ diff --git a/rigo/rigo/ui/gtk3/widgets/repositorytreeview.py b/rigo/rigo/ui/gtk3/widgets/repositorytreeview.py index 2baed546c..620aa2ce3 100644 --- a/rigo/rigo/ui/gtk3/widgets/repositorytreeview.py +++ b/rigo/rigo/ui/gtk3/widgets/repositorytreeview.py @@ -23,8 +23,8 @@ from gi.repository import Gtk, GObject from .cellrenderers import CellButtonRenderer, CellRendererRepositoryView, \ RepositoryCellButtonIDs -from rigo.ui.gtk3.models.repositoryliststore import RepositoryListStore -from rigo.ui.gtk3.widgets.generictreeview import GenericTreeView +from _entropy.rigo.ui.gtk3.models.repositoryliststore import RepositoryListStore +from _entropy.rigo.ui.gtk3.widgets.generictreeview import GenericTreeView class RepositoryTreeView(GenericTreeView): diff --git a/rigo/rigo/ui/gtk3/widgets/stars.py b/rigo/rigo/ui/gtk3/widgets/stars.py index 18e2c7292..007e8fde2 100644 --- a/rigo/rigo/ui/gtk3/widgets/stars.py +++ b/rigo/rigo/ui/gtk3/widgets/stars.py @@ -29,8 +29,8 @@ from gi.repository import Gtk, Gdk, GObject from entropy.i18n import _ -from rigo.shapes import ShapeStar -from rigo.em import StockEms, em, small_em, big_em +from _entropy.rigo.shapes import ShapeStar +from _entropy.rigo.em import StockEms, em, small_em, big_em _star_surface_cache = {} diff --git a/rigo/rigo/ui/gtk3/widgets/terminal.py b/rigo/rigo/ui/gtk3/widgets/terminal.py index 486901a40..382d5a728 100644 --- a/rigo/rigo/ui/gtk3/widgets/terminal.py +++ b/rigo/rigo/ui/gtk3/widgets/terminal.py @@ -29,8 +29,8 @@ from gi.repository import Vte, Gdk from entropy.const import etpConst, const_isunicode -from rigo.paths import CONF_DIR -from rigo.utils import prepare_markup +from _entropy.rigo.paths import CONF_DIR +from _entropy.rigo.utils import prepare_markup import entropy.tools from entropy.const import etpConst diff --git a/rigo/rigo/ui/gtk3/widgets/welcome.py b/rigo/rigo/ui/gtk3/widgets/welcome.py index 33131797d..2d277da8d 100644 --- a/rigo/rigo/ui/gtk3/widgets/welcome.py +++ b/rigo/rigo/ui/gtk3/widgets/welcome.py @@ -22,7 +22,7 @@ import os from gi.repository import Gtk -from rigo.paths import DATA_DIR +from _entropy.rigo.paths import DATA_DIR from entropy.i18n import _ diff --git a/rigo/rigo_app.py b/rigo/rigo_app.py index 7d3cf8431..c500961c4 100644 --- a/rigo/rigo_app.py +++ b/rigo/rigo_app.py @@ -33,57 +33,61 @@ from os import path as osp _base = osp.dirname(osp.dirname(osp.realpath(__file__))) if os.path.isfile(osp.join(_base, "entropy-in-vcs-checkout")): sys.path.insert(0, osp.join(_base, "entropy_path_loader")) -else: - sys.path.insert(0, "/usr/lib/entropy/entropy_path_loader") + import entropy_path_loader del osp -import entropy_path_loader - -entropy_path_loader.add_import_path("rigo") from gi.repository import Gtk, Gdk, GLib -from rigo.paths import DATA_DIR -from rigo.enums import RigoViewStates, LocalActivityStates -from rigo.entropyapi import EntropyWebService, EntropyClient as Client -from rigo.ui.gtk3.widgets.apptreeview import AppTreeView -from rigo.ui.gtk3.widgets.confupdatetreeview import ConfigUpdatesTreeView -from rigo.ui.gtk3.widgets.noticeboardtreeview import NoticeBoardTreeView -from rigo.ui.gtk3.widgets.preferencestreeview import PreferencesTreeView -from rigo.ui.gtk3.widgets.grouptreeview import GroupTreeView -from rigo.ui.gtk3.widgets.repositorytreeview import RepositoryTreeView -from rigo.ui.gtk3.widgets.notifications import NotificationBox -from rigo.ui.gtk3.controllers.applications import \ +from _entropy.rigo.paths import DATA_DIR +from _entropy.rigo.enums import RigoViewStates, LocalActivityStates +from _entropy.rigo.entropyapi import EntropyWebService, EntropyClient as Client +from _entropy.rigo.ui.gtk3.widgets.apptreeview import AppTreeView +from _entropy.rigo.ui.gtk3.widgets.confupdatetreeview import \ + ConfigUpdatesTreeView +from _entropy.rigo.ui.gtk3.widgets.noticeboardtreeview import \ + NoticeBoardTreeView +from _entropy.rigo.ui.gtk3.widgets.preferencestreeview import \ + PreferencesTreeView +from _entropy.rigo.ui.gtk3.widgets.grouptreeview import GroupTreeView +from _entropy.rigo.ui.gtk3.widgets.repositorytreeview import RepositoryTreeView +from _entropy.rigo.ui.gtk3.widgets.notifications import NotificationBox +from _entropy.rigo.ui.gtk3.controllers.applications import \ ApplicationsViewController -from rigo.ui.gtk3.controllers.application import \ +from _entropy.rigo.ui.gtk3.controllers.application import \ ApplicationViewController -from rigo.ui.gtk3.controllers.confupdate import \ +from _entropy.rigo.ui.gtk3.controllers.confupdate import \ ConfigUpdatesViewController -from rigo.ui.gtk3.controllers.noticeboard import \ +from _entropy.rigo.ui.gtk3.controllers.noticeboard import \ NoticeBoardViewController -from rigo.ui.gtk3.controllers.preference import \ +from _entropy.rigo.ui.gtk3.controllers.preference import \ PreferenceViewController -from rigo.ui.gtk3.controllers.repository import \ +from _entropy.rigo.ui.gtk3.controllers.repository import \ RepositoryViewController -from rigo.ui.gtk3.controllers.group import \ +from _entropy.rigo.ui.gtk3.controllers.group import \ GroupViewController -from rigo.ui.gtk3.controllers.notifications import \ +from _entropy.rigo.ui.gtk3.controllers.notifications import \ UpperNotificationViewController, BottomNotificationViewController -from rigo.ui.gtk3.controllers.work import \ +from _entropy.rigo.ui.gtk3.controllers.work import \ WorkViewController -from rigo.ui.gtk3.widgets.welcome import WelcomeBox -from rigo.ui.gtk3.models.appliststore import AppListStore -from rigo.ui.gtk3.models.confupdateliststore import ConfigUpdatesListStore -from rigo.ui.gtk3.models.noticeboardliststore import NoticeBoardListStore -from rigo.ui.gtk3.models.preferencesliststore import PreferencesListStore -from rigo.ui.gtk3.models.groupliststore import GroupListStore -from rigo.ui.gtk3.models.repositoryliststore import RepositoryListStore -from rigo.ui.gtk3.utils import init_sc_css_provider, get_sc_icon_theme +from _entropy.rigo.ui.gtk3.widgets.welcome import WelcomeBox +from _entropy.rigo.ui.gtk3.models.appliststore import AppListStore +from _entropy.rigo.ui.gtk3.models.confupdateliststore import \ + ConfigUpdatesListStore +from _entropy.rigo.ui.gtk3.models.noticeboardliststore import \ + NoticeBoardListStore +from _entropy.rigo.ui.gtk3.models.preferencesliststore import \ + PreferencesListStore +from _entropy.rigo.ui.gtk3.models.groupliststore import \ + GroupListStore +from _entropy.rigo.ui.gtk3.models.repositoryliststore import \ + RepositoryListStore +from _entropy.rigo.ui.gtk3.utils import init_sc_css_provider, get_sc_icon_theme -from rigo.utils import escape_markup -from rigo.controllers.daemon import RigoServiceController +from _entropy.rigo.utils import escape_markup +from _entropy.rigo.controllers.daemon import RigoServiceController -from RigoDaemon.enums import ActivityStates as DaemonActivityStates +from _entropy.RigoDaemon.enums import ActivityStates as DaemonActivityStates from entropy.const import const_debug_write, dump_signal from entropy.misc import TimeScheduled, ParallelTask, ReadersWritersSemaphore diff --git a/server/Makefile b/server/Makefile index 6eb92bde5..1d65875e1 100644 --- a/server/Makefile +++ b/server/Makefile @@ -9,13 +9,13 @@ all: for d in $(SUBDIRS); do $(MAKE) -C $$d; done install: - mkdir -p $(DESTDIR)$(PYTHON_SITEDIR)/entropy/server + mkdir -p $(DESTDIR)$(PYTHON_SITEDIR)/_entropy mkdir -p $(DESTDIR)/etc/entropy mkdir -p $(DESTDIR)$(BINDIR) install -m 644 ../conf/server.conf.example $(DESTDIR)/etc/entropy/ - cp -R eit $(DESTDIR)$(PYTHON_SITEDIR)/entropy/server/ + cp -R eit $(DESTDIR)$(PYTHON_SITEDIR)/_entropy/ install -m 755 eit.py $(DESTDIR)$(BINDIR)/eit for d in $(SUBDIRS); do $(MAKE) -C $$d install; done diff --git a/server/doc/generate b/server/doc/generate index 5aef4097d..81d883cba 100755 --- a/server/doc/generate +++ b/server/doc/generate @@ -10,12 +10,10 @@ from os import path as osp _base = osp.dirname(osp.dirname(osp.dirname(osp.realpath(__file__)))) if os.path.isfile(osp.join(_base, "entropy-in-vcs-checkout")): sys.path.insert(0, osp.join(_base, "entropy_path_loader")) -else: - sys.path.insert(0, "/usr/lib/entropy/entropy_path_loader") + import entropy_path_loader del osp -import entropy_path_loader -from eit.commands.descriptor import EitCommandDescriptor +from _entropy.eit.commands.descriptor import EitCommandDescriptor MAN_HEADER="""\ EIT(1) diff --git a/server/eit.py b/server/eit.py index 6b42cea65..907a10685 100755 --- a/server/eit.py +++ b/server/eit.py @@ -8,11 +8,9 @@ from os import path as osp _base = osp.dirname(osp.dirname(osp.realpath(__file__))) if os.path.isfile(osp.join(_base, "entropy-in-vcs-checkout")): sys.path.insert(0, osp.join(_base, "entropy_path_loader")) -else: - sys.path.insert(0, "/usr/lib/entropy/entropy_path_loader") + import entropy_path_loader del osp -import entropy_path_loader -from eit.main import main +from _entropy.eit.main import main sys.argv[0] = "eit" main() diff --git a/server/eit/commands/__init__.py b/server/eit/commands/__init__.py index 7dd9bdfa1..4cb0f3aa2 100644 --- a/server/eit/commands/__init__.py +++ b/server/eit/commands/__init__.py @@ -21,7 +21,7 @@ for py_file in os.listdir(_cur_dir): if py_file.startswith("_"): continue # strip .py - _mod = "eit.commands." + py_file[:-3] + _mod = "_entropy.eit.commands." + py_file[:-3] if _mod in _excluded_mods: continue try: diff --git a/server/eit/commands/add.py b/server/eit/commands/add.py index 9929705ee..9061b82a2 100644 --- a/server/eit/commands/add.py +++ b/server/eit/commands/add.py @@ -15,8 +15,8 @@ import argparse from entropy.i18n import _ -from eit.commands.descriptor import EitCommandDescriptor -from eit.commands.commit import EitCommit +from _entropy.eit.commands.descriptor import EitCommandDescriptor +from _entropy.eit.commands.commit import EitCommit class EitAdd(EitCommit): diff --git a/server/eit/commands/branch.py b/server/eit/commands/branch.py index 0e8e35d90..e39a96cfe 100644 --- a/server/eit/commands/branch.py +++ b/server/eit/commands/branch.py @@ -18,8 +18,8 @@ from entropy.output import bold, purple, darkgreen, blue, teal import entropy.tools -from eit.commands.descriptor import EitCommandDescriptor -from eit.commands.command import EitCommand +from _entropy.eit.commands.descriptor import EitCommandDescriptor +from _entropy.eit.commands.command import EitCommand class EitBranch(EitCommand): diff --git a/server/eit/commands/bump.py b/server/eit/commands/bump.py index 1fc1c6fc2..2d503527f 100644 --- a/server/eit/commands/bump.py +++ b/server/eit/commands/bump.py @@ -15,8 +15,8 @@ import argparse from entropy.output import darkgreen, blue from entropy.i18n import _ -from eit.commands.descriptor import EitCommandDescriptor -from eit.commands.command import EitCommand +from _entropy.eit.commands.descriptor import EitCommandDescriptor +from _entropy.eit.commands.command import EitCommand class EitBump(EitCommand): diff --git a/server/eit/commands/checkout.py b/server/eit/commands/checkout.py index 5d341ada2..59dfb3c46 100644 --- a/server/eit/commands/checkout.py +++ b/server/eit/commands/checkout.py @@ -16,8 +16,8 @@ import argparse from entropy.output import darkgreen, blue from entropy.i18n import _ -from eit.commands.descriptor import EitCommandDescriptor -from eit.commands.command import EitCommand +from _entropy.eit.commands.descriptor import EitCommandDescriptor +from _entropy.eit.commands.command import EitCommand class EitCheckout(EitCommand): diff --git a/server/eit/commands/cleanup.py b/server/eit/commands/cleanup.py index adf041aa4..8b7823764 100644 --- a/server/eit/commands/cleanup.py +++ b/server/eit/commands/cleanup.py @@ -16,8 +16,8 @@ import argparse from entropy.output import darkgreen, blue, purple from entropy.i18n import _ -from eit.commands.descriptor import EitCommandDescriptor -from eit.commands.command import EitCommand +from _entropy.eit.commands.descriptor import EitCommandDescriptor +from _entropy.eit.commands.command import EitCommand class EitCleanup(EitCommand): diff --git a/server/eit/commands/commit.py b/server/eit/commands/commit.py index e3bb64a79..6cf84513a 100644 --- a/server/eit/commands/commit.py +++ b/server/eit/commands/commit.py @@ -20,8 +20,8 @@ from entropy.output import darkgreen, teal, brown, \ import entropy.tools -from eit.commands.descriptor import EitCommandDescriptor -from eit.commands.command import EitCommand +from _entropy.eit.commands.descriptor import EitCommandDescriptor +from _entropy.eit.commands.command import EitCommand class EitCommit(EitCommand): diff --git a/server/eit/commands/cp.py b/server/eit/commands/cp.py index bad14fe00..704e94248 100644 --- a/server/eit/commands/cp.py +++ b/server/eit/commands/cp.py @@ -16,8 +16,8 @@ import argparse from entropy.output import darkgreen, blue, brown, bold, red, purple, teal from entropy.i18n import _ -from eit.commands.descriptor import EitCommandDescriptor -from eit.commands.command import EitCommand +from _entropy.eit.commands.descriptor import EitCommandDescriptor +from _entropy.eit.commands.command import EitCommand class EitCp(EitCommand): diff --git a/server/eit/commands/deps.py b/server/eit/commands/deps.py index 8cd41ee99..0511154c1 100644 --- a/server/eit/commands/deps.py +++ b/server/eit/commands/deps.py @@ -16,8 +16,8 @@ from entropy.i18n import _ from entropy.const import etpConst from entropy.output import purple, darkgreen, brown, teal, blue -from eit.commands.descriptor import EitCommandDescriptor -from eit.commands.command import EitCommand +from _entropy.eit.commands.descriptor import EitCommandDescriptor +from _entropy.eit.commands.command import EitCommand class EitDeps(EitCommand): diff --git a/server/eit/commands/files.py b/server/eit/commands/files.py index 12b3dd2e5..b23f2a59e 100644 --- a/server/eit/commands/files.py +++ b/server/eit/commands/files.py @@ -15,8 +15,8 @@ import argparse from entropy.i18n import _ from entropy.output import bold, purple, darkgreen, blue, brown, teal -from eit.commands.descriptor import EitCommandDescriptor -from eit.commands.command import EitCommand +from _entropy.eit.commands.descriptor import EitCommandDescriptor +from _entropy.eit.commands.command import EitCommand class EitFiles(EitCommand): diff --git a/server/eit/commands/graph.py b/server/eit/commands/graph.py index 02018da66..881783573 100644 --- a/server/eit/commands/graph.py +++ b/server/eit/commands/graph.py @@ -14,9 +14,9 @@ import argparse from entropy.i18n import _ -from eit.commands.descriptor import EitCommandDescriptor -from eit.commands.command import EitCommand -from eit.utils import graph_packages +from _entropy.eit.commands.descriptor import EitCommandDescriptor +from _entropy.eit.commands.command import EitCommand +from _entropy.eit.utils import graph_packages class EitGraph(EitCommand): """ diff --git a/server/eit/commands/help.py b/server/eit/commands/help.py index 46fe5ca1f..95cb899ce 100644 --- a/server/eit/commands/help.py +++ b/server/eit/commands/help.py @@ -14,9 +14,9 @@ import argparse from entropy.i18n import _ from entropy.output import teal, purple, darkgreen -from eit.colorful import ColorfulFormatter -from eit.commands.descriptor import EitCommandDescriptor -from eit.commands.command import EitCommand +from _entropy.eit.colorful import ColorfulFormatter +from _entropy.eit.commands.descriptor import EitCommandDescriptor +from _entropy.eit.commands.command import EitCommand class EitHelp(EitCommand): """ diff --git a/server/eit/commands/init.py b/server/eit/commands/init.py index a3c6a7dc6..58317e65b 100644 --- a/server/eit/commands/init.py +++ b/server/eit/commands/init.py @@ -16,8 +16,8 @@ import argparse from entropy.i18n import _ from entropy.output import darkgreen, teal -from eit.commands.descriptor import EitCommandDescriptor -from eit.commands.command import EitCommand +from _entropy.eit.commands.descriptor import EitCommandDescriptor +from _entropy.eit.commands.command import EitCommand class EitInit(EitCommand): diff --git a/server/eit/commands/inject.py b/server/eit/commands/inject.py index 31054f8d1..581487dd4 100644 --- a/server/eit/commands/inject.py +++ b/server/eit/commands/inject.py @@ -17,8 +17,8 @@ from entropy.const import const_file_readable from entropy.i18n import _ from entropy.output import teal, purple -from eit.commands.descriptor import EitCommandDescriptor -from eit.commands.command import EitCommand +from _entropy.eit.commands.descriptor import EitCommandDescriptor +from _entropy.eit.commands.command import EitCommand class EitInject(EitCommand): diff --git a/server/eit/commands/key.py b/server/eit/commands/key.py index c53e805fb..d8a896a1f 100644 --- a/server/eit/commands/key.py +++ b/server/eit/commands/key.py @@ -19,8 +19,8 @@ from entropy.i18n import _ from entropy.security import Repository from entropy.tools import convert_unix_time_to_human_time -from eit.commands.descriptor import EitCommandDescriptor -from eit.commands.command import EitCommand +from _entropy.eit.commands.descriptor import EitCommandDescriptor +from _entropy.eit.commands.command import EitCommand class EitKey(EitCommand): diff --git a/server/eit/commands/list.py b/server/eit/commands/list.py index 465c14baf..5e55835ba 100644 --- a/server/eit/commands/list.py +++ b/server/eit/commands/list.py @@ -17,8 +17,8 @@ from entropy.output import brown, teal, purple, darkgreen import entropy.dep -from eit.commands.descriptor import EitCommandDescriptor -from eit.commands.command import EitCommand +from _entropy.eit.commands.descriptor import EitCommandDescriptor +from _entropy.eit.commands.command import EitCommand class EitList(EitCommand): diff --git a/server/eit/commands/lock.py b/server/eit/commands/lock.py index 8df1b4e7a..7c8bee676 100644 --- a/server/eit/commands/lock.py +++ b/server/eit/commands/lock.py @@ -16,8 +16,8 @@ from entropy.i18n import _ from entropy.output import darkgreen, brown, purple, blue, darkred from entropy.transceivers import EntropyTransceiver -from eit.commands.descriptor import EitCommandDescriptor -from eit.commands.command import EitCommand +from _entropy.eit.commands.descriptor import EitCommandDescriptor +from _entropy.eit.commands.command import EitCommand class EitLock(EitCommand): diff --git a/server/eit/commands/log.py b/server/eit/commands/log.py index 5d2791cb5..fd73641de 100644 --- a/server/eit/commands/log.py +++ b/server/eit/commands/log.py @@ -17,8 +17,8 @@ import argparse from entropy.const import const_file_readable from entropy.i18n import _ -from eit.commands.descriptor import EitCommandDescriptor -from eit.commands.command import EitCommand +from _entropy.eit.commands.descriptor import EitCommandDescriptor +from _entropy.eit.commands.command import EitCommand class EitLog(EitCommand): diff --git a/server/eit/commands/match.py b/server/eit/commands/match.py index f8ea7a1bb..137dbc5cd 100644 --- a/server/eit/commands/match.py +++ b/server/eit/commands/match.py @@ -15,9 +15,9 @@ import argparse from entropy.i18n import _ from entropy.output import purple -from eit.commands.descriptor import EitCommandDescriptor -from eit.commands.command import EitCommand -from eit.utils import print_package_info +from _entropy.eit.commands.descriptor import EitCommandDescriptor +from _entropy.eit.commands.command import EitCommand +from _entropy.eit.utils import print_package_info class EitMatch(EitCommand): diff --git a/server/eit/commands/merge.py b/server/eit/commands/merge.py index 6f7df6c6a..81eccec5d 100644 --- a/server/eit/commands/merge.py +++ b/server/eit/commands/merge.py @@ -15,8 +15,8 @@ import argparse from entropy.i18n import _ -from eit.commands.descriptor import EitCommandDescriptor -from eit.commands.command import EitCommand +from _entropy.eit.commands.descriptor import EitCommandDescriptor +from _entropy.eit.commands.command import EitCommand class EitMerge(EitCommand): diff --git a/server/eit/commands/mv.py b/server/eit/commands/mv.py index 25b1c3db2..0a40b6c10 100644 --- a/server/eit/commands/mv.py +++ b/server/eit/commands/mv.py @@ -15,8 +15,8 @@ import argparse from entropy.i18n import _ -from eit.commands.descriptor import EitCommandDescriptor -from eit.commands.cp import EitCp +from _entropy.eit.commands.descriptor import EitCommandDescriptor +from _entropy.eit.commands.cp import EitCp class EitMv(EitCp): diff --git a/server/eit/commands/notice.py b/server/eit/commands/notice.py index 274e99fe2..5b22351f5 100644 --- a/server/eit/commands/notice.py +++ b/server/eit/commands/notice.py @@ -19,8 +19,8 @@ from entropy.i18n import _ from entropy.output import blue, darkred, darkgreen, purple, brown, teal from entropy.const import const_mkstemp -from eit.commands.descriptor import EitCommandDescriptor -from eit.commands.command import EitCommand +from _entropy.eit.commands.descriptor import EitCommandDescriptor +from _entropy.eit.commands.command import EitCommand class EitNotice(EitCommand): diff --git a/server/eit/commands/own.py b/server/eit/commands/own.py index b59d6fda2..32ab2ab18 100644 --- a/server/eit/commands/own.py +++ b/server/eit/commands/own.py @@ -16,9 +16,9 @@ import argparse from entropy.i18n import _ from entropy.output import purple, darkgreen, teal, bold -from eit.commands.descriptor import EitCommandDescriptor -from eit.commands.command import EitCommand -from eit.utils import print_package_info +from _entropy.eit.commands.descriptor import EitCommandDescriptor +from _entropy.eit.commands.command import EitCommand +from _entropy.eit.utils import print_package_info class EitOwn(EitCommand): diff --git a/server/eit/commands/pkgmove.py b/server/eit/commands/pkgmove.py index 8ba442de8..325a5b973 100644 --- a/server/eit/commands/pkgmove.py +++ b/server/eit/commands/pkgmove.py @@ -19,8 +19,8 @@ from entropy.i18n import _ from entropy.output import purple, teal from entropy.const import const_mkstemp -from eit.commands.descriptor import EitCommandDescriptor -from eit.commands.command import EitCommand +from _entropy.eit.commands.descriptor import EitCommandDescriptor +from _entropy.eit.commands.command import EitCommand class EitPkgmove(EitCommand): diff --git a/server/eit/commands/pull.py b/server/eit/commands/pull.py index 416660fcb..1c612c603 100644 --- a/server/eit/commands/pull.py +++ b/server/eit/commands/pull.py @@ -27,9 +27,9 @@ from entropy.client.interfaces.db import InstalledPackagesRepository import entropy.tools -from eit.commands.descriptor import EitCommandDescriptor -from eit.commands.command import EitCommand -from eit.commands.push import EitPush +from _entropy.eit.commands.descriptor import EitCommandDescriptor +from _entropy.eit.commands.command import EitCommand +from _entropy.eit.commands.push import EitPush class EitPull(EitCommand): diff --git a/server/eit/commands/push.py b/server/eit/commands/push.py index 404163627..d56badccf 100644 --- a/server/eit/commands/push.py +++ b/server/eit/commands/push.py @@ -27,8 +27,8 @@ from entropy.client.interfaces.db import InstalledPackagesRepository import entropy.tools -from eit.commands.descriptor import EitCommandDescriptor -from eit.commands.command import EitCommand +from _entropy.eit.commands.descriptor import EitCommandDescriptor +from _entropy.eit.commands.command import EitCommand class EitPush(EitCommand): diff --git a/server/eit/commands/query.py b/server/eit/commands/query.py index 2843f717d..1b70682a5 100644 --- a/server/eit/commands/query.py +++ b/server/eit/commands/query.py @@ -16,9 +16,9 @@ from entropy.output import purple, darkgreen, bold, brown, teal from entropy.const import etpConst from entropy.i18n import _ -from eit.commands.descriptor import EitCommandDescriptor -from eit.commands.command import EitCommand -from eit.utils import print_package_info +from _entropy.eit.commands.descriptor import EitCommandDescriptor +from _entropy.eit.commands.command import EitCommand +from _entropy.eit.utils import print_package_info class EitQuery(EitCommand): """ diff --git a/server/eit/commands/remote.py b/server/eit/commands/remote.py index a073852f5..65a3514bc 100644 --- a/server/eit/commands/remote.py +++ b/server/eit/commands/remote.py @@ -22,8 +22,8 @@ from entropy.server.interfaces.main import ServerSystemSettingsPlugin import entropy.tools -from eit.commands.descriptor import EitCommandDescriptor -from eit.commands.command import EitCommand +from _entropy.eit.commands.descriptor import EitCommandDescriptor +from _entropy.eit.commands.command import EitCommand class EitRemote(EitCommand): """ diff --git a/server/eit/commands/remove.py b/server/eit/commands/remove.py index d0eb6d3ed..dbebd4567 100644 --- a/server/eit/commands/remove.py +++ b/server/eit/commands/remove.py @@ -15,8 +15,8 @@ import argparse from entropy.i18n import _ from entropy.output import purple, darkgreen, brown, teal -from eit.commands.descriptor import EitCommandDescriptor -from eit.commands.command import EitCommand +from _entropy.eit.commands.descriptor import EitCommandDescriptor +from _entropy.eit.commands.command import EitCommand class EitRemove(EitCommand): diff --git a/server/eit/commands/repack.py b/server/eit/commands/repack.py index 8173b984e..fcc75adfb 100644 --- a/server/eit/commands/repack.py +++ b/server/eit/commands/repack.py @@ -14,8 +14,8 @@ import argparse from entropy.i18n import _ -from eit.commands.descriptor import EitCommandDescriptor -from eit.commands.commit import EitCommit +from _entropy.eit.commands.descriptor import EitCommandDescriptor +from _entropy.eit.commands.commit import EitCommit class EitRepack(EitCommit): diff --git a/server/eit/commands/repo.py b/server/eit/commands/repo.py index c5d42cb27..15428b7ef 100644 --- a/server/eit/commands/repo.py +++ b/server/eit/commands/repo.py @@ -16,9 +16,9 @@ from entropy.i18n import _ from entropy.output import blue, darkgreen, purple, teal from entropy.server.interfaces import RepositoryConfigParser -from eit.commands.descriptor import EitCommandDescriptor -from eit.commands.command import EitCommand -from eit.utils import print_table +from _entropy.eit.commands.descriptor import EitCommandDescriptor +from _entropy.eit.commands.command import EitCommand +from _entropy.eit.utils import print_table class EitRepo(EitCommand): diff --git a/server/eit/commands/reset.py b/server/eit/commands/reset.py index e4ba1712e..0acc77f69 100644 --- a/server/eit/commands/reset.py +++ b/server/eit/commands/reset.py @@ -15,8 +15,8 @@ import argparse from entropy.i18n import _ from entropy.output import darkgreen -from eit.commands.descriptor import EitCommandDescriptor -from eit.commands.pull import EitPull +from _entropy.eit.commands.descriptor import EitCommandDescriptor +from _entropy.eit.commands.pull import EitPull class EitReset(EitPull): diff --git a/server/eit/commands/revgraph.py b/server/eit/commands/revgraph.py index b82c5cd6e..33ad1e56f 100644 --- a/server/eit/commands/revgraph.py +++ b/server/eit/commands/revgraph.py @@ -14,9 +14,9 @@ import argparse from entropy.i18n import _ -from eit.commands.descriptor import EitCommandDescriptor -from eit.commands.command import EitCommand -from eit.utils import revgraph_packages +from _entropy.eit.commands.descriptor import EitCommandDescriptor +from _entropy.eit.commands.command import EitCommand +from _entropy.eit.utils import revgraph_packages class EitRevgraph(EitCommand): diff --git a/server/eit/commands/search.py b/server/eit/commands/search.py index 0e2130633..5a9a8b8b7 100644 --- a/server/eit/commands/search.py +++ b/server/eit/commands/search.py @@ -15,9 +15,9 @@ import argparse from entropy.i18n import _ from entropy.output import purple -from eit.commands.descriptor import EitCommandDescriptor -from eit.commands.command import EitCommand -from eit.utils import print_package_info +from _entropy.eit.commands.descriptor import EitCommandDescriptor +from _entropy.eit.commands.command import EitCommand +from _entropy.eit.utils import print_package_info class EitSearch(EitCommand): diff --git a/server/eit/commands/status.py b/server/eit/commands/status.py index c31837dd6..ecb9be077 100644 --- a/server/eit/commands/status.py +++ b/server/eit/commands/status.py @@ -18,9 +18,9 @@ from entropy.i18n import _ from entropy.output import darkgreen, teal, brown, darkred, \ bold, purple, blue -from eit.commands.descriptor import EitCommandDescriptor -from eit.commands.command import EitCommand -from eit.utils import print_table +from _entropy.eit.commands.descriptor import EitCommandDescriptor +from _entropy.eit.commands.command import EitCommand +from _entropy.eit.utils import print_table class EitStatus(EitCommand): diff --git a/server/eit/commands/test.py b/server/eit/commands/test.py index d4c6b6a90..0cede7668 100644 --- a/server/eit/commands/test.py +++ b/server/eit/commands/test.py @@ -16,8 +16,8 @@ from entropy.i18n import _ from entropy.output import teal, purple from entropy.server.interfaces import Server -from eit.commands.descriptor import EitCommandDescriptor -from eit.commands.command import EitCommand +from _entropy.eit.commands.descriptor import EitCommandDescriptor +from _entropy.eit.commands.command import EitCommand class EitTest(EitCommand): diff --git a/server/eit/main.py b/server/eit/main.py index f7268901b..600737c28 100644 --- a/server/eit/main.py +++ b/server/eit/main.py @@ -19,7 +19,7 @@ from entropy.output import print_error import entropy.tools from entropy.exceptions import OnlineMirrorError -from eit.commands.descriptor import EitCommandDescriptor +from _entropy.eit.commands.descriptor import EitCommandDescriptor def handle_exception(exc_class, exc_instance, exc_tb): diff --git a/services/entropy-pkgdelta-generator b/services/entropy-pkgdelta-generator index 5d1141c2d..bb73efb38 100755 --- a/services/entropy-pkgdelta-generator +++ b/services/entropy-pkgdelta-generator @@ -9,10 +9,8 @@ from os import path as osp _base = osp.dirname(osp.dirname(osp.realpath(__file__))) if os.path.isfile(osp.join(_base, "entropy-in-vcs-checkout")): sys.path.insert(0, osp.join(_base, "entropy_path_loader")) -else: - sys.path.insert(0, "/usr/lib/entropy/entropy_path_loader") + import entropy_path_loader del osp -import entropy_path_loader import tempfile import subprocess diff --git a/services/entropy-repository-statistics b/services/entropy-repository-statistics index 17183a0cf..d852a8991 100755 --- a/services/entropy-repository-statistics +++ b/services/entropy-repository-statistics @@ -16,10 +16,8 @@ from os import path as osp _base = osp.dirname(osp.dirname(osp.realpath(__file__))) if os.path.isfile(osp.join(_base, "entropy-in-vcs-checkout")): sys.path.insert(0, osp.join(_base, "entropy_path_loader")) -else: - sys.path.insert(0, "/usr/lib/entropy/entropy_path_loader") + import entropy_path_loader del osp -import entropy_path_loader from entropy.const import etpConst from entropy.client.interfaces import Client diff --git a/services/portage-repository-converter b/services/portage-repository-converter index 3f499262b..7aa17e65f 100755 --- a/services/portage-repository-converter +++ b/services/portage-repository-converter @@ -6,10 +6,8 @@ from os import path as osp _base = osp.dirname(osp.dirname(osp.realpath(__file__))) if os.path.isfile(osp.join(_base, "entropy-in-vcs-checkout")): sys.path.insert(0, osp.join(_base, "entropy_path_loader")) -else: - sys.path.insert(0, "/usr/lib/entropy/entropy_path_loader") + import entropy_path_loader del osp -import entropy_path_loader import tempfile diff --git a/services/repository-webinstall-generator b/services/repository-webinstall-generator index 40277adb6..cd943cace 100755 --- a/services/repository-webinstall-generator +++ b/services/repository-webinstall-generator @@ -6,10 +6,8 @@ from os import path as osp _base = osp.dirname(osp.dirname(osp.realpath(__file__))) if os.path.isfile(osp.join(_base, "entropy-in-vcs-checkout")): sys.path.insert(0, osp.join(_base, "entropy_path_loader")) -else: - sys.path.insert(0, "/usr/lib/entropy/entropy_path_loader") + import entropy_path_loader del osp -import entropy_path_loader import time import tempfile