diff --git a/python-rpmfluff.spec b/python-rpmfluff.spec index 0643bab..cc1a22a 100644 --- a/python-rpmfluff.spec +++ b/python-rpmfluff.spec @@ -1,113 +1,81 @@ -%{!?python_sitelib: %define python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")} +%global modname rpmfluff -Name: python-rpmfluff -Version: 0.4.3 -Release: 4%{?dist} +Name: python-%{modname} +Version: 0.5 +Release: 1%{?dist} Summary: Lightweight way of building RPMs, and sabotaging them -License: GPLv2 -Group: Development/Tools -URL: https://fedorahosted.org/rpmfluff/ -Source0: https://fedorahosted.org/releases/r/p/rpmfluff/rpmfluff-%{version}.tar.bz2 -BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) -BuildArch: noarch -BuildRequires: python -BuildRequires: python-devel -BuildRequires: python-setuptools -Requires: python -Requires: rpm-build +License: GPLv2+ +URL: https://pagure.io/rpmfluff +Source0: https://pagure.io/releases/%{modname}-%{version}.tar.xz -%description -rpmfluff provides a python library for building RPM packages, and -sabotaging them so they are broken in controlled ways. +BuildArch: noarch -It is intended for use when validating package analysis tools such as RPM lint. -It can also be used to construct test cases for package management software +%global _description \ +rpmfluff provides a python library for building RPM packages, and\ +sabotaging them so they are broken in controlled ways.\ +\ +It is intended for use when validating package analysis tools such as RPM lint.\ +It can also be used to construct test cases for package management software\ such as rpm and yum. +%description %{_description} -%package -n python3-rpmfluff -Summary: Lightweight way of building RPMs, and sabotaging them -BuildRequires: python3 -BuildRequires: python3-devel -BuildRequires: python3-setuptools -Requires: python3 -Requires: rpm-build - - -%description -n python3-rpmfluff -rpmfluff provides a python library for building RPM packages, and -sabotaging them so they are broken in controlled ways. +%package -n python2-%{modname} +Summary: %{summary} +%{?python_provide:%python_provide python2-%{modname}} +BuildRequires: python2-devel +Requires: rpm-build +Requires: createrepo_c -It is intended for use when validating package analysis tools such as RPM lint. -It can also be used to construct test cases for package management software -such as rpm and yum. - -This is the Python 3 version of the package. +%description -n python2-%{modname} %{_description} -%prep -%setup -qc -mv rpmfluff-%{version} python2 +Python 2 version. -pushd python2 -# Copy common doc files to the top directory -cp -pr README LICENSE ../ +%package -n python3-%{modname} +Summary: %{summary} +%{?python_provide:%python_provide python3-%{modname}} +BuildRequires: python3-devel +Requires: rpm-build +Requires: createrepo -popd +%description -n python3-%{modname} %{_description} -cp -a python2 python3 +Python 3 version. +%prep +%autosetup -n %{modname}-%{version} %build -pushd python2 -%{__python2} setup.py build -popd - -pushd python3 -%{__python3} setup.py build -popd - +%py2_build +%py3_build %install -rm -rf $RPM_BUILD_ROOT -pushd python2 -%{__python2} setup.py install --skip-build --root $RPM_BUILD_ROOT -popd - -pushd python3 -%{__python3} setup.py install --skip-build --root $RPM_BUILD_ROOT -popd - - -%clean -rm -rf $RPM_BUILD_ROOT - - -%files -%defattr(-,root,root,-) -%doc README -%doc LICENSE -%{python2_sitelib}/rpmfluff.py* -%{python2_sitelib}/rpmfluff*.egg-info - - -%files -n python3-rpmfluff -%defattr(-,root,root,-) -%doc README -%doc LICENSE -%{python3_sitelib}/rpmfluff.py* -%{python3_sitelib}/__pycache__/rpmfluff.* -%{python3_sitelib}/rpmfluff*.egg-info +%py2_install +%py3_install + +%check +# Ignore errors as for now due to https://pagure.io/rpmfluff/issue/7 +python2 %{modname}.py || : +python3 %{modname}.py || : + +%files -n python2-%{modname} +%license LICENSE +%doc README.md +%{python2_sitelib}/%{modname}.py* +%{python2_sitelib}/%{modname}-*.egg-info + +%files -n python3-%{modname} +%license LICENSE +%doc README.md +%{python3_sitelib}/%{modname}.py +%{python3_sitelib}/__pycache__/%{modname}.* +%{python3_sitelib}/%{modname}-*.egg-info %changelog -* Tue Jul 19 2016 Fedora Release Engineering - 0.4.3-4 -- https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages - -* Thu Feb 04 2016 Fedora Release Engineering - 0.4.3-3 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild - -* Tue Nov 10 2015 Fedora Release Engineering - 0.4.3-2 -- Rebuilt for https://fedoraproject.org/wiki/Changes/python3.5 +* Fri Jul 22 2016 Igor Gnatenko - 0.5-1 +- Make package following guidelines +- Replace usage of obsolete createrepo_c with createrepo * Thu Aug 20 2015 Jan Hutar - 0.4.2-1 - John Dulaney implemented weak dependencies