Skip to content

Commit

Permalink
Do not add a timestamp attribute to .pyc files
Browse files Browse the repository at this point in the history
  • Loading branch information
citrus-it committed Oct 4, 2023
1 parent f6b7c0f commit 19de7ff
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions lib/mog/global-transforms.mog
Original file line number Diff line number Diff line change
Expand Up @@ -47,13 +47,12 @@
<transform file -> default mode 0644>
<transform dir -> default mode 0755>

# The timestamp on any compiled python objects that are shipped in a package
# must always be newer than the corresponding source file, or python recompiles
# and the benefit of shipping the compiled version is lost, particularly if
# python is not running with privileges that can update the compiled version on
# disk.
# The timestamp of Python .py files is embedded in the associated compiled .pyc
# file. We must explicitly set the timstamp for these otherwise Python will
# recompile and the benefit of shipping the compiled version is lost,
# particularly if python is not running with privileges that can update the
# compiled version on disk.
<transform file path=.*\.py$ -> default timestamp $(TS_SRC)>
<transform file path=.*\.pyc$ -> default timestamp $(TS_OBJ)>

# Overrides
<transform file dir path=(lib|var)/svc/manifest/ -> set group sys>
Expand Down

0 comments on commit 19de7ff

Please sign in to comment.