Hi Stefano, <div><br></div><div>Thanks, but that did not work. I keep seeing my module is not found. Here is the output of buildpackage:</div><div><br></div><div>$ dpkg-buildpackage -rfakeroot</div><div>dpkg-buildpackage: export CFLAGS from dpkg-buildflags (origin: vendor): -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Wformat-security</div>
<div>dpkg-buildpackage: export CPPFLAGS from dpkg-buildflags (origin: vendor): -D_FORTIFY_SOURCE=2</div><div>dpkg-buildpackage: export CXXFLAGS from dpkg-buildflags (origin: vendor): -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Wformat-security</div>
<div>dpkg-buildpackage: export FFLAGS from dpkg-buildflags (origin: vendor): -g -O2</div><div>dpkg-buildpackage: export LDFLAGS from dpkg-buildflags (origin: vendor): -Wl,-Bsymbolic-functions -Wl,-z,relro</div><div>dpkg-buildpackage: source package termsaver-figlet</div>
<div>dpkg-buildpackage: source version 0.1-1</div><div>dpkg-buildpackage: source changed by Bruno Braga <<a href="mailto:bruno.braga@gmail.com">bruno.braga@gmail.com</a>></div><div>dpkg-buildpackage: host architecture amd64</div>
<div> dpkg-source --before-build termsaver-figlet_0.1</div><div> fakeroot debian/rules clean</div><div>dh clean --with=python2 </div><div> dh_testdir</div><div> dh_auto_clean</div><div>Traceback (most recent call last):</div>
<div> File "setup.py", line 42, in <module></div><div> from figlet import constants</div><div> File "/tmp/packaging/termsaver-figlet_0.1/figlet/constants.py", line 34, in <module></div>
<div> from termsaverlib.constants import PropertyClass</div><div>ImportError: No module named termsaverlib.constants</div><div>dh_auto_clean: python setup.py clean -a returned exit code 1</div><div>make: *** [clean] Error 1</div>
<div>dpkg-buildpackage: error: fakeroot debian/rules clean gave error exit status 2</div><div><br></div><div>To help a bit on the error above, here is my directory structure:</div><div>termsaver package is a standalone app installed on /usr/share/ </div>
<div><br></div><div><div>$ tree /usr/share/termsaver/</div><div>/usr/share/termsaver/</div><div>├── termsaver</div><div>├── termsaver-0.1.2.egg-info</div><div>└── termsaverlib</div><div> ├── common.py</div><div> ├── constants.py</div>
<div> ├── exception.py</div><div> ├── i18n.py</div><div> ├── __init__.py</div><div> ├── plugins</div><div> │ ├── __init__.py</div><div><br></div></div><div><br></div><div>Then what I am trying to achieve is to create a package for a plugin, which will add code to a specific directory in the main package (at /usr/share/termsaver/termsaverlib/plugins/).</div>
<div>doing it manually works, of course. with setup.py also works, as long as I use the PYTHONPATH.... but in building the package it does not work, with the error message above.</div><div><br></div><div>Any ideas?</div>
<div>
<br><span style="font-family:courier new,monospace">--</span><br style="font-family:courier new,monospace"><b style="font-family:courier new,monospace">Braga, Bruno</b><br style="font-family:courier new,monospace"><a style="font-family:courier new,monospace" href="http://www.brunobraga.net" target="_blank">www.brunobraga.net</a><br style="font-family:courier new,monospace">
<a style="font-family:courier new,monospace" href="mailto:bruno.braga@gmail.com" target="_blank">bruno.braga@gmail.com</a><br>
<br><br><div class="gmail_quote">On Tue, Jul 24, 2012 at 2:21 AM, Stefano Rivera <span dir="ltr"><<a href="mailto:stefanor@debian.org" target="_blank">stefanor@debian.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hi BRAGA, (2012.07.23_15:59:34_+0200)<br>
> Hi debian/python gurus,<br>
<br>
Generally, <a href="mailto:debian-python@lists.debian.org">debian-python@lists.debian.org</a> is a better place for<br>
discussions.<br>
<div class="im"><br>
> I am packaging a plugin for another package I have, but it is held<br>
> privately, so I need to add the path to it in PYTHONPATH for running<br>
> setup.py.<br>
<br>
</div>You probably want to use --install-lib not --prefix.<br>
<br>
Then you don't need to set PYTHONPATH.<br>
<br>
It ends up looking like:<br>
<br>
%:<br>
dh $@ --with python2<br>
<br>
override_dh_auto_install:<br>
dh_auto_install -- --install-lib /usr/share/foobar<br>
<span class="HOEnZb"><font color="#888888"><br>
SR<br>
<br>
--<br>
Stefano Rivera<br>
<a href="http://tumbleweed.org.za/" target="_blank">http://tumbleweed.org.za/</a><br>
H: <a href="tel:%2B27%2021%20461%201230" value="+27214611230">+27 21 461 1230</a> C: <a href="tel:%2B27%2072%20419%208559" value="+27724198559">+27 72 419 8559</a><br>
</font></span></blockquote></div><br></div>