python*: preserve mtime of sysconfig data

This should prevent rebuilding things unnecessarily in the destroot
phase.
This commit is contained in:
Joshua Root
2020-08-20 18:40:48 +10:00
parent 9caaf0a969
commit f7e92413e6
7 changed files with 35 additions and 0 deletions
+5
View File
@@ -150,6 +150,9 @@ platform darwin {
post-build {
set buildlibdir [lindex [glob -directory ${worksrcpath}/build lib.*-*-*-${branch}] 0]
# preserve mtime of _sysconfigdata.py to avoid rebuilding things after changing it
set oldmtime [file mtime ${buildlibdir}/_sysconfigdata.py]
# change LINKFORSHARED to support dependents that incorrectly use it
system -W ${buildlibdir} "awk -F : \
\"/'LINKFORSHARED'/ {printf \\\"%s: '-L${framewdir}/lib/python${branch}/config\
@@ -161,6 +164,8 @@ platform darwin {
# remove -arch flags from the config
reinplace -E {s|-arch [a-z0-9_]+||g} \
${buildlibdir}/_sysconfigdata.py
file mtime ${buildlibdir}/_sysconfigdata.py $oldmtime
}
post-destroot {
+5
View File
@@ -116,6 +116,9 @@ platform darwin {
}
post-build {
set buildlibdir [lindex [glob -directory ${worksrcpath}/build lib.*-*-*-${branch}] 0]
# preserve mtime of sysconfig data file to avoid rebuilding things after changing it
set oldmtime [file mtime ${buildlibdir}/_sysconfigdata.py]
# Without this, LINKFORSHARED is set to
# ... $(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)
# (this becomes Python.framework/Versions/3.4/Python) which doesn't
@@ -136,6 +139,8 @@ platform darwin {
# also remove gettext overlinking
reinplace "s|-lintl||" \
${buildlibdir}/_sysconfigdata.py
file mtime ${buildlibdir}/_sysconfigdata.py $oldmtime
}
post-destroot {
foreach dir { Headers Resources Python Versions/Current } {
+5
View File
@@ -112,6 +112,9 @@ platform darwin {
}
post-build {
set buildlibdir [lindex [glob -directory ${worksrcpath}/build lib.*-*-*-${branch}] 0]
# preserve mtime of sysconfig data file to avoid rebuilding things after changing it
set oldmtime [file mtime ${buildlibdir}/_sysconfigdata.py]
# Without this, LINKFORSHARED is set to
# ... $(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)
# (this becomes Python.framework/Versions/3.5/Python) which doesn't
@@ -132,6 +135,8 @@ platform darwin {
# also remove gettext overlinking
reinplace "s|-lintl||" \
${buildlibdir}/_sysconfigdata.py
file mtime ${buildlibdir}/_sysconfigdata.py $oldmtime
}
post-destroot {
foreach dir { Headers Resources Python Versions/Current } {
+5
View File
@@ -104,6 +104,9 @@ platform darwin {
}
post-build {
set buildlibdir [lindex [glob -directory ${worksrcpath}/build lib.*-*-*-${branch}] 0]
# preserve mtime of sysconfig data file to avoid rebuilding things after changing it
set oldmtime [file mtime ${buildlibdir}/_sysconfigdata_m_darwin_darwin.py]
# Without this, LINKFORSHARED is set to
# ... $(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)
# (this becomes Python.framework/Versions/3.6/Python) which doesn't
@@ -124,6 +127,8 @@ platform darwin {
# also remove gettext overlinking
reinplace "s|-lintl||" \
${buildlibdir}/_sysconfigdata_m_darwin_darwin.py
file mtime ${buildlibdir}/_sysconfigdata_m_darwin_darwin.py $oldmtime
}
post-destroot {
foreach dir { Headers Resources Python Versions/Current } {
+5
View File
@@ -102,6 +102,9 @@ platform darwin {
post-build {
set buildlibdir [lindex [glob -directory ${worksrcpath}/build lib.*-*-*-${branch}] 0]
# preserve mtime of sysconfig data file to avoid rebuilding things after changing it
set oldmtime [file mtime ${buildlibdir}/_sysconfigdata_m_darwin_darwin.py]
# Without this, LINKFORSHARED is set to
# ... $(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)
# (this becomes Python.framework/Versions/3.7/Python) which doesn't
@@ -122,6 +125,8 @@ platform darwin {
# also remove gettext overlinking
reinplace "s|-lintl||" \
${buildlibdir}/_sysconfigdata_m_darwin_darwin.py
file mtime ${buildlibdir}/_sysconfigdata_m_darwin_darwin.py $oldmtime
}
post-destroot {
+5
View File
@@ -113,6 +113,9 @@ platform darwin {
post-build {
set buildlibdir [lindex [glob -directory ${worksrcpath}/build lib.*-*-*-${branch}] 0]
# preserve mtime of sysconfig data file to avoid rebuilding things after changing it
set oldmtime [file mtime ${buildlibdir}/_sysconfigdata__darwin_darwin.py]
# Without this, LINKFORSHARED is set to
# ... $(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)
# (this becomes Python.framework/Versions/3.8/Python) which doesn't
@@ -133,6 +136,8 @@ platform darwin {
# also remove gettext overlinking
reinplace "s|-lintl||" \
${buildlibdir}/_sysconfigdata__darwin_darwin.py
file mtime ${buildlibdir}/_sysconfigdata__darwin_darwin.py $oldmtime
}
post-destroot {
+5
View File
@@ -102,6 +102,9 @@ platform darwin {
post-build {
set buildlibdir [lindex [glob -directory ${worksrcpath}/build lib.*-*-*-${branch}] 0]
# preserve mtime of sysconfig data file to avoid rebuilding things after changing it
set oldmtime [file mtime ${buildlibdir}/_sysconfigdata__darwin_darwin.py]
# Without this, LINKFORSHARED is set to
# ... $(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)
# (this becomes Python.framework/Versions/3.9/Python) which doesn't
@@ -122,6 +125,8 @@ platform darwin {
# also remove gettext overlinking
reinplace "s|-lintl||" \
${buildlibdir}/_sysconfigdata__darwin_darwin.py
file mtime ${buildlibdir}/_sysconfigdata__darwin_darwin.py $oldmtime
}
post-destroot {