setup.py 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. #!/usr/bin/env python3
  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. import os
  19. from distutils.core import setup
  20. from distutils.command.install_data import install_data
  21. from mmgen.globalvars import g
  22. class my_install_data(install_data):
  23. def run(self):
  24. sdir = os.path.join('data_files','audio')
  25. for f in [e for e in os.listdir(sdir) if e[-4:] == '.wav']:
  26. os.chmod(os.path.join(sdir,f),0o644)
  27. install_data.run(self)
  28. setup(
  29. name = 'mmgen-node-tools',
  30. description = 'Optional tools for the MMGen wallet system',
  31. version = g.version,
  32. author = g.author,
  33. author_email = g.email,
  34. url = g.proj_url,
  35. license = 'GNU GPL v3',
  36. platforms = 'Linux, MS Windows, Raspberry Pi',
  37. keywords = g.keywords,
  38. packages = ['mmgen.node_tools'],
  39. scripts = [
  40. 'mmnode-blocks-info',
  41. 'mmnode-feeview',
  42. 'mmnode-halving-calculator',
  43. 'mmnode-netrate',
  44. 'mmnode-peerblocks',
  45. 'mmnode-play-sound',
  46. ],
  47. data_files = [('share/mmgen/node_tools/audio', [
  48. 'data_files/audio/ringtone.wav', # source files must have 0644 mode
  49. 'data_files/audio/Positive.wav',
  50. 'data_files/audio/Rhodes.wav',
  51. 'data_files/audio/Counterpoint.wav'
  52. ])
  53. ],
  54. cmdclass = { 'install_data': my_install_data },
  55. )