Comments
Patch
@@ -141,6 +141,7 @@ rpm-py:
contrib/buildrpm --rpmbuilddir $(PWD)/build/rpm --withpython --suffix -py
# Valid rpm-$NAME targets have a corresponding contrib/docker/$NAME
+# For building packages including their own Python, add -py
rpm-%:
contrib/dockerrpm $@
@@ -3,3 +3,5 @@ FROM saltstack/centos-5-minimal
RUN yum install -y gcc make rpm-build gettext tar
# For using the OS Python
RUN yum install -y python-devel python-docutils
+# For building own Python
+RUN yum install -y readline-devel openssl-devel ncurses-devel zlib-devel bzip2-devel
@@ -3,3 +3,5 @@ FROM centos:centos6
RUN yum install -y gcc make rpm-build gettext tar
# For using the OS Python
RUN yum install -y python-devel python-docutils
+# For building own Python
+RUN yum install -y readline-devel openssl-devel ncurses-devel zlib-devel bzip2-devel
@@ -3,3 +3,5 @@ FROM fedora:20
RUN yum install -y gcc make rpm-build gettext tar
# For using the OS Python
RUN yum install -y python-devel python-docutils
+# For building own Python
+RUN yum install -y readline-devel openssl-devel ncurses-devel zlib-devel bzip2-devel
@@ -17,6 +17,11 @@ fi
[ "$1" ] || { echo "Error: platform name must be specified"; exit 1; }
NAME="$1"
NAME="${NAME#rpm-}"
+EXTRAOPTIONS=
+if [ -z "${NAME%%*-py}" ]; then
+ NAME="${NAME%-py}"
+ EXTRAOPTIONS="--withpython --suffix -py"
+fi
DFILE="$ROOTDIR/contrib/docker/$NAME"
[ -f "$DFILE" ] || { echo "Error: docker file $DFILE not found"; exit 1; }
@@ -31,7 +36,7 @@ echo RUN useradd $DBUILDUSER -u `id -u`
) | $DOCKER build --tag $CONTAINER -
RPMBUILD=$ROOTDIR/build/$NAME
-contrib/buildrpm --rpmbuilddir $RPMBUILD --prepare
+contrib/buildrpm --rpmbuilddir $RPMBUILD --prepare $EXTRAOPTIONS
DSHARED=/mnt/shared
$DOCKER run -u $DBUILDUSER --rm -v $RPMBUILD:$DSHARED $CONTAINER \