You've already forked macports-ports
mirror of
https://github.com/macports/macports-ports.git
synced 2026-07-12 18:20:25 -07:00
python*: preserve mtime of sysconfig data
This should prevent rebuilding things unnecessarily in the destroot phase.
This commit is contained in:
@@ -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 {
|
||||
|
||||
@@ -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 } {
|
||||
|
||||
@@ -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 } {
|
||||
|
||||
@@ -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 } {
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user