Debian Codegraph @

python-config-wrapper

raw symbols SCIP
1 #!/bin/shscip-shell filesystem . . `/bin/sh`.
2 # python3-config wrapper script to support Python 3.8
3 # Works around https://bugs.python.org/issue36721
4
5 set -e
6
7 usagescip-shell shell shell-project 0.0.0 usage().() {
8 echoscip-shell system . . echo. "Usage: $0 [python3-config] (--libs|--includes)"
9 exit 1
10 }
11
12 if [scip-shell system . . `[`. $# -ne 2 ]; then
13 usagescip-shell shell shell-project 0.0.0 usage().
14 fi
15
16 PYTHON_CONFIG="$1"
17 shift
18
19 WHICH_FLAG="$1"
20 shift
21
22 case "$WHICH_FLAG" in
23 --libs)
24 # Python 3.8 needs --embed, but previous versions do not have it:
25 # https://github.com/python/cpython/pull/13500
26 if "$PYTHON_CONFIG" --ldflags --libs --embed >/dev/nullscip-shell filesystem . . `/dev/null`. 2>&1; then
27 "$PYTHON_CONFIG" --ldflags --libs --embed
28 else
29 "$PYTHON_CONFIG" --ldflags --libs
30 fi
31 ;;
32 --includes)
33 "$PYTHON_CONFIG" --includes
34 ;;
35 *)
36 usagescip-shell shell shell-project 0.0.0 usage().
37 ;;
38 esac