|
|
@ -211,6 +211,8 @@ class _ComputedReqKindsMixin:
|
|
|
|
@classmethod
|
|
|
|
@classmethod
|
|
|
|
def from_dir_path(cls, dir_path, art_mgr):
|
|
|
|
def from_dir_path(cls, dir_path, art_mgr):
|
|
|
|
"""Make collection from an directory with metadata."""
|
|
|
|
"""Make collection from an directory with metadata."""
|
|
|
|
|
|
|
|
if dir_path.endswith(to_bytes(os.path.sep)):
|
|
|
|
|
|
|
|
dir_path = dir_path.rstrip(to_bytes(os.path.sep))
|
|
|
|
b_dir_path = to_bytes(dir_path, errors='surrogate_or_strict')
|
|
|
|
b_dir_path = to_bytes(dir_path, errors='surrogate_or_strict')
|
|
|
|
if not _is_collection_dir(b_dir_path):
|
|
|
|
if not _is_collection_dir(b_dir_path):
|
|
|
|
display.warning(
|
|
|
|
display.warning(
|
|
|
@ -261,6 +263,8 @@ class _ComputedReqKindsMixin:
|
|
|
|
regardless of whether any of known metadata files are present.
|
|
|
|
regardless of whether any of known metadata files are present.
|
|
|
|
"""
|
|
|
|
"""
|
|
|
|
# There is no metadata, but it isn't required for a functional collection. Determine the namespace.name from the path.
|
|
|
|
# There is no metadata, but it isn't required for a functional collection. Determine the namespace.name from the path.
|
|
|
|
|
|
|
|
if dir_path.endswith(to_bytes(os.path.sep)):
|
|
|
|
|
|
|
|
dir_path = dir_path.rstrip(to_bytes(os.path.sep))
|
|
|
|
u_dir_path = to_text(dir_path, errors='surrogate_or_strict')
|
|
|
|
u_dir_path = to_text(dir_path, errors='surrogate_or_strict')
|
|
|
|
path_list = u_dir_path.split(os.path.sep)
|
|
|
|
path_list = u_dir_path.split(os.path.sep)
|
|
|
|
req_name = '.'.join(path_list[-2:])
|
|
|
|
req_name = '.'.join(path_list[-2:])
|
|
|
@ -420,6 +424,9 @@ class _ComputedReqKindsMixin:
|
|
|
|
format(not_url=req_source.api_server),
|
|
|
|
format(not_url=req_source.api_server),
|
|
|
|
)
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if req_type == 'dir' and req_source.endswith(os.path.sep):
|
|
|
|
|
|
|
|
req_source = req_source.rstrip(os.path.sep)
|
|
|
|
|
|
|
|
|
|
|
|
tmp_inst_req = cls(req_name, req_version, req_source, req_type, req_signature_sources)
|
|
|
|
tmp_inst_req = cls(req_name, req_version, req_source, req_type, req_signature_sources)
|
|
|
|
|
|
|
|
|
|
|
|
if req_type not in {'galaxy', 'subdirs'} and req_name is None:
|
|
|
|
if req_type not in {'galaxy', 'subdirs'} and req_name is None:
|
|
|
|