2
0

setup.py 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. #! /usr/bin/env python
  2. import os, sys
  3. from distutils.core import setup
  4. from distutils.extension import Extension
  5. from subprocess import Popen, PIPE, CalledProcessError
  6. try:
  7. from Cython.Distutils import build_ext
  8. except ImportError:
  9. raise SystemExit("Requires Cython (http://cython.org/)")
  10. try:
  11. ode_cflags = Popen(["pkg-config", "--cflags", "ode"], stdout=PIPE).stdout.read().split()
  12. ode_libs = Popen(["pkg-config", "--libs", "ode"], stdout=PIPE).stdout.read().split()
  13. except (OSError, CalledProcessError):
  14. raise SystemExit("Failed to find ODE with 'pkg-config'. Please make sure that it is installed and available on your system path.")
  15. ode_ext = Extension("ode", ["ode.pyx"],
  16. extra_compile_args=ode_cflags,
  17. extra_link_args=ode_libs)
  18. if __name__ == "__main__":
  19. setup(
  20. name="Open Dynamics Engine",
  21. version="0.1",
  22. author="Gideon Klompje",
  23. # author_email="",
  24. # maintainer="",
  25. # maintainer_email="",
  26. url="http://www.ode.org",
  27. description="Bindings for the Open Dynamics Engine",
  28. long_description="""A free, industrial quality library for simulating articulated rigid body dynamics - for example ground vehicles, legged creatures, and moving objects in VR environments. It's fast, flexible & robust. Built-in collision detection.""",
  29. # download_url="https://opende.svn.sourceforge.net/svnroot/opende",
  30. # classifiers=[],
  31. # platforms=[],
  32. license="BSD License, GNU Lesser General Public License (LGPL)",
  33. cmdclass={"build_ext": build_ext}, ext_modules=[ode_ext])