-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathsetup.py
More file actions
33 lines (29 loc) · 1.1 KB
/
Copy pathsetup.py
File metadata and controls
33 lines (29 loc) · 1.1 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
from setuptools import setup, Extension
from pybind11.setup_helpers import Pybind11Extension, build_ext
#from pybind11.setup_helpers import Pybind11Extension
import pybind11
# Define the extension module
ext_modules = [
Extension(
'profile_util', # Module name
['src/profile_util_pyinterface.cpp', 'src/profile_util.cpp', 'src/mem_util.cpp', 'src/thread_affinity_util.cpp', 'src/time_util.cpp', 'src/pybind11_git_revision.cpp'], # Source file(s)
include_dirs=[
pybind11.get_include(), # Include Pybind11 headers
'include/'
],
language='c++', # Specify the language
extra_compile_args=['-std=c++20', '-O3'], # Add other compiler flags if needed
depends = ['include/profile_util.h', 'include/profile_util_gpu.h']
),
]
# Define the setup
setup(
name='profile_util',
version='0.1',
author='Pascal Jahan Elahi',
author_email='pascaljelahi@gmail.com',
description='A simple profile_util Pybind11 module',
ext_modules=ext_modules,
# Specify the pybind11 build extension
cmdclass={'build_ext': build_ext},
)