diff --git a/.gitignore b/.gitignore index f44b490..6268026 100644 --- a/.gitignore +++ b/.gitignore @@ -63,3 +63,4 @@ /hawkey-0.6.0.tar.gz /hawkey-0.6.1.tar.gz /hawkey-0.6.2.tar.gz +/hawkey-0.6.3.tar.gz diff --git a/hawkey-0.6.2-valgrind-check.patch b/hawkey-0.6.2-valgrind-check.patch deleted file mode 100644 index 42d67b3..0000000 --- a/hawkey-0.6.2-valgrind-check.patch +++ /dev/null @@ -1,15 +0,0 @@ -diff -up hawkey-0.6.2/tests/CMakeLists.txt.valgrind hawkey-0.6.2/tests/CMakeLists.txt ---- hawkey-0.6.2/tests/CMakeLists.txt.valgrind 2015-12-09 10:27:53.000000000 +0100 -+++ hawkey-0.6.2/tests/CMakeLists.txt 2015-12-09 10:28:12.000000000 +0100 -@@ -34,9 +34,11 @@ TARGET_LINK_LIBRARIES(test_main - ${ZLIB_LIBRARY} - ${RPMDB_LIBRARY}) - ADD_TEST(test_main test_main "${CMAKE_CURRENT_SOURCE_DIR}/repos/") -+IF (VALGRIND_PROGRAM) - ADD_TEST(test_valgrind ${VALGRIND_PROGRAM} --error-exitcode=1 --leak-check=full - ${CMAKE_CURRENT_BINARY_DIR}/test_main - ${CMAKE_CURRENT_SOURCE_DIR}/repos/) - SET_TESTS_PROPERTIES(test_valgrind PROPERTIES ENVIRONMENT "CK_FORK=no") -+ENDIF() - - ADD_SUBDIRECTORY (python) diff --git a/hawkey.spec b/hawkey.spec index 929bcf2..05c2b45 100644 --- a/hawkey.spec +++ b/hawkey.spec @@ -1,101 +1,104 @@ %global libsolv_version 0.6.4-1 -%if 0%{?rhel} != 0 && 0%{?rhel} <= 7 -# Do not build bindings for python3 for RHEL <= 7 +%if 0%{?rhel} && 0%{?rhel} <= 7 %bcond_with python3 %else %bcond_without python3 %endif -Name: hawkey -Version: 0.6.2 -Release: 4%{?snapshot}%{?dist} -Summary: Library providing simplified C and Python API to libsolv -Group: System Environment/Libraries -License: LGPLv2+ -URL: https://github.com/rpm-software-management/%{name} -# git clone https://github.com/rpm-software-management/hawkey.git && cd hawkey && tito build --tgz -Source0: https://github.com/rpm-software-management/%{name}/archive/%{name}-%{version}.tar.gz -Patch0: hawkey-0.6.2-valgrind-check.patch -BuildRequires: libsolv-devel >= %{libsolv_version} -BuildRequires: cmake expat-devel rpm-devel zlib-devel check-devel +Name: hawkey +Version: 0.6.3 +Release: 2%{?dist} +Summary: Library providing simplified C and Python API to libsolv +License: LGPLv2+ +URL: https://github.com/rpm-software-management/%{name} +Source0: %{url}/archive/%{name}-%{version}.tar.gz +BuildRequires: libsolv-devel >= %{libsolv_version} +BuildRequires: cmake +BuildRequires: gcc +BuildRequires: expat-devel +BuildRequires: rpm-devel +BuildRequires: zlib-devel +BuildRequires: check-devel %ifnarch s390 -BuildRequires: valgrind +BuildRequires: valgrind %endif -Requires: libsolv%{?_isa} >= %{libsolv_version} -# prevent provides from nonstandard paths: -%filter_provides_in %{python_sitearch}/.*\.so$ -%if %{with python3} -%filter_provides_in %{python3_sitearch}/.*\.so$ -%endif -# filter out _hawkey_testmodule.so DT_NEEDED _hawkeymodule.so: -%filter_requires_in %{python_sitearch}/hawkey/test/.*\.so$ -%if %{with python3} -%filter_requires_in %{python3_sitearch}/hawkey/test/.*\.so$ -%endif -%filter_setup +Requires: libsolv%{?_isa} >= %{libsolv_version} %description A Library providing simplified C and Python API to libsolv. %package devel -Summary: A Library providing simplified C and Python API to libsolv -Group: Development/Libraries -Requires: hawkey%{?_isa} = %{version}-%{release} -Requires: libsolv-devel +Summary: A Library providing simplified C and Python API to libsolv +Requires: %{name}%{?_isa} = %{version}-%{release} +Requires: libsolv-devel %description devel Development files for hawkey. -%package -n python-hawkey -Summary: Python 2 bindings for the hawkey library -Group: Development/Languages +%package -n python2-%{name} +Summary: Python 2 bindings for the hawkey library +%{?python_provide:%python_provide python2-%{name}} BuildRequires: python2-devel +%if 0%{?rhel} && 0%{?rhel} <= 7 BuildRequires: python-nose -%if %{with python3} -BuildRequires: python-sphinx >= 1.1.3-9 %else -BuildRequires: python-sphinx +BuildRequires: python2-nose +%endif +%if (0%{?rhel} && 0%{?rhel} <= 7) || (0%{?fedora} && 0%{?fedora} <= 23) +BuildRequires: python-sphinx +%else +BuildRequires: python2-sphinx %endif -Requires: %{name}%{?_isa} = %{version}-%{release} +Requires: %{name}%{?_isa} = %{version}-%{release} -%description -n python-hawkey +%description -n python2-%{name} Python 2 bindings for the hawkey library. %if %{with python3} -%package -n python3-hawkey -Summary: Python 3 bindings for the hawkey library -Group: Development/Languages -BuildRequires: python3-devel -BuildRequires: python3-nose -BuildRequires: python3-sphinx >= 1.1.3-9 -Requires: %{name}%{?_isa} = %{version}-%{release} - -%description -n python3-hawkey +%package -n python3-%{name} +Summary: Python 3 bindings for the hawkey library +%{?python_provide:%python_provide python3-%{name}} +BuildRequires: python3-devel +BuildRequires: python3-nose +BuildRequires: python3-sphinx +Requires: %{name}%{?_isa} = %{version}-%{release} + +%description -n python3-%{name} Python 3 bindings for the hawkey library. %endif %prep -%setup -q -n %{name}-%{version} -%patch0 -p1 +%autosetup + +mkdir build %if %{with python3} -rm -rf py3 -mkdir ../py3 -cp -a . ../py3/ -mv ../py3 ./ +mkdir build-py3 %endif %build -%cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo . -make %{?_smp_mflags} -make doc-man +pushd build + %cmake ../ + %make_build + make doc-man +popd + +%if %{with python3} +pushd build-py3 + %cmake ../ -DPYTHON_DESIRED:str=3 + %make_build + make doc-man +popd +%endif +%install +pushd build + %make_install +popd %if %{with python3} -pushd py3 -%cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo -DPYTHON_DESIRED:str=3. -make %{?_smp_mflags} -make doc-man +pushd build-py3 + %make_install popd %endif @@ -107,56 +110,48 @@ Please build the package as non-root user. ERROR exit 1 fi -make ARGS="-V" test +pushd build + ctest -VV +popd %if %{with python3} # Run just the Python tests, not all of them, since # we have coverage of the core from the first build -pushd py3/tests/python -make ARGS="-V" test -popd -%endif - -%install -make install DESTDIR=$RPM_BUILD_ROOT -%if %{with python3} -pushd py3 -make install DESTDIR=$RPM_BUILD_ROOT +pushd build-py3/tests/python + ctest -VV popd %endif %post -p /sbin/ldconfig - %postun -p /sbin/ldconfig %files -%doc COPYING README.rst -%{_libdir}/libhawkey.so.* +%license COPYING +%doc README.rst +%{_libdir}/lib%{name}.so.* %files devel -%{_libdir}/libhawkey.so -%{_libdir}/pkgconfig/hawkey.pc -%{_includedir}/hawkey/ -%{_mandir}/man3/hawkey.3.gz +%{_libdir}/lib%{name}.so +%{_libdir}/pkgconfig/%{name}.pc +%{_includedir}/%{name}/ +%{_mandir}/man3/%{name}.3* -%files -n python-hawkey -%{python_sitearch}/ +%files -n python2-%{name} +%{python2_sitearch}/%{name}/ %if %{with python3} -%files -n python3-hawkey -%{python3_sitearch}/ -%exclude %{python3_sitearch}/hawkey/__pycache__ -%exclude %{python3_sitearch}/hawkey/test/__pycache__ +%files -n python3-%{name} +%{python3_sitearch}/%{name}/ %endif %changelog -* Wed Feb 03 2016 Fedora Release Engineering - 0.6.2-4 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild - -* Wed Dec 09 2015 Dan Horák - 0.6.2-3 -- fix build without valgrind (#1289865) - -* Thu Nov 12 2015 Fedora Release Engineering - 0.6.2-2 -- Rebuilt for https://fedoraproject.org/wiki/Changes/python3.5 +* Fri Apr 29 2016 Igor Gnatenko 0.6.3-2 +- spec: Fix packaging to comply packaging guidelines (Igor Gnatenko) + +* Mon Mar 21 2016 Jan Silhan 0.6.3-1 +- Add support for retrieving Group tag from package (Neal Gompa (ニール・ゴンパ)) +- python: release GIL around hy_goal_run* calls (Mikolaj Izdebski) +- README: hawkey replaced by libhif (Jan Šilhan) +- fix build without valgrind (RhBug:1289865) (Dan Horák) * Wed Oct 14 2015 Jan Silhan 0.6.2-1 - ignore exludes in running_kernel query (RhBug:Related:1260989) (Michal diff --git a/sources b/sources index 67078da..0841820 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -35880d2af97c399a7a7a384b86b15e90 hawkey-0.6.2.tar.gz +42a836948c53eced7448f590d57f45eb hawkey-0.6.3.tar.gz