Skip to content

Commit 88bcb5f

Browse files
committed
Renamed ArchAndroid<...> to Arch<...>
...since everything we target is naturally Android
1 parent 7934d52 commit 88bcb5f

File tree

16 files changed

+36
-30
lines changed

16 files changed

+36
-30
lines changed

pythonforandroid/bootstraps/empty/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
from pythonforandroid.toolchain import Bootstrap, shprint, current_directory, info, warning, ArchAndroidARM, logger, info_main, which
1+
from pythonforandroid.toolchain import Bootstrap, shprint, current_directory, info, warning, ArchARM, logger, info_main, which
22
from os.path import join, exists
33
from os import walk
44
import glob

pythonforandroid/bootstraps/pygame/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
from pythonforandroid.toolchain import Bootstrap, shprint, current_directory, info, warning, ArchAndroidARM, info_main
1+
from pythonforandroid.toolchain import Bootstrap, shprint, current_directory, info, warning, ArchARM, info_main
22
from os.path import join, exists
33
from os import walk
44
import glob
@@ -20,7 +20,7 @@ def run_distribute(self):
2020
src_path = join(self.bootstrap_dir, 'build')
2121

2222
# AND: Hardcoding armeabi - naughty!
23-
arch = ArchAndroidARM(self.ctx)
23+
arch = ArchARM(self.ctx)
2424

2525
with current_directory(self.dist_dir):
2626

pythonforandroid/bootstraps/sdl2/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
from pythonforandroid.toolchain import Bootstrap, shprint, current_directory, info, warning, ArchAndroidARM, info_main
1+
from pythonforandroid.toolchain import Bootstrap, shprint, current_directory, info, warning, ArchARM, info_main
22
from os.path import join, exists
33
from os import walk
44
import glob
@@ -21,7 +21,7 @@ def run_distribute(self):
2121
fileh.write('sdk.dir={}'.format(self.ctx.sdk_dir))
2222

2323
# AND: Hardcoding armeabi - naughty!
24-
arch = ArchAndroidARM(self.ctx)
24+
arch = ArchARM(self.ctx)
2525

2626
with current_directory(self.dist_dir):
2727
info('Copying python distribution')

pythonforandroid/bootstraps/sdl2python3/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
from pythonforandroid.toolchain import Bootstrap, shprint, current_directory, info, warning, ArchAndroidARM, info_main
1+
from pythonforandroid.toolchain import Bootstrap, shprint, current_directory, info, warning, ArchARM, info_main
22
from os.path import join, exists
33
from os import walk
44
import glob
@@ -23,7 +23,7 @@ def run_distribute(self):
2323
fileh.write('sdk.dir={}'.format(self.ctx.sdk_dir))
2424

2525
# AND: Hardcoding armeabi - naughty!
26-
arch = ArchAndroidARM(self.ctx)
26+
arch = ArchARM(self.ctx)
2727

2828
with current_directory(self.dist_dir):
2929
info('Copying python distribution')

pythonforandroid/recipes/android/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11

2-
from pythonforandroid.toolchain import CythonRecipe, shprint, ensure_dir, current_directory, ArchAndroidARM, IncludedFilesBehaviour
2+
from pythonforandroid.toolchain import CythonRecipe, shprint, ensure_dir, current_directory, ArchARM, IncludedFilesBehaviour
33
import sh
44
from os.path import exists, join
55

pythonforandroid/recipes/freetype/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11

2-
from pythonforandroid.toolchain import Recipe, shprint, get_directory, current_directory, ArchAndroidARM
2+
from pythonforandroid.toolchain import Recipe, shprint, get_directory, current_directory, ArchARM
33
from os.path import exists, join, realpath
44
from os import uname
55
import glob

pythonforandroid/recipes/harfbuzz/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11

2-
from pythonforandroid.toolchain import Recipe, shprint, get_directory, current_directory, ArchAndroidARM
2+
from pythonforandroid.toolchain import Recipe, shprint, get_directory, current_directory, ArchARM
33
from os.path import exists, join, realpath
44
from os import uname
55
import glob

pythonforandroid/recipes/kivy/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11

2-
from pythonforandroid.toolchain import CythonRecipe, shprint, current_directory, ArchAndroidARM
2+
from pythonforandroid.toolchain import CythonRecipe, shprint, current_directory, ArchARM
33
from os.path import exists, join
44
import sh
55
import glob

pythonforandroid/recipes/kivysdl2python3/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11

2-
from pythonforandroid.toolchain import CythonRecipe, shprint, current_directory, ArchAndroidARM
2+
from pythonforandroid.toolchain import CythonRecipe, shprint, current_directory, ArchARM
33
from os.path import exists, join
44
import sh
55
import glob
@@ -35,7 +35,7 @@ def get_recipe_env(self, arch):
3535
return env
3636

3737
# def build_armeabi(self):
38-
# env = ArchAndroidARM(self.ctx).get_env()
38+
# env = ArchARM(self.ctx).get_env()
3939

4040
# env['LDFLAGS'] = env['LDFLAGS'] + ' -L{}'.format(self.ctx.libs_dir)
4141
# env['LDSHARED'] = env['LIBLINK']

pythonforandroid/recipes/pygame/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11

2-
from pythonforandroid.toolchain import Recipe, shprint, ArchAndroidARM, current_directory, debug, info, ensure_dir
2+
from pythonforandroid.toolchain import Recipe, shprint, ArchARM, current_directory, debug, info, ensure_dir
33
from os.path import exists, join
44
import sh
55
import glob
@@ -40,7 +40,7 @@ def prebuild_armeabi(self):
4040
def build_armeabi(self):
4141
# AND: I'm going to ignore any extra pythonrecipe or cythonrecipe behaviour for now
4242

43-
arch = ArchAndroidARM(self.ctx)
43+
arch = ArchARM(self.ctx)
4444
env = self.get_recipe_env(arch)
4545

4646
env['CFLAGS'] = env['CFLAGS'] + ' -I{jni_path}/png -I{jni_path}/jpeg'.format(

pythonforandroid/recipes/pyjnius/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11

2-
from pythonforandroid.toolchain import CythonRecipe, shprint, ArchAndroidARM, current_directory, info
2+
from pythonforandroid.toolchain import CythonRecipe, shprint, ArchARM, current_directory, info
33
import sh
44
import glob
55
from os.path import join, exists

pythonforandroid/recipes/pysdl2/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11

2-
from pythonforandroid.toolchain import PythonRecipe, shprint, current_directory, ArchAndroidARM
2+
from pythonforandroid.toolchain import PythonRecipe, shprint, current_directory, ArchARM
33
from os.path import exists, join
44
import sh
55
import glob

pythonforandroid/recipes/python2/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11

2-
from pythonforandroid.toolchain import Recipe, shprint, get_directory, current_directory, ArchAndroidARM, info
2+
from pythonforandroid.toolchain import Recipe, shprint, get_directory, current_directory, ArchARM, info
33
from os.path import exists, join, realpath
44
from os import uname
55
import glob
@@ -92,7 +92,7 @@ def do_python_build(self):
9292
hostpython_recipe = Recipe.get_recipe('hostpython2', self.ctx)
9393
shprint(sh.cp, join(hostpython_recipe.get_recipe_dir(), 'Setup'), 'Modules')
9494

95-
env = ArchAndroidARM(self.ctx).get_env()
95+
env = ArchARM(self.ctx).get_env()
9696

9797
# AND: Should probably move these to get_recipe_env for
9898
# neatness, but the whole recipe needs tidying along these

pythonforandroid/recipes/python3/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11

2-
from pythonforandroid.toolchain import Recipe, shprint, get_directory, current_directory, ArchAndroidARM
2+
from pythonforandroid.toolchain import Recipe, shprint, get_directory, current_directory, ArchARM
33
from os.path import exists, join
44
from os import uname
55
import glob
@@ -67,7 +67,7 @@ def build_armeabi(self):
6767
hostpython_recipe = Recipe.get_recipe('hostpython3', self.ctx)
6868
# shprint(sh.cp, join(hostpython_recipe.get_recipe_dir(), 'Setup'), 'Modules')
6969

70-
env = ArchAndroidARM(self.ctx).get_env()
70+
env = ArchARM(self.ctx).get_env()
7171
env["LDFLAGS"] = env["LDFLAGS"] + ' -llog'
7272

7373
# AND: Should probably move these to get_recipe_env for

pythonforandroid/recipes/sdl/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
from pythonforandroid.toolchain import NDKRecipe, shprint, ArchAndroidARM, current_directory, info
1+
from pythonforandroid.toolchain import NDKRecipe, shprint, ArchARM, current_directory, info
22
from os.path import exists, join
33
import sh
44

@@ -15,7 +15,7 @@ def build_armeabi(self):
1515
info('libsdl.so already exists, skipping sdl build.')
1616
return
1717

18-
env = ArchAndroidARM(self.ctx).get_env()
18+
env = ArchARM(self.ctx).get_env()
1919

2020
with current_directory(self.get_jni_dir()):
2121
shprint(sh.ndk_build, 'V=1', _env=env, _tail=20, _critical=True)

pythonforandroid/toolchain.py

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -460,7 +460,7 @@ def get_env(self):
460460
raise ValueError('Tried to get_env of Arch, this needs '
461461
'a specific Arch subclass')
462462

463-
class ArchAndroidARM(Arch):
463+
class ArchARM(Arch):
464464
arch = "armeabi"
465465

466466
def get_env(self):
@@ -533,14 +533,20 @@ def get_env(self):
533533

534534
return env
535535

536-
class ArchAndroidARMv7_a(ArchAndroidARM):
536+
class ArchARMv7_a(ArchARM):
537537
arch = 'armeabi-v7'
538538

539539
def get_env(self):
540-
env = super(ArchAndroidARMv7_a, self).get_env()
540+
env = super(ArchARMv7_a, self).get_env()
541541
env['CFLAGS'] = env['CFLAGS'] + ' -march=armv7-a -mfloat-abi=softfp -mfpu=vfp -mthumb'
542542
env['CXXFLAGS'] = env['CFLAGS']
543543

544+
class Archx86(Arch):
545+
arch = 'x86'
546+
547+
def get_env(self):
548+
raise ValueError('Archx86 not supported yet!')
549+
544550
# class ArchSimulator(Arch):
545551
# sdk = "iphonesimulator"
546552
# arch = "i386"
@@ -1083,7 +1089,7 @@ def __init__(self):
10831089

10841090
# AND: Currently only the Android architecture is supported
10851091
self.archs = (
1086-
ArchAndroidARM(self),
1092+
ArchARM(self),
10871093
)
10881094

10891095
ensure_dir(join(self.build_dir, 'bootstrap_builds'))
@@ -2455,10 +2461,10 @@ def biglink(ctx, arch):
24552461
files.append(obj_dir)
24562462
shprint(sh.cp, '-r', *files)
24572463

2458-
# AND: Shouldn't hardcode ArchAndroid! In reality need separate
2464+
# AND: Shouldn't hardcode Arch! In reality need separate
24592465
# build dirs for each arch
2460-
arch = ArchAndroidARM(ctx)
2461-
env = ArchAndroidARM(ctx).get_env()
2466+
arch = ArchARM(ctx)
2467+
env = ArchARM(ctx).get_env()
24622468
env['LDFLAGS'] = env['LDFLAGS'] + ' -L{}'.format(
24632469
join(ctx.bootstrap.build_dir, 'obj', 'local', 'armeabi'))
24642470

0 commit comments

Comments
 (0)