add passlib and waitress to pypi-server-standalone

we collect them from the pypiserver-vendor submodule
This commit is contained in:
Ralf Schmitt 2012-10-12 00:15:18 +02:00
parent 9ce3c084e8
commit 37d155beb1
5 changed files with 25 additions and 5 deletions

3
.gitmodules vendored Normal file
View File

@ -0,0 +1,3 @@
[submodule "vendor"]
path = vendor
url = https://github.com/schmir/pypiserver-vendor.git

View File

@ -2,7 +2,13 @@
"""generate a single file pypi-server script"""
import os, zlib, cPickle, base64, glob
import os, zlib, cPickle, base64, itertools
def find_files(path):
for dirpath, dirnames, filenames in os.walk(path):
for f in filenames:
yield os.path.join(dirpath, f)
def get_version():
@ -16,8 +22,15 @@ def get_version():
def main():
name2src = {}
for f in glob.glob("pypiserver/*.py"):
for f in itertools.chain(find_files("pypiserver"),
find_files("vendor")):
if not f.endswith(".py"):
continue
k = f.replace('/', '.')[:-3]
if k.startswith("vendor."):
k = k[len("vendor."):]
name2src[k] = open(f).read()
data = cPickle.dumps(name2src, 2)

View File

@ -58,5 +58,6 @@ importer.sources = sources
sys.meta_path.append(importer)
if __name__ == "__main__":
from pypiserver.core import main
main()
from pypiserver import core
core.DEFAULT_SERVER = "waitress"
core.main()

View File

@ -9,6 +9,8 @@ from bottle import run, server_names
mimetypes.add_type("application/octet-stream", ".egg")
DEFAULT_SERVER = None
def guess_pkgname(path):
pkgname = re.split(r"-\d+", os.path.basename(path))[0]
@ -153,7 +155,7 @@ def main(argv=None):
command = "serve"
host = "0.0.0.0"
port = 8080
server = None
server = DEFAULT_SERVER
redirect_to_fallback = True
fallback_url = "http://pypi.python.org/simple"
password_file = None

1
vendor Submodule

@ -0,0 +1 @@
Subproject commit 74575e4f7960c0bbd15cfcf5548e4931866887a1