New version, Pyhton 3 subpackage, tests

This commit is contained in:
Miro Hrončok 2014-06-28 20:36:05 +02:00
parent d3a8f36ae1
commit a574eec138
3 changed files with 74 additions and 20 deletions

1
.gitignore vendored
View File

@ -1 +1,2 @@
/pyxattr-0.5.1.tar.gz
/pyxattr-0.5.3.tar.gz

View File

@ -1,44 +1,97 @@
%global with_python3 1
Name: pyxattr
Summary: Extended attributes library wrapper for Python
Version: 0.5.1
Release: 5%{?dist}
#license version is precised on a website
Version: 0.5.3
Release: 1%{?dist}
License: LGPLv2+
Group: Development/Libraries
URL: http://pyxattr.sourceforge.net/
Source: https://github.com/downloads/iustin/pyxattr/pyxattr-%{version}.tar.gz
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
#libattr package is already forced by RPM
Requires: python >= 2.2
#python-setuptools package is required since 0.4.0
BuildRequires: python-devel, libattr-devel, python-setuptools
URL: http://pyxattr.k1024.org/
Source: https://pypi.python.org/packages/source/p/%{name}/%{name}-%{version}.tar.gz
BuildRequires: libattr-devel
BuildRequires: python2-devel, python-setuptools
%if %{?with_python3}
BuildRequires: python3-devel, python3-setuptools
%endif # with_python3
%description
Python extension module wrapper for libattr. It allows to query, list,
add and remove extended attributes from files and directories.
%if %{?with_python3}
%package -n python3-%{name}
Summary: Extended attributes library wrapper for Python 3
%description -n python3-%{name}
Python extension module wrapper for libattr. It allows to query, list,
add and remove extended attributes from files and directories.
Python 3 version.
%endif # with_python3
%prep
%setup -q
%if 0%{?with_python3}
rm -rf %{py3dir}
cp -a . %{py3dir}
%endif # with_python3
%build
CFLAGS="%{optflags}" %{__python} setup.py build
CFLAGS="%{optflags}" %{__python2} setup.py build
%if 0%{?with_python3}
pushd %{py3dir}
CFLAGS="%{optflags}" %{__python3} setup.py build
popd
%endif # with_python3
%install
%{__rm} -rf %{buildroot}
%{__python} setup.py install --root="%{buildroot}" --prefix="%{_prefix}"
%{__python2} setup.py install --root="%{buildroot}" --prefix="%{_prefix}"
%clean
%{__rm} -rf %{buildroot}
%if 0%{?with_python3}
pushd %{py3dir}
%{__python3} setup.py install --root="%{buildroot}" --prefix="%{_prefix}"
popd
%endif # with_python3
%check
%{__python2} setup.py test
%if 0%{?with_python3}
pushd %{py3dir}
%{__python3} setup.py test
popd
%endif # with_python3
%files
%defattr(0644,root,root,0755)
%{_libdir}/python*/site-packages/xattr.so
#Python Eggs already in source distribution
#(without compiled content, can be simple included in RPM package)
%{_libdir}/python*/site-packages/*egg-info
%{python2_sitearch}/xattr.so
%{python2_sitearch}/*egg-info
%doc COPYING NEWS README
%if %{?with_python3}
%files -n python3-%{name}
%defattr(0644,root,root,0755)
%{python3_sitearch}/xattr.cpython-??m.so
%{python3_sitearch}/*egg-info
%doc COPYING NEWS README
%endif # with_python3
%changelog
* Sat Jun 28 2014 Miro Hrončok <mhroncok@redhat.com> - 0.5.3-1
- Updated to 0.5.3
- Updated the website
- Updated download URL to PyPI
- Removed useless Require of python >= 2.2
- Use %%{pythonX_sitearch} macros
- Removed BuildRoot definition, %%clean section and rm -rf at the beginning of %%install
- Introduced Python 3 subpackage
- Introduced %%check and run the test suite
* Sun Jun 08 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.5.1-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild

View File

@ -1 +1 @@
bb9560510b17625015aa45f2fbc3b520 pyxattr-0.5.1.tar.gz
579cf6ccccd70916f7eb5304ffd9e837 pyxattr-0.5.3.tar.gz