annotate Resources/Builders/MinGW64-Python3.12/docker-compile.sh @ 160:a5162d8bd2d4

Added Windows builder for Python 3.12
author Sebastien Jodogne <s.jodogne@gmail.com>
date Thu, 16 May 2024 22:50:11 +0200
parents
children 3678a028f1f6
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
160
a5162d8bd2d4 Added Windows builder for Python 3.12
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
1 #!/bin/bash
a5162d8bd2d4 Added Windows builder for Python 3.12
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
2
a5162d8bd2d4 Added Windows builder for Python 3.12
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
3 set -ex
a5162d8bd2d4 Added Windows builder for Python 3.12
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
4
a5162d8bd2d4 Added Windows builder for Python 3.12
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
5 if [ "$1" != "Debug" -a "$1" != "Release" ]; then
a5162d8bd2d4 Added Windows builder for Python 3.12
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
6 echo "Please provide build type: Debug or Release"
a5162d8bd2d4 Added Windows builder for Python 3.12
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
7 exit -1
a5162d8bd2d4 Added Windows builder for Python 3.12
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
8 fi
a5162d8bd2d4 Added Windows builder for Python 3.12
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
9
a5162d8bd2d4 Added Windows builder for Python 3.12
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
10 if [ -t 1 ]; then
a5162d8bd2d4 Added Windows builder for Python 3.12
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
11 # TTY is available => use interactive mode
a5162d8bd2d4 Added Windows builder for Python 3.12
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
12 DOCKER_FLAGS='-i'
a5162d8bd2d4 Added Windows builder for Python 3.12
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
13 fi
a5162d8bd2d4 Added Windows builder for Python 3.12
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
14
a5162d8bd2d4 Added Windows builder for Python 3.12
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
15 ROOT_DIR=`dirname $(readlink -f $0)`/../../..
a5162d8bd2d4 Added Windows builder for Python 3.12
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
16
a5162d8bd2d4 Added Windows builder for Python 3.12
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
17 mkdir -p ${ROOT_DIR}/docker-build/
a5162d8bd2d4 Added Windows builder for Python 3.12
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
18
a5162d8bd2d4 Added Windows builder for Python 3.12
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
19 ( cd ${ROOT_DIR}/Resources/Builders/ && \
a5162d8bd2d4 Added Windows builder for Python 3.12
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
20 docker build \
a5162d8bd2d4 Added Windows builder for Python 3.12
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
21 -f ./Dockerfile-MinGW-BuildEnvironment \
a5162d8bd2d4 Added Windows builder for Python 3.12
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
22 -t mingw-python-build . )
a5162d8bd2d4 Added Windows builder for Python 3.12
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
23
a5162d8bd2d4 Added Windows builder for Python 3.12
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
24 docker run -t ${DOCKER_FLAGS} --rm \
a5162d8bd2d4 Added Windows builder for Python 3.12
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
25 --user $(id -u):$(id -g) \
a5162d8bd2d4 Added Windows builder for Python 3.12
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
26 -v ${ROOT_DIR}:/source:ro \
a5162d8bd2d4 Added Windows builder for Python 3.12
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
27 -v ${ROOT_DIR}/docker-build:/target:rw \
a5162d8bd2d4 Added Windows builder for Python 3.12
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
28 mingw-python-build \
a5162d8bd2d4 Added Windows builder for Python 3.12
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
29 bash /source/Resources/Builders/MinGW64-Python3.12/docker-internal.sh $1
a5162d8bd2d4 Added Windows builder for Python 3.12
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
30
a5162d8bd2d4 Added Windows builder for Python 3.12
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
31 ls -lR ${ROOT_DIR}/docker-build/