From ee927b7eeae6c0f37a51ceb50a269ab6974aea95 Mon Sep 17 00:00:00 2001 From: Ralph Bean Date: Oct 30 2013 20:31:58 +0000 Subject: Port to python3, added python3 subpackage (#1024819) --- diff --git a/.gitignore b/.gitignore index a0ac3b1..908a4b7 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ offtrac-0.0.3.tar.bz2 /offtrac-0.0.4.tar.gz +/offtrac-0.1.0.tar.gz diff --git a/python-offtrac.spec b/python-offtrac.spec index 9bd5661..43f9063 100644 --- a/python-offtrac.spec +++ b/python-offtrac.spec @@ -1,9 +1,13 @@ +%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.0.4 -Release: 2%{?dist} +Version: 0.1.0 +Release: 1%{?dist} Summary: Trac xmlrpc library Group: Development/Languages @@ -14,23 +18,65 @@ Source0: https://pypi.python.org/packages/source/o/offtrac/offtrac-%{vers 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 @@ -38,8 +84,19 @@ rm -rf $RPM_BUILD_ROOT %{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 - 0.1.0-1 +- Python3 support + * Sun Aug 04 2013 Fedora Release Engineering - 0.0.4-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild diff --git a/sources b/sources index 74565f2..9e97927 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -7ac89e4b5024e949cbb87a3ac14f860c offtrac-0.0.4.tar.gz +6dc1019a2ba05b38dd1eed4c76567744 offtrac-0.1.0.tar.gz