Turn off removing *.pyc file from /app

Alexander Larsson alexl at redhat.com
Mon Jun 5 12:07:18 UTC 2017


On Sun, 2017-06-04 at 18:32 +0300, Юрий Андреев wrote:
> Hello,
> I'm trying install python module (http://www.zephy-science.com/ZephyD
> OC/INSTALL/index.html#/step-9), to work with this module I need to
> use .pyc files, which are removed from /app folder after installation
> is finished.
> The problem is that all *.pyc files are removed from the directory. 
> How  can I keep the *.pyc files in folder after flatpak-builder
> finishes installation process?

That is weird. flatpak-builder shouldn't normally remove .pyc files. It
does however have special handling of them, because the pyc files have
a built-in timestamp that has to match the *.py file, and since flatpak
uses ostree, and ostree stores all files with a special timestamp, we
need to update the timestamp in the *.pyc file.

We do however remove the pyc file if the timestamp of it doesn't match
the expected timestamp for the py file. Maybe this is what is
happening. Do you have the full build log?

-- 
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
 Alexander Larsson                                            Red Hat, Inc 
       alexl at redhat.com            alexander.larsson at gmail.com 
He's a war-weary native American gentleman spy with acid for blood. She's 
a violent psychic opera singer in the wrong place at the wrong time. They 
fight crime! 



More information about the xdg-app mailing list