You can try adding the src folder to PYTHONPATH before calling the setup function:
import sys, os src_path = os.path.join(os.path.realpath(os.path.dirname(__file__)), 'src') sys.path.append(src_path)
And also, to be safe, you then change the working directory:
os.chdir(src_path)
After that, everything should be in order.
Some other packaging tools support your application from the inside out. I thought it was setuptools, it turns out PyInstaller. But basically, what you need to do is enough for your packages to be imported directly.
Turns out distutils has a package_dir directive. This is what you should use, but it can only work by adding your package to PYTHONPATH .
jadkik94
source share