update template to fix import path + reworked embed include for python (import site need pyconfig.h only)

This commit is contained in:
Mathieu Virbel 2012-03-11 17:22:45 +01:00
parent 6c6ad6bf7c
commit e6ae3dc0ed
4 changed files with 14 additions and 2 deletions

6
.gitignore vendored
View file

@ -4,8 +4,10 @@ Python-*
freetype-*
SDL_*
build/*
SDL/Xcode-iPhoneOS/SDL/build/
src/SDL/Xcode-iPhoneOS/SDL/build/
tmp/*
kivy/*
libtremor/*
libogg/*
app-*
.cache

View file

@ -9,6 +9,10 @@ fi
echo "Starting reducing python 2.7"
try rm -rf $BUILDROOT/python/embed/include/python2.7
try mkdir -p $BUILDROOT/python/embed/include/python2.7
try cp $BUILDROOT/python/include/python2.7/pyconfig.h $BUILDROOT/python/embed/include/python2.7/pyconfig.h
try cd $BUILDROOT/python/lib/python2.7
find . -iname '*.pyc' | xargs rm
find . -iname '*.py' | xargs rm

View file

@ -22,6 +22,8 @@ int main(int argc, char *argv[]) {
putenv("PYTHONOPTIMIZE=2");
putenv("PYTHONDONTWRITEBYTECODE=1");
putenv("PYTHONNOUSERSITE=1");
putenv("PYTHONPATH=.");
//putenv("PYTHONVERBOSE=1");
// Kivy environment to prefer some implementation on ios platform
putenv("KIVY_BUILD=ios");

View file

@ -27,6 +27,7 @@
59994DB0148E558600863906 /* libSDL_ttf.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 59994DAB148E558600863906 /* libSDL_ttf.a */; };
59994DB1148E558600863906 /* libSDL.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 59994DAC148E558600863906 /* libSDL.a */; };
59994DB3148E564400863906 /* lib in Resources */ = {isa = PBXBuildFile; fileRef = 59994DB2148E564400863906 /* lib */; };
596C7514150CFC75003F57D9 /* include in Resources */ = {isa = PBXBuildFile; fileRef = 596C7513150CFC75003F57D9 /* include */; };
59994E3B148E85C800863906 /* YourApp in Resources */ = {isa = PBXBuildFile; fileRef = 59994E3A148E85C800863906 /* YourApp */; };
/* End PBXBuildFile section */
@ -53,6 +54,7 @@
59994DAC148E558600863906 /* libSDL.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libSDL.a; path = ../build/lib/libSDL.a; sourceTree = "<group>"; };
59994DB2148E564400863906 /* lib */ = {isa = PBXFileReference; lastKnownFileType = folder; name = lib; path = ../build/python/lib; sourceTree = SOURCE_ROOT; };
59994E3A148E85C800863906 /* YourApp */ = {isa = PBXFileReference; lastKnownFileType = folder; path = YourApp; sourceTree = "<group>"; };
596C7513150CFC75003F57D9 /* include */ = {isa = PBXFileReference; lastKnownFileType = folder; name = include; path = ../build/python/embed/include; sourceTree = "<group>"; };
8D1107310486CEB800E47090 /* ##APPID##-Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = "##APPID##-Info.plist"; plistStructureDefinitionIdentifier = "com.apple.xcode.plist.structure-definition.iphone.info-plist"; sourceTree = "<group>"; };
/* End PBXFileReference section */
@ -114,6 +116,7 @@
29B97315FDCFA39411CA2CEA /* Other Sources */ = {
isa = PBXGroup;
children = (
596C7513150CFC75003F57D9 /* include */,
29B97316FDCFA39411CA2CEA /* main.m */,
);
name = "Other Sources";
@ -209,6 +212,7 @@
01532DAA137C099F0076F6BF /* icon.png in Resources */,
59994DB3148E564400863906 /* lib in Resources */,
59994E3B148E85C800863906 /* YourApp in Resources */,
596C7514150CFC75003F57D9 /* include in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};