This repository was archived by the owner on Mar 8, 2020. It is now read-only.
File tree 4 files changed +24
-6
lines changed
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 && \
4
4
adduser $BUILD_USER -u $BUILD_UID -D -h /opt/driver/src
5
5
6
6
RUN 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
9
8
10
9
WORKDIR /opt/driver/src
Original file line number Diff line number Diff line change 1
1
FROM alpine:3.6
2
2
MAINTAINER source{ d}
3
3
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
5
7
6
- RUN pip2 install pydetector-bblfsh==0.10.3
8
+ RUN apk add --no-cache --update python python3 py-pip py2-pip git
7
9
8
10
ADD build /opt/driver/bin
9
11
ADD native/python_package /tmp/python_driver
10
12
RUN pip3 install /tmp/python_driver
11
13
RUN yes|rm -rf /tmp/python_driver
12
14
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
+
13
22
CMD /opt/driver/bin/driver
Original file line number Diff line number Diff line change
1
+ DEV_DEPS ?= native/dev_deps
2
+
1
3
test-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 && \
3
7
python3 -m unittest discover
4
8
5
9
build-native-internal :
6
- cd native/python_package/; \
10
+ cd native/python_package/ && \
7
11
pip3 install -U --user .
8
12
cp native/sh/native.sh $(BUILD_PATH ) /native;
9
13
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