0005-Add-an-option-to-disable-IDLE.patch 2.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  1. From ffa7fbceb54918eb518474c8f821fda0a58cf181 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. Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
  8. [ Andrey Smirnov: ported to Python 3.6 ]
  9. Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com>
  10. [ Adam Duskett: ported to Python 3.10.0 ]
  11. Signed-off-by: Adam Duskett <aduskett@gmail.com>
  12. [ Adam Duskett: ported to Python 3.12.1 ]
  13. Signed-off-by: Adam Duskett <adam.duskett@amarulasolutions.com>
  14. ---
  15. Makefile.pre.in | 9 ++++++++-
  16. configure.ac | 6 ++++++
  17. 2 files changed, 14 insertions(+), 1 deletion(-)
  18. diff --git a/Makefile.pre.in b/Makefile.pre.in
  19. index 3f314d1354..5fad7f82fb 100644
  20. --- a/Makefile.pre.in
  21. +++ b/Makefile.pre.in
  22. @@ -2048,7 +2048,9 @@ bininstall: commoninstall altbininstall
  23. -rm -f $(DESTDIR)$(LIBPC)/python3-embed.pc
  24. (cd $(DESTDIR)$(LIBPC); $(LN) -s python-$(VERSION)-embed.pc python3-embed.pc)
  25. -rm -f $(DESTDIR)$(BINDIR)/idle3
  26. +ifeq (@IDLE@,yes)
  27. (cd $(DESTDIR)$(BINDIR); $(LN) -s idle$(VERSION) idle3)
  28. +endif
  29. -rm -f $(DESTDIR)$(BINDIR)/pydoc3
  30. ifeq (@PYDOC@,yes)
  31. (cd $(DESTDIR)$(BINDIR); $(LN) -s pydoc$(VERSION) pydoc3)
  32. @@ -2100,7 +2102,6 @@ LIBSUBDIRS= asyncio \
  33. ensurepip ensurepip/_bundled \
  34. html \
  35. http \
  36. - idlelib idlelib/Icons \
  37. importlib importlib/resources importlib/metadata \
  38. json \
  39. logging \
  40. @@ -2267,6 +2268,10 @@ TESTSUBDIRS += test/test_lib2to3 \
  41. test/test_lib2to3/data/fixers/myfixes
  42. endif
  43. +ifeq (@IDLE@,yes)
  44. +LIBSUBDIRS += idlelib idlelib/Icons
  45. +endif
  46. +
  47. TEST_MODULES=@TEST_MODULES@
  48. .PHONY: libinstall
  49. @@ -2484,7 +2489,9 @@ libainstall: all scripts
  50. ifeq (@LIB2TO3@,yes)
  51. $(INSTALL_SCRIPT) $(SCRIPT_2TO3) $(DESTDIR)$(BINDIR)/2to3-$(VERSION)
  52. endif
  53. +ifeq (@IDLE@,yes)
  54. $(INSTALL_SCRIPT) $(SCRIPT_IDLE) $(DESTDIR)$(BINDIR)/idle$(VERSION)
  55. +endif
  56. ifeq (@PYDOC@,yes)
  57. $(INSTALL_SCRIPT) $(SCRIPT_PYDOC) $(DESTDIR)$(BINDIR)/pydoc$(VERSION)
  58. endif
  59. diff --git a/configure.ac b/configure.ac
  60. index f0354c580d..43086962e9 100644
  61. --- a/configure.ac
  62. +++ b/configure.ac
  63. @@ -7567,6 +7567,12 @@ AC_ARG_ENABLE(lib2to3,
  64. AS_HELP_STRING([--disable-lib2to3], [disable lib2to3]),
  65. [ LIB2TO3="${enableval}" ], [ LIB2TO3=yes ])
  66. +AC_SUBST(IDLE)
  67. +
  68. +AC_ARG_ENABLE(idle3,
  69. + AS_HELP_STRING([--disable-idle3], [disable idle3 IDE]),
  70. + [ IDLE="${enableval}" ], [ IDLE=yes ])
  71. +
  72. # generate output files
  73. AC_CONFIG_FILES(m4_normalize([
  74. Makefile.pre
  75. --
  76. 2.34.1