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 = {
'meta': 'META-INF',
'source': 'source',
@ -154,6 +155,7 @@ FILES = {
'rdb': f'X{NAME}.rdb',
'update': f'{NAME.lower()}.update.xml',
'addin': 'CalcAddIn.xcu',
'easymacro': True,
}

View File

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