Cygwin packages with unnecessary __pycache__ directories
Wed Dec 1 01:42:42 GMT 2021
On Tue, 30 Nov 2021 at 10:45, Adam Dinwoodie <firstname.lastname@example.org> wrote:
> Hi all,
> I spotted earlier today that there are a significant number of Cygwin
> packages that seem to include __pycache__ directories in the package.
> I'd have expected this to be an error, and any Python code to be
> distributed without the __pycache__ directories so that the local
> Python installation can compile the bytecode locally. Certainly
> distributing these files seems like it would unnecessarily inflate the
> size of the affected packages.
> Assuming this is actually an issue, and these directories aren't
> desirable for some reason that hasn't occurred to me, I suspect fixing
> this is most easily achieved by an update to cygport to automatically
> exclude those directories. Once that's done, the next time the
> affected packages are rebuilt they'd automatically miss these
> extraneous files.
> There's a list of affected packages at
> Unsubscribe info: https://cygwin.com/ml/#unsubscribe-simple
Including version specific pre-compiled files is actually OK for
'python2?-', 'python3?-' and 'python3??-' packages as long as the
'*.py[co]' files are compiled by the corresponding major version of python.
And it is actually required when the user does not have the permissions to
run setup or the installed python(s) in a elevated shell.
For all other packages, eg. 'python-', 'python?-' and packages that do not
start with those prefixes should not have pre-compiled files in the
'__pycache__' folder. Including an empty '__pycache__' folder is not
required, but not really a problem.
When the '__pychache__' folder or the cached files are not present after
installing the package, I believe the user may need to build them in an
Doug Henderson, Calgary, Alberta, Canada - from gmail.com
More information about the Cygwin