Mercurial > hg > orthanc-python
annotate Resources/Builders/MinGW64-Python3.9/docker-compile.sh @ 118:7f8f26ef5006
fix memory leaks
author | Alain Mazy <am@osimis.io> |
---|---|
date | Mon, 28 Aug 2023 16:44:41 +0200 |
parents | 6ad5da29f260 |
children | 3678a028f1f6 |
rev | line source |
---|---|
111
6ad5da29f260
added Windows builders for Python 3.9, 3.10 and 3.11
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1 #!/bin/bash |
6ad5da29f260
added Windows builders for Python 3.9, 3.10 and 3.11
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
2 |
6ad5da29f260
added Windows builders for Python 3.9, 3.10 and 3.11
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
3 set -ex |
6ad5da29f260
added Windows builders for Python 3.9, 3.10 and 3.11
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
4 |
6ad5da29f260
added Windows builders for Python 3.9, 3.10 and 3.11
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
5 if [ "$1" != "Debug" -a "$1" != "Release" ]; then |
6ad5da29f260
added Windows builders for Python 3.9, 3.10 and 3.11
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
6 echo "Please provide build type: Debug or Release" |
6ad5da29f260
added Windows builders for Python 3.9, 3.10 and 3.11
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
7 exit -1 |
6ad5da29f260
added Windows builders for Python 3.9, 3.10 and 3.11
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
8 fi |
6ad5da29f260
added Windows builders for Python 3.9, 3.10 and 3.11
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
9 |
6ad5da29f260
added Windows builders for Python 3.9, 3.10 and 3.11
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
10 if [ -t 1 ]; then |
6ad5da29f260
added Windows builders for Python 3.9, 3.10 and 3.11
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
11 # TTY is available => use interactive mode |
6ad5da29f260
added Windows builders for Python 3.9, 3.10 and 3.11
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
12 DOCKER_FLAGS='-i' |
6ad5da29f260
added Windows builders for Python 3.9, 3.10 and 3.11
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
13 fi |
6ad5da29f260
added Windows builders for Python 3.9, 3.10 and 3.11
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
14 |
6ad5da29f260
added Windows builders for Python 3.9, 3.10 and 3.11
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
15 ROOT_DIR=`dirname $(readlink -f $0)`/../../.. |
6ad5da29f260
added Windows builders for Python 3.9, 3.10 and 3.11
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
16 |
6ad5da29f260
added Windows builders for Python 3.9, 3.10 and 3.11
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
17 mkdir -p ${ROOT_DIR}/docker-build/ |
6ad5da29f260
added Windows builders for Python 3.9, 3.10 and 3.11
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
18 |
6ad5da29f260
added Windows builders for Python 3.9, 3.10 and 3.11
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
19 ( cd ${ROOT_DIR}/Resources/Builders/ && \ |
6ad5da29f260
added Windows builders for Python 3.9, 3.10 and 3.11
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
20 docker build \ |
6ad5da29f260
added Windows builders for Python 3.9, 3.10 and 3.11
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
21 -f ./Dockerfile-MinGW-BuildEnvironment \ |
6ad5da29f260
added Windows builders for Python 3.9, 3.10 and 3.11
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
22 -t mingw-python-build . ) |
6ad5da29f260
added Windows builders for Python 3.9, 3.10 and 3.11
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
23 |
6ad5da29f260
added Windows builders for Python 3.9, 3.10 and 3.11
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
24 docker run -t ${DOCKER_FLAGS} --rm \ |
6ad5da29f260
added Windows builders for Python 3.9, 3.10 and 3.11
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
25 --user $(id -u):$(id -g) \ |
6ad5da29f260
added Windows builders for Python 3.9, 3.10 and 3.11
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
26 -v ${ROOT_DIR}:/source:ro \ |
6ad5da29f260
added Windows builders for Python 3.9, 3.10 and 3.11
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
27 -v ${ROOT_DIR}/docker-build:/target:rw \ |
6ad5da29f260
added Windows builders for Python 3.9, 3.10 and 3.11
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
28 mingw-python-build \ |
6ad5da29f260
added Windows builders for Python 3.9, 3.10 and 3.11
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
29 bash /source/Resources/Builders/MinGW64-Python3.9/docker-internal.sh $1 |
6ad5da29f260
added Windows builders for Python 3.9, 3.10 and 3.11
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
30 |
6ad5da29f260
added Windows builders for Python 3.9, 3.10 and 3.11
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
31 ls -lR ${ROOT_DIR}/docker-build/ |