From e6d41706ec37b8d28f45f803077a2fae5884ab65 Mon Sep 17 00:00:00 2001 From: David Shea Date: Jul 09 2015 20:38:29 +0000 Subject: Add a python3 package Signed-off-by: Jan Hutar --- diff --git a/Makefile b/Makefile index b8dab56..1bf01f9 100644 --- a/Makefile +++ b/Makefile @@ -22,6 +22,7 @@ package: tarbal mv mybuild/SPECS/python-$(NAME).spec ./python-$(NAME)-x.spec mv mybuild/SRPMS/python-$(NAME)-$(VERSION)-*.src.rpm . mv mybuild/RPMS/noarch/python-$(NAME)-$(VERSION)-*.noarch.rpm . + mv mybuild/RPMS/noarch/python3-$(NAME)-$(VERSION)-*.noarch.rpm . rpmlint: VERSION=$(shell cat VERSION) rpmlint: diff --git a/python-rpmfluff.spec b/python-rpmfluff.spec index 73b170e..c5a1e96 100644 --- a/python-rpmfluff.spec +++ b/python-rpmfluff.spec @@ -25,17 +25,54 @@ 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-devel +BuildRequires: python3-setuptools + + +%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 -q -n rpmfluff-%{version} +%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 -CFLAGS="$RPM_OPT_FLAGS" %{__python} setup.py build +pushd python2 +%{__python2} setup.py build +popd + +pushd python3 +%{__python3} setup.py build +popd %install rm -rf $RPM_BUILD_ROOT -%{__python} setup.py install --skip-build --root $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 @@ -46,9 +83,17 @@ rm -rf $RPM_BUILD_ROOT %defattr(-,root,root,-) %doc README %doc LICENSE -%{python_sitelib}/rpmfluff.py* -%{python_sitelib}/rpmfluff*.egg-info +%{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 Jun 18 2015 Fedora Release Engineering - 0.3-14