help with source package including eggtrayicon

Discussion in 'Python' started by Andres Baravalle, Nov 15, 2004.

  1. 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
    Andres Baravalle, Nov 15, 2004
    #1
    1. Advertising

  2. 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
    Andres Baravalle, Nov 15, 2004
    #2
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. ALuPin
    Replies:
    1
    Views:
    3,211
    Jim Lewis
    Apr 15, 2004
  2. a_Conan
    Replies:
    2
    Views:
    627
    a_Conan
    Aug 22, 2005
  3. Rob
    Replies:
    2
    Views:
    1,398
  4. Simon Brooke
    Replies:
    0
    Views:
    397
    Simon Brooke
    Nov 5, 2006
  5. Olli Wang
    Replies:
    0
    Views:
    243
    Olli Wang
    Oct 30, 2009
Loading...

Share This Page