Initial commit

This commit is contained in:
Jérôme Schneider 2014-05-28 19:59:58 +02:00
commit 6e74be3365
38 changed files with 1214 additions and 0 deletions

3
MANIFEST.in Normal file
View File

@ -0,0 +1,3 @@
include COPYING MANIFEST.in VERSION
recursive-include rp_meyzieu/templates *.html
recursive-include rp_meyzieu/static *

9
conf.d/certs/saml.crt Normal file
View File

@ -0,0 +1,9 @@
-----BEGIN PUBLIC KEY-----
MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAxdbs+ZLkuz0DISpAKhHn
WvNBSW4G0xmlUyZcjUWDQlJH7wC3yxhjioQ2oFpxqcuNf5ft/E1E5KUTqZhcKyX9
i7XCmhPoea/fmYH3Egxbucv7++sM+TyZpUWbA0TZHBYAjcUPR/1HTcEz3bl0SqB0
EdjhN5PpXPu1p4pGDPXc4aIkEpFU3mlK+TlV5SrivEqNS/SI14VA9g2WWdJk4+CK
PgozCfeiFtaiu2zem4uQSmd5AG0f0Av4jzxgut22owFYi9PV+Yl0cWoMOUphAwsR
RE4gckEqbhLYluAy+VglgzfT4YCXBQ6o23EH0Z0tW28KnIYEY4dQkLca9YRAKhHc
ywIDAQAB
-----END PUBLIC KEY-----

27
conf.d/certs/saml.key Normal file
View File

@ -0,0 +1,27 @@
-----BEGIN RSA PRIVATE KEY-----
MIIEogIBAAKCAQEAxdbs+ZLkuz0DISpAKhHnWvNBSW4G0xmlUyZcjUWDQlJH7wC3
yxhjioQ2oFpxqcuNf5ft/E1E5KUTqZhcKyX9i7XCmhPoea/fmYH3Egxbucv7++sM
+TyZpUWbA0TZHBYAjcUPR/1HTcEz3bl0SqB0EdjhN5PpXPu1p4pGDPXc4aIkEpFU
3mlK+TlV5SrivEqNS/SI14VA9g2WWdJk4+CKPgozCfeiFtaiu2zem4uQSmd5AG0f
0Av4jzxgut22owFYi9PV+Yl0cWoMOUphAwsRRE4gckEqbhLYluAy+VglgzfT4YCX
BQ6o23EH0Z0tW28KnIYEY4dQkLca9YRAKhHcywIDAQABAoIBAHS7XPXhW36zAD64
XEW2bKj4cOQvvG0ga7EFKITeqBUg0XrPFKMMD+eyHT0+QGSsSyAm9+/vc5/pWxGt
aWy4LMMbiug4qOnsAOXljm+ixRh6qIK67Nu+ivW+fTlPjT8KKGd+B4c1hbX2MnE4
NMq3o+TH8BNH/eC0UDm715tcEmk6pUSBH3lq3CG7W1TyVjC3FGJcjBAj/X6J45lE
skJHt9d67KG/MwmzuyoI+U9q2b3jSzoIGzzQQaOItGx3OefRjqWeUyDlUWobuFNV
Lky+XjmOFJC0voQsUiV2mBSJejHmfuLjJfE+W/HrRc3YwftxCp+emaFshs56U4Ob
UWu2F9kCgYEA7livJ1nYhHVyYueX6kWKTkBCzcwQO0agLsuYpspDjKGqgUOlFHXW
9CS+DPi/r086iRYLwmGuaFAnNQJqS3ofjowj9/iZCGD/qe6jj9zMmokWDl1FALYe
jT3Eg1HLfhe8hddA815yheL5uIVw3t34TTaQuokN86nkcv/bJ53SW4UCgYEA1H4v
jk88pCNnADqmAnXNbuhPK+w6llre159vtStgKaJrcCZiTejFVpffpdp1b8hU21S2
lg/FgXHgvrdfwq+uZ+lRNJGyCX3mqe3uXWn6d42A/7tgmRDW4NXtxwelV8MTpwHw
nS4hwmDyLyYMupyBlw5Iv7N3XmDBJu/tsEPMgA8CgYBP5MpRlnxNalD9dkQl80l5
EXFTKqQGOpZXGUgCIKqj6U0OJ26efSGglPBfyMH4McadTRaEAdpEfRmnWzfmNPl+
/trPtDUX6evJOoT5JDoxUuJhzkHjCykSjzHgEvrzOWGoO486BN6+omayw4giLKWe
vDunS2mx07EQG1OK5AwvQQKBgCZY21YwQH5SkTz+WIUrIza3n8oKaIxHu91nvW4R
dNouoHrtwmHS9wHoiIjSwsy4d2/ZetXb5MW2eluQlix5Ld08wtXc0SdbXCwgbxrW
jEfU9omwE/+rhUuv76gyXglXgA1skTKcZ6U/f5U4paVrpwtOnZxS0+DpTxIqzFc5
9QbLAoGAeqLr0vm4SKnvtwK9F/Q784Rc8Ygq56vUcQIZ81yL4BsE0h6fuTHcSq+H
NhO5mQFr+CcitGDE48/CRxfw1HYpk+KOtRzY+EdKGAKEu26sUSh7GNCw3TkOvPTo
E/RgydWsPwjJBDp03z87cITfaoyqoIWLtEmUTeDY8m5dGu0EBzk=
-----END RSA PRIVATE KEY-----

View File

@ -0,0 +1,11 @@
{
"site_name": "linuxfr",
"server_name": ["linuxfrsaml.local:8000"],
"location": "/",
"target": "https://linuxfr.org",
"mapper": "linuxfr",
"auth_type": "saml2",
"saml2_idp_metadata": "http://www.identity-hub.com/idp/saml2/metadata",
"saml2_signature_public_key": "certs/saml.crt",
"saml2_signature_private_key": "certs/saml.key"
}

11
conf.d/portatil_famille Normal file
View File

@ -0,0 +1,11 @@
{
"site_name": "portail_famille",
"server_name": ["portail-famille.local:8000"],
"location": "/",
"target": "http://villes2.portail-familles.com:8080",
"mapper": "portail_famille_ecities",
"auth_type": "saml2",
"saml2_idp_metadata": "http://www.identity-hub.com/idp/saml2/metadata",
"saml2_signature_public_key": "certs/saml.crt",
"saml2_signature_private_key": "certs/saml.key"
}

2
data/README Normal file
View File

@ -0,0 +1,2 @@
Folder where Mandaye files will be stored.
It's only use to store metadata files.

View File

@ -0,0 +1,18 @@
<?xml version="1.0"?>
<ns0:EntityDescriptor xmlns:ns0="urn:oasis:names:tc:SAML:2.0:metadata" xmlns:ns1="http://www.w3.org/2000/09/xmldsig#" entityID="http://www.identity-hub.com/idp/saml2/metadata"><ns0:IDPSSODescriptor protocolSupportEnumeration="urn:oasis:names:tc:SAML:2.0:protocol"><ns0:KeyDescriptor><ns1:KeyInfo><ns1:X509Data><ns1:X509Certificate>MIIDIzCCAgugAwIBAgIJANUBoick1pDpMA0GCSqGSIb3DQEBBQUAMBUxEzARBgNV
BAoTCkVudHJvdXZlcnQwHhcNMTAxMjE0MTUzMzAyWhcNMTEwMTEzMTUzMzAyWjAV
MRMwEQYDVQQKEwpFbnRyb3V2ZXJ0MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIB
CgKCAQEAvxFkfPdndlGgQPDZgFGXbrNAc/79PULZBuNdWFHDD9P5hNhZn9Kqm4Cp
06Pe/A6u+g5wLnYvbZQcFCgfQAEzziJtb3J55OOlB7iMEI/T2AX2WzrUH8QT8NGh
ABONKU2Gg4XiyeXNhH5R7zdHlUwcWq3ZwNbtbY0TVc+n665EbrfV/59xihSqsoFr
kmBLH0CoepUXtAzA7WDYn8AzusIuMx3n8844pJwgxhTB7Gjuboptlz9Hri8JRdXi
VT9OS9Wt69ubcNoM6zuKASmtm48UuGnhj8v6XwvbjKZrL9kA+xf8ziazZfvvw/VG
Tm+IVFYB7d1x457jY5zjjXJvNysoowIDAQABo3YwdDAdBgNVHQ4EFgQUeF8ePnu0
fcAK50iBQDgAhHkOu8kwRQYDVR0jBD4wPIAUeF8ePnu0fcAK50iBQDgAhHkOu8mh
GaQXMBUxEzARBgNVBAoTCkVudHJvdXZlcnSCCQDVAaInJNaQ6TAMBgNVHRMEBTAD
AQH/MA0GCSqGSIb3DQEBBQUAA4IBAQAy8l3GhUtpPHx0FxzbRHVaaUSgMwYKGPhE
IdGhqekKUJIx8et4xpEMFBl5XQjBNq/mp5vO3SPb2h2PVSks7xWnG3cvEkqJSOeo
fEEhkqnM45b2MH1S5uxp4i8UilPG6kmQiXU2rEUBdRk9xnRWos7epVivTSIv1Ncp
lG6l41SXp6YgIb2ToT+rOKdIGIQuGDlzeR88fDxWEU0vEujZv/v1PE1YOV0xKjTT
JumlBc6IViKhJeo1wiBBrVRIIkKKevHKQzteK8pWm9CYWculxT26TZ4VWzGbo06j
o2zbumirrLLqnt1gmBDvDvlOwC/zAAyL4chbz66eQHTiIYZZvYgy</ns1:X509Certificate></ns1:X509Data></ns1:KeyInfo></ns0:KeyDescriptor><ns0:ArtifactResolutionService Binding="urn:oasis:names:tc:SAML:2.0:bindings:SOAP" Location="http://www.identity-hub.com/idp/saml2/artifact" index="1" /><ns0:SingleLogoutService Binding="urn:oasis:names:tc:SAML:2.0:bindings:HTTP-Redirect" Location="http://www.identity-hub.com/idp/saml2/slo" ResponseLocation="http://www.identity-hub.com/idp/saml2/slo_return" /><ns0:SingleLogoutService Binding="urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST" Location="http://www.identity-hub.com/idp/saml2/slo" ResponseLocation="http://www.identity-hub.com/idp/saml2/slo_return" /><ns0:SingleLogoutService Binding="urn:oasis:names:tc:SAML:2.0:bindings:SOAP" Location="http://www.identity-hub.com/idp/saml2/slo/soap" /><ns0:SingleSignOnService Binding="urn:oasis:names:tc:SAML:2.0:bindings:HTTP-Redirect" Location="http://www.identity-hub.com/idp/saml2/sso" /><ns0:SingleSignOnService Binding="urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST" Location="http://www.identity-hub.com/idp/saml2/sso" /></ns0:IDPSSODescriptor></ns0:EntityDescriptor>

20
local_config.py.example Normal file
View File

@ -0,0 +1,20 @@
## Virtual hosts configuration
hosts = {
'linuxfrsaml.local:8000': [
{
'path': r'/',
'target': 'http://linuxfr.org',
'mapping': 'rp_meyzieu.configs.linuxfr_saml_example.linuxfr_mapping'
},
],
}
## SQL Backend config
# http://docs.sqlalchemy.org/en/rel_0_7/core/engines.html
# rfc 1738 https://tools.ietf.org/html/rfc1738
# dialect+driver://username:password@host:port/database
db_url = 'sqlite:///test.db'
## Logging configuration
debug = False

77
manager.py Executable file
View File

@ -0,0 +1,77 @@
#! /usr/bin/python
# -*- coding: utf-8 -*-
""" Script to administrate mandaye server
"""
import os
os.environ['MANDAYE_CONFIG_MODULE'] = 'rp_meyzieu.config'
import base64
from optparse import OptionParser
from mandaye import config
from mandaye.log import logger
def get_cmd_options():
usage = "usage: %prog --createdb|--upgradedb|--cryptpwd"
parser = OptionParser(usage=usage)
parser.add_option("--createdb",
dest="createdb",
default=False,
action="store_true",
help="Create Mandaye database"
)
parser.add_option("--upgradedb",
dest="upgradedb",
default=False,
action="store_true",
help="Upgrade Mandaye database"
)
parser.add_option("--cryptpwd",
dest="cryptpwd",
default=False,
action="store_true",
help="Crypt external password in Mandaye's database"
)
(options, args) = parser.parse_args()
return options
def encrypt_pwd(pwd):
from Crypto.Cipher import AES
logger.debug("Encrypt password")
enc_pwd = pwd
if config.encrypt_secret:
try:
cipher = AES.new(config.encrypt_secret, AES.MODE_CFB)
enc_pwd = cipher.encrypt(pwd)
enc_pwd = base64.b64encode(enc_pwd)
except Exception, e:
if config.debug:
traceback.print_exc()
logger.warning('Password encrypting failed %s' % e)
else:
logger.warning("You must set a secret to use pwd encryption")
return enc_pwd
def main():
options = get_cmd_options()
if options.createdb or options.upgradedb:
logger.info("Creating or upgrading database...")
from alembic.config import Config
from alembic import command
from mandaye import global_config
alembic_cfg = Config(global_config.alembic_cfg)
alembic_cfg.set_main_option("script_location", global_config.alembic_script_path)
command.upgrade(alembic_cfg, "head")
logger.info("Database upgraded")
if options.cryptpwd:
from mandaye.backends.default import ManagerSPUser
for user in ManagerSPUser.all():
user.password = encrypt_pwd(user.password)
ManagerSPUser.save()
if __name__ == "__main__":
main()

3
requirements.txt Normal file
View File

@ -0,0 +1,3 @@
gunicorn>=0.17
mandaye>=0.8.0
whitenoise>=1.0

BIN
rp_meyzieu.db Normal file

Binary file not shown.

1
rp_meyzieu/__init__.py Normal file
View File

@ -0,0 +1 @@
__version__="0.1.0"

View File

View File

@ -0,0 +1,18 @@
"""
Here you can overload Mandaye default authentification
method like SAML2Auth or AuthForm
"""
from mandaye.auth.authform import AuthForm
from mandaye.auth.saml2 import SAML2Auth
class MyAuthSAML(SAML2Auth):
""" Overload Mandaye SAML2Auth authentification
"""
pass
class MyAuth(AuthForm):
""" Overload Mandaye AuthForm authentification
"""
pass

127
rp_meyzieu/config.py Normal file
View File

@ -0,0 +1,127 @@
import logging
import os
_PROJECT_PATH = os.path.join(os.path.dirname(__file__), '..')
## SQL Backend config
# Database configuration
# http://docs.sqlalchemy.org/en/rel_0_7/core/engines.html
# rfc 1738 https://tools.ietf.org/html/rfc1738
# dialect+driver://username:password@host:port/database
db_url = 'sqlite:///' + os.path.join(_PROJECT_PATH, 'rp_meyzieu.db')
debug = True
# Log configuration
LOGGING = {
'version': 1,
'disable_existing_loggers': True,
'formatters': {
'console': {
'format': '%(asctime)s %(levelname)s %(message)s',
'datefmt': '%H:%M:%S',
},
'file': {
'format': '%(asctime)s %(levelname)s %(uuid)s %(message)s',
'datefmt': '%Y-%m-%d %H:%M:%S'
}
},
'handlers': {
'console': {
'level': 'DEBUG',
'class': 'logging.StreamHandler',
'formatter': 'console'
},
'syslog': {
'level': 'INFO',
'class': 'entrouvert.logging.handlers.SysLogHandler',
'formatter': 'file',
'address': '/dev/log'
},
},
'loggers': {
'': {
'handlers': ['console'],
'level': 'DEBUG',
'propagate': False,
},
'mandaye': {
'handlers': ['console', 'syslog'],
'level': 'DEBUG',
'propagate': False,
},
'rp_meyzieu': {
'handlers': ['console', 'syslog'],
'level': 'DEBUG',
'propagate': False,
},
},
}
## PATH
# Template directory
template_directory = os.path.join(_PROJECT_PATH, 'rp_meyzieu/templates')
# Configuration directory
config_root = os.path.join(_PROJECT_PATH, 'conf.d')
# Static url
static_url = '/mandaye/static'
# Static folder
static_root = os.path.join(_PROJECT_PATH, 'rp_meyzieu/static')
# Data dir
data_dir = os.path.join(_PROJECT_PATH, 'data')
# Raven Sentry configuration
raven_dsn = None
# Email notification configuration
email_notification = False
email_prefix = '[Mandaye rp_meyzieu]'
smtp_host = 'localhost'
smtp_port = 25
email_from = 'traceback@entrouvert.com'
email_to = ['admin@localhost']
# Use long traceback with xtraceback
use_long_trace = True
# Ask Mandaye to auto decompress a response message
# Decompress response only if you load a filter
auto_decompress = True
# Encrypt service provider passwords with a secret
# You should install pycypto to use this feature
encrypt_sp_password = False
# Must be a 16, 24, or 32 bytes long
encrypt_secret = ''
# Supported authentification
authentifications = {
'saml2': 'mandaye.auth.saml2.SAML2Auth'
}
# sp mappers
mappers = {
'linuxfr': 'rp_meyzieu.mappers.linuxfr_example',
'portail_famille_ecities': 'rp_meyzieu.mappers.portail_famille_ecities',
}
# Beaker session configuration
session_opts = {
'session.type': 'file',
'session.cookie_expires': True,
'session.timeout': 3600,
'session.data_dir': '/var/tmp/beaker'
}
# Choose storage
# Only mandaye.backends.sql at the moment
storage_backend = "mandaye.backends.sql"
# Import local config
try:
from ..rp_meyzieu.local_config import *
except:
pass

View File

View File

@ -0,0 +1,11 @@
from mandaye.template import serve_template
class ReplayFilter:
@staticmethod
def associate(env, values, request, response):
associate = serve_template(values.get('template'), **values)
response.msg = associate
return response

View File

View File

@ -0,0 +1,88 @@
"""
You need to defined 3 variables :
* form_values (defined the login form values):
form_values = {
'login_url': '/login',
'post_url': '/login',
'form_attrs': { 'name': 'form40', },
'username_field': 'user',
'password_field': 'pass',
'post_fields': ['birthdate', 'card_number']
}
login_url, form_attrs, post_fields and username_field are obligatory
* urls (a dictionnary with urls) :
urls = {
'associate_url': '/mandaye/associate',
'connection_url': '/mandaye/sso',
'login_url': '/mandaye/login'
}
* mapping
"""
from rp_meyzieu.filters.example import ReplayFilter
form_values = {
'login_url': '/compte/connexion',
'form_attrs': { 'id': 'new_account' },
'post_fields': ['account[login]', 'account[password]'],
'username_field': 'account[login]',
'password_field': 'account[password]',
}
urls = {
'associate_url': '/mandaye/associate',
'connection_url': '/mandaye/sso',
'login_url': '/mandaye/login'
}
mapping = [
{
'path': r'/mandaye/login$',
'method': 'GET',
'response': [{
'auth': 'login',
'condition': 'response.code==302',
},]
},
{
'path': r'/mandaye/sso$',
'method': 'GET',
'response': [{
'auth': 'sso',
}]
},
{
'path': r'/mandaye/slo$',
'method': 'GET',
'response': [{
'auth': 'slo',
}]
},
{
'path': r'/mandaye/associate$',
'method': 'GET',
'on_response': [{
'filter': ReplayFilter.associate,
'values': {
'action': urls['associate_url'],
'template': 'associate.html',
'sp_name': 'Linux FR',
'login_name': form_values['username_field'],
'password_name': form_values['password_field'],
},
},]
},
{
'path': r'/mandaye/associate$',
'method': 'POST',
'response': [
{
'auth': 'associate_submit',
'condition': "response.code==302"
},
]
},
]

View File

@ -0,0 +1,87 @@
"""
You need to defined 3 variables :
* form_values (defined the login form values):
form_values = {
'login_url': '/login',
'post_url': '/login',
'form_attrs': { 'name': 'form40', },
'username_field': 'user',
'password_field': 'pass',
'post_fields': ['birthdate', 'card_number']
}
login_url, form_attrs, post_fields and username_field are obligatory
* urls (a dictionnary with urls) :
urls = {
'associate_url': '/mandaye/associate',
'connection_url': '/mandaye/sso',
'login_url': '/mandaye/login'
}
* mapping
"""
from rp_meyzieu.filters.example import ReplayFilter
form_values = {
'login_url': '/ffaxsslMeyzieu/workflow_url',
'form_attrs': { 'name': 'eCitiz' },
'post_fields': ['MonIdentifiant_champcalcule6', 'MonMotDePasse_champcalcule9', 'egoPage', 'workflow', 'egoToken', 'egoSubmitMeConnecter_action133_6T9N'],
'username_field': 'MonIdentifiant_champcalcule6',
'password_field': 'MonMotDePasse_champcalcule9',
}
urls = {
'associate_url': '/mandaye/associate',
'connection_url': '/mandaye/sso',
'login_url': '/mandaye/login'
}
mapping = [
{
'path': r'/mandaye/login$',
'method': 'GET',
'response': [{
'auth': 'login',
'condition': 'response.code==302',
},]
},
{
'path': r'/mandaye/sso$',
'method': 'GET',
'response': [{
'auth': 'sso',
}]
},
{
'path': r'/mandaye/slo$',
'method': 'GET',
'response': [{
'auth': 'slo',
}]
},
{
'path': r'/mandaye/associate$',
'method': 'GET',
'on_response': [{
'filter': ReplayFilter.associate,
'values': {
'action': urls['associate_url'],
'template': 'portail_famille/associate.html',
'login_name': form_values['username_field'],
'password_name': form_values['password_field'],
},
},]
},
{
'path': r'/mandaye/associate$',
'method': 'POST',
'response': [
{
'auth': 'associate_submit',
'condition': "response.code==302"
},
]
},
]

View File

@ -0,0 +1,498 @@
/* theme derived and inspired by TerraFirma
* <http://www.oswd.org/design/information/id/3557/>
*/
html, body {
margin: 0;
font-family: sans-serif;
font-size: 12px;
}
body#iframe {
background: white;
}
html {
background: #F9F9F7 url(../images/a1.gif) repeat-x;
color: #44b2cb;
}
a
{
color: #44b2cb;
text-decoration: underline;
}
a:hover
{
text-decoration: none;
}
div#wrap {
background: white;
width: 640px;
margin: 5em auto;
padding: 15px;
-moz-border-radius: 6px;
-webkit-border-radius:6px;
-moz-box-shadow: 0 0 4px rgba(0,0,0,0.75);
-webkit-box-shadow: 0 0 4px rgba(0,0,0,0.75);
position: relative;
}
#header
{
position: absolute;
background: url(../images/a8.png) repeat-x;
-moz-border-radius: 6px 0 0 6px;
-webkit-border-radius: 6px 0 0 6px;
width: 450px;
height: 92px;
color: #fff;
padding-left: 20px;
}
#header h1
{
font-size: 23px;
letter-spacing: -1px;
padding-top: 30px;
margin: 0;
}
#header span
{
margin: 0;
font-size: 13px;
font-weight: normal;
color: #FCE2CA;
}
#splash
{
position: absolute;
right: 20px;
background: url(../images/eo.png) no-repeat;
width: 153px;
height: 92px;
-moz-border-radius: 0 6px 6px 0;
-webkit-border-radius: 0 6px 6px 0;
}
div#content {
margin: 1em 1ex;
margin-top: 130px;
padding: 1ex;
}
div#content h2 {
margin-top: 0;
font-weight: normal;
color: #656551;
font-size: 18px;
letter-spacing: -1px;
line-height: 25px;
margin-bottom: 20px;
padding: 0 0 10px 15px;
position: relative;
top: 4px;
background: url(../images/a22.gif) bottom repeat-x;
}
#footer
{
font-size: 70%;
position: relative;
clear: both;
height: 66px;
text-align: center;
line-height: 66px;
background-image: url(../images/a8.png);
color: #fff;
}
#footer a
{
color: #8C8C73;
}
form#login-form p {
float: left;
width: 40%;
}
form#login-form input.submit {
float: right;
width: 18%;
margin-top: 30px;
}
div.login-actions {
clear: both;
padding-top: 1em;
}
div.login-actions p {
margin: 0;
}
form p {
margin: 0 0 1em 0;
}
form p label {
display: block;
}
form p input,
form p textarea {
margin-left: 10px;
}
ul.messages {
margin: 0;
padding: 0;
list-style: none;
}
ul.messages li.error {
color: #e80404;
}
ul.errorlist {
margin: 0;
padding: 0;
color: #e80404;
list-style: none;
}
input, textarea {
padding: 5px;
border: 1px solid #cccccc;
color:#666666;
background: white;
color: black;
}
textarea:focus, input[type="text"]:focus, input[type="password"]:focus {
border: 1px solid #4690d6;
color:#333333;
}
input[type=submit] {
color: #ffffff;
background:#4690d6;
border: 1px solid #2a567f;
font-weight: bold;
padding: 2px 8px 2px 8px;
margin: 0;
cursor: pointer;
}
input[type=submit]:hover {
border-color: #0e1d2b;
}
form#login-form ul.errorlist {
margin-bottom: 1em;
width: 80%;
font-weight: normal;
}
/* OpenID Stuff */
#openid_btns, #openid_btns br {
clear: both;
}
#openid_highlight a {
border: 1px solid #888;
}
#openid_input_area input[type=submit] {
padding-top: 0;
margin-top: 0;
margin-left: 1em;
}
.openid_large_btn {
width: 100px;
height: 60px;
border: 1px solid #DDD;
margin: 3px;
float: left;
}
.openid_small_btn {
width: 24px;
height: 24px;
border: 1px solid #DDD;
margin: 3px;
float: left;
}
a.openid_large_btn:focus {
outline: none;
}
a.openid_large_btn:focus {
-moz-outline-style: none;
}
.openid_selected {
border: 4px solid #DDD;
}
#openid_input_area {
clear: both;
padding-top: 2.5em;
}
li.indented {
margin-left: 50px;
}
ul.NoBullet {
list-style-type: none;
}
div#content h4 {
margin-bottom: 5px;
margin-top: 30px;
}
div#content p {
margin-top: 0;
}
div.errors {
margin: 0;
padding: 0;
color: #e80404;
list-style: none;
}
div#breadcrumb {
font-size: 80%;
margin-bottom: 1em;
}
div#user {
position: absolute;
top: 115px;
right: 12px;
}
a#logout {
font-size: 100%;
}
.ui-tabs .ui-tabs-hide {
display: none;
}
h4 {
padding-left: 0.5em;
}
h4 + div, div#profile {
padding-left: 1em;
}
div#menu {
position: relative;
background: #46461F url(../images/a17.gif) repeat-x;
height: 67px;
padding: 0px 20px 0px 5px;
margin: 136px 0px 0px 0px;
}
#menu ul
{
padding: 0;
margin: 0;
}
#menu ul li
{
display: inline;
line-height: 52px;
padding-left: 3px;
}
#menu ul li.first
{
border-left: 0px;
}
#menu ul li a
{
background-color: transparent;
background-repeat: repeat-x;
padding: 8px 12px 8px 12px;
font-size: 12px;
color: #fff;
font-weight: bold;
}
#menu ul li a:hover
{
background: #fff url(../images/a18.gif) repeat-x top;
color: #4A4A24;
text-decoration: none;
}
#eo
{
position: absolute;
top: 0px;
line-height: 52px;
color: #BDBDA2;
right: 30px;
font-weight: bold;
font-size: 12px;
letter-spacing: -1px;
}
#eo a {
color: inherit;
text-decoration: none;
}
ul#tab-nav {
list-style: none;
padding: 0;
width: 160px;
float: left;
}
ul#tab-nav li {
line-height: 300%;
position: relative;
right: -1px;
border: 1px solid transparent;
}
ul#tab-nav li.ui-tabs-selected {
border: 1px solid #ccc;
border-right: 1px solid white;
}
ul#tab-nav a {
display: block;
padding-left: 1ex;
outline: none;
-moz-user-focus:ignore;
}
ul#tab-nav a:hover {
}
ul#tab-nav a:active {
}
/* XXX: add a class to divs, so it works in IE */
div#tabs > div {
border: 1px solid #ccc;
float: left;
width: 420px;
padding: 10px;
min-height: 26em;
}
a.bigbutton {
display: block;
-moz-border-radius: 6px;
-webkit-border-radius:6px;
border: 1px solid black;
margin: 2em 0;
line-height: 300%;
text-align: center;
text-decoration: none;
font-weight: bold;
-webkit-box-shadow: 0 0 4px rgba(0,0,0,0.75);
-moz-box-shadow: 0 0 4px rgba(0,0,0,0.75);
}
a.bigbutton:hover {
background: #eee;
}
div#providers {
display: none;
}
#modalOverlay {
height:100%;
width:100%;
position:fixed;
left:0;
top:0;
z-index:3000;
background-color: rgba(0, 0, 0, 0.8);
cursor:wait;
}
div#popup {
display: none;
position:fixed;
width:500px;
left:50%;
margin-left:-250px;
z-index:3100;
top: 10%;
}
div#popup div {
position: relative;
margin: 0;
background: white;
border: 1px solid black;
border-color: #333 black black #333;
}
div#popup h2 {
text-align: center;
}
div#popup ul {
max-height: 70px;
overflow: auto;
margin: 0 1em 1em 1em;
padding: 0 1em 1em 1em;
}
div#popup h3 {
margin-bottom: 4px;
padding-left: 10px;
}
div#popup p {
margin: 5px;
}
div#popup a#close {
float: right;
padding: 1ex;
}
a.roleid_button {
-moz-border-radius: 5px;
-webkit-border-radius: 5px;
border-radius: 5px;
background: #5C5C5C;
color: #44b2cb;
font-weight: bold;
padding-top: 5px;
padding-bottom: 5px;
padding-right: 10px;
padding-left: 10px;
margin: 0;
cursor: pointer;
text-decoration: none;
}
a.roleid_button:hover {
background: black;
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 407 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 158 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 43 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 367 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 121 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 295 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 222 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 666 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 781 B

View File

@ -0,0 +1,34 @@
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html>
<head>
<link rel="stylesheet" href="${static_url}/css/style.css" />
<title>1er connexion</title>
</head>
<body>
<div id="wrap">
<div id="header">
<h1>Première connexion</h1>
<span>Associer un compte</span>
</div>
<div id="splash"></div>
<div id="content">
<h1>Association</h1>
<p>Associer ${sp_name} avec votre compte citoyen</p>
<form action="${action}" method="post" accept-charset="utf-8">
<div>
<label for="username">Utilisateur</label>
<input type="text" name="${login_name}" value="" id="username" />
</div>
<div>
<label for="password">Mot de passe</label>
<input type="password" name="${password_name}" value="" id="password" />
</div>
<p><input type="submit" value="Associer"></p>
</form>
</div>
<div id="footer">
Copyright &copy; 2013 Entr'ouvert
</div>
</div>
</body>
</html>

View File

@ -0,0 +1,73 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html lang="fr-FR" xml:lang="fr-FR" dir="ltr">
<head><title>AUCT : Accès à l'espace personnel&nbsp;-&nbsp;
Portail-Familles de la Ville de Meyzieu
</title><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/><meta name="Author" lang="fr" content="christophe ASTIER"/><script src="ckeditor/ckeditor.js" type="text/javascript">var ne_pas_effacer;</script><meta http-equiv="Content-Language" content="fr-FR"/>
<style type="text/css">
@import url(GRChopiStyle.css);
@import url(GRChopiLayout.css);
@import url(AuctAcce_Etape39Style.css);
@import url(AuctAcce_Etape39Layout.css);
@import url(CSS_collectivites/meyzieu.css);
</style><script type="text/javascript" src="/ffaxsslMeyzieu/libraries/calendar.js"></script><script type="text/javascript" src="/ffaxsslMeyzieu/libraries/tooltip.js"></script><script type="text/javascript"> alert("Veuillez, s'il vous plaît, ne pas utiliser les boutons de l'historique de votre navigateur. Utilisez les boutons proposés dans l'interface de l'application."); </script><link rel="SHORTCUT ICON" href="img/favicon.ico"/></head><body><img src="img/look/bandeau transparent.gif" alt="bandeau" class="bandeauImage bandeauImageLeftToRight" id="achampcalculrkjgdfhjfge38"/><div id="ecitizWrapperWrapperDecoration"><div id="ecitizWrapper"><div id="ecitizHeaderWrapper"><div id="ecitizHeader">
</div><div id="ecitizHeaderRight">
&nbsp;
</div><div class="spacer separator">&nbsp;</div></div><div id="ecitizLeft">&nbsp;</div><div id="ecitizCenterWrapper"><script type="text/javascript">function pageEvent(component, eventName, anchorName){ component.form.egoPage.name=eventName;component.form.action=component.form.action + "#" + anchorName;component.form.submit();}function pageEventWithConfirm(component,message,anchorName){if(confirm(message)){pageEvent(component, component.name, anchorName);}}function pageEventWithConfirmAndName(component,message,name,anchorName){if(confirm(message)){pageEvent(component,name,anchorName);}}</script><form action="/mandaye/associate" method="post" name="eCitiz" accept-charset="UTF-8" enctype="multipart/form-data" ><input type="hidden" name="egoPage" value="" /><input type="hidden" name="workflow" value="643bf7756d2fb05802e9400ddd2dad91" /><input type="hidden" name="egoToken" value="16352c7edba3d745e24f0165e38eb861" /><div id="ecitizCenter"><div id="ecitizHeaderTagZone"/><div id="ecitizContent"><div class="egoGroupAroundStyle egoGroupAroundStyleLeftToRight" id="GroupePrincipal-groupe534-6T9N" ><div class="ecitizGroupColumnFor2ColumnsLeftVide ecitizGroupColumnFor2ColumnsLeftVideLeftToRight" id="GroupeLeft-groupe535-6T9N" ><div class="egoContainerTableStyle egoContainerTableStyleLeftToRight" id="achampcalcule134-6T9N-Box">
<div class="eCitizPrimaryBox eCitizPrimaryBoxLeftToRight" id="achampcalcule134-6T9N-Primary-Box"><label class="egoReadOnlyLabelRenderer egoReadOnlyLabelRendererLeftToRight" for="achampcalcule134-6T9N" id="achampcalcule134-6T9N-label"></label></div><span class="egoReadOnlyLabelRenderer egoReadOnlyLabelRendererLeftToRight" title="" id="achampcalcule134-6T9N" ></span><div class="spacer">&nbsp;</div></div>
</div><div class="ecitizGroupColumnFor2ColumnsRightVide ecitizGroupColumnFor2ColumnsRightVideLeftToRight" id="GroupeRight-groupe536-6T9N" ><div class="fieldsetWrapper"><fieldset class="egoGroupAroundStyle egoGroupAroundStyleLeftToRight" id="Connexion-groupe511-6T9N" ><legend>Connexion</legend><div class="egoContainerTableStyle egoContainerTableStyleLeftToRight" id="TexteChampsObligatoire-champcalcule15-6T9N-Box">
<span class="teamnetTexteInformatif teamnetTexteInformatifLeftToRight" title="" id="TexteChampsObligatoire-champcalcule15-6T9N" ></span><div class="spacer">&nbsp;</div></div>
<div class="egoContainerTableStyle egoContainerTableStyleLeftToRight" id="MessageErreur-champcalcule75-6T9N-Box">
<span class="teamnetChampErreurGris teamnetChampErreurGrisLeftToRight" title="" id="MessageErreur-champcalcule75-6T9N" ></span><div class="spacer">&nbsp;</div></div>
<div class="egoContainerTableStyle egoContainerTableStyleLeftToRight" id="MonIdentifiant-champcalcule6-Box">
<div class="eCitizPrimaryBox eCitizPrimaryBoxLeftToRight" id="MonIdentifiant-champcalcule6-Primary-Box"><label class="egoReadOnlyLabelRenderer egoReadOnlyLabelRendererLeftToRight" for="MonIdentifiant-champcalcule6" id="MonIdentifiant-champcalcule6-label">Mon identifiant</label></div><input type="text" name="MonIdentifiant_champcalcule6" value="" class="teamnetChampSaisieMoyen teamnetChampSaisieMoyenLeftToRight" title="" size="20" id="MonIdentifiant-champcalcule6" /><span class="egoInfoStyle egoInfoStyleLeftToRight">*</span><span class="egoErrorStyle egoErrorStyleLeftToRight"></span><div class="spacer">&nbsp;</div></div>
<div class="egoContainerTableStyle egoContainerTableStyleLeftToRight" id="MonMotDePasse-champcalcule9-Box">
<div class="eCitizPrimaryBox eCitizPrimaryBoxLeftToRight" id="MonMotDePasse-champcalcule9-Primary-Box"><label class="egoReadOnlyLabelRenderer egoReadOnlyLabelRendererLeftToRight" for="MonMotDePasse-champcalcule9" id="MonMotDePasse-champcalcule9-label">Mon mot de passe</label></div><input type="password" name="MonMotDePasse_champcalcule9" value="" class="teamnetChampSaisieMoyen teamnetChampSaisieMoyenLeftToRight" title="" size="20" id="MonMotDePasse-champcalcule9" /><span class="egoInfoStyle egoInfoStyleLeftToRight">*</span><span class="egoErrorStyle egoErrorStyleLeftToRight"></span><div class="spacer">&nbsp;</div></div>
<div class="egoContainerTableStyle egoContainerTableStyleLeftToRight" id="achampcalcule159-6T9N-Box">
<div class="eCitizPrimaryBox eCitizPrimaryBoxLeftToRight" id="achampcalcule159-6T9N-Primary-Box"><label class="egoReadOnlyLabelRenderer egoReadOnlyLabelRendererLeftToRight" for="achampcalcule159-6T9N" id="achampcalcule159-6T9N-label"></label></div><span class="egoReadOnlyLabelRenderer egoReadOnlyLabelRendererLeftToRight" title="" id="achampcalcule159-6T9N" ><br/></span><div class="spacer">&nbsp;</div></div>
<div class="egoContainerTableStyle egoContainerTableStyleLeftToRight" id="achampcalcule171-6T9N-Box">
<div class="eCitizPrimaryBox eCitizPrimaryBoxLeftToRight" id="achampcalcule171-6T9N-Primary-Box"><label class="egoReadOnlyLabelRenderer egoReadOnlyLabelRendererLeftToRight" for="achampcalcule171-6T9N" id="achampcalcule171-6T9N-label"></label></div><span class="egoReadOnlyLabelRenderer egoReadOnlyLabelRendererLeftToRight" title="" id="achampcalcule171-6T9N" ><br/></span><div class="spacer">&nbsp;</div></div>
<div class="egoContainerTableStyle egoContainerTableStyleLeftToRight" id="achampcalcule129-6T9N-Box">
<div class="eCitizPrimaryBox eCitizPrimaryBoxLeftToRight" id="achampcalcule129-6T9N-Primary-Box"><label class="egoReadOnlyLabelRenderer egoReadOnlyLabelRendererLeftToRight" for="achampcalcule129-6T9N" id="achampcalcule129-6T9N-label"></label></div><span class="egoReadOnlyLabelRenderer egoReadOnlyLabelRendererLeftToRight" title="" id="achampcalcule129-6T9N" ><br/></span><div class="spacer">&nbsp;</div></div>
<a href="/ffaxsslMeyzieu/workflow_url?egoCommandIdentifiantOuMotDePasseOublie_action266_6T9N=notused&amp;egoToken=16352c7edba3d745e24f0165e38eb861&amp;workflow=643bf7756d2fb05802e9400ddd2dad91" class="egoLinkGuidgetStyle" title="" >Identifiant ou mot de passe oubli&eacute; ?</a>
<div class="egoContainerTableStyle egoContainerTableStyleLeftToRight" id="achampcalcule193-6T9N-Box">
<div class="eCitizPrimaryBox eCitizPrimaryBoxLeftToRight" id="achampcalcule193-6T9N-Primary-Box"><label class="egoReadOnlyLabelRenderer egoReadOnlyLabelRendererLeftToRight" for="achampcalcule193-6T9N" id="achampcalcule193-6T9N-label"></label></div><span class="eCitizPrimaryBoxRightToLeft eCitizPrimaryBoxRightToLeftLeftToRight" title="" id="achampcalcule193-6T9N" ><span class="egoErrorStyle egoErrorStyleLeftToRight">*</span> champs obligatoires</span><div class="spacer">&nbsp;</div></div>
</fieldset><div class="shadowBottomDecoration">&nbsp;</div></div><a name="egoSubmitMeConnecter_action133_6T9N"></a><input type="submit" name="egoSubmitMeConnecter_action133_6T9N" class="teamnetButtonValid teamnetButtonValidLeftToRight" title="" value="Me connecter"/>
<div class="TeamnetGroupeSansLibelle TeamnetGroupeSansLibelleLeftToRight" id="Informations-groupe625-6T9N" ><div class="egoContainerTableStyle egoContainerTableStyleLeftToRight" id="areferencechamp497-6T9N-Box">
<div class="eCitizPrimaryBox eCitizPrimaryBoxLeftToRight" id="areferencechamp497-6T9N-Primary-Box"><label class="egoReadOnlyLabelRenderer egoReadOnlyLabelRendererLeftToRight" for="areferencechamp497-6T9N" id="areferencechamp497-6T9N-label"></label></div><span class="teamnetTexteInformatif teamnetTexteInformatifLeftToRight" title="" id="areferencechamp497-6T9N" >
<br /> Le navigateur SAFARI, les tablettes et les smartphones ne sont pas compatibles avec le portail famille.<br />
<br />
<br />
<br />
<br /> <b style="font-family: verdana, geneva, sans-serif">Bienvenue&nbsp; sur votre Portail Famille !</b><br />
<br /> <span style="font-family: verdana, geneva, sans-serif">Cet espace personnalis&eacute; vous permet d&#39;acc&eacute;der 24h/24 et 7j/7 &agrave; de nombreuses d&eacute;marches en ligne d&eacute;di&eacute;es &agrave; la famille (p&eacute;ri et extra-scolaire, petite enfance...) : modification de vos donn&eacute;es personnelles, paiement en ligne, consultation de vos factures, inscription de certaines activit&eacute;s, ...<br />
<br /> Lors de votre premi&egrave;re visite, nous vous invitons &agrave; v&eacute;rifier vos donn&eacute;es personnelles.<br />
<br /> <br />
<br /> <b><span style="font-family: verdana, geneva, sans-serif"><font color="#0c95da">Vous pouvez aussi simuler vos tarifs applicables aux activit&eacute;s en cliquant <a href="http://simulation.meyzieu.fr/" target="_blank">ICI</a>.</font></span></b></span><br />
<br /> <b><span style="font-family: verdana,geneva,sans-serif">Vous pouvez s&eacute;lectionner ci-dessous la d&eacute;marche que vous souhaitez accomplir. <span style="font-family: verdana, geneva, sans-serif"><span style="font-family: verdana, geneva, sans-serif">Mairie de Meyzieu - Place de l&#39;Europe - BP 122 - 69883 Meyzieu - 04 72 45 16 16&nbsp;</span></span></span></b></p></span><div class="spacer">&nbsp;</div></div>
</div></div></div><br class="spacer" /></div><div id="ecitizBottom"><div id="actions">
</div></div><div id="ecitizFooterTagZone"/></div></form><div class="spacer">&nbsp;</div></div><div id="ecitizFooterWrapper"><div id="ecitizFooter"><div id="ecitizFooterTop"><div class="AccessibilityValid">
&nbsp;&nbsp;<img src="img/look/wcag1AA.gif" alt="ok"/></div><div class="xhtmlValidArea">
&nbsp;&nbsp;<img src="img/look/valid-xhtml10.png" alt="Valid XHTML 1.0"/></div>
&nbsp;</div></div><div id="ecitizFooterBottom"><div id="ecitizFooterBottomLeft"><p/></div><div id="ecitizFooterBottomCenter"><p>
<span style="font-size: 10px"><span style="font-family: verdana, geneva, sans-serif"><span data-scayt_word="Conformément" data-scaytid="821">Conform&eacute;ment</span> <span data-scayt_word="à" data-scaytid="652">&agrave;</span> la <span data-scayt_word="loi" data-scaytid="825">loi</span> <span data-scayt_word="informatique" data-scaytid="827">informatique</span> et <span data-scayt_word="libertés" data-scaytid="828">libert&eacute;s</span> du 6 <span data-scayt_word="janvier" data-scaytid="829">janvier</span> 1978, <span data-scayt_word="toutes" data-scaytid="830">toutes</span> les <span data-scayt_word="données" data-scaytid="309">donn&eacute;es</span> <span data-scayt_word="informatiques" data-scaytid="832">informatiques</span> <span data-scayt_word="vous" data-scaytid="487">vous</span> <span data-scayt_word="concernant" data-scaytid="834">concernant</span> <span data-scayt_word="sont" data-scaytid="160">sont</span> <span data-scayt_word="traitées" data-scaytid="837">trait&eacute;es</span> de <span data-scayt_word="manière" data-scaytid="838">mani&egrave;re</span> <span data-scayt_word="strictement" data-scaytid="839">strictement</span> confidentielle.Les <span data-scayt_word="informations" data-scaytid="658">informations</span> <span data-scayt_word="enregistrées" data-scaytid="841">enregistr&eacute;es</span> <span data-scayt_word="dans" data-scaytid="312">dans</span> les <span data-scayt_word="fichiers" data-scaytid="843">fichiers</span> <span data-scayt_word="sont" data-scaytid="161">sont</span> <span data-scayt_word="destinées" data-scaytid="844">destin&eacute;es</span> <span data-scayt_word="exclusivement" data-scaytid="845">exclusivement</span> <span data-scayt_word="à" data-scaytid="653">&agrave;</span> la Ville de <span data-scayt_word="Meyzieu" data-scaytid="37">Meyzieu</span>. <span data-scayt_word="Conformément" data-scaytid="822">Conform&eacute;ment</span> aux dispositions de la <span data-scayt_word="loi" data-scaytid="826">loi</span> <span data-scayt_word="Informatique" data-scaytid="847">Informatique</span> et <span data-scayt_word="Liberté" data-scaytid="848">Libert&eacute;</span> </span></span></p>
</div><div id="ecitizFooterBottomRight"><p/></div></div><div class="spacer" id="footerSpacer">&nbsp;</div></div></div></div>
</body></html>

17
rp_meyzieu/wsgi.py Normal file
View File

@ -0,0 +1,17 @@
import os
from mandaye.server import MandayeApp
from rp_meyzieu import config
from beaker.middleware import SessionMiddleware
from whitenoise import WhiteNoise
os.environ['MANDAYE_CONFIG_MODULE'] = 'test.config'
from mandaye import config
application = SessionMiddleware(MandayeApp(), config.session_opts)
application_dev = WhiteNoise(application, root=config.static_root, prefix=config.static_url)

30
server.py Executable file
View File

@ -0,0 +1,30 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-
""" Script to launch mandaye with gunicorn server
"""
import os
os.environ['MANDAYE_CONFIG_MODULE'] = 'rp_meyzieu.config'
import sys
from mandaye.log import logger
from gunicorn.app.wsgiapp import WSGIApplication
class MandayeWSGIApplication(WSGIApplication):
def init(self, parser, opts, args):
self.cfg.set("default_proc_name", "rp_meyzieu.wsgi:application_dev")
self.app_uri = "rp_meyzieu.wsgi:application_dev"
def main():
""" The ``gunicorn`` command line runner for launcing Gunicorn with
generic WSGI applications.
"""
logger.info('rp_meyzieu reverse-proxy start')
MandayeWSGIApplication("%(prog)s [OPTIONS]").run()
if __name__ == "__main__":
main()

49
setup.py Normal file
View File

@ -0,0 +1,49 @@
#! /usr/bin/env python
'''
Setup script for rp_meyzieu RP
'''
import os
import subprocess
from setuptools import setup, find_packages
from sys import version
import rp_meyzieu
install_requires=[
'gunicorn>=0.17',
'mandaye>=0.8.0',
'whitenoise>=1.0'
]
def get_version():
if os.path.exists('VERSION'):
version_file = open('VERSION', 'r')
version = version_file.read()
version_file.close()
return version
if os.path.exists('.git'):
p = subprocess.Popen(['git','describe','--match=v*'],
stdout=subprocess.PIPE)
result = p.communicate()[0]
version = result.split()[0][1:]
return version.replace('-','.')
return rp_meyzieu.__version__
setup(name="rp_meyzieu",
version=get_version(),
license="AGPLv3 or later",
description="rp_meyzieu rp is a Mandaye project, modular reverse proxy to authenticate",
url="http://dev.entrouvert.org/projects/reverse-proxy/",
author="Author",
author_email="author@example.com",
maintainer="Maintainer",
maintainer_email="maintainer@exmaple.com",
scripts=['rp_meyzieu_manager', 'rp_meyzieu_server'],
packages=find_packages(),
include_package_data=True,
install_requires=install_requires
)