Scenario: Docker build fails
Given I have just cloned the repo
When I run "make build"
Then I receive the error "Directory '.' is not installable. File 'setup.py' not found."
And the docker image does not build
This is due to pip install -e .[dev] --no-cache-dir failing because local modules referenced inside of setup.py are not available at installation time -- specifically beacon_chain and ssz.
SOLUTION
Scenario: Add source files into the build image earlier
Given the problematic "Dockerfile" is
"""
FROM python:3.6-stretch
WORKDIR /usr/src/app
RUN pip install --upgrade setuptools
RUN pip install -e .[dev] --no-cache-dir
COPY . .
CMD [ "tail", "-f" "/dev/null" ]
"""
When I move "COPY . ." before "pip install -e .[dev] --no-cache-dir"
Then pip can properly resolve "beacon_chain" and "ssz"
And "make build" runs successfully
PROBLEM
pip install -e .[dev] --no-cache-dir
failing because local modules referenced inside ofsetup.py
are not available at installation time -- specificallybeacon_chain
andssz
.SOLUTION
CUTE ANIMAL PICTURE? 😅