def _get_pkg_version_args(pkg_str):
    arg_parts = pkg_str.split(";")
    if len(arg_parts) == 1:
        args = []
    else:
        pkg_str = arg_parts[0]
        args = arg_parts[1:]
    parts = pkg_str.split("==")
    if len(parts) == 1:
        return parts[0], None, args
    else:
        assert len(parts) == 2
        name, version = parts
        return name, version, args
Uses Python style package==0.1 version specifications and args separated with ';'
dataset/ETHPy150Open chapmanb/cloudbiolinux/cloudbio/package/brew.py/_get_pkg_version_args