Skip to content

Commit 1b668b5

Browse files
committed
fix cdecimal cross-compile
1 parent 1f90f37 commit 1b668b5

File tree

2 files changed

+14
-1
lines changed

2 files changed

+14
-1
lines changed

pythonforandroid/recipes/cdecimal/__init__.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,8 @@ class CdecimalRecipe(CompiledComponentsPythonRecipe):
1010

1111
depends = ['python2']
1212

13-
patches = ['locale.patch']
13+
patches = ['locale.patch',
14+
'cross-compile.patch']
1415

1516
def prebuild_arch(self, arch):
1617
super(CdecimalRecipe, self).prebuild_arch(arch)
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
diff -Naur cdecimal/setup.py b/setup.py
2+
--- cdecimal/setup.py 2015-12-14 13:48:23.085997956 -0600
3+
+++ b/setup.py 2015-12-14 13:48:11.413805121 -0600
4+
@@ -229,7 +229,7 @@
5+
def configure(machine, cc, py_size_t):
6+
os.chmod("./configure", 0x1ed) # pip removes execute permissions.
7+
if machine: # string has been validated.
8+
- os.system("./configure MACHINE=%s" % machine)
9+
+ os.system("./configure --host=%s MACHINE=%s" % (os.environ['TOOLCHAIN_PREFIX'], machine))
10+
elif 'sunos' in SYSTEM and py_size_t == 8:
11+
# cc is from sysconfig.
12+
os.system("./configure CC='%s -m64'" % cc)

0 commit comments

Comments
 (0)