]> rtime.felk.cvut.cz Git - coffee/buildroot.git/blob - package/python3/0018-Add-an-option-to-disable-the-curses-module.patch
Revert "python3: bump to 2.6.4"
[coffee/buildroot.git] / package / python3 / 0018-Add-an-option-to-disable-the-curses-module.patch
1 From 404aad42698c6d5cbd78421720f9a2bc0e8ec9fe Mon Sep 17 00:00:00 2001
2 From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
3 Date: Wed, 22 Feb 2017 17:31:51 -0800
4 Subject: [PATCH] Add an option to disable the curses module
5
6 Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
7 Signed-off-by: Samuel Martin <s.martin49@gmail.com>
8 [ Andrey Smirnov: ported to Python 3.6 ]
9 Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com>
10 ---
11  Makefile.pre.in | 7 +++++--
12  configure.ac    | 9 +++++++++
13  2 files changed, 14 insertions(+), 2 deletions(-)
14
15 diff --git a/Makefile.pre.in b/Makefile.pre.in
16 index dc1e917cc3..6a6bc082cd 100644
17 --- a/Makefile.pre.in
18 +++ b/Makefile.pre.in
19 @@ -1213,8 +1213,7 @@ LIBSUBDIRS=       site-packages \
20                 turtledemo \
21                 multiprocessing multiprocessing/dummy \
22                 unittest \
23 -               venv venv/scripts venv/scripts/common venv/scripts/posix \
24 -               curses
25 +               venv venv/scripts venv/scripts/common venv/scripts/posix
26  
27  TESTSUBDIRS=   test \
28                 test/audiodata \
29 @@ -1268,6 +1267,10 @@ TESTSUBDIRS += tkinter/test tkinter/test/test_tkinter \
30         tkinter/test/test_ttk
31  endif
32  
33 +ifeq (@CURSES@,yes)
34 +LIBSUBDIRS += curses
35 +endif
36 +
37  ifeq (@LIB2TO3@,yes)
38  LIBSUBDIRS += lib2to3 lib2to3/fixes lib2to3/pgen2
39  TESTSUBDIRS += lib2to3/tests                   \
40 diff --git a/configure.ac b/configure.ac
41 index 6a56a5b0c1..5896b39ff9 100644
42 --- a/configure.ac
43 +++ b/configure.ac
44 @@ -3130,6 +3130,15 @@ if test "$TK" = "no"; then
45     DISABLED_EXTENSIONS="${DISABLED_EXTENSIONS} _tkinter"
46  fi
47  
48 +AC_SUBST(CURSES)
49 +AC_ARG_ENABLE(curses,
50 +       AS_HELP_STRING([--disable-curses], [disable curses]),
51 +       [ CURSES="${enableval}" ], [ CURSES=yes ])
52 +
53 +if test "$CURSES" = "no"; then
54 +   DISABLED_EXTENSIONS="${DISABLED_EXTENSIONS} _curses _curses_panel"
55 +fi
56 +
57  AC_SUBST(PYDOC)
58  
59  AC_ARG_ENABLE(pydoc,
60 -- 
61 2.13.5
62