forked from oleksandr-pavlyk/itt-python
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup.py
More file actions
32 lines (25 loc) · 1.06 KB
/
setup.py
File metadata and controls
32 lines (25 loc) · 1.06 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 distutils.core import setup, Extension
from distutils.command.build_ext import build_ext as _build_ext
import os
class build_ext(_build_ext):
_build_ext.user_options += [
('vtune=', None, 'specify VTune installation directory'),
]
def initialize_options(self):
_build_ext.initialize_options(self)
self.vtune = None
def finalize_options(self):
_build_ext.finalize_options(self)
assert self.vtune is not None, "Undefined VTune installation directory"
assert os.path.isdir(self.vtune), "VTune installation path not a directory"
self.include_dirs.append(os.path.join(self.vtune, "include"))
if self.link_objects is None:
self.link_objects = list()
self.link_objects.append(os.path.join(self.vtune, "lib64", "libittnotify.a"))
extension = Extension("itt",
sources = ["itt/itt-python.c"])
setup(name = 'itt',
version = '0.0.3',
description = 'ITT API bindings for Python',
ext_modules = [extension],
cmdclass={'build_ext': build_ext})