mirror of
https://github.com/pypiserver/pypiserver
synced 2024-11-09 16:45:51 +01:00
Replace the last sys.module
mechancis with relative imports.
This commit is contained in:
parent
8303a99806
commit
abcfc0c07f
@ -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):
|
||||
|
Loading…
Reference in New Issue
Block a user