multiple dist support
This commit is contained in:
parent
03ef30b3b8
commit
f9ad705a53
|
@ -1,3 +1,4 @@
|
||||||
cpython
|
cpython
|
||||||
.git
|
.git
|
||||||
temp
|
temp
|
||||||
|
/src/out
|
|
@ -0,0 +1,14 @@
|
||||||
|
FROM ubuntu:disco
|
||||||
|
|
||||||
|
RUN sed -i -E 's/(archive|security).ubuntu.com/192.168.1.142/' /etc/apt/sources.list && \
|
||||||
|
sed -i -E 's/^deb-src/# deb-src/' /etc/apt/sources.list && \
|
||||||
|
apt-get update && \
|
||||||
|
apt-get install -y dpkg-dev debhelper build-essential sudo wget curl
|
||||||
|
|
||||||
|
RUN useradd builder && \
|
||||||
|
install -d /build -o builder -g builder
|
||||||
|
|
||||||
|
ADD scripts/bootstrap.sh /bootstrap.sh
|
||||||
|
ADD scripts/build.sh /build.sh
|
||||||
|
|
||||||
|
ENTRYPOINT ["/bootstrap.sh"]
|
|
@ -0,0 +1,14 @@
|
||||||
|
FROM ubuntu:trusty
|
||||||
|
|
||||||
|
RUN sed -i -E 's/(archive|security).ubuntu.com/192.168.1.142/' /etc/apt/sources.list && \
|
||||||
|
sed -i -E 's/^deb-src/# deb-src/' /etc/apt/sources.list && \
|
||||||
|
apt-get update && \
|
||||||
|
apt-get install -y dpkg-dev debhelper build-essential sudo wget curl
|
||||||
|
|
||||||
|
RUN useradd builder && \
|
||||||
|
install -d /build -o builder -g builder
|
||||||
|
|
||||||
|
ADD scripts/bootstrap.sh /bootstrap.sh
|
||||||
|
ADD scripts/build.sh /build.sh
|
||||||
|
|
||||||
|
ENTRYPOINT ["/bootstrap.sh"]
|
|
@ -0,0 +1,14 @@
|
||||||
|
FROM ubuntu:xenial
|
||||||
|
|
||||||
|
RUN sed -i -E 's/(archive|security).ubuntu.com/192.168.1.142/' /etc/apt/sources.list && \
|
||||||
|
sed -i -E 's/^deb-src/# deb-src/' /etc/apt/sources.list && \
|
||||||
|
apt-get update && \
|
||||||
|
apt-get install -y dpkg-dev debhelper build-essential sudo wget curl
|
||||||
|
|
||||||
|
RUN useradd builder && \
|
||||||
|
install -d /build -o builder -g builder
|
||||||
|
|
||||||
|
ADD scripts/bootstrap.sh /bootstrap.sh
|
||||||
|
ADD scripts/build.sh /build.sh
|
||||||
|
|
||||||
|
ENTRYPOINT ["/bootstrap.sh"]
|
12
README.md
12
README.md
|
@ -7,7 +7,17 @@ Extpython is a collection of tools for building installable packages containing
|
||||||
installations are isolated from the operating system's python such that modules may be added, removed, or upgraded
|
installations are isolated from the operating system's python such that modules may be added, removed, or upgraded
|
||||||
without risk of breaking. The builds are executed in Docker.
|
without risk of breaking. The builds are executed in Docker.
|
||||||
|
|
||||||
|
Example invocation:
|
||||||
|
|
||||||
|
```
|
||||||
|
./images.sh
|
||||||
|
./build.sh trusty-3.7.3.sh
|
||||||
|
```
|
||||||
|
|
||||||
|
The vars file - `trusty-3.7.3.sh` above - contains information about what python version will be built. See
|
||||||
|
`src/bionic-3.7.3.sh` for an annotated example.
|
||||||
|
|
||||||
|
|
||||||
TODO:
|
TODO:
|
||||||
|
|
||||||
- Support other than Bionic
|
|
||||||
- Parameter for pre-loaded pip modules
|
- Parameter for pre-loaded pip modules
|
||||||
|
|
4
build.sh
4
build.sh
|
@ -2,6 +2,6 @@
|
||||||
|
|
||||||
VARSFILE=$1
|
VARSFILE=$1
|
||||||
|
|
||||||
ls -la src/$VARSFILE
|
. src/$VARSFILE
|
||||||
|
|
||||||
time docker run -it --rm -e "VARSFILE=$VARSFILE" -v $PWD/src:/src extpythonbuilder
|
time docker run -it --rm -e "VARSFILE=$VARSFILE" -v $PWD/src:/src extbuilder-$EXTPYTHON_DIST
|
||||||
|
|
|
@ -0,0 +1,7 @@
|
||||||
|
#!/bin/bash -ex
|
||||||
|
|
||||||
|
RELEASES="trusty xenial bionic disco"
|
||||||
|
|
||||||
|
for release in $RELEASES ; do
|
||||||
|
docker build -t extbuilder-${release} -f Dockerfile.${release} .
|
||||||
|
done
|
|
@ -3,6 +3,7 @@
|
||||||
# get metadata
|
# get metadata
|
||||||
ln -s /src/$VARSFILE /tmp/vars.sh
|
ln -s /src/$VARSFILE /tmp/vars.sh
|
||||||
. /tmp/vars.sh
|
. /tmp/vars.sh
|
||||||
|
. /etc/lsb-release #for DISTRIB_CODENAME
|
||||||
|
|
||||||
# install deps
|
# install deps
|
||||||
apt-get update
|
apt-get update
|
||||||
|
@ -12,6 +13,6 @@ DEBIAN_FRONTEND=noninteractive apt-get install -y -o Dpkg::Options::="--force-co
|
||||||
sudo -Hu builder /build.sh
|
sudo -Hu builder /build.sh
|
||||||
|
|
||||||
# export the debs
|
# export the debs
|
||||||
OUTDIR="/src/out/$PYTHON_RELEASE/"
|
OUTDIR="/src/out/${PYTHON_RELEASE}/${DISTRIB_CODENAME}"
|
||||||
mkdir -p $OUTDIR
|
mkdir -p $OUTDIR
|
||||||
cp /build/out/* $OUTDIR
|
cp /build/out/* $OUTDIR
|
||||||
|
|
|
@ -1,7 +1,8 @@
|
||||||
#!/usr/bin/make -f
|
#!/usr/bin/make -f
|
||||||
|
|
||||||
PY3_SRC=./cpython/
|
PY3_SRC=./cpython/
|
||||||
PY3_CONFFLAGS=--prefix=$(DESTDIR)/opt/extpython/_OPT_DIR_ --with-ensurepip=install --enable-optimizations
|
PY3_CONFFLAGS=--prefix=$(DESTDIR)/opt/extpython/_OPT_DIR_ --with-ensurepip=install
|
||||||
|
#--enable-optimizations
|
||||||
|
|
||||||
all:
|
all:
|
||||||
cd $(PY3_SRC) && \
|
cd $(PY3_SRC) && \
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
#!/bin/bash -eux
|
#!/bin/bash -eux
|
||||||
|
|
||||||
|
export EXTPYTHON_DIST=bionic
|
||||||
export PYTHON_RELEASE=2.7.16
|
export PYTHON_RELEASE=2.7.16
|
||||||
export PYTHON_MAJOR=2.7
|
export PYTHON_MAJOR=2.7
|
||||||
export PYTHON_TARBALL="http://artifact.scc.net.davepedu.com/repo/tar/cpython/cpython/cpython-${PYTHON_RELEASE}.tar.gz"
|
export PYTHON_TARBALL="http://artifact.scc.net.davepedu.com/repo/tar/cpython/cpython/cpython-${PYTHON_RELEASE}.tar.gz"
|
||||||
|
|
|
@ -1,5 +1,7 @@
|
||||||
#!/bin/bash -eux
|
#!/bin/bash -eux
|
||||||
|
|
||||||
|
# Which dist to build on
|
||||||
|
export EXTPYTHON_DIST=bionic
|
||||||
# Release is used to select which tarball to download
|
# Release is used to select which tarball to download
|
||||||
export PYTHON_RELEASE=3.7.3
|
export PYTHON_RELEASE=3.7.3
|
||||||
# Major version no is used in paths and labels (extpython-python${}, /opt/extpython/${}/...)
|
# Major version no is used in paths and labels (extpython-python${}, /opt/extpython/${}/...)
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
#!/bin/bash -eux
|
#!/bin/bash -eux
|
||||||
|
|
||||||
|
export EXTPYTHON_DIST=bionic
|
||||||
export PYTHON_RELEASE=3.8.0a4
|
export PYTHON_RELEASE=3.8.0a4
|
||||||
export PYTHON_MAJOR=3.8
|
export PYTHON_MAJOR=3.8
|
||||||
export PYTHON_TARBALL="http://artifact.scc.net.davepedu.com/repo/tar/cpython/cpython/cpython-${PYTHON_RELEASE}.tar.gz"
|
export PYTHON_TARBALL="http://artifact.scc.net.davepedu.com/repo/tar/cpython/cpython/cpython-${PYTHON_RELEASE}.tar.gz"
|
||||||
|
|
|
@ -0,0 +1,8 @@
|
||||||
|
#!/bin/bash -eux
|
||||||
|
|
||||||
|
export EXTPYTHON_DIST=disco
|
||||||
|
export PYTHON_RELEASE=3.7.3
|
||||||
|
export PYTHON_MAJOR=3.7
|
||||||
|
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"
|
|
@ -0,0 +1,12 @@
|
||||||
|
#!/bin/bash -eux
|
||||||
|
|
||||||
|
export EXTPYTHON_DIST=trusty
|
||||||
|
# Release is used to select which tarball to download
|
||||||
|
export PYTHON_RELEASE=3.7.3
|
||||||
|
# Major version no is used in paths and labels (extpython-python${}, /opt/extpython/${}/...)
|
||||||
|
export PYTHON_MAJOR=3.7
|
||||||
|
# Tarball download URL
|
||||||
|
export PYTHON_TARBALL="http://artifact.scc.net.davepedu.com/repo/tar/cpython/cpython/cpython-${PYTHON_RELEASE}.tar.gz"
|
||||||
|
# Deps needed to build this package
|
||||||
|
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"
|
Loading…
Reference in New Issue