atomicshop 2.11.24__py3-none-any.whl → 2.11.26__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.

Potentially problematic release.


This version of atomicshop might be problematic. Click here for more details.

atomicshop/__init__.py CHANGED
@@ -1,4 +1,4 @@
1
1
  """Atomic Basic functions and classes to make developer life easier"""
2
2
 
3
3
  __author__ = "Den Kras"
4
- __version__ = '2.11.24'
4
+ __version__ = '2.11.26'
@@ -0,0 +1,11 @@
1
+ #! /usr/bin/env python3
2
+ from atomicshop.wrappers.dockerw import install_docker
3
+
4
+
5
+ def main():
6
+ install_docker.install_docker_ubuntu(
7
+ use_docker_installer=True, rootless=True, add_current_user_to_docker_group_bool=False)
8
+
9
+
10
+ if __name__ == '__main__':
11
+ main()
@@ -1,3 +1,4 @@
1
+ #! /usr/bin/env python3
1
2
  from atomicshop.wrappers.dockerw import install_docker
2
3
 
3
4
 
@@ -1,4 +1,4 @@
1
- import os
1
+ import sys
2
2
  import subprocess
3
3
  import getpass
4
4
 
@@ -68,6 +68,8 @@ def install_docker_ubuntu(
68
68
  ):
69
69
  """
70
70
  The function will install docker on ubuntu.
71
+ Note: If you want to install docker in rootless mode, you need to run the script without sudo.
72
+
71
73
  :param rootless: bool, if True, the rootless installation will be performed.
72
74
  Meaning, you will be able to run the 'docker' command without sudo and you will not need to add the
73
75
  current user to the docker group.
@@ -89,6 +91,10 @@ def install_docker_ubuntu(
89
91
  main()
90
92
  """
91
93
 
94
+ if rootless and permissions.is_admin():
95
+ print_api('Rootless installation requires running the script without sudo.', color='red')
96
+ sys.exit()
97
+
92
98
  if use_docker_installer:
93
99
  if not ubuntu_terminal.is_executable_exists('curl'):
94
100
  print_api('curl is not installed, installing...', color='yellow')
@@ -153,18 +159,19 @@ def install_docker_ubuntu(
153
159
  'systemctl --user start docker.service')
154
160
  docker_enable_command = ubuntu_terminal.get_command_execution_as_sudo_executer(
155
161
  'systemctl --user enable docker.service')
162
+ print_api('Starting and enabling the docker service in user mode...')
156
163
  process.execute_script(docker_start_command, shell=True, executable=None)
157
164
  process.execute_script(docker_enable_command, shell=True, executable=None)
158
165
 
159
- with permissions.temporary_regular_permissions():
160
- current_non_sudo_user = os.getlogin()
166
+ print_api('Executing "loginctl enable-linger" to enable Docker to run when the user is not logged in...')
167
+ non_sudo_executer = permissions.get_ubuntu_sudo_executer_username()
161
168
  # Enable lingering so Docker runs when the user is not logged in
162
- process.execute_script(f'sudo loginctl enable-linger {current_non_sudo_user}', shell=True)
169
+ process.execute_script(f'sudo loginctl enable-linger {non_sudo_executer}', shell=True)
163
170
 
171
+ print_api('Adding $HOME/bin to your PATH...')
164
172
  # Add $HOME/bin to your PATH if it's not already there.
165
173
  with permissions.temporary_regular_permissions():
166
174
  ubuntu_terminal.add_path_to_bashrc(as_regular_user=True)
167
- input("Press Enter to continue...")
168
175
 
169
176
  if add_current_user_to_docker_group_bool:
170
177
  # Check if current user that executed the script is a sudo user. If not, use the current user.
@@ -37,10 +37,10 @@ def install_before_restart(
37
37
  print_api("This script requires root privileges...", color='red')
38
38
  sys.exit(1)
39
39
 
40
- # Install docker in rootless mode.
41
- with permissions.temporary_regular_permissions():
42
- install_docker.install_docker_ubuntu(
43
- use_docker_installer=True, rootless=True, add_current_user_to_docker_group_bool=False)
40
+ # # Install docker in rootless mode.
41
+ # with permissions.temporary_regular_permissions():
42
+ # install_docker.install_docker_ubuntu(
43
+ # use_docker_installer=True, rootless=True, add_current_user_to_docker_group_bool=False)
44
44
 
45
45
  # docker_keyring_file_path: str = "/etc/apt/keyrings/docker.gpg"
46
46
  nodesource_keyring_file_path: str = "/etc/apt/keyrings/nodesource.gpg"
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: atomicshop
3
- Version: 2.11.24
3
+ Version: 2.11.26
4
4
  Summary: Atomic functions and classes to make developer life easier
5
5
  Author: Denis Kras
6
6
  License: MIT License
@@ -1,4 +1,4 @@
1
- atomicshop/__init__.py,sha256=TeyboltWSXVQwI5Y9hPKYn-fVAXGLL5vSg9HS_q7rUI,124
1
+ atomicshop/__init__.py,sha256=Or0PCEtdRJkq83Yn6sjzhYAfqG1nVpCmb6Q49F4h3oY,124
2
2
  atomicshop/_basics_temp.py,sha256=6cu2dd6r2dLrd1BRNcVDKTHlsHs_26Gpw8QS6v32lQ0,3699
3
3
  atomicshop/_create_pdf_demo.py,sha256=Yi-PGZuMg0RKvQmLqVeLIZYadqEZwUm-4A9JxBl_vYA,3713
4
4
  atomicshop/_patch_import.py,sha256=ENp55sKVJ0e6-4lBvZnpz9PQCt3Otbur7F6aXDlyje4,6334
@@ -49,7 +49,8 @@ atomicshop/addons/PlayWrightCodegen.cmd,sha256=Z5cnllsyXD4F1W2h-WLEnyFkg5nZy0-hT
49
49
  atomicshop/addons/ScriptExecution.cmd,sha256=8iC-uHs9MX9qUD_C2M7n9Xw4MZvwOfxT8H5v3hluVps,93
50
50
  atomicshop/addons/a_setup_scripts/install_psycopg2_ubuntu.sh,sha256=lM7LkXQ2AxfFzDGyzSOfIS_zpg9bAD1k3JJ-qu5CdH8,81
51
51
  atomicshop/addons/a_setup_scripts/install_pywintrace_0.3.cmd,sha256=lEP_o6rWcBFUyup6_c-LTL3Q2LRMqryLuG3mJw080Zc,115
52
- atomicshop/addons/mains/install_docker_ubuntu_main_sudo.py,sha256=MZy2DQXRndjCSiZEXweDiSbZtsY9WmDyuxOdKUO8TK8,256
52
+ atomicshop/addons/mains/install_docker_rootless_ubuntu.py,sha256=9IPNtGZYjfy1_n6ZRt7gWz9KZgR6XCgevjqq02xk-o0,281
53
+ atomicshop/addons/mains/install_docker_ubuntu_main_sudo.py,sha256=JzayxeyKDtiuT4Icp2L2LyFRbx4wvpyN_bHLfZ-yX5E,281
53
54
  atomicshop/addons/mains/install_wsl_ubuntu_lts_admin.py,sha256=PrvZ4hMuadzj2GYKRZSwyNayJUuaSnCF9nV6ORqoPdo,123
54
55
  atomicshop/addons/mains/msi_unpacker.py,sha256=XAJdEqs-3s9JqIgHpGRL-HxLKpFMXdrlXmq2Is2Pyfk,164
55
56
  atomicshop/addons/mains/search_for_hyperlinks_in_docx.py,sha256=HkIdo_Sz9nPbbbJf1mwfwFkyI7vkvpH8qiIkuYopN4w,529
@@ -164,7 +165,7 @@ atomicshop/wrappers/ctyping/msi_windows_installer/extract_msi_main.py,sha256=eyF
164
165
  atomicshop/wrappers/ctyping/msi_windows_installer/tables.py,sha256=ajiFiLXl1prg2kOhatfT8E2RKX7F8JjUJpwkVuKu1GY,16263
165
166
  atomicshop/wrappers/dockerw/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
166
167
  atomicshop/wrappers/dockerw/dockerw.py,sha256=w8zSJr5C7cbvbuG09ORCpAe0BOcibqqL_Z2EKEBHYK4,6266
167
- atomicshop/wrappers/dockerw/install_docker.py,sha256=a9X8GjRiuTRsZbUM3u2UQ2_8pZ0sdsPZSyCOD8SDidg,8473
168
+ atomicshop/wrappers/dockerw/install_docker.py,sha256=VAr5AB08lglsILBTnm0m2sMTcTFMCNZplfFFPVa2R2Q,8909
168
169
  atomicshop/wrappers/elasticsearchw/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
169
170
  atomicshop/wrappers/elasticsearchw/config_basic.py,sha256=fDujtrjEjbWiYh_WQ3OcYp_8mXhXPYeKLy4wSPL5qM0,1177
170
171
  atomicshop/wrappers/elasticsearchw/elasticsearchw.py,sha256=7TqFdEFznO8NlligJhEKk1vm641ALpCYdaRl1uoXdzM,9768
@@ -187,7 +188,7 @@ atomicshop/wrappers/factw/fact_extractor/docker_image.py,sha256=jJAoJNQ4aoATjn3x
187
188
  atomicshop/wrappers/factw/fact_extractor/get_extractor.py,sha256=2mfOAftHIlCcGt1s7MWdq7DsDCuI6wX3MtvcEZ4SK-0,756
188
189
  atomicshop/wrappers/factw/install/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
189
190
  atomicshop/wrappers/factw/install/install_after_restart.py,sha256=-VXC3KDX2BzF0oi0ELCmfch55vLk-3t16KxlmYyUGD8,1560
190
- atomicshop/wrappers/factw/install/pre_install_and_install_before_restart.py,sha256=PQebNUYlj9Z8s4lRmbIUmq56t8IkaPJm0aAFDUiFjys,4505
191
+ atomicshop/wrappers/factw/install/pre_install_and_install_before_restart.py,sha256=4jb9zFNeLC8NFt9EnMVZgvGv-XeBC0gJG1mjkhzfaf8,4513
191
192
  atomicshop/wrappers/factw/postgresql/__init__.py,sha256=xMBn2d3Exo23IPP2F_9-SXmOlhFbwWDgS9KwozSTjA0,162
192
193
  atomicshop/wrappers/factw/postgresql/analysis.py,sha256=2Rxzy2jyq3zEKIo53z8VkjuslKE_i5mq2ZpmJAvyd6U,716
193
194
  atomicshop/wrappers/factw/postgresql/file_object.py,sha256=VRiCXnsd6yDbnsE-TEKYPC-gkAgFVkE6rygRrJLQShI,713
@@ -242,8 +243,8 @@ atomicshop/wrappers/socketw/socket_server_tester.py,sha256=AhpurHJmP2kgzHaUbq5ey
242
243
  atomicshop/wrappers/socketw/socket_wrapper.py,sha256=aXBwlEIJhFT0-c4i8iNlFx2It9VpCEpsv--5Oqcpxao,11624
243
244
  atomicshop/wrappers/socketw/ssl_base.py,sha256=k4V3gwkbq10MvOH4btU4onLX2GNOsSfUAdcHmL1rpVE,2274
244
245
  atomicshop/wrappers/socketw/statistics_csv.py,sha256=t3dtDEfN47CfYVi0CW6Kc2QHTEeZVyYhc57IYYh5nmA,826
245
- atomicshop-2.11.24.dist-info/LICENSE.txt,sha256=lLU7EYycfYcK2NR_1gfnhnRC8b8ccOTElACYplgZN88,1094
246
- atomicshop-2.11.24.dist-info/METADATA,sha256=WNIdPwnfzXdLe2RNmXO2foCbvizbcBYiqNJcCJUQiFU,10448
247
- atomicshop-2.11.24.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
248
- atomicshop-2.11.24.dist-info/top_level.txt,sha256=EgKJB-7xcrAPeqTRF2laD_Np2gNGYkJkd4OyXqpJphA,11
249
- atomicshop-2.11.24.dist-info/RECORD,,
246
+ atomicshop-2.11.26.dist-info/LICENSE.txt,sha256=lLU7EYycfYcK2NR_1gfnhnRC8b8ccOTElACYplgZN88,1094
247
+ atomicshop-2.11.26.dist-info/METADATA,sha256=PF0BZGtoWsCwHYFrk39hqbR4xBi4in17FYGg9HShGmU,10448
248
+ atomicshop-2.11.26.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
249
+ atomicshop-2.11.26.dist-info/top_level.txt,sha256=EgKJB-7xcrAPeqTRF2laD_Np2gNGYkJkd4OyXqpJphA,11
250
+ atomicshop-2.11.26.dist-info/RECORD,,