mirror of
https://git.yoctoproject.org/git/poky
synced 2026-01-01 13:58:04 +00:00
Removed these patch:
python-native-2.6.5/00-fix-bindir-libdir-for-cross.patch
python/00-fix-bindir-libdir-for-cross.patch
The upstream code has changed, and it does not need the above 2 patches
(fixes) anymore.
Patches rebased to the newer code:
python/01-use-proper-tools-for-cross-build.patch
python/04-default-is-optimized.patch
python/06-avoid_usr_lib_termcap_path_in_linking.patch
python/99-ignore-optimization-flag.patch
Signed-off-by: Nitin A Kamble <nitin.a.kamble@intel.com>
46 lines
1.1 KiB
Python
46 lines
1.1 KiB
Python
# 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()
|