Permalink
Browse files

Fix requirements for python 2.7

Add a requirement exception for previous versions of python
  • Loading branch information...
Diaoul committed Apr 11, 2012
1 parent 12a58b0 commit 1e11c020067a662afccfec5f5e4f6c868e19737f
Showing with 7 additions and 3 deletions.
  1. +1 −2 requirements.txt
  2. +6 −1 setup.py
View
@@ -1,5 +1,4 @@
BeautifulSoup>=3.2.0
guessit>=0.2
requests
-enzyme>=0.1
-argparse>=1.1
+enzyme>=0.1
View
@@ -17,12 +17,17 @@
# You should have received a copy of the GNU Lesser General Public License
# along with subliminal. If not, see <http://www.gnu.org/licenses/>.
import os.path
+import sys
from setuptools import setup, find_packages
def read(fname):
return open(os.path.join(os.path.dirname(__file__), fname)).read()
+required = ['BeautifulSoup >= 3.2.0', 'guessit >= 0.2', 'requests', 'enzyme >= 0.1']
+if sys.hexversion < 0x20700f0:
+ required.append('argparse >= 1.1')
+
execfile(os.path.join(os.path.dirname(__file__), 'subliminal', 'infos.py'))
setup(name='subliminal',
version=__version__,
@@ -43,4 +48,4 @@ def read(fname):
url='https://github.com/Diaoul/subliminal',
packages=find_packages(),
scripts=['scripts/subliminal'],
- install_requires=['BeautifulSoup >= 3.2.0', 'guessit >= 0.2', 'requests', 'enzyme >= 0.1', 'argparse >= 1.1'])
+ install_requires=required)

0 comments on commit 1e11c02

Please sign in to comment.