summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRené 'Necoro' Neumann <necoro@necoro.net>2010-03-06 14:20:55 +0100
committerRené 'Necoro' Neumann <necoro@necoro.net>2010-03-06 14:20:55 +0100
commit5bf25585f813a6cec48c01af3b64e7222ff4c341 (patch)
tree558d6947a020979ad15107af5e910853cdb5b4f1
parent5a5eae4d528c7c82344d26fc4f11d59dabe93b64 (diff)
downloadportato-5bf25585f813a6cec48c01af3b64e7222ff4c341.tar.gz
portato-5bf25585f813a6cec48c01af3b64e7222ff4c341.tar.bz2
portato-5bf25585f813a6cec48c01af3b64e7222ff4c341.zip
Improved setup.py; also install the better-icon image
-rw-r--r--setup.py29
1 files changed, 21 insertions, 8 deletions
diff --git a/setup.py b/setup.py
index 8918826..1bcbc44 100644
--- a/setup.py
+++ b/setup.py
@@ -16,7 +16,6 @@ import sys
from distutils.core import setup
from distutils.extension import Extension
-from Cython.Distutils import build_ext
from portato.constants import VERSION, ICON_DIR, PLUGIN_DIR, TEMPLATE_DIR, APP
@@ -36,21 +35,35 @@ packages = [
data_files = [
(TEMPLATE_DIR, [os.path.join("portato/gui/templates",x) for x in os.listdir("portato/gui/templates") if (x.endswith(".ui") or x.endswith(".menu"))]),
- (ICON_DIR, ["icons/portato-icon.png"]),
+ (ICON_DIR, ["icons/portato-icon.png", "icons/better-package.svg"]),
(PLUGIN_DIR, plugin_list("gpytage", "notify", "etc_proposals", "reload_portage", "package_details"))]
+cmdclass = {'build_manpage': build_manpage}
+
+# remove useless options / they are the default
+for o in ("cython", "eix"):
+ try:
+ sys.argv.remove("--enable-"+o)
+ except ValueError:
+ pass
+
# extension stuff
-ext_modules = [Extension("portato.ipc", ["portato/ipc.pyx"])]
+if "--disable-cython" in sys.argv:
+ sys.argv.remove("--disable-cython")
+ ext = "c"
+else:
+ from Cython.Distutils import build_ext
+ cmdclass['build_ext'] = build_ext
+ ext = "pyx"
+
+ext_modules = [Extension("portato.ipc", ["portato/ipc."+ext])]
if "--disable-eix" in sys.argv:
sys.argv.remove("--disable-eix")
else:
- ext_modules.append(Extension("portato.eix.parser", ["portato/eix/parser.pyx"]))
+ ext_modules.append(Extension("portato.eix.parser", ["portato/eix/parser."+ext]))
packages.append("portato.eix")
- if "--enable-eix" in sys.argv:
- sys.argv.remove("--enable-eix")
-
# do the distutils setup
setup(name=APP,
version = VERSION,
@@ -64,5 +77,5 @@ setup(name=APP,
packages = packages,
data_files = data_files,
ext_modules = ext_modules,
- cmdclass={'build_manpage': build_manpage, 'build_ext' : build_ext}
+ cmdclass = cmdclass
)