forked from matteo-ronchetti/torch-radon
-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.py
47 lines (43 loc) · 1.59 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
46
47
from setuptools import setup
from torch.utils.cpp_extension import BuildExtension, CUDAExtension
import os
from build import build
with open("README.md", "r") as fh:
long_description = fh.read()
cuda_home = os.getenv("CUDA_HOME", "/usr/local/cuda")
print(f"Using CUDA_HOME={cuda_home}")
build(cuda_home=cuda_home)
setup(name='torch_radon',
version="1.0.0",
author="Matteo Ronchetti",
author_email="mttronchetti@gmail.com",
description="Radon transform in PyTorch",
long_description=long_description,
long_description_content_type="text/markdown",
url="https://github.com/matteo-ronchetti/torch-radon",
packages=['torch_radon'],
package_dir={
'torch_radon': './torch_radon',
},
ext_modules=[
CUDAExtension('torch_radon_cuda', [os.path.abspath('src/pytorch.cpp')],
include_dirs=[os.path.abspath('include')],
library_dirs=[os.path.abspath("objs")],
libraries=["radon"],
extra_compile_args=["-static", "-static-libgcc", "-static-libstdc++"],
# strip debug symbols
extra_link_args=["-Wl,--strip-all"]
)
],
cmdclass={'build_ext': BuildExtension},
zip_safe=False,
classifiers=[
"Programming Language :: Python :: 3",
"Operating System :: POSIX :: Linux",
"License :: OSI Approved :: GNU General Public License v3 (GPLv3)"
],
install_requires=[
"scipy",
"alpha-transform"
],
)