paramsx 1.0.7__tar.gz → 1.0.8__tar.gz
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 paramsx might be problematic. Click here for more details.
- {paramsx-1.0.7/paramsx.egg-info → paramsx-1.0.8}/PKG-INFO +1 -1
- paramsx-1.0.8/paramsx/post_install.py +19 -0
- {paramsx-1.0.7 → paramsx-1.0.8/paramsx.egg-info}/PKG-INFO +1 -1
- {paramsx-1.0.7 → paramsx-1.0.8}/paramsx.egg-info/SOURCES.txt +1 -0
- {paramsx-1.0.7 → paramsx-1.0.8}/setup.py +11 -20
- {paramsx-1.0.7 → paramsx-1.0.8}/LICENSE +0 -0
- {paramsx-1.0.7 → paramsx-1.0.8}/MANIFEST.in +0 -0
- {paramsx-1.0.7 → paramsx-1.0.8}/README.md +0 -0
- {paramsx-1.0.7 → paramsx-1.0.8}/paramsx/__init__.py +0 -0
- {paramsx-1.0.7 → paramsx-1.0.8}/paramsx/funcions.py +0 -0
- {paramsx-1.0.7 → paramsx-1.0.8}/paramsx/main.py +0 -0
- {paramsx-1.0.7 → paramsx-1.0.8}/paramsx/paramsx_config.py +0 -0
- {paramsx-1.0.7 → paramsx-1.0.8}/paramsx/text.py +0 -0
- {paramsx-1.0.7 → paramsx-1.0.8}/paramsx.egg-info/dependency_links.txt +0 -0
- {paramsx-1.0.7 → paramsx-1.0.8}/paramsx.egg-info/entry_points.txt +0 -0
- {paramsx-1.0.7 → paramsx-1.0.8}/paramsx.egg-info/requires.txt +0 -0
- {paramsx-1.0.7 → paramsx-1.0.8}/paramsx.egg-info/top_level.txt +0 -0
- {paramsx-1.0.7 → paramsx-1.0.8}/setup.cfg +0 -0
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import os
|
|
2
|
+
import shutil
|
|
3
|
+
|
|
4
|
+
def run_post_install():
|
|
5
|
+
config_dir = os.path.expanduser("~/.xsoft")
|
|
6
|
+
os.makedirs(config_dir, exist_ok=True)
|
|
7
|
+
|
|
8
|
+
config_file = os.path.join(os.path.dirname(__file__), "paramsx", "paramsx_config.py")
|
|
9
|
+
target_file = os.path.join(config_dir, "paramsx_config.py")
|
|
10
|
+
|
|
11
|
+
if not os.path.exists(target_file):
|
|
12
|
+
if os.path.exists(config_file):
|
|
13
|
+
shutil.copy(config_file, target_file)
|
|
14
|
+
print(f"Archivo de configuración copiado a {target_file}")
|
|
15
|
+
else:
|
|
16
|
+
print(f"Advertencia: No se encontró {config_file}. No se creó la configuración inicial.")
|
|
17
|
+
|
|
18
|
+
if __name__ == "__main__":
|
|
19
|
+
run_post_install()
|
|
@@ -4,6 +4,7 @@ import os
|
|
|
4
4
|
import sys
|
|
5
5
|
import shutil
|
|
6
6
|
import platform
|
|
7
|
+
import subprocess
|
|
7
8
|
|
|
8
9
|
class CustomInstallCommand(install):
|
|
9
10
|
def run(self):
|
|
@@ -13,8 +14,8 @@ class CustomInstallCommand(install):
|
|
|
13
14
|
# 1. Agregar directorio de scripts al PATH
|
|
14
15
|
self._add_scripts_to_path()
|
|
15
16
|
|
|
16
|
-
# 2.
|
|
17
|
-
self.
|
|
17
|
+
# 2. Ejecutar script de post-instalación
|
|
18
|
+
self.run_post_install_script()
|
|
18
19
|
|
|
19
20
|
def _add_scripts_to_path(self):
|
|
20
21
|
system = platform.system()
|
|
@@ -44,23 +45,6 @@ class CustomInstallCommand(install):
|
|
|
44
45
|
elif system == "Linux":
|
|
45
46
|
self._add_to_shell_config("~/.bashrc", scripts_dir)
|
|
46
47
|
|
|
47
|
-
def _create_config_folder(self):
|
|
48
|
-
config_dir = os.path.expanduser("~/.xsoft")
|
|
49
|
-
os.makedirs(config_dir, exist_ok=True)
|
|
50
|
-
|
|
51
|
-
config_file = "paramsx/paramsx_config.py"
|
|
52
|
-
target_file = os.path.join(config_dir, "paramsx_config.py")
|
|
53
|
-
|
|
54
|
-
if os.path.exists(target_file):
|
|
55
|
-
print(f"El archivo de configuración ya existe en {target_file}. No se sobrescribirá.")
|
|
56
|
-
else:
|
|
57
|
-
if os.path.exists(config_file):
|
|
58
|
-
shutil.copy(config_file, target_file)
|
|
59
|
-
print(f"Archivo de configuración copiado a {target_file}")
|
|
60
|
-
else:
|
|
61
|
-
print(f"Advertencia: No se encontró {config_file}. No se creó la configuración inicial.")
|
|
62
|
-
|
|
63
|
-
|
|
64
48
|
def _add_to_shell_config(self, config_file, scripts_dir):
|
|
65
49
|
"""Añadir el directorio de scripts al archivo de configuración de shell."""
|
|
66
50
|
export_line = f'export PATH="{scripts_dir}:$PATH"'
|
|
@@ -73,6 +57,13 @@ class CustomInstallCommand(install):
|
|
|
73
57
|
f.write(f"{export_line}\n")
|
|
74
58
|
print(f"Se creó {config_file} y se agregó {scripts_dir}.")
|
|
75
59
|
|
|
60
|
+
def run_post_install_script(self):
|
|
61
|
+
post_install_script = os.path.join(os.path.dirname(__file__), "post_install.py")
|
|
62
|
+
if os.path.exists(post_install_script):
|
|
63
|
+
subprocess.run([sys.executable, post_install_script], check=True)
|
|
64
|
+
else:
|
|
65
|
+
print("Advertencia: El script de post-instalación no se encontró.")
|
|
66
|
+
|
|
76
67
|
install_requires = ["boto3"]
|
|
77
68
|
|
|
78
69
|
# Añadir windows-curses si el sistema es Windows
|
|
@@ -81,7 +72,7 @@ if platform.system() == "Windows":
|
|
|
81
72
|
|
|
82
73
|
setup(
|
|
83
74
|
name="paramsx",
|
|
84
|
-
version="1.0.
|
|
75
|
+
version="1.0.8",
|
|
85
76
|
packages=find_packages(),
|
|
86
77
|
include_package_data=True,
|
|
87
78
|
package_data={
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|