diff options
author | Daniel Alley <dalley@redhat.com> | 2020-12-23 07:42:16 +0300 |
---|---|---|
committer | Lukáš Hrázký <lukkash@email.cz> | 2021-02-01 12:43:45 +0300 |
commit | f25e8f4d306b9d42956fd81c94a4009ea73625b8 (patch) | |
tree | d6aec4525c62a3dabcfaf16af5cf06821dda144e /createrepo_c.spec | |
parent | 4ddc89a5372419f2ba649e085f94ec010e839a5a (diff) |
Drop Python 2 support
closes #195
Diffstat (limited to 'createrepo_c.spec')
-rw-r--r-- | createrepo_c.spec | 99 |
1 files changed, 0 insertions, 99 deletions
diff --git a/createrepo_c.spec b/createrepo_c.spec index e215d87..0836e7a 100644 --- a/createrepo_c.spec +++ b/createrepo_c.spec @@ -2,18 +2,7 @@ %define __cmake_in_source_build 1 -# Bash completion (we need different approach for RHEL-6) -%if 0%{?rhel} == 6 -%global bash_completion %config%{_sysconfdir}/bash_completion.d/createrepo_c.bash -%else %global bash_completion %{_datadir}/bash-completion/completions/* -%endif - -%if 0%{?rhel} && 0%{?rhel} <= 7 -%bcond_with python3 -%else -%bcond_without python3 -%endif %if 0%{?rhel} && ( 0%{?rhel} <= 7 || 0%{?rhel} >= 9 ) %bcond_with drpm @@ -21,12 +10,6 @@ %bcond_without drpm %endif -%if 0%{?fedora} > 29 || 0%{?rhel} > 7 -%bcond_with python2 -%else -%bcond_without python2 -%endif - %if 0%{?rhel} || 0%{?fedora} < 29 %bcond_with zchunk %else @@ -70,12 +53,8 @@ BuildRequires: libmodulemd Requires: libmodulemd%{?_isa} >= %{libmodulemd_version} %endif Requires: %{name}-libs = %{version}-%{release} -%if 0%{?rhel} == 6 -Requires: rpm >= 4.8.0-28 -%else BuildRequires: bash-completion Requires: rpm >= 4.9.0 -%endif %if %{with drpm} BuildRequires: drpm-devel >= 0.4.0 %endif @@ -106,24 +85,6 @@ Requires: %{name}-libs%{?_isa} = %{version}-%{release} This package contains the createrepo_c C library and header files. These development files are for easy manipulation with a repodata. -%if %{with python2} -%package -n python2-%{name} -Summary: Python bindings for the createrepo_c library -%{?python_provide:%python_provide python2-%{name}} -BuildRequires: python2-devel -BuildRequires: python2-nose -%if 0%{?rhel} && 0%{?rhel} <= 7 -BuildRequires: python-sphinx -%else -BuildRequires: python2-sphinx -%endif -Requires: %{name}-libs = %{version}-%{release} - -%description -n python2-%{name} -Python bindings for the createrepo_c library. -%endif - -%if %{with python3} %package -n python3-%{name} Summary: Python 3 bindings for the createrepo_c library %{?python_provide:%python_provide python3-%{name}} @@ -134,40 +95,16 @@ Requires: %{name}-libs = %{version}-%{release} %description -n python3-%{name} Python 3 bindings for the createrepo_c library. -%endif %prep %autosetup -p1 -%if %{with python2} -mkdir build-py2 -%endif -%if %{with python3} mkdir build-py3 -%endif %build -# Build createrepo_c with Python 2 -%if %{with python2} -pushd build-py2 - %cmake .. \ - -DPYTHON_DESIRED:FILEPATH=%{__python2} \ - -DWITH_ZCHUNK=%{?with_zchunk:ON}%{!?with_zchunk:OFF} \ - -DWITH_LIBMODULEMD=%{?with_libmodulemd:ON}%{!?with_libmodulemd:OFF} \ - -DENABLE_DRPM=%{?with_drpm:ON}%{!?with_drpm:OFF} - make %{?_smp_mflags} RPM_OPT_FLAGS="%{optflags}" - %if %{without python3} - # Build C documentation - make doc-c - %endif -popd -%endif - # Build createrepo_c with Pyhon 3 -%if %{with python3} pushd build-py3 %cmake .. \ - -DPYTHON_DESIRED:FILEPATH=%{__python3} \ -DWITH_ZCHUNK=%{?with_zchunk:ON}%{!?with_zchunk:OFF} \ -DWITH_LIBMODULEMD=%{?with_libmodulemd:ON}%{!?with_libmodulemd:OFF} \ -DENABLE_DRPM=%{?with_drpm:ON}%{!?with_drpm:OFF} @@ -175,23 +112,9 @@ pushd build-py3 # Build C documentation make doc-c popd -%endif %check -%if %{with python2} -pushd build-py2 - %if %{without python3} - # Compile C tests - make tests - %endif - - # Run Python 2 tests - make ARGS="-V" test -popd -%endif - # Run Python 3 tests -%if %{with python3} pushd build-py3 # Compile C tests make tests @@ -199,22 +122,12 @@ pushd build-py3 # Run Python 3 tests make ARGS="-V" test popd -%endif %install -%if %{with python2} -pushd build-py2 - # Install createrepo_c with Python 2 - make install DESTDIR=%{buildroot} -popd -%endif - -%if %{with python3} pushd build-py3 # Install createrepo_c with Python 3 make install DESTDIR=%{buildroot} popd -%endif %if 0%{?fedora} || 0%{?rhel} > 7 ln -sr %{buildroot}%{_bindir}/createrepo_c %{buildroot}%{_bindir}/createrepo @@ -252,25 +165,13 @@ ln -sr %{buildroot}%{_bindir}/modifyrepo_c %{buildroot}%{_bindir}/modifyrepo %{_libdir}/lib%{name}.so.* %files devel -%if %{with python3} %doc build-py3/doc/html -%else -%doc build-py2/doc/html -%endif %{_libdir}/lib%{name}.so %{_libdir}/pkgconfig/%{name}.pc %{_includedir}/%{name}/ -%if %{with python2} -%files -n python2-%{name} -%{python2_sitearch}/%{name}/ -%{python2_sitearch}/%{name}-%{version}-py%{python2_version}.egg-info -%endif - -%if %{with python3} %files -n python3-%{name} %{python3_sitearch}/%{name}/ %{python3_sitearch}/%{name}-%{version}-py%{python3_version}.egg-info -%endif %changelog |