Setuptools Python namespace package in /opt
Posted
by
Samuel Taylor
on Stack Overflow
See other posts from Stack Overflow
or by Samuel Taylor
Published on 2012-10-18T22:58:11Z
Indexed on
2012/10/18
23:00 UTC
Read the original article
Hit count: 361
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
© Stack Overflow or respective owner