I decided not to contribute anymore to Weboob as I don't want to legitimate the views of the project. This is a personal clone, likely unmaintained.

setup.py 1.7KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. #! /usr/bin/env python3
  2. # -*- coding: utf-8 -*-
  3. # Copyright(C) 2010-2014 Christophe Benz, Laurent Bachelier
  4. #
  5. # This file is part of weboob.
  6. #
  7. # weboob is free software: you can redistribute it and/or modify
  8. # it under the terms of the GNU Lesser General Public License as published by
  9. # the Free Software Foundation, either version 3 of the License, or
  10. # (at your option) any later version.
  11. #
  12. # weboob is distributed in the hope that it will be useful,
  13. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  14. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  15. # GNU Lesser General Public License for more details.
  16. #
  17. # You should have received a copy of the GNU Lesser General Public License
  18. # along with weboob. If not, see <http://www.gnu.org/licenses/>.
  19. from __future__ import print_function
  20. import glob
  21. import os
  22. import sys
  23. from setuptools import find_packages, setup
  24. PY3 = sys.version_info.major >= 3
  25. def install_weboob():
  26. packages = set(find_packages(exclude=['modules', 'modules.*']))
  27. data_files = [
  28. ('share/man/man1', glob.glob('man/*')),
  29. ]
  30. requirements = [
  31. 'lxml',
  32. 'cssselect',
  33. 'requests>=2.0.0',
  34. 'python-dateutil',
  35. 'PyYAML',
  36. 'html2text>=3.200',
  37. 'six',
  38. 'unidecode',
  39. 'Pillow',
  40. 'Babel',
  41. ]
  42. try:
  43. if sys.argv[1] == 'requirements':
  44. print('\n'.join(requirements))
  45. sys.exit(0)
  46. except IndexError:
  47. pass
  48. setup(
  49. packages=packages,
  50. data_files=data_files,
  51. )
  52. if os.getenv('WEBOOB_SETUP'):
  53. args = os.getenv('WEBOOB_SETUP').split()
  54. else:
  55. args = sys.argv[1:]
  56. sys.argv = [sys.argv[0]] + args
  57. install_weboob()