Blob Blame History Raw
%{!?python_sitelib: %define python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}

Name:          python-rpmfluff
Version:       0.4.3
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


%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.


%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.

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.

%prep
%setup -qc
mv rpmfluff-%{version} python2

pushd python2
# Copy common doc files to the top directory
cp -pr README LICENSE ../

popd

cp -a python2 python3


%build
pushd python2
%{__python2} setup.py build
popd

pushd python3
%{__python3} setup.py build
popd


%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

%changelog
* Thu Aug 20 2015 Jan Hutar <jhutar@redhat.com> - 0.4.2-1
- John Dulaney implemented weak dependencies

* Thu Jul 09 2015 Jan Hutar <jhutar@redhat.com> - 0.4-1
- David Shea did a lots of work to support Python 3
- RHEL5 (i.e. Python 2.4) support dropped

* Thu Jun 18 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.3-14
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild

* Mon Jun 30 2014 Toshio Kuratomi <toshio@fedoraproject.org> - 0.3-13
- Replace pyhton-setuptools-devel BR with python-setuptools

* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.3-12
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild

* Sun Aug 04 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.3-11
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild

* Thu Feb 14 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.3-10
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild

* Sat Jul 21 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.3-9
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild

* Sat Jan 14 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.3-8
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild

* Wed Feb 09 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.3-7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild

* Fri Jul 30 2010 David Malcolm <dmalcolm@redhat.com> - 0.3-6
- rebuild for python 2.7

* Fri Feb 12 2010 Jan Hutar <jhutar@redhat.com> - 0.3-5
- Now version is in the separate file

* Tue Jan 26 2010 Jan Hutar <jhutar@redhat.com> - 0.3-4
- Fix for deprecated popen2 module

* Thu Jan 7 2010 Jan Hutar <jhutar@redhat.com> - 0.3-3
- Moved to use EGGs for distribution

* Mon Dec 21 2009 Jan Hutar <jhutar@redhat.com> - 0.3-2
- Added separate LICENSE file

* Fri Dec 18 2009 Jan Hutar <jhutar@redhat.com> - 0.3-1
- New version, first attempt to get to Fedora

* Tue Jul 08 2008 Jan Hutar <jhutar@redhat.com> - 0.1-1
- Initial version
- spec-file based on python-html2text.spec