creer_son_propre_package_python
Différences
Ci-dessous, les différences entre deux révisions de la page.
| Les deux révisions précédentesRévision précédenteProchaine révision | Révision précédente | ||
| creer_son_propre_package_python [2018/08/11 09:58] – serge | creer_son_propre_package_python [2018/09/27 15:54] (Version actuelle) – [Utilisation] serge | ||
|---|---|---|---|
| Ligne 1: | Ligne 1: | ||
| ======Python: | ======Python: | ||
| - | Cette page utilise un exemple | + | Cette page utilise un exemple |
| - | * pymultilame | + | * pymultilame |
| - | disponible à https:// | + | **Validé sur debian stretch 9.2 avec pip3** |
| - | + | ||
| - | **Validé sur debian stretch 9.2 avec pip** | + | |
| ===== Ressources ===== | ===== Ressources ===== | ||
| Ligne 14: | Ligne 12: | ||
| Un article de Sam pas récent mais bien écrit comme toujours, pour le **Choix des outils**, setuptools et pip | Un article de Sam pas récent mais bien écrit comme toujours, pour le **Choix des outils**, setuptools et pip | ||
| - | * http:// | + | * [[http:// |
| === GALODE Alexandre sur developpez.com === | === GALODE Alexandre sur developpez.com === | ||
| - | * http:// | + | * [[http:// |
| === Diverses === | === Diverses === | ||
| - | * https:// | + | * [[https:// |
| - | * https:// | + | * [[https:// |
| - | * http:// | + | * [[http:// |
| - | * https:// | + | * [[https:// |
| ===== Structure du dossier ===== | ===== Structure du dossier ===== | ||
| < | < | ||
| - | |||
| pymultilame/ | pymultilame/ | ||
| | | | | ||
| + | +-- .gitignoe | ||
| + __init__.py avec rien ou quelque chose | + __init__.py avec rien ou quelque chose | ||
| +-- setup.py | +-- setup.py | ||
| Ligne 38: | Ligne 36: | ||
| +-- LICENSE | +-- LICENSE | ||
| +-- MANIFEST.in | +-- MANIFEST.in | ||
| + | +-- doc | ||
| +-- / | +-- / | ||
| - | | | ||
| - | /network | ||
| | | | | ||
| - | + labfifolist.py | + | + __init__.py |
| - | + labconfig.py | + | + tcpclient.py |
| + | + http_download.py | ||
| etc .... | etc .... | ||
| </ | </ | ||
| Ligne 52: | Ligne 50: | ||
| # | # | ||
| - | from distutils.core | + | from setuptools |
| setup( | setup( | ||
| name=' | name=' | ||
| - | | + | |
| - | | + | |
| - | | + | |
| + | packages_dir = {'' | ||
| author=' | author=' | ||
| + | description=' | ||
| url=' | url=' | ||
| download_url=' | download_url=' | ||
| license=' | license=' | ||
| keywords = [" | keywords = [" | ||
| - | classifiers = [ " | + | classifiers = [ " |
| - | | + | |
| " | " | ||
| " | " | ||
| Ligne 73: | Ligne 72: | ||
| "Topic :: Network", | "Topic :: Network", | ||
| "Topic :: System" | "Topic :: System" | ||
| - | long_description = """ | + | long_description=open(' |
| - | Tools used every day | + | ) |
| - | | + | </ |
| - | Tools used in Blender Game Engine and Python Script | + | |
| - | """, | + | |
| - | py_modules=[' | + | ====Exemple de __init__.py==== |
| - | ' | + | <file python __init__.py> |
| - | ' | + | # |
| - | ' | + | # -*- coding: utf-8 -*- |
| - | ' | + | |
| - | ' | + | """ |
| - | ' | + | Ce module propose les outils les plus courrant que j'utilise, |
| - | ' | + | et aussi pour retrouver des syntaxes peu utilisée que je n'ai pas en mémoire, |
| - | ' | + | mais qui nécessiterait des recherches. |
| - | ' | + | """ |
| - | ' | + | |
| - | ' | + | |
| - | ' | + | |
| - | ' | + | |
| - | ' | + | |
| - | ' | + | |
| - | ' | + | |
| - | ' | + | |
| - | ' | + | |
| - | ) | + | |
| - | </ | + | |
| - | ===== Ressources sur toutes les possibilités des classifiers ===== | + | name = " |
| + | |||
| + | from pymultilame.http_download import HttpDownload | ||
| + | from pymultilame.mytools import MyTools | ||
| + | from pymultilame.tcpclient import TcpClient | ||
| + | |||
| + | </ | ||
| - | * https:// | + | ==== Ressources sur toutes les possibilités des classifiers ==== |
| + | * [[https:// | ||
| ===== Installation ===== | ===== Installation ===== | ||
| - | ==== Directe | + | ==== Dans le home, dans le dossier des sources ==== |
| + | Pour le développement, | ||
| - | | + | |
| + | |||
| + | | ||
| ==== Avec pip et téléchargement sur github ==== | ==== Avec pip et téléchargement sur github ==== | ||
| Ligne 118: | Ligne 114: | ||
| sudo pip3 install --upgrade git+https:// | sudo pip3 install --upgrade git+https:// | ||
| - | ==== Utilisation ==== | + | =====Utilisation===== |
| - | + | * Voir Mes outils personnel | |
| - | <code python> | + | |
| - | import pymultilame | + | |
| - | + | ||
| - | ou | + | |
| - | + | ||
| - | from pymultilame import network.labtcpclient | + | |
| - | </ | + | |
| - | + | ||
| - | ====== A faire ====== | + | |
| - | + | ||
| - | * créer une doc avec sphinx ou doxygen | + | |
| {{tag> | {{tag> | ||
creer_son_propre_package_python.1533981485.txt.gz · Dernière modification : de serge
