diff --git a/.gitignore b/.gitignore index 73fd8c6..11e6b53 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ vobject-0.8.1c.tar.gz +/vobject-0.9.0.tar.gz diff --git a/python-vobject.spec b/python-vobject.spec index e908c2b..321ebde 100644 --- a/python-vobject.spec +++ b/python-vobject.spec @@ -1,60 +1,114 @@ -%{!?python_sitelib: %define python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")} +%global modname vobject +%global sum A python library for manipulating vCard and vCalendar files -Name: python-vobject -Version: 0.8.1c -Release: 13%{?dist} -Summary: A python library for manipulating vCard and vCalendar files +%if 0%{?fedora} +%global with_python3 1 +%endif + +Name: python-vobject +Version: 0.9.0 +Release: 1%{?dist} +Summary: %{sum} -Group: Development/Languages License: ASL 2.0 -URL: http://vobject.skyhouseconsulting.com/ -Source0: http://vobject.skyhouseconsulting.com/vobject-%{version}.tar.gz -BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) +URL: http://eventable.github.io/vobject/ +Source0: https://pypi.python.org/packages/source/v/vobject/%{modname}-%{version}.tar.gz BuildArch: noarch + + +%description +VObject is intended to be a full featured python library for parsing and +generating vCard and vCalendar files. + + +%package -n python2-%{modname} +Summary: %{sum} + +Requires: python-dateutil +Requires: python-setuptools BuildRequires: python-devel BuildRequires: python-setuptools -Requires: python-dateutil15 -Requires: python-setuptools +BuildRequires: python-dateutil -Patch1: no-ez-setup.patch -Patch2: 0001-Require-dateutil-1.5.patch +%{?python_provide:%python_provide python2-%{modname}} -%description +%description -n python2-%{modname} VObject is intended to be a full featured python library for parsing and generating vCard and vCalendar files. -%prep -%setup -q -n vobject-%{version} -%patch1 -p1 -%patch2 -p1 +%if 0%{?with_python3} +%package -n python3-%{modname} +Summary: %{sum} + +Requires: python3-dateutil +Requires: python3-setuptools +BuildRequires: python3-devel +BuildRequires: python3-setuptools +BuildRequires: python3-dateutil + +%{?python_provide:%python_provide python3-%{modname}} + +%description -n python3-vobject +VObject is intended to be a full featured python library for parsing and +generating vCard and vCalendar files. +%endif +%prep +%autosetup -n %{modname}-%{version} +sed -i -e 's| == 2.4.0||' setup.py + %build -CFLAGS="$RPM_OPT_FLAGS" %{__python} setup.py build +%py2_build +%if 0%{?with_python3} +%py3_build +%endif %install -rm -rf $RPM_BUILD_ROOT -%{__python} setup.py install -O1 --skip-build --root $RPM_BUILD_ROOT +%py2_install +%if 0%{?with_python3} +%py3_install +%endif - -%clean -rm -rf $RPM_BUILD_ROOT +%check +%{__python2} setup.py test -%files -%defattr(-,root,root,-) -%doc ACKNOWLEDGEMENTS.txt LICENSE-2.0.txt README.txt +# Currently failing +#%if 0%{?with_python3} +#%{__python3} setup.py test +#%endif -%{python_sitelib}/* +%files -n python2-%{modname} +%doc README.md +# ACKNOWLEDGEMENTS.txt +#%license LICENSE-2.0.txt +%{python2_sitelib}/%{modname}/ +%{python2_sitelib}/%{modname}-%{version}* %{_bindir}/change_tz %{_bindir}/ics_diff +%if 0%{?with_python3} +%files -n python3-%{modname} +%doc README.md +# ACKNOWLEDGEMENTS.txt +#%license LICENSE-2.0.txt +%{python3_sitelib}/%{modname}/ +%{python3_sitelib}/%{modname}-%{version}-* +%endif + + + %changelog +* Tue Feb 09 2016 Pierre-Yves Chibon - 0.9.0-1 +- Update the spec to the latest guidelines, generating two sub-packages one + for py2 and one for py3 + * Thu Feb 04 2016 Fedora Release Engineering - 0.8.1c-13 - Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild diff --git a/sources b/sources index bb6e646..09cffdb 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -c9686dd74d39fdae140890d9c694c076 vobject-0.8.1c.tar.gz +c45da3f6c358bb7ed120a6b147df84ae vobject-0.9.0.tar.gz