Simplify imports of sub packages
Simplify imports of some sub packages of Pyxel.
Before simplification:
>>> import pyxel.inputs_outputs
>>> import pyxel.run
>>> cfg = pyxel.inputs_outputs.load(...)
>>> pyxel.run.single_mode(...)
After modification in file pyxel.__init__.py
:
>>> import pyxel
>>> cfg = pyxel.load(...) # 'load' is directly accessible from 'pyxel'
>>> pyxel.single_mode(...) # 'single_mode' is directly accessible from 'pyxel'
After the refactoring, one have to remove the following line in file setup.cfg
[metadata]
...
version = attr: pyxel.__version__ <== remove this line
And add this line in setup.py
from versioneer import get_versions
setup(version=get_versions()['version'])
With these modifications, when the script setup.py
is called it will not import pyxel
.