Skip to content

Commit 7465546

Browse files
authored
Merge pull request #14542 from velconia/fix_dockerfile
Add sqlite3 support in Python3.6
2 parents 36f08ee + a902b8b commit 7465546

File tree

2 files changed

+13
-4
lines changed

2 files changed

+13
-4
lines changed

tools/manylinux1/Dockerfile.x64

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ ENV PKG_CONFIG_PATH=/usr/local/lib/pkgconfig
1616
RUN yum install -y sqlite-devel zlib-devel openssl-devel pcre-devel vim tk-devel tkinter libtool xz graphviz
1717
COPY build_scripts /build_scripts
1818
RUN bash build_scripts/build.sh && \
19-
bash build_scripts/install_nccl2.sh && rm -r build_scripts
19+
bash build_scripts/install_nccl2.sh && rm -rf build_scripts
2020

2121
ENV SSL_CERT_FILE=/opt/_internal/certs.pem
2222

tools/manylinux1/build_scripts/build_utils.sh

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,15 @@ function do_cpython_build {
5050
mkdir -p ${prefix}/lib
5151
# -Wformat added for https://bugs.python.org/issue17547 on Python 2.6
5252

53+
if [ $(lex_pyver $py_ver) -eq $(lex_pyver 3.6) ]; then
54+
wget https://www.sqlite.org/2018/sqlite-autoconf-3250300.tar.gz
55+
tar -zxf sqlite-autoconf-3250300.tar.gz
56+
cd sqlite-autoconf-3250300
57+
./configure --prefix=/usr/local
58+
make -j8 && make install
59+
cd ../ && rm sqlite-autoconf-3250300.tar.gz
60+
fi
61+
5362
# NOTE --enable-shared for generating libpython shared library needed for
5463
# linking of some of the nupic.core test executables.
5564
if [ $(lex_pyver $py_ver) -ge $(lex_pyver 3.7) ]; then
@@ -59,9 +68,9 @@ function do_cpython_build {
5968
make -j8 > /dev/null
6069
make altinstall > /dev/null
6170
else
62-
CFLAGS="-Wformat" ./configure --prefix=${prefix} --enable-shared $unicode_flags > /dev/null
63-
make -j8 > /dev/null
64-
make install > /dev/null
71+
LD_LIBRARY_PATH=/usr/local/lib:${LD_LIBRARY_PATH} CFLAGS="-Wformat" ./configure --prefix=${prefix} --enable-shared $unicode_flags > /dev/null
72+
LD_LIBRARY_PATH=/usr/local/lib:${LD_LIBRARY_PATH} make -j8 > /dev/null
73+
LD_LIBRARY_PATH=/usr/local/lib:${LD_LIBRARY_PATH} make install > /dev/null
6574
fi
6675
popd
6776
echo "ZZZ looking for libpython"

0 commit comments

Comments
 (0)