Changeset 4398


Ignore:
Timestamp:
May 21, 2010 1:32:35 AM (5 years ago)
Author:
sam
Message:

New improved ctypes-based Python bindings, by Alex Foulon <alxf@lavabit.com>.

Location:
libcaca/trunk
Files:
12 added
7 deleted
3 edited

Legend:

Unmodified
Added
Removed
  • libcaca/trunk/AUTHORS

    r4333 r4398  
    77 - cacaball
    88 - OpenGL driver
    9  - Pypycaca Python wrapper
    109 - exporters
    1110 - network driver
     
    3029 - Java bindings
    3130
     31Alex Foulon <alxf@lavabit.com>
     32 - Python bindings
     33
    3234*/
  • libcaca/trunk/configure.ac

    r4333 r4398  
    8686AC_ARG_ENABLE(cxx,
    8787  [  --enable-cxx            C++ bindings (autodetected)])
     88AC_ARG_ENABLE(python,
     89  [  --enable-python         Python bindings (autodetected)])
    8890AC_ARG_ENABLE(ruby,
    8991  [  --enable-ruby           Ruby bindings (autodetected)])
     
    465467AM_CONDITIONAL(USE_JAVA, test "${ac_cv_my_have_java}" = "yes")
    466468
     469# Build the Python bindings?
     470ac_cv_my_have_python="no"
     471if test "${enable_python}" != "no"; then
     472  AM_PATH_PYTHON(2.2, ac_cv_my_have_python="yes", :)
     473fi
     474AM_CONDITIONAL(USE_PYTHON, test "${ac_cv_my_have_python}" = "yes")
     475
    467476# Build the Ruby bindings?
    468477ac_cv_my_have_ruby="no"
  • libcaca/trunk/python/Makefile.am

    r4333 r4398  
    11
    2 EXTRA_DIST = caca.txt pypycaca.c pypycaca.h snake.py test1.py test2.py
     2if USE_PYTHON
     3python_PYTHON = \
     4    caca/__init__.py \
     5    caca/canvas.py \
     6    caca/common.py \
     7    caca/display.py \
     8    caca/dither.py \
     9    caca/font.py
     10endif
    311
    4 CC = gcc
    5 RM = rm -f
    6 CACAFLAGS = `caca-config --cflags`
    7 CACALIBS  = `caca-config --libs`
     12EXTRA_DIST = \
     13    setup.py \
     14    examples/cacainfo.py \
     15    examples/drawing.py \
     16    examples/gol.py
    817
    9 PYTHONFLAGS = -I/usr/include/python2.4
    10 PYTHONLIBS = -lpython2.4
    11 
    12 NAME = caca.so
    13 
    14 all:
    15 
    16 python:
    17         $(CC) pypycaca.c -c $(CACAFLAGS) $(PYTHONFLAGS) -Wall
    18         $(LD) pypycaca.o -o $(NAME) $(CACALIBS) $(PYTHONLIBS) -shared
    19 
    20 
    21 clean:
    22         $(RM) *.o $(NAME)
Note: See TracChangeset for help on using the changeset viewer.