First dev build
This commit is contained in:
25
tools/set_pip_urls/__init__.py
Normal file
25
tools/set_pip_urls/__init__.py
Normal file
@@ -0,0 +1,25 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
"""
|
||||
set-pip-urls CPL internal tool to set pip URL for CLI by environment
|
||||
~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
CPL internal tool to set pip URL for CLI by environment
|
||||
|
||||
:copyright: (c) 2020 - 2022 sh-edraft.de
|
||||
:license: MIT, see LICENSE for more details.
|
||||
|
||||
"""
|
||||
|
||||
__title__ = 'set_pip_urls'
|
||||
__author__ = 'Sven Heidemann'
|
||||
__license__ = 'MIT'
|
||||
__copyright__ = 'Copyright (c) 2020 - 2022 sh-edraft.de'
|
||||
__version__ = '2022.6.0'
|
||||
|
||||
from collections import namedtuple
|
||||
|
||||
# imports:
|
||||
|
||||
VersionInfo = namedtuple('VersionInfo', 'major minor micro')
|
||||
version_info = VersionInfo(major='2022', minor='6', micro='0')
|
16
tools/set_pip_urls/application.py
Normal file
16
tools/set_pip_urls/application.py
Normal file
@@ -0,0 +1,16 @@
|
||||
from cpl_core.application import ApplicationABC
|
||||
from cpl_core.configuration import ConfigurationABC
|
||||
from cpl_core.console import Console
|
||||
from cpl_core.dependency_injection import ServiceProviderABC
|
||||
|
||||
|
||||
class Application(ApplicationABC):
|
||||
|
||||
def __init__(self, config: ConfigurationABC, services: ServiceProviderABC):
|
||||
ApplicationABC.__init__(self, config, services)
|
||||
|
||||
def configure(self):
|
||||
pass
|
||||
|
||||
def main(self):
|
||||
Console.write_line('Hello World', self._environment.environment_name)
|
7
tools/set_pip_urls/appsettings.json
Normal file
7
tools/set_pip_urls/appsettings.json
Normal file
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"PIPSettings": {
|
||||
"production": "https://pip.sh-edraft.de",
|
||||
"staging": "https://pip-exp.sh-edraft.de",
|
||||
"development": "https://pip-dev.sh-edraft.de"
|
||||
}
|
||||
}
|
14
tools/set_pip_urls/main.py
Normal file
14
tools/set_pip_urls/main.py
Normal file
@@ -0,0 +1,14 @@
|
||||
from cpl_core.application import ApplicationBuilder
|
||||
|
||||
from set_pip_urls.application import Application
|
||||
from set_pip_urls.startup import Startup
|
||||
|
||||
|
||||
def main():
|
||||
app_builder = ApplicationBuilder(Application)
|
||||
app_builder.use_startup(Startup)
|
||||
app_builder.build().run()
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
main()
|
41
tools/set_pip_urls/set-pip-urls.json
Normal file
41
tools/set_pip_urls/set-pip-urls.json
Normal file
@@ -0,0 +1,41 @@
|
||||
{
|
||||
"ProjectSettings": {
|
||||
"Name": "set-pip-urls",
|
||||
"Version": {
|
||||
"Major": "2022",
|
||||
"Minor": "6",
|
||||
"Micro": "0"
|
||||
},
|
||||
"Author": "Sven Heidemann",
|
||||
"AuthorEmail": "sven.heidemann@sh-edraft.de",
|
||||
"Description": "CPL internal tool to set pip URL for CLI by environment",
|
||||
"LongDescription": "CPL internal tool to set pip URL for CLI by environment",
|
||||
"URL": "https://www.sh-edraft.de",
|
||||
"CopyrightDate": "2020 - 2022",
|
||||
"CopyrightName": "sh-edraft.de",
|
||||
"LicenseName": "MIT",
|
||||
"LicenseDescription": "MIT, see LICENSE for more details.",
|
||||
"Dependencies": [
|
||||
"cpl-core>=2022.6.16.dev1"
|
||||
],
|
||||
"PythonVersion": ">=3.10.4",
|
||||
"PythonPath": {},
|
||||
"Classifiers": []
|
||||
},
|
||||
"BuildSettings": {
|
||||
"ProjectType": "console",
|
||||
"SourcePath": "",
|
||||
"OutputPath": "../../dist",
|
||||
"Main": "set_pip_url.main",
|
||||
"EntryPoint": "set-pip-url",
|
||||
"IncludePackageData": false,
|
||||
"Included": [],
|
||||
"Excluded": [
|
||||
"*/__pycache__",
|
||||
"*/logs",
|
||||
"*/tests"
|
||||
],
|
||||
"PackageData": {},
|
||||
"ProjectReferences": []
|
||||
}
|
||||
}
|
16
tools/set_pip_urls/startup.py
Normal file
16
tools/set_pip_urls/startup.py
Normal file
@@ -0,0 +1,16 @@
|
||||
from cpl_core.application import StartupABC
|
||||
from cpl_core.configuration import ConfigurationABC
|
||||
from cpl_core.dependency_injection import ServiceProviderABC, ServiceCollectionABC
|
||||
from cpl_core.environment import ApplicationEnvironment
|
||||
|
||||
|
||||
class Startup(StartupABC):
|
||||
|
||||
def __init__(self):
|
||||
StartupABC.__init__(self)
|
||||
|
||||
def configure_configuration(self, configuration: ConfigurationABC, environment: ApplicationEnvironment) -> ConfigurationABC:
|
||||
return configuration
|
||||
|
||||
def configure_services(self, services: ServiceCollectionABC, environment: ApplicationEnvironment) -> ServiceProviderABC:
|
||||
return services.build_service_provider()
|
Reference in New Issue
Block a user