File: setup.py

package info (click to toggle)
invesalius 3.1.99992-3
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, buster, sid
  • size: 86,416 kB
  • sloc: python: 28,433; makefile: 56
file content (97 lines) | stat: -rw-r--r-- 5,119 bytes parent folder | download | duplicates (2)
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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
from distutils.core import setup
from distutils.extension import Extension
from Cython.Distutils import build_ext
from Cython.Build import cythonize

import os
import sys

import numpy

if sys.platform.startswith('linux'):
    setup(
        cmdclass = {'build_ext': build_ext},
        ext_modules = cythonize([ Extension("invesalius_cy.mips", ["invesalius_cy/mips.pyx"],
                                  include_dirs =  [numpy.get_include()],
                                  extra_compile_args=['-fopenmp'],
                                  extra_link_args=['-fopenmp']),

                       Extension("invesalius_cy.interpolation", ["invesalius_cy/interpolation.pyx"],
                                 include_dirs=[numpy.get_include()],
                                 extra_compile_args=['-fopenmp',],
                                 extra_link_args=['-fopenmp',]),

                       Extension("invesalius_cy.transforms", ["invesalius_cy/transforms.pyx"],
                                 include_dirs=[numpy.get_include()],
                                 extra_compile_args=['-fopenmp',],
                                 extra_link_args=['-fopenmp',]),

                       Extension("invesalius_cy.floodfill", ["invesalius_cy/floodfill.pyx"],
                                 include_dirs=[numpy.get_include()],
                                 language='c++',),

                       Extension("invesalius_cy.cy_mesh", ["invesalius_cy/cy_mesh.pyx"],
                                 include_dirs=[numpy.get_include()],
                                 extra_compile_args=['-fopenmp', '-std=c++11'],
                                 extra_link_args=['-fopenmp', '-std=c++11'],
                                 language='c++',),
                       ])
         )

elif sys.platform == 'win32':
    setup(
        cmdclass = {'build_ext': build_ext},
        ext_modules = cythonize([ Extension("invesalius.data.mips", ["invesalius/data/mips.pyx"],
                                            include_dirs =  [numpy.get_include()],
                                            extra_compile_args=['/openmp'],),

                                 Extension("invesalius.data.interpolation", ["invesalius/data/interpolation.pyx"],
                                           include_dirs=[numpy.get_include()],
                                           extra_compile_args=['/openmp'],),

                                 Extension("invesalius.data.transforms", ["invesalius/data/transforms.pyx"],
                                           include_dirs=[numpy.get_include()],
                                           extra_compile_args=['/openmp'],),

                                 Extension("invesalius.data.floodfill", ["invesalius/data/floodfill.pyx"],
                                           include_dirs=[numpy.get_include()],
                                           language='c++',),

                                 Extension("invesalius.data.cy_mesh", ["invesalius/data/cy_mesh.pyx"],
                                           include_dirs=[numpy.get_include()],
                                           extra_compile_args=['/openmp',],
                                           language='c++',),
                                 ])
    )

else:
    setup(
        packages=["invesalius", ],
        cmdclass = {'build_ext': build_ext},
        ext_modules = cythonize([Extension("invesalius.data.mips", ["invesalius/data/mips.pyx"],
                                           include_dirs =  [numpy.get_include()],
                                           extra_compile_args=['-fopenmp',],
                                           extra_link_args=['-fopenmp',]),

                                 Extension("invesalius.data.interpolation", ["invesalius/data/interpolation.pyx"],
                                           include_dirs=[numpy.get_include()],
                                           extra_compile_args=['-fopenmp',],
                                           extra_link_args=['-fopenmp',]),

                                 Extension("invesalius.data.transforms", ["invesalius/data/transforms.pyx"],
                                           include_dirs=[numpy.get_include()],
                                           extra_compile_args=['-fopenmp',],
                                           extra_link_args=['-fopenmp',]),

                                 Extension("invesalius.data.floodfill", ["invesalius/data/floodfill.pyx"],
                                           include_dirs=[numpy.get_include()],
                                           language='c++',),

                                 Extension("invesalius.data.cy_mesh", ["invesalius/data/cy_mesh.pyx"],
                                           include_dirs=[numpy.get_include()],
                                           extra_compile_args=['-fopenmp', '-std=c++11'],
                                           extra_link_args=['-fopenmp', '-std=c++11'],
                                           language='c++',),

                                 ])
    )