feat: use replication from pip
This commit is contained in:
@@ -45,21 +45,15 @@ from . import environment, utils
|
||||
|
||||
# TODO: remove dependency as soon as replication will be installed as a module
|
||||
DEPENDENCIES = {
|
||||
("zmq","zmq"),
|
||||
("jsondiff","jsondiff"),
|
||||
("deepdiff", "deepdiff")
|
||||
"replication",
|
||||
"deepdiff",
|
||||
}
|
||||
|
||||
|
||||
libs = os.path.dirname(os.path.abspath(__file__))+"\\libs\\replication\\replication"
|
||||
|
||||
def register():
|
||||
# Setup logging policy
|
||||
logging.basicConfig(format='%(levelname)s:%(message)s', level=logging.INFO)
|
||||
|
||||
if libs not in sys.path:
|
||||
sys.path.append(libs)
|
||||
|
||||
|
||||
try:
|
||||
environment.setup(DEPENDENCIES, bpy.app.binary_path_python)
|
||||
except ModuleNotFoundError:
|
||||
|
||||
@@ -38,7 +38,7 @@ __all__ = [
|
||||
] # Order here defines execution order
|
||||
|
||||
from . import *
|
||||
from ..libs.replication.replication.data import ReplicatedDataFactory
|
||||
from replication.data import ReplicatedDataFactory
|
||||
|
||||
def types_to_register():
|
||||
return __all__
|
||||
|
||||
@@ -21,8 +21,8 @@ import mathutils
|
||||
|
||||
from .. import utils
|
||||
from .dump_anything import Loader, Dumper
|
||||
from ..libs.replication.replication.data import ReplicatedDatablock
|
||||
from ..libs.replication.replication.constants import (UP, DIFF_BINARY)
|
||||
from replication.data import ReplicatedDatablock
|
||||
from replication.constants import (UP, DIFF_BINARY)
|
||||
|
||||
|
||||
def has_action(target):
|
||||
|
||||
@@ -21,7 +21,7 @@ import mathutils
|
||||
|
||||
from .dump_anything import Dumper, Loader, np_dump_collection, np_load_collection
|
||||
from .bl_datablock import BlDatablock
|
||||
from ..libs.replication.replication.exception import ContextError
|
||||
from replication.exception import ContextError
|
||||
|
||||
POINT = ['co', 'weight_softbody', 'co_deform']
|
||||
|
||||
|
||||
@@ -23,8 +23,8 @@ import logging
|
||||
import numpy as np
|
||||
|
||||
from .dump_anything import Dumper, Loader, np_load_collection_primitives, np_dump_collection_primitive, np_load_collection, np_dump_collection
|
||||
from ..libs.replication.replication.constants import DIFF_BINARY
|
||||
from ..libs.replication.replication.exception import ContextError
|
||||
from replication.constants import DIFF_BINARY
|
||||
from replication.exception import ContextError
|
||||
from .bl_datablock import BlDatablock
|
||||
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@ import logging
|
||||
|
||||
from .dump_anything import Loader, Dumper
|
||||
from .bl_datablock import BlDatablock
|
||||
from ..libs.replication.replication.exception import ContextError
|
||||
from replication.exception import ContextError
|
||||
|
||||
|
||||
def load_pose(target_bone, data):
|
||||
|
||||
@@ -20,7 +20,7 @@ import logging
|
||||
import bpy
|
||||
|
||||
from . import operators, presence, utils
|
||||
from .libs.replication.replication.constants import (FETCHED,
|
||||
from replication.constants import (FETCHED,
|
||||
RP_COMMON,
|
||||
STATE_INITIAL,
|
||||
STATE_QUITTING,
|
||||
|
||||
@@ -78,7 +78,7 @@ def setup(dependencies, python_path):
|
||||
if not module_can_be_imported("pip"):
|
||||
install_pip()
|
||||
|
||||
for module_name, package_name in dependencies:
|
||||
if not module_can_be_imported(module_name):
|
||||
for package_name in dependencies:
|
||||
if not module_can_be_imported(package_name):
|
||||
install_package(package_name)
|
||||
module_can_be_imported(package_name)
|
||||
|
||||
Submodule multi_user/libs/replication updated: 4ecfe5bd38...5c80295768
@@ -33,12 +33,12 @@ import mathutils
|
||||
from bpy.app.handlers import persistent
|
||||
|
||||
from . import bl_types, delayable, environment, presence, ui, utils
|
||||
from .libs.replication.replication.constants import (FETCHED, STATE_ACTIVE,
|
||||
from replication.constants import (FETCHED, STATE_ACTIVE,
|
||||
STATE_INITIAL,
|
||||
STATE_SYNCING)
|
||||
from .libs.replication.replication.data import ReplicatedDataFactory
|
||||
from .libs.replication.replication.exception import NonAuthorizedOperationError
|
||||
from .libs.replication.replication.interface import Session
|
||||
from replication.data import ReplicatedDataFactory
|
||||
from replication.exception import NonAuthorizedOperationError
|
||||
from replication.interface import Session
|
||||
|
||||
|
||||
client = None
|
||||
|
||||
@@ -22,7 +22,7 @@ import string
|
||||
import re
|
||||
|
||||
from . import utils, bl_types, environment, addon_updater_ops, presence, ui
|
||||
from .libs.replication.replication.constants import RP_COMMON
|
||||
from replication.constants import RP_COMMON
|
||||
|
||||
IP_EXPR = re.compile('\d+\.\d+\.\d+\.\d+')
|
||||
|
||||
|
||||
+1
-1
@@ -19,7 +19,7 @@
|
||||
import bpy
|
||||
|
||||
from . import operators, utils
|
||||
from .libs.replication.replication.constants import (ADDED, ERROR, FETCHED,
|
||||
from replication.constants import (ADDED, ERROR, FETCHED,
|
||||
MODIFIED, RP_COMMON, UP,
|
||||
STATE_ACTIVE, STATE_AUTH,
|
||||
STATE_CONFIG, STATE_SYNCING,
|
||||
|
||||
Reference in New Issue
Block a user