I wrote a standalone script depends on a few modified modules. the directory structure looks like this:
client
setup.py
tsclient
__init__.py
tsup
utils.py
mutagen
__init__.py
blah.py
blah.py
...
colorama
__init__.py
blah.py
blah.py
...
currently, if I just symlink the usup
script to my ~/bin
directory, I can invoke the script directly and it works with no problems (everything imports properly with no problems).
Now I want to make a setup.py script so I can distribute it. I can't figure out how to do it. Here is what I have now:
setup(
name='tsclient',
version='1.0',
scripts=['tsclient/tsup'],
packages=['tsclient', 'tsclient.mutagen', 'tsclient.colorama'],
)
The problem is that I can't just do import mutagen
in the tsup script because it's now tsclient.mutagen
. If I change the import to say from tsclient import mutagen
I get this error (from mutagen's __init__.py
file):
ImportError: No module named mutagen._util
I don't think the best solution is to go through mutagen and change every single instance of "mutagen" and change it to "tsclient.mutagen". Is this my only option?