%global with_python3 1 %global projectname Yapsy %global productname yapsy Name: python-yapsy Version: 1.10.2 Release: 3%{?dist} Summary: A simple plugin system for Python applications Group: Development/Libraries License: BSD and CC-BY-SA URL: http://yapsy.sourceforge.net Source0: http://downloads.sourceforge.net/project/%{productname}/%{projectname}-%{version}/%{projectname}-%{version}-pythons2n3.tar.gz BuildRequires: python2-devel BuildRequires: python-setuptools BuildRequires: python-sphinx Requires: python %description Yapsyâs main purpose is to offer a way to easily design a plugin system in Python. Yapsy only depends on Pythonâs standard library. %package -n python-yapsy-doc Summary: Documentation for python-yapsy, a plugin system for Python applications Group: Development/Libraries BuildArch: noarch %description -n python-yapsy-doc Documentation for yapsy, a simple plugin system for Python applications. %if 0%{?with_python3} %package -n python3-yapsy Summary: A simple plugin system for Python3 applications. Group: Development/Libraries BuildRequires: python3-devel BuildRequires: python3-setuptools %description -n python3-yapsy Yapsyâs main purpose is to offer a way to easily design a plugin system in Python3, and motivated by the fact that many other Python plugin system are either too complicated for a basic use or depend on a lot of libraries. Yapsy only depends on Pythonâs standard library. %package -n python3-yapsy-doc Summary: Documentation for python3-yapsy, a plugin system for Python3 applications. Group: Development/Libraries BuildArch: noarch BuildRequires: python3-sphinx %description -n python3-yapsy-doc Documentation for yapsy, a simple plugin system for python3 applications. %endif %prep %setup -qn %{projectname}-%{version}-pythons2n3 %build %{__python2} setup.py build %{__python2} setup.py build_sphinx -s src2/package/doc/ mv build build-py2 %if 0%{?with_python3} %{__python3} setup.py build %{__python3} setup.py build_sphinx -s src3/package/doc/ mv build build-py3 %endif %install mv build-py2 build %{__python2} setup.py install --skip-build --root %{buildroot} mv build build-py2 %if 0%{?with_python3} mv build-py3 build %{__python3} setup.py install --skip-build --root %{buildroot} mv build build-py3 %endif %files %{python_sitelib}/%{projectname}-%{version}_pythons2n3-py2.7.egg-info %{python_sitelib}/%{productname} %files -n python-yapsy-doc %doc src2/package/{README.txt,LICENSE.txt,CHANGELOG.txt} build-py2/sphinx/html/*.html build-py2/sphinx/html/{_sources,_static} %files -n python3-yapsy %{python3_sitelib}/%{projectname}-%{version}_pythons2n3-py3.3.egg-info %{python3_sitelib}/%{productname} %files -n python3-yapsy-doc %doc src3/package/{README.txt,LICENSE.txt,CHANGELOG.txt} build-py3/sphinx/html/*.html build-py3/sphinx/html/{_sources,_static} %changelog * Fri Oct 04 2013 Pete Travis <immanetize@fedoraproject.org> 1.10.2-3 - Turning on python3 boolean so python3 subpackage actually builds - Correct build and install sections to properly create python3 subpackage - Remove ill-conceived patches - Add python3-yapsy-doc subpackage, as upstream procides py3 sources for docs * Tue Aug 20 2013 Pete Travis <immanetize@fedoraproject.org> 1.10.2-2 - Updating spec file; cleaned up files section and BuildRequires,add noarch -doc subpackage * Mon Aug 19 2013 Pete Travis <immanetize@fedoraproject.org> 1.10.2-1 - Initial revision