Imports and scripts are not (python 3) module compatible
Hi, i am trying to install it from the pip package system wide. Problem is that it is not possible to start it like expected with modules. First the start script fails:
python3: can't open file './pyspread': [Errno 2] No such file or directory
Every item that is listed in setup.py
scripts section gets copied into PATH
, so it should run also from other working directories. I think a better option would be to just let setuptools do the job to generate a start script like this:
entry_points={
'console_scripts': [
'pyspread=pyspread.pyspread:main',
]
},
Then if it is manually started with python -m pyspread
it throws ImportError
because all are implicit relative imports, which is not supported in python 3 (https://docs.python.org/3.0/whatsnew/3.0.html#removed-syntax). Please switch to explicit imports.
For example in pyspread.py
instead of:
from __init__ import VERSION, APP_NAME
should be a explicit relative import:
from .__init__ import VERSION, APP_NAME
or a explicit absolute import (recommended):
from pyspread.__init__ import VERSION, APP_NAME