summaryrefslogtreecommitdiff
path: root/setup.py
diff options
context:
space:
mode:
authorSebastien Martini <seb@dbzteam.org>2014-07-06 18:12:58 +0200
committerSebastien Martini <seb@dbzteam.org>2014-07-06 18:12:58 +0200
commit12cf58b82bd81624fd8d87239697474cadf73c3a (patch)
tree8c16e724810a85834f10e9eb73bf63db40a75a70 /setup.py
parent8e190d29cc7f70a25e30b9b798e27a1c997fe7f5 (diff)
downloadpyinotify-12cf58b82bd81624fd8d87239697474cadf73c3a.tar.gz
Stub support for Pyinotify on FreeBSD.
I don't have any FreeBSD system, so test it and report any issue with this code. Closes #64
Diffstat (limited to 'setup.py')
-rwxr-xr-xsetup.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/setup.py b/setup.py
index c318749..355340d 100755
--- a/setup.py
+++ b/setup.py
@@ -25,7 +25,7 @@ if sys.version_info < (2, 4):
sys.exit(1)
# check linux platform
-if not platform.startswith('linux'):
+if not platform.startswith('linux') and not platform.startswith('freebsd'):
sys.stderr.write("inotify is not available on %s\n" % platform)
sys.exit(1)
@@ -66,9 +66,13 @@ def should_compile_ext_mod():
except:
return True
+ try_libc_name = 'c'
+ if platform.startswith('freebsd'):
+ try_libc_name = 'inotify'
+
libc_name = None
try:
- libc_name = ctypes.util.find_library('c')
+ libc_name = ctypes.util.find_library(try_libc_name)
except:
pass # Will attemp to load it with None anyway.