Built from python3-gobject3.
This commit is contained in:
parent
aaa157ebce
commit
93936ebb94
1
.gitignore
vendored
1
.gitignore
vendored
@ -1 +0,0 @@
|
||||
/pygobject-3.22.0.tar.xz
|
1
dead.package
Normal file
1
dead.package
Normal file
@ -0,0 +1 @@
|
||||
Built from python3-gobject3.
|
@ -1,77 +0,0 @@
|
||||
--- pygobject-3.22.0/gi/__init__.py.allow-static-module-import 2016-07-06 08:17:26.000000000 +0200
|
||||
+++ pygobject-3.22.0/gi/__init__.py 2017-02-08 16:53:17.446776839 +0100
|
||||
@@ -27,17 +27,12 @@
|
||||
import sys
|
||||
import os
|
||||
import importlib
|
||||
-import types
|
||||
-
|
||||
-_static_binding_error = ('When using gi.repository you must not import static '
|
||||
- 'modules like "gobject". Please change all occurrences '
|
||||
- 'of "import gobject" to "from gi.repository import GObject". '
|
||||
- 'See: https://bugzilla.gnome.org/show_bug.cgi?id=709183')
|
||||
|
||||
# we can't have pygobject 2 loaded at the same time we load the internal _gobject
|
||||
if 'gobject' in sys.modules:
|
||||
- raise ImportError(_static_binding_error)
|
||||
-
|
||||
+ raise ImportError('When using gi.repository you must not import static '
|
||||
+ 'modules like "gobject". Please change all occurrences '
|
||||
+ 'of "import gobject" to "from gi.repository import GObject".')
|
||||
|
||||
from . import _gi
|
||||
from ._gi import _gobject
|
||||
@@ -57,20 +52,6 @@
|
||||
__version__ = "{0}.{1}.{2}".format(*version_info)
|
||||
|
||||
|
||||
-class _DummyStaticModule(types.ModuleType):
|
||||
- __path__ = None
|
||||
-
|
||||
- def __getattr__(self, name):
|
||||
- raise AttributeError(_static_binding_error)
|
||||
-
|
||||
-
|
||||
-sys.modules['glib'] = _DummyStaticModule('glib', _static_binding_error)
|
||||
-sys.modules['gobject'] = _DummyStaticModule('gobject', _static_binding_error)
|
||||
-sys.modules['gio'] = _DummyStaticModule('gio', _static_binding_error)
|
||||
-sys.modules['gtk'] = _DummyStaticModule('gtk', _static_binding_error)
|
||||
-sys.modules['gtk.gdk'] = _DummyStaticModule('gtk.gdk', _static_binding_error)
|
||||
-
|
||||
-
|
||||
def check_version(version):
|
||||
if isinstance(version, str):
|
||||
version_list = tuple(map(int, version.split(".")))
|
||||
--- pygobject-3.22.0/tests/test_import_machinery.py.allow-static-module-import 2016-08-25 16:36:12.000000000 +0200
|
||||
+++ pygobject-3.22.0/tests/test_import_machinery.py 2017-02-08 16:53:17.473776850 +0100
|
||||
@@ -90,30 +90,6 @@
|
||||
self.assertIn('gi.repository.Gio', sys.modules)
|
||||
self.assertIn('gi.repository.GIMarshallingTests', sys.modules)
|
||||
|
||||
- def test_static_binding_protection(self):
|
||||
- # Importing old static bindings once gi has been imported should not
|
||||
- # crash but instead give back a dummy module which produces RuntimeErrors
|
||||
- # on access.
|
||||
- with self.assertRaises(AttributeError):
|
||||
- import gobject
|
||||
- gobject.anything
|
||||
-
|
||||
- with self.assertRaises(AttributeError):
|
||||
- import glib
|
||||
- glib.anything
|
||||
-
|
||||
- with self.assertRaises(AttributeError):
|
||||
- import gio
|
||||
- gio.anything
|
||||
-
|
||||
- with self.assertRaises(AttributeError):
|
||||
- import gtk
|
||||
- gtk.anything
|
||||
-
|
||||
- with self.assertRaises(AttributeError):
|
||||
- import gtk.gdk
|
||||
- gtk.gdk.anything
|
||||
-
|
||||
|
||||
class TestImporter(unittest.TestCase):
|
||||
def test_invalid_repository_module_name(self):
|
178
pygobject3.spec
178
pygobject3.spec
@ -1,178 +0,0 @@
|
||||
# Last updated for version 3.18.0
|
||||
%global glib2_version 2.38.0
|
||||
%global gobject_introspection_version 1.46.0
|
||||
|
||||
# this is only turned on during transitional periods
|
||||
%{?python3_next_pkgversion: %global with_python3_next 1}
|
||||
|
||||
%global confopts --disable-silent-rules --srcdir=..
|
||||
|
||||
|
||||
Name: python%{python3_pkgversion}-gobject
|
||||
Version: 3.22.0
|
||||
Release: 1%{?dist}
|
||||
Summary: Python %{python3_version} bindings for GObject Introspection
|
||||
|
||||
License: LGPLv2+ and MIT
|
||||
URL: https://wiki.gnome.org/Projects/PyGObject
|
||||
Source0: https://download.gnome.org/sources/pygobject/3.22/pygobject-%{version}.tar.xz
|
||||
|
||||
# https://bugzilla.redhat.com/1247996
|
||||
# which reverts https://bugzilla.gnome.org/709183
|
||||
Patch1: pygobject-3.22.0-allow-static-module-import.patch
|
||||
|
||||
BuildRequires: glib2-devel >= %{glib2_version}
|
||||
BuildRequires: gobject-introspection-devel >= %{gobject_introspection_version}
|
||||
BuildRequires: python%{python3_pkgversion}-devel
|
||||
BuildRequires: python%{python3_pkgversion}-cairo-devel
|
||||
BuildRequires: cairo-gobject-devel
|
||||
|
||||
Requires: %{name}-base%{?_isa} = %{version}-%{release}
|
||||
Requires: python%{python3_pkgversion}-cairo%{?_isa}
|
||||
|
||||
%description
|
||||
The %{name} package provides a convenient wrapper for the GObject
|
||||
library and and other libraries that are compatible with GObject Introspection,
|
||||
for use in Python %{python3_version} programs.
|
||||
|
||||
|
||||
%package base
|
||||
Summary: Python %{python3_version} bindings for GObject Introspection base package
|
||||
Requires: gobject-introspection%{?_isa} >= %{gobject_introspection_version}
|
||||
|
||||
%description base
|
||||
This package provides the non-cairo specific bits of the GObject Introspection
|
||||
library.
|
||||
|
||||
|
||||
%package devel
|
||||
Summary: Development files for embedding Python %{python3_version} GObject introspection support
|
||||
Requires: %{name}%{?_isa} = %{version}-%{release}
|
||||
Requires: gobject-introspection-devel%{?_isa}
|
||||
|
||||
%description devel
|
||||
This package contains files required to embed Python %{python3_version} PyGObject.
|
||||
|
||||
|
||||
%if 0%{?with_python3_next}
|
||||
%package -n python%{python3_next_pkgversion}-gobject
|
||||
Summary: Python %{python3_next_version} bindings for GObject Introspection
|
||||
|
||||
BuildRequires: python%{python3_next_pkgversion}-devel
|
||||
BuildRequires: python%{python3_next_pkgversion}-cairo-devel
|
||||
|
||||
Requires: python%{python3_next_pkgversion}-base%{?_isa} = %{version}-%{release}
|
||||
Requires: python%{python3_next_pkgversion}-cairo%{?_isa}
|
||||
|
||||
%description -n python%{python3_next_pkgversion}-gobject
|
||||
The python%{python3_next_pkgversion}-gobject package provides a convenient wrapper
|
||||
for the GObject library and and other libraries that are compatible with GObject
|
||||
Introspection, for use in Python %{python3_next_version} programs.
|
||||
|
||||
|
||||
%package -n python%{python3_next_pkgversion}-base
|
||||
Summary: Python %{python3_next_version} bindings for GObject Introspection base package
|
||||
Requires: gobject-introspection%{?_isa} >= %{gobject_introspection_version}
|
||||
|
||||
%description -n python%{python3_next_pkgversion}-base
|
||||
This package provides the non-cairo specific bits of the GObject Introspection
|
||||
library.
|
||||
|
||||
|
||||
%package -n python%{python3_next_pkgversion}-devel
|
||||
Summary: Development files for embedding Python %{python3_next_version} GObject introspection support
|
||||
Requires: python%{python3_next_pkgversion}-gobject%{?_isa} = %{version}-%{release}
|
||||
Requires: gobject-introspection-devel%{?_isa}
|
||||
|
||||
%description -n python%{python3_next_pkgversion}-devel
|
||||
This package contains files required to embed Python %{python3_next_version} PyGObject.
|
||||
%endif
|
||||
|
||||
|
||||
%prep
|
||||
%autosetup -n pygobject-%{version} -p 1
|
||||
%{_bindir}/find . -name '*.py' | %{_bindir}/xargs %{__sed} -i '1s|^#!python|#!%{__python3}|'
|
||||
|
||||
|
||||
%build
|
||||
%{__mkdir} -p py%{python3_pkgversion}
|
||||
pushd py%{python3_pkgversion}
|
||||
export PYTHON=%{__python3}
|
||||
%{__ln_s} ../configure configure
|
||||
%configure %{confopts}
|
||||
%make_build
|
||||
popd
|
||||
%if 0%{?with_python3_next}
|
||||
%{__mkdir} -p py%{python3_next_pkgversion}
|
||||
pushd py%{python3_next_pkgversion}
|
||||
export PYTHON=%{__python3_next}
|
||||
%{__ln_s} ../configure configure
|
||||
%configure %{confopts}
|
||||
%make_build
|
||||
popd
|
||||
%endif
|
||||
|
||||
%install
|
||||
export PYTHON=%{__python3}
|
||||
%make_install -C py%{python3_pkgversion}
|
||||
%if 0%{?with_python3_next}
|
||||
%make_install -C py%{python3_next_pkgversion}
|
||||
%endif
|
||||
|
||||
%{_bindir}/find %{buildroot} -name '*.la' -delete
|
||||
|
||||
# Don't include makefiles in the installed docs, in order to avoid creating
|
||||
# multilib conflicts
|
||||
%{__rm} -fr _docs
|
||||
%{__mkdir} _docs
|
||||
%{__cp} -a examples _docs
|
||||
%{__rm} _docs/examples/Makefile*
|
||||
|
||||
|
||||
%files
|
||||
%{python3_sitearch}/gi/_gi_cairo*.so
|
||||
|
||||
|
||||
%files base
|
||||
%license COPYING
|
||||
%doc AUTHORS NEWS README
|
||||
%dir %{python3_sitearch}/gi
|
||||
%{python3_sitearch}/gi/*
|
||||
%exclude %{python3_sitearch}/gi/_gi_cairo*.so
|
||||
%{python3_sitearch}/pygobject-*.egg-info
|
||||
%{python3_sitearch}/pygtkcompat/
|
||||
|
||||
|
||||
%files devel
|
||||
%doc _docs/*
|
||||
%dir %{_includedir}/pygobject-3.0/
|
||||
%{_includedir}/pygobject-3.0/pygobject.h
|
||||
%{_libdir}/pkgconfig/pygobject-3.0.pc
|
||||
|
||||
|
||||
%if 0%{?with_python3_next}
|
||||
%files -n python%{python3_next_pkgversion}-gobject
|
||||
%{python3_next_sitearch}/gi/_gi_cairo*.so
|
||||
|
||||
|
||||
%files -n python%{python3_next_pkgversion}-gobject-base
|
||||
%license COPYING
|
||||
%doc AUTHORS NEWS README
|
||||
%dir %{python3_next_sitearch}/gi
|
||||
%{python3_next_sitearch}/gi/*
|
||||
%exclude %{python3_next_sitearch}/gi/_gi_cairo*.so
|
||||
%{python3_next_sitearch}/pygobject-*.egg-info
|
||||
%{python3_next_sitearch}/pygtkcompat/
|
||||
|
||||
|
||||
%files -n python%{python3_next_pkgversion}-gobject-devel
|
||||
%doc _docs/*
|
||||
%dir %{_includedir}/pygobject-3.0/
|
||||
%{_includedir}/pygobject-3.0/pygobject.h
|
||||
%{_libdir}/pkgconfig/pygobject-3.0.pc
|
||||
%endif
|
||||
|
||||
|
||||
%changelog
|
||||
* Fri Sep 01 2017 Björn Esser <besser82@fedoraproject.org> - 3.22.0-1
|
||||
- Initial rpm release for EPEL7 (rhbz#1487595)
|
Loading…
Reference in New Issue
Block a user