Replace the last sys.module mechancis with relative imports.

This commit is contained in:
ankostis on tokoti 2015-09-17 01:45:37 +02:00
parent 8303a99806
commit abcfc0c07f
3 changed files with 2 additions and 9 deletions

@ -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

@ -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()

@ -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):