Skip to content

Commit 5d2bd93

Browse files
author
Tristan
committed
added c extension to setup.py
1 parent 4dd3453 commit 5d2bd93

File tree

4 files changed

+14
-3
lines changed

4 files changed

+14
-3
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
*.DS_store
2+
*.so
23
*.egg
34
*.pyc
45
*.x3g

setup.py

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,14 @@
1-
from setuptools import setup, find_packages
1+
from setuptools import setup, Extension
2+
import numpy as np
3+
4+
SRC_DIR = "stl_tools"
5+
PACKAGES = [SRC_DIR]
6+
7+
ext_1 = Extension(SRC_DIR + ".cwrapped",
8+
[SRC_DIR + "/cwrapped.c"],
9+
libraries=[],
10+
include_dirs=[np.get_include()])
11+
EXTENSIONS = [ext_1]
212

313
setup(name='stl_tools',
414
version='0.2.2',
@@ -9,6 +19,7 @@
919
url='https://github.com/thearn/stl_tools',
1020
license='Apache 2.0',
1121
packages=['stl_tools'],
22+
ext_modules=EXTENSIONS,
1223
entry_points={
1324
'console_scripts':
1425
['image2stl=stl_tools.image2stl:image2stl']

stl_tools/__init__.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,2 @@
11
from .numpy2stl import numpy2stl
22
from .text2png import text2png, text2array
3-
from .cwrapped import tessellate

stl_tools/cwrapped.c

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)