setup.py 5.71 KB
Newer Older
1
#! /usr/bin/env python3
Christophe Benz's avatar
Christophe Benz committed
2
3
# -*- coding: utf-8 -*-

4
# Copyright(C) 2010-2014 Christophe Benz, Laurent Bachelier
5
#
Romain Bignon's avatar
Romain Bignon committed
6
# This file is part of weboob.
7
#
Romain Bignon's avatar
Romain Bignon committed
8
# weboob is free software: you can redistribute it and/or modify
9
# it under the terms of the GNU Lesser General Public License as published by
Romain Bignon's avatar
Romain Bignon committed
10
11
12
13
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# weboob is distributed in the hope that it will be useful,
14
# but WITHOUT ANY WARRANTY; without even the implied warranty of
Romain Bignon's avatar
Romain Bignon committed
15
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16
# GNU Lesser General Public License for more details.
17
#
18
# You should have received a copy of the GNU Lesser General Public License
Romain Bignon's avatar
Romain Bignon committed
19
# along with weboob. If not, see <http://www.gnu.org/licenses/>.
20

21
from __future__ import print_function
Christophe Benz's avatar
Christophe Benz committed
22

23
import glob
Christophe Benz's avatar
Christophe Benz committed
24
import os
25
26
import sys

27
28
from setuptools import find_packages, setup

29

30
31
32
PY3 = sys.version_info.major >= 3


hydrargyrum's avatar
hydrargyrum committed
33
def install_weboob():
34
    packages = set(find_packages(exclude=['modules', 'modules.*']))
35

36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
    entry_points = {
        'console_scripts': [
            'boobank = weboob.applications.boobank:Boobank.run',
            'boobathon = weboob.applications.boobathon:Boobathon.run',
            'boobcoming = weboob.applications.boobill:Boobcoming.run',
            'boobill = weboob.applications.boobank:Boobill.run',
            'booblyrics = weboob.applications.booblyrics:Booblyrics.run',
            'boobmsg = weboob.applications.boobmsg:Boobmsg.run',
            'boobooks = weboob.applications.boobooks:Boobooks.run',
            'boobsize = weboob.applications.boobsize:Boobsize.run',
            'boobtracker = weboob.applications.boobtracker:BoobTracker.run',
            'boomoney = weboob.applications.boomoney:Boomoney.run',
            'cineoob = weboob.applications.cineoob:Cineoob.run',
            'comparoob = weboob.applications.comparoob:Comparoob.run',
            'cookboob = weboob.applications.cookboob:Cookboob.run',
            'flatboob = weboob.applications.flatboob:Flatboob.run',
            'galleroob = weboob.applications.galleroob:Galleroob.run',
            'geolooc = weboob.applications.geolooc:Geolooc.run',
            'handjoob = weboob.applications.handjoob:Handjoob.run',
            'havedate = weboob.applications.havedate:HaveDate.run',
            'monboob = weboob.applications.monboob:Monboob.run',
            'parceloob = weboob.applications.parceloob:Parceloob.run',
            'pastoob = weboob.applications.pastoob:Pastoob.run',
            'radioob = weboob.applications.radioob:Radioob.run',
            'shopoob = weboob.applications.shopoob:Shopoob.run',
            'suboob = weboob.applications.suboob:Suboob.run',
            'translaboob = weboob.applications.translaboob:Translaboob.run',
            'traveloob = weboob.applications.traveloob:Traveloob.run',
            'videoob = weboob.applications.videoob:Videoob.run',
            'webcontentedit = weboob.applications.webcontentedit:WebContentEdit.run',
            'weboob-cli = weboob.applications.weboobcli:WeboobCli.run',
            'weboob-config = weboob.applications.weboobcfg:WeboobCfg.run',
            'weboob-debug = weboob.applications.weboobdebug:WeboobDebug.run',
            'weboob-repos = weboob.applications.weboobrepos:WeboobRepos.run',
            'weboorrents = weboob.applications.weboorrents:Weboorrents.run',
            'wetboobs = weboob.applications.wetboobs:WetBoobs.run',
            'weboob = weboob.applications.weboobmain:WeboobMain.run',
        ],
    }
75
76
77
78
79
80
81
82

    data_files = [
        ('share/man/man1', glob.glob('man/*')),
    ]

    # Do not put PyQt, it does not work properly.
    requirements = [
        'lxml',
83
        'cssselect',
84
        'requests>=2.0.0',
85
86
        'python-dateutil',
        'PyYAML',
87
        'html2text>=3.200',
88
        'six',
89
        'unidecode',
90
        'Pillow',
91
        'Babel',
92
93
    ]

94
95
96
97
98
99
100
    try:
        if sys.argv[1] == 'requirements':
            print('\n'.join(requirements))
            sys.exit(0)
    except IndexError:
        pass

101
102
    setup(
        name='weboob',
Romain Bignon's avatar
Romain Bignon committed
103
        version='1.6',
104
        description='Weboob, Web Outside Of Browsers',
105
        long_description=open('README.md').read(),
106
107
108
109
110
        author='Romain Bignon',
        author_email='weboob@weboob.org',
        maintainer='Romain Bignon',
        maintainer_email='romain@weboob.org',
        url='http://weboob.org/',
111
        license='GNU LGPL 3',
112
113
114
        classifiers=[
            'Environment :: Console',
            'Environment :: X11 Applications :: Qt',
115
            'License :: OSI Approved :: GNU Lesser General Public License v3 or later (LGPLv3+)',
Laurent Bachelier's avatar
Laurent Bachelier committed
116
117
118
119
120
            'Programming Language :: Python',
            'Programming Language :: Python :: 3',
            'Programming Language :: Python :: 3.5',
            'Programming Language :: Python :: 3.6',
            'Programming Language :: Python :: 3.7',
121
            'Programming Language :: Python :: 3.8',
122
123
124
            'Programming Language :: Python',
            'Topic :: Communications :: Email',
            'Topic :: Internet :: WWW/HTTP',
Laurent Bachelier's avatar
Laurent Bachelier committed
125
126
127
128
            'Topic :: Internet :: WWW/HTTP :: Browsers',
            'Topic :: Software Development :: Libraries :: Application Frameworks',
            'Topic :: Software Development :: Libraries :: Python Modules',
            'Topic :: Text Processing :: Markup :: HTML',
129
130
131
        ],

        packages=packages,
132
        entry_points=entry_points,
133
134
135
        data_files=data_files,

        install_requires=requirements,
136
        python_requires='>=3.5',
137
138
139
140
141
142
        tests_require=[
            'flake8',
            'nose',
            'xunitparser',
            'coverage',
        ],
143
144
    )

145

146
147
148
149
if os.getenv('WEBOOB_SETUP'):
    args = os.getenv('WEBOOB_SETUP').split()
else:
    args = sys.argv[1:]
150

151
sys.argv = [sys.argv[0]] + args
Christophe Benz's avatar
Christophe Benz committed
152

hydrargyrum's avatar
hydrargyrum committed
153
install_weboob()