diff --git a/.gitignore b/.gitignore index e69de29..8f89125 100644 --- a/.gitignore +++ b/.gitignore @@ -0,0 +1 @@ +/queuelib-1.0.tar.gz diff --git a/python-queuelib.spec b/python-queuelib.spec new file mode 100644 index 0000000..ccf86ef --- /dev/null +++ b/python-queuelib.spec @@ -0,0 +1,86 @@ +%global with_python3 1 +%global srcname queuelib + +Name: python-queuelib +Version: 1.0 +Release: 2%{?dist} +Summary: A collection of persistent (disk-based) queues + +License: BSD +URL: https://github.com/scrapy/queuelib +Source0: https://pypi.python.org/packages/source/q/%{srcname}/%{srcname}-%{version}.tar.gz +BuildArch: noarch + +BuildRequires: python2-devel +BuildRequires: python-setuptools +BuildRequires: python-nose + +%description +Queuelib is a collection of persistent (disk-based) queues for +Python. Queuelib goals are speed and simplicity. + +%if 0%{?with_python3} +%package -n python3-%{name} +Summary: A collection of persistent (disk-based) queues +BuildRequires: python3-devel +BuildRequires: python3-setuptools +BuildRequires: python3-nose + +%description -n python3-%{name} +Queuelib is a collection of persistent (disk-based) queues for +Python. Queuelib goals are speed and simplicity. +%endif # if with_python3 + +%prep +%setup -q -n %{srcname}-%{version} +%if 0%{?with_python3} +rm -rf %{py3dir} +cp -a . %{py3dir} +%endif # if with_python3 + +%build +%{__python2} setup.py build +%if 0%{?with_python3} +# Python 3 +pushd %{py3dir} +%{__python3} setup.py build +popd +%endif # if with_python3 + +%install +%{__python2} setup.py install -O1 --skip-build --root %{buildroot} +%if 0%{?with_python3} +# Python 3 +pushd %{py3dir} +%{__python3} setup.py install -O1 --skip-build --root %{buildroot} +popd +%endif # if with_python3 + +%check +nosetests queuelib/tests +%if 0%{?with_python3} +# Python 3 +pushd %{py3dir} +nosetests queuelib/tests +popd +%endif # if with_python3 + +%files +%doc LICENSE NEWS README.rst +%{python_sitelib}/%{srcname}/ +%{python_sitelib}/%{srcname}*.egg-info + +%if 0%{?with_python3} +# Python 3 +%files -n python3-%{name} +%doc LICENSE NEWS README.rst +%{python3_sitelib}/%{srcname}/ +%{python3_sitelib}/%{srcname}*.egg-info +%endif # with_python3 + +%changelog +* Mon Sep 09 2013 Fabian Affolter - 1.0-2 +- Python macro updated + +* Wed Sep 04 2013 Fabian Affolter - 1.0-1 +- Initial spec file for Fedora diff --git a/sources b/sources index e69de29..f0da95e 100644 --- a/sources +++ b/sources @@ -0,0 +1 @@ +4be2b21b307bb5aecf93e0b5bdfdaae0 queuelib-1.0.tar.gz