Skip to content

Commit

Permalink
Fix format
Browse files Browse the repository at this point in the history
  • Loading branch information
jordap committed Jul 11, 2024
1 parent 07b7aa6 commit 64264cc
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
1 change: 1 addition & 0 deletions omnistat/collector_rocprofiler.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@

from collector_base import Collector


class rocprofiler(Collector):
def __init__(self, names):
logging.debug("Initializing rocprofiler data collector")
Expand Down
2 changes: 1 addition & 1 deletion omnistat/monitor.py
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ def initMetrics(self):
if self.runtimeConfig["collector_enable_rocprofiler"]:
from omnistat.collector_rocprofiler import rocprofiler

self.__collectors.append(rocprofiler(self.runtimeConfig['rocprofiler_metrics']))
self.__collectors.append(rocprofiler(self.runtimeConfig["rocprofiler_metrics"]))

# Initialize all metrics
for collector in self.__collectors:
Expand Down
11 changes: 5 additions & 6 deletions pyrocprofiler/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,13 @@
from setuptools.command.build_ext import build_ext
import os, sys, subprocess, platform


class CMakeExtension(Extension):
def __init__(self, name, cmake_lists_dir=".", **kwa):
Extension.__init__(self, name, sources=[], **kwa)
self.cmake_lists_dir = os.path.abspath(cmake_lists_dir)


class CMakeBuild(build_ext):
def build_extensions(self):
try:
Expand All @@ -22,20 +24,17 @@ def build_extensions(self):
cmake_args = [
"-DCMAKE_BUILD_TYPE=%s" % cfg,
"-DCMAKE_LIBRARY_OUTPUT_DIRECTORY_{}={}".format(cfg.upper(), extdir),
"-DCMAKE_ARCHIVE_OUTPUT_DIRECTORY_{}={}".format(
cfg.upper(), self.build_temp
),
"-DCMAKE_ARCHIVE_OUTPUT_DIRECTORY_{}={}".format(cfg.upper(), self.build_temp),
"-DPYTHON_EXECUTABLE={}".format(sys.executable),
]

if not os.path.exists(self.build_temp):
os.makedirs(self.build_temp)

subprocess.check_call(
["cmake", ext.cmake_lists_dir] + cmake_args, cwd=self.build_temp
)
subprocess.check_call(["cmake", ext.cmake_lists_dir] + cmake_args, cwd=self.build_temp)
subprocess.check_call(["cmake", "--build", "."], cwd=self.build_temp)


setup(
name="pyrocprofiler",
version="0.1",
Expand Down

0 comments on commit 64264cc

Please sign in to comment.