Fix setup.py version import. It failed on clean install, since module supybot is not yet available.

When importing 'from src', that pulled src/__init__.py, which in turn tried to import the supybot module.
Now we edit sys.path and import the .py file directly.
This commit is contained in:
Daniel Folkinshteyn 2010-08-20 12:35:58 -04:00
parent 2a40d6eb90
commit 6230a32c69

View File

@ -47,7 +47,10 @@ import glob
import shutil import shutil
import os.path import os.path
from src.version import version # grab version from src directly, since we do not yet have supybot
# available as a module.
sys.path.append('./src')
from version import version
plugins = [s for s in os.listdir('plugins') if plugins = [s for s in os.listdir('plugins') if
os.path.exists(os.path.join('plugins', s, 'plugin.py'))] os.path.exists(os.path.join('plugins', s, 'plugin.py'))]