Add python3 build script (#76)

* build python 3.5

* update to 3.5.2-8

* add python3.5 and mpdecimal to Makefile
This commit is contained in:
lguohan 2016-11-22 21:08:55 -08:00 committed by Qi Luo
parent 5621082dbb
commit f25188e3a4
3 changed files with 57 additions and 0 deletions

View File

@ -21,6 +21,18 @@ LIBTEAM-DEBS=libteam5_1.26-1_amd64.deb \
libteam-dev_1.26-1_amd64.deb \
libteam-utils_1.26-1_amd64.deb
MPDECIMAL_VER=2.4.2-1
MPDECIMAL-DEBS=libmpdec2_$(MPDECIMAL_VER)_amd64.deb \
libmpdec-dev_$(MPDECIMAL_VER)_amd64.deb
PYTHON3_5_VER=3.5.2-8
PYTHON3_5-DEBS=libpython3.5-minimal_$(PYTHON3_5_VER)_amd64.deb \
python3.5-minimal_$(PYTHON3_5_VER)_amd64.deb \
libpython3.5-stdlib_$(PYTHON3_5_VER)_amd64.deb \
python3.5_$(PYTHON3_5_VER)_amd64.deb
## Function: build_project, directory
## Build the project and save the .deb target in the same directory
## TRICK: clean dh state so it will force recreating .deb later
@ -44,6 +56,13 @@ $(LIBTEAM-DEBS): $(LIBNL-DEBS)
$(foreach dep, $^, $(call install_deb, $(dep)))
pushd libteam; ./build.sh; popd
$(MPDECIMAL-DEBS):
pushd mpdecimal; ./build.sh; popd
$(PYTHON3_5-DEBS): $(MPDECIMAL-DEBS)
$(foreach dep, $^, $(call install_deb, $(dep)))
pushd python3.5; ./build.sh; popd
redis-sentinel_$(REDIS_VERSION).deb redis-server_$(REDIS_VERSION).deb redis-tools_$(REDIS_VERSION).deb:
pushd redis; ./build.sh; popd

20
src/mpdecimal/build.sh Executable file
View File

@ -0,0 +1,20 @@
#!/bin/bash
MPDECIMAL_VER=2.4.2
MPDECIMAL_DEB_VER=1
wget -N http://http.debian.net/debian/pool/main/m/mpdecimal/mpdecimal_${MPDECIMAL_VER}.orig.tar.gz
wget -N http://http.debian.net/debian/pool/main/m/mpdecimal/mpdecimal_${MPDECIMAL_VER}-${MPDECIMAL_DEB_VER}.debian.tar.xz
wget -N http://http.debian.net/debian/pool/main/m/mpdecimal/mpdecimal_${MPDECIMAL_VER}-${MPDECIMAL_DEB_VER}.dsc
dpkg-source -x mpdecimal_${MPDECIMAL_VER}-${MPDECIMAL_DEB_VER}.dsc
pushd mpdecimal-${MPDECIMAL_VER}
sudo apt-get -y build-dep mpdecimal
dpkg-buildpackage -us -uc -b
popd
cp *.deb ../

18
src/python3.5/build.sh Executable file
View File

@ -0,0 +1,18 @@
#!/bin/bash
PYTHON_VER=3.5.2
PYTHON_DEB_VER=8
wget -N http://http.debian.net/debian/pool/main/p/python3.5/python3.5_${PYTHON_VER}.orig.tar.xz
wget -N http://http.debian.net/debian/pool/main/p/python3.5/python3.5_${PYTHON_VER}-${PYTHON_DEB_VER}.debian.tar.xz
wget -N http://http.debian.net/debian/pool/main/p/python3.5/python3.5_${PYTHON_VER}-${PYTHON_DEB_VER}.dsc
dpkg-source -x python3.5_${PYTHON_VER}-${PYTHON_DEB_VER}.dsc
pushd python3.5-${PYTHON_VER}
dpkg-buildpackage -us -uc -b
popd
cp *.deb ../