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

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  1. From 5b4755f8d6bbeb68f2966464038c3e1f337868d3 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 b44ad736144..aceb52e31ce 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. @@ -2273,6 +2274,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. @@ -2490,7 +2495,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 9b77582560d..becec336dc2 100644
  61. --- a/configure.ac
  62. +++ b/configure.ac
  63. @@ -7578,6 +7578,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.39.5