From fd54899597c99686f1ef620b1a94c0f2af83c12b Mon Sep 17 00:00:00 2001 From: Benjamin Dauvergne Date: Tue, 28 May 2019 15:57:08 +0200 Subject: [PATCH] integrate authentic2-auth-fc in packaging (#20852) --- MANIFEST.in | 8 +++++++- debian/control | 4 +++- setup.py | 2 ++ src/authentic2_auth_fc/app_settings.py | 4 +--- tests/auth_fc/{test_all.py => test_auth_fc.py} | 0 tests/auth_fc/{test_api.py => test_auth_fc_api.py} | 0 6 files changed, 13 insertions(+), 5 deletions(-) rename tests/auth_fc/{test_all.py => test_auth_fc.py} (100%) rename tests/auth_fc/{test_api.py => test_auth_fc_api.py} (100%) diff --git a/MANIFEST.in b/MANIFEST.in index 78aaa189..5bfa6a28 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -1,13 +1,15 @@ recursive-include data * -recursive-include tests *.py +recursive-include tests *.py *.jpg *.pem *.xml *.json recursive-include tests_rbac *.py recursive-exclude tests *.pyc recursive-exclude tests_rbac *.pyc + include tox.ini .coveragerc # static recursive-include src/authentic2/static *.css *.js *.ico *.gif *.png *.jpg recursive-include src/authentic2/manager/static *.css *.js *.png +recursive-include src/authentic2_auth_fc/static/authentic2_auth_fc *.css *.js *.png *.svg # templates recursive-include src/authentic2/templates *.html *.txt *.xml @@ -19,6 +21,7 @@ recursive-include src/authentic2/idp/saml/templates *.html *.txt *.xml recursive-include src/authentic2/auth2_auth/auth2_ssl/templates *.html *.txt *.xml recursive-include src/authentic2/auth2_auth/templates *.html *.txt *.xml recursive-include src/authentic2/auth2_auth/auth2_oath/templates *.html *.txt *.xml +recursive-include src/authentic2_auth_fc/templates/authentic2_auth_fc *.html recursive-include src/authentic2_auth_saml/templates/authentic2_auth_saml *.html recursive-include src/authentic2_auth_oidc/templates/authentic2_auth_oidc *.html recursive-include src/authentic2_idp_oidc/templates/authentic2_idp_oidc *.html @@ -37,10 +40,13 @@ recursive-include src/authentic2/custom_user/locale *.po *.mo recursive-include src/authentic2/manager/locale *.po *.mo recursive-include src/authentic2/a2_rbac/locale *.po *.mo recursive-include src/django_rbac/locale *.po *.mo +recursive-include src/authentic2_auth_fc/locale *.po *.mo recursive-include src/authentic2_auth_saml/locale *.po *.mo recursive-include src/authentic2_auth_oidc/locale *.po *.mo recursive-include src/authentic2_idp_oidc/locale *.po *.mo +recursive-include src/authentic2_auth_fc *.json + recursive-include src/authentic2 README recursive-include src/authentic2_provisionning_ldap/tests *.ldif recursive-include src/authentic2_provisionning_ldap/tests *.ldif diff --git a/debian/control b/debian/control index 3488e869..c4e526f1 100644 --- a/debian/control +++ b/debian/control @@ -30,7 +30,9 @@ Depends: ${misc:Depends}, ${python:Depends}, python-django-filters (<< 2), python-pil, python-tablib -Provides: ${python:Provides} +Breaks: python-authentic2-auth-fc (<< 0.26) +Replaces: python-authentic2-auth-fc (<< 0.26) +Provides: ${python:Provides}, python-authentic2-auth-fc Recommends: python-ldap Suggests: python-raven Description: Versatile identity server diff --git a/setup.py b/setup.py index fd53c63c..cfe9920c 100755 --- a/setup.py +++ b/setup.py @@ -117,6 +117,7 @@ setup(name="authentic2", install_requires=[ 'django>=1.8,<2.0', 'requests>=2.3', + 'requests-oauthlib', 'django-model-utils>=2.4', 'dnspython>=1.10', 'Django-Select2>5,<6', @@ -172,5 +173,6 @@ setup(name="authentic2", 'authentic2-idp-cas = authentic2_idp_cas:Plugin', 'authentic2-idp-oidc = authentic2_idp_oidc:Plugin', 'authentic2-provisionning-ldap = authentic2_provisionning_ldap:Plugin', + 'authentic2-auth-fc = authentic2_auth_fc:Plugin', ], }) diff --git a/src/authentic2_auth_fc/app_settings.py b/src/authentic2_auth_fc/app_settings.py index 54c55f80..a7b5cf03 100644 --- a/src/authentic2_auth_fc/app_settings.py +++ b/src/authentic2_auth_fc/app_settings.py @@ -18,7 +18,6 @@ import sys class AppSettings(object): - '''Thanks django-allauth''' __SENTINEL = object() def __init__(self, prefix): @@ -26,11 +25,10 @@ class AppSettings(object): def _setting(self, name, dflt=__SENTINEL): from django.conf import settings - from django.core.exceptions import ImproperlyConfigured v = getattr(settings, self.prefix + name, dflt) if v is self.__SENTINEL: - raise ImproperlyConfigured('Missing setting %r' % (self.prefix + name)) + raise AttributeError(name) return v @property diff --git a/tests/auth_fc/test_all.py b/tests/auth_fc/test_auth_fc.py similarity index 100% rename from tests/auth_fc/test_all.py rename to tests/auth_fc/test_auth_fc.py diff --git a/tests/auth_fc/test_api.py b/tests/auth_fc/test_auth_fc_api.py similarity index 100% rename from tests/auth_fc/test_api.py rename to tests/auth_fc/test_auth_fc_api.py -- 2.20.1