
from setuptools import setup, find_packages

from ratemyflight import __version__ as version


setup(

    name="ratemyflight",
    version=version,
    author="Stephen McDonald",
    author_email="stephen.mc@gmail.com",
    description="",
    long_description=open("README.rst").read(),
    license="BSD",
    url="http://ratemyflight.org/",
    zip_safe=False,
    include_package_data=True,
    packages=find_packages(),

    entry_points="""
        [console_scripts]
        ratemyflight=ratemyflight.scripts.create_project:create_project
    """,

    classifiers=[
        "Development Status :: 4 - Beta",
        "Environment :: Web Environment",
        "Framework :: Django",
        "Intended Audience :: Developers",
        "License :: OSI Approved :: BSD License",
        "Operating System :: OS Independent",
        "Programming Language :: Python",
        "Topic :: Internet :: WWW/HTTP",
        "Topic :: Internet :: WWW/HTTP :: Dynamic Content",
        "Topic :: Internet :: WWW/HTTP :: WSGI",
        "Topic :: Software Development :: Libraries :: "
                                            "Application Frameworks",
        "Topic :: Software Development :: Libraries :: Python Modules",
    ])


@@ -37,16 +37,26 @@
 packages
+%0Aimport os
 %0A%0Afrom r
@@ -103,16 +103,442 @@
 n%0A%0A%0A
-setup(%0A%0A
+exclude = %5B%22ratemyflight/project_template/ratemyflight.db%22, %0A    %22ratemyflight/project_template/local_settings.py%22, %5D%0Aexclude = dict(%5B(e, None) for e in exclude%5D)%0Afor e in exclude:%0A    if e.endswith(%22.py%22):%0A        try:%0A            os.remove(%22%25sc%22 %25 e)%0A        except:%0A            pass%0A#    try:%0A    with open(e, %22r%22) as f:%0A        exclude%5Be%5D = (f.read(), os.stat(e))%0A    os.remove(e)%0A#    except:%0A#        pass%0A%0Atry:%0A    setup(%0A%0A    
     
@@ -554,24 +554,28 @@
 emyflight%22,%0A
+    
     version=
@@ -583,16 +583,20 @@
 ersion,%0A
+    
     auth
@@ -618,24 +618,28 @@
 onald%22,%0A    
+  
+  
 author_email
@@ -663,16 +663,20 @@
 l.com%22,%0A
+    
     desc
@@ -691,16 +691,20 @@
 %22%22,%0A    
+ 
+   
 long_des
@@ -739,16 +739,20 @@
 read(),%0A
+    
     lice
@@ -762,16 +762,20 @@
 =%22BSD%22,%0A
+    
     url=
@@ -806,16 +806,20 @@
 /%22,%0A    
+   
+ 
 zip_safe
@@ -826,16 +826,20 @@
 =False,%0A
+    
     incl
@@ -865,16 +865,20 @@
 ue,%0A    
+  
+  
 packages
@@ -896,16 +896,20 @@
 ges(),%0A%0A
+    
     entr
@@ -929,16 +929,20 @@
         
+ 
+   
 %5Bconsole
@@ -951,16 +951,20 @@
 cripts%5D%0A
+    
         
@@ -1027,16 +1027,20 @@
 project%0A
+    
     %22%22%22,
@@ -1041,16 +1041,20 @@
   %22%22%22,%0A%0A
+    
     clas
@@ -1063,16 +1063,20 @@
 fiers=%5B%0A
+    
         
@@ -1117,16 +1117,20 @@
         
+ 
+   
 %22Environ
@@ -1151,24 +1151,28 @@
 vironment%22,%0A
+    
         %22Fra
@@ -1198,16 +1198,20 @@
         
+    
 %22Intende
@@ -1245,16 +1245,20 @@
         
+   
+ 
 %22License
@@ -1299,16 +1299,20 @@
         
+    
 %22Operati
@@ -1349,16 +1349,20 @@
         
+  
+  
 %22Program
@@ -1387,16 +1387,20 @@
 ython%22,%0A
+    
         
@@ -1432,32 +1432,36 @@
 /HTTP%22,%0A        
+    
 %22Topic :: Intern
@@ -1496,32 +1496,36 @@
 ntent%22,%0A        
+   
+ 
 %22Topic :: Intern
@@ -1549,16 +1549,20 @@
  WSGI%22,%0A
+    
         
@@ -1654,16 +1654,20 @@
         
+  
+  
 %22Applica
@@ -1680,24 +1680,28 @@
 rameworks%22,%0A
+    
         %22Top
@@ -1764,12 +1764,345 @@
 s%22,%0A    
-%5D)%0A
+    %5D)%0Afinally:%0A    for e in exclude:%0A        if exclude%5Be%5D is not None:%0A            data, stat = exclude%5Be%5D%0A            try:%0A                with open(e, %22w%22) as f:%0A                    f.write(data)%0A                os.chown(e, stat.st_uid, stat.st_gid)%0A                os.chmod(e, stat.st_mode)%0A            except:%0A                pass
 %0A

Update setup.py to exclude local_settings module and db.