Patchwork [2/2] python-native: remove unused and duplicated sitecustomize.py

login
register
mail settings
Submitter Hongxu Jia
Date July 19, 2013, 9:13 a.m.
Message ID <5cbd5a93188e5fe4453ba380c7f68d60eed379ca.1374224424.git.hongxu.jia@windriver.com>
Download mbox | patch
Permalink /patch/54047/
State Accepted
Commit 7d949e5406a7c2e0bb0490e0d33cc220c68b675b
Headers show

Comments

Hongxu Jia - July 19, 2013, 9:13 a.m.
python-native doesn't use sitecustomize.py and there is another
duplicated one in meta/recipes-devtools/python/python.

Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
---
 .../python/python-native/sitecustomize.py          | 45 ----------------------
 1 file changed, 45 deletions(-)
 delete mode 100644 meta/recipes-devtools/python/python-native/sitecustomize.py

Patch

diff --git a/meta/recipes-devtools/python/python-native/sitecustomize.py b/meta/recipes-devtools/python/python-native/sitecustomize.py
deleted file mode 100644
index 2739018..0000000
--- a/meta/recipes-devtools/python/python-native/sitecustomize.py
+++ /dev/null
@@ -1,45 +0,0 @@ 
-# OpenEmbedded sitecustomize.py (C) 2002-2008 Michael 'Mickey' Lauer <mlauer@vanille-media.de>
-# GPLv2 or later
-# Version: 20081123
-# Features:
-# * set proper default encoding
-# * enable readline completion in the interactive interpreter
-# * load command line history on startup
-# * save command line history on exit 
-
-import os
-
-def __exithandler():
-    try:
-        readline.write_history_file( "%s/.python-history" % os.getenv( "HOME", "/tmp" ) )
-    except IOError:
-        pass
-
-def __registerExitHandler():
-    import atexit
-    atexit.register( __exithandler )
-
-def __enableReadlineSupport():
-    readline.set_history_length( 1000 )
-    readline.parse_and_bind( "tab: complete" )
-    try:
-        readline.read_history_file( "%s/.python-history" % os.getenv( "HOME", "/tmp" ) )
-    except IOError:
-        pass
-
-def __enableDefaultEncoding():
-    import sys
-    try:
-        sys.setdefaultencoding( "utf8" )
-    except LookupError:
-        pass
-
-import sys
-try:
-    import rlcompleter, readline
-except ImportError:
-    pass
-else:
-    __enableDefaultEncoding()
-    __registerExitHandler()
-    __enableReadlineSupport()