poly2tri/python/setup.py

44 lines
1.0 KiB
Python
Raw Normal View History

2009-11-12 02:06:09 +01:00
import sys
import os
from distutils.core import setup
from distutils.extension import Extension
from Cython.Distutils import build_ext
# Usage: python setup.py build_ext --i
2009-11-12 02:11:30 +01:00
version = '0.1'
2009-11-12 02:06:09 +01:00
2009-12-02 21:19:08 +01:00
sourcefiles = ['framework/framework.pyx', 'framework/predicates.c']
2009-11-12 02:06:09 +01:00
# Platform-dependent submodules
if sys.platform == 'win32':
# MS Windows
libs = ['glew32', 'glu32', 'glfw', 'opengl32']
elif sys.platform == 'darwin':
# Apple OSX
raise SystemError('OSX is unsupported in this version')
else:
# GNU/Linux, BSD, etc
libs = ['GLEW', 'GLU', 'glfw', 'GL']
mod_engine = Extension(
2009-11-12 02:11:30 +01:00
"framework",
2009-11-12 02:06:09 +01:00
sourcefiles,
libraries = libs,
language = 'c'
)
setup(
2009-11-12 02:11:30 +01:00
name = 'Poly2Tri',
2009-11-12 02:06:09 +01:00
version = version,
2009-11-12 02:11:30 +01:00
description = 'A 2D Polygon Triangulator',
author = 'Mason Green (zzzzrrr)',
2009-11-12 02:06:09 +01:00
author_email = '',
maintainer = '',
maintainer_email = '',
2009-11-12 02:11:30 +01:00
url = 'http://code.google.com/p/poly2tri/',
2009-11-12 02:06:09 +01:00
cmdclass = {'build_ext': build_ext},
ext_modules = [mod_engine],
)