organisation en module python

This commit is contained in:
Daniel STAN 2015-06-01 21:41:27 +02:00
parent 58bbcde8ee
commit f826e0ebc6
5 changed files with 21 additions and 9 deletions

12
DEV
View file

@ -1,11 +1,5 @@
Pour tester rapidement ses modifs : Pour tester rapidement ses modifs, utiliser cette technique d'installation :
depuis la racine du dépôt:
ln -s `pwd`/utils/dev_cpasswords ~/bin/cpasswords
Contenu de mon ~/bin/cranspasswords <EOF
#!/bin/sh
CRANSPASSWORDS_CLIENT_CONFIG_DIR=~/.config/cranspasswords ~/crans/cranspasswords/client.py "$@"
EOF
où ~/crans/cranspasswords est le chemin vers mon dépôt git.
Penser à effacer tout clientconfig.pyc? résiduel du dépôt.

4
cpasswords/__init__.py Normal file
View file

@ -0,0 +1,4 @@
"""Module de cpasswords.
Pas encore en prod.
"""

1
cpasswords/client.py Symbolic link
View file

@ -0,0 +1 @@
../client.py

1
cpasswords/server.py Symbolic link
View file

@ -0,0 +1 @@
../server.py

12
utils/dev_cpasswords Executable file
View file

@ -0,0 +1,12 @@
#!/bin/bash
# Où trouver le paquet python
PKG_DIR=~/cranspasswords
# Où trouver la conf client
CONF=~/.config/cpasswords
# Binaire python
PYTHON=/usr/bin/python
/usr/bin/env PYTHONPATH=$PKG_DIR CRANSPASSWORDS_CLIENT_CONFIG_DIR=$CONF $PYTHON $PKG_DIR/cpasswords/client.py "$@"