Create pythonpath

This commit is contained in:
Mauricio Baeza 2019-09-07 18:25:42 -05:00
parent 0559111d33
commit 5b2870cc30
2 changed files with 11 additions and 3 deletions

View File

@ -130,7 +130,8 @@ EXTENSION = {
} }
# If used more libraries set python path in True and copy inside # ~ If used more libraries set python path in True and copy inside
# ~ If used easymacro pythonpath always is True
DIRS = { DIRS = {
'meta': 'META-INF', 'meta': 'META-INF',
'source': 'source', 'source': 'source',
@ -154,6 +155,7 @@ FILES = {
'rdb': f'X{NAME}.rdb', 'rdb': f'X{NAME}.rdb',
'update': f'{NAME.lower()}.update.xml', 'update': f'{NAME.lower()}.update.xml',
'addin': 'CalcAddIn.xcu', 'addin': 'CalcAddIn.xcu',
'easymacro': True,
} }

View File

@ -109,8 +109,8 @@ def _create_new_directories():
path = _join(path_source, DIRS['registration']) path = _join(path_source, DIRS['registration'])
_mkdir(path) _mkdir(path)
if DIRS['pythonpath']: if FILES['easymacro'] or DIRS['pythonpath']:
path = _join(path_source, DIRS['pythonpath']) path = _join(path_source, 'pythonpath')
_mkdir(path) _mkdir(path)
path = DIRS['files'] path = DIRS['files']
@ -137,6 +137,7 @@ def _create_new_files():
path = _join(path_source, FILES['py']) path = _join(path_source, FILES['py'])
_save(path, DATA['py']) _save(path, DATA['py'])
msg = 'Created files...' msg = 'Created files...'
log.info(msg) log.info(msg)
return return
@ -208,6 +209,11 @@ def _update_files():
target = _join(path_source, DIRS['images'], f) target = _join(path_source, DIRS['images'], f)
copyfile(source, target) copyfile(source, target)
if FILES['easymacro']:
source = 'easymacro.py'
target = _join(path_source, 'pythonpath', source)
copyfile(source, target)
path = _join(path_source, DIRS['meta'], FILES['manifest']) path = _join(path_source, DIRS['meta'], FILES['manifest'])
_save(path, DATA['manifest']) _save(path, DATA['manifest'])