Setuptools Python namespace package in /opt
- by Samuel Taylor
I'm trying to get my app to install in /opt/[app_name] using setuptools. My app uses a namespace package.
To install I run
sudo python setup.py install --prefix=/opt/[app_name]/ --install-lib=/opt/[app_name]/ --install-scripts=/opt/[app_name]/
When I install it this was setuptools does not copy init.py in to my namespace package so when I come to run my app, python does not treat it as a package and I get import errors.
if I create the init.py file my app works fine.
How do I get setuptool to copy over the init.py file when using --install-lib and --prefix?
Thanks
Sam