Refactorize application to make it an authentic2 plugin (1/2)
|
@ -0,0 +1,2 @@
|
||||||
|
authentic2-auth-msp is entirely under the copyright of Entr'ouvert and
|
||||||
|
distributed under the license AGPLv3 or later.
|
|
@ -0,0 +1,4 @@
|
||||||
|
include COPYING
|
||||||
|
recursive-include src/authentic2_auth_msp/templates *.html
|
||||||
|
recursive-include src/authentic2_auth_msp/static *.js *.css *.png
|
||||||
|
recursive-include src/authentic2_auth_msp/locale *.po *.mo
|
|
@ -0,0 +1,70 @@
|
||||||
|
#!/usr/bin/python
|
||||||
|
from setuptools import setup, find_packages
|
||||||
|
import os
|
||||||
|
|
||||||
|
def get_version():
|
||||||
|
import glob
|
||||||
|
import re
|
||||||
|
import os
|
||||||
|
|
||||||
|
version = None
|
||||||
|
for d in glob.glob('src/*'):
|
||||||
|
if not os.path.isdir(d):
|
||||||
|
continue
|
||||||
|
module_file = os.path.join(d, '__init__.py')
|
||||||
|
if not os.path.exists(module_file):
|
||||||
|
continue
|
||||||
|
for v in re.findall("""__version__ *= *['"](.*)['"]""",
|
||||||
|
open(module_file).read()):
|
||||||
|
assert version is None
|
||||||
|
version = v
|
||||||
|
if version:
|
||||||
|
break
|
||||||
|
assert version is not None
|
||||||
|
if os.path.exists('.git'):
|
||||||
|
import subprocess
|
||||||
|
p = subprocess.Popen(['git','describe','--dirty','--match=v*'],
|
||||||
|
stdout=subprocess.PIPE)
|
||||||
|
result = p.communicate()[0]
|
||||||
|
assert p.returncode == 0, 'git returned non-zero'
|
||||||
|
new_version = result.split()[0][1:]
|
||||||
|
assert new_version.split('-')[0] == version, '__version__ must match the last git annotated tag'
|
||||||
|
version = new_version.replace('-', '.')
|
||||||
|
return version
|
||||||
|
|
||||||
|
README = file(os.path.join(
|
||||||
|
os.path.dirname(__file__),
|
||||||
|
'README')).read()
|
||||||
|
|
||||||
|
setup(name='authentic2-auth-msp',
|
||||||
|
version=get_version(),
|
||||||
|
license='AGPLv3',
|
||||||
|
description='Authentic2 Auth Kerberos',
|
||||||
|
long_description=README,
|
||||||
|
author="Entr'ouvert",
|
||||||
|
author_email="info@entrouvert.com",
|
||||||
|
packages=find_packages('src'),
|
||||||
|
package_dir={
|
||||||
|
'': 'src',
|
||||||
|
},
|
||||||
|
package_data={
|
||||||
|
'authentic2_auth_msp': [
|
||||||
|
'templates/authentic2_auth_msp/*.html',
|
||||||
|
'static/authentic2_auth_msp/js/*.js',
|
||||||
|
'static/authentic2_auth_msp/css/*.css',
|
||||||
|
'static/authentic2_auth_msp/img/*.png',
|
||||||
|
'locale/fr/LC_MESSAGES/django.po',
|
||||||
|
'locale/fr/LC_MESSAGES/django.moo',
|
||||||
|
],
|
||||||
|
},
|
||||||
|
install_requires=[
|
||||||
|
'authentic2',
|
||||||
|
'requests',
|
||||||
|
'requests-oauthlib',
|
||||||
|
],
|
||||||
|
entry_points={
|
||||||
|
'authentic2.plugin': [
|
||||||
|
'authentic2-auth-msp = authentic2_auth_msp:Plugin',
|
||||||
|
],
|
||||||
|
},
|
||||||
|
)
|
Before Width: | Height: | Size: 4.0 KiB After Width: | Height: | Size: 4.0 KiB |
Before Width: | Height: | Size: 652 B After Width: | Height: | Size: 652 B |
Before Width: | Height: | Size: 4.6 KiB After Width: | Height: | Size: 4.6 KiB |
Before Width: | Height: | Size: 3.2 KiB After Width: | Height: | Size: 3.2 KiB |
Before Width: | Height: | Size: 2.9 KiB After Width: | Height: | Size: 2.9 KiB |
Before Width: | Height: | Size: 4.6 KiB After Width: | Height: | Size: 4.6 KiB |
Before Width: | Height: | Size: 16 KiB After Width: | Height: | Size: 16 KiB |
Before Width: | Height: | Size: 189 B After Width: | Height: | Size: 189 B |
Before Width: | Height: | Size: 234 B After Width: | Height: | Size: 234 B |
Before Width: | Height: | Size: 233 B After Width: | Height: | Size: 233 B |
Before Width: | Height: | Size: 558 B After Width: | Height: | Size: 558 B |
Before Width: | Height: | Size: 196 B After Width: | Height: | Size: 196 B |
Before Width: | Height: | Size: 108 B After Width: | Height: | Size: 108 B |
Before Width: | Height: | Size: 108 B After Width: | Height: | Size: 108 B |
Before Width: | Height: | Size: 207 B After Width: | Height: | Size: 207 B |
Before Width: | Height: | Size: 96 B After Width: | Height: | Size: 96 B |
Before Width: | Height: | Size: 128 B After Width: | Height: | Size: 128 B |
Before Width: | Height: | Size: 225 B After Width: | Height: | Size: 225 B |
Before Width: | Height: | Size: 364 B After Width: | Height: | Size: 364 B |
Before Width: | Height: | Size: 360 B After Width: | Height: | Size: 360 B |
Before Width: | Height: | Size: 205 B After Width: | Height: | Size: 205 B |
Before Width: | Height: | Size: 104 B After Width: | Height: | Size: 104 B |
Before Width: | Height: | Size: 97 B After Width: | Height: | Size: 97 B |
Before Width: | Height: | Size: 6.0 KiB After Width: | Height: | Size: 6.0 KiB |
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 1.2 KiB |
Before Width: | Height: | Size: 5.1 KiB After Width: | Height: | Size: 5.1 KiB |
Before Width: | Height: | Size: 174 B After Width: | Height: | Size: 174 B |
Before Width: | Height: | Size: 184 B After Width: | Height: | Size: 184 B |
Before Width: | Height: | Size: 558 B After Width: | Height: | Size: 558 B |
Before Width: | Height: | Size: 108 B After Width: | Height: | Size: 108 B |
Before Width: | Height: | Size: 219 B After Width: | Height: | Size: 219 B |
Before Width: | Height: | Size: 338 B After Width: | Height: | Size: 338 B |
Before Width: | Height: | Size: 8.1 KiB After Width: | Height: | Size: 8.1 KiB |
Before Width: | Height: | Size: 190 B After Width: | Height: | Size: 190 B |
Before Width: | Height: | Size: 190 B After Width: | Height: | Size: 190 B |
Before Width: | Height: | Size: 190 B After Width: | Height: | Size: 190 B |
Before Width: | Height: | Size: 190 B After Width: | Height: | Size: 190 B |
Before Width: | Height: | Size: 2.3 KiB After Width: | Height: | Size: 2.3 KiB |
Before Width: | Height: | Size: 1.7 KiB After Width: | Height: | Size: 1.7 KiB |
Before Width: | Height: | Size: 5.0 KiB After Width: | Height: | Size: 5.0 KiB |
Before Width: | Height: | Size: 4.2 KiB After Width: | Height: | Size: 4.2 KiB |
Before Width: | Height: | Size: 7.2 KiB After Width: | Height: | Size: 7.2 KiB |
Before Width: | Height: | Size: 2.7 KiB After Width: | Height: | Size: 2.7 KiB |
Before Width: | Height: | Size: 2.2 KiB After Width: | Height: | Size: 2.2 KiB |
Before Width: | Height: | Size: 1.4 KiB After Width: | Height: | Size: 1.4 KiB |
Before Width: | Height: | Size: 1.6 KiB After Width: | Height: | Size: 1.6 KiB |
Before Width: | Height: | Size: 2.1 KiB After Width: | Height: | Size: 2.1 KiB |
Before Width: | Height: | Size: 1.8 KiB After Width: | Height: | Size: 1.8 KiB |
Before Width: | Height: | Size: 1.5 KiB After Width: | Height: | Size: 1.5 KiB |
Before Width: | Height: | Size: 858 B After Width: | Height: | Size: 858 B |
Before Width: | Height: | Size: 2.5 KiB After Width: | Height: | Size: 2.5 KiB |
Before Width: | Height: | Size: 2.7 KiB After Width: | Height: | Size: 2.7 KiB |
Before Width: | Height: | Size: 512 B After Width: | Height: | Size: 512 B |
Before Width: | Height: | Size: 3.2 KiB After Width: | Height: | Size: 3.2 KiB |
Before Width: | Height: | Size: 22 KiB After Width: | Height: | Size: 22 KiB |
Before Width: | Height: | Size: 22 KiB After Width: | Height: | Size: 22 KiB |
Before Width: | Height: | Size: 2.2 KiB After Width: | Height: | Size: 2.2 KiB |
Before Width: | Height: | Size: 3.0 KiB After Width: | Height: | Size: 3.0 KiB |
Before Width: | Height: | Size: 16 KiB After Width: | Height: | Size: 16 KiB |
Before Width: | Height: | Size: 707 B After Width: | Height: | Size: 707 B |
Before Width: | Height: | Size: 685 B After Width: | Height: | Size: 685 B |
Before Width: | Height: | Size: 682 B After Width: | Height: | Size: 682 B |
Before Width: | Height: | Size: 217 B After Width: | Height: | Size: 217 B |
Before Width: | Height: | Size: 902 B After Width: | Height: | Size: 902 B |
Before Width: | Height: | Size: 3.0 KiB After Width: | Height: | Size: 3.0 KiB |
Before Width: | Height: | Size: 953 B After Width: | Height: | Size: 953 B |