io4it 0.0.0.12.5__tar.gz → 0.0.0.12.7__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.
- {io4it-0.0.0.12.5 → io4it-0.0.0.12.7}/PKG-INFO +1 -1
- {io4it-0.0.0.12.5 → io4it-0.0.0.12.7}/io4it.egg-info/PKG-INFO +1 -1
- io4it-0.0.0.12.7/setup.py +189 -0
- io4it-0.0.0.12.5/setup.py +0 -145
- {io4it-0.0.0.12.5 → io4it-0.0.0.12.7}/License.txt +0 -0
- {io4it-0.0.0.12.5 → io4it-0.0.0.12.7}/io4it.egg-info/SOURCES.txt +0 -0
- {io4it-0.0.0.12.5 → io4it-0.0.0.12.7}/io4it.egg-info/dependency_links.txt +0 -0
- {io4it-0.0.0.12.5 → io4it-0.0.0.12.7}/io4it.egg-info/entry_points.txt +0 -0
- {io4it-0.0.0.12.5 → io4it-0.0.0.12.7}/io4it.egg-info/namespace_packages.txt +0 -0
- {io4it-0.0.0.12.5 → io4it-0.0.0.12.7}/io4it.egg-info/requires.txt +0 -0
- {io4it-0.0.0.12.5 → io4it-0.0.0.12.7}/io4it.egg-info/top_level.txt +0 -0
- {io4it-0.0.0.12.5 → io4it-0.0.0.12.7}/orangecontrib/IO4IT/__init__.py +0 -0
- {io4it-0.0.0.12.5 → io4it-0.0.0.12.7}/orangecontrib/IO4IT/ocr_function/__init__.py +0 -0
- {io4it-0.0.0.12.5 → io4it-0.0.0.12.7}/orangecontrib/IO4IT/ocr_function/word_converter.py +0 -0
- {io4it-0.0.0.12.5 → io4it-0.0.0.12.7}/orangecontrib/IO4IT/widgets/OWMarkdownizer.py +0 -0
- {io4it-0.0.0.12.5 → io4it-0.0.0.12.7}/orangecontrib/IO4IT/widgets/OWPathPropagator.py +0 -0
- {io4it-0.0.0.12.5 → io4it-0.0.0.12.7}/orangecontrib/IO4IT/widgets/OWS3Uploader.py +0 -0
- {io4it-0.0.0.12.5 → io4it-0.0.0.12.7}/orangecontrib/IO4IT/widgets/OWS3downloader.py +0 -0
- {io4it-0.0.0.12.5 → io4it-0.0.0.12.7}/orangecontrib/IO4IT/widgets/OWS3list.py +0 -0
- {io4it-0.0.0.12.5 → io4it-0.0.0.12.7}/orangecontrib/IO4IT/widgets/OWSpeechToText.py +0 -0
- {io4it-0.0.0.12.5 → io4it-0.0.0.12.7}/orangecontrib/IO4IT/widgets/OWwordpdf2docx.py +0 -0
- {io4it-0.0.0.12.5 → io4it-0.0.0.12.7}/orangecontrib/IO4IT/widgets/__init__.py +0 -0
- {io4it-0.0.0.12.5 → io4it-0.0.0.12.7}/orangecontrib/IO4IT/widgets/designer/ow_in_or_out_path.ui +0 -0
- {io4it-0.0.0.12.5 → io4it-0.0.0.12.7}/orangecontrib/IO4IT/widgets/designer/owspeechtotext.ui +0 -0
- {io4it-0.0.0.12.5 → io4it-0.0.0.12.7}/orangecontrib/IO4IT/widgets/designer/wordpdf2docx.ui +0 -0
- {io4it-0.0.0.12.5 → io4it-0.0.0.12.7}/orangecontrib/IO4IT/widgets/icons/category.svg +0 -0
- {io4it-0.0.0.12.5 → io4it-0.0.0.12.7}/orangecontrib/IO4IT/widgets/icons/download.png +0 -0
- {io4it-0.0.0.12.5 → io4it-0.0.0.12.7}/orangecontrib/IO4IT/widgets/icons/in_or_out.png +0 -0
- {io4it-0.0.0.12.5 → io4it-0.0.0.12.7}/orangecontrib/IO4IT/widgets/icons/list_aws.png +0 -0
- {io4it-0.0.0.12.5 → io4it-0.0.0.12.7}/orangecontrib/IO4IT/widgets/icons/md.png +0 -0
- {io4it-0.0.0.12.5 → io4it-0.0.0.12.7}/orangecontrib/IO4IT/widgets/icons/speech_to_text.png +0 -0
- {io4it-0.0.0.12.5 → io4it-0.0.0.12.7}/orangecontrib/IO4IT/widgets/icons/upload.png +0 -0
- {io4it-0.0.0.12.5 → io4it-0.0.0.12.7}/orangecontrib/IO4IT/widgets/icons/wordpdf2docx.png +0 -0
- {io4it-0.0.0.12.5 → io4it-0.0.0.12.7}/orangecontrib/__init__.py +0 -0
- {io4it-0.0.0.12.5 → io4it-0.0.0.12.7}/setup.cfg +0 -0
|
@@ -0,0 +1,189 @@
|
|
|
1
|
+
import time
|
|
2
|
+
import warnings
|
|
3
|
+
from setuptools import setup, find_packages
|
|
4
|
+
import sys
|
|
5
|
+
import subprocess
|
|
6
|
+
import platform
|
|
7
|
+
from setuptools.command.install import install
|
|
8
|
+
|
|
9
|
+
def log_message(message, level="INFO"):
|
|
10
|
+
timestamp = time.strftime("%H:%M:%S")
|
|
11
|
+
border = "=" * (len(message) + 4)
|
|
12
|
+
print(f"\n{border}")
|
|
13
|
+
print(f"{timestamp} - {level} - {message}")
|
|
14
|
+
print(f"{border}\n")
|
|
15
|
+
|
|
16
|
+
class CustomInstall(install):
|
|
17
|
+
def run(self):
|
|
18
|
+
log_message(f"Début de l'installation de {NAME} v{VERSION}")
|
|
19
|
+
|
|
20
|
+
# Installation des dépendances de base
|
|
21
|
+
log_message("Étape 1/2 : Installation des dépendances principales")
|
|
22
|
+
install.run(self)
|
|
23
|
+
|
|
24
|
+
# Gestion CUDA si option spécifiée
|
|
25
|
+
if 'cuda' in sys.argv:
|
|
26
|
+
log_message("Option [cuda] détectée", "IMPORTANT")
|
|
27
|
+
self._install_torch_cuda()
|
|
28
|
+
else:
|
|
29
|
+
log_message("Mode CPU sélectionné", "NOTE")
|
|
30
|
+
self._warn_cuda_option()
|
|
31
|
+
|
|
32
|
+
def _install_torch_cuda(self):
|
|
33
|
+
try:
|
|
34
|
+
log_message("Vérification de l'environnement CUDA...")
|
|
35
|
+
import torch
|
|
36
|
+
if torch.cuda.is_available():
|
|
37
|
+
log_message(f"PyTorch CUDA déjà installé (v{torch.__version__}, CUDA v{torch.version.cuda})", "SUCCÈS")
|
|
38
|
+
return
|
|
39
|
+
else:
|
|
40
|
+
log_message("PyTorch installé mais CUDA non disponible", "AVERTISSEMENT")
|
|
41
|
+
except ImportError:
|
|
42
|
+
log_message("PyTorch non détecté", "INFO")
|
|
43
|
+
|
|
44
|
+
log_message("Tentative d'installation de PyTorch avec CUDA 12.6...", "IMPORTANT")
|
|
45
|
+
try:
|
|
46
|
+
cmd = [
|
|
47
|
+
sys.executable, '-m', 'pip', 'install',
|
|
48
|
+
'torch==2.6+cu126',
|
|
49
|
+
'torchvision==0.17.2+cu126',
|
|
50
|
+
'torchaudio==2.6+cu126',
|
|
51
|
+
'--index-url', 'https://download.pytorch.org/whl/cu126',
|
|
52
|
+
'--no-deps'
|
|
53
|
+
]
|
|
54
|
+
log_message(f"Commande exécutée: {' '.join(cmd)}", "DEBUG")
|
|
55
|
+
|
|
56
|
+
start_time = time.time()
|
|
57
|
+
subprocess.check_call(cmd)
|
|
58
|
+
duration = time.time() - start_time
|
|
59
|
+
|
|
60
|
+
log_message(f"PyTorch CUDA installé avec succès en {duration:.1f}s", "SUCCÈS")
|
|
61
|
+
|
|
62
|
+
# Vérification finale
|
|
63
|
+
import torch
|
|
64
|
+
log_message(f"Version PyTorch: {torch.__version__}", "INFO")
|
|
65
|
+
log_message(f"Version CUDA: {torch.version.cuda}", "INFO")
|
|
66
|
+
log_message(f"Disponibilité CUDA: {torch.cuda.is_available()}", "INFO")
|
|
67
|
+
|
|
68
|
+
except subprocess.CalledProcessError as e:
|
|
69
|
+
log_message("ÉCHEC de l'installation CUDA", "ERREUR")
|
|
70
|
+
log_message("Solution alternative:", "IMPORTANT")
|
|
71
|
+
print("\n\033[93m" + "="*80)
|
|
72
|
+
print("POUR INSTALLER MANUELLEMENT PYTORCH CUDA, EXÉCUTEZ:")
|
|
73
|
+
print("pip install torch==2.2.2+cu126 torchvision==0.17.2+cu126 torchaudio==2.2.2+cu126")
|
|
74
|
+
print("--index-url https://download.pytorch.org/whl/cu126")
|
|
75
|
+
print("="*80 + "\033[0m\n")
|
|
76
|
+
|
|
77
|
+
def _warn_cuda_option(self):
|
|
78
|
+
if platform.system() == "Windows":
|
|
79
|
+
log_message("ASTUCE: Pour activer CUDA sous Windows", "NOTE")
|
|
80
|
+
print("\033[94m" + "="*80)
|
|
81
|
+
print("Pour une version avec accélération GPU, utilisez plutôt:")
|
|
82
|
+
print("pip install io4it[cuda] --extra-index-url https://download.pytorch.org/whl/cu126")
|
|
83
|
+
print("="*80 + "\033[0m\n")
|
|
84
|
+
|
|
85
|
+
|
|
86
|
+
# Configuration
|
|
87
|
+
NAME = "io4it"
|
|
88
|
+
VERSION = "0.0.0.12.7" # Incrémentez la version
|
|
89
|
+
|
|
90
|
+
INSTALL_REQUIRES = [
|
|
91
|
+
"boto3",
|
|
92
|
+
"docling",
|
|
93
|
+
"docling-core",
|
|
94
|
+
"speechbrain",
|
|
95
|
+
"whisper",
|
|
96
|
+
"whisper-openai",
|
|
97
|
+
"pyannote.audio",
|
|
98
|
+
"pyannote.core",
|
|
99
|
+
"wave",
|
|
100
|
+
"scikit-learn",
|
|
101
|
+
# Exclure torch intentionnellement
|
|
102
|
+
]
|
|
103
|
+
# Facultatif / Adaptable à souhait
|
|
104
|
+
AUTHOR = ""
|
|
105
|
+
AUTHOR_EMAIL = ""
|
|
106
|
+
URL = ""
|
|
107
|
+
DESCRIPTION = ""
|
|
108
|
+
LICENSE = ""
|
|
109
|
+
|
|
110
|
+
# 'orange3 add-on' permet de rendre l'addon téléchargeable via l'interface addons d'Orange
|
|
111
|
+
KEYWORDS = ["orange3 add-on",]
|
|
112
|
+
|
|
113
|
+
# Tous les packages python existants dans le projet (avec un __ini__.py)
|
|
114
|
+
PACKAGES = find_packages()
|
|
115
|
+
PACKAGES = [pack for pack in PACKAGES if "orangecontrib" in pack and "IO4IT" in pack]
|
|
116
|
+
PACKAGES.append("orangecontrib")
|
|
117
|
+
print("####",PACKAGES)
|
|
118
|
+
|
|
119
|
+
|
|
120
|
+
|
|
121
|
+
# Fichiers additionnels aux fichiers .py (comme les icons ou des .ows)
|
|
122
|
+
PACKAGE_DATA = {
|
|
123
|
+
"orangecontrib.IO4IT.widgets": ["icons/*", "designer/*"],
|
|
124
|
+
}
|
|
125
|
+
# /!\ les noms de fichier 'orangecontrib.hkh_bot.widgets' doivent correspondre à l'arborescence
|
|
126
|
+
|
|
127
|
+
# Dépendances
|
|
128
|
+
# Dans votre setup.py principal
|
|
129
|
+
INSTALL_REQUIRES = [
|
|
130
|
+
"boto3",
|
|
131
|
+
"docling",
|
|
132
|
+
"docling-core",
|
|
133
|
+
"speechbrain",
|
|
134
|
+
"whisper",
|
|
135
|
+
"whisper-openai",
|
|
136
|
+
"pyannote.audio",
|
|
137
|
+
"pyannote.core",
|
|
138
|
+
"wave",
|
|
139
|
+
"scikit-learn",
|
|
140
|
+
# NE PAS inclure torch ici
|
|
141
|
+
]
|
|
142
|
+
|
|
143
|
+
EXTRAS_REQUIRE = {
|
|
144
|
+
'cuda': [
|
|
145
|
+
'torch==2.6+cu126; platform_system=="Windows"',
|
|
146
|
+
'torchvision==0.17.2+cu126; platform_system=="Windows"',
|
|
147
|
+
'torchaudio==2.6+cu126; platform_system=="Windows"'
|
|
148
|
+
],
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
# Spécifie le dossier contenant les widgets et le nom de section qu'aura l'addon sur Orange
|
|
152
|
+
ENTRY_POINTS = {
|
|
153
|
+
"orange.widgets": (
|
|
154
|
+
"Advanced Artificial Intelligence Tools = orangecontrib.IO4IT.widgets",
|
|
155
|
+
)
|
|
156
|
+
}
|
|
157
|
+
# /!\ les noms de fichier 'orangecontrib.hkh_bot.widgets' doivent correspondre à l'arborescence
|
|
158
|
+
|
|
159
|
+
NAMESPACE_PACKAGES = ["orangecontrib"]
|
|
160
|
+
|
|
161
|
+
|
|
162
|
+
|
|
163
|
+
# Message informatif si on est sous Windows
|
|
164
|
+
if platform.system() == "Windows":
|
|
165
|
+
warnings.warn(
|
|
166
|
+
"Vous êtes sur Windows. Si vous avez une carte NVIDIA CUDA, installez avec :\n"
|
|
167
|
+
" pip install io4it[cuda] --extra-index-url https://download.pytorch.org/whl/cu126",
|
|
168
|
+
UserWarning
|
|
169
|
+
)
|
|
170
|
+
|
|
171
|
+
|
|
172
|
+
setup(
|
|
173
|
+
name=NAME,
|
|
174
|
+
version=VERSION,
|
|
175
|
+
author=AUTHOR,
|
|
176
|
+
author_email=AUTHOR_EMAIL,
|
|
177
|
+
url=URL,
|
|
178
|
+
license=LICENSE,
|
|
179
|
+
keywords=KEYWORDS,
|
|
180
|
+
packages=PACKAGES,
|
|
181
|
+
package_data=PACKAGE_DATA,
|
|
182
|
+
install_requires=INSTALL_REQUIRES,
|
|
183
|
+
entry_points=ENTRY_POINTS,
|
|
184
|
+
namespace_packages=NAMESPACE_PACKAGES,
|
|
185
|
+
cmdclass={
|
|
186
|
+
'install': CustomInstall,
|
|
187
|
+
},
|
|
188
|
+
)
|
|
189
|
+
|
io4it-0.0.0.12.5/setup.py
DELETED
|
@@ -1,145 +0,0 @@
|
|
|
1
|
-
from setuptools import setup, find_packages
|
|
2
|
-
import platform
|
|
3
|
-
import warnings
|
|
4
|
-
# orangecontrib/IO4IT/__init__.py
|
|
5
|
-
from setuptools import setup, find_packages
|
|
6
|
-
import sys
|
|
7
|
-
import subprocess
|
|
8
|
-
from setuptools.command.install import install
|
|
9
|
-
|
|
10
|
-
from setuptools import setup, find_packages
|
|
11
|
-
import sys
|
|
12
|
-
import subprocess
|
|
13
|
-
import platform
|
|
14
|
-
from setuptools.command.install import install
|
|
15
|
-
|
|
16
|
-
class CustomInstall(install):
|
|
17
|
-
def run(self):
|
|
18
|
-
# Installation normale d'abord
|
|
19
|
-
install.run(self)
|
|
20
|
-
|
|
21
|
-
# Vérification CUDA seulement sur Windows
|
|
22
|
-
if platform.system() == "Windows":
|
|
23
|
-
self._install_torch_cuda()
|
|
24
|
-
|
|
25
|
-
def _install_torch_cuda(self):
|
|
26
|
-
try:
|
|
27
|
-
import torch
|
|
28
|
-
if torch.cuda.is_available():
|
|
29
|
-
print("\n PyTorch CUDA est déjà installé et fonctionnel")
|
|
30
|
-
return
|
|
31
|
-
except ImportError:
|
|
32
|
-
pass
|
|
33
|
-
|
|
34
|
-
print("\n\n Tentative d'installation de PyTorch CUDA 12.6...")
|
|
35
|
-
try:
|
|
36
|
-
subprocess.check_call([
|
|
37
|
-
sys.executable, '-m', 'pip', 'install',
|
|
38
|
-
'torch==2.2.2+cu126',
|
|
39
|
-
'torchvision==0.17.2+cu126',
|
|
40
|
-
'torchaudio==2.2.2+cu126',
|
|
41
|
-
'--index-url', 'https://download.pytorch.org/whl/cu126',
|
|
42
|
-
'--no-deps' # Évite de réinstaller les dépendances existantes
|
|
43
|
-
])
|
|
44
|
-
print("\n\n PyTorch CUDA installé avec succès")
|
|
45
|
-
except subprocess.CalledProcessError:
|
|
46
|
-
print("\n\n ÉCHEC de l'installation automatique de PyTorch CUDA")
|
|
47
|
-
print("Veuillez exécuter MANUELLEMENT cette commande :")
|
|
48
|
-
print("pip install torch==2.2.2+cu126 torchvision==0.17.2+cu126 torchaudio==2.2.2+cu126 --index-url https://download.pytorch.org/whl/cu126")
|
|
49
|
-
|
|
50
|
-
# Configuration
|
|
51
|
-
NAME = "io4it"
|
|
52
|
-
VERSION = "0.0.0.12.5" # Incrémentez la version
|
|
53
|
-
|
|
54
|
-
INSTALL_REQUIRES = [
|
|
55
|
-
"boto3",
|
|
56
|
-
"docling",
|
|
57
|
-
"docling-core",
|
|
58
|
-
"speechbrain",
|
|
59
|
-
"whisper",
|
|
60
|
-
"whisper-openai",
|
|
61
|
-
"pyannote.audio",
|
|
62
|
-
"pyannote.core",
|
|
63
|
-
"wave",
|
|
64
|
-
"scikit-learn",
|
|
65
|
-
# Exclure torch intentionnellement
|
|
66
|
-
]
|
|
67
|
-
# Facultatif / Adaptable à souhait
|
|
68
|
-
AUTHOR = ""
|
|
69
|
-
AUTHOR_EMAIL = ""
|
|
70
|
-
URL = ""
|
|
71
|
-
DESCRIPTION = ""
|
|
72
|
-
LICENSE = ""
|
|
73
|
-
|
|
74
|
-
# 'orange3 add-on' permet de rendre l'addon téléchargeable via l'interface addons d'Orange
|
|
75
|
-
KEYWORDS = ["orange3 add-on",]
|
|
76
|
-
|
|
77
|
-
# Tous les packages python existants dans le projet (avec un __ini__.py)
|
|
78
|
-
PACKAGES = find_packages()
|
|
79
|
-
PACKAGES = [pack for pack in PACKAGES if "orangecontrib" in pack and "IO4IT" in pack]
|
|
80
|
-
PACKAGES.append("orangecontrib")
|
|
81
|
-
print("####",PACKAGES)
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
# Fichiers additionnels aux fichiers .py (comme les icons ou des .ows)
|
|
86
|
-
PACKAGE_DATA = {
|
|
87
|
-
"orangecontrib.IO4IT.widgets": ["icons/*", "designer/*"],
|
|
88
|
-
}
|
|
89
|
-
# /!\ les noms de fichier 'orangecontrib.hkh_bot.widgets' doivent correspondre à l'arborescence
|
|
90
|
-
|
|
91
|
-
# Dépendances
|
|
92
|
-
# Dans votre setup.py principal
|
|
93
|
-
INSTALL_REQUIRES = [
|
|
94
|
-
"boto3",
|
|
95
|
-
"docling",
|
|
96
|
-
"docling-core",
|
|
97
|
-
"speechbrain",
|
|
98
|
-
"whisper",
|
|
99
|
-
"whisper-openai",
|
|
100
|
-
"pyannote.audio",
|
|
101
|
-
"pyannote.core",
|
|
102
|
-
"wave",
|
|
103
|
-
"scikit-learn",
|
|
104
|
-
# NE PAS inclure torch ici
|
|
105
|
-
]
|
|
106
|
-
|
|
107
|
-
# Spécifie le dossier contenant les widgets et le nom de section qu'aura l'addon sur Orange
|
|
108
|
-
ENTRY_POINTS = {
|
|
109
|
-
"orange.widgets": (
|
|
110
|
-
"Advanced Artificial Intelligence Tools = orangecontrib.IO4IT.widgets",
|
|
111
|
-
)
|
|
112
|
-
}
|
|
113
|
-
# /!\ les noms de fichier 'orangecontrib.hkh_bot.widgets' doivent correspondre à l'arborescence
|
|
114
|
-
|
|
115
|
-
NAMESPACE_PACKAGES = ["orangecontrib"]
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
# Message informatif si on est sous Windows
|
|
120
|
-
if platform.system() == "Windows":
|
|
121
|
-
warnings.warn(
|
|
122
|
-
"Vous êtes sur Windows. Si vous avez une carte NVIDIA CUDA, installez avec :\n"
|
|
123
|
-
" pip install io4it[cuda] --extra-index-url https://download.pytorch.org/whl/cu126",
|
|
124
|
-
UserWarning
|
|
125
|
-
)
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
setup(
|
|
129
|
-
name=NAME,
|
|
130
|
-
version=VERSION,
|
|
131
|
-
author=AUTHOR,
|
|
132
|
-
author_email=AUTHOR_EMAIL,
|
|
133
|
-
url=URL,
|
|
134
|
-
license=LICENSE,
|
|
135
|
-
keywords=KEYWORDS,
|
|
136
|
-
packages=PACKAGES,
|
|
137
|
-
package_data=PACKAGE_DATA,
|
|
138
|
-
install_requires=INSTALL_REQUIRES,
|
|
139
|
-
entry_points=ENTRY_POINTS,
|
|
140
|
-
namespace_packages=NAMESPACE_PACKAGES,
|
|
141
|
-
cmdclass={
|
|
142
|
-
'install': CustomInstall,
|
|
143
|
-
},
|
|
144
|
-
)
|
|
145
|
-
|
|
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
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{io4it-0.0.0.12.5 → io4it-0.0.0.12.7}/orangecontrib/IO4IT/widgets/designer/ow_in_or_out_path.ui
RENAMED
|
File without changes
|
{io4it-0.0.0.12.5 → io4it-0.0.0.12.7}/orangecontrib/IO4IT/widgets/designer/owspeechtotext.ui
RENAMED
|
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
|