multi version support

This commit is contained in:
dave 2019-05-31 09:07:08 -07:00
parent b4bbd7ab89
commit 85e92b99c2
10 changed files with 51 additions and 12 deletions

View File

@ -1 +1,3 @@
cpython
.git
temp

2
.gitignore vendored Normal file
View File

@ -0,0 +1,2 @@
/temp
/src/out/

7
build.sh Executable file
View File

@ -0,0 +1,7 @@
#!/bin/bash -eux
VARSFILE=$1
ls -la src/$VARSFILE
time docker run -it --rm --name extbuild -e "VARSFILE=$VARSFILE" -v $PWD/src:/src extpythonbuilder

View File

@ -1,12 +1,12 @@
#!/bin/bash
#!/bin/bash -eux
# get metadata
cd /src
. vars.sh
ln -s /src/$VARSFILE /tmp/vars.sh
. /tmp/vars.sh
# install deps
apt-get update
DEBIAN_FRONTEND=noninteractive apt-get install -y $CPYTHON_DEPS
DEBIAN_FRONTEND=noninteractive apt-get install -y -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confold" $CPYTHON_DEPS
# run the build
sudo -Hu builder /build.sh

View File

@ -1,6 +1,10 @@
#!/bin/bash
#!/bin/bash -eux
. /src/vars.sh
. /tmp/vars.sh
function template {
perl -p -e 's/\$\{([^}]+)\}/defined $ENV{$1} ? $ENV{$1} : $&/eg' < $1
}
# create build dir
cd /build
@ -13,7 +17,14 @@ wget -qO- cpython.tar.gz $PYTHON_TARBALL | tar zxf - -C cpython/ --strip-compone
# get debian metadata
# todo generate the metadata here
cp -r /src/debian /src/Makefile ./
# cp -r /src/debian /src/Makefile ./
mkdir debian
export BUILD_DATE=$(date -R)
template /src/debian/changelog | tee debian/changelog
template /src/debian/control | tee debian/control
cp /src/debian/compat debian/
cp /src/debian/rules debian/
cp /src/Makefile ./
# build the deb
time dpkg-buildpackage -us -uc -b

8
src/bionic-2.7.16.sh Normal file
View File

@ -0,0 +1,8 @@
#!/bin/bash -eux
export PYTHON_RELEASE=2.7.16
export PYTHON_MAJOR=2.7.16
# export PYTHON_TARBALL="https://github.com/python/cpython/archive/v${PYTHON_RELEASE}.tar.gz"
export PYTHON_TARBALL="http://artifact.scc.net.davepedu.com/repo/tar/cpython/cpython/cpython-${PYTHON_RELEASE}.tar.gz"
export CPYTHON_DEPS="libssl-dev zlib1g-dev libncurses5-dev libncursesw5-dev \
libreadline-dev libsqlite3-dev libgdbm-dev libdb5.3-dev libbz2-dev libexpat1-dev liblzma-dev tk-dev libffi-dev"

View File

@ -1,6 +1,7 @@
#!/bin/bash
#!/bin/bash -eux
export PYTHON_RELEASE=3.7.3
export PYTHON_MAJOR=3.7
# export PYTHON_TARBALL="https://github.com/python/cpython/archive/v${PYTHON_RELEASE}.tar.gz"
export PYTHON_TARBALL="http://artifact.scc.net.davepedu.com/repo/tar/cpython/cpython/cpython-${PYTHON_RELEASE}.tar.gz"
export CPYTHON_DEPS="libssl-dev zlib1g-dev libncurses5-dev libncursesw5-dev \

8
src/bionic-3.8.0a4.sh Normal file
View File

@ -0,0 +1,8 @@
#!/bin/bash -eux
export PYTHON_RELEASE=3.8.0a4
export PYTHON_MAJOR=3.8.0a4
# export PYTHON_TARBALL="https://github.com/python/cpython/archive/v${PYTHON_RELEASE}.tar.gz"
export PYTHON_TARBALL="http://artifact.scc.net.davepedu.com/repo/tar/cpython/cpython/cpython-${PYTHON_RELEASE}.tar.gz"
export CPYTHON_DEPS="libssl-dev zlib1g-dev libncurses5-dev libncursesw5-dev \
libreadline-dev libsqlite3-dev libgdbm-dev libdb5.3-dev libbz2-dev libexpat1-dev liblzma-dev tk-dev libffi-dev"

View File

@ -1,5 +1,5 @@
extpython-python3.7 (3.7.3) unstable; urgency=low
extpython-python${PYTHON_MAJOR} (${PYTHON_RELEASE}) unstable; urgency=low
* Initial release
-- Dave Pedu <dave@davepedu.com> Thu, 30 May 2019 08:47:19 -0800
-- Dave Pedu <dave@davepedu.com> ${BUILD_DATE}

View File

@ -1,4 +1,4 @@
Source: extpython-python3.7
Source: extpython-python${PYTHON_MAJOR}
Section: unknown
Priority: optional
Maintainer: ubuntu <ubuntu@unknown>
@ -6,7 +6,7 @@ Build-Depends: debhelper (>= 8.0.0)
Standards-Version: 3.9.4
Homepage: <insert the upstream URL, if relevant>
Package: extpython-python3.7
Package: extpython-python${PYTHON_MAJOR}
Architecture: amd64
Depends: ${shlibs:Depends}, ${misc:Depends}
Description: <insert up to 60 chars description>