1
|
#! /usr/bin/env python
|
2
|
|
3
|
'''
|
4
|
Setup script for Mandaye
|
5
|
'''
|
6
|
|
7
|
import os
|
8
|
import subprocess
|
9
|
|
10
|
from setuptools import setup, find_packages
|
11
|
from sys import version
|
12
|
|
13
|
install_requires=[
|
14
|
'alembic>=0.4',
|
15
|
'beaker>=1.6',
|
16
|
'mako>=0.4',
|
17
|
'sqlalchemy>=0.7.3',
|
18
|
'lxml>=2.0',
|
19
|
'python-entrouvert',
|
20
|
'xtraceback>=0.3',
|
21
|
]
|
22
|
|
23
|
if version < '2.7':
|
24
|
install_requires.append('importlib')
|
25
|
|
26
|
def get_version():
|
27
|
if os.path.exists('VERSION'):
|
28
|
version_file = open('VERSION', 'r')
|
29
|
version = version_file.read()
|
30
|
version_file.close()
|
31
|
return version
|
32
|
if os.path.exists('.git'):
|
33
|
p = subprocess.Popen(['git','describe','--match=v*'],
|
34
|
stdout=subprocess.PIPE)
|
35
|
result = p.communicate()[0]
|
36
|
version = result.split()[0][1:]
|
37
|
return version.replace('-','.')
|
38
|
import mandaye
|
39
|
return mandaye.__version__
|
40
|
|
41
|
setup(name="mandaye",
|
42
|
version=get_version(),
|
43
|
license="AGPLv3 or later",
|
44
|
description="Mandaye, modular reverse proxy to authenticate",
|
45
|
url="http://dev.entrouvert.org/projects/reverse-proxy/",
|
46
|
author="Entr'ouvert",
|
47
|
author_email="info@entrouvert.org",
|
48
|
maintainer="Jerome Schneider",
|
49
|
maintainer_email="jschneider@entrouvert.com",
|
50
|
scripts=['scripts/mandaye-admin.py'],
|
51
|
include_package_data = True,
|
52
|
packages=find_packages(),
|
53
|
install_requires=install_requires,
|
54
|
)
|
55
|
|