File: wxglade.patch

package info (click to toggle)
wxglade 1.0.4-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 10,676 kB
  • sloc: python: 29,660; javascript: 8,721; makefile: 158; cpp: 99; perl: 90; lisp: 62; xml: 47; sh: 3
file content (76 lines) | stat: -rw-r--r-- 2,315 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
big simplification of the runtime script, for debian architectures
Index: wxglade/wxglade
===================================================================
--- wxglade.orig/wxglade
+++ wxglade/wxglade
@@ -18,69 +18,5 @@ WXG_VERSION="1.0.1"
 
 CURR_DIR=$(dirname "$0")
 
-# search order for Python interpreter
-INTERPRETER_LIST="${CURR_DIR}/python python3 python2 \
-                  python2.7 python27 \
-                  python"
-
-# Use the binary from PYTHON_BIN, if this environment variable is set
-if [ "$PYTHON_BIN" ]; then
-  INTERPRETER_LIST="$PYTHON_BIN"
-fi
-
-for INTERPRETER in $INTERPRETER_LIST; do
-  ${INTERPRETER} -V >/dev/null 2>&1
-  if [ $? -ne 0 ]; then
-    continue
-  fi
-
-  # Python interpreter found
-  PYTHON_BIN=$INTERPRETER
-
-  # determined current python version
-  PY_VERSION=$(${PYTHON_BIN} -c 'import sys; print(sys.version[:3])')
-
-  EGG_DIR="wxGlade-${WXG_VERSION}-py${PY_VERSION}.egg"
-
-  # determined prefix of the Python module directory structure
-  if [ -d "/usr/lib/pymodules/python${PY_VERSION}/wxglade" ]; then
-    WXG_MODULE_PATH="/usr/lib/pymodules/python${PY_VERSION}/wxglade"
-  elif [ -d "/usr/lib/pymodules/python${PY_VERSION}/site-packages/${EGG_DIR}/wxglade" ]; then
-    WXG_MODULE_PATH="/usr/lib/pymodules/python${PY_VERSION}/site-packages/${EGG_DIR}/wxglade"
-  else
-    WXG_MODULE_PATH="/usr/lib/python${PY_VERSION}/wxglade"
-  fi
-
-  # search wxglade.py
-  # dist-packages is only used in Debian and Debian derivates
-  for DIR in \
-     "${CURR_DIR}" \
-     "${WXG_MODULE_PATH}" \
-     "${CURR_DIR}/../lib/python${PY_VERSION}/site-packages/wxglade" \
-     "${CURR_DIR}/../lib/python${PY_VERSION}/site-packages/${EGG_DIR}/wxglade" \
-     "${CURR_DIR}/../lib/python${PY_VERSION}/dist-packages/wxglade" \
-     ; do
-    BINARY="${DIR}/wxglade.py"
-    if [ -e "${BINARY}" ]; then
-      WXG_BINARY="$BINARY"
-      break
-    fi
-  done
-  if [ -n "${WXG_BINARY}" ]; then
-    break
-  fi
-done
-
-if [ ! "$PYTHON_BIN" ]; then
-  echo "ERROR: No interpreter for Python found!"
-  echo "       Please install Python to run wxGlade!"
-  exit 1
-fi
-
-if [ ! "${WXG_BINARY}" ]; then
-  echo "ERROR: wxglade.py not found!"
-  exit 1
-fi
-
 # exec wxGlade
-exec "${PYTHON_BIN}" "${WXG_BINARY}" "$@"
+exec  python3 /usr/share/wxglade/wxglade.py "$@"