%if 0%{?fedora}
%global with_python3 1
%endif
# sitelib for noarch packages, sitearch for others (remove the unneeded one)
%{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
Name: python-offtrac
Version: 0.1.0
Release: 15%{?dist}
Summary: Trac xmlrpc library
Group: Development/Languages
License: GPLv2+
URL: http://fedorahosted.org/offtrac
Source0: https://pypi.python.org/packages/source/o/offtrac/offtrac-%{version}.tar.gz
BuildArch: noarch
BuildRequires: python2-devel
%if 0%{?fedora}
BuildRequires: python3-devel
%endif
%global _description\
There is the offtrac python library which offers the TracServer class. This\
object is how one interacts with a Trac instance via xmlrpc.\
%description %_description
%package -n python2-offtrac
Summary: %summary
%{?python_provide:%python_provide python2-offtrac}
%description -n python2-offtrac %_description
%if 0%{?with_python3}
%package -n python3-offtrac
Summary: Trac xmlrpc library
Group: Development/Languages
Requires: python3
%description -n python3-offtrac
There is the offtrac python library which offers the TracServer class. This
object is how one interacts with a Trac instance via xmlrpc.
%endif
%prep
%setup -q -n offtrac-%{version}
# Remove any bundled egg stuff.
rm -rf *.egg*
%if 0%{?with_python3}
rm -rf %{py3dir}
cp -a . %{py3dir}
%endif
%build
%py2_build
%if 0%{?with_python3}
pushd %{py3dir}
%{__python3} setup.py build
popd
%endif
%install
rm -rf $RPM_BUILD_ROOT
%py2_install
%if 0%{?with_python3}
pushd %{py3dir}
%{__python3} setup.py install -O1 --skip-build --root $RPM_BUILD_ROOT
popd
%endif
%files -n python2-offtrac
%doc COPYING LICENSE README
# For noarch packages: sitelib
%{python2_sitelib}/offtrac
%{python2_sitelib}/offtrac-%{version}*
%if 0%{?with_python3}
%files -n python3-offtrac
%doc COPYING LICENSE README
# For noarch packages: sitelib
%{python3_sitelib}/offtrac
%{python3_sitelib}/offtrac-%{version}*
%endif
%changelog
* Sat Jul 14 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.1.0-15
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
* Tue Jun 19 2018 Miro Hrončok <mhroncok@redhat.com> - 0.1.0-14
- Rebuilt for Python 3.7
* Fri Feb 09 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.1.0-13
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
* Fri Jan 26 2018 Iryna Shcherbina <ishcherb@redhat.com> - 0.1.0-12
- Update Python 2 dependency declarations to new packaging standards
(See https://fedoraproject.org/wiki/FinalizingFedoraSwitchtoPython3)
* Sat Aug 19 2017 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 0.1.0-11
- Python 2 binary package renamed to python2-offtrac
See https://fedoraproject.org/wiki/FinalizingFedoraSwitchtoPython3
* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.1.0-10
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.1.0-9
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
* Mon Dec 19 2016 Miro Hrončok <mhroncok@redhat.com> - 0.1.0-8
- Rebuild for Python 3.6
* Tue Jul 19 2016 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.1.0-7
- https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 0.1.0-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
* Tue Nov 10 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.1.0-5
- Rebuilt for https://fedoraproject.org/wiki/Changes/python3.5
* Thu Jun 18 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.1.0-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.1.0-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
* Wed May 28 2014 Kalev Lember <kalevlember@gmail.com> - 0.1.0-2
- Rebuilt for https://fedoraproject.org/wiki/Changes/Python_3.4
* Wed Oct 30 2013 Ralph Bean <rbean@redhat.com> - 0.1.0-1
- Python3 support
* Sun Aug 04 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.0.4-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
* Mon Feb 25 2013 Ralph Bean <rbean@redhat.com> - 0.0.4-1
- Latest upstream
- Fix for https://bugzilla.redhat.com/show_bug.cgi?id=836514
- More precise file naming
- Source0 url on PyPI.
* Thu Feb 14 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.0.3-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
* Sat Jul 21 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.0.3-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
* Sat Jan 14 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.0.3-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
* Tue Feb 08 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.0.3-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
* Thu Jul 22 2010 David Malcolm <dmalcolm@redhat.com> - 0.0.3-2
- Rebuilt for https://fedoraproject.org/wiki/Features/Python_2.7/MassRebuild
* Wed Aug 12 2009 Jesse Keating <jkeating@redhat.com> - 0.0.3-1
- Declare classes in the correct way, to work on python-2.5
* Wed Aug 05 2009 Jesse Keating <jkeating@redhat.com> - 0.0.2-1
- Fix licensing issues
* Tue Aug 04 2009 Jesse Keating <jkeating@redhat.com> - 0.0.1-1
- Initial package