Move source into src/ subdirectory and add missing templates and locales to source distribution
This commit is contained in:
parent
7eac84c8bd
commit
01a1c2d973
|
@ -1 +0,0 @@
|
||||||
{% extends "rest_framework/base.html" %}
|
|
21
setup.py
21
setup.py
|
@ -8,7 +8,7 @@ def get_version():
|
||||||
import os
|
import os
|
||||||
|
|
||||||
version = None
|
version = None
|
||||||
for d in glob.glob('*'):
|
for d in glob.glob('src/*'):
|
||||||
if not os.path.isdir(d):
|
if not os.path.isdir(d):
|
||||||
continue
|
continue
|
||||||
module_file = os.path.join(d, '__init__.py')
|
module_file = os.path.join(d, '__init__.py')
|
||||||
|
@ -38,8 +38,23 @@ setup(name='authentic2-auth-saml2',
|
||||||
description='Authentic2 Auth SAML2',
|
description='Authentic2 Auth SAML2',
|
||||||
author="Entr'ouvert",
|
author="Entr'ouvert",
|
||||||
author_email="info@entrouvert.com",
|
author_email="info@entrouvert.com",
|
||||||
packages=find_packages(os.path.dirname(__file__) or '.'),
|
packages=find_packages('src'),
|
||||||
install_requires=[],
|
package_dir={
|
||||||
|
'': 'src',
|
||||||
|
},
|
||||||
|
install_requires=[
|
||||||
|
'django-mellon',
|
||||||
|
],
|
||||||
|
package_data={
|
||||||
|
'authentic2_auth_saml2': [
|
||||||
|
'templates/authsaml2/*.html',
|
||||||
|
'locale/fr/LC_MESSAGES/django.po',
|
||||||
|
'locale/fr/LC_MESSAGES/django.mo',
|
||||||
|
'static/authentic2_auth_kerberos/js/*.js',
|
||||||
|
'static/authentic2_auth_kerberos/css/*.css',
|
||||||
|
'static/authentic2_auth_kerberos/img/*.png',
|
||||||
|
],
|
||||||
|
},
|
||||||
entry_points={
|
entry_points={
|
||||||
'authentic2.plugin': [
|
'authentic2.plugin': [
|
||||||
'authentic-auth-saml2 = authentic2_auth_saml2:Plugin',
|
'authentic-auth-saml2 = authentic2_auth_saml2:Plugin',
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
from django.db import models
|
import django
|
||||||
from django.utils.translation import ugettext_lazy as _
|
from django.utils.translation import ugettext_lazy as _
|
||||||
from django.db.models.manager import EmptyManager
|
from django.db.models.manager import EmptyManager
|
||||||
from django.contrib.auth.models import _user_get_all_permissions, _user_has_perm, _user_has_module_perms
|
from django.contrib.auth.models import _user_get_all_permissions, _user_has_perm, _user_has_module_perms, Group, Permission
|
||||||
|
|
||||||
|
|
||||||
class FakePk:
|
class FakePk:
|
||||||
|
@ -19,8 +19,12 @@ class SAML2TransientUser(object):
|
||||||
is_staff = False
|
is_staff = False
|
||||||
is_active = False
|
is_active = False
|
||||||
is_superuser = False
|
is_superuser = False
|
||||||
_groups = EmptyManager()
|
if django.VERSION >= (1, 6, 0):
|
||||||
_user_permissions = EmptyManager()
|
_groups = EmptyManager(Group)
|
||||||
|
_user_permissions = EmptyManager(Permission)
|
||||||
|
else:
|
||||||
|
_groups = EmptyManager()
|
||||||
|
_user_permissions = EmptyManager()
|
||||||
_meta = FakeMeta()
|
_meta = FakeMeta()
|
||||||
|
|
||||||
def __init__(self, id):
|
def __init__(self, id):
|
|
@ -655,7 +655,7 @@ def get_provider_id_and_options(provider_id):
|
||||||
if not provider_id:
|
if not provider_id:
|
||||||
provider_id = reverse('a2-auth-saml2-metadata')
|
provider_id = reverse('a2-auth-saml2-metadata')
|
||||||
options = metadata_options
|
options = metadata_options
|
||||||
options.update(app_settings.AUTHSAML2_METADATA_OPTIONS)
|
options.update(app_settings.METADATA_OPTIONS)
|
||||||
return provider_id, options
|
return provider_id, options
|
||||||
|
|
||||||
def get_metadata(request, provider_id=None):
|
def get_metadata(request, provider_id=None):
|
Reference in New Issue