/testing/web-platform/tests/tools/wptrunner/setup.py

https://bitbucket.org/vionika/spin.android
Python | 73 lines | 57 code | 11 blank | 5 comment | 2 complexity | 8ccbac57f33c5a25655105d9c1f58852 MD5 | raw file
  1. # This Source Code Form is subject to the terms of the Mozilla Public
  2. # License, v. 2.0. If a copy of the MPL was not distributed with this file,
  3. # You can obtain one at http://mozilla.org/MPL/2.0/.
  4. from __future__ import print_function
  5. import glob
  6. import os
  7. import sys
  8. import textwrap
  9. from setuptools import setup, find_packages
  10. here = os.path.split(__file__)[0]
  11. PACKAGE_NAME = 'wptrunner'
  12. PACKAGE_VERSION = '1.14'
  13. # Dependencies
  14. with open(os.path.join(here, "requirements.txt")) as f:
  15. deps = f.read().splitlines()
  16. # Browser-specific requirements
  17. requirements_files = glob.glob("requirements_*.txt")
  18. profile_dest = None
  19. dest_exists = False
  20. setup(name=PACKAGE_NAME,
  21. version=PACKAGE_VERSION,
  22. description="Harness for running the W3C web-platform-tests against various products",
  23. author='Mozilla Automation and Testing Team',
  24. author_email='tools@lists.mozilla.org',
  25. license='MPL 2.0',
  26. packages=find_packages(exclude=["tests", "metadata", "prefs"]),
  27. entry_points={
  28. 'console_scripts': [
  29. 'wptrunner = wptrunner.wptrunner:main',
  30. 'wptupdate = wptrunner.update:main',
  31. ]
  32. },
  33. zip_safe=False,
  34. platforms=['Any'],
  35. classifiers=['Development Status :: 4 - Beta',
  36. 'Environment :: Console',
  37. 'Intended Audience :: Developers',
  38. 'License :: OSI Approved :: BSD License',
  39. 'Operating System :: OS Independent'],
  40. package_data={"wptrunner": ["executors/testharness_marionette.js",
  41. "executors/testharness_webdriver.js",
  42. "executors/reftest.js",
  43. "executors/reftest-wait.js",
  44. "testharnessreport.js",
  45. "testharness_runner.html",
  46. "wptrunner.default.ini",
  47. "browsers/sauce_setup/*",
  48. "prefs/*"]},
  49. include_package_data=True,
  50. data_files=[("requirements", requirements_files)],
  51. install_requires=deps
  52. )
  53. if "install" in sys.argv:
  54. path = os.path.relpath(os.path.join(sys.prefix, "requirements"), os.curdir)
  55. print(textwrap.fill("""In order to use with one of the built-in browser
  56. products, you will need to install the extra dependencies. These are provided
  57. as requirements_[name].txt in the %s directory and can be installed using
  58. e.g.""" % path, 80))
  59. print("""
  60. pip install -r %s/requirements_firefox.txt
  61. """ % path)