File: 0002-install-missing-files.patch

package info (click to toggle)
sqlkit 0.9.5-1
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 8,184 kB
  • sloc: python: 17,477; sql: 166; makefile: 95; xml: 23; sh: 11
file content (48 lines) | stat: -rw-r--r-- 1,291 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
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,
--