dkinst 0.6.1__py3-none-any.whl → 0.6.3__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
dkinst/__init__.py CHANGED
@@ -1,4 +1,4 @@
1
1
  """Den K Simple Installer"""
2
2
 
3
3
  __author__ = "Den Kras"
4
- __version__ = '0.6.1'
4
+ __version__ = '0.6.3'
dkinst/cli.py CHANGED
@@ -13,6 +13,7 @@ from . import __version__
13
13
  from .installers._base import BaseInstaller
14
14
  from .installers import _base
15
15
  from . import installers
16
+ from .installers.helpers.infra import system
16
17
 
17
18
  console = Console()
18
19
 
@@ -179,14 +180,9 @@ def main() -> int:
179
180
  inst._platforms_known()
180
181
 
181
182
  # Now check if the current platform is supported by this installer.
182
- current_platform = sys.platform
183
- if current_platform in _base.PLATFORM_CONVERTION:
184
- installers_kommon_platform = _base.PLATFORM_CONVERTION[current_platform]
185
- if installers_kommon_platform not in inst.platforms:
186
- console.print(f"This installer [{inst.name}] does not support your platform [{current_platform}].", style='red', markup=False)
187
- return 1
188
- else:
189
- console.print(f"This platform is unknown: [{current_platform}]", style='red', markup=False)
183
+ current_platform = system.get_platform()
184
+ if current_platform not in inst.platforms:
185
+ console.print(f"This installer [{inst.name}] does not support your platform [{current_platform}].", style='red', markup=False)
190
186
  return 1
191
187
 
192
188
  # Processing the 'manual' method.
@@ -9,19 +9,6 @@ from typing import Literal
9
9
  INSTALLATION_PATH_PORTABLE_WINDOWS: str = "C:\\dkinst" # Installation path for portable files on Windows that don't have a default location.
10
10
 
11
11
  KNOWN_SUPPORTED_PLATFORMS: list[str] = ["windows", "debian"]
12
- PLATFORM_CONVERTION: dict[str, str] = { # Convert sys.platform to installer platform names.
13
- "linux": "linux",
14
- "linux2": "linux",
15
- "darwin": "macos",
16
- "win32": "windows",
17
- "cygwin": "windows",
18
- "msys": "windows",
19
- "freebsd": "freebsd",
20
- "openbsd": "freebsd",
21
- "netbsd": "freebsd",
22
- "aix": "aix",
23
- "sunos5": "solaris",
24
- }
25
12
 
26
13
  KNOWN_METHODS: list[str] | None = None
27
14
  CUSTOM_METHODS: list[str] = ["manual"]
@@ -1,10 +1,12 @@
1
1
  import subprocess
2
+ import platform
2
3
 
3
4
  from rich.console import Console
4
5
 
5
- from . import permissions
6
- from atomicshop import get_process_list
7
- from atomicshop.wrappers.psutilw import processes
6
+ if platform.system().lower() == 'windows':
7
+ from . import permissions
8
+ from atomicshop import get_process_list
9
+ from atomicshop.wrappers.psutilw import processes
8
10
 
9
11
 
10
12
  console = Console()
@@ -7,14 +7,14 @@ from rich.console import Console
7
7
 
8
8
  from atomicshop.wrappers import githubw
9
9
 
10
- from ..infra import system
10
+ from ..infra import permissions, msis, system
11
11
 
12
12
 
13
13
  console = Console()
14
14
 
15
15
 
16
- VERSION: str = "1.0.1"
17
- """Fixed Ubuntu installation"""
16
+ VERSION: str = "1.0.0"
17
+ """Initial"""
18
18
 
19
19
 
20
20
  # === WINDOWS FUNCTIONS ================================================================================================
@@ -171,9 +171,6 @@ def install_nodejs_win(
171
171
  :return: int, 0 if successful, 1 if failed.
172
172
  """
173
173
 
174
- from ..infra import permissions, msis
175
-
176
-
177
174
  if not permissions.is_admin():
178
175
  console.print("This script requires administrative privileges to install Node.js.", style="red")
179
176
  return 1
@@ -15,7 +15,8 @@ from ..infra import system, permissions
15
15
  console = Console()
16
16
 
17
17
 
18
- VERSION: str = "1.0.1"
18
+ VERSION: str = "1.0.2"
19
+ """String cleaning"""
19
20
 
20
21
 
21
22
  # === WINDOWS FUNCTIONS ================================================================================================
@@ -104,7 +105,7 @@ def _make_parser():
104
105
 
105
106
  :return: Parsed arguments.
106
107
  """
107
- parser = argparse.ArgumentParser(description='Install PyCharm Community Edition.')
108
+ parser = argparse.ArgumentParser(description='Install PyCharm Unified Edition.')
108
109
  parser.add_argument(
109
110
  '--enable_sudo_execution', action='store_true',
110
111
  help='There is a problem when trying to run snapd installed Pycharm as sudo, need to enable this.'
@@ -117,7 +118,7 @@ def main(
117
118
  enable_sudo_execution: bool = False
118
119
  ) -> int:
119
120
  """
120
- The function will install Node.js on Ubuntu or Windows.
121
+ The function will install PyCharm on Ubuntu or Windows.
121
122
 
122
123
  :param enable_sudo_execution: bool: Enable sudo execution for snapd installed PyCharm.
123
124
 
@@ -13,7 +13,7 @@ class PyCharm(_base.BaseInstaller):
13
13
  self.description: str = "PyCharm Installer"
14
14
  self.version: str = pycharm_installer.VERSION
15
15
  self.platforms: list = ["windows", "debian"]
16
- self.helper: ModuleType | None = None
16
+ self.helper: ModuleType | None = pycharm_installer
17
17
 
18
18
  def install(
19
19
  self,
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: dkinst
3
- Version: 0.6.1
3
+ Version: 0.6.3
4
4
  Summary: Den K Simple Installer
5
5
  Author: Denis Kras
6
6
  License-Expression: MIT
@@ -1,26 +1,26 @@
1
- dkinst/__init__.py,sha256=4UW5adnZG_XFfZJlFqo30hAMKAvA5c73VlqXkLOUImI,78
2
- dkinst/cli.py,sha256=4jLmbW73FInE21i1FXhuhM6eymWhA4Pvicl34H62K_4,9278
1
+ dkinst/__init__.py,sha256=fgBL4qiqw75SZS17bNt__iqEB5Pe9bkea31PkrqfcCg,78
2
+ dkinst/cli.py,sha256=FUjPt8V4E7J10pZufU1pQ3akzHmFqcmVNVABX4WWDQ4,9004
3
3
  dkinst/config.toml,sha256=OaTuImf9xBIbTNCrC2MfAzpPLeuDdV2R5feIfT7xImA,48
4
4
  dkinst/installers/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
5
- dkinst/installers/_base.py,sha256=2Ke4pQevOq3SRpCI1YKB9JrIwKIacPvAAMfjKn7IG20,10280
5
+ dkinst/installers/_base.py,sha256=LA2j4uO9rnbFPgtScC7mK1hLKi9yalCnAtWcKmoLbq0,9910
6
6
  dkinst/installers/fibratus.py,sha256=l95ijrd4xZRKnz-lX35pzkIpDvkOuQbzkjPrwISS-SQ,4137
7
7
  dkinst/installers/nodejs.py,sha256=34UObZLKjRIKcQt3Omslcqyuibm1m6u9nR6-W472gqY,1781
8
- dkinst/installers/pycharm.py,sha256=GvH8uVCItaIjPSGPg2pyYl-7-LOkvh7gtubWmD2qvTM,1196
8
+ dkinst/installers/pycharm.py,sha256=TdXic99t1I7WR9J3eN25fKwfMCqfE_5pWfkSufXgg2g,1209
9
9
  dkinst/installers/pywintrace.py,sha256=UM4kAhU8lyfNPRYQrVDETa9kfEL_6Cyl1XcRNo_xebs,1384
10
10
  dkinst/installers/robocorp.py,sha256=yDBnA6sFjMSiOhwtyMRd59K-k6VC-42e5zVjeYZbmR4,4141
11
11
  dkinst/installers/tesseract_ocr.py,sha256=iEW6S9CxzGRrhzYW0A0FMwgb6SxKXOOfCdiI1EAG5W0,2532
12
12
  dkinst/installers/helpers/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
13
13
  dkinst/installers/helpers/infra/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
14
- dkinst/installers/helpers/infra/msis.py,sha256=WQCTo3CsublO_xfyAgim5_HqlzMbjfhuYLM6zrqjAng,6036
14
+ dkinst/installers/helpers/infra/msis.py,sha256=Ek7Ps-JyET638B2BJzkoP2ujKnl2LChRxOZMsDM4PqA,6109
15
15
  dkinst/installers/helpers/infra/permissions.py,sha256=CYTDVOI0jh9ks0ZLnnOuPzppgCszFEc9-92DTkVTYi4,522
16
16
  dkinst/installers/helpers/infra/system.py,sha256=CovoRRRz3TFEHKzHjuoSEJ2vrJGSbUETm3j5m-fjC2I,676
17
17
  dkinst/installers/helpers/modules/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
18
- dkinst/installers/helpers/modules/nodejs_installer.py,sha256=bqOXgRe1-BHB-noJIkZmURl6xSK2scqcTPfpWV8Lsl8,15007
19
- dkinst/installers/helpers/modules/pycharm_installer.py,sha256=sRuRCvqFBoCxc9XDqb3E05x-M2LmFGV8c47FsXai8Xg,4914
18
+ dkinst/installers/helpers/modules/nodejs_installer.py,sha256=iEWo-ftth6aVmEU9eclIv3swfNYqyd7OKGaW_ffOo6w,14961
19
+ dkinst/installers/helpers/modules/pycharm_installer.py,sha256=VQWeHglRu5M63327lKOAF8NQIMESUxkuGM4_AxBcY2M,4935
20
20
  dkinst/installers/helpers/modules/tesseract_ocr_manager.py,sha256=lJYVJDp5OTto4GHY1xkvJUkXCR1sgcOwj3UEUvfbPps,17369
21
- dkinst-0.6.1.dist-info/licenses/LICENSE,sha256=ohlj1rmsTHdctr-wyqmP6kbFC6Sff8pJd29v3pruZ18,1088
22
- dkinst-0.6.1.dist-info/METADATA,sha256=e_vTLx3JRHOymorB2aVusxdOoQA8KonOaIjQonjIUFg,2227
23
- dkinst-0.6.1.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
24
- dkinst-0.6.1.dist-info/entry_points.txt,sha256=YNgO3GufKMdA_oRqWEGAVh6k00oIuPItqqChoUtU278,43
25
- dkinst-0.6.1.dist-info/top_level.txt,sha256=_dGNrME6z6Ihv2sxGC4hfAlnVuhoDlKwx-97LZ2xtQ0,7
26
- dkinst-0.6.1.dist-info/RECORD,,
21
+ dkinst-0.6.3.dist-info/licenses/LICENSE,sha256=ohlj1rmsTHdctr-wyqmP6kbFC6Sff8pJd29v3pruZ18,1088
22
+ dkinst-0.6.3.dist-info/METADATA,sha256=V9mK1UMZxbbUUG2Afu9Fv78owz378AQo7vP6bXcKVUc,2227
23
+ dkinst-0.6.3.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
24
+ dkinst-0.6.3.dist-info/entry_points.txt,sha256=YNgO3GufKMdA_oRqWEGAVh6k00oIuPItqqChoUtU278,43
25
+ dkinst-0.6.3.dist-info/top_level.txt,sha256=_dGNrME6z6Ihv2sxGC4hfAlnVuhoDlKwx-97LZ2xtQ0,7
26
+ dkinst-0.6.3.dist-info/RECORD,,
File without changes