Bugfixes
This commit is contained in:
@@ -15,7 +15,7 @@ __title__ = 'cpl_cli.configuration'
|
||||
__author__ = 'Sven Heidemann'
|
||||
__license__ = 'MIT'
|
||||
__copyright__ = 'Copyright (c) 2020 - 2021 sh-edraft.de'
|
||||
__version__ = '2021.4.1.post1'
|
||||
__version__ = '2021.4.1.post2'
|
||||
|
||||
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='01-1')
|
||||
version_info = VersionInfo(major='2021', minor='04', micro='01-2')
|
||||
|
@@ -1,3 +1,5 @@
|
||||
import os
|
||||
import sys
|
||||
import traceback
|
||||
from typing import Optional
|
||||
|
||||
@@ -26,8 +28,9 @@ class ProjectSettings(ConfigurationModelABC):
|
||||
self._license_description: Optional[str] = None
|
||||
self._dependencies: Optional[list[str]] = None
|
||||
self._python_version: Optional[str] = None
|
||||
self._python_path: Optional[str] = None
|
||||
self._classifiers: Optional[list[str]] = None
|
||||
|
||||
|
||||
@property
|
||||
def name(self):
|
||||
return self._name
|
||||
@@ -43,31 +46,31 @@ class ProjectSettings(ConfigurationModelABC):
|
||||
@property
|
||||
def author_email(self) -> str:
|
||||
return self._author_email
|
||||
|
||||
|
||||
@property
|
||||
def description(self) -> str:
|
||||
return self._description
|
||||
|
||||
|
||||
@property
|
||||
def long_description(self) -> str:
|
||||
return self._long_description
|
||||
|
||||
|
||||
@property
|
||||
def url(self) -> str:
|
||||
return self._url
|
||||
|
||||
|
||||
@property
|
||||
def copyright_date(self) -> str:
|
||||
return self._copyright_date
|
||||
|
||||
|
||||
@property
|
||||
def copyright_name(self) -> str:
|
||||
return self._copyright_name
|
||||
|
||||
|
||||
@property
|
||||
def license_name(self) -> str:
|
||||
return self._license_name
|
||||
|
||||
|
||||
@property
|
||||
def license_description(self) -> str:
|
||||
return self._license_description
|
||||
@@ -75,11 +78,15 @@ class ProjectSettings(ConfigurationModelABC):
|
||||
@property
|
||||
def dependencies(self) -> list[str]:
|
||||
return self._dependencies
|
||||
|
||||
|
||||
@property
|
||||
def python_version(self) -> str:
|
||||
return self._python_version
|
||||
|
||||
@property
|
||||
def python_path(self) -> str:
|
||||
return self._python_path
|
||||
|
||||
@property
|
||||
def classifiers(self) -> list[str]:
|
||||
return self._classifiers
|
||||
@@ -99,6 +106,15 @@ class ProjectSettings(ConfigurationModelABC):
|
||||
self._license_description = settings[ProjectSettingsNameEnum.license_description.value]
|
||||
self._dependencies = settings[ProjectSettingsNameEnum.dependencies.value]
|
||||
self._python_version = settings[ProjectSettingsNameEnum.python_version.value]
|
||||
|
||||
path = os.path.abspath(settings[ProjectSettingsNameEnum.python_path.value])
|
||||
if os.path.isfile(path) or os.path.islink(path):
|
||||
path = os.path.abspath(path)
|
||||
else:
|
||||
path = sys.executable
|
||||
|
||||
self._python_path = path
|
||||
|
||||
self._classifiers = settings[ProjectSettingsNameEnum.classifiers.value]
|
||||
except Exception as e:
|
||||
Console.set_foreground_color(ForegroundColorEnum.red)
|
||||
|
@@ -15,4 +15,5 @@ class ProjectSettingsNameEnum(Enum):
|
||||
license_description = 'LicenseDescription'
|
||||
dependencies = 'Dependencies'
|
||||
python_version = 'PythonVersion'
|
||||
python_path = 'PythonPath'
|
||||
classifiers = 'Classifiers'
|
||||
|
Reference in New Issue
Block a user