On Python3 Docker image, "python setup.py install" might fail in case
that the current directory contains the symlink to Docker host file
system and the link target is not visible from container.
e.g.)
  .tox/py34/include/python3.4m -> /usr/include/python3.4m

This patch fixes to remove .tox directory on Docker container and also
clean the previous builds before installing.

Signed-off-by: IWASE Yusuke <[email protected]>
---
 ryu/tests/integrated/common/docker_base.py | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/ryu/tests/integrated/common/docker_base.py 
b/ryu/tests/integrated/common/docker_base.py
index e2f9a98..6f7892d 100644
--- a/ryu/tests/integrated/common/docker_base.py
+++ b/ryu/tests/integrated/common/docker_base.py
@@ -210,6 +210,10 @@ class DockerImage(object):
             'RUN apt-get update',
             '&& apt-get install -qy --no-install-recommends %s' % pkges,
             '&& cd %s' % workdir_ctn,
+            # Note: Clean previous builds, because "python setup.py install"
+            # might fail if the current directory contains the symlink to
+            # Docker host file systems.
+            '&& rm -rf *.egg-info/ build/ dist/ .tox/ *.log'
             '&& pip install -r tools/pip-requires -r tools/optional-requires',
             '&& python setup.py install',
         ])
-- 
2.7.4


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
Ryu-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ryu-devel

Reply via email to