You would have to make a stub app.py, https://wikitech.wikimedia.org/wiki/Help:Toolforge/Web/Python#Using_a_uWSGI_app_with_a_default_entry_point_that_is_not_app.py.
I've considered doing PEP 517 builds with Poetry on toolforge before, but didn't find a good way to automate it. So I'm sticking with git pull and micropipenv (to install dependencies from Poetry.lock) at the moment.
ACN
On Wed, Dec 28, 2022 at 1:31 PM Roy Smith roy@panix.com wrote:
How do people install their bots into toolforge? In the past, I've just done a "git pull" to the bastion host and run with the code directly out of the source tree, but I'm not sure that's a good plan.
My current project is a more complicated, with a bot that I'm going to run on krb as a toolforge cron job, a web service that's going to run via "webservice --backend=kubernetes python3.9 start" and also some command-line scripts that I'll want to run interactively. All this code will be in the same git repo. So I'm thinking of building a wheel and installing it that way. So, I guess that means building the wheel locally with setuptools, scp the wheel over to the bastion, shell into a krb node to do "pip install" into my virtualenv.
The stumbling block with that plan seems to be that toolforge insists on your webapp being installed at $HOME/www/python/src/app.py, which isn't going to play well with a wheel installation. _______________________________________________ pywikibot mailing list -- pywikibot@lists.wikimedia.org To unsubscribe send an email to pywikibot-leave@lists.wikimedia.org