"""Simple distutils setup for the pure Python portpicker."""

import sys
import textwrap
import distutils.core


def main():
    requires = []
    scripts = []
    py_version = sys.version_info[:2]
    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')

    distutils.core.setup(
        name='portpicker',
        version='1.0.0',
        description='A library to choose unique available network ports.',
        long_description=textwrap.dedent("""
          Portpicker provides an API to find and return an available network
          port for an application to bind to.  Ideally suited for use from
          unittests or for test harnesses that launch a local server."""),
        license='Apache 2.0',
        maintainer='Google',
        url='https://github.com/google/python_portpicker',
        package_dir={'': 'src'},
        py_modules=['portpicker'],
        platforms=['POSIX'],
        requires=requires,
        scripts=scripts,
        classifiers=
        ['Development Status :: 5 - Production/Stable',
         'License :: OSI Approved :: Apache Software License',
         'Intended Audience :: Developers', 'Programming Language :: Python',
         'Programming Language :: Python :: 2',
         'Programming Language :: Python :: 2.7',
         'Programming Language :: Python :: 3',
         'Programming Language :: Python :: 3.3',
         'Programming Language :: Python :: 3.4',
         'Programming Language :: Python :: Implementation :: CPython',
         'Programming Language :: Python :: Implementation :: Jython',
         'Programming Language :: Python :: Implementation :: PyPy'])


if __name__ == '__main__':
    main()

@@ -1,8 +1,606 @@
+# Copyright 2015 Google Inc. All Rights Reserved.%0A#%0A# Licensed under the Apache License, Version 2.0 (the %22License%22);%0A# you may not use this file except in compliance with the License.%0A# You may obtain a copy of the License at%0A#%0A#     http://www.apache.org/licenses/LICENSE-2.0%0A#%0A# Unless required by applicable law or agreed to in writing, software%0A# distributed under the License is distributed on an %22AS IS%22 BASIS,%0A# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.%0A# See the License for the specific language governing permissions and%0A# limitations under the License.%0A#%0A
 %22%22%22Simpl
@@ -653,16 +653,38 @@
 er.%22%22%22%0A%0A
+import distutils.core%0A
 import s
@@ -702,38 +702,16 @@
 extwrap%0A
-import distutils.core%0A
 %0A%0Adef ma
@@ -1154,17 +1154,17 @@
 on='1.0.
-0
+1
 ',%0A     
@@ -1277,16 +1277,17 @@
 dent(%22%22%22
+%5C
 %0A       
@@ -1485,18 +1485,16 @@
  launch 
-a 
 local se
@@ -1497,16 +1497,17 @@
 l server
+s
 .%22%22%22),%0A 

Increase version number to 1.0.1.