Bugfixes
This commit is contained in:
parent
1bff2ea168
commit
4e24662d90
4
cpl.json
4
cpl.json
@ -31,7 +31,9 @@
|
||||
"Main": "cpl_cli.main",
|
||||
"EntryPoint": "cpl",
|
||||
"IncludePackageData": "False",
|
||||
"Included": [],
|
||||
"Included": [
|
||||
"*/templates"
|
||||
],
|
||||
"Excluded": [
|
||||
"*/__pycache__",
|
||||
"*/logs",
|
||||
|
@ -72,12 +72,22 @@ class Publisher(PublisherABC):
|
||||
Console.error(f'{e}')
|
||||
exit()
|
||||
|
||||
def _is_path_included(self, path: str) -> bool:
|
||||
for included in self._build_settings.included:
|
||||
if included.startswith('*'):
|
||||
included = included.replace('*', '')
|
||||
|
||||
if included in path and path not in self._build_settings.excluded:
|
||||
return True
|
||||
|
||||
return False
|
||||
|
||||
def _is_path_excluded(self, path: str) -> bool:
|
||||
for excluded in self._build_settings.excluded:
|
||||
if excluded.startswith('*'):
|
||||
excluded = excluded.replace('*', '')
|
||||
|
||||
if excluded in path and path not in self._build_settings.included:
|
||||
if excluded in path and not self._is_path_included(path):
|
||||
return True
|
||||
|
||||
return False
|
||||
@ -96,8 +106,8 @@ class Publisher(PublisherABC):
|
||||
elif os.path.isfile(rel_path):
|
||||
self._included_files.append(rel_path)
|
||||
|
||||
else:
|
||||
Console.error(f'Path not found: {rel_path}')
|
||||
#else:
|
||||
# Console.error(f'Path not found: {rel_path}')
|
||||
|
||||
for r, d, f in os.walk(self._build_settings.source_path):
|
||||
for file in f:
|
||||
@ -304,4 +314,4 @@ class Publisher(PublisherABC):
|
||||
Console.spinner('Generating setup_template.py:', self._create_setup)
|
||||
Console.write_line('Running setup_template.py:\n')
|
||||
self._run_setup()
|
||||
Console.spinner('Cleaning dist path:', self._clean_dist_files)
|
||||
# Console.spinner('Cleaning dist path:', self._clean_dist_files)
|
||||
|
@ -11,7 +11,7 @@ sh-edraft Common Python library
|
||||
|
||||
"""
|
||||
|
||||
__title__ = 'cpl_cli.templates.new.console_old.src.tests'
|
||||
__title__ = 'cpl_cli.templates.new.console.src.tests'
|
||||
__author__ = 'Sven Heidemann'
|
||||
__license__ = 'MIT'
|
||||
__copyright__ = 'Copyright (c) 2020 - 2021 sh-edraft.de'
|
||||
|
Loading…
Reference in New Issue
Block a user