help with source package including eggtrayicon

A

Andres Baravalle

Hi,
I am quite new with python and I'm developing a package that is
including a binary file (eggtrayiconmodule.so) that is open source.

My software is developed in part under linux, and now I would like to
make it fully portable to other unix-like platforms. Therefore I need
to provide the source and integrate eggtrayicon compiling in my
setup.py.

At this point I don't know how go on.

The copy of eggtrayicon I am using is provided by rhn-applet under
Fedora and other distributions, and if I'm not wrong is originally
part of Gnome.

But I do not know what to do with the package to obtain the .so
file... I have only a very rudimental base of C programming.

Is there anyone that can point me in the right direction? At the
present time I am using the python distutils to install/build the
python files, and a method that could be integrated would be
preferable.

Thanks in advance,
Andres
 
A

Andres Baravalle

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,754
Messages
2,569,521
Members
44,995
Latest member
PinupduzSap

Latest Threads

Top