[packages/libsolv] - updated to 0.7.39, allow to disable python2

qboosh qboosh at pld-linux.org
Sat Sep 19 20:46:46 CEST 2026


commit 204319b7572304ab5128abff8e819d67d0c7b362
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date:   Sat Sep 19 20:46:59 2026 +0200

    - updated to 0.7.39, allow to disable python2

 libsolv.spec | 59 ++++++++++++++++++++++++++++++++++-------------------------
 1 file changed, 34 insertions(+), 25 deletions(-)
---
diff --git a/libsolv.spec b/libsolv.spec
index b3c2e5b..f7532da 100644
--- a/libsolv.spec
+++ b/libsolv.spec
@@ -1,6 +1,7 @@
 #
 # Conditional build:
 %bcond_without	static_libs	# static libraries
+%bcond_without	python2		# Python 2.x bindings
 %bcond_without	python3		# Python 3.x bindings
 %bcond_with	rpm5		# rpm5 fork instead of rpm.org
 %bcond_without	ruby		# Ruby bindings
@@ -9,13 +10,13 @@
 Summary:	Package dependency solver
 Summary(pl.UTF-8):	Biblioteka do rozwiązywania zależności pakietów
 Name:		libsolv
-Version:	0.7.37
-Release:	2
+Version:	0.7.39
+Release:	1
 License:	BSD
 Group:		Libraries
 #Source0Download: https://github.com/openSUSE/libsolv/tags
 Source0:	https://github.com/openSUSE/libsolv/archive/%{version}/%{name}-%{version}.tar.gz
-# Source0-md5:	f2bfa7e2cbc0a7d44e83af025ded4416
+# Source0-md5:	1a653a8ed69564bbf3d6e1d9febd8dc1
 Patch0:		ruby.patch
 Patch2:		%{name}-rpm5.patch
 Patch3:		uname-cpuinfo-deps.patch
@@ -216,26 +217,26 @@ Wiązania języka Tcl do bibliotek libsolv.
 	-DMULTI_SEMANTICS=ON \\\
 	%{nil}
 
-install -d build %{?with_python3:build-py3}
+install -d build %{?with_python2:build-py2}
 cd build
 %cmake .. \
 	%{common_opts} \
 	-DENABLE_PERL=ON \
-	-DENABLE_PYTHON=ON \
+	%{?with_python3:-DENABLE_PYTHON=ON} \
 	%{?with_ruby:-DENABLE_RUBY=ON} \
 	%{?with_tcl:-DENABLE_TCL=ON} \
-	-DPythonLibs_FIND_VERSION=2 \
-	-DPythonLibs_FIND_VERSION_MAJOR=2 \
+	-DPythonLibs_FIND_VERSION=3 \
+	-DPythonLibs_FIND_VERSION_MAJOR=3 \
 	-DUSE_VENDORDIRS=ON
 
 %{__make}
-%if %{with python3}
-cd ../build-py3
+%if %{with python2}
+cd ../build-py2
 %cmake .. \
 	%{common_opts} \
 	-DENABLE_PYTHON=ON \
-	-DPythonLibs_FIND_VERSION=3 \
-	-DPythonLibs_FIND_VERSION_MAJOR=3
+	-DPythonLibs_FIND_VERSION=2 \
+	-DPythonLibs_FIND_VERSION_MAJOR=2
 
 %{__make}
 %endif
@@ -243,17 +244,22 @@ cd ../build-py3
 %install
 rm -rf $RPM_BUILD_ROOT
 
-%if %{with python3}
-%{__make} -C build-py3/bindings/python install \
+%if %{with python2}
+%{__make} -C build-py2/bindings/python install \
 	DESTDIR=$RPM_BUILD_ROOT
+
+%py_comp $RPM_BUILD_ROOT%{py_sitedir}
+%py_ocomp $RPM_BUILD_ROOT%{py_sitedir}
+%py_postclean
 %endif
 
 %{__make} -C build install \
 	DESTDIR=$RPM_BUILD_ROOT
 
-%py_comp $RPM_BUILD_ROOT%{py_sitedir}
-%py_ocomp $RPM_BUILD_ROOT%{py_sitedir}
-%py_postclean
+%if %{with python3}
+%py3_comp $RPM_BUILD_ROOT%{py3_sitedir}
+%py3_ocomp $RPM_BUILD_ROOT%{py3_sitedir}
+%endif
 
 %clean
 rm -rf $RPM_BUILD_ROOT
@@ -264,13 +270,13 @@ rm -rf $RPM_BUILD_ROOT
 %files
 %defattr(644,root,root,755)
 %doc CREDITS LICENSE.BSD NEWS README
-%attr(755,root,root) %{_libdir}/libsolv.so.1
-%attr(755,root,root) %{_libdir}/libsolvext.so.1
+%{_libdir}/libsolv.so.1
+%{_libdir}/libsolvext.so.1
 
 %files devel
 %defattr(644,root,root,755)
-%attr(755,root,root) %{_libdir}/libsolv.so
-%attr(755,root,root) %{_libdir}/libsolvext.so
+%{_libdir}/libsolv.so
+%{_libdir}/libsolvext.so
 %{_includedir}/solv
 %{_pkgconfigdir}/libsolv.pc
 %{_pkgconfigdir}/libsolvext.pc
@@ -332,34 +338,37 @@ rm -rf $RPM_BUILD_ROOT
 %files -n perl-solv
 %defattr(644,root,root,755)
 %doc examples/p5solv
-%attr(755,root,root) %{perl_vendorarch}/solv.so
+%{perl_vendorarch}/solv.so
 %{perl_vendorarch}/solv.pm
 
+%if %{with python2}
 %files -n python-solv
 %defattr(644,root,root,755)
 %doc examples/pysolv
-%attr(755,root,root) %{py_sitedir}/_solv.so
+%{py_sitedir}/_solv.so
 %{py_sitedir}/solv.py[co]
+%endif
 
 %if %{with python3}
 %files -n python3-solv
 %defattr(644,root,root,755)
 %doc examples/pysolv
-%attr(755,root,root) %{py3_sitedir}/_solv.so
+%{py3_sitedir}/_solv.so
 %{py3_sitedir}/solv.py
+%{py3_sitedir}/__pycache__/solv.cpython-*.py[co]
 %endif
 
 %if %{with ruby}
 %files -n ruby-solv
 %defattr(644,root,root,755)
 %doc examples/rbsolv
-%attr(755,root,root) %{ruby_vendorarchdir}/solv.so
+%{ruby_vendorarchdir}/solv.so
 %endif
 
 %if %{with tcl}
 %files -n tcl-solv
 %defattr(644,root,root,755)
 %doc examples/tclsolv
-%attr(755,root,root) %{_prefix}/lib/tcl8/8.*/solv-%{version}.so
+%{_prefix}/lib/tcl8/8.*/solv-%{version}.so
 %{_prefix}/lib/tcl8/8.*/solv-%{version}.tm
 %endif
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/libsolv.git/commitdiff/204319b7572304ab5128abff8e819d67d0c7b362



More information about the pld-cvs-commit mailing list