0003-Add-an-option-to-disable-IDLE.patch 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  1. From 8da950588cd2597a6588a46374ad917d642c583d Mon Sep 17 00:00:00 2001
  2. From: Maxime Ripard <maxime.ripard@free-electrons.com>
  3. Date: Wed, 22 Feb 2017 17:45:14 -0800
  4. Subject: [PATCH] Add an option to disable IDLE
  5. IDLE is an IDE embedded into python, written using Tk, so it doesn't make
  6. much sense to have it into our build.
  7. Upstream: N/A
  8. Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
  9. [ Andrey Smirnov: ported to Python 3.6 ]
  10. Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com>
  11. [ Adam Duskett: ported to Python 3.10.0 ]
  12. Signed-off-by: Adam Duskett <aduskett@gmail.com>
  13. [ Adam Duskett: ported to Python 3.12.1 ]
  14. Signed-off-by: Adam Duskett <adam.duskett@amarulasolutions.com>
  15. [ Vincent Fazio: ported to Python 3.13.2 ]
  16. Signed-off-by: Vincent Fazio <vfazio@gmail.com>
  17. ---
  18. Makefile.pre.in | 9 ++++++++-
  19. configure.ac | 6 ++++++
  20. 2 files changed, 14 insertions(+), 1 deletion(-)
  21. diff --git a/Makefile.pre.in b/Makefile.pre.in
  22. index 4360b60165a..e88f89b91b1 100644
  23. --- a/Makefile.pre.in
  24. +++ b/Makefile.pre.in
  25. @@ -2273,7 +2273,9 @@ bininstall: commoninstall altbininstall
  26. -rm -f $(DESTDIR)$(LIBPC)/python3-embed.pc
  27. (cd $(DESTDIR)$(LIBPC); $(LN) -s python-$(VERSION)-embed.pc python3-embed.pc)
  28. -rm -f $(DESTDIR)$(BINDIR)/idle3
  29. +ifeq (@IDLE@,yes)
  30. (cd $(DESTDIR)$(BINDIR); $(LN) -s idle$(VERSION) idle3)
  31. +endif
  32. -rm -f $(DESTDIR)$(BINDIR)/pydoc3
  33. ifeq (@PYDOC@,yes)
  34. (cd $(DESTDIR)$(BINDIR); $(LN) -s pydoc$(VERSION) pydoc3)
  35. @@ -2321,7 +2323,6 @@ LIBSUBDIRS= asyncio \
  36. ensurepip ensurepip/_bundled \
  37. html \
  38. http \
  39. - idlelib idlelib/Icons \
  40. importlib importlib/resources importlib/metadata \
  41. json \
  42. logging \
  43. @@ -2488,6 +2489,10 @@ ifeq (@PYDOC@,yes)
  44. LIBSUBDIRS += pydoc_data
  45. endif
  46. +ifeq (@IDLE@,yes)
  47. +LIBSUBDIRS += idlelib idlelib/Icons
  48. +endif
  49. +
  50. TEST_MODULES=@TEST_MODULES@
  51. .PHONY: libinstall
  52. @@ -2714,7 +2719,9 @@ libainstall: all scripts
  53. $(INSTALL_SCRIPT) $(srcdir)/install-sh $(DESTDIR)$(LIBPL)/install-sh
  54. $(INSTALL_SCRIPT) python-config.py $(DESTDIR)$(LIBPL)/python-config.py
  55. $(INSTALL_SCRIPT) python-config $(DESTDIR)$(BINDIR)/python$(LDVERSION)-config
  56. +ifeq (@IDLE@,yes)
  57. $(INSTALL_SCRIPT) $(SCRIPT_IDLE) $(DESTDIR)$(BINDIR)/idle$(VERSION)
  58. +endif
  59. ifeq (@PYDOC@,yes)
  60. $(INSTALL_SCRIPT) $(SCRIPT_PYDOC) $(DESTDIR)$(BINDIR)/pydoc$(VERSION)
  61. endif
  62. diff --git a/configure.ac b/configure.ac
  63. index 583adc7e16a..744c5bebd39 100644
  64. --- a/configure.ac
  65. +++ b/configure.ac
  66. @@ -7810,6 +7810,12 @@ PY_STDLIB_MOD([xxlimited_35], [test "$TEST_MODULES" = yes], [test "$ac_cv_func_d
  67. # substitute multiline block, must come after last PY_STDLIB_MOD()
  68. AC_SUBST([MODULE_BLOCK])
  69. +AC_SUBST(IDLE)
  70. +
  71. +AC_ARG_ENABLE(idle3,
  72. + AS_HELP_STRING([--disable-idle3], [disable idle3 IDE]),
  73. + [ IDLE="${enableval}" ], [ IDLE=yes ])
  74. +
  75. # generate output files
  76. AC_CONFIG_FILES(m4_normalize([
  77. Makefile.pre
  78. --
  79. 2.34.1