2021.4 #19

Merged
edraft merged 237 commits from 2021.4 into master 2021-04-01 10:13:33 +02:00
28 changed files with 36 additions and 31 deletions
Showing only changes of commit 5008594c27 - Show all commits

View File

@ -15,7 +15,7 @@ __title__ = 'sh_cpl.cpl'
__author__ = 'Sven Heidemann' __author__ = 'Sven Heidemann'
__license__ = 'MIT' __license__ = 'MIT'
__copyright__ = 'Copyright (c) 2020 - 2021 sh-edraft.de' __copyright__ = 'Copyright (c) 2020 - 2021 sh-edraft.de'
__version__ = '2021.04.01' __version__ = '2021.4.1'
from collections import namedtuple from collections import namedtuple

View File

@ -15,7 +15,7 @@ __title__ = 'cpl.application'
__author__ = 'Sven Heidemann' __author__ = 'Sven Heidemann'
__license__ = 'MIT' __license__ = 'MIT'
__copyright__ = 'Copyright (c) 2020 - 2021 sh-edraft.de' __copyright__ = 'Copyright (c) 2020 - 2021 sh-edraft.de'
__version__ = '2021.04.01' __version__ = '2021.4.1'
from collections import namedtuple from collections import namedtuple

View File

@ -15,7 +15,7 @@ __title__ = 'cpl.configuration'
__author__ = 'Sven Heidemann' __author__ = 'Sven Heidemann'
__license__ = 'MIT' __license__ = 'MIT'
__copyright__ = 'Copyright (c) 2020 - 2021 sh-edraft.de' __copyright__ = 'Copyright (c) 2020 - 2021 sh-edraft.de'
__version__ = '2021.04.01' __version__ = '2021.4.1'
from collections import namedtuple from collections import namedtuple

View File

@ -15,7 +15,7 @@ __title__ = 'cpl.console'
__author__ = 'Sven Heidemann' __author__ = 'Sven Heidemann'
__license__ = 'MIT' __license__ = 'MIT'
__copyright__ = 'Copyright (c) 2020 - 2021 sh-edraft.de' __copyright__ = 'Copyright (c) 2020 - 2021 sh-edraft.de'
__version__ = '2021.04.01' __version__ = '2021.4.1'
from collections import namedtuple from collections import namedtuple

View File

@ -15,7 +15,7 @@ __title__ = 'cpl.database'
__author__ = 'Sven Heidemann' __author__ = 'Sven Heidemann'
__license__ = 'MIT' __license__ = 'MIT'
__copyright__ = 'Copyright (c) 2020 - 2021 sh-edraft.de' __copyright__ = 'Copyright (c) 2020 - 2021 sh-edraft.de'
__version__ = '2021.04.01' __version__ = '2021.4.1'
from collections import namedtuple from collections import namedtuple

View File

@ -15,7 +15,7 @@ __title__ = 'cpl.database.connection'
__author__ = 'Sven Heidemann' __author__ = 'Sven Heidemann'
__license__ = 'MIT' __license__ = 'MIT'
__copyright__ = 'Copyright (c) 2020 - 2021 sh-edraft.de' __copyright__ = 'Copyright (c) 2020 - 2021 sh-edraft.de'
__version__ = '2021.04.01' __version__ = '2021.4.1'
from collections import namedtuple from collections import namedtuple

View File

@ -15,7 +15,7 @@ __title__ = 'cpl.database.context'
__author__ = 'Sven Heidemann' __author__ = 'Sven Heidemann'
__license__ = 'MIT' __license__ = 'MIT'
__copyright__ = 'Copyright (c) 2020 - 2021 sh-edraft.de' __copyright__ = 'Copyright (c) 2020 - 2021 sh-edraft.de'
__version__ = '2021.04.01' __version__ = '2021.4.1'
from collections import namedtuple from collections import namedtuple

View File

@ -15,7 +15,7 @@ __title__ = 'cpl.dependency_injection'
__author__ = 'Sven Heidemann' __author__ = 'Sven Heidemann'
__license__ = 'MIT' __license__ = 'MIT'
__copyright__ = 'Copyright (c) 2020 - 2021 sh-edraft.de' __copyright__ = 'Copyright (c) 2020 - 2021 sh-edraft.de'
__version__ = '2021.04.01' __version__ = '2021.4.1'
from collections import namedtuple from collections import namedtuple

View File

@ -15,7 +15,7 @@ __title__ = 'cpl.environment'
__author__ = 'Sven Heidemann' __author__ = 'Sven Heidemann'
__license__ = 'MIT' __license__ = 'MIT'
__copyright__ = 'Copyright (c) 2020 - 2021 sh-edraft.de' __copyright__ = 'Copyright (c) 2020 - 2021 sh-edraft.de'
__version__ = '2021.04.01' __version__ = '2021.4.1'
from collections import namedtuple from collections import namedtuple

View File

@ -15,7 +15,7 @@ __title__ = 'cpl.logging'
__author__ = 'Sven Heidemann' __author__ = 'Sven Heidemann'
__license__ = 'MIT' __license__ = 'MIT'
__copyright__ = 'Copyright (c) 2020 - 2021 sh-edraft.de' __copyright__ = 'Copyright (c) 2020 - 2021 sh-edraft.de'
__version__ = '2021.04.01' __version__ = '2021.4.1'
from collections import namedtuple from collections import namedtuple

View File

@ -15,7 +15,7 @@ __title__ = 'cpl.mailing'
__author__ = 'Sven Heidemann' __author__ = 'Sven Heidemann'
__license__ = 'MIT' __license__ = 'MIT'
__copyright__ = 'Copyright (c) 2020 - 2021 sh-edraft.de' __copyright__ = 'Copyright (c) 2020 - 2021 sh-edraft.de'
__version__ = '2021.04.01' __version__ = '2021.4.1'
from collections import namedtuple from collections import namedtuple

View File

@ -15,7 +15,7 @@ __title__ = 'cpl.time'
__author__ = 'Sven Heidemann' __author__ = 'Sven Heidemann'
__license__ = 'MIT' __license__ = 'MIT'
__copyright__ = 'Copyright (c) 2020 - 2021 sh-edraft.de' __copyright__ = 'Copyright (c) 2020 - 2021 sh-edraft.de'
__version__ = '2021.04.01' __version__ = '2021.4.1'
from collections import namedtuple from collections import namedtuple

View File

@ -15,7 +15,7 @@ __title__ = 'cpl.utils'
__author__ = 'Sven Heidemann' __author__ = 'Sven Heidemann'
__license__ = 'MIT' __license__ = 'MIT'
__copyright__ = 'Copyright (c) 2020 - 2021 sh-edraft.de' __copyright__ = 'Copyright (c) 2020 - 2021 sh-edraft.de'
__version__ = '2021.04.01' __version__ = '2021.4.1'
from collections import namedtuple from collections import namedtuple

View File

@ -15,7 +15,7 @@ __title__ = 'sh_cpl.cpl_cli'
__author__ = 'Sven Heidemann' __author__ = 'Sven Heidemann'
__license__ = 'MIT' __license__ = 'MIT'
__copyright__ = 'Copyright (c) 2020 - 2021 sh-edraft.de' __copyright__ = 'Copyright (c) 2020 - 2021 sh-edraft.de'
__version__ = '2021.04.01' __version__ = '2021.4.1'
from collections import namedtuple from collections import namedtuple

View File

@ -15,7 +15,7 @@ __title__ = 'cpl_cli.command'
__author__ = 'Sven Heidemann' __author__ = 'Sven Heidemann'
__license__ = 'MIT' __license__ = 'MIT'
__copyright__ = 'Copyright (c) 2020 - 2021 sh-edraft.de' __copyright__ = 'Copyright (c) 2020 - 2021 sh-edraft.de'
__version__ = '2021.04.01' __version__ = '2021.4.1'
from collections import namedtuple from collections import namedtuple

View File

@ -4,6 +4,10 @@ import sys
import time import time
from typing import Optional from typing import Optional
from packaging import version
import cpl
from cpl.application.application_runtime_abc import ApplicationRuntimeABC from cpl.application.application_runtime_abc import ApplicationRuntimeABC
from cpl.configuration.configuration_abc import ConfigurationABC from cpl.configuration.configuration_abc import ConfigurationABC
from cpl.console.foreground_color_enum import ForegroundColorEnum from cpl.console.foreground_color_enum import ForegroundColorEnum
@ -59,7 +63,9 @@ class NewService(CommandABC):
ProjectSettingsNameEnum.copyright_name.value: '', ProjectSettingsNameEnum.copyright_name.value: '',
ProjectSettingsNameEnum.license_name.value: '', ProjectSettingsNameEnum.license_name.value: '',
ProjectSettingsNameEnum.license_description.value: '', ProjectSettingsNameEnum.license_description.value: '',
ProjectSettingsNameEnum.dependencies.value: [], ProjectSettingsNameEnum.dependencies.value: [
f'sh_cpl=={version.parse(cpl.__version__)}'
],
ProjectSettingsNameEnum.python_version.value: f'>={sys.version.split(" ")[0]}' ProjectSettingsNameEnum.python_version.value: f'>={sys.version.split(" ")[0]}'
} }
@ -163,6 +169,7 @@ class NewService(CommandABC):
self._create_project_settings(name) self._create_project_settings(name)
self._create_build_settings() self._create_build_settings()
self._create_project_json()
path = self._get_project_path() path = self._get_project_path()
if path is None: if path is None:
return return

View File

@ -15,7 +15,7 @@ __title__ = 'cpl_cli.configuration'
__author__ = 'Sven Heidemann' __author__ = 'Sven Heidemann'
__license__ = 'MIT' __license__ = 'MIT'
__copyright__ = 'Copyright (c) 2020 - 2021 sh-edraft.de' __copyright__ = 'Copyright (c) 2020 - 2021 sh-edraft.de'
__version__ = '2021.04.01' __version__ = '2021.4.1'
from collections import namedtuple from collections import namedtuple

View File

@ -15,7 +15,7 @@ __title__ = 'cpl_cli.live_server'
__author__ = 'Sven Heidemann' __author__ = 'Sven Heidemann'
__license__ = 'MIT' __license__ = 'MIT'
__copyright__ = 'Copyright (c) 2020 - 2021 sh-edraft.de' __copyright__ = 'Copyright (c) 2020 - 2021 sh-edraft.de'
__version__ = '2021.04.01' __version__ = '2021.4.1'
from collections import namedtuple from collections import namedtuple

View File

@ -15,7 +15,7 @@ __title__ = 'cpl_cli.publish'
__author__ = 'Sven Heidemann' __author__ = 'Sven Heidemann'
__license__ = 'MIT' __license__ = 'MIT'
__copyright__ = 'Copyright (c) 2020 - 2021 sh-edraft.de' __copyright__ = 'Copyright (c) 2020 - 2021 sh-edraft.de'
__version__ = '2021.04.01' __version__ = '2021.4.1'
from collections import namedtuple from collections import namedtuple

View File

@ -4,6 +4,7 @@ import shutil
from string import Template as stringTemplate from string import Template as stringTemplate
import setuptools import setuptools
from packaging import version
from setuptools import sandbox from setuptools import sandbox
from cpl.application.application_runtime_abc import ApplicationRuntimeABC from cpl.application.application_runtime_abc import ApplicationRuntimeABC
@ -107,9 +108,6 @@ class PublisherService(PublisherABC):
elif os.path.isfile(rel_path): elif os.path.isfile(rel_path):
self._included_files.append(rel_path) self._included_files.append(rel_path)
#else:
# Console.error(f'Path not found: {rel_path}')
for r, d, f in os.walk(self._build_settings.source_path): for r, d, f in os.walk(self._build_settings.source_path):
for file in f: for file in f:
relative_path = os.path.relpath(r) relative_path = os.path.relpath(r)
@ -167,7 +165,7 @@ class PublisherService(PublisherABC):
LicenseDescription=self._project_settings.license_description, LicenseDescription=self._project_settings.license_description,
Title=title if title is not None and title != '' else self._project_settings.name, Title=title if title is not None and title != '' else self._project_settings.name,
Author=self._project_settings.author, Author=self._project_settings.author,
Version=self._project_settings.version.to_str(), Version=version.parse(self._project_settings.version.to_str()),
Major=self._project_settings.version.major, Major=self._project_settings.version.major,
Minor=self._project_settings.version.minor, Minor=self._project_settings.version.minor,
Micro=self._project_settings.version.micro, Micro=self._project_settings.version.micro,

View File

@ -15,7 +15,7 @@ __title__ = 'cpl_cli.templates'
__author__ = 'Sven Heidemann' __author__ = 'Sven Heidemann'
__license__ = 'MIT' __license__ = 'MIT'
__copyright__ = 'Copyright (c) 2020 - 2021 sh-edraft.de' __copyright__ = 'Copyright (c) 2020 - 2021 sh-edraft.de'
__version__ = '2021.04.01' __version__ = '2021.4.1'
from collections import namedtuple from collections import namedtuple

View File

@ -15,7 +15,7 @@ __title__ = 'cpl_cli.templates.build'
__author__ = 'Sven Heidemann' __author__ = 'Sven Heidemann'
__license__ = 'MIT' __license__ = 'MIT'
__copyright__ = 'Copyright (c) 2020 - 2021 sh-edraft.de' __copyright__ = 'Copyright (c) 2020 - 2021 sh-edraft.de'
__version__ = '2021.04.01' __version__ = '2021.4.1'
from collections import namedtuple from collections import namedtuple

View File

@ -15,7 +15,7 @@ __title__ = 'cpl_cli.templates.generate'
__author__ = 'Sven Heidemann' __author__ = 'Sven Heidemann'
__license__ = 'MIT' __license__ = 'MIT'
__copyright__ = 'Copyright (c) 2020 - 2021 sh-edraft.de' __copyright__ = 'Copyright (c) 2020 - 2021 sh-edraft.de'
__version__ = '2021.04.01' __version__ = '2021.4.1'
from collections import namedtuple from collections import namedtuple

View File

@ -15,7 +15,7 @@ __title__ = 'cpl_cli.templates.new'
__author__ = 'Sven Heidemann' __author__ = 'Sven Heidemann'
__license__ = 'MIT' __license__ = 'MIT'
__copyright__ = 'Copyright (c) 2020 - 2021 sh-edraft.de' __copyright__ = 'Copyright (c) 2020 - 2021 sh-edraft.de'
__version__ = '2021.04.01' __version__ = '2021.4.1'
from collections import namedtuple from collections import namedtuple

View File

@ -15,7 +15,7 @@ __title__ = 'cpl_cli.templates.new.console'
__author__ = 'Sven Heidemann' __author__ = 'Sven Heidemann'
__license__ = 'MIT' __license__ = 'MIT'
__copyright__ = 'Copyright (c) 2020 - 2021 sh-edraft.de' __copyright__ = 'Copyright (c) 2020 - 2021 sh-edraft.de'
__version__ = '2021.04.01' __version__ = '2021.4.1'
from collections import namedtuple from collections import namedtuple

View File

@ -15,7 +15,7 @@ __title__ = 'cpl_cli.templates.new.console.src'
__author__ = 'Sven Heidemann' __author__ = 'Sven Heidemann'
__license__ = 'MIT' __license__ = 'MIT'
__copyright__ = 'Copyright (c) 2020 - 2021 sh-edraft.de' __copyright__ = 'Copyright (c) 2020 - 2021 sh-edraft.de'
__version__ = '2021.04.01' __version__ = '2021.4.1'
from collections import namedtuple from collections import namedtuple

View File

@ -15,7 +15,7 @@ __title__ = 'cpl_cli.templates.new.console.src.tests'
__author__ = 'Sven Heidemann' __author__ = 'Sven Heidemann'
__license__ = 'MIT' __license__ = 'MIT'
__copyright__ = 'Copyright (c) 2020 - 2021 sh-edraft.de' __copyright__ = 'Copyright (c) 2020 - 2021 sh-edraft.de'
__version__ = '2021.04.01' __version__ = '2021.4.1'
from collections import namedtuple from collections import namedtuple

View File

@ -15,7 +15,7 @@ __title__ = 'cpl_cli.templates.publish'
__author__ = 'Sven Heidemann' __author__ = 'Sven Heidemann'
__license__ = 'MIT' __license__ = 'MIT'
__copyright__ = 'Copyright (c) 2020 - 2021 sh-edraft.de' __copyright__ = 'Copyright (c) 2020 - 2021 sh-edraft.de'
__version__ = '2021.04.01' __version__ = '2021.4.1'
from collections import namedtuple from collections import namedtuple