summaryrefslogtreecommitdiff
path: root/setup.py
diff options
context:
space:
mode:
authorRené 'Necoro' Neumann <necoro@necoro.net>2009-08-14 23:55:52 +0200
committerRené 'Necoro' Neumann <necoro@necoro.net>2009-08-14 23:55:52 +0200
commitcf0bb490641f5cc082a83ecd43854c6905fdb02e (patch)
tree7578a038e6c0e1447512ca001e922aa6bf1b1f26 /setup.py
parent18edc07bf7735c0d72d1b9e69c1e566ebfa1c0c3 (diff)
downloadportato-cf0bb490641f5cc082a83ecd43854c6905fdb02e.tar.gz
portato-cf0bb490641f5cc082a83ecd43854c6905fdb02e.tar.bz2
portato-cf0bb490641f5cc082a83ecd43854c6905fdb02e.zip
Allow to disable eix in setup.py
Diffstat (limited to 'setup.py')
-rw-r--r--setup.py25
1 files changed, 17 insertions, 8 deletions
diff --git a/setup.py b/setup.py
index 792e8e6..e255fd9 100644
--- a/setup.py
+++ b/setup.py
@@ -12,9 +12,9 @@
# Written by René 'Necoro' Neumann <necoro@necoro.net>
import os
+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
@@ -27,7 +27,6 @@ def plugin_list (*args):
packages = [
"portato",
"portato.db",
- "portato.eix",
"portato.gui", "portato.gui.windows",
"portato.plugins",
"portato.backend", "portato.backend.portage"
@@ -38,9 +37,19 @@ data_files = [
(ICON_DIR, ["icons/portato-icon.png"]),
(PLUGIN_DIR, plugin_list("gpytage", "notify", "etc_proposals", "reload_portage", "package_details"))]
-ext_modules = [
- Extension("portato.eix.parser", ["portato/eix/parser.pyx"])
- ]
+# extension stuff
+ext_modules = []
+cmdclass={'build_manpage': build_manpage}
+
+if "--disable-eix" in sys.argv:
+ sys.argv.remove("--disable-eix")
+else:
+ from Cython.Distutils import build_ext
+ from distutils.extension import Extension
+
+ ext_modules.append(Extension("portato.eix.parser", ["portato/eix/parser.pyx"]))
+ cmdclass['build_ext'] = build_ext
+ packages.append("portato.eix")
# do the distutils setup
setup(name=APP,
@@ -54,6 +63,6 @@ setup(name=APP,
author_email = "necoro@necoro.net",
packages = packages,
data_files = data_files,
- cmdclass={'build_manpage': build_manpage, 'build_ext' : build_ext},
- ext_modules = ext_modules
+ ext_modules = ext_modules,
+ cmdclass = cmdclass
)