setup.py 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. # from glob import glob
  2. from os import path
  3. from setuptools import Extension, setup
  4. ROOT_DIR = path.dirname(path.realpath(__file__))
  5. MOD_DIR = path.join(ROOT_DIR, 'cpython')
  6. SRC_DIR = path.join(ROOT_DIR, 'src')
  7. INCL_DIR = path.join(ROOT_DIR, 'include')
  8. EXT_DIR = path.join(ROOT_DIR, 'ext')
  9. sources = (
  10. # glob(path.join(SRC_DIR, '*.c')) +
  11. # glob(path.join(MOD_DIR, '*.c')) +
  12. [
  13. path.join(EXT_DIR, 'xxHash', 'xxhash.c'),
  14. path.join(EXT_DIR, 'openldap', 'libraries', 'liblmdb', 'mdb.c'),
  15. path.join(EXT_DIR, 'openldap', 'libraries', 'liblmdb', 'midl.c'),
  16. ]
  17. )
  18. compile_args = ['-std=c99', '-DDEBUG', '-g3']
  19. setup(
  20. name="lsup_rdf",
  21. version="1.0a1",
  22. ext_modules=[
  23. Extension(
  24. "lsup_rdf.term",
  25. [
  26. path.join(EXT_DIR, 'xxHash', 'xxhash.c'),
  27. path.join(SRC_DIR, 'buffer.c'),
  28. path.join(SRC_DIR, 'term.c'),
  29. path.join(MOD_DIR, 'term_mod.c'),
  30. ],
  31. include_dirs=[INCL_DIR],
  32. libraries=['uuid'],
  33. extra_compile_args=compile_args,
  34. ),
  35. Extension(
  36. "lsup_rdf.triple",
  37. [
  38. path.join(EXT_DIR, 'xxHash', 'xxhash.c'),
  39. path.join(SRC_DIR, 'buffer.c'),
  40. path.join(SRC_DIR, 'term.c'),
  41. path.join(SRC_DIR, 'triple.c'),
  42. path.join(MOD_DIR, 'triple_mod.c'),
  43. ],
  44. include_dirs=[INCL_DIR],
  45. libraries=['uuid'],
  46. extra_compile_args=compile_args,
  47. ),
  48. ],
  49. )