make pypiserver executable from wheel file

i.e. python pypiserver-1.1.x-py2.py3-none-any.whl/pypiserver will now
start pypiserver
This commit is contained in:
Ralf Schmitt 2014-01-10 01:30:10 +01:00
parent 0207348df9
commit 123b493775
1 changed files with 3 additions and 0 deletions

View File

@ -1,3 +1,6 @@
if __name__ == "__main__":
if __package__ == "": # running as python pypiserver-...whl/pypiserver?
import sys, os
sys.path.insert(0, os.path.dirname(os.path.dirname(__file__)))
from pypiserver import core
core.main()