Permalink
Browse files

avoid installing thrift 0.9.0 under Python 2.5 or earlier

it's no longer compatible with those versions
  • Loading branch information...
hannosch committed Nov 5, 2012
1 parent e03e591 commit cd53f639c7f8ceb5e41c90b9443a24895ad13800
Showing with 8 additions and 2 deletions.
  1. +8 −2 setup.py
View
@@ -2,7 +2,7 @@
# -*- coding: utf-8 -*-
#
-import os
+import os, sys
try:
import subprocess
@@ -34,6 +34,12 @@
5. A method to map an existing class to a Cassandra column family
"""
+if sys.version_info < (2, 6):
+ install_requires = ['thrift < 0.9.0']
+else:
+ install_requires = ['thrift']
+
+
class rpm(Command):
description = "builds a RPM package"
@@ -122,7 +128,7 @@ def run(self):
packages = ['pycassa',
'pycassa.cassandra',
'pycassa.logging'],
- install_requires = ['thrift'],
+ install_requires = install_requires,
py_modules=['ez_setup'],
scripts=['pycassaShell'],
cmdclass={"doc": doc, "rpm": rpm},

0 comments on commit cd53f63

Please sign in to comment.