Merge pull request #68 from Enlik/modules-reorg

Make Entropy able to work from within Python site directory
This commit is contained in:
Ettore Di Giacinto
2019-03-13 22:48:40 +01:00
committed by GitHub
139 changed files with 452 additions and 448 deletions
+3 -3
View File
@@ -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)/
+2 -4
View File
@@ -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)
+2 -4
View File
@@ -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()
+3 -5
View File
@@ -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
+1 -1
View File
@@ -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:
+2 -2
View File
@@ -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):
"""
+2 -2
View File
@@ -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):
"""
+3 -3
View File
@@ -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):
"""
+1 -1
View File
@@ -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():
+2 -2
View File
@@ -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):
+3 -3
View File
@@ -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):
"""
+2 -2
View File
@@ -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):
"""
+2 -2
View File
@@ -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):
"""
+3 -3
View File
@@ -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):
"""
+2 -2
View File
@@ -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):
"""
+3 -3
View File
@@ -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):
"""
+2 -2
View File
@@ -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):
"""
+2 -2
View File
@@ -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):
+3 -3
View File
@@ -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):
+3 -3
View File
@@ -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
+2 -2
View File
@@ -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):
+2 -2
View File
@@ -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):
"""
+2 -2
View File
@@ -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):
+3 -3
View File
@@ -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):
+5 -5
View File
@@ -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,
+3 -3
View File
@@ -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):
"""
+3 -3
View File
@@ -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):
"""
+3 -2
View File
@@ -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
+3 -3
View File
@@ -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
+3 -3
View File
@@ -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):
+2 -2
View File
@@ -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):
"""
+2 -2
View File
@@ -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):
"""
+3 -3
View File
@@ -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):
+2 -2
View File
@@ -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):
+2 -2
View File
@@ -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):
"""
+3 -3
View File
@@ -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):
+3 -3
View File
@@ -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):
"""
+2 -2
View File
@@ -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):
"""
+2 -2
View File
@@ -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):
@@ -0,0 +1,32 @@
# -*- coding: utf-8 -*-
"""
@author: Slawomir Nizio <slawomir.nizio@sabayon.org>
@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
+16 -21
View File
@@ -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)
+7 -6
View File
@@ -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
+2 -2
View File
@@ -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:
+7 -5
View File
@@ -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
+9 -9
View File
@@ -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/.
+3 -3
View File
@@ -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):
+3 -3
View File
@@ -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 _
+3 -3
View File
@@ -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 _
+3 -3
View File
@@ -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 _
+11 -16
View File
@@ -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()
+1 -1
View File
@@ -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
+1 -3
View File
@@ -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, \
+1 -1
View File
@@ -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):
+6 -7
View File
@@ -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
+2 -2
View File
@@ -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
+8 -9
View File
@@ -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
+1 -1
View File
@@ -17,7 +17,7 @@ import errno
import os
import sys
from matter.utils import is_python3
from _entropy.matter.utils import is_python3
stuff = {}
+1 -1
View File
@@ -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):
+2 -6
View File
@@ -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"
+1 -1
View File
@@ -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:
+2 -2
View File
@@ -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
+4 -8
View File
@@ -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")
+9 -8
View File
@@ -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
+1 -1
View File
@@ -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
+2 -2
View File
@@ -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
+2 -2
View File
@@ -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 _
+1 -1
View File
@@ -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):
+1 -1
View File
@@ -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):
+1 -1
View File
@@ -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):
+1 -1
View File
@@ -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 _
+9 -9
View File
@@ -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, \
@@ -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
+2 -2
View File
@@ -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
+4 -4
View File
@@ -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
+4 -4
View File
@@ -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
@@ -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
+5 -5
View File
@@ -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
+5 -5
View File
@@ -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
+2 -2
View File
@@ -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
+1 -1
View File
@@ -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__)
+5 -5
View File
@@ -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
+3 -3
View File
@@ -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
+2 -2
View File
@@ -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
@@ -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):
+1 -1
View File
@@ -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):
+2 -2
View File
@@ -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 _
+6 -6
View File
@@ -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 _
@@ -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):
+4 -4
View File
@@ -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
@@ -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 _
@@ -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):
+2 -2
View File
@@ -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 = {}
+2 -2
View File
@@ -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
+1 -1
View File
@@ -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 _
+39 -35
View File
@@ -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
+2 -2
View File
@@ -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
+2 -4
View File
@@ -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)
+2 -4
View File
@@ -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()
+1 -1
View File
@@ -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:
+2 -2
View File
@@ -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):

Some files were not shown because too many files have changed in this diff Show More