Choose required kerberos package depending on platform

This commit is contained in:
gentoo90 2014-07-06 12:41:28 +03:00
parent 83de077bc4
commit 60e0362930
3 changed files with 8 additions and 1 deletions

View File

@ -3,4 +3,6 @@ python:
- "2.6" - "2.6"
- "2.7" - "2.7"
install:
- pip install .
script: py.test test_requests_kerberos.py script: py.test test_requests_kerberos.py

View File

@ -1,2 +1 @@
requests>=1.1.0 requests>=1.1.0
kerberos==1.1.1

6
setup.py Normal file → Executable file
View File

@ -1,12 +1,18 @@
#!/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: with open('requirements.txt') as requirements:
requires = [line.strip() for line in requirements if line.strip()] 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')