1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/testing/marionette/client/setup.py Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,56 @@ 1.4 +import os 1.5 +from setuptools import setup, find_packages 1.6 +import sys 1.7 + 1.8 +version = '0.7.6' 1.9 + 1.10 +# get documentation from the README 1.11 +try: 1.12 + here = os.path.dirname(os.path.abspath(__file__)) 1.13 + description = file(os.path.join(here, 'README.md')).read() 1.14 +except (OSError, IOError): 1.15 + description = '' 1.16 + 1.17 +# dependencies 1.18 +with open('requirements.txt') as f: 1.19 + deps = f.read().splitlines() 1.20 + 1.21 +# Requirements.txt contains a pointer to the local copy of marionette_transport; 1.22 +# if we're installing using setup.py, handle this locally or replace with a valid 1.23 +# pypi package reference. 1.24 +deps = [x for x in deps if 'transport' not in x] 1.25 +transport_dir = os.path.join(os.path.dirname(__file__), os.path.pardir, 'transport') 1.26 +method = [x for x in sys.argv if x in ('develop', 'install')] 1.27 +if os.path.exists(transport_dir) and method: 1.28 + cmd = [sys.executable, 'setup.py', method[0]] 1.29 + import subprocess 1.30 + try: 1.31 + subprocess.check_call(cmd, cwd=transport_dir) 1.32 + except subprocess.CalledProcessError: 1.33 + print "Error running setup.py in %s" % directory 1.34 + raise 1.35 +else: 1.36 + deps += ['marionette-transport == 0.1'] 1.37 + 1.38 +setup(name='marionette_client', 1.39 + version=version, 1.40 + description="Marionette test automation client", 1.41 + long_description=description, 1.42 + classifiers=[], # Get strings from http://pypi.python.org/pypi?%3Aaction=list_classifiers 1.43 + keywords='mozilla', 1.44 + author='Jonathan Griffin', 1.45 + author_email='jgriffin@mozilla.com', 1.46 + url='https://wiki.mozilla.org/Auto-tools/Projects/Marionette', 1.47 + license='MPL', 1.48 + packages=find_packages(exclude=['ez_setup', 'examples', 'tests']), 1.49 + package_data={'marionette': ['touch/*.js']}, 1.50 + include_package_data=True, 1.51 + zip_safe=False, 1.52 + entry_points=""" 1.53 + # -*- Entry points: -*- 1.54 + [console_scripts] 1.55 + marionette = marionette.runtests:cli 1.56 + """, 1.57 + install_requires=deps, 1.58 + ) 1.59 +