From 2d7b42cd80f4d440acde9570e556d80d2fd40092 Mon Sep 17 00:00:00 2001 From: Ralf Schmitt Date: Thu, 3 Jan 2013 22:12:23 +0100 Subject: [PATCH] make pypi-server-standalone not use waitress waitress needs at least python 2.6 --- README.rst | 1 + pypi-server-in.py | 5 ++++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/README.rst b/README.rst index 6cfb30f..a4a5c39 100644 --- a/README.rst +++ b/README.rst @@ -452,6 +452,7 @@ Changelog (https://github.com/schmir/pypiserver/issues/25) - add description of uploads to the documentation - make the test suite work on python 3 +- make pypi-server-standalone work with python 2.5 1.0.0 (2012-10-26) ------------------ diff --git a/pypi-server-in.py b/pypi-server-in.py index 46d2f15..e629d3a 100755 --- a/pypi-server-in.py +++ b/pypi-server-in.py @@ -59,5 +59,8 @@ sys.meta_path.append(importer) if __name__ == "__main__": from pypiserver import core - core.DEFAULT_SERVER = "waitress" + if sys.version_info >= (2, 6): + core.DEFAULT_SERVER = "waitress" + else: + core.bottle.AutoServer.adapters.remove(core.bottle.WaitressServer) core.main()