Well, thanks to everybody who offered suggestions, but after spending a few 
days exploring all sorts of fascinating python packaging technology, I've 
decided to keep doing it the way I've always done it, i.e. just use git pull on 
the bastion.  The final straw was when I realized I would break my little bit 
of automation which lets my tools introspect the git repo so they can log the 
branch and commit id they're running:

2022-12-21T00:59:55 INFO dykbot [1671584395] git: main 
(4f0ef2870376b71b70d08397b273a1ffaf3c3344)

I'm sure this is some horrible layering violation, but it's really handy.

> On Dec 29, 2022, at 3:43 AM, Kunal Mehta <lego...@debian.org> wrote:
> 
> Hi,
> 
> On 12/28/22 10:31, Roy Smith 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.
> 
> This is what I do. Each bot/webapp has a requirements.txt with a mix of 
> pinned and unpinned dependencies, I create the virtualenv, install 
> requirements.txt. For webapps, this is automated with the 
> `webservice-python-bootstrap` script[1]. Whenever I git pull, manually check 
> to see if I need to reinstall/update dependencies.
> 
> I personally find this to be the simplest way of enabling straightforward 
> local development and minimal work to deploy, usually it's just `git pull && 
> webservice restart`.
> 
>> 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.
> 
> Right. From a Toolforge perspective, if there's some other, better way to do 
> it, filing a bug would be a good first step to figuring out how to add that. 
> T229172[2] contains some discussion of PEP 517 which ACN mentioned, but 
> doesn't discuss the requirement of app.py.
> 
> [1] 
> https://wikitech.wikimedia.org/wiki/Help:Toolforge/Web/Python#Creating_a_virtual_environment
> [2] https://phabricator.wikimedia.org/T229172
> 
> -- Kunal / Legoktm
> _______________________________________________
> pywikibot mailing list -- pywikibot@lists.wikimedia.org
> To unsubscribe send an email to pywikibot-le...@lists.wikimedia.org

_______________________________________________
pywikibot mailing list -- pywikibot@lists.wikimedia.org
To unsubscribe send an email to pywikibot-le...@lists.wikimedia.org

Reply via email to