#!/usr/bin/env python

# Setup script for the `py2deb' package.
#
# Author: Peter Odding <peter.odding@paylogic.com>
# Last Change: June 5, 2014
# URL: https://py2deb.readthedocs.org

import os, sys
from setuptools import setup, find_packages

# Find the directory where the source distribution was unpacked.
source_directory = os.path.dirname(os.path.abspath(__file__))

# Add the source distribution directory to Python's module search path.
sys.path.append(source_directory)

# Find the current version.
from py2deb import __version__ as version_string

# Fill in the long description (for the benefit of PyPi)
# with the contents of README.rst (rendered by GitHub).
readme_file = os.path.join(source_directory, 'README.rst')
readme_text = open(readme_file, 'r').read()

# Fill in the "install_requires" field based on requirements.txt.
requirements = [l.strip() for l in open(os.path.join(source_directory, 'requirements.txt'), 'r') if not l.startswith('#')]

setup(name='py2deb',
      version=version_string,
      description='Python to Debian package converter',
      long_description=readme_text,
      url='https://py2deb.readthedocs.org',
      author='Peter Odding & Arjan Verwer',
      author_email='peter.odding@paylogic.com',
      packages=find_packages(),
      test_suite='py2deb.tests',
      entry_points={'console_scripts': ['py2deb = py2deb.cli:main']},
      install_requires=requirements)

# vim: ts=4 sw=4

@@ -134,9 +134,9 @@
 une 
-5
+7
 , 20
@@ -181,65 +181,148 @@
 rg%0A%0A
-import os, sys%0Afrom setuptools import setup, find_package
+# Standard library modules.%0Aimport os%0Aimport sys%0A%0A# We use setuptools to support entry points, %60python setup.py test', etc.%0Aimport setuptool
 s%0A%0A#
@@ -750,22 +750,18 @@
 b).%0A
-readme_file = 
+with open(
 os.p
@@ -804,45 +804,45 @@
 st')
-%0Areadme_text = open(readme_file, 'r')
+) as handle:%0A    readme_text = handle
 .rea
@@ -916,42 +916,12 @@
 xt.%0A
-requirements = %5Bl.strip() for l in
+with
  ope
@@ -976,14 +976,72 @@
 xt')
-, 'r')
+) as handle:%0A    requirements = %5Bline.strip() for line in handle
  if 
@@ -1045,16 +1045,19 @@
 if not l
+ine
 .startsw
@@ -1072,17 +1072,33 @@
 %5D%0A%0Asetup
-(
+tools.setup(%0A    
 name='py
@@ -1104,18 +1104,16 @@
 y2deb',%0A
-  
     vers
@@ -1136,18 +1136,16 @@
 ng,%0A    
- 
- 
 descript
@@ -1190,18 +1190,16 @@
 r',%0A    
-  
 long_des
@@ -1224,18 +1224,16 @@
 xt,%0A    
- 
- 
 url='htt
@@ -1262,26 +1262,24 @@
 s.org',%0A    
-  
 author='Pete
@@ -1301,21 +1301,44 @@
 n Verwer
+ (Paylogic International)
 ',%0A
-  
     auth
@@ -1379,18 +1379,16 @@
 m',%0A    
-  
 packages
@@ -1388,16 +1388,27 @@
 ackages=
+setuptools.
 find_pac
@@ -1416,18 +1416,16 @@
 ages(),%0A
-  
     test
@@ -1447,18 +1447,16 @@
 tests',%0A
-  
     entr
@@ -1515,18 +1515,16 @@
 ain'%5D%7D,%0A
-  
     inst

Make setup.py PEP-8 compliant