Skip to content

Commit

Permalink
Set python-gssapi as an optional dependency and fixed up some other s…
Browse files Browse the repository at this point in the history
…etup issues
  • Loading branch information
jborean93 committed Feb 20, 2018
1 parent f8b53a3 commit 702d760
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 7 deletions.
32 changes: 26 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,27 @@ backlog for features that would be nice to have in this library.
## Requirements

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

The python-gssapi library is required to support Kerberos authentication but
`smbprotocol` requires the GSSAPI GGF extension to support things like
message encryption. To test out if the installed version of python-gsspapi
can be used you can run the python commands in a Python console;
To use Kerberos authentication, further dependencies are required, to install
these dependencies run

```
# for Debian/Ubuntu/etc:
sudo apt-get install gcc python-dev libkrb5-dev
pip install smbprotocol[kerberos]
# for RHEL/CentOS/etc:
sudo yum install gcc python-devel krb5-devel krb5-workstation python-devel
pip install smbprotocol[kerberos]
```

Currently Kerberos authentication is not supported on Windows. As part of this
optional extra, the python-gssapi library is installed and smbprotocol requires
a particular GSSAPI extension to be available to work. This extension should
be installed on the majority of MIT or Heimdall Kerberos installs but it isn't
guaranteed. To verify that Kerberos is available you can run the following
check in a Python console

```
try:
Expand All @@ -55,7 +70,12 @@ version.

To install smbprotocol, simply run

`pip install smbprotocol`
```
pip install smbprotocol
# on a non Windows host, to install with Kerberos support
pip install smbprotocol[kerberos]
```

This will download the required packages that are used in this package and get
your Python environment ready to go.
Expand Down
3 changes: 3 additions & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,6 @@ universal = 1

[tool:pytest]
pep8ignore = setup.py E501

[metadata]
license_file = LICENSE
3 changes: 2 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@
':python_version<"2.7"': [
'ordereddict'
],
':sys_platform!="win32"': [
'kerberos:sys_platform=="win32"': [],
'kerberos:sys_platform!="win32"': [
'gssapi>=1.4.1'
]
},
Expand Down

0 comments on commit 702d760

Please sign in to comment.