setup.py 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. #!/usr/bin/env python
  2. import os
  3. from distutils.core import setup, Extension
  4. sources = [
  5. 'src/python/core.c',
  6. 'src/libethash/io.c',
  7. 'src/libethash/internal.c',
  8. 'src/libethash/sha3.c']
  9. if os.name == 'nt':
  10. sources += [
  11. 'src/libethash/util_win32.c',
  12. 'src/libethash/io_win32.c',
  13. 'src/libethash/mmap_win32.c',
  14. ]
  15. else:
  16. sources += [
  17. 'src/libethash/io_posix.c'
  18. ]
  19. depends = [
  20. 'src/libethash/ethash.h',
  21. 'src/libethash/compiler.h',
  22. 'src/libethash/data_sizes.h',
  23. 'src/libethash/endian.h',
  24. 'src/libethash/ethash.h',
  25. 'src/libethash/io.h',
  26. 'src/libethash/fnv.h',
  27. 'src/libethash/internal.h',
  28. 'src/libethash/sha3.h',
  29. 'src/libethash/util.h',
  30. ]
  31. pyethash = Extension('pyethash',
  32. sources=sources,
  33. depends=depends,
  34. extra_compile_args=["-Isrc/", "-std=gnu99", "-Wall"])
  35. setup(
  36. name='pyethash',
  37. author="Matthew Wampler-Doty",
  38. author_email="matthew.wampler.doty@gmail.com",
  39. license='GPL',
  40. version='0.1.23',
  41. url='https://github.com/ethereum/ethash',
  42. download_url='https://github.com/ethereum/ethash/tarball/v23',
  43. description=('Python wrappers for ethash, the ethereum proof of work'
  44. 'hashing function'),
  45. ext_modules=[pyethash],
  46. )