Skip to content

Commit

Permalink
Ports from distutils to setuptools
Browse files Browse the repository at this point in the history
  • Loading branch information
NanoNabla committed Aug 12, 2024
1 parent f5517e4 commit 591a3cb
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions scorep/subsystem.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,8 +88,9 @@ def generate(scorep_config, keep_files=False):
# setuptools, which replaces distutils, calls uname in python < 3.9 during distutils bootstraping.
# When LD_PRELOAD is set, this leads to preloading Score-P to uname, and crashes the later tracing.
# To avoid this, we need to do the distutils bootstrap as late as possible.
import distutils.ccompiler
cc = distutils.ccompiler.new_compiler()
# Setuptools does not support ccompiler.new_compiler https://github.com/pypa/setuptools/issues/4540
from setuptools._distutils.ccompiler import new_compiler
cc = new_compiler()

compiled_subsystem = cc.compile(
[temp_dir + "/scorep_init.c"], output_dir=temp_dir)
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import os
import sys
from distutils.core import setup, Extension
from setuptools import setup, Extension
import scorep.helper
from scorep.instrumenter import has_c_instrumenter

Expand Down

0 comments on commit 591a3cb

Please sign in to comment.