Merge pull request #56 from rbcarson/platform-based-kerberos-dependency-51

Fix dependency for kerberos-sspi on Windows; else use pykerberos. (Fixes #51, #38)
This commit is contained in:
Ian Cordasco 2015-10-31 10:21:02 -05:00
commit 27e5d006d9
2 changed files with 9 additions and 10 deletions

View File

@ -1 +1,3 @@
requests>=1.1.0 requests>=1.1.0
kerberos-sspi >= 0.2; sys.platform == 'win32'
pykerberos >= 1.1.8, < 2.0.0; sys.platform != 'win32'

View File

@ -1,18 +1,9 @@
#!/usr/bin/env python #!/usr/bin/env python
# coding: utf-8 # coding: utf-8
import os import os
import sys
import re import re
from setuptools import setup from setuptools import setup
with open('requirements.txt') as requirements:
requires = [line.strip() for line in requirements if line.strip()]
if sys.platform == 'win32':
requires.append('kerberos-sspi')
else:
requires.append('kerberos==1.1.1')
path = os.path.dirname(__file__) path = os.path.dirname(__file__)
desc_fd = os.path.join(path, 'README.rst') desc_fd = os.path.join(path, 'README.rst')
hist_fd = os.path.join(path, 'HISTORY.rst') hist_fd = os.path.join(path, 'HISTORY.rst')
@ -56,7 +47,13 @@ setup(
package_data={'': ['LICENSE', 'AUTHORS']}, package_data={'': ['LICENSE', 'AUTHORS']},
include_package_data=True, include_package_data=True,
version=get_version(), version=get_version(),
install_requires=requires, install_requires=[
'requests>=1.1.0',
],
extras_require={
':sys_platform=="win32"': ['kerberos-sspi>=0.2'],
':sys_platform!="win32"': ['pykerberos>=1.1.8,<2.0.0'],
},
test_suite='test_requests_kerberos', test_suite='test_requests_kerberos',
tests_require=['mock'], tests_require=['mock'],
) )