Updated cpl

This commit is contained in:
Sven Heidemann 2022-11-11 19:11:46 +01:00
parent 342de3e1d1
commit f10221686c
6 changed files with 21 additions and 56 deletions

View File

@ -1,35 +0,0 @@
#!/bin/bash
cd src
#pyinstaller --specpath ../dist/cspec \
# --workpath ../dist/cbuild \
# --distpath ../dist/cdist \
# --add-data ../../src/py_to_uxf/appsettings.json:. \
# --hidden-import pynput.keyboard._xorg \
# --hidden-import pynput.mouse._xorg \
# --hidden-import pyfiglet.fonts \
# --collect-data pyfiglet \
# -n py_to_uxf \
# -y \
# py_to_uxf/main.py
build=../dist/cbuild/
python -m nuitka \
--follow-imports \
--include-package=pkg_resources \
--include-package=pynput.keyboard._xorg \
--include-package=pynput.mouse._xorg \
--include-package=Xlib \
--output-dir=$build \
py_to_uxf/main.py
file="py_to_uxf/appsettings.json"
if [ -f "$file" ]; then
if [ -d "$build/main.dist/" ]; then
build=$build/main.dist/
fi
cp $file $build
fi
cd ../

View File

@ -18,13 +18,10 @@ class Application(ApplicationABC):
def __init__(self, config: ConfigurationABC, services: ServiceProviderABC):
ApplicationABC.__init__(self, config, services)
config.parse_console_arguments(self._services)
self._path = config.get_configuration('p')
self._file = ''
try:
self._file = config.get_configuration('-pAdditionalArguments')[1]
except Exception as e:
Console.error('Expected file')
sys.exit()
self._file = config.get_configuration('o')
self._parser: PythonParserABC = services.get_service(PythonParserABC)
self._umlet_creator: UmletCreatorABC = services.get_service(UmletCreatorABC)

View File

@ -16,13 +16,14 @@
"LicenseName": "",
"LicenseDescription": "",
"Dependencies": [
"sh_cpl-core>=2021.11.0.post3",
"sh_cpl-query==2021.11.0.post3"
"cpl-core==2022.10.0.post7",
"cpl-query==2022.10.0.post2"
],
"PythonVersion": ">=3.9.2",
"PythonPath": {
"linux": ""
},
"DevDependencies": [
"cpl-cli==2022.10.1"
],
"PythonVersion": ">=3.10.4",
"PythonPath": {},
"Classifiers": []
},
"BuildSettings": {

View File

@ -2,7 +2,7 @@ import os
import sys
from cpl_core.application import StartupABC
from cpl_core.configuration import ConfigurationABC, ConsoleArgument
from cpl_core.configuration import ConfigurationABC, ArgumentTypeEnum
from cpl_core.console import Console
from cpl_core.dependency_injection import ServiceProviderABC, ServiceCollectionABC
from cpl_core.environment import ApplicationEnvironment
@ -38,10 +38,9 @@ class Startup(StartupABC):
Console.error(f'Expected config file appsettings.json')
sys.exit()
configuration.add_console_argument(ConsoleArgument('-', 'p', [], ' ', False, [
ConsoleArgument('-', 'o', [], ' ', is_value_token_optional=False)
]))
configuration.add_console_arguments(error=False)
configuration.create_console_argument(ArgumentTypeEnum.Variable, '-', 'p', [], ' ')
configuration.create_console_argument(ArgumentTypeEnum.Variable, '-', 'o', [], ' ')
return configuration
def configure_services(self, services: ServiceCollectionABC, environment: ApplicationEnvironment) -> ServiceProviderABC:

View File

@ -16,9 +16,12 @@
"LicenseName": "",
"LicenseDescription": "",
"Dependencies": [
"sh_cpl-core>=2021.11.0.post3"
"cpl-core==2022.10.0.post2"
],
"PythonVersion": ">=3.9.2",
"DevDependencies": [
"cpl-cli==2022.10.1"
],
"PythonVersion": ">=3.10.4",
"PythonPath": {
"linux": ""
},

View File

@ -2,7 +2,7 @@ import sys
from cpl_core.configuration import ConfigurationABC
from cpl_core.console import Console
from cpl_query.extension import List, IterableABC
from cpl_query.extension import List
from py_to_uxf_core.abc.umlet_creator_abc import UmletCreatorABC
from py_to_uxf_core.configuration.parser_settings import ParserSettings
@ -13,7 +13,7 @@ from py_to_uxf_core.model.position import Position
from py_to_uxf_core.model.python_class import PythonClass
from py_to_uxf_core.model.uml_class import UMLClass
OrderedImplementation = dict[ClassImplementation, IterableABC]
OrderedImplementation = dict[ClassImplementation, List]
class UmletCreatorService(UmletCreatorABC):