1try:
2    from setuptools import setup
3except ImportError:
4    from distutils.core import setup
5import os
6import sys
7
8
9def long_description():
10    readme = os.path.join(os.path.dirname(__file__), 'README.md')
11    with open(readme, 'r') as inf:
12        readme_text = inf.read()
13    return(readme_text)
14
15#Check for dependencies
16dependencies = []
17if sys.platform == 'darwin':  # Mac
18    dependencies.append('pyobjc-framework-Quartz')
19elif sys.platform == 'win32':  # Windows
20    dependencies.extend(['pyHook', 'pywin32'])
21else:  # X11 (LInux)
22    dependencies.append('python-xlib')
23
24setup(name='PyUserInput',
25      version='0.1.11',
26      description='A simple, cross-platform module for mouse and keyboard control',
27      long_description=long_description(),
28      author='Paul Barton <pablo.barton@gmail.com>, Pepijn de Vos <pepijndevos@gmail.com>',
29      author_email='pablo.barton@gmail.com',  # Replace with mailing list perhaps
30      url='https://github.com/PyUserInput/PyUserInput',
31      package_dir = {'': '.'},
32      packages = ['pykeyboard', 'pymouse'],
33      license='http://www.gnu.org/licenses/gpl-3.0.html',
34      keywords='mouse,keyboard user input event',
35      install_requires=dependencies,
36      )
37