コード例 #1
0
ファイル: ivpm.py プロジェクト: fvutils/ivpm
def ivpm_main(project_dir, argv):
    """Back-compat entry point for the bootstrap ivpm.py stored in projects"""

    # Determine where the ivpm package directory is
    scripts_dir = os.path.dirname(os.path.realpath(__file__))
    ivpm_dir = os.path.dirname(scripts_dir)

    sys.path.insert(0, os.path.join(ivpm_dir, "src"))
    from ivpm.__main__ import main
    main(project_dir)
コード例 #2
0
ファイル: ivpm.py プロジェクト: fvutils/ivpm
def main():
    scripts_dir = os.path.dirname(os.path.realpath(__file__))
    project_dir = os.path.dirname(scripts_dir)
    packages_dir = project_dir + "/packages"
    ivpm_dir = packages_dir + "/ivpm"

    help_requested = False

    for arg in sys.argv:
        if (arg == "-help" or arg == "--help" or arg == "-h" or arg == "--h"
                or arg == "-?"):
            help_requested = True

    # First see if we've already downloaded IVPM
    if os.path.isdir(ivpm_dir) == False:
        if (help_requested):
            print("Local help")
            sys.exit(1)
        download_ivpm(packages_dir)

    # Bring in the actual IVPM script and call it
    sys.path.insert(0, ivpm_dir + "/src")
    from ivpm.__main__ import main
    main(project_dir)
コード例 #3
0
ファイル: ivpm.py プロジェクト: fvutils/ivpm

def main():
    scripts_dir = os.path.dirname(os.path.realpath(__file__))
    project_dir = os.path.dirname(scripts_dir)
    packages_dir = project_dir + "/packages"
    ivpm_dir = packages_dir + "/ivpm"

    help_requested = False

    for arg in sys.argv:
        if (arg == "-help" or arg == "--help" or arg == "-h" or arg == "--h"
                or arg == "-?"):
            help_requested = True

    # First see if we've already downloaded IVPM
    if os.path.isdir(ivpm_dir) == False:
        if (help_requested):
            print("Local help")
            sys.exit(1)
        download_ivpm(packages_dir)

    # Bring in the actual IVPM script and call it
    sys.path.insert(0, ivpm_dir + "/src")
    from ivpm.__main__ import main
    main(project_dir)


if __name__ == "__main__":
    main()