testing/marionette/client/setup.py

Thu, 22 Jan 2015 13:21:57 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Thu, 22 Jan 2015 13:21:57 +0100
branch
TOR_BUG_9701
changeset 15
b8a032363ba2
permissions
-rw-r--r--

Incorporate requested changes from Mozilla in review:
https://bugzilla.mozilla.org/show_bug.cgi?id=1123480#c6

     1 import os
     2 from setuptools import setup, find_packages
     3 import sys
     5 version = '0.7.6'
     7 # get documentation from the README
     8 try:
     9     here = os.path.dirname(os.path.abspath(__file__))
    10     description = file(os.path.join(here, 'README.md')).read()
    11 except (OSError, IOError):
    12     description = ''
    14 # dependencies
    15 with open('requirements.txt') as f:
    16     deps = f.read().splitlines()
    18 # Requirements.txt contains a pointer to the local copy of marionette_transport;
    19 # if we're installing using setup.py, handle this locally or replace with a valid
    20 # pypi package reference.
    21 deps = [x for x in deps if 'transport' not in x]
    22 transport_dir = os.path.join(os.path.dirname(__file__), os.path.pardir, 'transport')
    23 method = [x for x in sys.argv if x in ('develop', 'install')]
    24 if os.path.exists(transport_dir) and method:
    25     cmd = [sys.executable, 'setup.py', method[0]]
    26     import subprocess
    27     try:
    28         subprocess.check_call(cmd, cwd=transport_dir)
    29     except subprocess.CalledProcessError:
    30         print "Error running setup.py in %s" % directory
    31         raise
    32 else:
    33     deps += ['marionette-transport == 0.1']
    35 setup(name='marionette_client',
    36       version=version,
    37       description="Marionette test automation client",
    38       long_description=description,
    39       classifiers=[], # Get strings from http://pypi.python.org/pypi?%3Aaction=list_classifiers
    40       keywords='mozilla',
    41       author='Jonathan Griffin',
    42       author_email='jgriffin@mozilla.com',
    43       url='https://wiki.mozilla.org/Auto-tools/Projects/Marionette',
    44       license='MPL',
    45       packages=find_packages(exclude=['ez_setup', 'examples', 'tests']),
    46       package_data={'marionette': ['touch/*.js']},
    47       include_package_data=True,
    48       zip_safe=False,
    49       entry_points="""
    50       # -*- Entry points: -*-
    51       [console_scripts]
    52       marionette = marionette.runtests:cli
    53       """,
    54       install_requires=deps,
    55       )

mercurial