Index | Thread | Search

From:
Stuart Henderson <stu@spacehopper.org>
Subject:
Re: update games/wesnoth
To:
Fabien ROMANO <fabienromano@gmail.com>
Cc:
ports@openbsd.org
Date:
Fri, 21 Jun 2024 08:33:54 +0100

Download raw body.

Thread
On 2024/06/20 20:29, Fabien ROMANO wrote:
> On 20/06/2024 12:35, Stuart Henderson wrote:
> > No pyc files for those please. They are scripts for running separately
> > ("#!/usr/bin/env python3" lines and executable). pyc files are just used
> > for files which are imported as Python modules (usually in a directory
> > tree with __init__.py files).
> 
> I'm confused, was thinking it is used for any .py files to speed up execution on
> next run (not only module import). Still there are modules bundled in those tools.

> I have no idea what those tools are used for and the port does not have direct
> depends on python so, in this case, performance do not matter I guess.

Performance is part of it, the other part is that we don't want software
from packages to write pyc files to system directories if they're run
as a user with write permissions on the relevant dirs.

https://peps.python.org/pep-3147/#flow-chart only talks about writing
these when you "import foo" and it imports from foo.py and when I've
tried running scripts directly from a writable dir, the pycache dir and
pyc-files do not get created.

You can check yourself by making the dir world-writable (or changing
ownership) and running the program.

> > 
> > portcheck's checks are not particularly sophisticated.
> > 
> Well, sometimes it is better to keep it stupid.
> I guess this one is better as is (from my pov ksh isn't elegant neither easy).
> 
> Perhapsd a knob like PORTROACH could be added to mute some checks on purpose ?
> 
> # some tools provided are written in python but not needed to run the game
> PORTCHECK_DISABLE = python

that's not the correct reason for this case.

> How many knobs, is it only a few false negative checks ... don't know.
> Even a simple knob like this could be tricky to implement in ksh.

Please let's not make portcheck even more complicated.