This repository was archived by the owner on Mar 8, 2020. It is now read-only.
File tree Expand file tree Collapse file tree 4 files changed +24
-6
lines changed Expand file tree Collapse file tree 4 files changed +24
-6
lines changed Original file line number Diff line number Diff line change @@ -4,7 +4,6 @@ RUN mkdir -p /opt/driver/src && \
44 adduser $BUILD_USER -u $BUILD_UID -D -h /opt/driver/src
55
66RUN apk add --no-cache --update python python-dev python3 python3-dev py-pip py2-pip git build-base bash
7- RUN pip3 install pydetector-bblfsh==0.10.3 \
8- git+https://github.com/python/mypy.git@0bb2d1680e8b9522108b38d203cb73021a617e64#egg=mypy-lang
7+ RUN pip3 install git+https://github.com/python/mypy.git@0bb2d1680e8b9522108b38d203cb73021a617e64#egg=mypy-lang
98
109WORKDIR /opt/driver/src
Original file line number Diff line number Diff line change 11FROM alpine:3.6
22MAINTAINER source{ d}
33
4- RUN apk add --no-cache --update python python3 py-pip py2-pip git
4+ ARG DEVDEPS=native/dev_deps
5+ ARG CONTAINER_DEVDEPS=/tmp/dev_deps
6+ ARG PYDETECTOR_VER=0.10.3
57
6- RUN pip2 install pydetector-bblfsh==0.10.3
8+ RUN apk add --no-cache --update python python3 py-pip py2-pip git
79
810ADD build /opt/driver/bin
911ADD native/python_package /tmp/python_driver
1012RUN pip3 install /tmp/python_driver
1113RUN yes|rm -rf /tmp/python_driver
1214
15+ ADD ${ DEVDEPS} ${ CONTAINER_DEVDEPS}
16+ ENV ENV_DEVDEPS=${ DEVDEPS}
17+ ENV ENV_PYDETECTOR_VER=${ PYDETECTOR_VER}
18+ RUN pip2 install -U ${ CONTAINER_DEVDEPS} /python-pydetector || pip2 install pydetector-bblfsh==${ PYDETECTOR_VER}
19+ RUN pip3 install -U ${ CONTAINER_DEVDEPS} /python-pydetector || pip3 install pydetector-bblfsh==${ PYDETECTOR_VER}
20+ RUN yes|rm -rf ${ CONTAINER_DEVDEPS}
21+
1322CMD /opt/driver/bin/driver
Original file line number Diff line number Diff line change 1+ DEV_DEPS ?= native/dev_deps
2+
13test-native-internal :
2- cd native/python_package/test; \
4+ pip3 install --user ${DEV_DEPS} /python-pydetector/ || pip3 install --user pydetector-bblfsh
5+ pip3 install --user git+https://github.com/python/mypy.git@0bb2d1680e8b9522108b38d203cb73021a617e64#egg=mypy-lang
6+ cd native/python_package/test && \
37 python3 -m unittest discover
48
59build-native-internal :
6- cd native/python_package/; \
10+ cd native/python_package/ && \
711 pip3 install -U --user .
812 cp native/sh/native.sh $(BUILD_PATH ) /native;
913 chmod +x $(BUILD_PATH ) /native
Original file line number Diff line number Diff line change 1+ If a pydetector directory exists here, it will be installed to the driver
2+ container image instead of the one from PyPI. This way you can test pydetector
3+ features related to the driver without publishing new versions.
4+
5+ Note that Docker doesn't allow to ` ADD ` symlinks so the directory
6+ must be copied, not linked.
You can’t perform that action at this time.
0 commit comments