seo-dev-env 0.1.1__py3-none-any.whl → 0.1.2__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.
seo/generators.py CHANGED
@@ -98,21 +98,28 @@ class IntermediaireWebGenerator(EnvironnementGenerator):
98
98
  class ProWebGenerator(EnvironnementGenerator):
99
99
  """Générateur pro - Applications professionnelles"""
100
100
 
101
- def __init__(self, chemin):
102
- super().__init__('pro', 'web', chemin)
103
- self.packages = [
104
- 'flask',
105
- 'flask-restx',
106
- 'flask-cors',
107
- 'flask-sqlalchemy',
108
- 'flask-migrate',
109
- 'flask-jwt-extended',
110
- 'python-dotenv',
111
- 'gunicorn',
112
- 'psycopg2-binary'
113
- ]
114
-
115
- def _post_creation(self):
101
+ def __init__(self, chemin):
102
+ super().__init__('pro', 'web', chemin)
103
+ self.packages = [
104
+ 'flask',
105
+ 'flask-restx',
106
+ 'flask-cors',
107
+ 'flask-sqlalchemy',
108
+ 'flask-migrate',
109
+ 'flask-jwt-extended',
110
+ 'python-dotenv',
111
+ 'gunicorn',
112
+ 'psycopg2-binary'
113
+ ]
114
+
115
+ def _creer_structure(self):
116
+ # Création du fichier requirements
117
+ creer_fichier(
118
+ self.chemin_projet / 'requirements.txt',
119
+ "\n".join(self.packages)
120
+ )
121
+
122
+ def _post_creation(self):
116
123
  # Initialiser un dépôt Git
117
124
  try:
118
125
  subprocess.run(['git', 'init', str(self.chemin_projet)], check=True)
seo/utils.py CHANGED
@@ -1,24 +1,32 @@
1
- import os
2
- from pathlib import Path
3
-
4
- def creer_fichier(chemin, contenu):
5
- """Crée un fichier avec le contenu spécifié"""
6
- chemin = Path(chemin)
7
- chemin.parent.mkdir(parents=True, exist_ok=True)
8
- with open(chemin, 'w', encoding='utf-8') as f:
9
- f.write(contenu)
10
-
11
- def copier_dossier(source, destination):
12
- """Copie récursivement un dossier"""
13
- source = Path(source)
14
- destination = Path(destination)
15
-
16
- destination.mkdir(parents=True, exist_ok=True)
17
-
18
- for item in source.iterdir():
19
- dest_item = destination / item.name
20
- if item.is_dir():
21
- copier_dossier(item, dest_item)
22
- else:
23
- with open(item, 'r', encoding='utf-8') as src_file:
24
- creer_fichier(dest_item, src_file.read())
1
+ import os
2
+ import shutil
3
+ from pathlib import Path
4
+
5
+ def creer_fichier(chemin, contenu):
6
+ """Crée un fichier avec le contenu spécifié"""
7
+ chemin = Path(chemin)
8
+ chemin.parent.mkdir(parents=True, exist_ok=True)
9
+ with open(chemin, 'w', encoding='utf-8') as f:
10
+ f.write(contenu)
11
+
12
+ def copier_dossier(source, destination):
13
+ """Copie récursivement un dossier"""
14
+ source = Path(source)
15
+ destination = Path(destination)
16
+
17
+ destination.mkdir(parents=True, exist_ok=True)
18
+
19
+ for item in source.iterdir():
20
+ # Skip .gitignore and other hidden files that might have encoding issues
21
+ if item.name.startswith('.'):
22
+ continue
23
+
24
+ dest_item = destination / item.name
25
+ if item.is_dir():
26
+ copier_dossier(item, dest_item)
27
+ else:
28
+ # Use shutil.copy2 to preserve metadata and handle binary files
29
+ try:
30
+ shutil.copy2(item, dest_item)
31
+ except Exception as e:
32
+ print(f"⚠️ Erreur lors de la copie de {item.name}: {e}")
@@ -1,8 +1,8 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: seo-dev-env
3
- Version: 0.1.1
3
+ Version: 0.1.2
4
4
  Summary: Générateur d'environnements de développement pour tous niveaux
5
- Home-page: https://github.com/https://github.com/elkast/seo-dev-env
5
+ Home-page: https://github.com/elkast/seo-dev-env
6
6
  Author: Votre Nom
7
7
  Author-email: orsinimelchisedek@gmail.com
8
8
  Classifier: Programming Language :: Python :: 3
@@ -1,8 +1,8 @@
1
1
  seo/__init__.py,sha256=5_-smvpT5QbwLmxKXc4X-JfmzFuyueswNbCKCQIGftA,174
2
2
  seo/cli.py,sha256=svTbLiZHUuD5_PUBkeNzl-hjELggT_wHH_VDxymJfkk,6224
3
3
  seo/commandes.py,sha256=IV2adIYBdP8PjZoE6MK9D0ZXrow1M7B6CX2TYQD99Io,3150
4
- seo/generators.py,sha256=C-ACHq1Qgc97lynzLChCTvthknwPyR1v2O5sz3AkMNU,12079
5
- seo/utils.py,sha256=ocTb_CotkmmB_5aZSZXGCG_gJNaC9GdvZFb2ayWHaLE,794
4
+ seo/generators.py,sha256=cXpXny_w6lXDY4XG_LjpQoYN-HnNB8PAb_4nxh064Gk,12268
5
+ seo/utils.py,sha256=ssHO8tNVJPKSTcfxRlFfijtNzZ2i1USOzMogQK9OviA,1067
6
6
  seo/templates/debutant/app.py,sha256=NqLiFgvPttDi_Ce5O-oT0yiPtViTfbkWSuLpN1QRNDU,444
7
7
  seo/templates/debutant/index.html,sha256=GWGIhLUjvY22vOgxO-s1ocU752KeR057CQEG4cTSwtE,1557
8
8
  seo/templates/debutant/style.css,sha256=pIa_Il6FDr-WVS1x3IS9F0kYiDJTYIP4PjuHFnoj_7A,1661
@@ -30,9 +30,9 @@ seo/templates/pro/app/core/config.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZ
30
30
  seo/templates/pro/app/core/security.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
31
31
  seo/templates/pro/app/db/base.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
32
32
  seo/templates/pro/app/db/models.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
33
- seo_dev_env-0.1.1.dist-info/licenses/LICENSE.ls,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
34
- seo_dev_env-0.1.1.dist-info/METADATA,sha256=bHetYBZ8SMFVIKGvQ1iMGjbmHNk3rlUVt10NqCicWIU,13961
35
- seo_dev_env-0.1.1.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
36
- seo_dev_env-0.1.1.dist-info/entry_points.txt,sha256=tAn_vOcrXDG6ilFg7Zvacd4bf9fQXAhsmimMr9lEU84,96
37
- seo_dev_env-0.1.1.dist-info/top_level.txt,sha256=5WsA3DhwhBGXTOKiKgDtiTUjXlpLk4oeUvrSKrtRFoQ,4
38
- seo_dev_env-0.1.1.dist-info/RECORD,,
33
+ seo_dev_env-0.1.2.dist-info/licenses/LICENSE.ls,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
34
+ seo_dev_env-0.1.2.dist-info/METADATA,sha256=NsR7chxa3ym32ovKhaPLcsRnGRNr0cQxeEvcA-cvwAQ,13942
35
+ seo_dev_env-0.1.2.dist-info/WHEEL,sha256=wUyA8OaulRlbfwMtmQsvNngGrxQHAvkKcvRmdizlJi0,92
36
+ seo_dev_env-0.1.2.dist-info/entry_points.txt,sha256=tAn_vOcrXDG6ilFg7Zvacd4bf9fQXAhsmimMr9lEU84,96
37
+ seo_dev_env-0.1.2.dist-info/top_level.txt,sha256=5WsA3DhwhBGXTOKiKgDtiTUjXlpLk4oeUvrSKrtRFoQ,4
38
+ seo_dev_env-0.1.2.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: setuptools (80.9.0)
2
+ Generator: setuptools (80.10.2)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
5
5