Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions pythonforandroid/recipes/mysqldb/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,19 @@ class MysqldbRecipe(CompiledComponentsPythonRecipe):

# call_hostpython_via_targetpython = False

def convert_newlines(self, filename):
print('converting newlines in {}'.format(filename))
with open(filename, 'rb') as f:
data = f.read()
with open(filename, 'wb') as f:
f.write(data.replace(b'\r\n', b'\n').replace(b'\r', b'\n'))

def prebuild_arch(self, arch):
super(MysqldbRecipe, self).prebuild_arch(arch)
setupbase = join(self.get_build_dir(arch.arch), 'setup')
self.convert_newlines(setupbase + '.py')
self.convert_newlines(setupbase + '_posix.py')

def get_recipe_env(self, arch=None):
env = super(MysqldbRecipe, self).get_recipe_env(arch)

Expand Down
2 changes: 1 addition & 1 deletion pythonforandroid/recipes/mysqldb/disable-zip.patch
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
--- mysqldb/setup.py 2014-01-02 13:52:50.000000000 -0600
+++ b/setup.py 2016-01-11 15:25:09.375114016 -0600
+++ b/setup.py 2016-01-13 15:48:36.781216443 -0600
@@ -18,4 +18,5 @@
metadata['ext_modules'] = [
setuptools.Extension(sources=['_mysql.c'], **options)]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
--- mysqldb/setup_posix.py 2014-01-02 13:52:50.000000000 -0600
+++ b/setup_posix.py 2016-01-11 14:38:33.603528571 -0600
+++ b/setup_posix.py 2016-01-13 15:48:18.732883429 -0600
@@ -13,17 +13,7 @@
return "-%s" % f

Expand Down