mmgen-wallet/setup.py

106 lines
3.1 KiB
Python
Raw Normal View History

#!/usr/bin/env python
#
# mmgen = Multi-Mode GENerator, command-line Bitcoin cold storage solution
# Copyright (C)2013-2016 Philemon <mmgen-py@yandex.com>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
2016-08-22 14:20:46 +03:00
from distutils.core import setup,Extension
from distutils.command.build_ext import build_ext
import sys,os
2016-08-22 14:20:46 +03:00
from shutil import copy2
# install extension module in repository after building
class my_build_ext(build_ext):
def build_extension(self,ext):
build_ext.build_extension(self,ext)
ext_src = self.get_ext_fullpath(ext.name)
ext_dest = self.get_ext_filename(ext.name)
try: os.unlink(ext_dest)
except: pass
os.chmod(ext_src,0755)
print 'copying %s to %s' % (ext_src,ext_dest)
copy2(ext_src,ext_dest)
module1 = Extension(
name = 'mmgen.secp256k1',
sources = ['extmod/secp256k1mod.c'],
libraries = ['secp256k1'],
library_dirs = ['/usr/local/lib'],
runtime_library_dirs = ['/usr/local/lib'],
include_dirs = ['/usr/local/include'],
)
from mmgen.globalvars import version
setup(
name = 'mmgen',
2016-08-22 14:20:46 +03:00
description = 'A complete Bitcoin offline/online wallet solution for the command line',
version = version,
author = 'Philemon',
author_email = 'mmgen-py@yandex.com',
2013-11-30 23:10:01 +04:00
url = 'https://github.com/mmgen/mmgen',
license = 'GNU GPL v3',
2016-08-22 14:20:46 +03:00
platforms = 'Linux, MS Windows, Raspberry PI',
2016-06-25 19:30:30 +03:00
keywords = 'Bitcoin, wallet, cold storage, offline storage, open-source, command-line, Python, Bitcoin Core, bitcoind, hd, deterministic, hierarchical, secure, anonymous',
2016-08-22 14:20:46 +03:00
cmdclass = { 'build_ext': my_build_ext },
# disable building of secp256k1 extension module on Windows
ext_modules = [module1] if sys.platform[:5] == 'linux' else [],
py_modules = [
2013-12-17 12:20:28 +04:00
'mmgen.__init__',
'mmgen.addr',
'mmgen.bitcoin',
'mmgen.globalvars',
'mmgen.common',
2014-08-07 22:35:02 +04:00
'mmgen.crypto',
'mmgen.filename',
'mmgen.license',
'mmgen.mn_electrum',
'mmgen.mn_tirosh',
'mmgen.obj',
'mmgen.opts',
'mmgen.rpc',
'mmgen.seed',
2014-04-09 22:45:23 +04:00
'mmgen.term',
'mmgen.test',
'mmgen.tool',
'mmgen.tx',
'mmgen.tw',
2014-04-03 16:40:22 +04:00
'mmgen.util',
2013-12-17 12:20:28 +04:00
2014-08-07 22:35:02 +04:00
'mmgen.main',
'mmgen.main_addrgen',
'mmgen.main_addrimport',
'mmgen.main_tool',
'mmgen.main_txcreate',
'mmgen.main_txsend',
'mmgen.main_txsign',
2015-04-30 00:09:29 +03:00
'mmgen.main_wallet',
2014-08-07 22:35:02 +04:00
'mmgen.share.__init__',
'mmgen.share.Opts',
],
2014-04-01 00:08:12 +04:00
scripts=[
'mmgen-addrgen',
'mmgen-keygen',
'mmgen-addrimport',
'mmgen-passchg',
'mmgen-walletchk',
'mmgen-walletconv',
'mmgen-walletgen',
'mmgen-txcreate',
'mmgen-txsign',
2014-02-07 00:33:13 +04:00
'mmgen-txsend',
'mmgen-tool'
2013-12-17 12:20:28 +04:00
]
)