Hi all, I just tried to package an application using a private module. In this case, the name of the script starting the application and the module have the same name.
So if the module is in /usr/share/foo/foo, then the script can not be /usr/share/foo/foo as well and installing the script to /usr/share/foo/scripts/foo results in an import error. How should this be best handled? 1) Patch the upstream script to add /usr/share/foo to pythonpath if 'import foo' fails? 2) In this specific case (which might actually not be that uncommon), dh_python2 could rename the script foo to foo.py such that it can be installed to /usr/share/foo/foo.py (currently, the behavior of dh_python2 is to install the script to /usr/share/foo/foo/foo in this case of a naming clash). 3) Module and script having the same name is bad practice and the module should be renamed to foo-lib anyway. Thanks for any comments, Eike
pgpSirwkYFb4o.pgp
Description: PGP signature