示例#1
0
def main():
    root = sys.argv[1]
    if len(sys.argv) > 2:
        destdir = sys.argv[2]
    else:
        destdir = None

    update(core.pkgset(root), destdir, True)
示例#2
0
def configure(root=None,
              redirect_to_fallback=True,
              fallback_url=None):
    from pypiserver.core import pkgset
    global packages

    if root is None:
        root = os.path.expanduser("~/packages")

    if fallback_url is None:
        fallback_url="http://pypi.python.org/simple"

    packages = pkgset(root)
    config.redirect_to_fallback = redirect_to_fallback
    config.fallback_url = fallback_url
示例#3
0
文件: _app.py 项目: cwood/pypiserver
def configure(root=None,
              redirect_to_fallback=True,
              fallback_url=None,
              password_file=None):
    from pypiserver.core import pkgset
    global packages

    if root is None:
        root = os.path.expanduser("~/packages")

    if fallback_url is None:
        fallback_url = "http://pypi.python.org/simple"

    packages = pkgset(root)
    config.redirect_to_fallback = redirect_to_fallback
    config.fallback_url = fallback_url
    if password_file:
        from passlib.apache import HtpasswdFile
        config.htpasswdfile = HtpasswdFile(password_file)
示例#4
0
文件: _app.py 项目: gisce/pypiserver
def configure(root=None,
              redirect_to_fallback=True,
              fallback_url=None,
              password_file=None):
    from pypiserver.core import pkgset
    global packages

    if root is None:
        root = os.path.expanduser("~/packages")

    if fallback_url is None:
        fallback_url = "http://pypi.python.org/simple"

    packages = pkgset(root)
    config.redirect_to_fallback = redirect_to_fallback
    config.fallback_url = fallback_url
    if password_file:
        from passlib.apache import HtpasswdFile
        config.htpasswdfile = HtpasswdFile(password_file)