File tree Expand file tree Collapse file tree 2 files changed +22
-0
lines changed Expand file tree Collapse file tree 2 files changed +22
-0
lines changed Original file line number Diff line number Diff line change @@ -28,6 +28,27 @@ cat Makefile.extra
28
28
29
29
pushd Python-${PYTHON_VERSION}
30
30
31
+ # Code that runs at ctypes module import time does not work with
32
+ # non-dynamic binaries. Patch Python to work around this.
33
+ # See https://bugs.python.org/issue37060.
34
+ patch -p1 << EOF
35
+ diff --git a/Lib/ctypes/__init__.py b/Lib/ctypes/__init__.py
36
+ --- a/Lib/ctypes/__init__.py
37
+ +++ b/Lib/ctypes/__init__.py
38
+ @@ -441,7 +441,10 @@ if _os.name == "nt":
39
+ elif _sys.platform == "cygwin":
40
+ pythonapi = PyDLL("libpython%d.%d.dll" % _sys.version_info[:2])
41
+ else:
42
+ - pythonapi = PyDLL(None)
43
+ + try:
44
+ + pythonapi = PyDLL(None)
45
+ + except OSError:
46
+ + pythonapi = None
47
+
48
+
49
+ if _os.name == "nt":
50
+ EOF
51
+
31
52
cp Modules/readline.c Modules/readline-libedit.c
32
53
33
54
# Python supports using libedit instead of readline. But Modules/readline.c
Original file line number Diff line number Diff line change @@ -3,6 +3,7 @@ RUN apt-get install \
3
3
file \
4
4
libc6-dev \
5
5
make \
6
+ patch \
6
7
perl \
7
8
tar \
8
9
xz-utils \
You can’t perform that action at this time.
0 commit comments