-
Notifications
You must be signed in to change notification settings - Fork 2k
MySQL/Connector update - 1.0.8 #80
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
d028108
Adding kivy_stable for builds of kivy using stable code.
411ad2b
started working on the cythonizer
thopiekar f14ba3f
added ECLIPSE + PYDEV to .gitignore
thopiekar 195ba00
Merge remote-tracking branch 'upstream/master'
thopiekar b9ad5b9
Corrected MySQL/Connector to upstream link + updated version
thopiekar a4af77f
updated MD5 in MySQL/Connector + updated kivy_stable
thopiekar 3c36f1b
Added more information to README.rst
thopiekar File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -8,3 +8,7 @@ src/default.properties | |
| dist | ||
| *.pyc | ||
| testsuite | ||
|
|
||
| #ECLIPSE + PYDEV | ||
| .project | ||
| .pydevproject | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,54 @@ | ||
| import os, sys | ||
|
|
||
| class cythonizer(): | ||
| def __init__(self, | ||
| android_ndk = os.environ["ANDROIDNDK"], | ||
| android_api = os.environ["ANDROIDAPI"], | ||
| python_for_android = os.path.join(os.path.split(os.path.realpath(__file__))[0]) | ||
| ): | ||
| self.android_ndk = android_ndk | ||
| self.android_api = android_api | ||
| self.py_for_a = python_for_android | ||
|
|
||
| for path in [self.android_ndk, self.py_for_a]: | ||
| if not os.path.isdir(path): | ||
| print "!! Haven't found path:", repr(path) | ||
| sys.exit() | ||
|
|
||
| self.gcc = "%s/toolchains/arm-linux-androideabi-4.4.3/prebuilt/linux-x86/bin/arm-linux-androideabi-gcc" %(self.android_ndk) | ||
| self.sysroot = "%s/platforms/android-%s/arch-arm" %(self.android_ndk, self.android_api) | ||
| self.a_incl = "-I%s/platforms/android-%s/arch-arm/usr/include" %(self.android_ndk, self.android_api) | ||
| self.p_incl = "-I%s/build/python-install/include/python2.7" %(self.py_for_a) | ||
| self.libs = "-L%s/build/libs" %(self.py_for_a) | ||
| self.p_libs = "-L%s/build/python-install/lib" %(self.py_for_a) | ||
| self.a_libs = "-L%s/platforms/android-%s/arch-arm/usr/lib" %(self.android_ndk, self.android_api) | ||
|
|
||
| def make_o(self, c_file, o_file): | ||
| command = """%s -mandroid -fomit-frame-pointer -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fPIC --sysroot %s %s %s -c database.c -o database.o""" %(self.gcc, | ||
| self.sysroot, | ||
| self.a_incl, | ||
| self.p_incl) | ||
| print command | ||
|
|
||
| def make_so(self, o_file, so_file= None): | ||
| if so_file == None: | ||
| so_file = os.path.splitext(os.path.realpath(o_file))[0]+".so" | ||
| command = """%s -shared -O3 -mandroid -fomit-frame-pointer --sysroot %s -lm -lGLESv2 -lpython2.7 %s %s %s %s -o %s """ %(self.gcc, | ||
| self.sysroot, | ||
| self.libs, | ||
| self.p_libs, | ||
| self.a_libs, | ||
| o_file, | ||
| so_file) | ||
| print command | ||
| def make(self, py_pyx): | ||
| for root, dirs, files in os.walk(directory): | ||
| for file in files: | ||
| if file.endswith('.py') or file.endswith('.pyx'): | ||
| print file | ||
| self.make_o(py_pyx) | ||
| self.make_so(py_pyx) | ||
|
|
||
| if __name__ == "__main__": | ||
| c = cythonizer() | ||
| c.make("test.py") | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Started to make a simple script to make a .so of a .py or .pyx. |
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,43 @@ | ||
| #!/bin/bash | ||
|
|
||
| VERSION_kivy_stable=1.5.1 | ||
| URL_kivy_stable=https://github.com/kivy/kivy/archive/$VERSION_kivy_stable.zip | ||
| DEPS_kivy_stable=(pygame pyjnius android) | ||
| MD5_kivy_stable= | ||
| BUILD_kivy_stable=$BUILD_PATH/kivy_stable/$VERSION_kivy_stable | ||
| RECIPE_kivy_stable=$RECIPES_PATH/kivy_stable | ||
|
|
||
| function prebuild_kivy_stable() { | ||
| true | ||
| } | ||
|
|
||
| function build_kivy_stable() { | ||
| if [ -d "$BUILD_PATH/python-install/lib/python2.7/site-packages/kivy" ]; then | ||
| #return | ||
| true | ||
| fi | ||
|
|
||
| cd $BUILD_kivy_stable | ||
|
|
||
| push_arm | ||
|
|
||
| export LDFLAGS="$LDFLAGS -L$LIBS_PATH" | ||
| export LDSHARED="$LIBLINK" | ||
|
|
||
| # fake try to be able to cythonize generated files | ||
| $BUILD_PATH/python-install/bin/python.host setup.py build_ext | ||
| try find . -iname '*.pyx' -exec cython {} \; | ||
| try $BUILD_PATH/python-install/bin/python.host setup.py build_ext -v | ||
| try find build/lib.* -name "*.o" -exec $STRIP {} \; | ||
| try $BUILD_PATH/python-install/bin/python.host setup.py install -O2 | ||
|
|
||
| try rm -rf $BUILD_PATH/python-install/lib/python*/site-packages/kivy/tools | ||
|
|
||
| unset LDSHARED | ||
| pop_arm | ||
| } | ||
|
|
||
| function postbuild_kivy_stable() { | ||
| true | ||
| } | ||
|
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also added two files to .gitignore which are created when using Eclipse+PyDev