So I've written an app in Python that has a main .py file and recently I've written some libraries that it'll use (some more py files). How would I go about "installing" this in Ubuntu? Before I added the libraries, I simply had a bash script that would copy the main py file to /usr/bin so that the user could run the app with just $ appname.py
And what would be the best way to do this for future deployment as a .deb?
Assuming that you are installing the app into /opt, and that you have properly handled the imports in the python code itself, simply symlinking the main.py file should suit your needs.
ln -s -T /opt/appname/main.py /usr/bin/appname.py
This will work for .deb deployment as well, just make sure to include the symlink in the deployment script.