Skip to content

Commit a21aee0

Browse files
committed
Avoid rebuild loop
1 parent c7ccd09 commit a21aee0

File tree

1 file changed

+4
-2
lines changed
  • graalpython/com.oracle.graal.python.cext

1 file changed

+4
-2
lines changed

graalpython/com.oracle.graal.python.cext/setup.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,7 @@
3636
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
3737
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
3838
# SOFTWARE.
39-
40-
39+
import glob
4140
import sys
4241
import os
4342
import shutil
@@ -348,6 +347,9 @@ def build(self, extracted_dir=None):
348347
]
349348
system(' '.join(cmake_args), msg="Could not configure expat")
350349
system(f"make -C '{src_path}' install", msg="Could not build expat")
350+
# Touch the headers to avoid mx thinking it has to rebuild the C API every time
351+
for f in glob.glob(f"{os.path.abspath(self.include_install_dir)}/expat*.h"):
352+
os.utime(f)
351353
return self.lib_install_dir
352354

353355
def install(self, build_dir=None):

0 commit comments

Comments
 (0)