Commit dd2490c1 authored by Alexander Larsson's avatar Alexander Larsson
Browse files

Add pygobject3 and pycairo (for python3) to platform

parent 9b4cf0b4
......@@ -48,7 +48,7 @@ PACKAGES = \
gnome-sdk gnome-platform dejavu-fonts abattis-cantarell-fonts \
gtk2 gnome-themes-standard libproxy gsettings-desktop-schemas glib-networking libsoup \
dconf gvfs desktop-file-utils json-glib libnotify vte mozjs24 gjs \
gstreamer1 \
gstreamer1 python3-cairo pygobject3 \
cogl clutter clutter-gtk webkitgtk4 \
aspell hunspell-en hunspell enchant \
zenity \
......
......@@ -16,6 +16,8 @@ declare -x GI_TYPELIB_PATH="/self/lib/girepository-1.0"
declare -x LDFLAGS="-L/self/lib "
declare -x PKG_CONFIG_PATH="/self/lib/pkgconfig:/self/share/pkgconfig"
declare -x PATH="/usr/bin:/self/bin"
unset PYTHONPATH
unset INSTALL
unset PERL5LIB
$HELPER -f -w -W -E -a $APP -v $VAR $ROOT/usr "$@"
......@@ -33,6 +33,10 @@ BuildRequires: zenity
Requires: freedesktop-platform
# We really only provide python3, but the auto-requires picks up
# a python requirement. This is a hacky workaround for that.
Provides: python
Requires: abattis-cantarell-fonts
Requires: adwaita-icon-theme
Requires: clutter
......@@ -54,6 +58,7 @@ Requires: libnotify
Requires: librsvg2
Requires: libsecret
Requires: libsoup
Requires: pygobject3
Requires: vte
Requires: webkitgtk4
Requires: zenity
......
......@@ -43,6 +43,8 @@ Requires: vala-dev
Requires: vala-tools
Requires: vte-dev
Requires: webkitgtk4-dev
Requires: python3-cairo-dev
Requires: pygobject3-dev
%description
Meta package for Gnome SDK dependencies
......
Name: pygobject3
Version: 3.14.0
Release: 1%{?dist}
License: LGPLv2+ and MIT
Group: Development/Languages
Summary: Python 3 bindings for GObject Introspection
URL: https://live.gnome.org/PyGObject
#VCS: git:git://git.gnome.org/pygobject
Source: http://ftp.gnome.org/pub/GNOME/sources/pygobject/3.14/pygobject-%{version}.tar.xz
BuildRequires: freedesktop-sdk-base
BuildRequires: glib2-dev
BuildRequires: gobject-introspection-dev
BuildRequires: python3-cairo-dev
BuildRequires: cairo-gobject-dev
# The cairo override module depends on this
Requires: python3-cairo
%description
The %{name} package provides a convenient wrapper for the GObject library
for use in Python3 programs.
%package dev
Summary: Development files for embedding PyGObject introspection support
Group: Development/Languages
Requires: %{name}%{?_isa} = %{version}-%{release}
Requires: gobject-introspection-dev%{?_isa}
%description dev
This package contains files required to embed PyGObject
%prep
%setup -q -n pygobject-%{version}
find -name '*.py' | xargs sed -i '1s|^#!python|#!/usr/bin/python3|'
%build
export PYTHON=python3
# Need this for OE python config to work
export STAGING_LIBDIR=""
export STAGING_INCDIR=""
export BUILD_SYS=""
export HOST_SYS=""
%configure
make %{?_smp_mflags} V=1
%install
# Need this for OE python config to work
export STAGING_LIBDIR=""
export STAGING_INCDIR=""
export BUILD_SYS=""
export HOST_SYS=""
make DESTDIR=$RPM_BUILD_ROOT install V=1
find $RPM_BUILD_ROOT -name '*.la' -delete
find $RPM_BUILD_ROOT -name '*.a' -delete
# Don't include makefiles in the installed docs, in order to avoid creating
# multilib conflicts
rm -rf _docs
mkdir _docs
cp -a examples _docs
rm _docs/examples/Makefile*
%post -p /sbin/ldconfig
%postun -p /sbin/ldconfig
%files
%defattr(644, root, root, 755)
%doc AUTHORS NEWS README COPYING
%dir %{_libdir}/python3.*/site-packages/gi
%{_libdir}/python3.*/site-packages/gi/*
%{_libdir}/python3.*/site-packages/pygobject-*.egg-info
%{_libdir}/python3.*/site-packages/pygtkcompat/
%files dev
%defattr(644, root, root, 755)
%doc _docs/*
%dir %{_includedir}/pygobject-3.0/
%{_includedir}/pygobject-3.0/pygobject.h
%{_libdir}/pkgconfig/pygobject-3.0.pc
%changelog
* Tue Feb 3 2015 Alexander Larsson <alexl@redhat.com> - 3.14.0-1
- initial version
Name: python3-cairo
Version: 1.10.0
Release: 1%{?dist}
License: MPLv1.1 or LGPLv2
Group: Development/Languages
Summary: Python 3 bindings for the cairo library
URL: http://cairographics.org/pycairo
Source: http://cairographics.org/releases/pycairo-%{version}.tar.bz2
BuildRequires: freedesktop-sdk-base
BuildRequires: cairo-dev
%description
Python 3 bindings for the cairo library.
%package dev
Summary: Libraries and headers for python3-cairo
Group: Development/Libraries
Requires: %{name} = %{version}-%{release}
Requires: cairo-dev
%description dev
This package contains files required to build wrappers for cairo add-on
libraries so that they interoperate with python3-cairo.
%prep
%setup -q -n pycairo-%{version}
python3 ./waf --version
sed -i "s|='-O'|='-q'|g" .waf*/waflib/Tools/python.py
%build
# FIXME: we should be using the system version of waf (e.g. %{_bindir}/waf)
export CFLAGS="$RPM_OPT_FLAGS"
export PYTHON=/usr/bin/python3
# Need this for OE python config to work
export STAGING_LIBDIR=""
export STAGING_INCDIR=""
export BUILD_SYS=""
export HOST_SYS=""
python3 ./waf --prefix=%{_usr} \
--libdir=%{_libdir} \
configure
# do not fail on utf-8 encoded files
LANG=en_US.utf8 python3 ./waf build -v
# remove executable bits from examples
find ./examples/ -type f -print0 | xargs -0 chmod -x
%install
# Need this for OE python config to work
export STAGING_LIBDIR=""
export STAGING_INCDIR=""
export BUILD_SYS=""
export HOST_SYS=""
DESTDIR=$RPM_BUILD_ROOT strace -o log -f -s 256 python3 ./waf install -v
# add executable bit to the .so libraries so we strip the debug info
find $RPM_BUILD_ROOT -name '*.so' | xargs chmod +x
find $RPM_BUILD_ROOT -name '*.la' | xargs rm -f
%files
%doc AUTHORS COPYING* NEWS README
%doc examples doc/faq.rst doc/overview.rst doc/README
%{_libdir}/python3.*/site-packages/cairo/
%files dev
%{_includedir}/pycairo/py3cairo.h
%{_libdir}/pkgconfig/py3cairo.pc
%changelog
* Tue Feb 3 2015 Alexander Larsson <alexl@redhat.com> - 1.10.0-1
- initial version
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment