public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
From: Doug Henderson <djndnbvg@gmail.com>
To: "Cygwin (cygwin@cygwin.com)" <cygwin@cygwin.com>
Subject: Re: Cygwin packages with unnecessary __pycache__ directories
Date: Tue, 30 Nov 2021 18:42:42 -0700	[thread overview]
Message-ID: <CAJ1FpuNF1r22NT_LiG8=VTYfNaO3YrLi-OydyynTu3YEpDdPMQ@mail.gmail.com> (raw)
In-Reply-To: <CA+kUOa=_B-xnx2pGDTLYuN-w68cu8DzQ_UcyHckSWE7F_O+idg@mail.gmail.com>

On Tue, 30 Nov 2021 at 10:45, Adam Dinwoodie <adam@dinwoodie.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
> <
https://www.cygwin.com/cgi-bin2/package-grep.cgi?grep=__pycache__&arch=x86_64
>.
> 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
elevated shell.

Doug
-- 
Doug Henderson, Calgary, Alberta, Canada - from gmail.com

  reply	other threads:[~2021-12-01  1:42 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-30 17:44 Adam Dinwoodie
2021-12-01  1:42 ` Doug Henderson [this message]
2021-12-01  6:43   ` Marco Atzeri

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAJ1FpuNF1r22NT_LiG8=VTYfNaO3YrLi-OydyynTu3YEpDdPMQ@mail.gmail.com' \
    --to=djndnbvg@gmail.com \
    --cc=cygwin@cygwin.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).