-
Notifications
You must be signed in to change notification settings - Fork 89
/
setup.py
72 lines (59 loc) · 1.89 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
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
# -*- encoding: utf-8 -*-
import runpy
from setuptools import setup
from setuptools.extension import Extension
from Cython.Build import cythonize
import numpy
__version__ = runpy.run_path("mcubes/version.py")["__version__"]
def extensions():
numpy_include_dir = numpy.get_include()
mcubes_module = Extension(
"mcubes._mcubes",
[
"mcubes/src/_mcubes.pyx",
"mcubes/src/pywrapper.cpp",
"mcubes/src/marchingcubes.cpp"
],
language="c++",
extra_compile_args=['-std=c++11', '-Wall'],
include_dirs=[numpy_include_dir],
depends=[
"mcubes/src/marchingcubes.h",
"mcubes/src/pyarray_symbol.h",
"mcubes/src/pyarraymodule.h",
"mcubes/src/pywrapper.h"
],
define_macros=[("NPY_NO_DEPRECATED_API", "NPY_1_7_API_VERSION")],
)
return cythonize(
[mcubes_module],
language_level="3"
)
setup(
name="PyMCubes",
version=__version__,
description="Marching cubes for Python",
author="Pablo Márquez Neila",
author_email="pablo.marquez@unibe.ch",
url="https://github.com/pmneila/PyMCubes",
license="BSD 3-clause",
long_description="""
Marching cubes for Python
""",
classifiers=[
"Development Status :: 5 - Production/Stable",
"Environment :: Console",
"Intended Audience :: Developers",
"Intended Audience :: Science/Research",
"License :: OSI Approved :: BSD License",
"Natural Language :: English",
"Operating System :: OS Independent",
"Programming Language :: C++",
"Programming Language :: Python",
"Topic :: Multimedia :: Graphics :: 3D Modeling",
"Topic :: Scientific/Engineering :: Image Recognition",
],
packages=["mcubes"],
ext_modules=extensions(),
install_requires=['numpy>=1.21', 'scipy>=1.0.0'],
)