forked from rapidsai/ucx-py
-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.py
45 lines (37 loc) · 1.29 KB
/
setup.py
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
33
34
35
36
37
38
39
40
41
42
43
44
45
# Copyright (c) 2018-2021, NVIDIA CORPORATION. All rights reserved.
# See file LICENSE for terms.
# This file is a copy of what is available in a Cython demo + some additions
from __future__ import absolute_import, print_function
import os
from distutils.sysconfig import get_config_var, get_python_inc
from Cython.Distutils.build_ext import new_build_ext
from setuptools import setup
from setuptools.extension import Extension
include_dirs = [os.path.dirname(get_python_inc())]
library_dirs = [get_config_var("LIBDIR")]
libraries = ["ucp", "uct", "ucm", "ucs"]
extra_compile_args = ["-std=c99", "-Werror"]
ext_modules = [
Extension(
"ucp._libs.ucx_api",
sources=["ucp/_libs/ucx_api.pyx", "ucp/_libs/src/c_util.c"],
depends=["ucp/_libs/src/c_util.h", "ucp/_libs/ucx_api_dep.pxd"],
include_dirs=include_dirs,
library_dirs=library_dirs,
libraries=libraries,
extra_compile_args=extra_compile_args,
),
Extension(
"ucp._libs.arr",
sources=["ucp/_libs/arr.pyx"],
include_dirs=include_dirs,
library_dirs=library_dirs,
libraries=libraries,
extra_compile_args=extra_compile_args,
),
]
setup(
ext_modules=ext_modules,
cmdclass={"build_ext": new_build_ext},
package_data={"ucp": ["VERSION"]},
)