Skip to content

Commit

Permalink
[droid] bump python to 2.7
Browse files Browse the repository at this point in the history
  • Loading branch information
wsnipex authored and koying committed Mar 15, 2017
1 parent be9ee7c commit 8da6c6a
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
8 changes: 4 additions & 4 deletions tools/android/packaging/Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -99,9 +99,9 @@ sharedobb: shared
@echo "$(XBMCROOT)/main.@[email protected] created"

python: | xbmc/assets
mkdir -p xbmc/assets/python2.6/lib/
cp -rfp $(PREFIX)/lib/python2.6 xbmc/assets/python2.6/lib/
cd xbmc/assets/python2.6/lib/python2.6/; rm -rf test config lib-dynload
mkdir -p xbmc/assets/python2.7/lib/
cp -rfp $(PREFIX)/lib/python2.7 xbmc/assets/python2.7/lib/
cd xbmc/assets/python2.7/lib/python2.7/; rm -rf test config lib-dynload

res:
mkdir -p xbmc/gen/@APP_PACKAGE_DIR@ xbmc/res xbmc/res/raw xbmc/res/values images
Expand All @@ -124,7 +124,7 @@ res:

libs: $(PREFIX)/lib/@APP_NAME_LC@/lib@[email protected]
rm -rf xbmc/lib/$(ABI) xbmc/obj/local/$(ABI)
mkdir -p xbmc/lib/$(ABI) xbmc/assets/python2.6/lib/ xbmc/obj/local/$(ABI)
mkdir -p xbmc/lib/$(ABI) xbmc/assets/python2.7/lib/ xbmc/obj/local/$(ABI)
cp -fp $(SRCLIBS) xbmc/obj/local/$(ABI)/
cp -fp $(PREFIX)/lib/@APP_NAME_LC@/lib@[email protected] xbmc/obj/local/$(ABI)/
find $(PREFIX)/lib/@APP_NAME_LC@/addons -name "*.so" -exec cp -fp {} xbmc/obj/local/$(ABI)/ \;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -332,7 +332,7 @@ public class Splash extends Activity {

if (! (sName.startsWith("assets/") || (mInstallLibs && sName.startsWith("lib/"))) )
continue;
if (sName.startsWith("assets/python2.6"))
if (sName.startsWith("assets/python2.7"))
continue;

String sFullPath = null;
Expand Down
2 changes: 1 addition & 1 deletion xbmc/android/activity/XBMCApp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1389,7 +1389,7 @@ void CXBMCApp::SetupEnv()
setenv("HOME", getenv("KODI_TEMP"), 0);

std::string apkPath = getenv("XBMC_ANDROID_APK");
apkPath += "/assets/python2.6";
apkPath += "/assets/python2.7";
setenv("PYTHONHOME", apkPath.c_str(), 1);
setenv("PYTHONPATH", "", 1);
setenv("PYTHONOPTIMIZE","", 1);
Expand Down
4 changes: 2 additions & 2 deletions xbmc/cores/DllLoader/exports/emu_msvcrt.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ extern "C" void __stdcall init_emu_environ()
if (!CUtil::GetFrameworksPath(true).empty())
{
// using external python, it's build looking for xxx/lib/python2.6
// so point it to frameworks which is where python2.6 is located
// so point it to frameworks which is where python2.7 is located
dll_putenv(std::string("PYTHONPATH=" +
CSpecialProtocol::TranslatePath("special://frameworks")).c_str());
dll_putenv(std::string("PYTHONHOME=" +
Expand All @@ -157,7 +157,7 @@ extern "C" void __stdcall init_emu_environ()

#if defined(TARGET_ANDROID)
std::string apkPath = getenv("XBMC_ANDROID_APK");
apkPath += "/assets/python2.6";
apkPath += "/assets/python2.7";
dll_putenv(std::string("PYTHONHOME=" + apkPath).c_str());
dll_putenv("PYTHONOPTIMIZE=");
dll_putenv("PYTHONNOUSERSITE=1");
Expand Down

0 comments on commit 8da6c6a

Please sign in to comment.