From owner-freebsd-python@freebsd.org Mon Aug 31 20:35:23 2020 Return-Path: Delivered-To: freebsd-python@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id E59583CD87B for ; Mon, 31 Aug 2020 20:35:23 +0000 (UTC) (envelope-from wjw@digiware.nl) Received: from mailman.nyi.freebsd.org (unknown [127.0.1.3]) by mx1.freebsd.org (Postfix) with ESMTP id 4BgMQg4Nkqz45Bp for ; Mon, 31 Aug 2020 20:35:23 +0000 (UTC) (envelope-from wjw@digiware.nl) Received: by mailman.nyi.freebsd.org (Postfix) id 968F73CD87A; Mon, 31 Aug 2020 20:35:23 +0000 (UTC) Delivered-To: python@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 965853CD6F4 for ; Mon, 31 Aug 2020 20:35:23 +0000 (UTC) (envelope-from wjw@digiware.nl) Received: from router10G.digiware.nl (smtp.digiware.nl [176.74.240.9]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4BgMQg1pB0z44yy; Mon, 31 Aug 2020 20:35:22 +0000 (UTC) (envelope-from wjw@digiware.nl) Received: from router10g.digiware.nl (localhost.digiware.nl [127.0.0.1]) by router10G.digiware.nl (Postfix) with ESMTP id C7CC468FE7; Mon, 31 Aug 2020 22:35:20 +0200 (CEST) X-Virus-Scanned: amavisd-new at digiware.com Received: from router10G.digiware.nl ([127.0.0.1]) by router10g.digiware.nl (router10g.digiware.nl [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id tH9C4pqfUjrO; Mon, 31 Aug 2020 22:35:20 +0200 (CEST) Received: from [192.168.10.9] (vaio [192.168.10.9]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by router10G.digiware.nl (Postfix) with ESMTPSA id 3688C68FE6; Mon, 31 Aug 2020 22:35:20 +0200 (CEST) Subject: Re: How to package .pyc files To: Gleb Popov , python@freebsd.org References: From: Willem Jan Withagen Message-ID: Date: Mon, 31 Aug 2020 22:35:20 +0200 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:68.0) Gecko/20100101 Firefox/68.0 Thunderbird/68.12.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Content-Language: nl X-Rspamd-Queue-Id: 4BgMQg1pB0z44yy X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:28878, ipnet:176.74.224.0/19, country:NL] X-BeenThere: freebsd-python@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: FreeBSD-specific Python issues List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 31 Aug 2020 20:35:24 -0000 On 31-8-2020 20:46, Gleb Popov wrote: > On Mon, Aug 31, 2020 at 9:45 PM Gleb Popov wrote: > >> Hello. I'm fiddling with the devel/mercurial port ( >> https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=242463 ). The current >> Makefile results in >> >> Error: Orphaned: %%PYTHON_SITELIBDIR%%/mercurial/__modulepolicy__.py >> Error: Orphaned: >> %%PYTHON_SITELIBDIR%%/mercurial/__pycache__/__modulepolicy__.cpython-37.opt-1.pyc >> Error: Orphaned: >> %%PYTHON_SITELIBDIR%%/mercurial/__pycache__/__modulepolicy__.cpython-37.pyc >> >> errors. However, adding these files into pkg-plist seems a bit hard - it >> requires %%PYTHON_VER%% subst and a special treatment for python2 case. >> Which made me wonder - should these files be packaged at all? If yes, maybe >> there is some simple solution I'm missing? >> >> Thanks in advance. >> > Inspecting ${WRKDIR}/.PLIST* files after the build revealed that all other > .pyc files are correctly added to the plist. So, there is something special > about this __modulepolicy__.py file. I'm tempted to simply remove it on > post-install. Had the same in the ceph port. I just kicked them.... I've spent a long weekend getting things in, to no avail. And python will recreate them if needed. --WjW