package/dhcp/S80dhcp-server: allow empty INTERFACES
[buildroot-gz.git] / package / python3 / 111-optional-decimal.patch
blobbe17c94171c7fe4fba5615839e012d386e77768d
1 Add an option to disable decimal
3 This patch replaces the existing --with-system-libmpdec option with a
4 --with-libmpdec={system,builtin,none} option, which allows to tell
5 Python whether we want to use the system libmpdec (already installed),
6 the libmpdec builtin the Python sources, or no libmpdec at all.
8 Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
9 ---
11 Index: b/configure.ac
12 ===================================================================
13 --- a/configure.ac
14 +++ b/configure.ac
15 @@ -2405,13 +2405,20 @@
16 AC_MSG_RESULT($with_system_ffi)
18 # Check for use of the system libmpdec library
19 -AC_MSG_CHECKING(for --with-system-libmpdec)
20 -AC_ARG_WITH(system_libmpdec,
21 - AS_HELP_STRING([--with-system-libmpdec], [build _decimal module using an installed libmpdec library]),
22 +AC_MSG_CHECKING(for --with-libmpdec)
23 +AC_ARG_WITH(libmpdec,
24 + AS_HELP_STRING([--with-libmpdec], [select which libmpdec version to use: system, builtin, none]),
25 [],
26 - [with_system_libmpdec="no"])
27 + [with_libmpdec="builtin"])
29 -AC_MSG_RESULT($with_system_libmpdec)
30 +AC_MSG_RESULT($with_libmpdec)
31 +if test "$with_libmpdec" != "none"; then
32 + MPDEC=yes
33 +else
34 + DISABLED_EXTENSIONS="${DISABLED_EXTENSIONS} _decimal"
35 + MPDEC=no
36 +fi
37 +AC_SUBST(MPDEC)
39 # Check for support for loadable sqlite extensions
40 AC_MSG_CHECKING(for --enable-loadable-sqlite-extensions)
41 Index: b/setup.py
42 ===================================================================
43 --- a/setup.py
44 +++ b/setup.py
45 @@ -1968,7 +1968,7 @@
46 def _decimal_ext(self):
47 extra_compile_args = []
48 undef_macros = []
49 - if '--with-system-libmpdec' in sysconfig.get_config_var("CONFIG_ARGS"):
50 + if '--with-libmpdec=system' in sysconfig.get_config_var("CONFIG_ARGS"):
51 include_dirs = []
52 libraries = [':libmpdec.so.2']
53 sources = ['_decimal/_decimal.c']