from os import path
import sys

here = path.abspath(path.dirname(__file__))

from pip.req import parse_requirements


try:
    import pypandoc
    long_description = pypandoc.convert('README.md', 'rst')
except:
    with open(path.join(here, 'README.md')) as f:
        long_description = f.read()

version = sys.version_info[:2]
if version < (2, 7):
    print('fono requires Python version 2.7 or later' +
          ' ({}.{} detected).'.format(*version))
    sys.exit(-1)
elif (3, 0) < version:
    print('fono requires Python version 3.3 or later' +
          ' ({}.{} detected).'.format(*version))
    sys.exit(-1)

VERSION = '0.1.3'

# parse_requirements() returns generator of pip.req.InstallRequirement objects
install_reqs = parse_requirements(path.join(here, 'requirements.txt'), session=False)
# reqs is a list of requirement
# e.g. ['django==1.5.1', 'mezzanine==1.4.6']
reqs = [str(ir.req) for ir in install_reqs]

extras_require = {":sys_platform=='win32'": ['win_unicode_console']}

from distutils.core import setup
setup(
  name = 'fono',
  packages = ['fono'], # this must be the same as the name above
  version = VERSION,
  description = 'A python package to find optimal number of orders',
  long_description=long_description,
  author = 'Dheepak Krishnamurthy',
  author_email = 'kdheepak89@gmail.com',
  url = 'https://github.com/kdheepak89/fono', # use the URL to the github repo
  download_url = 'https://github.com/kdheepak89/fono/tarball/0.1', # I'll explain this in a second
  keywords = ['pyomo', 'operations'], # arbitrary keywords
  license = ['Revised BSD License'],
  install_requires = reqs,
  extras_require = extras_require,
  entry_points={'console_scripts': [
              'fono = fono.run:main',
              ]},
  classifiers = [],
)

@@ -1,12 +1,64 @@
+from setuptools import setup%0Aimport sys%0Aimport fono%0A
 from os impo
@@ -64,27 +64,16 @@
 ort path
-%0Aimport sys
 %0A%0Ahere =
@@ -115,49 +115,8 @@
 ))%0A%0A
-from pip.req import parse_requirements%0A%0A%0A
 try:
@@ -295,1366 +295,439 @@
 ()%0A%0A
-version = sys.version_info%5B:2%5D%0Aif version %3C (2, 7):%0A    print('fono requires Python version 2.7 or later' +%0A          ' (%7B%7D.%7B%7D detected).'.format(*version))%0A    sys.exit(-1)%0Aelif (3, 0) %3C version:%0A    print('fono requires Python version 3.3 or later' +%0A          ' (%7B%7D.%7B%7D detected).'.format(*version))%0A    sys.exit(-1)%0A%0AVERSION = '0.1.3'%0A%0A# parse_requirements() returns generator of pip.req.InstallRequirement objects%0Ainstall_reqs = parse_requirements(path.join(here, 'requirements.txt'), session=False)%0A# reqs is a list of requirement%0A# e.g. %5B'django==1.5.1', 'mezzanine==1.4.6'%5D%0Areqs = %5Bstr(ir.req) for ir in install_reqs%5D%0A%0Aextras_require = %7B%22:sys_platform=='win32'%22: %5B'win_unicode_console'%5D%7D%0A%0Afrom distutils.core import setup%0Asetup(%0A  name = 'fono',%0A  packages = %5B'fono'%5D, # this must be the same as the name above%0A  version = VERSION,%0A  description = 'A python package to find optimal number of orders',%0A  long_description=long_description,%0A  author = 'Dheepak Krishnamurthy',%0A  author_email = 'kdheepak89@gmail.com'
+from pip.req import parse_requirements%0Ainstall_requires = %5Bstr(ir.req) for ir in parse_requirements(path.join(here, 'requirements.txt'), session=False)%5D%0A%0Asetup(%0A    name=fono.__title__,%0A    version=fono.__version__,%0A%0A    description=fono.__summary__,%0A    long_description=long_description,%0A    license=fono.__license__
 ,%0A  
+ 
+ 
 url
- = 'https://github.com/kdheepak89/fono', # use the URL to the github repo%0A  download_url = 'https://github.com/kdheepak89/fono/tarball/0.1', # I'll explain this in a second%0A  keywords = %5B'pyomo', 'operations'%5D, # arbitrary keywords%0A  license = %5B'Revised BSD License'%5D,%0A  install_requires = reqs,%0A  extras_require = extras_require,%0A
+=fono.__uri__,%0A%0A    author=fono.__author__,%0A    author_email=fono.__email__,%0A%0A    packages=%5B%22fono%22%5D,%0A%0A  
   en
@@ -738,17 +738,26 @@
 points=%7B
-'
+%0A        %22
 console_
@@ -763,17 +763,17 @@
 _scripts
-'
+%22
 : %5B%0A    
@@ -784,11 +784,9 @@
     
-  '
+%22
 fono
@@ -801,17 +801,17 @@
 run:main
-'
+%22
 ,%0A      
@@ -816,36 +816,56 @@
     
- 
+%5D,%0A
     
- %5D
 %7D,%0A
-  classifiers = %5B%5D
+%0A    install_requires=install_requires
 ,%0A)%0A

Update setup.py