From: Pietro Battiston <me@pietrobattiston.it>
Date: Sat, 11 Feb 2012 02:42:25 +0100
Subject: install missing files

 Upstream setup.py doesn't install documentation and .desktop files: this patch
 fixes it.
---
 setup.py |   19 +++++++++++++++++++
 1 files changed, 19 insertions(+), 0 deletions(-)

diff --git a/setup.py b/setup.py
index d433fe6..854b310 100755
--- a/setup.py
+++ b/setup.py
@@ -58,6 +58,24 @@ try:
 except ImportError:
    cmdclass = {}
    
+def doc_files():
+    """
+    Create a list of documentation files.
+    """
+    files = []
+    walker = os.walk( 'doc/html' )
+    while True:
+        try:
+            n = walker.next()
+            new_list = []
+            files.append( (os.path.join( "share/doc/python-sqlkit-doc", n[0][9:] ), new_list) )
+            for a_file in n[2]:
+                new_list.append( "%s/%s" % (n[0], a_file) )
+        except StopIteration:
+            break
+    
+    return files
+
    
 setup(
    name='sqlkit',
@@ -68,6 +86,7 @@ setup(
    url='http://sqlkit.argolinux.org/',
    install_requires=REQUIRES,
    packages = find_packages('.'),
+   data_files =[('share/applications', ['sqlkit.desktop'])] + doc_files(),
    classifiers= classifiers.split('\n'),
    include_package_data=True,      
    zip_safe=False,
-- 
