@@ -571,37 +571,6 @@ def get_env(self):
571571 env ['CXXFLAGS' ] = env ['CFLAGS' ]
572572 return env
573573
574- # class ArchSimulator(Arch):
575- # sdk = "iphonesimulator"
576- # arch = "i386"
577- # triple = "i386-apple-darwin11"
578- # version_min = "-miphoneos-version-min=6.0.0"
579- # sysroot = sh.xcrun("--sdk", "iphonesimulator", "--show-sdk-path").strip()
580-
581-
582- # class Arch64Simulator(Arch):
583- # sdk = "iphonesimulator"
584- # arch = "x86_64"
585- # triple = "x86_64-apple-darwin13"
586- # version_min = "-miphoneos-version-min=7.0"
587- # sysroot = sh.xcrun("--sdk", "iphonesimulator", "--show-sdk-path").strip()
588-
589-
590- # class ArchIOS(Arch):
591- # sdk = "iphoneos"
592- # arch = "armv7"
593- # triple = "arm-apple-darwin11"
594- # version_min = "-miphoneos-version-min=6.0.0"
595- # sysroot = sh.xcrun("--sdk", "iphoneos", "--show-sdk-path").strip()
596-
597-
598- # class Arch64IOS(Arch):
599- # sdk = "iphoneos"
600- # arch = "arm64"
601- # triple = "aarch64-apple-darwin13"
602- # version_min = "-miphoneos-version-min=7.0"
603- # sysroot = sh.xcrun("--sdk", "iphoneos", "--show-sdk-path").strip()
604-
605574
606575class Graph (object ):
607576 # Taken from the old python-for-android/depsort
@@ -2107,20 +2076,6 @@ def get_build_dir(self, arch):
21072076 def get_jni_dir (self ):
21082077 return join (self .ctx .bootstrap .build_dir , 'jni' )
21092078
2110- # def download_if_necessary(self):
2111- # info_main('Downloading {}'.format(self.name))
2112- # info('{} is an NDK recipe, it is alread included in the '
2113- # 'bootstrap (for now), so skipping'.format(self.name))
2114- # # Do nothing; in the future an NDKRecipe can copy its
2115- # # contents to the bootstrap build dir, but for now each
2116- # # bootstrap already includes available recipes (as was
2117- # # already the case in p4a)
2118-
2119- # def prepare_build_dir(self, arch):
2120- # info_main('Unpacking {} for {}'.format(self.name, arch))
2121- # info('{} is included in the bootstrap, unpacking currently '
2122- # 'unnecessary, so skipping'.format(self.name))
2123-
21242079
21252080class PythonRecipe (Recipe ):
21262081 site_packages_name = None
@@ -2165,10 +2120,6 @@ def build_arch(self, arch):
21652120 the target Python dir.'''
21662121 super (PythonRecipe , self ).build_arch (arch )
21672122 self .install_python_package (arch )
2168- # @cache_execution
2169- # def install(self):
2170- # self.install_python_package()
2171- # self.reduce_python_package()
21722123
21732124 def install_python_package (self , arch , name = None , env = None , is_dir = True ):
21742125 '''Automate the installation of a Python package (or a cython
@@ -2279,15 +2230,6 @@ def build_cython_components(self, arch):
22792230 # for filename in fnmatch.filter(filenames, "*.pyx"):
22802231 # self.cythonize_file(join(root, filename))
22812232
2282- # def biglink(self):
2283- # dirs = []
2284- # for root, dirnames, filenames in walk(self.build_dir):
2285- # if fnmatch.filter(filenames, "*.so.libs"):
2286- # dirs.append(root)
2287- # cmd = sh.Command(join(self.ctx.root_dir, "tools", "biglink"))
2288- # shprint(cmd, join(self.build_dir, "lib{}.a".format(self.name)),
2289- # *dirs)
2290-
22912233 def get_recipe_env (self , arch ):
22922234 env = super (CythonRecipe , self ).get_recipe_env (arch )
22932235 env ['LDFLAGS' ] = env ['LDFLAGS' ] + ' -L{}' .format (
@@ -2474,21 +2416,11 @@ def biglink_function(soname, objs_paths, extra_link_dirs=[], env=None):
24742416 if link not in unique_args :
24752417 unique_args .append (link )
24762418
2477- # print('Biglink create %s library' % soname)
2478- # print('Biglink arguments:')
2479- # for arg in unique_args:
2480- # print(' %s' % arg)
2481-
24822419 cc_name = env ['CC' ]
24832420 cc = sh .Command (cc_name .split ()[0 ])
24842421 cc = cc .bake (* cc_name .split ()[1 :])
24852422
24862423 shprint (cc , '-shared' , '-O3' , '-o' , soname , * unique_args , _env = env )
2487- # args = os.environ['CC'].split() + \
2488- # ['-shared', '-O3', '-o', soname] + \
2489- # unique_args
2490-
2491- # sys.exit(subprocess.call(args))
24922424
24932425
24942426def ensure_dir (filename ):
@@ -2803,21 +2735,6 @@ def __init__(self):
28032735 exit (1 )
28042736 getattr (self , args .command )(unknown )
28052737
2806- # def build(self):
2807- # parser = argparse.ArgumentParser(
2808- # description="Build the toolchain")
2809- # parser.add_argument("recipe", nargs="+", help="Recipe to compile")
2810- # parser.add_argument("--arch",
2811- # help="Restrict compilation to this arch")
2812- # args = parser.parse_args(sys.argv[2:])
2813-
2814- # ctx = Context()
2815- # # if args.arch:
2816- # # archs = args.arch.split()
2817- # # ctx.archs = [arch for arch in ctx.archs if arch.arch in archs]
2818- # # print("Architectures restricted to: {}".format(archs))
2819- # build_recipes(args.recipe, ctx)
2820-
28212738 def _read_configuration (self ):
28222739 # search for a .p4a configuration file in the current directory
28232740 if not exists (".p4a" ):
0 commit comments