Modernize the spec file
Shouldn't have any functional changes.
This commit is contained in:
parent
88eaba7d6e
commit
438eadce9d
142
pygobject3.spec
142
pygobject3.spec
@ -8,38 +8,27 @@
|
||||
%define python3_version 3.1
|
||||
%endif
|
||||
|
||||
%if 1
|
||||
# Verbose build
|
||||
%global verbosity V=1
|
||||
%else
|
||||
# Quiet build
|
||||
%global verbosity %{nil}
|
||||
%endif
|
||||
|
||||
%global with_check 0
|
||||
|
||||
### Abstract ###
|
||||
Name: pygobject3
|
||||
Version: 3.17.90
|
||||
Release: 2%{?dist}
|
||||
Summary: Python bindings for GObject Introspection
|
||||
|
||||
Name: pygobject3
|
||||
Version: 3.17.90
|
||||
Release: 2%{?dist}
|
||||
License: LGPLv2+ and MIT
|
||||
Group: Development/Languages
|
||||
Summary: Python 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.17/pygobject-%{version}.tar.xz
|
||||
License: LGPLv2+ and MIT
|
||||
URL: https://live.gnome.org/PyGObject
|
||||
Source0: http://ftp.gnome.org/pub/GNOME/sources/pygobject/3.17/pygobject-%{version}.tar.xz
|
||||
|
||||
BuildRequires: glib2-devel >= %{glib2_version}
|
||||
BuildRequires: gobject-introspection-devel >= %{gobject_introspection_version}
|
||||
BuildRequires: python2-devel >= %{python2_version}
|
||||
BuildRequires: glib2-devel >= %{glib2_version}
|
||||
BuildRequires: gobject-introspection-devel >= %{gobject_introspection_version}
|
||||
BuildRequires: python2-devel >= %{python2_version}
|
||||
%if 0%{?with_python3}
|
||||
BuildRequires: python3-devel >= %{python3_version}
|
||||
BuildRequires: python3-cairo-devel
|
||||
BuildRequires: python3-devel >= %{python3_version}
|
||||
BuildRequires: python3-cairo-devel
|
||||
%endif # if with_python3
|
||||
|
||||
BuildRequires: cairo-gobject-devel
|
||||
BuildRequires: pycairo-devel
|
||||
BuildRequires: cairo-gobject-devel
|
||||
BuildRequires: pycairo-devel
|
||||
|
||||
# Required by the upstream selftest suite:
|
||||
%if %{with_check}
|
||||
@ -47,80 +36,66 @@ BuildRequires: pycairo-devel
|
||||
# Temporarily disabled pyflakes tests to avoid the build failing due to too new
|
||||
# pyflakes 0.7.2 in F19
|
||||
# https://bugzilla.gnome.org/show_bug.cgi?id=701009
|
||||
#BuildRequires: pyflakes
|
||||
BuildRequires: python-pep8
|
||||
#BuildRequires: pyflakes
|
||||
BuildRequires: python-pep8
|
||||
%endif
|
||||
## for the Gdk and Gtk typelibs, used during the test suite:
|
||||
BuildRequires: gtk3
|
||||
BuildRequires: gtk3
|
||||
## for xvfb-run:
|
||||
BuildRequires: xorg-x11-server-Xvfb
|
||||
BuildRequires: dejavu-sans-fonts
|
||||
BuildRequires: dejavu-sans-mono-fonts
|
||||
BuildRequires: dejavu-serif-fonts
|
||||
BuildRequires: xorg-x11-server-Xvfb
|
||||
BuildRequires: dejavu-sans-fonts
|
||||
BuildRequires: dejavu-sans-mono-fonts
|
||||
BuildRequires: dejavu-serif-fonts
|
||||
## for dbus-launch, used by test_gdbus:
|
||||
BuildRequires: dbus-x11
|
||||
BuildRequires: dbus-x11
|
||||
%endif # with_check
|
||||
|
||||
%description
|
||||
The %{name} package provides a convenient wrapper for the GObject library
|
||||
for use in Python programs.
|
||||
|
||||
%package -n python-gobject
|
||||
Summary: Python 2 bindings for GObject Introspection
|
||||
Group: Development/Languages
|
||||
Requires: python-gobject-base%{?_isa} = %{version}-%{release}
|
||||
%package -n python-gobject
|
||||
Summary: Python 2 bindings for GObject Introspection
|
||||
Requires: python-gobject-base%{?_isa} = %{version}-%{release}
|
||||
# The cairo override module depends on this
|
||||
Requires: pycairo%{?_isa}
|
||||
Requires: pycairo%{?_isa}
|
||||
|
||||
Obsoletes: %{name} < 3.17.90-2
|
||||
Provides: %{name} = %{version}-%{release}
|
||||
Provides: %{name}%{?_isa} = %{version}-%{release}
|
||||
Obsoletes: %{name} < 3.17.90-2
|
||||
Provides: %{name} = %{version}-%{release}
|
||||
Provides: %{name}%{?_isa} = %{version}-%{release}
|
||||
|
||||
%description -n python-gobject
|
||||
The python-gobject package provides a convenient wrapper for the GObject
|
||||
library and and other libraries that are compatible with GObject Introspection,
|
||||
for use in Python 2 programs.
|
||||
|
||||
%package -n python-gobject-base
|
||||
Summary: Python 2 bindings for GObject Introspection base package
|
||||
Group: Development/Languages
|
||||
Requires: gobject-introspection%{?_isa} >= %{gobject_introspection_version}
|
||||
%package -n python-gobject-base
|
||||
Summary: Python 2 bindings for GObject Introspection base package
|
||||
Requires: gobject-introspection%{?_isa} >= %{gobject_introspection_version}
|
||||
|
||||
Obsoletes: %{name}-base < 3.17.90-2
|
||||
Provides: %{name}-base = %{version}-%{release}
|
||||
Provides: %{name}-base%{?_isa} = %{version}-%{release}
|
||||
Obsoletes: %{name}-base < 3.17.90-2
|
||||
Provides: %{name}-base = %{version}-%{release}
|
||||
Provides: %{name}-base%{?_isa} = %{version}-%{release}
|
||||
|
||||
%description -n python-gobject-base
|
||||
This package provides the non-cairo specific bits of the GObject Introspection
|
||||
library.
|
||||
|
||||
%package devel
|
||||
Summary: Development files for embedding PyGObject introspection support
|
||||
Group: Development/Languages
|
||||
Requires: python-gobject%{?_isa} = %{version}-%{release}
|
||||
Requires: python3-gobject%{?_isa} = %{version}-%{release}
|
||||
Requires: gobject-introspection-devel%{?_isa}
|
||||
|
||||
%description devel
|
||||
This package contains files required to embed PyGObject
|
||||
|
||||
%if 0%{?with_python3}
|
||||
%package -n python3-gobject
|
||||
Summary: Python 3 bindings for GObject Introspection
|
||||
Group: Development/Languages
|
||||
Requires: python3-gobject-base%{?_isa} = %{version}-%{release}
|
||||
%package -n python3-gobject
|
||||
Summary: Python 3 bindings for GObject Introspection
|
||||
Requires: python3-gobject-base%{?_isa} = %{version}-%{release}
|
||||
# The cairo override module depends on this
|
||||
Requires: python3-cairo%{?_isa}
|
||||
Requires: python3-cairo%{?_isa}
|
||||
|
||||
%description -n python3-gobject
|
||||
The python3-gobject package provides a convenient wrapper for the GObject
|
||||
library and and other libraries that are compatible with GObject Introspection,
|
||||
for use in Python 3 programs.
|
||||
|
||||
%package -n python3-gobject-base
|
||||
Summary: Python 3 bindings for GObject Introspection base package
|
||||
Group: Development/Languages
|
||||
Requires: gobject-introspection%{?_isa} >= %{gobject_introspection_version}
|
||||
%package -n python3-gobject-base
|
||||
Summary: Python 3 bindings for GObject Introspection base package
|
||||
Requires: gobject-introspection%{?_isa} >= %{gobject_introspection_version}
|
||||
|
||||
%description -n python3-gobject-base
|
||||
This package provides the non-cairo specific bits of the GObject Introspection
|
||||
@ -128,6 +103,15 @@ library.
|
||||
|
||||
%endif # with_python3
|
||||
|
||||
%package devel
|
||||
Summary: Development files for embedding PyGObject introspection support
|
||||
Requires: python-gobject%{?_isa} = %{version}-%{release}
|
||||
Requires: python3-gobject%{?_isa} = %{version}-%{release}
|
||||
Requires: gobject-introspection-devel%{?_isa}
|
||||
|
||||
%description devel
|
||||
This package contains files required to embed PyGObject
|
||||
|
||||
%prep
|
||||
%setup -q -n pygobject-%{version}
|
||||
|
||||
@ -143,14 +127,14 @@ find -name '*.py' | xargs sed -i '1s|^#!python|#!%{__python}|'
|
||||
PYTHON=%{__python}
|
||||
export PYTHON
|
||||
%configure
|
||||
make %{?_smp_mflags} %{verbosity}
|
||||
make %{?_smp_mflags} V=1
|
||||
|
||||
%if 0%{?with_python3}
|
||||
pushd %{py3dir}
|
||||
PYTHON=%{__python3}
|
||||
export PYTHON
|
||||
%configure
|
||||
make %{_smp_mflags} %{verbosity}
|
||||
make %{?_smp_mflags} V=1
|
||||
popd
|
||||
%endif # with_python3
|
||||
|
||||
@ -176,7 +160,6 @@ cp -a examples _docs
|
||||
rm _docs/examples/Makefile*
|
||||
|
||||
%check
|
||||
|
||||
%if %{with_check}
|
||||
# Run the selftests under a temporary xvfb X server (so that they can
|
||||
# initialize Gdk etc):
|
||||
@ -191,11 +174,11 @@ rm _docs/examples/Makefile*
|
||||
pushd %{py3dir}
|
||||
PYTHON=%{__python3}
|
||||
export PYTHON
|
||||
xvfb-run make DESTDIR=$RPM_BUILD_ROOT check %{verbosity}
|
||||
xvfb-run make DESTDIR=$RPM_BUILD_ROOT check V=1
|
||||
popd
|
||||
%endif # with_python3
|
||||
|
||||
xvfb-run make DESTDIR=$RPM_BUILD_ROOT check %{verbosity}
|
||||
xvfb-run make DESTDIR=$RPM_BUILD_ROOT check V=1
|
||||
|
||||
%endif # with_check
|
||||
|
||||
@ -217,13 +200,6 @@ xvfb-run make DESTDIR=$RPM_BUILD_ROOT check %{verbosity}
|
||||
%{python_sitearch}/pygobject-*.egg-info
|
||||
%{python_sitearch}/pygtkcompat/
|
||||
|
||||
%files devel
|
||||
%defattr(644, root, root, 755)
|
||||
%doc _docs/*
|
||||
%dir %{_includedir}/pygobject-3.0/
|
||||
%{_includedir}/pygobject-3.0/pygobject.h
|
||||
%{_libdir}/pkgconfig/pygobject-3.0.pc
|
||||
|
||||
%if 0%{?with_python3}
|
||||
%files -n python3-gobject
|
||||
%defattr(644, root, root, 755)
|
||||
@ -238,9 +214,15 @@ xvfb-run make DESTDIR=$RPM_BUILD_ROOT check %{verbosity}
|
||||
%exclude %{python3_sitearch}/gi/_gi_cairo*.so
|
||||
%{python3_sitearch}/pygobject-*.egg-info
|
||||
%{python3_sitearch}/pygtkcompat/
|
||||
|
||||
%endif # with_python3
|
||||
|
||||
%files devel
|
||||
%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
|
||||
* Sat Aug 22 2015 Kalev Lember <klember@redhat.com> - 3.17.90-2
|
||||
- Rename Python 2 subpackage to python-gobject for consistency with the
|
||||
|
Loading…
Reference in New Issue
Block a user