Пример #1
0
# python imports
import sys

try:
    # kaa base imports
    from kaa.distribution.core import Extension, setup
except ImportError:
    print 'kaa.base not installed'
    sys.exit(1)

# NOTE: this is no python module!
# It is a gstreamer plugin not in the gstreamer plugin path.
# When kaa.record2 is init, this module will be added to
# gstreaner on runtime.
tuner = Extension('kaa.record2._gstrecord',
                  [ 'gst/gstdvbtuner.c', 'gst/gsttssplitter.c',
                    'gst/gstmain.c' ],
                  config='gst/config.h')
tuner.config('#define VERSION "0.1"')
tuner.config('#define PACKAGE "kaa.record"')

if not tuner.check_library('gstreamer-0.10', '0.1'):
    print 'gstreamer 0.10 not found'
    sys.exit(1)

setup(module      = 'record2',
      version     = '0.1',
      ext_modules = [ tuner ]
)
Пример #2
0
thumb_ext = Extension("kaa.beacon.libthumb",
    ["src/extensions/libthumb.c", "src/extensions/libpng.c" ], config='src/extensions/config.h')

if not thumb_ext.check_library('imlib2', '1.1.1'):
    print 'Imlib2 >= 1.1.1 not found'
    print 'Download from http://enlightenment.freedesktop.org/'
    sys.exit(1)

if not thumb_ext.check_library('libpng', '1.2.0'):
    print 'libpng >= 1.2.0 not found'
    sys.exit(1)

if thumb_ext.check_cc([], '', '-ljpeg'):
    thumb_ext.files.append('src/extensions/epeg.c')
    thumb_ext.libraries.append('jpeg')
    thumb_ext.config('#define USE_EPEG')
else:
    print 'libjpeg not installed, deactivating fast thumbnailer'

try:
    from kaa.db import sqlite
    if sqlite.version_info < ( 2, 3 ):
        version = '.'.join([ str(x) for x in sqlite.version_info ])
        print 'pysqlite2 >= 2.3.0 required, found %s' % version
        sys.exit(1)
except ImportError:
    print 'pysqlite2 is not installed'
    sys.exit(1)

ext_modules = [ thumb_ext ]
Пример #3
0
    from kaa.distribution.core import Extension, setup
except ImportError:
    print 'kaa.base not installed'
    sys.exit(1)
    
thumbnailer = Extension("kaa.thumb._thumbnailer",
                        ["src/thumbnail.c", "src/png.c" ],
                        config='src/config.h')

if not thumbnailer.check_library('imlib2', '1.1.1'):
    print 'Imlib2 >= 1.1.1 not found'
    print 'Download from http://enlightenment.freedesktop.org/'
    sys.exit(1)

if not thumbnailer.check_library('libpng', '1.2.0'):
    print 'libpng >= 1.2.0 not found'
    sys.exit(1)

if thumbnailer.check_library('epeg', '0.9'):
    print 'epeg extention enabled'
    thumbnailer.config('#define USE_EPEG')
else:
    print 'epeg extention disabled'

# call setup
setup(module      = 'thumb',
      version     = '0.1',
      ext_modules = [ thumbnailer ],
      scripts     = [ 'bin/kaa-thumb' ],
      )
Пример #4
0
files = [ 'src/imlib2.c', 'src/image.c', 'src/font.c', 'src/rawformats.c' ]
libraries = []
if not os.uname()[0] in ('FreeBSD', 'Darwin'):
    libraries.append('rt')
imlib2so = Extension('kaa.imlib2._Imlib2module', files,
                     libraries = libraries, config='src/config.h')


if not imlib2so.check_library('imlib2', '1.2.1'):
    print 'Imlib2 >= 1.2.1 not found'
    print 'Download from http://enlightenment.freedesktop.org/'
    sys.exit(1)


if imlib2so.check_cc(['<fcntl.h>'], 'shm_open("foobar");', '-lrt'):
    imlib2so.config('#define HAVE_POSIX_SHMEM')
    print "POSIX shared memory enabled"
else:
    print "POSIX shared memory disabled"

if imlib2so.check_library("librsvg-2.0", "2.10.0"):
    imlib2so.config('#define HAVE_SVG')
    files.append('src/svg.c')
    print "+ svg support enabled"
else:
    print "- svg support disabled"

setup(
    module = MODULE,
    version = VERSION,
    license = 'LGPL',
Пример #5
0
        # this module)
        extensions.append(shm_ext)

    objectrow_ext = Extension('kaa.base._objectrow', ['src/extensions/objectrow.c'])
    if sys.hexversion > 0x03000000:
        print('- kaa.db not supported on Python 3 yet')
    elif objectrow_ext.check_library("glib-2.0", "2.4.0"):
        print('+ glib >= 2.4.0 found; building kaa.db')
        extensions.append(objectrow_ext)
    else:
        print('- glib >= 2.4.0 not found; kaa.db will be unavailable')

    utils_ext = Extension('kaa.base._utils', ['src/extensions/utils.c'], config='src/extensions/config.h')
    extensions.append(utils_ext)
    if utils_ext.check_cc(['<sys/prctl.h>'], 'prctl(PR_SET_NAME, "x");'):
        utils_ext.config('#define HAVE_PRCTL')

    if osname == 'linux':
        inotify_ext = Extension("kaa.base.inotify._inotify",
                                ["src/extensions/inotify/inotify.c"],
                                config='src/extensions/inotify/config.h')
        

        if not inotify_ext.check_cc(["<sys/inotify.h>"], "inotify_init();"):
            if not inotify_ext.check_cc(["<sys/syscall.h>"], "syscall(0);"):
                print('- inotify not enabled; are system headers not installed?')
            else:
                print('+ inotify not supported in glibc; no problem, using built-in support instead.')
                inotify_ext.config("#define USE_FALLBACK")
                extensions.append(inotify_ext)
        else:
Пример #6
0
files = [ 'src/imlib2.c', 'src/image.c', 'src/font.c', 'src/rawformats.c' ]
libraries = []
if not os.uname()[0] in ('FreeBSD', 'Darwin'):
    libraries.append('rt')
imlib2so = Extension('kaa.imlib2._Imlib2module', files,
                     libraries = libraries, config='src/config.h')


if not imlib2so.check_library('imlib2', '1.2.1'):
    print 'Imlib2 >= 1.2.1 not found'
    print 'Download from http://enlightenment.freedesktop.org/'
    sys.exit(1)


if imlib2so.check_cc(['<fcntl.h>'], 'shm_open("foobar");', '-lrt'):
    imlib2so.config('#define HAVE_POSIX_SHMEM')
    print "POSIX shared memory enabled"
else:
    print "POSIX shared memory disabled"

if imlib2so.check_library("librsvg-2.0", "2.10.0"):
    imlib2so.config('#define HAVE_SVG')
    files.append('src/svg.c')
    print "+ svg support enabled"
else:
    print "- svg support disabled"

setup(
    module = MODULE,
    version = VERSION,
    license = 'LGPL',
Пример #7
0
                      ["src/extensions/libthumb.c", "src/extensions/libpng.c"],
                      config='src/extensions/config.h')

if not thumb_ext.check_library('imlib2', '1.1.1'):
    print 'Imlib2 >= 1.1.1 not found'
    print 'Download from http://enlightenment.freedesktop.org/'
    sys.exit(1)

if not thumb_ext.check_library('libpng', '1.2.0'):
    print 'libpng >= 1.2.0 not found'
    sys.exit(1)

if thumb_ext.check_cc([], '', '-ljpeg'):
    thumb_ext.files.append('src/extensions/epeg.c')
    thumb_ext.libraries.append('jpeg')
    thumb_ext.config('#define USE_EPEG')
else:
    print 'libjpeg not installed, deactivating fast thumbnailer'

try:
    from kaa.db import sqlite
    if sqlite.version_info < (2, 3):
        version = '.'.join([str(x) for x in sqlite.version_info])
        print 'pysqlite2 >= 2.3.0 required, found %s' % version
        sys.exit(1)
except ImportError:
    print 'pysqlite2 is not installed'
    sys.exit(1)

ext_modules = [thumb_ext]