def test_checkout(pypi, svn_repo, workspace):
    """ Creates a new package from the template, imports it into a test repo.
        Tests checking it out by name
    """
    #pypi_chishop.restore()
    with create_pkg(pypi, svn_repo, 'acme.tmi_test_checkout'):
        manage.checkout_pkg(workspace.workspace, pypi.api, 'acme.tmi_test_checkout',
                            Options(), 'trunk')
        assert os.path.isfile(os.path.join(workspace.workspace, 'setup.py'))
def test_checkout(pypi, svn_repo, workspace):
    """ Creates a new package from the template, imports it into a test repo.
        Tests checking it out by name
    """
    #pypi_chishop.restore()
    with create_pkg(pypi, svn_repo, 'acme.tmi_test_checkout'):
        manage.checkout_pkg(workspace.workspace, pypi.api,
                            'acme.tmi_test_checkout', Options(), 'trunk')
        assert os.path.isfile(os.path.join(workspace.workspace, 'setup.py'))
示例#3
0
def process_pkg(pypi, pkg, dest_dir, options, recurse, indent=0):
    """ Checks out and sets up a package by name.
    """
    global INSPECTED_PACKAGES
    INSPECTED_PACKAGES.append(pkg)
    indent_txt = ' ' * indent
    if not os.path.isdir(dest_dir):
        os.makedirs(dest_dir)
        checkout_pkg(dest_dir, pypi, pkg, options, options.branch, indent_txt)
        if recurse:
            # Do our children too
            for dep in get_inhouse_dependencies(pkg, indent_txt):
                log.info("%s Descending to dependency: %s" % (indent_txt, dep))
                dest_dir = os.path.join(os.path.dirname(dest_dir), dep)
                process_pkg(pypi, dep, dest_dir, options, options.recursive,
                            indent + 4)
    setup_pkg(sys.exec_prefix, dest_dir, options, indent_txt)
示例#4
0
def process_pkg(pypi, pkg, dest_dir, options, recurse, indent=0):
    """ Checks out and sets up a package by name.
    """
    global INSPECTED_PACKAGES
    INSPECTED_PACKAGES.append(pkg)
    indent_txt = ' ' * indent
    if not os.path.isdir(dest_dir):
        os.makedirs(dest_dir)
        checkout_pkg(dest_dir, pypi, pkg, options, options.branch, indent_txt)
        if recurse:
            # Do our children too
            for dep in get_inhouse_dependencies(pkg, indent_txt):
                log.info("%s Descending to dependency: %s" % (indent_txt, dep))
                dest_dir = os.path.join(os.path.dirname(dest_dir), dep)
                process_pkg(pypi, dep, dest_dir, options, options.recursive,
                            indent + 4)
    setup_pkg(sys.exec_prefix, dest_dir, options, indent_txt)