|
| 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 | + |
| 5 | +import glob |
| 6 | +import os |
| 7 | +import sys |
| 8 | +import textwrap |
| 9 | + |
| 10 | +from setuptools import setup, find_packages |
| 11 | + |
| 12 | +here = os.path.dirname(__file__) |
| 13 | + |
| 14 | +PACKAGE_NAME = 'wptrunner' |
| 15 | +PACKAGE_VERSION = '1.14' |
| 16 | + |
| 17 | +# Dependencies |
| 18 | +with open(os.path.join(here, "requirements.txt")) as f: |
| 19 | + deps = f.read().splitlines() |
| 20 | + |
| 21 | +# Browser-specific requirements |
| 22 | +requirements_files = glob.glob("requirements_*.txt") |
| 23 | + |
| 24 | +profile_dest = None |
| 25 | +dest_exists = False |
| 26 | + |
| 27 | +setup(name=PACKAGE_NAME, |
| 28 | + version=PACKAGE_VERSION, |
| 29 | + description="Harness for running the W3C web-platform-tests against various products", |
| 30 | + author='Mozilla Automation and Testing Team', |
| 31 | + |
| 32 | + license='MPL 2.0', |
| 33 | + packages=find_packages(exclude=["tests", "metadata", "prefs"]), |
| 34 | + entry_points={ |
| 35 | + 'console_scripts': [ |
| 36 | + 'wptrunner = wptrunner.wptrunner:main', |
| 37 | + 'wptupdate = wptrunner.update:main', |
| 38 | + ] |
| 39 | + }, |
| 40 | + zip_safe=False, |
| 41 | + platforms=['Any'], |
| 42 | + classifiers=['Development Status :: 4 - Beta', |
| 43 | + 'Environment :: Console', |
| 44 | + 'Intended Audience :: Developers', |
| 45 | + 'License :: OSI Approved :: BSD License', |
| 46 | + 'Operating System :: OS Independent'], |
| 47 | + package_data={"wptrunner": ["executors/testharness_marionette.js", |
| 48 | + "executors/testharness_webdriver.js", |
| 49 | + "executors/reftest.js", |
| 50 | + "executors/reftest-wait.js", |
| 51 | + "testharnessreport.js", |
| 52 | + "testharness_runner.html", |
| 53 | + "wptrunner.default.ini", |
| 54 | + "browsers/sauce_setup/*", |
| 55 | + "prefs/*"]}, |
| 56 | + include_package_data=True, |
| 57 | + data_files=[("requirements", requirements_files)], |
| 58 | + ) |
| 59 | + |
| 60 | +if "install" in sys.argv: |
| 61 | + path = os.path.relpath(os.path.join(sys.prefix, "requirements"), os.curdir) |
| 62 | + print(textwrap.fill("""In order to use with one of the built-in browser |
| 63 | +products, you will need to install the extra dependencies. These are provided |
| 64 | +as requirements_[name].txt in the %s directory and can be installed using |
| 65 | +e.g.""" % path, 80)) |
| 66 | + |
| 67 | + print(""" |
| 68 | +
|
| 69 | +pip install -r %s/requirements_firefox.txt |
| 70 | +""" % path) |
0 commit comments