mirror of
https://github.com/psycopg/psycopg2.git
synced 2024-11-10 19:16:34 +03:00
Allow running cpychecker on Py3
Also add explicit sha version to check out when new commits added.
This commit is contained in:
parent
f9cec90912
commit
59e1c368ad
|
@ -1,4 +1,4 @@
|
|||
# docker build -f scripts/cpychecker.Dockerfile -t cpychecker scripts/
|
||||
# docker build -f scripts/cpychecker.Dockerfile --build-arg PYTHON=python2.7 -t cpychecker scripts/
|
||||
# docker run --rm -ti --name cpychecker --volume `pwd`:/psycopg2 cpychecker
|
||||
|
||||
FROM ubuntu:18.04
|
||||
|
@ -18,19 +18,29 @@ RUN apt-get update && \
|
|||
python-six \
|
||||
python2.7 \
|
||||
python2.7-dev \
|
||||
python3-lxml \
|
||||
python3-pygments \
|
||||
python3-setuptools \
|
||||
python3-six \
|
||||
python3.6 \
|
||||
python3.6-dev \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
RUN git clone -b psycopg2 https://github.com/dvarrazzo/gcc-python-plugin.git
|
||||
WORKDIR /gcc-python-plugin
|
||||
ENV PYTHON=python2.7
|
||||
ENV PYTHON_CONFIG=python2.7-config
|
||||
RUN git fetch origin 08d0e644cadd0e6e2d2008ee286e2ea05326148c
|
||||
RUN git reset --hard FETCH_HEAD
|
||||
|
||||
ARG PYTHON
|
||||
ENV PYTHON=$PYTHON
|
||||
|
||||
ENV CC=gcc-6
|
||||
RUN make PYTHON_CONFIG=$PYTHON_CONFIG plugin
|
||||
RUN make PYTHON="$PYTHON" PYTHON_CONFIG="$PYTHON-config" plugin
|
||||
|
||||
# expected to be mounted
|
||||
WORKDIR /psycopg2
|
||||
ENV CC_FOR_CPYCHECKER=$CC
|
||||
ENV CC=/gcc-python-plugin/gcc-with-cpychecker
|
||||
|
||||
CMD ["python2.7", "setup.py", "build"]
|
||||
CMD $PYTHON setup.py build
|
||||
# CMD ["sleep", "infinity"]
|
||||
|
|
Loading…
Reference in New Issue
Block a user