[packages/python-pygobject3] - updated to 3.30.1 - upstream dropped autotools build system, so switched to setuptools - removed o

qboosh qboosh at pld-linux.org
Thu Oct 11 21:16:00 CEST 2018


commit 1c1e83822fbe4105e192e91f32ec17687fb0b991
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date:   Thu Oct 11 21:19:28 2018 +0200

    - updated to 3.30.1
    - upstream dropped autotools build system, so switched to setuptools
    - removed outdated link patch
    - added -apidocs

 link.patch             |  31 -------------
 python-pygobject3.spec | 117 +++++++++++++++++++++++++------------------------
 2 files changed, 60 insertions(+), 88 deletions(-)
---
diff --git a/python-pygobject3.spec b/python-pygobject3.spec
index cc76c7f..06aecdd 100644
--- a/python-pygobject3.spec
+++ b/python-pygobject3.spec
@@ -2,41 +2,46 @@
 # Conditional build:
 %bcond_without	python2		# Python 2.x module
 %bcond_without	python3		# Python 3.x module
+%bcond_without	doc		# Sphinx documentation
+%bcond_with	tests		# unit tests (fail at the beginning as of 3.30.1)
 
 %define		module	pygobject
 Summary:	Python bindings for GObject library
 Summary(pl.UTF-8):	Wiązania Pythona do biblioteki GObject
 Name:		python-pygobject3
-Version:	3.28.2
-Release:	2
+Version:	3.30.1
+Release:	1
 License:	LGPL v2+
 Group:		Libraries/Python
-Source0:	http://ftp.gnome.org/pub/GNOME/sources/pygobject/3.28/%{module}-%{version}.tar.xz
-# Source0-md5:	bda3178850e3ae886eef3acc7056b51a
-Patch0:		link.patch
+Source0:	http://ftp.gnome.org/pub/GNOME/sources/pygobject/3.30/%{module}-%{version}.tar.xz
+# Source0-md5:	77ba5f41a00d5c0cc22962a475f8de67
 URL:		https://wiki.gnome.org/Projects/PyGObject
-BuildRequires:	autoconf >= 2.68
-BuildRequires:	automake >= 1:1.12.6
-%{?with_python3:BuildRequires:	automake >= 1:1.13}
 BuildRequires:	cairo-gobject-devel
 BuildRequires:	glib2-devel >= 1:2.38.0
-BuildRequires:	gnome-common >= 3.10
 BuildRequires:	gobject-introspection-devel >= 1.46.0
 BuildRequires:	libffi-devel >= 3.0
-BuildRequires:	libtool >= 2:2.2.6
 BuildRequires:	pkgconfig
 BuildRequires:	rpm-pythonprov
+%{?with_doc:BuildRequires:	sphinx-pdg}
 BuildRequires:	tar >= 1:1.22
 BuildRequires:	xz
 %if %{with python2}
 BuildRequires:	python-devel >= 1:2.7
 BuildRequires:	python-pycairo-devel >= 1.11.1
+BuildRequires:	python-setuptools
+%if %{with tests}
+BuildRequires:	python-pytest
+%endif
 %endif
 %if %{with python3}
-BuildRequires:	python3 >= 1:3.2.2-3
-BuildRequires:	python3-devel >= 1:3.2.2-3
-BuildRequires:	python3-modules >= 1:3.2.2-3
+BuildRequires:	python3 >= 1:3.5
+BuildRequires:	python3-devel >= 1:3.5
+BuildRequires:	python3-modules >= 1:3.5
 BuildRequires:	python3-pycairo-devel >= 1.11.1
+BuildRequires:	python3-setuptools
+%if %{with tests}
+BuildRequires:	python3-pytest
+%endif
 %endif
 Requires:	glib2 >= 1:2.38.0
 Requires:	gobject-introspection >= 1.46.0
@@ -76,7 +81,7 @@ Requires:	%{name} = %{version}-%{release}
 Requires:	%{name}-common-devel = %{version}-%{release}
 Requires:	glib2-devel >= 1:2.38.0
 Requires:	libffi-devel >= 3.0
-Requires:	python-devel >= 1:2.6
+Requires:	python-devel >= 1:2.7
 
 %description devel
 This metapackage gathers files required to develop GObject bindings
@@ -107,7 +112,7 @@ Group:		Development/Languages/Python
 Requires:	%{name}-common-devel = %{version}-%{release}
 Requires:	glib2-devel >= 1:2.38.0
 Requires:	libffi-devel >= 3.0
-Requires:	python3-devel >= 1:3.2
+Requires:	python3-devel >= 1:3.5
 Requires:	python3-pygobject3 = %{version}-%{release}
 
 %description -n python3-pygobject3-devel
@@ -118,11 +123,28 @@ for Python 3.
 Ten metapakiet gromadzi pliki wymagane do tworzenia wiązań biblioteki
 GObject dla Pythona 3.
 
+%package apidocs
+Summary:	API documentation for Python GObject library
+Summary(pl.UTF-8):	Dokumentacja biblioteki Pythona GObject
+Group:		Documentation
+%if "%{_rpmversion}" >= "5"
+BuildArch:	noarch
+%endif
+
+%description apidocs
+API documentation for Python GObject library.
+
+%description apidocs -l pl.UTF-8
+Dokumentacja biblioteki Pythona GObject.
+
 %package examples
 Summary:	Example programs for GObject library
 Summary(pl.UTF-8):	Programy przykładowe dla biblioteki GObject
 Group:		Development/Languages/Python
 Requires:	%{name}-devel = %{version}-%{release}
+%if "%{_rpmversion}" >= "5"
+BuildArch:	noarch
+%endif
 
 %description examples
 This package contains example programs for GObject library.
@@ -132,68 +154,43 @@ Ten pakiet zawiera przykładowe programy dla biblioteki GObject.
 
 %prep
 %setup -q -n %{module}-%{version}
-%patch0 -p1
 
 %build
-%{__libtoolize}
-%{__aclocal} -I m4
-%{__autoconf}
-%{__autoheader}
-%{__automake}
+%if %{with python2}
+%py_build %{?with_tests:test}
+%endif
+
 %if %{with python3}
-mkdir py3
-cd py3
-../%configure \
-	PYTHON=/usr/bin/python3 \
-	PYTHON_LIBS=-lpython3 \
-	--disable-silent-rules \
-	%{?with_python2:--without-common}
-%{__make}
-cd ..
+%py3_build %{?with_tests:test}
 %endif
-%if %{with python2}
-mkdir py2
-cd py2
-../%configure \
-	PYTHON=%{__python} \
-	PYTHON_LIBS=-lpython \
-	--disable-silent-rules
-%{__make}
-cd ..
+
+%if %{with doc}
+%{__make} -C docs
 %endif
 
 %install
 rm -rf $RPM_BUILD_ROOT
 install -d $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
 
-%if %{with python3}
-%{__make} -C py3 -j 1 install \
-	DESTDIR=$RPM_BUILD_ROOT \
-	TARGET_DIR=%{_gtkdocdir}/%{module}
-%endif
 %if %{with python2}
-%{__make} -C py2 -j 1 install \
-	DESTDIR=$RPM_BUILD_ROOT \
-	TARGET_DIR=%{_gtkdocdir}/%{module}
-%endif
+%py_install
 
-cp -a examples/*.py $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
-
-%if %{with python2}
-%{__rm} $RPM_BUILD_ROOT%{py_sitedir}/gi/*.la
 %py_postclean
 %endif
+
 %if %{with python3}
-%{__rm} $RPM_BUILD_ROOT%{py3_sitedir}/gi/*.la
+%py3_install
 %endif
 
+cp -a examples/*.py $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
+
 %clean
 rm -rf $RPM_BUILD_ROOT
 
 %if %{with python2}
 %files
 %defattr(644,root,root,755)
-%doc ChangeLog NEWS README.rst
+%doc NEWS README.rst
 %dir %{py_sitedir}/gi
 %attr(755,root,root) %{py_sitedir}/gi/_gi.so
 %attr(755,root,root) %{py_sitedir}/gi/_gi_cairo.so
@@ -204,7 +201,7 @@ rm -rf $RPM_BUILD_ROOT
 %{py_sitedir}/gi/repository/*.py[co]
 %dir %{py_sitedir}/pygtkcompat
 %{py_sitedir}/pygtkcompat/*.py[co]
-%{py_sitedir}/pygobject-%{version}-py*.egg-info
+%{py_sitedir}/PyGObject-%{version}-py*.egg-info
 
 %files common-devel
 %defattr(644,root,root,755)
@@ -218,7 +215,7 @@ rm -rf $RPM_BUILD_ROOT
 %if %{with python3}
 %files -n python3-pygobject3
 %defattr(644,root,root,755)
-%doc ChangeLog NEWS README.rst
+%doc NEWS README.rst
 %dir %{py3_sitedir}/gi
 %attr(755,root,root) %{py3_sitedir}/gi/_gi.cpython*.so
 %attr(755,root,root) %{py3_sitedir}/gi/_gi_cairo.cpython*.so
@@ -233,12 +230,18 @@ rm -rf $RPM_BUILD_ROOT
 %dir %{py3_sitedir}/pygtkcompat
 %{py3_sitedir}/pygtkcompat/*.py
 %{py3_sitedir}/pygtkcompat/__pycache__
-%{py3_sitedir}/pygobject-%{version}-py*.egg-info
+%{py3_sitedir}/PyGObject-%{version}-py*.egg-info
 
 %files -n python3-pygobject3-devel
 %defattr(644,root,root,755)
 %endif
 
+%if %{with doc}
+%files apidocs
+%defattr(644,root,root,755)
+%doc docs/_build/{_images,_static,devguide,guide,*.html,*.js}
+%endif
+
 %files examples
 %defattr(644,root,root,755)
 %{_examplesdir}/%{name}-%{version}
diff --git a/link.patch b/link.patch
deleted file mode 100644
index 7ecd527..0000000
--- a/link.patch
+++ /dev/null
@@ -1,31 +0,0 @@
---- pygobject-3.0.0/gi/Makefile.am.wiget	2011-09-24 19:46:02.886052379 +0200
-+++ pygobject-3.0.0/gi/Makefile.am	2011-09-24 19:46:24.461794869 +0200
-@@ -12,13 +12,13 @@ extension_ldflags = \
- 	-module \
- 	-avoid-version
- 
-+extension_libadd = \
-+	$(PYTHON_LIBS)
-+
- if OS_WIN32
- # Windows requires Python modules to be explicitly linked to libpython.
- # Extension modules are shared libaries (.dll), but need to be
- # called .pyd for Python to load it as an extension module.
--extension_libadd = \
--	$(PYTHON_LIBS)
--
- extension_ldflags += \
- 	-no-undefined \
- 	-shrext ".pyd"
---- pygobject-3.28.1/configure.ac.fix	2018-03-24 19:28:50.810204421 +0100
-+++ pygobject-3.28.1/configure.ac	2018-03-24 19:29:02.056860075 +0100
-@@ -118,9 +118,7 @@ PYTHON_SO=`$PYTHON -c "import distutils.
- AC_SUBST(PYTHON_SO)
- 
- PYG_CHECK_PYTHON_HEADERS(, AC_MSG_ERROR([Python headers not found]))
--if test "x$link_python_libs" = "xyes"; then
-   PYG_CHECK_PYTHON_LIBS(, AC_MSG_ERROR([Python libs not found. Windows requires Python modules to be explicitly linked to libpython.]))
--fi
- 
- dnl get rid of the -export-dynamic stuff from the configure flags ...
- export_dynamic=`(./libtool --config; echo eval echo \\$export_dynamic_flag_spec) | sh`
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/python-pygobject3.git/commitdiff/1c1e83822fbe4105e192e91f32ec17687fb0b991



More information about the pld-cvs-commit mailing list