From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-qk1-x72a.google.com (mail-qk1-x72a.google.com [IPv6:2607:f8b0:4864:20::72a]) by sourceware.org (Postfix) with ESMTPS id AB3863858403 for ; Wed, 1 Dec 2021 01:42:56 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org AB3863858403 Received: by mail-qk1-x72a.google.com with SMTP id q64so29144028qkd.5 for ; Tue, 30 Nov 2021 17:42:56 -0800 (PST) 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: In-Reply-To: From: Doug Henderson Date: Tue, 30 Nov 2021 18:42:42 -0700 Message-ID: Subject: Re: Cygwin packages with unnecessary __pycache__ directories To: "Cygwin (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 Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.29 X-BeenThere: cygwin@cygwin.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: General Cygwin discussions and problem reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Dec 2021 01:42:58 -0000 On Tue, 30 Nov 2021 at 10:45, Adam Dinwoodie 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