diff --git a/pypiserver/__init__.py b/pypiserver/__init__.py index 1b72e5f..0915a18 100644 --- a/pypiserver/__init__.py +++ b/pypiserver/__init__.py @@ -17,10 +17,7 @@ def app(root=None, ): import sys import os - from pypiserver import core - sys.modules.pop("pypiserver._app", None) - __import__("pypiserver._app") - _app = sys.modules["pypiserver._app"] + from . import core, _app from . import bottle diff --git a/pypiserver/__main__.py b/pypiserver/__main__.py index 84e2613..ed0bddd 100644 --- a/pypiserver/__main__.py +++ b/pypiserver/__main__.py @@ -296,8 +296,4 @@ def main(argv=None): if __name__ == "__main__": -# if __package__ == "": # running as python pypiserver-...whl/pypiserver? -# import sys -# import os -# sys.path.insert(0, os.path.dirname(os.path.dirname(__file__))) main() diff --git a/pypiserver/manage.py b/pypiserver/manage.py index 3dac95a..79c334f 100644 --- a/pypiserver/manage.py +++ b/pypiserver/manage.py @@ -2,7 +2,7 @@ import sys import os from subprocess import call -from pypiserver import core +from . import core import itertools if sys.version_info >= (3, 0):