Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 13 Dec 2016 21:59:32 +1100
From:      Kubilay Kocak <koobs@FreeBSD.org>
To:        Kyle Evans <kevans91@ksu.edu>
Cc:        Marcus von Appen <mva@freebsd.org>, python@freebsd.org
Subject:   Re: lang/python3* ports, __pycache__ included
Message-ID:  <fef69799-bee5-d836-70cf-d928707ccfdb@FreeBSD.org>
In-Reply-To: <CACNAnaF1=D-P0ZTbZP7Wt=BBoWwmDnwe=-mRmz%2Bga_H__zk4-g@mail.gmail.com>
References:  <CACNAnaEueRdkEuuf9MmZwqqaz8HB6hSW14a_VmqZ9%2B8ub3235g@mail.gmail.com> <ema74d97cd-d111-4740-909d-419a4d12c8a6@hora> <CACNAnaF1=D-P0ZTbZP7Wt=BBoWwmDnwe=-mRmz%2Bga_H__zk4-g@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On 13/12/2016 9:13 AM, Kyle Evans wrote:
> On Mon, Dec 12, 2016 at 3:51 PM, Marcus von Appen <mva@freebsd.org>
> wrote:
>> Hi Kyle,
>> 
>>> [snip]
>> 
>> this is a python3 specific change in how python deals with
>> optimized bytecode files. We ship .pyc/.pyo files for python2 ports
>> and __pycache__ bits for python3, so there is no change in
>> packaging behaviour except from "sticking to the default".
> 
> Ahh, ok, that makes sense.
> 
>>> [snip]
>> 
>> Few years ago, we already had an idea about that. You can read it
>> at https://wiki.freebsd.org/Python/CompiledPackages. If space is a
>> major concern for you (but a small drawback in runtime performance
>> is not), let us know, so we put it up on the agenda (again).
> 
> In some of my environments, it definitely is a concern. In one or
> two applications, I have limited disk size to work with but a lot of 
> memory to otherwise operate on -- so these things being created at 
> runtime isn't much issue, but having them on disk tends towards 
> problematic.
> 
> Given that this is not a very 'black or white' problem (as evident 
> from the CompiledPackages wiki page), I will strip these entries
> from the pkg-plist myself for the time being and maybe work on
> finding time to assist in a better solution for the whole.

Note that they will be re-created on import unless one overrides the
default for the interpreter to produce these optimization files.

I'm not sure (or cant remember) if there is a good way to disable this
on a global or system-wide basis.

I second Marcus's comment that being able to not have to package
optimized files and have them be created (optionally?) at package
post-install time instead, would be a good thing overall TM.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?fef69799-bee5-d836-70cf-d928707ccfdb>