-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsetup.py
75 lines (67 loc) · 2.35 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
73
74
75
import os
from setuptools import setup, Extension
from setuptools.command.build_ext import build_ext
import sys
import setuptools
eigen_include_dir = "/usr/include/eigen3"
class get_pybind_include(object):
"""Helper class to determine the pybind11 include path
The purpose of this class is to postpone importing pybind11
until it is actually installed, so that the ``get_include()``
method can be invoked. """
def __str__(self):
import pybind11
return pybind11.get_include()
ext_modules = []
if not os.getenv('READTHEDOCS'):
ext_modules = [
Extension(
'voxelforge_cpp', # Ensure this matches the PYBIND11_MODULE macro
sources=[
'VoxelForge/voxel.cpp',
'VoxelForge/octree.cpp',
'VoxelForge/main.cpp',
],
include_dirs=[
get_pybind_include(),
# get_pybind_include(user=True),
eigen_include_dir,
'VoxelForge',
],
extra_compile_args=['-std=c++17'], # Use C++17 standard
libraries=['stdc++'], # Link against the C++ standard library
language='c++'
),
]
setup(
name='VoxelForge',
version='0.1.1',
author='Andrew Garcia',
author_email='[email protected]',
url='https://github.com/andrewrgarcia/VoxelForge',
description='A high-performance Python package for efficient voxel and mesh model creation, with C++ backend.',
long_description=open('README.md').read(),
long_description_content_type='text/markdown',
ext_modules=ext_modules,
cmdclass={'build_ext': build_ext},
packages=setuptools.find_packages(),
license='BSD-3-Clause', # Specify your license here
zip_safe=False,
install_requires=[
'pybind11>=2.6.0',
'torch'
],
classifiers=[
'Development Status :: 3 - Alpha',
'Intended Audience :: Developers',
'Topic :: Software Development :: Build Tools',
'License :: OSI Approved :: BSD License',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.7',
'Programming Language :: Python :: 3.8',
'Programming Language :: Python :: 3.9',
'Programming Language :: C++',
'Operating System :: OS Independent',
],
python_requires='>=3.7',
)