forked from paulmelis/blender-ply-import
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsetup.py
27 lines (23 loc) · 735 Bytes
/
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
try:
import bpy
# We're running in Blender, hack sys.argv to make setup() below
# do the right thing using Blender's version of Python
import sys
sys.argv = ['setup.py', 'build_ext', '--inplace']
except ImportError:
# Running outside blender, work as regular setup.py script
pass
from setuptools import setup, Extension
import numpy
module1 = Extension('readply',
include_dirs = ['./rply', numpy.get_include()],
sources = ['readply.c', 'rply/rply.c']
)
setup(
name = 'readply',
author = 'Paul Melis',
author_email = '[email protected]',
version = '1.0',
description = 'Load PLY files into NumPy arrays, for faster Blender import',
ext_modules = [module1]
)