Added Qpushbuttons to Qt gui
[feedingit] / setup.py
1 #!/usr/bin/env python2.5
2
3 '''
4     Setup script, setup.py, is used to create installable packet from Python project.
5     For more information see http://docs.python.org/distutils/setupscript.html
6     
7     This script with Makefile is used to generate the Debian package.
8 '''
9
10 from distutils.core import setup
11 import os, os.path;
12
13
14 # Source directory.
15 source_dir = 'src';
16
17 # Executables. These files will be installed into bin folder (example /usr/local/bin).
18 scripts = ['src/FeedingIt']
19
20 data_files = []
21
22 # Included packages from source directory.
23 packages = ['']
24
25 package_dir = {'' : source_dir}
26     
27 def path_to_package(base_dir, path):
28     '''
29         Convert directory path to package name. 
30     '''
31     head, tail = os.path.split(path)
32     
33     if head == '' or head == base_dir:
34         return tail
35     else:
36         return path_to_package(base_dir, head) + "." + tail
37
38
39 '''
40     Append all packages from source_dir ('src'). 
41 '''
42 for dirpath, dirnames, filenames in os.walk(source_dir):
43     if "__init__.py" in filenames:
44         packages.append(path_to_package(source_dir, dirpath))
45
46
47 setup(
48     name = 'feedingit',
49     version = '0.1',
50     
51     packages = packages,
52     package_dir = package_dir,
53     scripts = scripts,
54     data_files = data_files
55 )
56