1 Add an option to disable pydoc
3 It removes 0.5 MB of data from the target plus the pydoc script
6 Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
7 Signed-off-by: Samuel Martin <s.martin49@gmail.com>
10 Makefile.pre.in | 6 +++++-
11 configure.in | 5 +++++
12 setup.py | 10 +++++++---
13 3 files changed, 17 insertions(+), 4 deletions(-)
15 Index: b/Makefile.pre.in
16 ===================================================================
20 multiprocessing multiprocessing/dummy \
23 - curses pydoc_data $(MACHDEPS)
26 TESTSUBDIRS = lib-tk/test lib-tk/test/test_tkinter \
27 lib-tk/test/test_ttk test test/audiodata test/capath test/data \
29 LIBSUBDIRS += $(TESTSUBDIRS)
33 +LIBSUBDIRS += pydoc_data
36 libinstall: build_all $(srcdir)/Lib/$(PLATDIR) $(srcdir)/Modules/xxmodule.c
37 @for i in $(SCRIPTDIR) $(LIBDEST); \
40 ===================================================================
43 @@ -2627,6 +2627,11 @@
44 AC_CHECK_FUNCS(pthread_atfork)
50 + AS_HELP_STRING([--disable-pydoc], [disable pydoc]),
51 + [ PYDOC="${enableval}" ], [ PYDOC=yes ])
53 AC_SUBST(TEST_MODULES)
56 ===================================================================
59 @@ -2222,6 +2222,12 @@
60 # turn off warnings when deprecated modules are imported
62 warnings.filterwarnings("ignore",category=DeprecationWarning)
64 + scripts = ['Tools/scripts/idle', 'Tools/scripts/2to3',
66 + if not '--disable-pydoc' in sysconfig.get_config_var("CONFIG_ARGS"):
67 + scripts += [ 'Tools/scripts/pydoc' ]
69 setup(# PyPI Metadata (PEP 301)
71 version = sys.version.split()[0],
73 ext_modules=[Extension('_struct', ['_struct.c'])],
76 - scripts = ['Tools/scripts/pydoc', 'Tools/scripts/idle',
77 - 'Tools/scripts/2to3',