summaryrefslogtreecommitdiff
path: root/recipes/pygobject.recipe
blob: 87a1a2a87d36f6a77dc6755f55752fbe83963fe6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
# -*- Mode: Python -*- vi:si:et:sw=4:sts=4:ts=4:syntax=python


class Recipe(recipe.Recipe):
    name = 'pygobject'
    version = '2.28.6'
    licenses = [License.LGPLv2_1Plus]
    deps = ['glib']
    configure_options = '--disable-introspection'
    make_check = None  # disabled until we fix the checks

    def prepare(self):
        if self.config.target_platform == Platform.WINDOWS:
            self.files_mainlib = ['bin/libpyglib-2.0-python.pyd']
            self.files_libs = []
        if self.config.target_distro_version == DistroVersion.REDHAT_6:
            self.append_env = {'CFLAGS': ' -D_GNU_SOURCE=1'}

    def post_install(self):
        import shutil
        if self.config.target_platform == Platform.WINDOWS:
            shutil.move(os.path.join(self.config.prefix, 'lib', 'libpyglib-2.0-python.pyd'),
                        os.path.join(self.config.prefix, 'bin', 'libpyglib-2.0-python.pyd'))

    files_libs = ['libpyglib-2.0-python']
    files_python = ['site-packages/glib/_glib%(pext)s',
                    'site-packages/glib/__init__.py',
                    'site-packages/glib/option.py',
                    'site-packages/gobject/constants.py',
                    'site-packages/gobject/_gobject%(pext)s',
                    'site-packages/gobject/__init__.py',
                    'site-packages/gobject/propertyhelper.py',
                    'site-packages/gtk-2.0/dsextras.py',
                    'site-packages/gtk-2.0/gio/_gio%(pext)s',
                    'site-packages/gtk-2.0/gio/__init__.py',
                    'site-packages/pygtk.py',
    ]
    files_devel = ['lib/pkgconfig/pygobject-2.0.pc',
                   'include/pygtk-2.0/pyglib.h',
                   'include/pygtk-2.0/pygobject.h',
                   'share/pygobject/2.0/']
    files_mainlib = []