From owner-freebsd-python@freebsd.org Mon Aug 31 18:46:53 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 1DFCD3CA422 for ; Mon, 31 Aug 2020 18:46:53 +0000 (UTC) (envelope-from 6yearold@gmail.com) Received: from mailman.nyi.freebsd.org (unknown [127.0.1.3]) by mx1.freebsd.org (Postfix) with ESMTP id 4BgK1S6Pgbz3fWH for ; Mon, 31 Aug 2020 18:46:52 +0000 (UTC) (envelope-from 6yearold@gmail.com) Received: by mailman.nyi.freebsd.org (Postfix) id DBB623CA421; Mon, 31 Aug 2020 18:46:52 +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 DB7FD3CA420 for ; Mon, 31 Aug 2020 18:46:52 +0000 (UTC) (envelope-from 6yearold@gmail.com) Received: from mail-lj1-f182.google.com (mail-lj1-f182.google.com [209.85.208.182]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BgK1R5tDpz3flm for ; Mon, 31 Aug 2020 18:46:51 +0000 (UTC) (envelope-from 6yearold@gmail.com) Received: by mail-lj1-f182.google.com with SMTP id r13so7954969ljm.0 for ; Mon, 31 Aug 2020 11:46:51 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to; bh=gQ38sMJXRvezAQ56n9IlpYFOcJisFzviwVqdPq3qXTg=; b=qgo0xmeNDWDlVWFqkUCYL+J/oUymriiUPJ45QeNrQp6wwQY+6DmgpLM+jK0aTdzJ8N 5suqDJpLNQ9VH9hGUheZejQTE7TDW+6KzZLwHYIRFwFY5FIp09VetKwBTh7zvnUskIbc KU8twyt2ELsr54J1iSDSi8C+SSgmxQKLM0cZ4utU7itVsB7j4a/bkNT4vpwUZ6eWNC7R aXXTyktYIrHQR9lhQG8jprpDq9kabfPcOjS1wPbH9tOaL5G+KQTUlSBibS8jsi0O1MeM Ha03WVQ61c03b3Cknxo9Niy+dNtKPt6jpXJt0Gnn5AZlBoJ6imdcD3x9do2idTgfKDWn LGLg== X-Gm-Message-State: AOAM531zUW4wKC+9v+OqHHmSrmLCjzlXnXU1RbwOmyh759GaJTlVhsWy vWUvWoo9/M1XACQUF4M/3TP4LOCL2f8tLw== X-Google-Smtp-Source: ABdhPJz3Ck3L8rSB/3EbVs8eU8eNQbcUFhHUalOiPVYtBKLDYl0WzxEBEtjZUQy9xvrAcCv7PEVEhw== X-Received: by 2002:a2e:968c:: with SMTP id q12mr1316425lji.345.1598899610000; Mon, 31 Aug 2020 11:46:50 -0700 (PDT) Received: from mail-lf1-f49.google.com (mail-lf1-f49.google.com. [209.85.167.49]) by smtp.gmail.com with ESMTPSA id v15sm1727458ljh.115.2020.08.31.11.46.49 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 31 Aug 2020 11:46:49 -0700 (PDT) Received: by mail-lf1-f49.google.com with SMTP id j15so4083879lfg.7 for ; Mon, 31 Aug 2020 11:46:49 -0700 (PDT) X-Received: by 2002:a05:6512:6ca:: with SMTP id u10mr1249593lff.201.1598899609328; Mon, 31 Aug 2020 11:46:49 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Gleb Popov Date: Mon, 31 Aug 2020 22:46:23 +0400 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: How to package .pyc files To: python@freebsd.org X-Rspamd-Queue-Id: 4BgK1R5tDpz3flm X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=pass (mx1.freebsd.org: domain of 6yearold@gmail.com designates 209.85.208.182 as permitted sender) smtp.mailfrom=6yearold@gmail.com X-Spamd-Result: default: False [-2.40 / 15.00]; ARC_NA(0.00)[]; FREEMAIL_ENVFROM(0.00)[gmail.com]; RCVD_TLS_ALL(0.00)[]; FROM_HAS_DN(0.00)[]; R_SPF_ALLOW(-0.20)[+ip4:209.85.128.0/17:c]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; PREVIOUSLY_DELIVERED(0.00)[python@freebsd.org]; TO_DN_NONE(0.00)[]; RCPT_COUNT_ONE(0.00)[1]; NEURAL_HAM_LONG(-0.87)[-0.874]; RCVD_COUNT_THREE(0.00)[4]; RCVD_VIA_SMTP_AUTH(0.00)[]; NEURAL_HAM_SHORT(-0.83)[-0.828]; DMARC_NA(0.00)[freebsd.org]; RCVD_IN_DNSWL_NONE(0.00)[209.85.208.182:from]; NEURAL_HAM_MEDIUM(-0.70)[-0.702]; FORGED_SENDER(0.30)[arrowd@freebsd.org,6yearold@gmail.com]; RWL_MAILSPIKE_POSSIBLE(0.00)[209.85.208.182:from]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+,1:+,2:~]; ASN(0.00)[asn:15169, ipnet:209.85.128.0/17, country:US]; FROM_NEQ_ENVFROM(0.00)[arrowd@freebsd.org,6yearold@gmail.com]; MAILMAN_DEST(0.00)[python]; TO_DOM_EQ_FROM_DOM(0.00)[] Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.33 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 18:46:53 -0000 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. Any ideas?