Description: add portserver script
Author: Sascha Steinbiss <satta@debian.org>
--- a/setup.py
+++ b/setup.py
@@ -25,13 +25,22 @@
     requires = []
     scripts = []
     py_version = sys.version_info[:2]
+    my_entry_points = {}
+    my_modules = ['portpicker']
     if py_version < (3, 3):
         requires.append('mock(>=1.0)')
     if py_version == (3, 3):
         requires.append('asyncio(>=3.4)')
     if py_version >= (3, 3):
         # The example portserver implementation requires Python 3 and asyncio.
-        scripts.append('src/portserver.py')
+        #scripts.append('src/portserver.py')
+        my_entry_points = {
+            'console_scripts': [
+                'portserver=portserver:main'
+            ]
+        }
+        my_modules.append('portserver')
+
 
     setuptools.setup(
         name='portpicker',
@@ -46,10 +55,10 @@
         maintainer_email='greg@krypto.org',
         url='https://github.com/google/python_portpicker',
         package_dir={'': 'src'},
-        py_modules=['portpicker'],
+        py_modules=my_modules,
         platforms=['POSIX'],
         requires=requires,
-        scripts=scripts,
+        entry_points=my_entry_points,
         classifiers=
         ['Development Status :: 5 - Production/Stable',
          'License :: OSI Approved :: Apache Software License',
