From 6cdd3376f133960deda5b337b662811b0035a9a1 Mon Sep 17 00:00:00 2001 From: Sven Heidemann Date: Tue, 30 Mar 2021 21:01:10 +0200 Subject: [PATCH] Publish 2021.4.0rc3 --- cpl.json | 2 +- src/cpl/__init__.py | 4 +- src/cpl/application/__init__.py | 4 +- src/cpl/configuration/__init__.py | 4 +- src/cpl/console/__init__.py | 4 +- src/cpl/database/__init__.py | 4 +- src/cpl/database/connection/__init__.py | 4 +- src/cpl/database/context/__init__.py | 4 +- src/cpl/dependency_injection/__init__.py | 4 +- src/cpl/environment/__init__.py | 4 +- src/cpl/logging/__init__.py | 4 +- src/cpl/mailing/__init__.py | 4 +- src/cpl/time/__init__.py | 4 +- src/cpl/utils/__init__.py | 4 +- src/cpl_cli/__init__.py | 4 +- src/cpl_cli/command/__init__.py | 4 +- src/cpl_cli/configuration/__init__.py | 4 +- src/cpl_cli/live_server/__init__.py | 4 +- src/cpl_cli/publish/__init__.py | 4 +- src/cpl_cli/source_creator/__init__.py | 4 +- src/cpl_cli/templates/__init__.py | 4 +- src/cpl_cli/templates/build/__init__.py | 4 +- src/cpl_cli/templates/generate/__init__.py | 4 +- src/cpl_cli/templates/new/__init__.py | 4 +- src/cpl_cli/templates/new/console/__init__.py | 4 +- .../templates/new/console/src/__init__.py | 4 +- .../new/console/src/tests/__init__.py | 4 +- src/cpl_cli/templates/new/library/__init__.py | 4 +- .../templates/new/library/src/__init__.py | 4 +- .../templates/new/library/src/cli/__init__.py | 4 +- .../new/library/src/name/__init__.py | 4 +- .../new/library/src/tests/__init__.py | 4 +- src/cpl_cli/templates/publish/__init__.py | 4 +- test_2021_4/test1/old_ps.py | 419 ------------------ 34 files changed, 65 insertions(+), 484 deletions(-) delete mode 100644 test_2021_4/test1/old_ps.py diff --git a/cpl.json b/cpl.json index 007b57db..4f86c163 100644 --- a/cpl.json +++ b/cpl.json @@ -4,7 +4,7 @@ "Version": { "Major": "2021", "Minor": "04", - "Micro": "0rc2" + "Micro": "0rc3" }, "Author": "Sven Heidemann", "AuthorEmail": "sven.heidemann@sh-edraft.de", diff --git a/src/cpl/__init__.py b/src/cpl/__init__.py index 4cb520b7..3849bc50 100644 --- a/src/cpl/__init__.py +++ b/src/cpl/__init__.py @@ -15,11 +15,11 @@ __title__ = 'sh_cpl.cpl' __author__ = 'Sven Heidemann' __license__ = 'MIT' __copyright__ = 'Copyright (c) 2020 - 2021 sh-edraft.de' -__version__ = '2021.4.0rc2' +__version__ = '2021.4.0rc3' from collections import namedtuple # imports: VersionInfo = namedtuple('VersionInfo', 'major minor micro') -version_info = VersionInfo(major='2021', minor='04', micro='0rc2') +version_info = VersionInfo(major='2021', minor='04', micro='0rc3') diff --git a/src/cpl/application/__init__.py b/src/cpl/application/__init__.py index 5776785d..f55e755f 100644 --- a/src/cpl/application/__init__.py +++ b/src/cpl/application/__init__.py @@ -15,7 +15,7 @@ __title__ = 'cpl.application' __author__ = 'Sven Heidemann' __license__ = 'MIT' __copyright__ = 'Copyright (c) 2020 - 2021 sh-edraft.de' -__version__ = '2021.4.0rc2' +__version__ = '2021.4.0rc3' from collections import namedtuple @@ -26,4 +26,4 @@ from .application_builder_abc import ApplicationBuilderABC from .startup_abc import StartupABC VersionInfo = namedtuple('VersionInfo', 'major minor micro') -version_info = VersionInfo(major='2021', minor='04', micro='0rc2') +version_info = VersionInfo(major='2021', minor='04', micro='0rc3') diff --git a/src/cpl/configuration/__init__.py b/src/cpl/configuration/__init__.py index fb5b256a..6d7df65c 100644 --- a/src/cpl/configuration/__init__.py +++ b/src/cpl/configuration/__init__.py @@ -15,7 +15,7 @@ __title__ = 'cpl.configuration' __author__ = 'Sven Heidemann' __license__ = 'MIT' __copyright__ = 'Copyright (c) 2020 - 2021 sh-edraft.de' -__version__ = '2021.4.0rc2' +__version__ = '2021.4.0rc3' from collections import namedtuple @@ -27,4 +27,4 @@ from .configuration_variable_name_enum import ConfigurationVariableNameEnum from .console_argument import ConsoleArgument VersionInfo = namedtuple('VersionInfo', 'major minor micro') -version_info = VersionInfo(major='2021', minor='04', micro='0rc2') +version_info = VersionInfo(major='2021', minor='04', micro='0rc3') diff --git a/src/cpl/console/__init__.py b/src/cpl/console/__init__.py index 324ad38a..7d5f0e12 100644 --- a/src/cpl/console/__init__.py +++ b/src/cpl/console/__init__.py @@ -15,7 +15,7 @@ __title__ = 'cpl.console' __author__ = 'Sven Heidemann' __license__ = 'MIT' __copyright__ = 'Copyright (c) 2020 - 2021 sh-edraft.de' -__version__ = '2021.4.0rc2' +__version__ = '2021.4.0rc3' from collections import namedtuple @@ -27,4 +27,4 @@ from .foreground_color_enum import ForegroundColorEnum from .spinner_thread import SpinnerThread VersionInfo = namedtuple('VersionInfo', 'major minor micro') -version_info = VersionInfo(major='2021', minor='04', micro='0rc2') +version_info = VersionInfo(major='2021', minor='04', micro='0rc3') diff --git a/src/cpl/database/__init__.py b/src/cpl/database/__init__.py index b239817c..9939ccc5 100644 --- a/src/cpl/database/__init__.py +++ b/src/cpl/database/__init__.py @@ -15,7 +15,7 @@ __title__ = 'cpl.database' __author__ = 'Sven Heidemann' __license__ = 'MIT' __copyright__ = 'Copyright (c) 2020 - 2021 sh-edraft.de' -__version__ = '2021.4.0rc2' +__version__ = '2021.4.0rc3' from collections import namedtuple @@ -25,4 +25,4 @@ from .database_settings import DatabaseSettings from .database_settings_name_enum import DatabaseSettingsNameEnum VersionInfo = namedtuple('VersionInfo', 'major minor micro') -version_info = VersionInfo(major='2021', minor='04', micro='0rc2') +version_info = VersionInfo(major='2021', minor='04', micro='0rc3') diff --git a/src/cpl/database/connection/__init__.py b/src/cpl/database/connection/__init__.py index 94f28a8f..3c3831da 100644 --- a/src/cpl/database/connection/__init__.py +++ b/src/cpl/database/connection/__init__.py @@ -15,7 +15,7 @@ __title__ = 'cpl.database.connection' __author__ = 'Sven Heidemann' __license__ = 'MIT' __copyright__ = 'Copyright (c) 2020 - 2021 sh-edraft.de' -__version__ = '2021.4.0rc2' +__version__ = '2021.4.0rc3' from collections import namedtuple @@ -24,4 +24,4 @@ from .database_connection import DatabaseConnection from .database_connection_abc import DatabaseConnectionABC VersionInfo = namedtuple('VersionInfo', 'major minor micro') -version_info = VersionInfo(major='2021', minor='04', micro='0rc2') +version_info = VersionInfo(major='2021', minor='04', micro='0rc3') diff --git a/src/cpl/database/context/__init__.py b/src/cpl/database/context/__init__.py index 6fe868c2..33e22f0b 100644 --- a/src/cpl/database/context/__init__.py +++ b/src/cpl/database/context/__init__.py @@ -15,7 +15,7 @@ __title__ = 'cpl.database.context' __author__ = 'Sven Heidemann' __license__ = 'MIT' __copyright__ = 'Copyright (c) 2020 - 2021 sh-edraft.de' -__version__ = '2021.4.0rc2' +__version__ = '2021.4.0rc3' from collections import namedtuple @@ -24,4 +24,4 @@ from .database_context import DatabaseContext from .database_context_abc import DatabaseContextABC VersionInfo = namedtuple('VersionInfo', 'major minor micro') -version_info = VersionInfo(major='2021', minor='04', micro='0rc2') +version_info = VersionInfo(major='2021', minor='04', micro='0rc3') diff --git a/src/cpl/dependency_injection/__init__.py b/src/cpl/dependency_injection/__init__.py index 2843a800..43f8eda5 100644 --- a/src/cpl/dependency_injection/__init__.py +++ b/src/cpl/dependency_injection/__init__.py @@ -15,7 +15,7 @@ __title__ = 'cpl.dependency_injection' __author__ = 'Sven Heidemann' __license__ = 'MIT' __copyright__ = 'Copyright (c) 2020 - 2021 sh-edraft.de' -__version__ = '2021.4.0rc2' +__version__ = '2021.4.0rc3' from collections import namedtuple @@ -28,4 +28,4 @@ from .service_provider import ServiceProvider from .service_provider_abc import ServiceProviderABC VersionInfo = namedtuple('VersionInfo', 'major minor micro') -version_info = VersionInfo(major='2021', minor='04', micro='0rc2') +version_info = VersionInfo(major='2021', minor='04', micro='0rc3') diff --git a/src/cpl/environment/__init__.py b/src/cpl/environment/__init__.py index 39ca4882..458f693d 100644 --- a/src/cpl/environment/__init__.py +++ b/src/cpl/environment/__init__.py @@ -15,7 +15,7 @@ __title__ = 'cpl.environment' __author__ = 'Sven Heidemann' __license__ = 'MIT' __copyright__ = 'Copyright (c) 2020 - 2021 sh-edraft.de' -__version__ = '2021.4.0rc2' +__version__ = '2021.4.0rc3' from collections import namedtuple @@ -25,4 +25,4 @@ from .environment_name_enum import EnvironmentNameEnum from .application_environment import ApplicationEnvironment VersionInfo = namedtuple('VersionInfo', 'major minor micro') -version_info = VersionInfo(major='2021', minor='04', micro='0rc2') +version_info = VersionInfo(major='2021', minor='04', micro='0rc3') diff --git a/src/cpl/logging/__init__.py b/src/cpl/logging/__init__.py index 07494742..def537a1 100644 --- a/src/cpl/logging/__init__.py +++ b/src/cpl/logging/__init__.py @@ -15,7 +15,7 @@ __title__ = 'cpl.logging' __author__ = 'Sven Heidemann' __license__ = 'MIT' __copyright__ = 'Copyright (c) 2020 - 2021 sh-edraft.de' -__version__ = '2021.4.0rc2' +__version__ = '2021.4.0rc3' from collections import namedtuple @@ -27,4 +27,4 @@ from .logging_settings import LoggingSettings from .logging_settings_name_enum import LoggingSettingsNameEnum VersionInfo = namedtuple('VersionInfo', 'major minor micro') -version_info = VersionInfo(major='2021', minor='04', micro='0rc2') +version_info = VersionInfo(major='2021', minor='04', micro='0rc3') diff --git a/src/cpl/mailing/__init__.py b/src/cpl/mailing/__init__.py index 650f3221..d7d790ab 100644 --- a/src/cpl/mailing/__init__.py +++ b/src/cpl/mailing/__init__.py @@ -15,7 +15,7 @@ __title__ = 'cpl.mailing' __author__ = 'Sven Heidemann' __license__ = 'MIT' __copyright__ = 'Copyright (c) 2020 - 2021 sh-edraft.de' -__version__ = '2021.4.0rc2' +__version__ = '2021.4.0rc3' from collections import namedtuple @@ -27,4 +27,4 @@ from .email_client_settings import EMailClientSettings from .email_client_settings_name_enum import EMailClientSettingsNameEnum VersionInfo = namedtuple('VersionInfo', 'major minor micro') -version_info = VersionInfo(major='2021', minor='04', micro='0rc2') +version_info = VersionInfo(major='2021', minor='04', micro='0rc3') diff --git a/src/cpl/time/__init__.py b/src/cpl/time/__init__.py index 5e5bbc9f..8c1ec2cd 100644 --- a/src/cpl/time/__init__.py +++ b/src/cpl/time/__init__.py @@ -15,7 +15,7 @@ __title__ = 'cpl.time' __author__ = 'Sven Heidemann' __license__ = 'MIT' __copyright__ = 'Copyright (c) 2020 - 2021 sh-edraft.de' -__version__ = '2021.4.0rc2' +__version__ = '2021.4.0rc3' from collections import namedtuple @@ -24,4 +24,4 @@ from .time_format_settings import TimeFormatSettings from .time_format_settings_names_enum import TimeFormatSettingsNamesEnum VersionInfo = namedtuple('VersionInfo', 'major minor micro') -version_info = VersionInfo(major='2021', minor='04', micro='0rc2') +version_info = VersionInfo(major='2021', minor='04', micro='0rc3') diff --git a/src/cpl/utils/__init__.py b/src/cpl/utils/__init__.py index f0d2a0b2..57ade366 100644 --- a/src/cpl/utils/__init__.py +++ b/src/cpl/utils/__init__.py @@ -15,7 +15,7 @@ __title__ = 'cpl.utils' __author__ = 'Sven Heidemann' __license__ = 'MIT' __copyright__ = 'Copyright (c) 2020 - 2021 sh-edraft.de' -__version__ = '2021.4.0rc2' +__version__ = '2021.4.0rc3' from collections import namedtuple @@ -25,4 +25,4 @@ from .string import String from .pip import Pip VersionInfo = namedtuple('VersionInfo', 'major minor micro') -version_info = VersionInfo(major='2021', minor='04', micro='0rc2') +version_info = VersionInfo(major='2021', minor='04', micro='0rc3') diff --git a/src/cpl_cli/__init__.py b/src/cpl_cli/__init__.py index b36f18d5..46696a9e 100644 --- a/src/cpl_cli/__init__.py +++ b/src/cpl_cli/__init__.py @@ -15,7 +15,7 @@ __title__ = 'sh_cpl.cpl_cli' __author__ = 'Sven Heidemann' __license__ = 'MIT' __copyright__ = 'Copyright (c) 2020 - 2021 sh-edraft.de' -__version__ = '2021.4.0rc2' +__version__ = '2021.4.0rc3' from collections import namedtuple @@ -29,4 +29,4 @@ from .main import main from .startup import Startup VersionInfo = namedtuple('VersionInfo', 'major minor micro') -version_info = VersionInfo(major='2021', minor='04', micro='0rc2') +version_info = VersionInfo(major='2021', minor='04', micro='0rc3') diff --git a/src/cpl_cli/command/__init__.py b/src/cpl_cli/command/__init__.py index 6a17fd30..c6bac674 100644 --- a/src/cpl_cli/command/__init__.py +++ b/src/cpl_cli/command/__init__.py @@ -15,7 +15,7 @@ __title__ = 'cpl_cli.command' __author__ = 'Sven Heidemann' __license__ = 'MIT' __copyright__ = 'Copyright (c) 2020 - 2021 sh-edraft.de' -__version__ = '2021.4.0rc2' +__version__ = '2021.4.0rc3' from collections import namedtuple @@ -28,4 +28,4 @@ from .publish_service import PublishService from .version_service import VersionService VersionInfo = namedtuple('VersionInfo', 'major minor micro') -version_info = VersionInfo(major='2021', minor='04', micro='0rc2') +version_info = VersionInfo(major='2021', minor='04', micro='0rc3') diff --git a/src/cpl_cli/configuration/__init__.py b/src/cpl_cli/configuration/__init__.py index c4ad90ea..e6c057da 100644 --- a/src/cpl_cli/configuration/__init__.py +++ b/src/cpl_cli/configuration/__init__.py @@ -15,7 +15,7 @@ __title__ = 'cpl_cli.configuration' __author__ = 'Sven Heidemann' __license__ = 'MIT' __copyright__ = 'Copyright (c) 2020 - 2021 sh-edraft.de' -__version__ = '2021.4.0rc2' +__version__ = '2021.4.0rc3' from collections import namedtuple @@ -28,4 +28,4 @@ from .version_settings import VersionSettings from .version_settings_name_enum import VersionSettingsNameEnum VersionInfo = namedtuple('VersionInfo', 'major minor micro') -version_info = VersionInfo(major='2021', minor='04', micro='0rc2') +version_info = VersionInfo(major='2021', minor='04', micro='0rc3') diff --git a/src/cpl_cli/live_server/__init__.py b/src/cpl_cli/live_server/__init__.py index 7c9f0117..d16070a6 100644 --- a/src/cpl_cli/live_server/__init__.py +++ b/src/cpl_cli/live_server/__init__.py @@ -15,11 +15,11 @@ __title__ = 'cpl_cli.live_server' __author__ = 'Sven Heidemann' __license__ = 'MIT' __copyright__ = 'Copyright (c) 2020 - 2021 sh-edraft.de' -__version__ = '2021.4.0rc2' +__version__ = '2021.4.0rc3' from collections import namedtuple # imports: VersionInfo = namedtuple('VersionInfo', 'major minor micro') -version_info = VersionInfo(major='2021', minor='04', micro='0rc2') +version_info = VersionInfo(major='2021', minor='04', micro='0rc3') diff --git a/src/cpl_cli/publish/__init__.py b/src/cpl_cli/publish/__init__.py index d268c256..65b3a3cd 100644 --- a/src/cpl_cli/publish/__init__.py +++ b/src/cpl_cli/publish/__init__.py @@ -15,7 +15,7 @@ __title__ = 'cpl_cli.publish' __author__ = 'Sven Heidemann' __license__ = 'MIT' __copyright__ = 'Copyright (c) 2020 - 2021 sh-edraft.de' -__version__ = '2021.4.0rc2' +__version__ = '2021.4.0rc3' from collections import namedtuple @@ -24,4 +24,4 @@ from .publisher_abc import PublisherABC from .publisher_service import PublisherService VersionInfo = namedtuple('VersionInfo', 'major minor micro') -version_info = VersionInfo(major='2021', minor='04', micro='0rc2') +version_info = VersionInfo(major='2021', minor='04', micro='0rc3') diff --git a/src/cpl_cli/source_creator/__init__.py b/src/cpl_cli/source_creator/__init__.py index 8518cbf7..cf2ad443 100644 --- a/src/cpl_cli/source_creator/__init__.py +++ b/src/cpl_cli/source_creator/__init__.py @@ -15,11 +15,11 @@ __title__ = 'cpl_cli.source_creator' __author__ = 'Sven Heidemann' __license__ = 'MIT' __copyright__ = 'Copyright (c) 2020 - 2021 sh-edraft.de' -__version__ = '2021.4.0rc2' +__version__ = '2021.4.0rc3' from collections import namedtuple # imports: VersionInfo = namedtuple('VersionInfo', 'major minor micro') -version_info = VersionInfo(major='2021', minor='04', micro='0rc2') +version_info = VersionInfo(major='2021', minor='04', micro='0rc3') diff --git a/src/cpl_cli/templates/__init__.py b/src/cpl_cli/templates/__init__.py index e60f76e9..1d9347d7 100644 --- a/src/cpl_cli/templates/__init__.py +++ b/src/cpl_cli/templates/__init__.py @@ -15,11 +15,11 @@ __title__ = 'cpl_cli.templates' __author__ = 'Sven Heidemann' __license__ = 'MIT' __copyright__ = 'Copyright (c) 2020 - 2021 sh-edraft.de' -__version__ = '2021.4.0rc2' +__version__ = '2021.4.0rc3' from collections import namedtuple # imports: VersionInfo = namedtuple('VersionInfo', 'major minor micro') -version_info = VersionInfo(major='2021', minor='04', micro='0rc2') +version_info = VersionInfo(major='2021', minor='04', micro='0rc3') diff --git a/src/cpl_cli/templates/build/__init__.py b/src/cpl_cli/templates/build/__init__.py index 45b878bd..44fe313a 100644 --- a/src/cpl_cli/templates/build/__init__.py +++ b/src/cpl_cli/templates/build/__init__.py @@ -15,11 +15,11 @@ __title__ = 'cpl_cli.templates.build' __author__ = 'Sven Heidemann' __license__ = 'MIT' __copyright__ = 'Copyright (c) 2020 - 2021 sh-edraft.de' -__version__ = '2021.4.0rc2' +__version__ = '2021.4.0rc3' from collections import namedtuple # imports: VersionInfo = namedtuple('VersionInfo', 'major minor micro') -version_info = VersionInfo(major='2021', minor='04', micro='0rc2') +version_info = VersionInfo(major='2021', minor='04', micro='0rc3') diff --git a/src/cpl_cli/templates/generate/__init__.py b/src/cpl_cli/templates/generate/__init__.py index 223acece..cec485d2 100644 --- a/src/cpl_cli/templates/generate/__init__.py +++ b/src/cpl_cli/templates/generate/__init__.py @@ -15,11 +15,11 @@ __title__ = 'cpl_cli.templates.generate' __author__ = 'Sven Heidemann' __license__ = 'MIT' __copyright__ = 'Copyright (c) 2020 - 2021 sh-edraft.de' -__version__ = '2021.4.0rc2' +__version__ = '2021.4.0rc3' from collections import namedtuple # imports: VersionInfo = namedtuple('VersionInfo', 'major minor micro') -version_info = VersionInfo(major='2021', minor='04', micro='0rc2') +version_info = VersionInfo(major='2021', minor='04', micro='0rc3') diff --git a/src/cpl_cli/templates/new/__init__.py b/src/cpl_cli/templates/new/__init__.py index e02fd424..4506ed07 100644 --- a/src/cpl_cli/templates/new/__init__.py +++ b/src/cpl_cli/templates/new/__init__.py @@ -15,11 +15,11 @@ __title__ = 'cpl_cli.templates.new' __author__ = 'Sven Heidemann' __license__ = 'MIT' __copyright__ = 'Copyright (c) 2020 - 2021 sh-edraft.de' -__version__ = '2021.4.0rc2' +__version__ = '2021.4.0rc3' from collections import namedtuple # imports: VersionInfo = namedtuple('VersionInfo', 'major minor micro') -version_info = VersionInfo(major='2021', minor='04', micro='0rc2') +version_info = VersionInfo(major='2021', minor='04', micro='0rc3') diff --git a/src/cpl_cli/templates/new/console/__init__.py b/src/cpl_cli/templates/new/console/__init__.py index c0ae4dfc..ef297cd9 100644 --- a/src/cpl_cli/templates/new/console/__init__.py +++ b/src/cpl_cli/templates/new/console/__init__.py @@ -15,11 +15,11 @@ __title__ = 'cpl_cli.templates.new.console' __author__ = 'Sven Heidemann' __license__ = 'MIT' __copyright__ = 'Copyright (c) 2020 - 2021 sh-edraft.de' -__version__ = '2021.4.0rc2' +__version__ = '2021.4.0rc3' from collections import namedtuple # imports: VersionInfo = namedtuple('VersionInfo', 'major minor micro') -version_info = VersionInfo(major='2021', minor='04', micro='0rc2') +version_info = VersionInfo(major='2021', minor='04', micro='0rc3') diff --git a/src/cpl_cli/templates/new/console/src/__init__.py b/src/cpl_cli/templates/new/console/src/__init__.py index a7a5fe17..ec20dac6 100644 --- a/src/cpl_cli/templates/new/console/src/__init__.py +++ b/src/cpl_cli/templates/new/console/src/__init__.py @@ -15,11 +15,11 @@ __title__ = 'cpl_cli.templates.new.console.src' __author__ = 'Sven Heidemann' __license__ = 'MIT' __copyright__ = 'Copyright (c) 2020 - 2021 sh-edraft.de' -__version__ = '2021.4.0rc2' +__version__ = '2021.4.0rc3' from collections import namedtuple # imports: VersionInfo = namedtuple('VersionInfo', 'major minor micro') -version_info = VersionInfo(major='2021', minor='04', micro='0rc2') +version_info = VersionInfo(major='2021', minor='04', micro='0rc3') diff --git a/src/cpl_cli/templates/new/console/src/tests/__init__.py b/src/cpl_cli/templates/new/console/src/tests/__init__.py index c16c6b45..3e379b9f 100644 --- a/src/cpl_cli/templates/new/console/src/tests/__init__.py +++ b/src/cpl_cli/templates/new/console/src/tests/__init__.py @@ -15,11 +15,11 @@ __title__ = 'cpl_cli.templates.new.console.src.tests' __author__ = 'Sven Heidemann' __license__ = 'MIT' __copyright__ = 'Copyright (c) 2020 - 2021 sh-edraft.de' -__version__ = '2021.4.0rc2' +__version__ = '2021.4.0rc3' from collections import namedtuple # imports: VersionInfo = namedtuple('VersionInfo', 'major minor micro') -version_info = VersionInfo(major='2021', minor='04', micro='0rc2') +version_info = VersionInfo(major='2021', minor='04', micro='0rc3') diff --git a/src/cpl_cli/templates/new/library/__init__.py b/src/cpl_cli/templates/new/library/__init__.py index f7e094b5..0c5c1a9c 100644 --- a/src/cpl_cli/templates/new/library/__init__.py +++ b/src/cpl_cli/templates/new/library/__init__.py @@ -15,11 +15,11 @@ __title__ = 'cpl_cli.templates.new.library' __author__ = 'Sven Heidemann' __license__ = 'MIT' __copyright__ = 'Copyright (c) 2020 - 2021 sh-edraft.de' -__version__ = '2021.4.0rc2' +__version__ = '2021.4.0rc3' from collections import namedtuple # imports: VersionInfo = namedtuple('VersionInfo', 'major minor micro') -version_info = VersionInfo(major='2021', minor='04', micro='0rc2') +version_info = VersionInfo(major='2021', minor='04', micro='0rc3') diff --git a/src/cpl_cli/templates/new/library/src/__init__.py b/src/cpl_cli/templates/new/library/src/__init__.py index 77199e75..02d8e5d4 100644 --- a/src/cpl_cli/templates/new/library/src/__init__.py +++ b/src/cpl_cli/templates/new/library/src/__init__.py @@ -15,11 +15,11 @@ __title__ = 'cpl_cli.templates.new.library.src' __author__ = 'Sven Heidemann' __license__ = 'MIT' __copyright__ = 'Copyright (c) 2020 - 2021 sh-edraft.de' -__version__ = '2021.4.0rc2' +__version__ = '2021.4.0rc3' from collections import namedtuple # imports: VersionInfo = namedtuple('VersionInfo', 'major minor micro') -version_info = VersionInfo(major='2021', minor='04', micro='0rc2') +version_info = VersionInfo(major='2021', minor='04', micro='0rc3') diff --git a/src/cpl_cli/templates/new/library/src/cli/__init__.py b/src/cpl_cli/templates/new/library/src/cli/__init__.py index a4f5c619..147e0561 100644 --- a/src/cpl_cli/templates/new/library/src/cli/__init__.py +++ b/src/cpl_cli/templates/new/library/src/cli/__init__.py @@ -15,11 +15,11 @@ __title__ = 'cpl_cli.templates.new.library.src.cli' __author__ = 'Sven Heidemann' __license__ = 'MIT' __copyright__ = 'Copyright (c) 2020 - 2021 sh-edraft.de' -__version__ = '2021.4.0rc2' +__version__ = '2021.4.0rc3' from collections import namedtuple # imports: VersionInfo = namedtuple('VersionInfo', 'major minor micro') -version_info = VersionInfo(major='2021', minor='04', micro='0rc2') +version_info = VersionInfo(major='2021', minor='04', micro='0rc3') diff --git a/src/cpl_cli/templates/new/library/src/name/__init__.py b/src/cpl_cli/templates/new/library/src/name/__init__.py index 00a69bb3..3d50e6f5 100644 --- a/src/cpl_cli/templates/new/library/src/name/__init__.py +++ b/src/cpl_cli/templates/new/library/src/name/__init__.py @@ -15,11 +15,11 @@ __title__ = 'cpl_cli.templates.new.library.src.name' __author__ = 'Sven Heidemann' __license__ = 'MIT' __copyright__ = 'Copyright (c) 2020 - 2021 sh-edraft.de' -__version__ = '2021.4.0rc2' +__version__ = '2021.4.0rc3' from collections import namedtuple # imports: VersionInfo = namedtuple('VersionInfo', 'major minor micro') -version_info = VersionInfo(major='2021', minor='04', micro='0rc2') +version_info = VersionInfo(major='2021', minor='04', micro='0rc3') diff --git a/src/cpl_cli/templates/new/library/src/tests/__init__.py b/src/cpl_cli/templates/new/library/src/tests/__init__.py index 2e091da5..4f4e9487 100644 --- a/src/cpl_cli/templates/new/library/src/tests/__init__.py +++ b/src/cpl_cli/templates/new/library/src/tests/__init__.py @@ -15,11 +15,11 @@ __title__ = 'cpl_cli.templates.new.library.src.tests' __author__ = 'Sven Heidemann' __license__ = 'MIT' __copyright__ = 'Copyright (c) 2020 - 2021 sh-edraft.de' -__version__ = '2021.4.0rc2' +__version__ = '2021.4.0rc3' from collections import namedtuple # imports: VersionInfo = namedtuple('VersionInfo', 'major minor micro') -version_info = VersionInfo(major='2021', minor='04', micro='0rc2') +version_info = VersionInfo(major='2021', minor='04', micro='0rc3') diff --git a/src/cpl_cli/templates/publish/__init__.py b/src/cpl_cli/templates/publish/__init__.py index 7e7712d6..62686a4b 100644 --- a/src/cpl_cli/templates/publish/__init__.py +++ b/src/cpl_cli/templates/publish/__init__.py @@ -15,11 +15,11 @@ __title__ = 'cpl_cli.templates.publish' __author__ = 'Sven Heidemann' __license__ = 'MIT' __copyright__ = 'Copyright (c) 2020 - 2021 sh-edraft.de' -__version__ = '2021.4.0rc2' +__version__ = '2021.4.0rc3' from collections import namedtuple # imports: VersionInfo = namedtuple('VersionInfo', 'major minor micro') -version_info = VersionInfo(major='2021', minor='04', micro='0rc2') +version_info = VersionInfo(major='2021', minor='04', micro='0rc3') diff --git a/test_2021_4/test1/old_ps.py b/test_2021_4/test1/old_ps.py deleted file mode 100644 index 482a716d..00000000 --- a/test_2021_4/test1/old_ps.py +++ /dev/null @@ -1,419 +0,0 @@ -import importlib -import os -import shutil -import sys -from string import Template as stringTemplate - -import setuptools -from packaging import version -from setuptools import sandbox - -from cpl.console.foreground_color_enum import ForegroundColorEnum -from cpl.console.console import Console -from cpl.environment.application_environment_abc import ApplicationEnvironmentABC -from cpl_cli.configuration.build_settings import BuildSettings -from cpl_cli.configuration.project_settings import ProjectSettings -from cpl_cli.publish.publisher_abc import PublisherABC -from cpl_cli.templates.build.init_template import InitTemplate -from cpl_cli.templates.publish.setup_template import SetupTemplate - - -class PublisherService(PublisherABC): - - def __init__(self, env: ApplicationEnvironmentABC, project: ProjectSettings, build: BuildSettings): - """ - Service to build or publish files for distribution - :param env: - :param project: - :param build: - """ - PublisherABC.__init__(self) - - self._env = env - self._project_settings = project - self._build_settings = build - - self._source_path = os.path.join(self._env.working_directory, self._build_settings.source_path) - self._output_path = os.path.join(self._env.working_directory, self._build_settings.output_path) - - self._included_files: list[str] = [] - self._included_dirs: list[str] = [] - self._distributed_files: list[str] = [] - - @property - def source_path(self) -> str: - return self._source_path - - @property - def dist_path(self) -> str: - return self._output_path - - @staticmethod - def _get_module_name_from_dirs(file: str) -> str: - """ - Extracts module name from directories - :param file: - :return: - """ - if 'src/' in file: - file = file.replace('src/', '', 1) - - dirs = os.path.dirname(file).split('/') - for d in dirs: - if d.__contains__('.'): - dirs.remove(d) - - if len(dirs) == 0: - return os.path.basename(file) - else: - return '.'.join(dirs) - - @staticmethod - def _delete_path(path: str): - """ - Deletes full path tree - :param path: - :return: - """ - if os.path.isdir(path): - try: - shutil.rmtree(path) - except Exception as e: - Console.error(f'{e}') - exit() - - @staticmethod - def _create_path(path: str): - """ - Creates full path tree - :param path: - :return: - """ - if not os.path.isdir(path): - try: - os.makedirs(path) - except Exception as e: - Console.error(f'{e}') - exit() - - def _is_path_included(self, path: str) -> bool: - """ - Checks if the path is included - :param path: - :return: - """ - 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: - """ - Checks if the path is excluded - :param path: - :return: - """ - for excluded in self._build_settings.excluded: - if excluded.startswith('*'): - excluded = excluded.replace('*', '') - - if excluded in path and not self._is_path_included(path): - return True - - return False - - def _read_sources(self): - """ - Reads all source files and save included files - :return: - """ - for file in self._build_settings.included: - rel_path = os.path.relpath(file) - if os.path.isdir(rel_path): - for r, d, f in os.walk(rel_path): - for sub_file in f: - relative_path = os.path.relpath(r) - file_path = os.path.join(relative_path, os.path.relpath(sub_file)) - - print(file_path) - self._included_files.append(os.path.relpath(file_path)) - - elif os.path.isfile(rel_path): - print(rel_path) - self._included_files.append(rel_path) - - for r, d, f in os.walk(self._build_settings.source_path): - for file in f: - relative_path = os.path.relpath(r) - file_path = os.path.join(relative_path, os.path.relpath(file)) - if self._is_path_excluded(relative_path): - break - - if len(d) > 0: - for directory in d: - empty_dir = os.path.join(os.path.dirname(file_path), directory) - if len(os.listdir(empty_dir)) == 0: - self._included_dirs.append(empty_dir) - - if not self._is_path_excluded(relative_path): - self._included_files.append(os.path.relpath(file_path)) - - def _create_packages(self): - """ - Writes information from template to all included __init__.py - :return: - """ - for file in self._included_files: - if file.endswith('__init__.py'): - template_content = '' - module_file_lines: list[str] = [] - - title = self._get_module_name_from_dirs(file) - if title == '': - title = self._project_settings.name - elif not title.__contains__('.'): - title = f'{self._project_settings.name}.{title}' - - module_py_lines: list[str] = [] - imports = '' - - with open(file, 'r') as py_file: - module_file_lines = py_file.readlines() - py_file.close() - - if len(module_file_lines) == 0: - imports = '# imports:' - else: - is_started = False - for line in module_file_lines: - if line.__contains__('# imports'): - is_started = True - - if (line.__contains__('from') or line.__contains__('import')) and is_started: - module_py_lines.append(line.replace('\n', '')) - - if len(module_py_lines) > 0: - imports = '\n'.join(module_py_lines) - - template_content = stringTemplate(InitTemplate.get_init_py()).substitute( - Name=self._project_settings.name, - Description=self._project_settings.description, - LongDescription=self._project_settings.long_description, - CopyrightDate=self._project_settings.copyright_date, - CopyrightName=self._project_settings.copyright_name, - LicenseName=self._project_settings.license_name, - LicenseDescription=self._project_settings.license_description, - Title=title if title is not None and title != '' else self._project_settings.name, - Author=self._project_settings.author, - Version=version.parse(self._project_settings.version.to_str()), - Major=self._project_settings.version.major, - Minor=self._project_settings.version.minor, - Micro=self._project_settings.version.micro, - Imports=imports - ) - - with open(file, 'w+') as py_file: - py_file.write(template_content) - py_file.close() - - def _dist_files(self): - """ - Copies all included source files to dist_path - :return: - """ - build_path = os.path.join(self._output_path) - self._delete_path(build_path) - self._create_path(build_path) - - for file in self._included_files: - dist_file = file - if 'src/' in dist_file: - dist_file = dist_file.replace('src/', '', 1) - - output_path = os.path.join(build_path, os.path.dirname(dist_file)) - output_file = os.path.join(build_path, dist_file) - - try: - if not os.path.isdir(output_path): - os.makedirs(output_path, exist_ok=True) - except Exception as e: - Console.error(__name__, f'Cannot create directories: {output_path} -> {e}') - return - - try: - self._distributed_files.append(output_file) - shutil.copy(os.path.abspath(file), output_file) - except Exception as e: - Console.error(__name__, f'Cannot copy file: {file} to {output_path} -> {e}') - return - - for empty_dir in self._included_dirs: - dist_dir = empty_dir - if 'src/' in dist_dir: - dist_dir = dist_dir.replace('src/', '', 1) - - output_path = os.path.join(build_path, dist_dir) - if not os.path.isdir(output_path): - os.makedirs(output_path) - - def _clean_dist_files(self): - """ - Deletes all included source files from dist_path - :return: - """ - paths: list[str] = [] - for file in self._distributed_files: - paths.append(os.path.dirname(file)) - - if os.path.isfile(file): - os.remove(file) - - for path in paths: - if path != self._output_path and os.path.isdir(path): - shutil.rmtree(path) - - def _create_setup(self): - """ - Generates setup.py - - Dependencies: ProjectSettings, BuildSettings - :return: - """ - setup_file = os.path.join(self._output_path, 'setup.py') - if os.path.isfile(setup_file): - os.remove(setup_file) - - main_mod = None - try: - # main = importlib.import_module(self._build_settings.main) - file_name = f'{str(self._build_settings.main).replace(".", "/")}.py' - print() - spec = importlib.util.spec_from_file_location(self._build_settings.main, os.path.join(self._env.working_directory, 'src', file_name)) - print(1, spec) - test = importlib.util.module_from_spec(spec) - print(2, test) - # spec.loader.exec_module(test) - sys.path.append(os.path.join(self._env.working_directory, 'src')) - import main - print(3, main) - main_mod = main - except Exception as e: - Console.error('Could not find entry point', str(e)) - return - - if main_mod is None or not hasattr(main_mod, 'main'): - Console.error('Could not find entry point') - return - - with open(setup_file, 'w+') as setup_py: - setup_string = stringTemplate(SetupTemplate.get_setup_py()).substitute( - Name=self._project_settings.name, - Version=self._project_settings.version.to_str(), - Packages=setuptools.find_packages(where=self._output_path, exclude=self._build_settings.excluded), - URL=self._project_settings.url, - LicenseName=self._project_settings.license_name, - Author=self._project_settings.author, - AuthorMail=self._project_settings.author_email, - IncludePackageData=self._build_settings.include_package_data, - Description=self._project_settings.description, - PyRequires=self._project_settings.python_version, - Dependencies=self._project_settings.dependencies, - EntryPoints={ - 'console_scripts': [ - f'{self._build_settings.entry_point} = {main_mod.__name__}:{main_mod.main.__name__}' - ] - }, - PackageData=self._build_settings.package_data - ) - setup_py.write(setup_string) - setup_py.close() - - def _run_setup(self): - """ - Starts setup.py - :return: - """ - setup_py = os.path.join(self._output_path, 'setup.py') - if not os.path.isfile(setup_py): - Console.error(__name__, f'setup.py not found in {self._output_path}') - return - - try: - sandbox.run_setup(os.path.abspath(setup_py), [ - 'sdist', - f'--dist-dir={os.path.join(self._output_path, "setup")}', - 'bdist_wheel', - f'--bdist-dir={os.path.join(self._output_path, "bdist")}', - f'--dist-dir={os.path.join(self._output_path, "setup")}' - ]) - os.remove(setup_py) - except Exception as e: - Console.error('Executing setup.py failed', str(e)) - - def include(self, path: str): - """ - Includes given path from sources - :param path: - :return: - """ - self._build_settings.included.append(path) - - def exclude(self, path: str): - """ - Excludes given path from sources - :param path: - :return: - """ - self._build_settings.excluded.append(path) - - def build(self): - """ - Build the CPL project to dist_path/build - - 1. Reads all included source files - 2. Writes informations from template to all included __init__.py - 3. Copies all included source files to dist_path/build - :return: - """ - self._output_path = os.path.join(self._output_path, 'build') - - Console.spinner('Reading source files:', self._read_sources, text_foreground_color=ForegroundColorEnum.green, - spinner_foreground_color=ForegroundColorEnum.blue) - Console.spinner('Creating internal packages:', self._create_packages, - text_foreground_color=ForegroundColorEnum.green, - spinner_foreground_color=ForegroundColorEnum.blue) - Console.spinner('Building application:', self._dist_files, text_foreground_color=ForegroundColorEnum.green, - spinner_foreground_color=ForegroundColorEnum.blue) - - def publish(self): - """ - Publishes the CPL project to dist_path/publish - - 1. Builds the project - 2. Generates setup.py - 3. Start setup.py - 4. Remove all included source from dist_path/publish - :return: - """ - self._output_path = os.path.join(self._output_path, 'publish') - - Console.write_line('Build:') - Console.spinner('Reading source files:', self._read_sources, text_foreground_color=ForegroundColorEnum.green, - spinner_foreground_color=ForegroundColorEnum.blue) - Console.spinner('Creating internal packages:', self._create_packages, - text_foreground_color=ForegroundColorEnum.green, - spinner_foreground_color=ForegroundColorEnum.blue) - Console.spinner('Building application:', self._dist_files, text_foreground_color=ForegroundColorEnum.green, - spinner_foreground_color=ForegroundColorEnum.blue) - - Console.write_line('\nPublish:') - Console.spinner('Generating setup.py:', self._create_setup, text_foreground_color=ForegroundColorEnum.green, - spinner_foreground_color=ForegroundColorEnum.blue) - Console.write_line('Running setup.py:\n') - self._run_setup() - Console.spinner('Cleaning dist path:', self._clean_dist_files, text_foreground_color=ForegroundColorEnum.green, - spinner_foreground_color=ForegroundColorEnum.blue)