Пример #1
0
    print "Python 2.5 or later required."
    sys.exit(1)

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


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'
Пример #2
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)
    
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
Пример #3
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 ]
)
Пример #4
0
          '---------------------------------------------------------------------')
    time.sleep(2)

else:
    osname = os.popen('uname -s').read().strip().lower()
    if osname == 'darwin':
        print('- kaa.shm not supported on Darwin, not building')
    elif sys.hexversion < 0x03000000:
        # shm not compatible with Python 3 (yet? maybe we should remove
        # 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')
        
Пример #5
0
try:
    # kaa base imports
    from kaa.distribution.core import Extension, setup
except ImportError:
    print 'kaa.base not installed'
    sys.exit(1)

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"
Пример #6
0
        raise AttributeError()

    ext_modules = [ cdrom, ifoparser ]
except AttributeError:
    print 'The DVD parser will be disabled'
    ext_modules = [ cdrom ]

if not cdrom.has_python_h():
    print "---------------------------------------------------------------------"
    print "Python headers not found; please install python development package."
    print "Rom drive support will be unavailable"
    print "---------------------------------------------------------------------"
    ext_modules = [ ]

exiv2 = Extension('kaa.metadata.image.exiv2', ['src/image/exiv2.cpp'])
if exiv2.check_library('exiv2', '0.18'):
    print 'Building experimental exiv2 parser'
    ext_modules.append(exiv2)
    
setup(
    module = 'metadata',
    version = '0.7.7',
    license = 'GPL',
    summary = 'Module for retrieving information about media files',
    author = 'Thomas Schueppel, Dirk Meyer, Jason Tackaberry',
    scripts = [ 'bin/mminfo' ],
    rpminfo = {
        'requires': 'python-kaa-base >= 0.1.2, libdvdread >= 0.9.4',
        'build_requires': 'python-kaa-base >= 0.1.2, libdvdread-devel >= 0.9.4, python-devel >= 2.3.0',
        'obsoletes': 'mmpython'
    },
Пример #7
0
try:
    # kaa base imports
    from kaa.distribution.core import Extension, setup
except ImportError:
    print 'kaa.base not installed'
    sys.exit(1)

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"
Пример #8
0
    print "Python 2.5 or later required."
    sys.exit(1)

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

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'
Пример #9
0
libcandy_modules = [ 'clutter-reflect-texture' ]

# add /usr/local/lib/pkgconfig because this is where clutter installs
# as default and it may not be in your path
pkgconfig = '/usr/local/lib/pkgconfig'
if os.environ.get('PKG_CONFIG_PATH'):
    pkgconfig += ':' + os.environ.get('PKG_CONFIG_PATH')
os.environ['PKG_CONFIG_PATH'] = pkgconfig

# create libcandy extension, gen_libcandy.c may not exist yet
files = [ 'src/backend/%s.c' % m for m in libcandy_modules ]
files.extend(['src/backend/gen_libcandy.c', 'src/backend/libcandymodule.c'])
libcandy = Extension('kaa/candy/backend/libcandy', files)

# check dependencies
if not libcandy.check_library('clutter-1.0', '1.0.4'):
    print 'clutter-1.0 >= 1.0.4 not found'
    sys.exit(1)
if not libcandy.check_library('pygobject-2.0', '2.16.0'):
    print 'pygobject >= 2.16.0 not found'
    sys.exit(1)

# check for pygobject-codegen to generate python bindings
# should be part of pygobject
pygobject_codegen = kaa.utils.which('pygobject-codegen-2.0')
if not pygobject_codegen:
    print 'pygobject-codegen-2.0 not found, should be part of pygobject'
    sys.exit(1)

# check for pyclutter defs for pygobject-codegen
for version in ('0.9', '1.0'):
Пример #10
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)
    
ext_modules = []
mng = Extension("kaa.candy._mng", ['src/extensions/mng.c'])
if mng.check_cc(["<libmng.h>"], "", "-lmng"):
    ext_modules.append(mng)
    mng.libraries.append("mng")
    print "+ mng support enabled"
else:
    print "- mng support disabled"

svg = Extension("kaa.candy._svg", ['src/extensions/svg.c'])
if svg.check_library("librsvg-2.0", "2.10.0"):
    ext_modules.append(svg)
    print "+ svg support enabled"
else:
    print "- svg support disabled"


setup(module = 'candy', version = '0.5', ext_modules = ext_modules)
Пример #11
0
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of MER-
# CHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
# Public License for more details.
#
# You should have received a copy of the GNU General Public License along
# with this program; if not, write to the Free Software Foundation, Inc.,
# 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#
# -----------------------------------------------------------------------------

# python imports
import sys

try:
    # kaa base imports
    from kaa.distribution.core import setup, Extension
except ImportError:
    print 'kaa.base not installed'
    sys.exit(1)
    
ext_modules = []
libvisual = Extension("kaa.player._libvisual", ['src/extensions/libvisual.c'])
if libvisual.check_library("libvisual", "0.2.0"):
    print "+ libvisual support enabled"
    ext_modules.append(libvisual)
else:
    print "- libvisual support disabled"

setup(module = 'player', version = '0.1', ext_modules = ext_modules)
Пример #12
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)

ext_modules = []

ofa = Extension('kaa.netsearch.ofa', [ 'src/ofa.cc' ])
if not ofa.check_library('libofa', '0.9'):
    print 'libofa >= 0.9 not found'
    print 'building without musicdns support'
else:
    ext_modules.append(ofa)

setup(module      = 'netsearch',
      version     = '0.1',
      ext_modules = ext_modules
)