From: Gary Thomas <[EMAIL PROTECTED]>

This patch gives a little finer control over what gets 
installed on the target when Python-2.4 is built/installed.

Signed-off-by: Gary Thomas <[EMAIL PROTECTED]>
---

--- /work/ptxdist-trunk/rules/python24.in       2008-10-29 07:41:01.000000000 
-0600
+++ /tmp/ptx-2008_11_21/ptx/rules/python24.in   2008-11-19 07:44:24.000000000 
-0700
@@ -1,5 +1,6 @@
 ## SECTION=scripting_languages
-config PYTHON24
+
+menuconfig PYTHON24
        tristate
        prompt "Python 2.4"
        select LIBC_DL
@@ -14,3 +15,28 @@ config PYTHON24
          for integration with other languages and tools,
          comes with extensive standard libraries, and
          can be learned in a few days.
+
+if PYTHON24
+
+config PYTHON24_SYMLINK
+       bool
+       prompt "Install symbolic link /usr/bin/python"
+       default y
+
+config PYTHON24_CONFIG
+       bool
+       prompt "Preserve config files - needed to run setup tools"
+       default n
+
+config PYTHON24_LIBTK
+       bool
+       prompt "Include lib-tk packages"
+       default n
+
+config PYTHON24_IDLELIB
+       bool
+       prompt "Include idlelib packages"
+       default n
+
+
+endif
--- /work/ptxdist-trunk/rules/python24.make     2008-08-15 04:49:35.000000000 
-0600
+++ /tmp/ptx-2008_11_21/ptx/rules/python24.make 2008-09-02 07:34:39.000000000 
-0600
@@ -164,14 +164,25 @@ $(STATEDIR)/python24.targetinstall: $(py
        # remove redundant files
        find $(PYTHON24_INST_TMP)/usr/lib/python2.4 -name "*.py"  | xargs rm -f
        find $(PYTHON24_INST_TMP)/usr/lib/python2.4 -name "*.pyo" | xargs rm -f
-       rm -fr $(PYTHON24_INST_TMP)/usr/lib/python2.4/config
        rm -fr $(PYTHON24_INST_TMP)/usr/lib/python2.4/test
+ifndef PTXCONF_PYTHON24_CONFIG
+       rm -fr $(PYTHON24_INST_TMP)/usr/lib/python2.4/config
+endif
+ifndef PTXCONF_PYTHON24_LIBTK
+       rm -fr $(PYTHON24_INST_TMP)/usr/lib/python2.4/lib-tk
+endif
+ifndef PTXCONF_PYTHON24_IDLELIB
+       rm -fr $(PYTHON24_INST_TMP)/usr/lib/python2.4/idlelib
+endif
 
        files=$$(cd $(PYTHON24_INST_TMP) && find -type f | sed "s/^\.//"); \
        for i in $$files; do \
                access=$$(stat -c "%a" $(PYTHON24_INST_TMP)$$i); \
                $(call install_copy, python24, 0, 0, $$access, 
$(PYTHON24_INST_TMP)$$i, $$i); \
        done
+ifdef PTXCONF_PYTHON24_SYMLINK
+       @$(call install_link, python24, python2.4, /usr/bin/python)
+endif
 
        @$(call install_finish, python24)
        @$(call touch, $@)

-- 
------------------------------------------------------------
Gary Thomas                 |  Consulting for the
MLB Associates              |    Embedded world
------------------------------------------------------------

--
ptxdist mailing list
[email protected]

Reply via email to