From a24dcbd4600c7c2734cbd17323a234799793bb0a Mon Sep 17 00:00:00 2001 From: Igor Gnatenko Date: Fri, 3 Nov 2017 22:33:09 +0100 Subject: [PATCH] Revert "Add Platform Python subpackage" This reverts commit 5fe4e612829aa38ab0f40d99442dca674eac1d51. Signed-off-by: Igor Gnatenko --- libcomps.spec | 97 ++++++++++----------------------------------------- 1 file changed, 18 insertions(+), 79 deletions(-) diff --git a/libcomps.spec b/libcomps.spec index 64736d0..d81376a 100644 --- a/libcomps.spec +++ b/libcomps.spec @@ -1,18 +1,12 @@ -%bcond_without python2 %if 0%{?rhel} && 0%{?rhel} <= 7 %bcond_with python3 %else %bcond_without python3 %endif -%if 0%{?fedora} >= 27 || 0%{?rhel} > 7 -%bcond_without platform_python -%else -%bcond_with platform_python -%endif Name: libcomps Version: 0.1.8 -Release: 7%{?dist} +Release: 8%{?dist} Summary: Comps XML file manipulation library License: GPLv2+ @@ -45,7 +39,6 @@ BuildRequires: doxygen %description doc Documentation files for libcomps library. -%if %{with python2} %package -n python-%{name}-doc Summary: Documentation files for python bindings libcomps library Requires: %{name} = %{version}-%{release} @@ -63,7 +56,6 @@ Requires: %{name}%{?_isa} = %{version}-%{release} %description -n python2-%{name} Python 2 bindings for libcomps library. -%endif # with python2 %if %{with python3} %package -n python3-%{name} @@ -71,106 +63,56 @@ Summary: Python 3 bindings for libcomps library BuildRequires: python3-devel %{?python_provide:%python_provide python3-%{name}} Requires: %{name}%{?_isa} = %{version}-%{release} +Obsoletes: platform-python-%{name} < 0.1.8-8 %description -n python3-%{name} Python3 bindings for libcomps library. -%endif # with python3 - -%if %{with platform_python} -%package -n platform-python-%{name} -Summary: Platform Python bindings for libcomps library -BuildRequires: platform-python-devel -Requires: %{name}%{?_isa} = %{version}-%{release} - -%description -n platform-python-%{name} -Platform Python bindings for libcomps library. -%endif # with platform_python +%endif %prep %autosetup -n %{name}-%{name}-%{version} -%if %{with python2} -mkdir build-py2 -%endif # with python2 +mkdir build %if %{with python3} mkdir build-py3 -%endif # with python3 - -%if %{with platform_python} -mkdir build-platform_python -%endif # with platform_python +%endif %build -%if %{with python2} -pushd build-py2 +pushd build %cmake ../libcomps/ -DPYTHON_DESIRED:STRING=2 %make_build make %{?_smp_mflags} docs make %{?_smp_mflags} pydocs popd -%endif # with python2 %if %{with python3} pushd build-py3 %cmake ../libcomps/ -DPYTHON_DESIRED:STRING=3 %make_build popd -%endif # with python3 - -%if %{with platform_python} -pushd build-platform_python -export python_so=%{_libdir}/`%{__platform_python} -c 'import sysconfig; print(sysconfig.get_config_var("LDLIBRARY"))'` -export python_include=`%{__platform_python} -c 'import sysconfig; print(sysconfig.get_path("include"))'` - %cmake \ - ../libcomps/ \ - -DPYTHON_EXECUTABLE:FILEPATH=%{__platform_python} \ - -DPYTHON_LIBRARY=$python_so \ - -DPYTHON_INCLUDE_DIR=$python_include \ - -DPYTHON_DESIRED:str=3 - %make_build -popd -%endif # with platform_python +%endif %install -%if %{with python2} -pushd build-py2 +pushd build %make_install popd -%endif # with python2 %if %{with python3} pushd build-py3 %make_install popd -%endif # with python3 - -%if %{with platform_python} -pushd build-platform_python - %make_install -popd -%endif # with platform_python +%endif %check -%if %{with python2} -pushd build-py2 +pushd build make test popd -%endif # with python2 - %if %{with python3} pushd build-py3 make pytest popd -%endif # with python3 - -%if %{with platform_python} -pushd build-platform_python - # Tests are Python 3 incompatible and they are - # skipped internally for Python 3 as well. - #make pytest -popd -%endif # with platform_python +%endif %post -p /sbin/ldconfig %postun -p /sbin/ldconfig @@ -184,28 +126,24 @@ popd %{_libdir}/%{name}.so %{_includedir}/%{name}/ -%if %{with python2} %files doc -%doc build-py2/docs/libcomps-doc/html +%doc build/docs/libcomps-doc/html %files -n python-%{name}-doc -%doc build-py2/src/python/docs/html +%doc build/src/python/docs/html %files -n python2-%{name} %{python2_sitearch}/%{name}/ -%endif # with python2 %if %{with python3} %files -n python3-%{name} %{python3_sitearch}/%{name}/ -%endif # with python3 - -%if %{with platform_python} -%files -n platform-python-%{name} -%{platform_python_sitearch}/%{name}/ -%endif # with platform_python +%endif %changelog +* Fri Nov 03 2017 Igor Gnatenko - 0.1.8-8 +- Remove platform-python subpackage + * Fri Sep 01 2017 Igor Gnatenko - 0.1.8-7 - Disable platform python on old releases @@ -354,3 +292,4 @@ popd * Tue Jun 25 2013 Jindrich Luza 0.1.1-1 - Automatic commit of package [libcomps] release [0.1.1-1]. +