Blob Blame History Raw
%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:        1%{?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:  python-devel

%if 0%{?fedora}
BuildRequires:  python3-devel
%endif

%description
There is the offtrac python library which offers the TracServer class. This
object is how one interacts with a Trac instance via xmlrpc.


%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
%{__python} setup.py build

%if 0%{?with_python3}
pushd %{py3dir}
%{__python3} setup.py build
popd
%endif


%install
rm -rf $RPM_BUILD_ROOT
%{__python} setup.py install -O1 --skip-build --root $RPM_BUILD_ROOT

%if 0%{?with_python3}
pushd %{py3dir}
%{__python3} setup.py install -O1 --skip-build --root $RPM_BUILD_ROOT
popd
%endif


%clean
rm -rf $RPM_BUILD_ROOT


%files
%defattr(-,root,root,-)
%doc COPYING LICENSE README
# For noarch packages: sitelib
%{python_sitelib}/offtrac
%{python_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
* 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