I am porting a library to python 3 and keeping it compatible with python 2.
I have a directory structure like this:
mypackage/
lib/
engines/
__init__.py
setup.py
<other_dirs>/
I want the setup to recognize mypackage
as a package when I call python setup.py install
in the mypackage directory.
So I set packages = ["mypackage"]
. My local build passes, but the builds on Travis and Appveyor fail with the error:
Traceback (most recent call last):
File "setup.py", line 26, in <module>
from mypackage import VERSION
ImportError: No module named mypackage
(The VERSION
variable is defined in __init__.py
)
I am using python2 with from __future__ import absolute_import
to maintain Python 3 compatibility.
Any idea how I can make the travis and appveyor build systems recognize my package? I found a similar question where the answer was to add a symlink to TRAVIS_BUILD_DIR for Travis. Nothing on Appveyor.