#!/usr/bin/env python

from distutils.core import setup, Extension

uinput = Extension('libuinput',
                   sources = ['src/uinput.c'])

setup(name='python-steamcontroller',
      version='1.0',
      description='Steam Controller userland driver',
      author='Stany MARCEL',
      author_email='stanypub@gmail.com',
      url='https://github.com/ynsta/steamcontroller',
      package_dir={'steamcontroller': 'src'},
      packages=['steamcontroller'],
      scripts=['scripts/sc-dump.py',
               'scripts/sc-xbox.py',
               'scripts/sc-desktop.py',
               'scripts/sc-test-cmsg.py',
               'scripts/sc-gyro-plot.py',
               'scripts/vdf2json.py',
               'scripts/json2vdf.py'],
      license='MIT',
      platforms=['Linux'],
      ext_modules=[uinput, ])

@@ -20,27 +20,34 @@
 on%0A%0A
-from distutils.core
+import sys%0Afrom setuptools
  imp
@@ -148,16 +148,91 @@
 t.c'%5D)%0A%0A
+deps = %5B'libusb1'%5D%0Aif sys.version_info %3C (3,4):%0A    deps.append('enum34')%0A%0A
 setup(na
@@ -860,24 +860,53 @@
 =%5B'Linux'%5D,%0A
+      install_requires=deps,%0A
       ext_mo

Add dependencies to the setup.py