From 91225d6ff5bc70cd76d0cf54f35a1cf6186b538b Mon Sep 17 00:00:00 2001 From: necoro <> Date: Sat, 7 Jul 2007 02:27:31 +0000 Subject: Some documentation work --- setup.py | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) (limited to 'setup.py') diff --git a/setup.py b/setup.py index e9d6b77..0496bff 100644 --- a/setup.py +++ b/setup.py @@ -1,13 +1,29 @@ #!/usr/bin/python # -*- coding: utf-8 -*- +# +# File: setup.py +# This file is part of the Portato-Project, a graphical portage-frontend. +# +# Copyright (C) 2006-2007 René 'Necoro' Neumann +# This is free software. You may redistribute copies of it under the terms of +# the GNU General Public License version 2. +# There is NO WARRANTY, to the extent permitted by law. +# +# Written by René 'Necoro' Neumann import os, os.path from distutils.core import setup, Extension from portato.constants import VERSION, DATA_DIR, FRONTENDS, ICON_DIR, PLUGIN_DIR def plugin_list (*args): + """Creates a list of correct plugin pathes out of the arguments.""" return [("plugins/%s.xml" % x) for x in args] +def ui_file_list (): + """Returns the list of *.ui-files.""" + uis = [x for x in os.listdir("portato/gui/templates/ui/") if x.endswith(".ui")] + return [os.path.join("portato/gui/templates/ui",x) for x in uis] + packages = ["portato", "portato.gui", "portato.plugins", "portato.backend", "portato.backend.portage"] ext_modules = [] data_files = [(ICON_DIR, ["icons/portato-icon.png"]), (PLUGIN_DIR, plugin_list("shutdown"))] @@ -19,8 +35,9 @@ if "gtk" in FRONTENDS: if "qt" in FRONTENDS: packages.append("portato.gui.qt") - data_files.append((os.path.join(DATA_DIR,"ui"), [os.path.join("portato/gui/templates/ui",x) for x in os.listdir("portato/gui/templates/ui/") if x.endswith(".ui")])) + data_files.append((os.path.join(DATA_DIR,"ui"), ui_file_list())) +# do the distutils setup setup(name="Portato", version = VERSION, description = "Frontends to Portage", -- cgit v1.2.3