setup.py 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104
  1. #!/usr/bin/env python
  2. #
  3. # mmgen = Multi-Mode GENerator, command-line Bitcoin cold storage solution
  4. # Copyright (C)2013-2016 Philemon <mmgen-py@yandex.com>
  5. #
  6. # This program is free software: you can redistribute it and/or modify
  7. # it under the terms of the GNU General Public License as published by
  8. # the Free Software Foundation, either version 3 of the License, or
  9. # (at your option) any later version.
  10. #
  11. # This program is distributed in the hope that it will be useful,
  12. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  13. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  14. # GNU General Public License for more details.
  15. #
  16. # You should have received a copy of the GNU General Public License
  17. # along with this program. If not, see <http://www.gnu.org/licenses/>.
  18. from distutils.core import setup,Extension
  19. from distutils.command.build_ext import build_ext
  20. import os
  21. from shutil import copy2
  22. # install extension module in repository after building
  23. class my_build_ext(build_ext):
  24. def build_extension(self,ext):
  25. build_ext.build_extension(self,ext)
  26. ext_src = self.get_ext_fullpath(ext.name)
  27. ext_dest = self.get_ext_filename(ext.name)
  28. try: os.unlink(ext_dest)
  29. except: pass
  30. os.chmod(ext_src,0755)
  31. print 'copying %s to %s' % (ext_src,ext_dest)
  32. copy2(ext_src,ext_dest)
  33. module1 = Extension(
  34. name = 'mmgen.secp256k1',
  35. sources = ['extmod/secp256k1mod.c'],
  36. libraries = ['secp256k1'],
  37. library_dirs = ['/usr/local/lib'],
  38. runtime_library_dirs = ['/usr/local/lib'],
  39. include_dirs = ['/usr/local/include'],
  40. )
  41. setup(
  42. name = 'mmgen',
  43. description = 'A complete Bitcoin offline/online wallet solution for the command line',
  44. version = '0.8.6rc1',
  45. author = 'Philemon',
  46. author_email = 'mmgen-py@yandex.com',
  47. url = 'https://github.com/mmgen/mmgen',
  48. license = 'GNU GPL v3',
  49. platforms = 'Linux, MS Windows, Raspberry PI',
  50. keywords = 'Bitcoin, wallet, cold storage, offline storage, open-source, command-line, Python, Bitcoin Core, bitcoind, hd, deterministic, hierarchical, secure, anonymous',
  51. cmdclass = { 'build_ext': my_build_ext },
  52. ext_modules = [module1],
  53. py_modules = [
  54. 'mmgen.__init__',
  55. 'mmgen.addr',
  56. 'mmgen.bitcoin',
  57. 'mmgen.globalvars',
  58. 'mmgen.common',
  59. 'mmgen.crypto',
  60. 'mmgen.filename',
  61. 'mmgen.license',
  62. 'mmgen.mn_electrum',
  63. 'mmgen.mn_tirosh',
  64. 'mmgen.obj',
  65. 'mmgen.opts',
  66. 'mmgen.rpc',
  67. 'mmgen.seed',
  68. 'mmgen.term',
  69. 'mmgen.test',
  70. 'mmgen.tool',
  71. 'mmgen.tx',
  72. 'mmgen.tw',
  73. 'mmgen.util',
  74. 'mmgen.main',
  75. 'mmgen.main_addrgen',
  76. 'mmgen.main_addrimport',
  77. 'mmgen.main_tool',
  78. 'mmgen.main_txcreate',
  79. 'mmgen.main_txsend',
  80. 'mmgen.main_txsign',
  81. 'mmgen.main_wallet',
  82. 'mmgen.share.__init__',
  83. 'mmgen.share.Opts',
  84. ],
  85. scripts=[
  86. 'mmgen-addrgen',
  87. 'mmgen-keygen',
  88. 'mmgen-addrimport',
  89. 'mmgen-passchg',
  90. 'mmgen-walletchk',
  91. 'mmgen-walletconv',
  92. 'mmgen-walletgen',
  93. 'mmgen-txcreate',
  94. 'mmgen-txsign',
  95. 'mmgen-txsend',
  96. 'mmgen-tool',
  97. ]
  98. )