summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/python/python3/0020-configure.ac-setup.py-do-not-add-a-curses-include-pa.patch
blob: e04a91605c26e9ce2f986b7da35c6136d7ba966b (plain)
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
From 863c09f640a5dfd33ff22915b0d5fee7bc5df70a Mon Sep 17 00:00:00 2001
From: Alexander Kanavin <alex.kanavin@gmail.com>
Date: Sun, 16 Feb 2020 17:50:25 +0100
Subject: [PATCH] configure.ac, setup.py: do not add a curses include path from
 the host

This leads to host contamination, and particularly can cause
curses modules to fail at runtime if the host curses is configured
differently to native curses (observed on current OpenSuse Tumbleweed
as dnf failures).

Upstream-Status: Inappropriate [oe-core specific]
Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
---
 configure.ac | 6 ------
 setup.py     | 2 --
 2 files changed, 8 deletions(-)

diff --git a/configure.ac b/configure.ac
index 915f475..c911011 100644
--- a/configure.ac
+++ b/configure.ac
@@ -4828,12 +4828,6 @@ then
   [Define if you have struct stat.st_mtimensec])
 fi
 
-# first curses header check
-ac_save_cppflags="$CPPFLAGS"
-if test "$cross_compiling" = no; then
-  CPPFLAGS="$CPPFLAGS -I/usr/include/ncursesw"
-fi
-
 AC_CHECK_HEADERS(curses.h ncurses.h)
 
 # On Solaris, term.h requires curses.h
diff --git a/setup.py b/setup.py
index b0f1541..7208cd0 100644
--- a/setup.py
+++ b/setup.py
@@ -973,8 +973,6 @@ class PyBuildExt(build_ext):
         panel_library = 'panel'
         if curses_library == 'ncursesw':
             curses_defines.append(('HAVE_NCURSESW', '1'))
-            if not CROSS_COMPILING:
-                curses_includes.append('/usr/include/ncursesw')
             # Bug 1464056: If _curses.so links with ncursesw,
             # _curses_panel.so must link with panelw.
             panel_library = 'panelw'