Merge pull request #478 from AndreMiras/feature/top_level_toolchaincl
Takes ToolchainCL definition outside the main
This commit is contained in:
commit
3974a1e701
1 changed files with 283 additions and 283 deletions
|
@ -6,6 +6,7 @@ Tool for compiling iOS toolchain
|
|||
This tool intend to replace all the previous tools/ in shell script.
|
||||
"""
|
||||
|
||||
import argparse
|
||||
import sys
|
||||
from sys import stdout
|
||||
from os.path import join, dirname, realpath, exists, isdir, basename, expanduser
|
||||
|
@ -1248,30 +1249,27 @@ def update_pbxproj(filename, pbx_frameworks=None):
|
|||
project.save()
|
||||
|
||||
|
||||
def main():
|
||||
import argparse
|
||||
|
||||
class ToolchainCL(object):
|
||||
class ToolchainCL(object):
|
||||
def __init__(self):
|
||||
parser = argparse.ArgumentParser(
|
||||
description="Tool for managing the iOS / Python toolchain",
|
||||
usage="""toolchain <command> [<args>]
|
||||
|
||||
Available commands:
|
||||
build Build a recipe (compile a library for the required target
|
||||
build Build a recipe (compile a library for the required target
|
||||
architecture)
|
||||
clean Clean the build of the specified recipe
|
||||
distclean Clean the build and the result
|
||||
recipes List all the available recipes
|
||||
status List all the recipes and their build status
|
||||
build_info Display the current build context and Architecture info
|
||||
clean Clean the build of the specified recipe
|
||||
distclean Clean the build and the result
|
||||
recipes List all the available recipes
|
||||
status List all the recipes and their build status
|
||||
build_info Display the current build context and Architecture info
|
||||
|
||||
Xcode:
|
||||
create Create a new xcode project
|
||||
update Update an existing xcode project (frameworks, libraries..)
|
||||
launchimage Create Launch images for your xcode project
|
||||
icon Create Icons for your xcode project
|
||||
pip Install a pip dependency into the distribution
|
||||
create Create a new xcode project
|
||||
update Update an existing xcode project (frameworks, libraries..)
|
||||
launchimage Create Launch images for your xcode project
|
||||
icon Create Icons for your xcode project
|
||||
pip Install a pip dependency into the distribution
|
||||
""")
|
||||
parser.add_argument("command", help="Command to run")
|
||||
args = parser.parse_args(sys.argv[1:2])
|
||||
|
@ -1552,6 +1550,8 @@ Xcode:
|
|||
|
||||
command(images_xcassets, args.image)
|
||||
|
||||
|
||||
def main():
|
||||
ToolchainCL()
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue