michael@0: import os michael@0: from setuptools import setup, find_packages michael@0: import sys michael@0: michael@0: version = '0.7.6' michael@0: michael@0: # get documentation from the README michael@0: try: michael@0: here = os.path.dirname(os.path.abspath(__file__)) michael@0: description = file(os.path.join(here, 'README.md')).read() michael@0: except (OSError, IOError): michael@0: description = '' michael@0: michael@0: # dependencies michael@0: with open('requirements.txt') as f: michael@0: deps = f.read().splitlines() michael@0: michael@0: # Requirements.txt contains a pointer to the local copy of marionette_transport; michael@0: # if we're installing using setup.py, handle this locally or replace with a valid michael@0: # pypi package reference. michael@0: deps = [x for x in deps if 'transport' not in x] michael@0: transport_dir = os.path.join(os.path.dirname(__file__), os.path.pardir, 'transport') michael@0: method = [x for x in sys.argv if x in ('develop', 'install')] michael@0: if os.path.exists(transport_dir) and method: michael@0: cmd = [sys.executable, 'setup.py', method[0]] michael@0: import subprocess michael@0: try: michael@0: subprocess.check_call(cmd, cwd=transport_dir) michael@0: except subprocess.CalledProcessError: michael@0: print "Error running setup.py in %s" % directory michael@0: raise michael@0: else: michael@0: deps += ['marionette-transport == 0.1'] michael@0: michael@0: setup(name='marionette_client', michael@0: version=version, michael@0: description="Marionette test automation client", michael@0: long_description=description, michael@0: classifiers=[], # Get strings from http://pypi.python.org/pypi?%3Aaction=list_classifiers michael@0: keywords='mozilla', michael@0: author='Jonathan Griffin', michael@0: author_email='jgriffin@mozilla.com', michael@0: url='https://wiki.mozilla.org/Auto-tools/Projects/Marionette', michael@0: license='MPL', michael@0: packages=find_packages(exclude=['ez_setup', 'examples', 'tests']), michael@0: package_data={'marionette': ['touch/*.js']}, michael@0: include_package_data=True, michael@0: zip_safe=False, michael@0: entry_points=""" michael@0: # -*- Entry points: -*- michael@0: [console_scripts] michael@0: marionette = marionette.runtests:cli michael@0: """, michael@0: install_requires=deps, michael@0: ) michael@0: