setup.py: file permissions fix for data_files/*
This commit is contained in:
parent
456cc1f76c
commit
027a8430ac
4 changed files with 10 additions and 2 deletions
0
data_files/mnemonic.py
Executable file → Normal file
0
data_files/mnemonic.py
Executable file → Normal file
|
|
@ -116,7 +116,7 @@ class g(object):
|
|||
|
||||
# Global var sets user opt:
|
||||
global_sets_opt = ['minconf','seed_len','hash_preset','usr_randchars','debug',
|
||||
'tx_confs','tx_fee_adj','tx_fee','key_generator']
|
||||
'tx_confs','tx_fee_adj','tx_fee','key_generator']
|
||||
|
||||
keyconv_exec = 'keyconv'
|
||||
|
||||
|
|
|
|||
|
|
@ -58,6 +58,7 @@ def die_on_incompatible_opts(incompat_list):
|
|||
if len(bad) > 1:
|
||||
die(1,'Conflicting options: %s' % ', '.join([fmt_opt(b) for b in bad]))
|
||||
|
||||
# TODO - delete
|
||||
# def _typeconvert_from_dfl(key):
|
||||
#
|
||||
# global opt
|
||||
|
|
|
|||
9
setup.py
9
setup.py
|
|
@ -18,6 +18,7 @@
|
|||
|
||||
from distutils.core import setup,Extension
|
||||
from distutils.command.build_ext import build_ext
|
||||
from distutils.command.install_data import install_data
|
||||
import sys,os
|
||||
from shutil import copy2
|
||||
|
||||
|
|
@ -33,6 +34,12 @@ class my_build_ext(build_ext):
|
|||
print 'copying %s to %s' % (ext_src,ext_dest)
|
||||
copy2(ext_src,ext_dest)
|
||||
|
||||
class my_install_data(install_data):
|
||||
def run(self):
|
||||
for f in 'mmgen.cfg','mnemonic.py','mn_wordlist.c':
|
||||
os.chmod('data_files/'+f,0644)
|
||||
install_data.run(self)
|
||||
|
||||
module1 = Extension(
|
||||
name = 'mmgen.secp256k1',
|
||||
sources = ['extmod/secp256k1mod.c'],
|
||||
|
|
@ -53,7 +60,7 @@ setup(
|
|||
license = 'GNU GPL v3',
|
||||
platforms = 'Linux, MS Windows, Raspberry PI',
|
||||
keywords = 'Bitcoin, wallet, cold storage, offline storage, open-source, command-line, Python, Bitcoin Core, bitcoind, hd, deterministic, hierarchical, secure, anonymous',
|
||||
cmdclass = { 'build_ext': my_build_ext },
|
||||
cmdclass = { 'build_ext': my_build_ext, 'install_data': my_install_data },
|
||||
# disable building of secp256k1 extension module on Windows
|
||||
ext_modules = [module1] if sys.platform[:5] == 'linux' else [],
|
||||
data_files = [('share/mmgen', [
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue