Skip to content

Commit 702d760

Browse files
committed
Set python-gssapi as an optional dependency and fixed up some other setup issues
1 parent f8b53a3 commit 702d760

File tree

3 files changed

+31
-7
lines changed

3 files changed

+31
-7
lines changed

README.md

Lines changed: 26 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -31,12 +31,27 @@ backlog for features that would be nice to have in this library.
3131
## Requirements
3232

3333
* Python 2.6, 2.7, 3.4-3.6
34-
* For Kerberos auth, the [python-gssapi](https://github.com/pythongssapi/python-gssapi) package (see below)
34+
* For Kerberos auth [python-gssapi](https://github.com/pythongssapi/python-gssapi)
3535

36-
The python-gssapi library is required to support Kerberos authentication but
37-
`smbprotocol` requires the GSSAPI GGF extension to support things like
38-
message encryption. To test out if the installed version of python-gsspapi
39-
can be used you can run the python commands in a Python console;
36+
To use Kerberos authentication, further dependencies are required, to install
37+
these dependencies run
38+
39+
```
40+
# for Debian/Ubuntu/etc:
41+
sudo apt-get install gcc python-dev libkrb5-dev
42+
pip install smbprotocol[kerberos]
43+
44+
# for RHEL/CentOS/etc:
45+
sudo yum install gcc python-devel krb5-devel krb5-workstation python-devel
46+
pip install smbprotocol[kerberos]
47+
```
48+
49+
Currently Kerberos authentication is not supported on Windows. As part of this
50+
optional extra, the python-gssapi library is installed and smbprotocol requires
51+
a particular GSSAPI extension to be available to work. This extension should
52+
be installed on the majority of MIT or Heimdall Kerberos installs but it isn't
53+
guaranteed. To verify that Kerberos is available you can run the following
54+
check in a Python console
4055

4156
```
4257
try:
@@ -55,7 +70,12 @@ version.
5570

5671
To install smbprotocol, simply run
5772

58-
`pip install smbprotocol`
73+
```
74+
pip install smbprotocol
75+
76+
# on a non Windows host, to install with Kerberos support
77+
pip install smbprotocol[kerberos]
78+
```
5979

6080
This will download the required packages that are used in this package and get
6181
your Python environment ready to go.

setup.cfg

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,6 @@ universal = 1
33

44
[tool:pytest]
55
pep8ignore = setup.py E501
6+
7+
[metadata]
8+
license_file = LICENSE

setup.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,8 @@
2727
':python_version<"2.7"': [
2828
'ordereddict'
2929
],
30-
':sys_platform!="win32"': [
30+
'kerberos:sys_platform=="win32"': [],
31+
'kerberos:sys_platform!="win32"': [
3132
'gssapi>=1.4.1'
3233
]
3334
},

0 commit comments

Comments
 (0)