Commit a6637686 authored by Mitar's avatar Mitar

Support editable mode.

parent 29223d7b
Pipeline #95823919 passed with stage
in 5 minutes and 33 seconds
......@@ -27,6 +27,7 @@ import docker
import frozendict
import pycurl
import yaml
from docker import errors as docker_errors
# To have both stderr and stdout interleaved together.
sys.stderr = sys.stdout
......@@ -198,7 +199,18 @@ def store_d3m_lib(docker_container, output_directory):
python_libs_path_base = os.path.basename(python_libs_path)
with tempfile.TemporaryFile() as python_lib_tar_file:
for chunk in docker_container.get_archive('{python_libs_path}/d3m'.format(python_libs_path=python_libs_path))[0].stream():
archive = None
try:
archive = docker_container.get_archive('{python_libs_path}/d3m'.format(python_libs_path=python_libs_path))[0]
except docker_errors.NotFound:
# This can fail if the package was installed in editable mode.
pass
if archive is None:
# We check the editable mode location as well.
archive = docker_container.get_archive('/src/d3m'.format(python_libs_path=python_libs_path))[0]
for chunk in archive.stream():
python_lib_tar_file.write(chunk)
python_lib_tar_file.seek(0)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment