summaryrefslogtreecommitdiff
path: root/setup.py
blob: 81d6ba92fb8e9f2daaa513e6c29f22cb5e8d2b37 (plain)
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
#!/usr/bin/python
# -*- coding: utf-8 -*-

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):
	return [("plugins/%s.xml" % x) for x in *args]

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"))]
cmdclass = {}

if "gtk" in FRONTENDS:
	packages.append("portato.gui.gtk")
	data_files.append((DATA_DIR, ["portato/gui/templates/portato.glade"]))

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")]))

setup(name="Portato",
		version = VERSION,
		description = "Frontends to Portage",
		license = "GPLv2",
		url = "http://portato.sourceforge.net/",
		author = "René 'Necoro' Neumann",
		author_email = "necoro@necoro.net",
		packages = packages,
		data_files = data_files,
		ext_modules = ext_modules,
		cmdclass = cmdclass
		)