setup.py 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. import os, glob
  2. # Gather up all the files we need.
  3. files = ["src/getpointer.c","src/test.c"]
  4. files += glob.glob("src/NumPtr.i")
  5. ## pfiles = glob.glob("*.py")
  6. ## i = 0
  7. ## while i < len(pfiles):
  8. ## pfiles[i] = os.path.splitext(pfiles[i])[0]
  9. ## i += 1
  10. ## Distutils Script
  11. from distutils.core import setup, Extension
  12. # Some useful directories.
  13. from distutils.sysconfig import get_python_inc, get_python_lib
  14. python_incdir = os.path.join( get_python_inc(plat_specific=1) )
  15. python_libdir = os.path.join( get_python_lib(plat_specific=1) )
  16. setup(name="NumPtr",
  17. version="1.1",
  18. description="Numeric Pointer module",
  19. author="Rodrigo Caballero",
  20. author_email="rca@geosci.uchicago.edu",
  21. maintainer="Mike Steder",
  22. maintainer_email="steder@gmail.com",
  23. url="http://geosci.uchicago.edu/csc/numptr/",
  24. ext_modules = [Extension('_NumPtr',
  25. files,
  26. include_dirs=[python_incdir],
  27. library_dirs=[python_libdir],
  28. ),
  29. ],
  30. # Install these to their own directory
  31. # *I want to be able to remove them if I screw up this script
  32. # *"Sandboxing", if you will
  33. extra_path = 'NumPtr',
  34. package_dir={'':'lib'},
  35. py_modules=["NumPtr","test"],
  36. license="GNU GPL",
  37. )