Skip to content

Commit

Permalink
Attempt at improving setup.py for embedding Cython stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
iXce committed Jul 12, 2013
1 parent b8f549b commit 02d4145
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,10 @@
try:
from Cython.Build import cythonize
extensions = cythonize("printrun/gcoder_line.pyx")
from Cython.Distutils import build_ext
except ImportError:
extensions = None
build_ext = None

INSTALLED_FILES = "installed_files"

Expand Down Expand Up @@ -142,6 +144,12 @@ def run (self):
destpath = os.path.join("share", "pronterface", basedir)
data_files.append ((destpath, files))

cmdclass = {"uninstall" : uninstall,
"install" : install,
"install_data" : install_data}
if build_ext:
cmdclass['build_ext'] = build_ext

setup (
name = "Printrun",
description = "Host software for 3D printers",
Expand All @@ -151,8 +159,6 @@ def run (self):
data_files = data_files,
packages = ["printrun", "printrun.cairosvg", "printrun.server", "printrun.gl", "printrun.gl.libtatlin"],
scripts = ["pronsole.py", "pronterface.py", "plater.py", "printcore.py", "prontserve.py"],
cmdclass = {"uninstall" : uninstall,
"install" : install,
"install_data" : install_data},
cmdclass = cmdclass,
ext_modules = extensions,
)

0 comments on commit 02d4145

Please sign in to comment.