help with source package including eggtrayicon

Andres Baravalle andres.baravalle at gmail.com
Mon Nov 15 13:49:09 CET 2004


I could go on, and now I have my working Makefile and I can compile
eggtrayicon, but I would like to include this compile in my setup.py,
if possible.

My Makefile is:
# Makefile for eggtrayicon

OBJECTS		= eggtrayiconmodule.so

# Compilation stuff
CC		= gcc
PYTHON_VERSION	= $(shell echo `python -c "import sys; print
sys.version[0:3]"`)
PYTHON_INCLUDE	= -I/usr/include/python$(PYTHON_VERSION) \
                  -I/usr/include/pygtk-2.0 \
	          $(shell pkg-config gtk+-2.0 --cflags) \
		  $(shell pkg-config libgnomeui-2.0 --cflags)
LIBS            = $(shell pkg-config gtk+-2.0 --libs) \
                  $(shell pkg-config libgnomeui-2.0 --libs)
CFLAGS		= -Wall -g -fomit-frame-pointer $(PYTHON_INCLUDE)

all:: $(OBJECTS)	

%.o : %.c
	$(CC) -fPIC $(CFLAGS) -c -o $@ $<
%.so : %.o
	$(CC) -shared $(LIBS) -Wl,-soname,$@ $< -o $@

Suggestions?

Thanks in advance.
   Andres



More information about the Python-list mailing list