python-multilib/python-multilib.spec
Ken Dreyer 5884470cf7 rpm: update description for repos
Koji uses python-multilib for dist-repos, which are different than Pungi
composes. Update the RPM %description field to reflect this.

Signed-off-by: Ken Dreyer <kdreyer@redhat.com>
2021-01-15 08:14:40 +00:00

164 lines
5.2 KiB
RPMSpec

# ** IMPORTANT NOTE **
# This spec is also tracked in productmd upstream git:
# https://pagure.io/releng/python-multilib
# Please synchronize changes to it with upstream, and be aware that
# the spec is used for builds on pure RHEL (i.e. without EPEL packages
# or macros).
# Enable Python 3 builds for Fedora + EPEL >5
# NOTE: do **NOT** change 'epel' to 'rhel' here, as this spec is also
# used to do RHEL builds without EPEL
%if 0%{?fedora} || 0%{?epel} > 5
# If the definition isn't available for python3_pkgversion, define it
%{?!python3_pkgversion:%global python3_pkgversion 3}
%bcond_without python3
%else
%bcond_with python3
%endif
# Compatibility with RHEL. These macros have been added to EPEL but
# not yet to RHEL proper.
# https://bugzilla.redhat.com/show_bug.cgi?id=1307190
%{!?__python2: %global __python2 /usr/bin/python2}
%{!?python2_sitelib: %global python2_sitelib %(%{__python2} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")}
%{!?python2_sitearch: %global python2_sitearch %(%{__python2} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(1))")}
%{!?py2_build: %global py2_build %{expand: CFLAGS="%{optflags}" %{__python2} setup.py %{?py_setup_args} build --executable="%{__python2} -s"}}
%{!?py2_install: %global py2_install %{expand: CFLAGS="%{optflags}" %{__python2} setup.py %{?py_setup_args} install -O1 --skip-build --root %{buildroot}}}
Name: python-multilib
Version: 1.3
Release: 1%{?dist}
Summary: A module for determining if a package is multilib or not
Group: Development/Libraries
License: GPLv2
URL: https://pagure.io/releng/python-multilib
Source0: https://releases.pagure.org/releng/python-multilib/%{name}-%{version}.tar.bz2
BuildArch: noarch
%global _description \
A Python module that supports several multilib "methods" useful for \
determining if a 32-bit package should be included with its 64-bit analogue \
in a repository.
%description %{_description}
%package conf
Summary: Configuration files for %{name}
%description conf
This package provides the configuration files for %{name}.
%package -n python2-multilib
Summary: %{summary}
%{?python_provide:%python_provide python2-multilib}
BuildRequires: python2-devel
%if 0%{?fedora}
BuildRequires: python2-setuptools
BuildRequires: python2-six
Requires: python2-six
%else
BuildRequires: python-setuptools
BuildRequires: python-six
Requires: python-six
%endif
Requires: python2
Requires: %{name}-conf = %{version}-%{release}
%description -n python2-multilib %{_description}
%if 0%{?with_python3}
%package -n python%{python3_pkgversion}-multilib
Summary: %{summary}
%{?python_provide:%python_provide python%{python3_pkgversion}-multilib}
BuildRequires: python%{python3_pkgversion}-devel
BuildRequires: python%{python3_pkgversion}-setuptools
BuildRequires: python%{python3_pkgversion}-six
Requires: python%{python3_pkgversion}-six
Requires: python%{python3_pkgversion}
Requires: %{name}-conf = %{version}-%{release}
%description -n python%{python3_pkgversion}-multilib %{_description}
%endif
%prep
%setup -q
%build
%py2_build
%if 0%{?with_python3}
%py3_build
%endif
%install
%py2_install
%if 0%{?with_python3}
%py3_install
%endif
%check
# testing requires complete composes available locally, which no buildsystem
# would ever want included in a build root
#{__python2} setup.py test
#{__python3} setup.py test
# this must go after all 'License:' tags
# Implemented in EPEL, but not in RHEL
%{!?_licensedir:%global license %doc}
%files conf
%config(noreplace) %{_sysconfdir}/multilib.conf
%files -n python2-multilib
%license LICENSE
%doc README.md
%{python2_sitelib}/*
%if 0%{?with_python3}
%files -n python%{python3_pkgversion}-multilib
%license LICENSE
%doc README.md
%{python3_sitelib}/*
%endif
%changelog
* Tue Mar 05 2019 Lubomír Sedlář <lsedlar@redhat.com> - 1.3-1
- Stop installing to /etc with setup.py
* Thu Apr 20 2017 Lubomír Sedlář <lsedlar@redhat.com> - 1.2-2
- Update requires for epel builds
* Thu Mar 02 2017 Lubomír Sedlář <lsedlar@redhat.com> - 1.2-1
- New upstream version with support for DNF package objects
- Updated URL to point to new upstream on Pagure.io
* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.1-8
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
* Mon Dec 19 2016 Miro Hrončok <mhroncok@redhat.com> - 1.1-7
- Rebuild for Python 3.6
* Tue Jul 19 2016 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.1-6
- https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages
* Wed Jun 29 2016 Jay Greguske <jgregusk@redhat.com> - 1.1-5
- Package up for Fedora rawhide
* Sun May 01 2016 Neal Gompa <ngompa13@gmail.com> - 1.1-3
- Port to Python 3 and enable its subpackage
- Split config file to its own subpackage
* Thu Apr 07 2016 Dennis Gilmore <dennis@ausil.us> - 1.1-2
- setup to make python3 down the road.
- spec and srpm named python-multilib
- fix license
* Tue Jul 21 2009 Jay Greguske <jgregusk@redhat.com> - 1.1-1
- consider dependencies in multilib testing
- fix a couple import errors
* Tue Jul 21 2009 Jay Greguske <jgregusk@redhat.com> - 1.0-1
- Initial RPM release