Skip to content

Commit 53d05ea

Browse files
committed
Remove optional dependencies from install_requires
1 parent a0c510a commit 53d05ea

File tree

2 files changed

+17
-5
lines changed

2 files changed

+17
-5
lines changed

setup.py

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,8 @@
88

99
install_requires = [
1010
# core dependencies
11-
'decorator',
1211
'requests >= 1.0.0',
1312
'future',
14-
'paste',
15-
'zope.interface',
16-
'repoze.who',
1713
'cryptography',
1814
'pytz',
1915
'pyOpenSSL',
@@ -22,6 +18,14 @@
2218
'six'
2319
]
2420

21+
extras_require = {
22+
's2repoze': [
23+
'paste',
24+
'zope.interface',
25+
'repoze.who'
26+
]
27+
}
28+
2529
version = ''
2630
with open('src/saml2/__init__.py', 'r') as fd:
2731
version = re.search(r'^__version__\s*=\s*[\'"]([^\'"]*)[\'"]',
@@ -56,5 +60,6 @@
5660
scripts=["tools/parse_xsd2.py", "tools/make_metadata.py",
5761
"tools/mdexport.py", "tools/merge_metadata.py"],
5862
install_requires=install_requires,
63+
extras_require=extras_require,
5964
zip_safe=False,
6065
)

tests/test_60_sp.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,17 @@
22
# -*- coding: utf-8 -*-
33

44
import base64
5+
import pytest
56
from saml2.authn_context import INTERNETPROTOCOLPASSWORD
67
from saml2.saml import NAMEID_FORMAT_TRANSIENT
78
from saml2.samlp import NameIDPolicy
8-
from saml2.s2repoze.plugins.sp import make_plugin
99
from saml2.server import Server
1010

11+
try:
12+
from saml2.s2repoze.plugins.sp import make_plugin
13+
except ImportError:
14+
make_plugin = None
15+
1116
ENV1 = {'SERVER_SOFTWARE': 'CherryPy/3.1.2 WSGI Server',
1217
'SCRIPT_NAME': '',
1318
'ACTUAL_SERVER_PROTOCOL': 'HTTP/1.1',
@@ -43,6 +48,8 @@
4348
}
4449

4550

51+
@pytest.mark.skipif(not make_plugin,
52+
reason="s2repoze dependencies not installed")
4653
class TestSP():
4754
def setup_class(self):
4855
self.sp = make_plugin("rem", saml_conf="server_conf")

0 commit comments

Comments
 (0)