Commit b583b8d8 authored by Laurent Bachelier's avatar Laurent Bachelier 🐧

setup: Add futures, avoid Py2-only libs under Py3

parent 1b4f7508
#! /usr/bin/env python
# -*- coding: utf-8 -*-
# Copyright(C) 2010-2013 Christophe Benz, Laurent Bachelier
# Copyright(C) 2010-2014 Christophe Benz, Laurent Bachelier
#
# This file is part of weboob.
#
......@@ -19,13 +19,14 @@
# along with weboob. If not, see <http://www.gnu.org/licenses/>.
from __future__ import print_function
from setuptools import find_packages, setup
import glob
import os
import subprocess
import sys
from setuptools import find_packages, setup
def find_executable(name, names):
envname = '%s_EXECUTABLE' % name.upper()
......@@ -63,7 +64,15 @@ def install_weboob():
packages = set(find_packages(exclude=['modules']))
hildon_scripts = set(('masstransit',))
qt_scripts = set(('qboobmsg', 'qhavedate', 'qvideoob', 'weboob-config-qt', 'qwebcontentedit', 'qflatboob', 'qcineoob', 'qcookboob', 'qhandjoob'))
qt_scripts = set(('qboobmsg',
'qhavedate',
'qvideoob',
'weboob-config-qt',
'qwebcontentedit',
'qflatboob',
'qcineoob',
'qcookboob',
'qhandjoob'))
if not options.hildon:
scripts = scripts - hildon_scripts
......@@ -114,12 +123,10 @@ def install_weboob():
requirements = [
'lxml',
'feedparser',
'mechanize',
'requests',
'gdata',
'python-dateutil',
'PyYAML',
'prettytable'
'prettytable',
]
try:
import Image
......@@ -132,7 +139,14 @@ def install_weboob():
else:
requirements.append('PIL')
if sys.version_info < (2,6):
if sys.version_info < (3, 0):
requirements.append('gdata')
requirements.append('mechanize')
if sys.version_info < (3, 2):
requirements.append('futures')
if sys.version_info < (2, 6):
print('Python older than 2.6 is not supported.', file=sys.stderr)
sys.exit(1)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment