X-Recipient: archive-cygwin@delorie.com
DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org AEDD3385BF80
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cygwin.com;
	s=default; t=1638323046;
	bh=Cx5ShD5sYscnCMhDZRxPgIEqSC0qGYDQNViD5jhLj90=;
	h=References:In-Reply-To:Date:Subject:To:List-Id:List-Unsubscribe:
	 List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:
	 From;
	b=KesYjuMnxfGXOYUPFUtMEzIuP28cRPXirdXX89zi2Ft0yMnlWOEp2HG0WUf0r066P
	 RukGxygzKZX3lTe/anMDst+7KXGP2Xw6eLjn1GAVJojf+/r09oDBTPSGJQT1bjWBXJ
	 LLYg98EHIPYDw0pfRZWmd5vwyDE9Sb+XbzF2GxdI=
X-Original-To: cygwin@cygwin.com
Delivered-To: cygwin@cygwin.com
DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org AB3863858403
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20210112;
 h=x-gm-message-state:mime-version:references:in-reply-to:from:date
 :message-id:subject:to;
 bh=7JLauksMLEizU85mecxpnzhoTayqXnU1kFsYEO2chAg=;
 b=fjPVDkg+TrBLDPDp5J0gteaj/V4i6rOuwW46RKjytq2toirViv8dMBCS0J9ZpMVFQe
 C3/BqcLrhcsuz0qPMLVXF+J7AAltRnu1c0j+JVPbufulCwHXSXYyFvQf1S/N8D944dZg
 +54OwrrUNGARRAY0cAe3jMD6aDcPRBZ3W9hEVSuG305wEK7CTTbC/aeqBPhqISPtC5Ba
 5rvvlpoPbp+XJmD4wYuyfyxfYFbEtF1DeLNKjH/RogNp7pFZUOhG04+505ukGDxuq5FF
 mHMG0YIknAeXFZ4DYQ/9PUHs01//Kfz4TiLsWbicphukdZPgMF7J7FfEPeBivVNoq2US
 80NQ==
X-Gm-Message-State: AOAM5310yM2hypJVfJT9090b0A+fB8wFz/B+krKHOfe/hqDPD6yFLiH7
 CVvd9icaLYC5Icfe2oTBT0loBzBbdjgU2aWRNIf4LSTD
X-Google-Smtp-Source: ABdhPJxEEt1BSWTca4LXeYFDO4Xf07ZDwiERDWQw15Hgq970wqw8sDq7VISWz5an7juWNYDPkgGwq5qtDe8HMiZqpKc=
X-Received: by 2002:a37:b53:: with SMTP id 80mr3361162qkl.91.1638322976174;
 Tue, 30 Nov 2021 17:42:56 -0800 (PST)
MIME-Version: 1.0
References: <CA+kUOa=_B-xnx2pGDTLYuN-w68cu8DzQ_UcyHckSWE7F_O+idg@mail.gmail.com>
In-Reply-To: <CA+kUOa=_B-xnx2pGDTLYuN-w68cu8DzQ_UcyHckSWE7F_O+idg@mail.gmail.com>
Date: Tue, 30 Nov 2021 18:42:42 -0700
Message-ID: <CAJ1FpuNF1r22NT_LiG8=VTYfNaO3YrLi-OydyynTu3YEpDdPMQ@mail.gmail.com>
Subject: Re: Cygwin packages with unnecessary __pycache__ directories
To: "Cygwin (cygwin@cygwin.com)" <cygwin@cygwin.com>
X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_00, DKIM_SIGNED,
 DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, FROM_LOCAL_NOVOWEL,
 HK_RANDOM_ENVFROM, HK_RANDOM_FROM, HTML_MESSAGE, RCVD_IN_DNSWL_NONE,
 SPF_HELO_NONE, SPF_PASS, TXREP autolearn=no autolearn_force=no version=3.4.4
X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on
 server2.sourceware.org
X-Content-Filtered-By: Mailman/MimeDel 2.1.29
X-BeenThere: cygwin@cygwin.com
X-Mailman-Version: 2.1.29
List-Id: General Cygwin discussions and problem reports <cygwin.cygwin.com>
List-Archive: <https://cygwin.com/pipermail/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-request@cygwin.com?subject=help>
List-Subscribe: <https://cygwin.com/mailman/listinfo/cygwin>,
 <mailto:cygwin-request@cygwin.com?subject=subscribe>
From: Doug Henderson via Cygwin <cygwin@cygwin.com>
Reply-To: Doug Henderson <djndnbvg@gmail.com>
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: "Cygwin" <cygwin-bounces+archive-cygwin=delorie.com@cygwin.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

-- 
Problem reports:      https://cygwin.com/problems.html
FAQ:                  https://cygwin.com/faq/
Documentation:        https://cygwin.com/docs.html
Unsubscribe info:     https://cygwin.com/ml/#unsubscribe-simple
