From 6d862d7a961ce70bc24450aadc99a901e5ab19c8 Mon Sep 17 00:00:00 2001 From: Necoro <> Date: Mon, 22 Oct 2007 22:17:48 +0000 Subject: bundled shm module --- setup.py | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) (limited to 'setup.py') diff --git a/setup.py b/setup.py index 96cc070..931ba3f 100644 --- a/setup.py +++ b/setup.py @@ -11,10 +11,20 @@ # # Written by René 'Necoro' Neumann -import os, os.path +import sys, os, os.path from distutils.core import setup, Extension from portato.constants import FRONTENDS, VERSION, DATA_DIR, ICON_DIR, PLUGIN_DIR, TEMPLATE_DIR +### copied from shm's setup.py ### +MacrosAndDefines = [ ] + +# HAVE_UNION_SEMUN needs to be #defined on FreeBSD and OS X and must *not* be #defined +# on Linux. On other systems, I'm not sure. Please let me know if you find that you +# need to make changes for your platform. +if ("bsd" in sys.platform) or ("darwin" in sys.platform): + MacrosAndDefines.append( ('HAVE_UNION_SEMUN', None) ) +### end copy ### + def plugin_list (*args): """Creates a list of correct plugin pathes out of the arguments.""" return [("plugins/%s.xml" % x) for x in args] @@ -24,10 +34,11 @@ def ui_file_list (): 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", "portato.backend.catapult"] -ext_modules = [] +packages = ["portato", "portato.gui", "portato.plugins", "portato.backend", "portato.backend.portage", "portato.backend.catapult", "portato.shm"] +ext_modules = [Extension("portato.shm.shm", ["shm/shmmodule.c"], define_macros = MacrosAndDefines, extra_compile_args=["-fPIC"])] data_files = [(ICON_DIR, ["icons/portato-icon.png"]), (PLUGIN_DIR, plugin_list("shutdown", "resume_loop")), (DATA_DIR, ["plugin.xsd", "ebuild.lang"])] cmdclass = {} +package_dir = {"portato.shm" : "shm"} if "gtk" in FRONTENDS: packages.append("portato.gui.gtk") @@ -48,5 +59,6 @@ setup(name="Portato", packages = packages, data_files = data_files, ext_modules = ext_modules, - cmdclass = cmdclass + cmdclass = cmdclass, + package_dir = package_dir ) -- cgit v1.2.3