setup.py 803 B

1234567891011121314151617181920212223
  1. # A sample distutils script to show to build your own
  2. # extension module which extends pywintypes or pythoncom.
  3. #
  4. # Use 'python setup.py build' to build this extension.
  5. import os
  6. from distutils.core import setup, Extension
  7. from distutils.sysconfig import get_python_lib
  8. sources = ["win32_extension.cpp"]
  9. # Specify the directory where the PyWin32 .h and .lib files are installed.
  10. # If you are doing a win32com extension, you will also need to add
  11. # win32com\Include and win32com\Libs.
  12. ext = Extension("win32_extension", sources,
  13. include_dirs = [os.path.join(get_python_lib(), "win32", "Include")],
  14. library_dirs = [os.path.join(get_python_lib(), "win32", "Libs")],
  15. )
  16. setup(
  17. name="win32 extension sample",
  18. version="0.1",
  19. ext_modules=[ext],
  20. )