jceel / py-libzfs

Python libzfs bindings
16 stars 8 forks source link

Fails to install on OSX #14

Closed kim0 closed 8 years ago

kim0 commented 8 years ago

Is this library written only for freebsd ? I just tried installing it on OSX and got the errors below. Any pointers to python-zfs bindings that can work on linux, freebsd & osx ?

$ pip install -e git://github.com/freenas/py-libzfs.git@9.10.1#egg=py-libzfs
Obtaining py-libzfs from git+git://github.com/freenas/py-libzfs.git@9.10.1#egg=py-libzfs
  Updating ./src/py-libzfs clone (to 9.10.1)
    Complete output from command python setup.py egg_info:
    uname: illegal option -- K
    usage: uname [-amnprsv]
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/private/tmp/src/agent/src/py-libzfs/setup.py", line 58, in <module>
        freebsd_version = int(subprocess.check_output("uname -K", shell=True).strip())
      File "/usr/local/Cellar/python3/3.5.2_1/Frameworks/Python.framework/Versions/3.5/lib/python3.5/subprocess.py", line 626, in check_output
        **kwargs).stdout
      File "/usr/local/Cellar/python3/3.5.2_1/Frameworks/Python.framework/Versions/3.5/lib/python3.5/subprocess.py", line 708, in run
        output=stdout, stderr=stderr)
    subprocess.CalledProcessError: Command 'uname -K' returned non-zero exit status 1
jceel commented 8 years ago

py-libzfs doesn't support operating systems other than FreeBSD at the moment. However, it shouldn't be very hard to add support for them - it should be a matter of getting rid of uname -K and figuring out correct include paths.