Skip to content

Commit

Permalink
update template to fix import path + reworked embed include for pytho…
Browse files Browse the repository at this point in the history
…n (import site need pyconfig.h only)
  • Loading branch information
tito committed Mar 11, 2012
1 parent 6c6ad6b commit e6ae3dc
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 2 deletions.
6 changes: 4 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -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
4 changes: 4 additions & 0 deletions tools/reduce-python.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 2 additions & 0 deletions tools/templates/main.m
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand Down
4 changes: 4 additions & 0 deletions tools/templates/template.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -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 */

Expand All @@ -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 */

Expand Down Expand Up @@ -114,6 +116,7 @@
29B97315FDCFA39411CA2CEA /* Other Sources */ = {
isa = PBXGroup;
children = (
596C7513150CFC75003F57D9 /* include */,
29B97316FDCFA39411CA2CEA /* main.m */,
);
name = "Other Sources";
Expand Down Expand Up @@ -209,6 +212,7 @@
01532DAA137C099F0076F6BF /* icon.png in Resources */,
59994DB3148E564400863906 /* lib in Resources */,
59994E3B148E85C800863906 /* YourApp in Resources */,
596C7514150CFC75003F57D9 /* include in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
Expand Down

0 comments on commit e6ae3dc

Please sign in to comment.