summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlex Gaynor <alex.gaynor@gmail.com>2013-07-19 07:58:51 -0700
committerAlex Gaynor <alex.gaynor@gmail.com>2013-07-19 07:58:51 -0700
commit55dccf038770ccfdc1dd7e2396fc1b07a7b3ddb5 (patch)
tree15ed08b78a75d070f3e1c3222e3ff18445dc4eeb
parent635aeb0ec9db53f0df13ab5e42b95938a789b79f (diff)
downloadxattr-55dccf038770ccfdc1dd7e2396fc1b07a7b3ddb5.tar.gz
Make sure the dependency is installed.
-rw-r--r--setup.py13
1 files changed, 9 insertions, 4 deletions
diff --git a/setup.py b/setup.py
index fb3fc35..367f371 100644
--- a/setup.py
+++ b/setup.py
@@ -2,7 +2,12 @@
from setuptools import setup
-from xattr import lib
+try:
+ from xattr import lib
+except ImportError:
+ ext_modules = []
+else:
+ ext_modules = [lib.ffi.verifier.get_extension()]
VERSION = '0.6.4'
@@ -41,14 +46,14 @@ setup(
license="MIT License",
packages=['xattr'],
platforms=['MacOS X', 'Linux', 'FreeBSD', 'Solaris'],
- ext_modules=[
- lib.ffi.verifier.get_extension()
- ],
+ ext_modules=ext_modules,
entry_points={
'console_scripts': [
"xattr = xattr.tool:main",
],
},
+ install_requires=["cffi"],
+ setup_requires=["cffi"],
test_suite="xattr.tests.all_tests_suite",
zip_safe=False,
)