Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 5 Sep 2020 12:23:31 +0200
From:      Willem Jan Withagen <wjw@digiware.nl>
To:        koobs@FreeBSD.org, Gleb Popov <arrowd@freebsd.org>, python@freebsd.org
Subject:   Re: How to package .pyc files
Message-ID:  <dd7324fa-9a43-6eb2-056c-a700c74ac8a5@digiware.nl>
In-Reply-To: <9e886f31-e196-43c0-a59d-f506d3e7e620@digiware.nl>
References:  <CALH631m7qWS7aiLhi8kFeZx0pOTU7KFjy8CHoe1VJ2zqvtdZWA@mail.gmail.com> <CALH631n3GeN9Jios-kiODLcxq63ckmZLRngA63VR86UpANar3Q@mail.gmail.com> <836f4710-cfa6-911a-48be-246912c702c3@FreeBSD.org> <9e886f31-e196-43c0-a59d-f506d3e7e620@digiware.nl>

next in thread | previous in thread | raw e-mail | index | archive | help
On 2-9-2020 11:14, Willem Jan Withagen wrote:
> On 2-9-2020 06:46, Kubilay Kocak wrote:
>> On 1/09/2020 4:46 am, Gleb Popov wrote:
>>> On Mon, Aug 31, 2020 at 9:45 PM Gleb Popov <arrowd@freebsd.org> 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?
>>
>>
>> Yes, just add them to pkg-plist (while using USE_PYTHON=autoplist to 
>> handle the rest automatically)
>>
> I read that it also requires distutils, which overrules do-build and 
> do-install.
> But I'm wondering how that works together with CMake building.
> Fixing the works with python using the options would be nice, since it 
> is quite a hassle atm.
>
> Guess I'll have to try it to find out.

Have now: USE_PYTHON=     cython py3kplist autoplist

The magic seems to work.... Nice work.

The only (wierd) thing is that there is a lot of cython files named 
something like:
%%PYTHON_SITELIBDIR%%/ceph/deployment/__pycache__/drive_group.cpython-37.pyc

And replacing the 37 with %%PYTHON_VER%% does not seem to work, although 
those things
are closely matched to the python version.

--WjW





Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?dd7324fa-9a43-6eb2-056c-a700c74ac8a5>